Go to the documentation of this file.
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_),
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));
273 os.writeEntry(
"kappa", kappa_);
274 os.writeEntry(
"Cmu", Cmu_);
275 os.writeEntry(
"C1", C1_);
276 os.writeEntry(
"C2", C2_);
277 flowDir_->writeData(
os);
278 zDir_->writeData(
os);
279 Uref_->writeData(
os);
280 Zref_->writeData(
os);
const Field< point_type > & points() const noexcept
Return reference to global points.
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...
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
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)
OBJstream os(runTime.globalPath()/outputName)
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.
void rmap(const atmBoundaryLayer &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
A bounding box defined in terms of min/max extrema points.
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