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)
64 <<
"magnitude of n or z must be greater than zero" 69 flowDir_ /=
mag(flowDir_);
72 Ustar_ = kappa_*Uref_/(
log((Zref_ + z0_)/z0_));
82 flowDir_(ptf.flowDir_),
89 zGround_(ptf.zGround_, mapper),
90 Ustar_(ptf.Ustar_, mapper)
96 flowDir_(blpvf.flowDir_),
103 zGround_(blpvf.zGround_),
124 z0_.
rmap(blptf.z0_, addr);
125 zGround_.
rmap(blptf.zGround_, addr);
126 Ustar_.
rmap(blptf.Ustar_, addr);
135 *
log(((zDir_ & p) - zGround_ + z0_)/z0_)
150 return pow3(Ustar_)/(kappa_*((zDir_ &
p) - zGround_ + z0_));
This class provides functions to evaluate the velocity and turbulence distributions appropriate for a...
dimensionedScalar log(const dimensionedScalar &ds)
tmp< vectorField > U(const vectorField &p) const
Return the velocity distribution for the ATM.
void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
void write(Ostream &) const
Write.
stressControl lookup("compactNormalStress") >> compactNormalStress
Foam::fvPatchFieldMapper.
tmp< scalarField > epsilon(const vectorField &p) const
Return the turbulent dissipation rate distribution for the ATM.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
errorManip< error > abort(error &err)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
void autoMap(const FieldMapper &map, const bool applyFlip=true)
Map from self.
tmp< scalarField > k(const vectorField &p) const
Return the turbulent kinetic energy distribution for the ATM.
dimensionedScalar pow3(const dimensionedScalar &ds)
void rmap(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 reverse-map from the given field
void rmap(const atmBoundaryLayer &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
dimensioned< scalar > mag(const dimensioned< Type > &)
A class for managing temporary objects.
atmBoundaryLayer()
Construct null.