Go to the documentation of this file.
44 const label patchi =
patch().index();
46 const auto& turbModel =
52 internalField().
group()
65 const scalar t = db().time().timeOutputValue();
69 for (
const scalar z : z0)
74 <<
"z0 field can only contain positive values. "
75 <<
"Please check input field z0."
82 auto&
nutw = tnutw.ref();
86 const scalar Edash = (
y[facei] + z0[facei])/(z0[facei] + 1
e-4);
87 const scalar uStar = magUpn[facei]*
kappa_/
log(
max(Edash, 1.0 + 1
e-4));
89 nutw[facei] =
sqr(uStar)/
max(magUpn[facei], 1
e-6)*
y[facei] - nuw[facei];
124 boundNut_(ptf.boundNut_),
125 z0_(ptf.z0_.clone(
p.patch()))
148 boundNut_(rwfpsf.boundNut_),
149 z0_(rwfpsf.z0_.clone(this->patch().patch()))
160 boundNut_(rwfpsf.boundNut_),
161 z0_(rwfpsf.z0_.clone(this->patch().patch()))
172 nutUWallFunctionFvPatchScalarField::autoMap(m);
183 nutUWallFunctionFvPatchScalarField::rmap(ptf, addr);
186 refCast<const atmNutUWallFunctionFvPatchScalarField>(ptf);
188 z0_->rmap(nrwfpsf.z0_(), addr);
196 os.writeEntry(
"boundNut", boundNut_);
198 writeEntry(
"value",
os);
virtual void write(Ostream &) const
Write.
virtual tmp< scalarField > calcNut() const
Calculate the turbulent viscosity.
constexpr const char *const group
Group name for atomic constants.
virtual void write(Ostream &) const
Write.
A class for managing temporary objects.
atmNutUWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
static const word propertiesName
Default name of the turbulence properties dictionary.
virtual const volVectorField & U(const turbulenceModel &turb) const
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
#define forAll(list, i)
Loop across all elements in list.
This boundary condition provides a wall constraint on the turbulent viscosity (i.e....
scalar kappa_
von Kármán constant
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Abstract base class for turbulence models (RAS, LES and laminar).
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)
Macros for easy insertion into run-time selection tables.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
This boundary condition provides a wall constraint on the turbulent viscosity, i.e....
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
const std::string patch
OpenFOAM patch number as a std::string.
static const nutWallFunctionFvPatchScalarField & nutw(const turbulenceModel &turbModel, const label patchi)
Return the nut patchField for the given wall patch.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const dimensionedScalar e
Elementary charge.
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
Foam::fvPatchFieldMapper.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
virtual void writeLocalEntries(Ostream &) const
Write local wall function variables.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...