45 const label patchi = patch().index();
52 internalField().group()
65 auto&
nutw = tnutw.ref();
73 const scalar t = db().time().timeOutputValue();
77 for (
const scalar z : z0)
82 <<
"z0 field can only contain positive values. "
83 <<
"Please check input field z0."
96 const scalar Edash = (
y[facei] + z0[facei])/(z0[facei] + z0Min_);
99 const scalar uStarU =
magUp[facei]*kappa/
log(
max(Edash, 1 + SMALL));
105 const scalar
tauw = uStarU*uStarK;
120 os.writeEntryIfDifferent<scalar>(
"z0Min", SMALL, z0Min_);
134 const DimensionedField<scalar, volMesh>& iF
153 z0_(ptf.z0_.
clone(
p.patch()))
167 dict.getCheckOrDefault<scalar>
184 z0Min_(rwfpsf.z0Min_),
185 z0_(rwfpsf.z0_.
clone(this->patch().patch()))
196 z0Min_(rwfpsf.z0Min_),
197 z0_(rwfpsf.z0_.
clone(this->patch().patch()))
208 nutkWallFunctionFvPatchScalarField::autoMap(m);
223 nutkWallFunctionFvPatchScalarField::rmap(ptf, addr);
225 const auto& nrwfpsf =
230 z0_->rmap(nrwfpsf.z0_(), addr);
248 atmNutWallFunctionFvPatchScalarField
Macros for easy insertion into run-time selection tables.
Bound the given scalar field if it has gone unbounded.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
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,...
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
This boundary condition provides a wall constraint on the turbulent viscosity (i.e....
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void write(Ostream &) const
Write.
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
void writeLocalEntries(Ostream &) const
Write local wall function variables.
atmNutWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual tmp< scalarField > calcNut() const
Calculate the turbulent viscosity.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Smooth ATC in cells next to a set of patches supplied by type.
A FieldMapper for finite-volume patch fields.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
static const nutWallFunctionFvPatchScalarField & nutw(const turbulenceModel &turbModel, const label patchi)
Return the nut patchField for the given wall patch.
virtual void write(Ostream &) const
Write.
wallFunctionCoefficients wallCoeffs_
Wall-function coefficients.
This boundary condition provides a wall function for the turbulent viscosity (i.e....
nutkWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
Abstract base class for turbulence models (RAS, LES and laminar).
static const word propertiesName
Default name of the turbulence properties dictionary.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
List< label > labelList
A List of labels.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
MinMax< scalar > scalarMinMax
A scalar min/max range.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar log(const dimensionedScalar &ds)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
UList< label > labelUList
A UList of labels.
fvPatchField< vector > fvPatchVectorField
fvPatchField< scalar > fvPatchScalarField
dimensionedScalar pow025(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.