Public Member Functions | Protected Attributes | List of all members

Base class to set log-law type ground-normal inlet boundary conditions for wind velocity and turbulence quantities for homogeneous, two-dimensional, dry-air, equilibrium and neutral atmospheric boundary layer (ABL) modelling. More...

Inheritance diagram for atmBoundaryLayer:
Inheritance graph
[legend]

Public Member Functions

 atmBoundaryLayer (const Time &time, const polyPatch &pp)
 
 atmBoundaryLayer (const Time &time, const polyPatch &pp, const dictionary &dict)
 
 atmBoundaryLayer (const atmBoundaryLayer &abl, const fvPatch &patch, const fvPatchFieldMapper &mapper)
 
 atmBoundaryLayer (const atmBoundaryLayer &)
 
vector flowDir () const
 
vector zDir () const
 
tmp< scalarFieldUstar (const scalarField &z0) const
 
void autoMap (const fvPatchFieldMapper &)
 
void rmap (const atmBoundaryLayer &, const labelList &)
 
tmp< vectorFieldU (const vectorField &pCf) const
 
tmp< scalarFieldk (const vectorField &pCf) const
 
tmp< scalarFieldepsilon (const vectorField &pCf) const
 
tmp< scalarFieldomega (const vectorField &pCf) const
 
void write (Ostream &) const
 

Protected Attributes

bool initABL_
 

Detailed Description

Base class to set log-law type ground-normal inlet boundary conditions for wind velocity and turbulence quantities for homogeneous, two-dimensional, dry-air, equilibrium and neutral atmospheric boundary layer (ABL) modelling.

The ground-normal profile expressions are due to YGCJ (refer to references below) whereat RH expressions were generalised:

\[ u = \frac{u^*}{\kappa} \ln \left( \frac{z - d + z_0}{z_0} \right) \]

\[ v = w = 0 \]

\[ k = \frac{(u^*)^2}{\sqrt{C_\mu}} \sqrt{C_1 \ln \left( \frac{z - d + z_0}{z_0} \right) + C_2} \]

\[ \epsilon = \frac{(u^*)^3}{\kappa (z - d + z_0)} \sqrt{C_1 \ln \left( \frac{z - d + z_0}{z_0} \right) + C_2} \]

\[ \omega = \frac{u^*}{\kappa \sqrt{C_\mu}} \frac{1}{z - d + z_0} \]

\[ u^* = \frac{u_{ref} \kappa}{\ln\left(\frac{z_{ref} + z_0}{z_0}\right)} \]

where

$ u $ = Ground-normal streamwise flow speed profile [m/s]
$ v $ = Spanwise flow speed [m/s]
$ w $ = Ground-normal flow speed [m/s]
$ k $ = Ground-normal turbulent kinetic energy (TKE) profile [m^2/s^2]
$ \epsilon $ = Ground-normal TKE dissipation rate profile [m^2/s^3]
$ \omega $ = Ground-normal specific dissipation rate profile [m^2/s^3]
$ u^* $ = Friction velocity [m/s]
$ \kappa $ = von Kármán constant [-]
$ C_\mu $ = Empirical model constant [-]
$ z $ = Ground-normal coordinate component [m]
$ d $ = Ground-normal displacement height [m]
$ z_0 $ = Aerodynamic roughness length [m]
$ u_{ref} $ = Reference mean streamwise wind speed at $z_{ref}$ [m/s]
$ z_{ref} $ = Reference height being used in $u^*$ estimations [m]
$ C_1 $ = Curve-fitting coefficient for YGCJ profiles [-]
$ C_2 $ = Curve-fitting coefficient for YGCJ profiles [-]

