atmBoundaryLayer Class Reference

This class provides functions to evaluate the velocity and turbulence distributions appropriate for atmospheric boundary layers (ABL). More...

Inheritance diagram for atmBoundaryLayer:

Public Member Functions

 atmBoundaryLayer ()
 Construct null. More...
 
 atmBoundaryLayer (const vector &flowDir, const vector &zDir, const scalar Uref, const scalar Zref, const scalarField &z0, const scalarField &zGround, const scalar kappa=kappaDefault_, const scalar Cmu=CmuDefault_, const scalar ULower=0, const scalar kLower=0, const scalar epsilonLower=0)
 Construct from components. 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 &)
 Copy constructor. More...
 
const vectorflowDir () const
 Return flow direction. More...
 
const vectorzDir () const
 Return z-direction. More...
 
const scalarFieldUstar () const
 Return friction velocity. More...
 
void map (const atmBoundaryLayer &, const fvPatchFieldMapper &)
 Map the given atmBoundaryLayer onto this atmBoundaryLayer. More...
 
void reset (const atmBoundaryLayer &)
 Reset the atmBoundaryLayer to the given atmBoundaryLayer. More...
 
tmp< vectorFieldU (const vectorField &p) const
 Return the velocity distribution for the ATM. More...
 
tmp< scalarFieldk (const vectorField &p) const
 Return the turbulent kinetic energy distribution for the ATM. More...
 
tmp< scalarFieldepsilon (const vectorField &p) const
 Return the turbulent dissipation rate distribution for the ATM. More...
 
void write (Ostream &) const
 Write. More...
 

Detailed Description

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.

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
Ulower Velocity below the BL no
kLower Turbulence k below the BL no
epsilonLower Turbulence epsilon below the BL no

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;
    }

Note: D.M. Hargreaves and N.G. Wright recommend Gamma epsilon in the k-epsilon model should be changed from 1.3 to 1.11 for consistency. The roughness height (Er) is given by Er = 20 z0 following the same reference.

Source files

Definition at line 220 of file atmBoundaryLayer.H.

Constructor & Destructor Documentation

◆ atmBoundaryLayer() [1/5]

Construct null.

Definition at line 56 of file atmBoundaryLayer.C.

◆ atmBoundaryLayer() [2/5]

atmBoundaryLayer ( const vector flowDir,
const vector zDir,
const scalar  Uref,
const scalar  Zref,
const scalarField z0,
const scalarField zGround,
const scalar  kappa = kappaDefault_,
const scalar  Cmu = CmuDefault_,
const scalar  ULower = 0,
const scalar  kLower = 0,
const scalar  epsilonLower = 0 
)

Construct from components.

Definition at line 74 of file atmBoundaryLayer.C.

◆ atmBoundaryLayer() [3/5]

atmBoundaryLayer ( const vectorField p,
const dictionary dict 
)

Construct from the coordinates field and dictionary.

Definition at line 107 of file atmBoundaryLayer.C.

◆ atmBoundaryLayer() [4/5]

atmBoundaryLayer ( const atmBoundaryLayer abl,
const fvPatchFieldMapper mapper 
)

Construct by mapping given.

atmBoundaryLayer onto a new patch

Definition at line 131 of file atmBoundaryLayer.C.

◆ atmBoundaryLayer() [5/5]

Copy constructor.

Definition at line 153 of file atmBoundaryLayer.C.

Member Function Documentation

◆ flowDir()

const vector& flowDir ( ) const
inline

Return flow direction.

Definition at line 323 of file atmBoundaryLayer.H.

◆ zDir()

const vector& zDir ( ) const
inline

Return z-direction.

Definition at line 329 of file atmBoundaryLayer.H.

◆ Ustar()

const scalarField& Ustar ( ) const
inline

Return friction velocity.

Definition at line 335 of file atmBoundaryLayer.H.

◆ map()

void map ( const atmBoundaryLayer blptf,
const fvPatchFieldMapper mapper 
)

◆ reset()

void reset ( const atmBoundaryLayer blptf)

Reset the atmBoundaryLayer to the given atmBoundaryLayer.

Used for mesh to mesh mapping

Definition at line 185 of file atmBoundaryLayer.C.

Referenced by atmBoundaryLayerInletEpsilonFvPatchScalarField::reset(), atmBoundaryLayerInletKFvPatchScalarField::reset(), and atmBoundaryLayerInletVelocityFvPatchVectorField::reset().

Here is the caller graph for this function:

◆ U()

Foam::tmp< Foam::vectorField > U ( const vectorField p) const

Return the velocity distribution for the ATM.

Definition at line 193 of file atmBoundaryLayer.C.

References Foam::log(), Foam::max(), and p.

Referenced by atmBoundaryLayerInletVelocityFvPatchVectorField::atmBoundaryLayerInletVelocityFvPatchVectorField(), and waveAtmBoundaryLayerSuperposition::UGas().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ k()

Foam::tmp< Foam::scalarField > k ( const vectorField p) const

Return the turbulent kinetic energy distribution for the ATM.

Definition at line 215 of file atmBoundaryLayer.C.

References Foam::neg(), p, Foam::pos0(), tmp< T >::ref(), Foam::sqr(), and Foam::sqrt().

Referenced by atmBoundaryLayerInletKFvPatchScalarField::atmBoundaryLayerInletKFvPatchScalarField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ epsilon()

Foam::tmp< Foam::scalarField > epsilon ( const vectorField p) const

Return the turbulent dissipation rate distribution for the ATM.

Definition at line 235 of file atmBoundaryLayer.C.

References Foam::neg(), p, Foam::pos0(), Foam::pow3(), and tmp< T >::ref().

Referenced by atmBoundaryLayerInletEpsilonFvPatchScalarField::atmBoundaryLayerInletEpsilonFvPatchScalarField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write()

void write ( Ostream os) const

Write.

Definition at line 255 of file atmBoundaryLayer.C.

References Foam::writeEntry().

Referenced by atmBoundaryLayerInletEpsilonFvPatchScalarField::write(), atmBoundaryLayerInletKFvPatchScalarField::write(), and atmBoundaryLayerInletVelocityFvPatchVectorField::write().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: