Go to the documentation of this file.
41 namespace functionObjects
62 const bool isNew = !result1;
152 resultName1_(
"ObukhovLength"),
153 resultName2_(
"Ustar"),
161 dict.getCheckOrDefault<scalar>
165 [&](const scalar
x){
return x > SMALL; }
186 UName_ =
dict.getOrDefault<
word>(
"U",
"U");
187 resultName1_ =
dict.getOrDefault<
word>(
"ObukhovLength",
"ObukhovLength");
188 resultName2_ =
dict.getOrDefault<
word>(
"Ustar",
"Ustar");
190 if (UName_ !=
"U" && resultName1_ ==
"ObukhovLength")
192 resultName1_ +=
'(' + UName_ +
')';
195 if (UName_ !=
"U" && resultName1_ ==
"Ustar")
197 resultName2_ +=
'(' + UName_ +
')';
200 rhoRef_ =
dict.getOrDefault<scalar>(
"rhoRef", 1.0);
201 kappa_ =
dict.getOrDefault<scalar>(
"kappa", 0.4);
202 beta_.value() =
dict.getOrDefault<scalar>(
"beta", 3
e-3);
216 if (isNew)
Log <<
" (new)" <<
nl <<
endl;
224 const auto* ioptr1 = mesh_.cfindObject<
regIOobject>(resultName1_);
225 const auto* ioptr2 = mesh_.cfindObject<
regIOobject>(resultName2_);
230 <<
" writing field " << ioptr1->name() <<
nl
231 <<
" writing field " << ioptr2->
name() <<
endl;
243 mesh_.thisDb().checkOut(resultName1_);
244 mesh_.thisDb().checkOut(resultName2_);
252 removeObukhovLength();
261 removeObukhovLength();
Type * getObjectPtr(const word &name, const bool recursive=false) const
Defines the attributes of an object for which implicit objectRegistry management is supported,...
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const dimensionSet dimVelocity
virtual bool read(const dictionary &dict)
bool read(const char *buf, int32_t &val)
static word timeName(const scalar t, const int precision=precision_)
static const Foam::dimensionedScalar B("", Foam::dimless, 18.678)
Ostream & endl(Ostream &os)
const Type & value() const
dimensionedScalar sign(const dimensionedScalar &ds)
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
label min(const labelHashSet &set, label minValue=labelMax)
Mesh consisting of general polyhedral cells.
Abstract base-class for Time/database function objects.
This boundary condition applies a zero-gradient condition from the patch internal field onto the patc...
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Info<< "Reading mechanical properties\n"<< endl;IOdictionary mechanicalProperties(IOobject("mechanicalProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE));const dictionary &rhoDict(mechanicalProperties.subDict("rho"));word rhoType(rhoDict.get< word >"type"));autoPtr< volScalarField > rhoPtr
void removeObukhovLength()
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
ObukhovLength(const word &name, const Time &runTime, const dictionary &dict)
virtual bool write(const bool valid=true) const
dimensionedScalar pow3(const dimensionedScalar &ds)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const Type & lookupObject(const word &name, const bool recursive=false) const
label max(const labelHashSet &set, label maxValue=labelMin)
virtual void movePoints(const polyMesh &m)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool read(const dictionary &dict)
Macros for easy insertion into run-time selection tables.
Generic dimensioned Type class.
virtual bool write(const token &tok)=0
const word & name() const noexcept
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const Type * findObject(const word &name, const bool recursive=false) const
Computes the Obukhov length field and associated friction velocity field.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
fileName::Type type(const fileName &name, const bool followLink=true)
const dimensionedScalar e
defineTypeNameAndDebug(ObukhovLength, 0)
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
word name(const expressions::valueTypeCode typeCode)
const Time & time() const
const dimensionSet & dimensions() const
Generic GeometricField class.
const polyMesh & mesh() const
static const gravity & New(const Time &runTime)
const dimensionSet dimless
virtual void updateMesh(const mapPolyMesh &mpm)
const dimensionedVector g_