Go to the documentation of this file.
48 flowDir_(time,
"flowDir"),
98 patch_(
patch.patch()),
99 flowDir_(abl.flowDir_),
103 z0_(abl.z0_.clone(patch_)),
104 d_(abl.d_.clone(patch_))
110 initABL_(abl.initABL_),
118 flowDir_(abl.flowDir_),
122 z0_(abl.z0_.clone(patch_)),
123 d_(abl.d_.clone(patch_))
132 const vector dir(flowDir_.value(t));
133 const scalar magDir =
mag(dir);
138 <<
"magnitude of " << flowDir_.name() <<
" = " << magDir
139 <<
" vector must be greater than zero"
150 const vector dir(zDir_.value(t));
151 const scalar magDir =
mag(dir);
156 <<
"magnitude of " << zDir_.name() <<
" = " << magDir
157 <<
" vector must be greater than zero"
168 const scalar Uref = Uref_.
value(t);
169 const scalar Zref = Zref_.
value(t);
174 <<
"Negative entry in " << Zref_.
name() <<
" = " << Zref
179 return kappa_*Uref/
log((Zref + z0)/z0);
185 z0_->autoMap(mapper);
196 z0_->rmap(abl.z0_(), addr);
197 d_->rmap(abl.d_(), addr);
206 const scalar groundMin =
zDir() & ppMin_;
211 (
Ustar(z0)/kappa_)*
log(((
zDir() & pCf) - groundMin - d + z0)/z0)
223 const scalar groundMin =
zDir() & ppMin_;
228 *
sqrt(C1_*
log(((
zDir() & pCf) - groundMin - d + z0)/z0) + C2_);
237 const scalar groundMin =
zDir() & ppMin_;
241 pow3(
Ustar(z0))/(kappa_*((
zDir() & pCf) - groundMin - d + z0))
242 *
sqrt(C1_*
log(((
zDir() & pCf) - groundMin - d + z0)/z0) + C2_);
251 const scalar groundMin =
zDir() & ppMin_;
254 return Ustar(z0)/(kappa_*
sqrt(Cmu_)*((
zDir() & pCf) - groundMin - d + z0));
265 flowDir_.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.
Base class to set log-law type ground-normal inlet boundary conditions for wind velocity and turbulen...
Light wrapper around Function1 to provide a mechanism to update time-based entries.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
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 &pCf) const
Return the turbulent kinetic energy distribution for the ATM.
tmp< vectorField > U(const vectorField &pCf) const
Return the velocity 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.
T getCheckOrDefault(const word &keyword, const T &deflt, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
tmp< scalarField > omega(const vectorField &pCf) const
Return the specific dissipation rate distribution for the ATM.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dimensionedScalar log(const dimensionedScalar &ds)
const Field< point_type > & points() const
Return reference to global points.
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)
tmp< scalarField > epsilon(const vectorField &pCf) const
Return the turbulent dissipation rate distribution for the ATM.
const std::string patch
OpenFOAM patch number as a std::string.
static MinMax< T > ge(const T &minVal)
A semi-infinite range from minVal to the type max.
void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
vector zDir() const
Return the ground-normal direction.
const word & name() const
Return the name of the entry.
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.
A bounding box defined in terms of min/max extrema points.
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,...
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const