64 initABL_(
dict.getOrDefault<
bool>(
"initABL", true)),
70 C1_(
dict.getOrDefault(
"C1", 0.0)),
71 C2_(
dict.getOrDefault(
"C2", 1.0)),
91 initABL_(abl.initABL_),
98 patch_(patch.patch()),
99 flowDir_(abl.flowDir_.clone()),
100 zDir_(abl.zDir_.clone()),
101 Uref_(abl.Uref_.clone()),
102 Zref_(abl.Zref_.clone()),
103 z0_(abl.z0_.clone(patch_)),
104 d_(abl.d_.clone(patch_))
110 initABL_(abl.initABL_),
118 flowDir_(abl.flowDir_.clone()),
119 zDir_(abl.zDir_.clone()),
120 Uref_(abl.Uref_.clone()),
121 Zref_(abl.Zref_.clone()),
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);
187 z0_->autoMap(mapper);
204 z0_->rmap(abl.z0_(), addr);
208 d_->rmap(abl.d_(), addr);
218 const scalar groundMin =
zDir() & ppMin_;
223 (
Ustar(z0)/kappa_)*
log(((
zDir() & pCf) - groundMin - d + z0)/z0)
235 const scalar groundMin =
zDir() & ppMin_;
240 *
sqrt(C1_*
log(((
zDir() & pCf) - groundMin - d + z0)/z0) + C2_);
249 const scalar groundMin =
zDir() & ppMin_;
253 pow3(
Ustar(z0))/(kappa_*((
zDir() & pCf) - groundMin - d + z0))
254 *
sqrt(C1_*
log(((
zDir() & pCf) - groundMin - d + z0)/z0) + C2_);
263 const scalar groundMin =
zDir() & ppMin_;
266 return Ustar(z0)/(kappa_*
sqrt(Cmu_)*((
zDir() & pCf) - groundMin - d + z0));
279 flowDir_->writeData(
os);
283 zDir_->writeData(
os);
287 Uref_->writeData(
os);
291 Zref_->writeData(
os);
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
scalar timeOutputValue() const
Return current time value.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Base class to set log-law type ground-normal inlet boundary conditions for wind velocity and turbulen...
void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
void rmap(const atmBoundaryLayer &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
tmp< scalarField > Ustar(const scalarField &z0) const
Return friction velocity.
vector flowDir() const
Return flow direction.
vector zDir() const
Return the ground-normal direction.
A bounding box defined in terms of min/max extrema points.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool write()
Write the output fields.
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A patch is a list of labels that address the faces in the global face list.
const volScalarField & omega() const
Access functions.
A class for managing temporary objects.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedScalar log(const dimensionedScalar &ds)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManip< error > abort(error &err)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.