51 flowDir_(dict.
lookup(
"flowDir")),
52 zDir_(dict.
lookup(
"zDir")),
53 kappa_(dict.lookupOrDefault<scalar>(
"kappa", 0.41)),
54 Cmu_(dict.lookupOrDefault<scalar>(
"Cmu", 0.09)),
57 z0_(
"z0", dict, p.size()),
58 zGround_(
"zGround", dict, p.size()),
61 if (
mag(flowDir_) < SMALL ||
mag(zDir_) < SMALL)
65 "atmBoundaryLayer(const dictionary&)" 66 ) <<
"magnitude of n or z must be greater than zero" 71 flowDir_ /=
mag(flowDir_);
74 Ustar_ = kappa_*Uref_/(
log((Zref_ + z0_)/z0_));
84 flowDir_(ptf.flowDir_),
91 zGround_(ptf.zGround_, mapper),
92 Ustar_(ptf.Ustar_, mapper)
98 flowDir_(blpvf.flowDir_),
100 kappa_(blpvf.kappa_),
105 zGround_(blpvf.zGround_),
126 z0_.
rmap(blptf.z0_, addr);
127 zGround_.
rmap(blptf.zGround_, addr);
128 Ustar_.
rmap(blptf.Ustar_, addr);
137 *
log(((zDir_ & p) - zGround_ + z0_)/z0_)
152 return pow3(Ustar_)/(kappa_*((zDir_ &
p) - zGround_ + z0_));
dimensionedScalar sqrt(const dimensionedScalar &ds)
tmp< vectorField > U(const vectorField &p) const
Return the velocity distribution for the ATM.
tmp< scalarField > epsilon(const vectorField &p) const
Return the turbulent dissipation rate distribution for the ATM.
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
Foam::fvPatchFieldMapper.
A list of keyword definitions, which are a keyword followed by any number of values (e...
void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
tmp< scalarField > k(const vectorField &p) const
Return the turbulent kinetic energy distribution for the ATM.
dimensionedScalar log(const dimensionedScalar &ds)
stressControl lookup("compactNormalStress") >> compactNormalStress
void autoMap(const FieldMapper &map)
Map from self.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
errorManip< error > abort(error &err)
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
void rmap(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 reverse-map from the given field
Traits class for primitives.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void rmap(const atmBoundaryLayer &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
atmBoundaryLayer()
Construct null.
void write(Ostream &) const
Write.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
A class for managing temporary objects.
This class provides functions to evaluate the velocity and turbulence distributions appropriate for a...