41 os.writeEntryIfDifferent<scalar>(
"Ceps2", 1.9,
Ceps2_);
42 os.writeEntryIfDifferent<scalar>(
"Ck", -0.416,
Ck_);
43 os.writeEntryIfDifferent<scalar>(
"Bk", 8.366,
Bk_);
44 os.writeEntryIfDifferent<scalar>(
"C", 11.0,
C_);
93 dict.getCheckOrDefault<scalar>
101 Bk_(
dict.getOrDefault<scalar>(
"Bk", 8.366)),
102 C_(
dict.getOrDefault<scalar>(
"C", 11.0)),
113 Ceps2_(kwfpsf.Ceps2_),
128 Ceps2_(kwfpsf.Ceps2_),
145 const label patchi = patch().index();
147 const auto& turbModel = db().lookupObject<turbulenceModel>
152 internalField().group()
158 const tmp<scalarField> tnuw = turbModel.nu(patchi);
161 const tmp<volScalarField> tk = turbModel.k();
164 const scalar Cmu25 =
pow025(wallCoeffs_.Cmu());
165 const scalar kappa = wallCoeffs_.kappa();
166 const scalar yPlusLam = wallCoeffs_.yPlusLam();
173 const label celli = patch().faceCells()[facei];
174 const scalar
uTau = Cmu25*
sqrt(
k[celli]);
175 const scalar
yPlus =
uTau*
y[facei]/nuw[facei];
177 if (
yPlus > yPlusLam)
179 kw[facei] = Ck_/kappa*
log(
yPlus) + Bk_;
185 kw[facei] = 2400.0/
sqr(Ceps2_)*Cf;
206 writeLocalEntries(
os);
218 kLowReWallFunctionFvPatchScalarField
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,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
fixedValueFvPatchField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
const objectRegistry & db() const
The associated objectRegistry.
const fvPatch & patch() const noexcept
Return the patch.
bool updated() const noexcept
True if the boundary condition has already been updated.
A FieldMapper for finite-volume patch fields.
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
const DimensionedField< scalar, volMesh > & internalField() const noexcept
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition provides a wall function for the turbulent kinetic energy (i....
scalar Ceps2_
Ceps2 coefficient.
scalar Bk_
Bk coefficient.
virtual void write(Ostream &) const
Write.
void writeLocalEntries(Ostream &) const
Write local wall function variables.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
wallFunctionCoefficients wallCoeffs_
Wall-function coefficients.
scalar Ck_
Ck coefficient.
kLowReWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
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)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
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)
fvPatchField< scalar > fvPatchScalarField
dimensionedScalar pow025(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.