Go to the documentation of this file.
42 flowDir_(time,
"flowDir"),
81 patch_(
patch.patch()),
82 flowDir_(abl.flowDir_),
88 z0_(abl.z0_.clone(patch_)),
89 zGround_(abl.zGround_.clone(patch_))
97 flowDir_(abl.flowDir_),
103 z0_(abl.z0_.clone(patch_)),
104 zGround_(abl.zGround_.clone(patch_))
113 vector dir(flowDir_.value(t));
114 const scalar magDir =
mag(dir);
119 <<
"magnitude of " << flowDir_.name()
120 <<
" vector must be greater than zero"
131 vector dir(zDir_.value(t));
132 const scalar magDir =
mag(dir);
137 <<
"magnitude of " << zDir_.name()
138 <<
" vector must be greater than zero"
149 const scalar Uref = Uref_.
value(t);
150 const scalar Zref = Zref_.
value(t);
152 return kappa_*Uref/(
log((Zref + z0)/z0));
158 z0_->autoMap(mapper);
159 zGround_->autoMap(mapper);
169 z0_->rmap(abl.z0_(), addr);
170 zGround_->rmap(abl.zGround_(), addr);
208 flowDir_.writeData(os);
214 zGround_->writeData(os);
scalar timeOutputValue() const
Return current time value.
tmp< scalarField > Ustar(const scalarField &z0) const
Return friction velocity.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for managing temporary objects.
tmp< vectorField > U(const vectorField &p) const
Return the velocity distribution for the ATM.
This class provides functions to evaluate the velocity and turbulence distributions appropriate for a...
Light wrapper around Function1 to provide a mechanism to update time-based entries.
T lookupOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
virtual Type value(const scalar x) const
Return value as a function of (scalar) independent variable.
vector flowDir() const
Return flow direction.
tmp< scalarField > k(const vectorField &p) const
Return the turbulent kinetic energy distribution for the ATM.
void write(Ostream &) const
Write.
dimensionedScalar pow3(const dimensionedScalar &ds)
A patch is a list of labels that address the faces in the global face list.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dimensionedScalar log(const dimensionedScalar &ds)
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
errorManip< error > abort(error &err)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
atmBoundaryLayer(const Time &time, const polyPatch &pp)
Construct null from time.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const std::string patch
OpenFOAM patch number as a std::string.
void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
dimensionedScalar sqrt(const dimensionedScalar &ds)
tmp< scalarField > epsilon(const vectorField &p) const
Return the turbulent dissipation rate distribution for the ATM.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
vector zDir() const
Return z-direction.
void rmap(const atmBoundaryLayer &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
virtual void writeData(Ostream &os) const
Write in dictionary format.
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...