Reference:

        The ground-normal profile expressions (tag:RH):
            Richards, P. J., & Hoxey, R. P. (1993).
            Appropriate boundary conditions for computational wind
            engineering models using the k-ε turbulence model.
            In Computational Wind Engineering 1 (pp. 145-153).
            DOI:10.1016/B978-0-444-81688-7.50018-8

        Modifications to preserve the profiles downstream (tag:HW):
            Hargreaves, D. M., & Wright, N. G. (2007).
            On the use of the k–ε model in commercial CFD software
            to model the neutral atmospheric boundary layer.
            Journal of wind engineering and
            industrial aerodynamics, 95(5), 355-369.
            DOI:10.1016/j.jweia.2006.08.002

        Expression generalisations to allow height
        variation for turbulence quantities (tag:YGCJ):
            Yang, Y., Gu, M., Chen, S., & Jin, X. (2009).
            New inflow boundary conditions for modelling the neutral equilibrium
            atmospheric boundary layer in computational wind engineering.
            J. of Wind Engineering and Industrial Aerodynamics, 97(2), 88-95.
            DOI:10.1016/j.jweia.2008.12.001

        The generalised ground-normal profile expression for omega (tag:YGJ):
            Yang, Y., Gu, M., & Jin, X., (2009).
            New inflow boundary conditions for modelling the
            neutral equilibrium atmospheric boundary layer in SST k-ω model.
            In: The Seventh Asia-Pacific Conference on Wind Engineering,
            November 8-12, Taipei, Taiwan.

        Theoretical remarks (tag:E):
            Emeis, S. (2013).
            Wind Energy Meteorology: Atmospheric
            Physics for Wind Power Generation.
            Springer-Verlag Berlin Heidelberg.
            DOI:10.1007/978-3-642-30523-8
Usage
Example of the entries provided for the inherited boundary conditions:
inlet
{
    // Mandatory and other optional entries
    ...

    // Mandatory (inherited) entries (runtime modifiable)
    flowDir         (1 0 0);
    zDir            (0 0 1);
    Uref            10.0;
    Zref            0.0;
    z0              uniform 0.1;
    d               uniform 0.0;

    // Optional (inherited) entries (unmodifiable)
    kappa           0.41;
    Cmu             0.09;
    initABL         true;
    phi             phi;
    C1              0.0;
    C2              1.0;

    // Conditional mandatory (inherited) entries (runtime modifiable)
    value           uniform 0;    // when initABL=false
}

where the entries mean:

Property Description Type Reqd Deflt
flowDir Flow direction Function1<vector> yes -
zDir Ground-normal direction Function1<vector> yes -
Uref Reference mean streamwise flow speed being used in $u^*$ estimations [m/s] Function1<scalar> yes -
Zref Reference height being used in $u^*$ estimations [m] Function1<scalar> yes -
z0 Surface roughness length [m] PatchFunction1<scalar> yes -
d Displacement height [m] - see Notes PatchFunction1<scalar> yes -
kappa von Kármán constant scalar no 0.41
Cmu Empirical model constant scalar no 0.09
initABL Flag to initialise profiles with the theoretical ABL expressions, otherwise use "value" list bool no true
value ABL profile content when initABL=false scalarList conditional -
phi Name of the flux field word no phi
C1 Curve-fitting coefficient YGCJ profiles scalar no 0.0
C2 Curve-fitting coefficient YGCJ profiles scalar no 1.0
Note
  • The RH expressions are special cases of those in YGCJ when C1=0 and C2=1. Both C1 and C2 can be determined by nonlinear fitting of (YGCJ:Eqs. 19-20) with an experimental dataset for k. By default, atmBoundaryLayerInlet boundary conditions compute RH expressions.
  • z is the ground-normal height relative to the global minimum height of the inlet patch; therefore, the minimum of z is always zero irrespective of the absolute z-coordinate of the computational patch.
  • The derived ABL expressions automatically satisfy the simplified transport equation for k. Yet the same expressions only satisfy the simplified transport equation for epsilon when the model constants sigmaEpsilon is 1.11 with kappa=0.4 (HW:p. 358).
  • atmBoundaryLayerInlet boundary conditions inherit inletOutlet traits, so that a given inlet condition can be supplied from all sides of the domain, e.g. a ground-normal cylinder domain having a single inlet/outlet boundary where the changes between inlet and outlet depend on the wind direction and patch normals, so that any change in inflow orientation can be handled with the same mesh.
  • d is the displacement height, and "is relevant for flows over forests and cities" (E:p. 28). "The displacement height gives the vertical displacement of the entire flow regime over areas which are densely covered with obstacles such as trees or buildings" (E:p. 28).
