49 (KsPlus - 2.25)/87.75 +
Cs*KsPlus,
50 sin(0.4258*(
log(KsPlus) - 0.811))
54 return (1.0 +
Cs*KsPlus);
61 const label patchi = patch().index();
68 internalField().group()
80 const scalar Cmu25 =
pow025(wallCoeffs_.Cmu());
81 const scalar kappa = wallCoeffs_.kappa();
82 const scalar E = wallCoeffs_.E();
85 auto& nutw = tnutw.ref();
89 const label celli = patch().faceCells()[facei];
91 const scalar uStar = Cmu25*
sqrt(
k[celli]);
92 const scalar
yPlus = uStar*
y[facei]/nuw[facei];
93 const scalar KsPlus = uStar*Ks_[facei]/nuw[facei];
98 Edash /= fnRough(KsPlus, Cs_[facei]);
101 const scalar limitingNutw =
max(nutw[facei], nuw[facei]);
119 <<
", KsPlus = " << KsPlus
120 <<
", Edash = " << Edash
121 <<
", nutw = " << nutw[facei]
135 Cs_.writeEntry(
"Cs",
os);
136 Ks_.writeEntry(
"Ks",
os);
142Foam::nutkRoughWallFunctionFvPatchScalarField::
143nutkRoughWallFunctionFvPatchScalarField
155Foam::nutkRoughWallFunctionFvPatchScalarField::
156nutkRoughWallFunctionFvPatchScalarField
165 Ks_(ptf.Ks_, mapper),
170Foam::nutkRoughWallFunctionFvPatchScalarField::
171nutkRoughWallFunctionFvPatchScalarField
179 Ks_(
"Ks",
dict,
p.size()),
180 Cs_(
"Cs",
dict,
p.size())
184Foam::nutkRoughWallFunctionFvPatchScalarField::
185nutkRoughWallFunctionFvPatchScalarField
196Foam::nutkRoughWallFunctionFvPatchScalarField::
197nutkRoughWallFunctionFvPatchScalarField
230 const auto& nrwfpsf =
231 refCast<const nutkRoughWallFunctionFvPatchScalarField>(ptf);
233 Ks_.rmap(nrwfpsf.Ks_, addr);
234 Cs_.rmap(nrwfpsf.Cs_, addr);
244 writeLocalEntries(
os);
245 writeEntry(
"value",
os);
Macros for easy insertion into run-time selection tables.
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,...
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
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.
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.
This boundary condition provides a wall-function for the turbulent viscosity (i.e....
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual scalar fnRough(const scalar KsPlus, const scalar Cs) const
Compute the roughness function.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
scalarField & Cs()
Return Cs.
void writeLocalEntries(Ostream &os) const
Write local wall function variables.
virtual tmp< scalarField > calcNut() const
Calculate the turbulent viscosity.
This boundary condition provides a wall function for the turbulent viscosity (i.e....
A class for managing temporary objects.
Abstract base class for turbulence models (RAS, LES and laminar).
static const word propertiesName
Default name of the turbulence properties dictionary.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedScalar sin(const dimensionedScalar &ds)
messageStream Info
Information stream (stdout output on master, null elsewhere)
dimensionedScalar log(const dimensionedScalar &ds)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar sqrt(const dimensionedScalar &ds)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
static constexpr const zero Zero
Global zero (0)
dimensionedScalar pow025(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.