This class provides functions to evaluate the velocity and turbulence distributions appropriate for atmospheric boundary layers (ABL). More...
Public Member Functions | |
atmBoundaryLayer (const Time &time, const polyPatch &pp) | |
Construct null from time. More... | |
atmBoundaryLayer (const Time &time, const polyPatch &pp, const dictionary &dict) | |
Construct from the time database and dictionary. More... | |
atmBoundaryLayer (const atmBoundaryLayer &abl, const fvPatch &patch, const fvPatchFieldMapper &mapper) | |
Construct by mapping given atmBoundaryLayer onto a new patch. More... | |
atmBoundaryLayer (const atmBoundaryLayer &) | |
Construct as copy. More... | |
vector | flowDir () const |
Return flow direction. More... | |
vector | zDir () const |
Return z-direction. More... | |
tmp< scalarField > | Ustar (const scalarField &z0) const |
Return friction velocity. More... | |
void | autoMap (const fvPatchFieldMapper &) |
Map (and resize as needed) from self given a mapping object. More... | |
void | rmap (const atmBoundaryLayer &, const labelList &) |
Reverse map the given fvPatchField onto this fvPatchField. More... | |
tmp< vectorField > | U (const vectorField &p) const |
Return the velocity distribution for the ATM. More... | |
tmp< scalarField > | k (const vectorField &p) const |
Return the turbulent kinetic energy distribution for the ATM. More... | |
tmp< scalarField > | epsilon (const vectorField &p) const |
Return the turbulent dissipation rate distribution for the ATM. More... | |
void | write (Ostream &) const |
Write. More... | |
This class provides functions to evaluate the velocity and turbulence distributions appropriate for atmospheric boundary layers (ABL).
The profile is derived from the friction velocity, flow direction and "vertical" direction:
\[ U = \frac{U^*}{\kappa} ln\left(\frac{z - z_g + z_0}{z_0}\right) \]
\[ k = \frac{(U^*)^2}{\sqrt{C_{\mu}}} \]
\[ \epsilon = \frac{(U^*)^3}{\kappa(z - z_g + z_0)} \]
where
\( U^* \) | = | Friction velocity |
\( \kappa \) | = | von Karman's constant |
\( C_{\mu} \) | = | Turbulence viscosity coefficient |
\( z \) | = | Vertical coordinate |
\( z_0 \) | = | Surface roughness height [m] |
\( z_g \) | = | Minimum z-coordinate [m] |
and
\[ U^* = \kappa\frac{U_{ref}}{ln\left(\frac{Z_{ref} + z_0}{z_0}\right)} \]
where
\( U_{ref} \) | = | Reference velocity at \(Z_{ref}\) [m/s] |
\( Z_{ref} \) | = | Reference height [m] |
Use in the atmBoundaryLayerInletVelocity, atmBoundaryLayerInletK and atmBoundaryLayerInletEpsilon boundary conditions.
Reference: D.M. Hargreaves and N.G. Wright, "On the use of the k-epsilon model in commercial CFD software to model the neutral atmospheric boundary layer", Journal of Wind Engineering and Industrial Aerodynamics 95(2007), pp 355-369.
Property | Description | Required | Default |
---|---|---|---|
flowDir | Flow direction | yes | |
zDir | Vertical direction | yes | |
kappa | von Karman's constant | no | 0.41 |
Cmu | Turbulence viscosity coefficient | no | 0.09 |
Uref | Reference velocity [m/s] | yes | |
Zref | Reference height [m] | yes | |
z0 | Surface roughness height [m] | yes | |
zGround | Minimum z-coordinate [m] | yes |
Example of the boundary condition specification:
ground { type atmBoundaryLayerInletVelocity; flowDir (1 0 0); zDir (0 0 1); Uref 10.0; Zref 20.0; z0 uniform 0.1; zGround uniform 0.0; }
Definition at line 210 of file atmBoundaryLayer.H.
atmBoundaryLayer | ( | const Time & | time, |
const polyPatch & | pp | ||
) |
Construct null from time.
Definition at line 38 of file atmBoundaryLayer.C.
atmBoundaryLayer | ( | const Time & | time, |
const polyPatch & | pp, | ||
const dictionary & | dict | ||
) |
Construct from the time database and dictionary.
Definition at line 54 of file atmBoundaryLayer.C.
atmBoundaryLayer | ( | const atmBoundaryLayer & | abl, |
const fvPatch & | patch, | ||
const fvPatchFieldMapper & | mapper | ||
) |
Construct by mapping given atmBoundaryLayer onto a new patch.
Definition at line 74 of file atmBoundaryLayer.C.
atmBoundaryLayer | ( | const atmBoundaryLayer & | abl | ) |
Construct as copy.
Definition at line 93 of file atmBoundaryLayer.C.
vector flowDir | ( | ) | const |
Return flow direction.
Definition at line 110 of file atmBoundaryLayer.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::mag(), and TimeState::timeOutputValue().
Referenced by atmBoundaryLayer::U().
vector zDir | ( | ) | const |
Return z-direction.
Definition at line 128 of file atmBoundaryLayer.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::mag(), and TimeState::timeOutputValue().
Referenced by atmBoundaryLayer::epsilon(), and atmBoundaryLayer::U().
tmp< scalarField > Ustar | ( | const scalarField & | z0 | ) | const |
Return friction velocity.
Definition at line 146 of file atmBoundaryLayer.C.
References Foam::log(), TimeState::timeOutputValue(), and TimeFunction1< Type >::value().
Referenced by atmBoundaryLayer::epsilon(), atmBoundaryLayer::k(), and atmBoundaryLayer::U().
void autoMap | ( | const fvPatchFieldMapper & | mapper | ) |
Map (and resize as needed) from self given a mapping object.
Definition at line 156 of file atmBoundaryLayer.C.
Referenced by atmBoundaryLayerInletEpsilonFvPatchScalarField::autoMap(), atmBoundaryLayerInletVelocityFvPatchVectorField::autoMap(), and atmBoundaryLayerInletKFvPatchScalarField::autoMap().
void rmap | ( | const atmBoundaryLayer & | abl, |
const labelList & | addr | ||
) |
Reverse map the given fvPatchField onto this fvPatchField.
Definition at line 164 of file atmBoundaryLayer.C.
Referenced by atmBoundaryLayerInletEpsilonFvPatchScalarField::rmap(), atmBoundaryLayerInletVelocityFvPatchVectorField::rmap(), and atmBoundaryLayerInletKFvPatchScalarField::rmap().
tmp< vectorField > U | ( | const vectorField & | p | ) | const |
Return the velocity distribution for the ATM.
Definition at line 174 of file atmBoundaryLayer.C.
References atmBoundaryLayer::flowDir(), Foam::log(), Foam::max(), p, TimeState::timeOutputValue(), atmBoundaryLayer::Ustar(), and atmBoundaryLayer::zDir().
Referenced by atmBoundaryLayerInletVelocityFvPatchVectorField::updateCoeffs().
tmp< scalarField > k | ( | const vectorField & | p | ) | const |
Return the turbulent kinetic energy distribution for the ATM.
Definition at line 186 of file atmBoundaryLayer.C.
References Foam::max(), Foam::sqr(), Foam::sqrt(), TimeState::timeOutputValue(), and atmBoundaryLayer::Ustar().
Referenced by atmBoundaryLayerInletKFvPatchScalarField::updateCoeffs().
tmp< scalarField > epsilon | ( | const vectorField & | p | ) | const |
Return the turbulent dissipation rate distribution for the ATM.
Definition at line 195 of file atmBoundaryLayer.C.
References Foam::max(), p, Foam::pow3(), TimeState::timeOutputValue(), atmBoundaryLayer::Ustar(), and atmBoundaryLayer::zDir().
Referenced by atmBoundaryLayerInletEpsilonFvPatchScalarField::updateCoeffs().
void write | ( | Ostream & | os | ) | const |
Write.
Definition at line 205 of file atmBoundaryLayer.C.
References TimeFunction1< Type >::writeData(), and Ostream::writeEntry().
Referenced by atmBoundaryLayerInletEpsilonFvPatchScalarField::write(), atmBoundaryLayerInletKFvPatchScalarField::write(), and atmBoundaryLayerInletVelocityFvPatchVectorField::write().