This class provides functions to evaluate the velocity and turbulence distributions appropriate for atmospheric boundary layers (ABL). More...
Public Member Functions | |
atmBoundaryLayer () | |
Construct null. More... | |
atmBoundaryLayer (const vectorField &p, const dictionary &) | |
Construct from the coordinates field and dictionary. More... | |
atmBoundaryLayer (const atmBoundaryLayer &, const fvPatchFieldMapper &) | |
Construct by mapping given. More... | |
atmBoundaryLayer (const atmBoundaryLayer &) | |
Construct as copy. More... | |
const vector & | flowDir () const |
Return flow direction. More... | |
const vector & | zDir () const |
Return z-direction. More... | |
const scalarField & | Ustar () 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... | |
Private Attributes | |
vector | flowDir_ |
Flow direction. More... | |
vector | zDir_ |
Direction of the z-coordinate. More... | |
const scalar | kappa_ |
Von Karman constant. More... | |
const scalar | Cmu_ |
Turbulent viscosity coefficient. More... | |
const scalar | Uref_ |
Reference velocity. More... | |
const scalar | Zref_ |
Reference height. More... | |
scalarField | z0_ |
Surface roughness height. More... | |
scalarField | zGround_ |
Minimum coordinate value in z direction. More... | |
scalarField | Ustar_ |
Friction velocity. 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:
where
![]() | = | Friction velocity |
![]() | = | von Karman's constant |
![]() | = | Turbulence viscosity coefficient |
![]() | = | Vertical coordinate |
![]() | = | Surface roughness height [m] |
![]() | = | Minimum z-coordinate [m] |
and
where
![]() | = | Reference velocity at ![]() |
![]() | = | 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.
Patch usage
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 206 of file atmBoundaryLayer.H.
atmBoundaryLayer | ( | ) |
Construct null.
Definition at line 35 of file atmBoundaryLayer.C.
atmBoundaryLayer | ( | const vectorField & | p, |
const dictionary & | dict | ||
) |
Construct from the coordinates field and dictionary.
Definition at line 49 of file atmBoundaryLayer.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, atmBoundaryLayer::flowDir_, atmBoundaryLayer::kappa_, Foam::log(), Foam::mag(), atmBoundaryLayer::Uref_, atmBoundaryLayer::Ustar_, atmBoundaryLayer::z0_, atmBoundaryLayer::zDir_, and atmBoundaryLayer::Zref_.
atmBoundaryLayer | ( | const atmBoundaryLayer & | ptf, |
const fvPatchFieldMapper & | mapper | ||
) |
Construct by mapping given.
atmBoundaryLayer onto a new patch
Definition at line 77 of file atmBoundaryLayer.C.
atmBoundaryLayer | ( | const atmBoundaryLayer & | blpvf | ) |
Construct as copy.
Definition at line 94 of file atmBoundaryLayer.C.
|
inline |
Return flow direction.
Definition at line 265 of file atmBoundaryLayer.H.
References atmBoundaryLayer::flowDir_.
|
inline |
Return z-direction.
Definition at line 271 of file atmBoundaryLayer.H.
References atmBoundaryLayer::zDir_.
|
inline |
Return friction velocity.
Definition at line 277 of file atmBoundaryLayer.H.
References atmBoundaryLayer::Ustar_.
void autoMap | ( | const fvPatchFieldMapper & | m | ) |
Map (and resize as needed) from self given a mapping object.
Definition at line 110 of file atmBoundaryLayer.C.
References Field::autoMap(), atmBoundaryLayer::Ustar_, atmBoundaryLayer::z0_, and atmBoundaryLayer::zGround_.
Referenced by atmBoundaryLayerInletEpsilonFvPatchScalarField::autoMap(), atmBoundaryLayerInletKFvPatchScalarField::autoMap(), and atmBoundaryLayerInletVelocityFvPatchVectorField::autoMap().
void rmap | ( | const atmBoundaryLayer & | blptf, |
const labelList & | addr | ||
) |
Reverse map the given fvPatchField onto this fvPatchField.
Definition at line 119 of file atmBoundaryLayer.C.
References atmBoundaryLayer::Ustar_, atmBoundaryLayer::z0_, and atmBoundaryLayer::zGround_.
Referenced by atmBoundaryLayerInletEpsilonFvPatchScalarField::rmap(), atmBoundaryLayerInletKFvPatchScalarField::rmap(), and atmBoundaryLayerInletVelocityFvPatchVectorField::rmap().
tmp< vectorField > U | ( | const vectorField & | p | ) | const |
Return the velocity distribution for the ATM.
Definition at line 130 of file atmBoundaryLayer.C.
References atmBoundaryLayer::flowDir_, atmBoundaryLayer::kappa_, Foam::log(), p, atmBoundaryLayer::Ustar_, atmBoundaryLayer::z0_, atmBoundaryLayer::zDir_, and atmBoundaryLayer::zGround_.
tmp< scalarField > k | ( | const vectorField & | p | ) | const |
Return the turbulent kinetic energy distribution for the ATM.
Definition at line 142 of file atmBoundaryLayer.C.
References atmBoundaryLayer::Cmu_, Foam::sqr(), Foam::sqrt(), and atmBoundaryLayer::Ustar_.
tmp< scalarField > epsilon | ( | const vectorField & | p | ) | const |
Return the turbulent dissipation rate distribution for the ATM.
Definition at line 148 of file atmBoundaryLayer.C.
References atmBoundaryLayer::kappa_, p, Foam::pow3(), atmBoundaryLayer::Ustar_, atmBoundaryLayer::z0_, atmBoundaryLayer::zDir_, and atmBoundaryLayer::zGround_.
void write | ( | Ostream & | os | ) | const |
Write.
Definition at line 154 of file atmBoundaryLayer.C.
References atmBoundaryLayer::Cmu_, token::END_STATEMENT, atmBoundaryLayer::flowDir_, atmBoundaryLayer::kappa_, Foam::nl, atmBoundaryLayer::Uref_, Field::writeEntry(), Ostream::writeKeyword(), atmBoundaryLayer::z0_, atmBoundaryLayer::zDir_, atmBoundaryLayer::zGround_, and atmBoundaryLayer::Zref_.
Referenced by atmBoundaryLayerInletEpsilonFvPatchScalarField::write(), atmBoundaryLayerInletKFvPatchScalarField::write(), and atmBoundaryLayerInletVelocityFvPatchVectorField::write().
|
private |
Flow direction.
Definition at line 211 of file atmBoundaryLayer.H.
Referenced by atmBoundaryLayer::atmBoundaryLayer(), atmBoundaryLayer::flowDir(), atmBoundaryLayer::U(), and atmBoundaryLayer::write().
|
private |
Direction of the z-coordinate.
Definition at line 214 of file atmBoundaryLayer.H.
Referenced by atmBoundaryLayer::atmBoundaryLayer(), atmBoundaryLayer::epsilon(), atmBoundaryLayer::U(), atmBoundaryLayer::write(), and atmBoundaryLayer::zDir().
|
private |
Von Karman constant.
Definition at line 217 of file atmBoundaryLayer.H.
Referenced by atmBoundaryLayer::atmBoundaryLayer(), atmBoundaryLayer::epsilon(), atmBoundaryLayer::U(), and atmBoundaryLayer::write().
|
private |
Turbulent viscosity coefficient.
Definition at line 220 of file atmBoundaryLayer.H.
Referenced by atmBoundaryLayer::k(), and atmBoundaryLayer::write().
|
private |
Reference velocity.
Definition at line 223 of file atmBoundaryLayer.H.
Referenced by atmBoundaryLayer::atmBoundaryLayer(), and atmBoundaryLayer::write().
|
private |
Reference height.
Definition at line 226 of file atmBoundaryLayer.H.
Referenced by atmBoundaryLayer::atmBoundaryLayer(), and atmBoundaryLayer::write().
|
private |
Surface roughness height.
Definition at line 229 of file atmBoundaryLayer.H.
Referenced by atmBoundaryLayer::atmBoundaryLayer(), atmBoundaryLayer::autoMap(), atmBoundaryLayer::epsilon(), atmBoundaryLayer::rmap(), atmBoundaryLayer::U(), and atmBoundaryLayer::write().
|
private |
Minimum coordinate value in z direction.
Definition at line 232 of file atmBoundaryLayer.H.
Referenced by atmBoundaryLayer::autoMap(), atmBoundaryLayer::epsilon(), atmBoundaryLayer::rmap(), atmBoundaryLayer::U(), and atmBoundaryLayer::write().
|
private |
Friction velocity.
Definition at line 235 of file atmBoundaryLayer.H.
Referenced by atmBoundaryLayer::atmBoundaryLayer(), atmBoundaryLayer::autoMap(), atmBoundaryLayer::epsilon(), atmBoundaryLayer::k(), atmBoundaryLayer::rmap(), atmBoundaryLayer::U(), and atmBoundaryLayer::Ustar().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.