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...
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 the ground-normal 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 &pCf) const |
Return the velocity distribution for the ATM. More... | |
tmp< scalarField > | k (const vectorField &pCf) const |
Return the turbulent kinetic energy distribution for the ATM. More... | |
tmp< scalarField > | epsilon (const vectorField &pCf) const |
Return the turbulent dissipation rate distribution for the ATM. More... | |
tmp< scalarField > | omega (const vectorField &pCf) const |
Return the specific dissipation rate distribution for the ATM. More... | |
void | write (Ostream &) const |
Write. More... | |
Protected Attributes | |
bool | initABL_ |
Flag to initialise profiles with the theoretical ABL expressions, otherwise initialises by using "value" entry content. More... | |
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:
where
= | Ground-normal streamwise flow speed profile [m/s] | |
= | Spanwise flow speed [m/s] | |
= | Ground-normal flow speed [m/s] | |
= | Ground-normal turbulent kinetic energy (TKE) profile [m^2/s^2] | |
= | Ground-normal TKE dissipation rate profile [m^2/s^3] | |
= | Ground-normal specific dissipation rate profile [m^2/s^3] | |
= | Friction velocity [m/s] | |
= | von Kármán constant [-] | |
= | Empirical model constant [-] | |
= | Ground-normal coordinate component [m] | |
= | Ground-normal displacement height [m] | |
= | Aerodynamic roughness length [m] | |
= | Reference mean streamwise wind speed at [m/s] | |
= | Reference height being used in estimations [m] | |
= | Curve-fitting coefficient for YGCJ profiles [-] | |
= | 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
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 estimations [m/s] | Function1<scalar> | yes | - |
Zref | Reference height being used in 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 |
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.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).Definition at line 389 of file atmBoundaryLayer.H.
atmBoundaryLayer | ( | const Time & | time, |
const polyPatch & | pp | ||
) |
Construct null from time.
Definition at line 31 of file atmBoundaryLayer.C.
atmBoundaryLayer | ( | const Time & | time, |
const polyPatch & | pp, | ||
const dictionary & | dict | ||
) |
Construct from the time database and dictionary.
Definition at line 51 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 78 of file atmBoundaryLayer.C.
atmBoundaryLayer | ( | const atmBoundaryLayer & | abl | ) |
Construct as copy.
Definition at line 101 of file atmBoundaryLayer.C.
vector flowDir | ( | ) | const |
Return flow direction.
Definition at line 122 of file atmBoundaryLayer.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::mag(), and TimeState::timeOutputValue().
Referenced by atmBoundaryLayer::U().
vector zDir | ( | ) | const |
Return the ground-normal direction.
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().
tmp< scalarField > Ustar | ( | const scalarField & | z0 | ) | const |
Return friction velocity.
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().
void autoMap | ( | const fvPatchFieldMapper & | mapper | ) |
Map (and resize as needed) from self given a mapping object.
Definition at line 176 of file atmBoundaryLayer.C.
Referenced by atmBoundaryLayerInletKFvPatchScalarField::autoMap(), atmBoundaryLayerInletOmegaFvPatchScalarField::autoMap(), atmBoundaryLayerInletEpsilonFvPatchScalarField::autoMap(), and atmBoundaryLayerInletVelocityFvPatchVectorField::autoMap().
void rmap | ( | const atmBoundaryLayer & | abl, |
const labelList & | addr | ||
) |
Reverse map the given fvPatchField onto this fvPatchField.
Definition at line 190 of file atmBoundaryLayer.C.
Referenced by atmBoundaryLayerInletKFvPatchScalarField::rmap(), atmBoundaryLayerInletOmegaFvPatchScalarField::rmap(), atmBoundaryLayerInletEpsilonFvPatchScalarField::rmap(), and atmBoundaryLayerInletVelocityFvPatchVectorField::rmap().
tmp< vectorField > U | ( | const vectorField & | pCf | ) | const |
Return the velocity distribution for the ATM.
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().
tmp< scalarField > k | ( | const vectorField & | pCf | ) | const |
Return the turbulent kinetic energy distribution for the ATM.
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().
tmp< scalarField > epsilon | ( | const vectorField & | pCf | ) | const |
Return the turbulent dissipation rate distribution for the ATM.
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().
tmp< scalarField > omega | ( | const vectorField & | pCf | ) | const |
Return the specific dissipation rate distribution for the ATM.
Definition at line 251 of file atmBoundaryLayer.C.
References Foam::max(), Foam::sqrt(), TimeState::timeOutputValue(), atmBoundaryLayer::Ustar(), and atmBoundaryLayer::zDir().
Referenced by atmBoundaryLayerInletOmegaFvPatchScalarField::updateCoeffs().
void write | ( | Ostream & | os | ) | const |
Write.
Definition at line 263 of file atmBoundaryLayer.C.
References atmBoundaryLayer::initABL_, and os().
Referenced by atmBoundaryLayerInletKFvPatchScalarField::write(), atmBoundaryLayerInletOmegaFvPatchScalarField::write(), atmBoundaryLayerInletEpsilonFvPatchScalarField::write(), and atmBoundaryLayerInletVelocityFvPatchVectorField::write().
|
protected |
Flag to initialise profiles with the theoretical ABL expressions, otherwise initialises by using "value" entry content.
Definition at line 399 of file atmBoundaryLayer.H.
Referenced by atmBoundaryLayer::write().