See also
Source files

Definition at line 389 of file atmBoundaryLayer.H.

Constructor & Destructor Documentation

◆ atmBoundaryLayer() [1/4]

atmBoundaryLayer ( const Time time,
const polyPatch pp 
)

Definition at line 31 of file atmBoundaryLayer.C.

◆ atmBoundaryLayer() [2/4]

atmBoundaryLayer ( const Time time,
const polyPatch pp,
const dictionary dict 
)

Definition at line 51 of file atmBoundaryLayer.C.

◆ atmBoundaryLayer() [3/4]

atmBoundaryLayer ( const atmBoundaryLayer abl,
const fvPatch patch,
const fvPatchFieldMapper mapper 
)

Definition at line 78 of file atmBoundaryLayer.C.

◆ atmBoundaryLayer() [4/4]

Definition at line 101 of file atmBoundaryLayer.C.

Member Function Documentation

◆ flowDir()

vector flowDir ( ) const

Definition at line 122 of file atmBoundaryLayer.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::mag(), and TimeState::timeOutputValue().

Referenced by atmBoundaryLayer::U().

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

◆ zDir()

vector zDir ( ) const

Definition at line 140 of file atmBoundaryLayer.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::mag(), and TimeState::timeOutputValue().

Referenced by atmBoundaryLayer::epsilon(), atmBoundaryLayer::k(), atmBoundaryLayer::omega(), and atmBoundaryLayer::U().

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

◆ Ustar()

tmp< scalarField > Ustar ( const scalarField z0) const

Definition at line 158 of file atmBoundaryLayer.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::log(), and TimeState::timeOutputValue().

Referenced by atmBoundaryLayer::epsilon(), atmBoundaryLayer::k(), atmBoundaryLayer::omega(), and atmBoundaryLayer::U().

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

◆ autoMap()

void autoMap ( const fvPatchFieldMapper mapper)

◆ rmap()

void rmap ( const atmBoundaryLayer abl,
const labelList addr 
)

◆ U()

tmp< vectorField > U ( const vectorField pCf) const

Definition at line 206 of file atmBoundaryLayer.C.

References atmBoundaryLayer::flowDir(), Foam::log(), Foam::max(), TimeState::timeOutputValue(), atmBoundaryLayer::Ustar(), and atmBoundaryLayer::zDir().

Referenced by atmBoundaryLayerInletVelocityFvPatchVectorField::updateCoeffs().

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

◆ k()

tmp< scalarField > k ( const vectorField pCf) const

Definition at line 223 of file atmBoundaryLayer.C.

References Foam::log(), Foam::max(), Foam::sqr(), Foam::sqrt(), TimeState::timeOutputValue(), atmBoundaryLayer::Ustar(), and atmBoundaryLayer::zDir().

Referenced by atmBoundaryLayerInletKFvPatchScalarField::updateCoeffs().

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

◆ epsilon()

tmp< scalarField > epsilon ( const vectorField pCf) const

Definition at line 237 of file atmBoundaryLayer.C.

References Foam::log(), Foam::max(), Foam::pow3(), Foam::sqrt(), TimeState::timeOutputValue(), atmBoundaryLayer::Ustar(), and atmBoundaryLayer::zDir().

Referenced by atmBoundaryLayerInletEpsilonFvPatchScalarField::updateCoeffs().

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

◆ omega()

tmp< scalarField > omega ( const vectorField pCf) const

Definition at line 251 of file atmBoundaryLayer.C.

References Foam::max(), Foam::sqrt(), TimeState::timeOutputValue(), atmBoundaryLayer::Ustar(), and atmBoundaryLayer::zDir().

Referenced by atmBoundaryLayerInletOmegaFvPatchScalarField::updateCoeffs().

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

◆ write()

void write ( Ostream os) const

Member Data Documentation

◆ initABL_

bool initABL_
protected

Definition at line 397 of file atmBoundaryLayer.H.

Referenced by atmBoundaryLayer::write().


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