41 const label patchi = patch().index();
48 internalField().group()
66 auto&
nutw = tnutw.ref();
71 const scalar nutVis = 0;
80 case blenderType::STEPWISE:
82 if (
yPlus[facei] > yPlusLam)
93 case blenderType::MAX:
96 nutw[facei] =
max(nutVis, nutLog);
100 case blenderType::BINOMIAL:
112 case blenderType::EXPONENTIAL:
117 const scalar invGamma = scalar(1)/(Gamma + ROOTVSMALL);
119 nutw[facei] = nutVis*
exp(-Gamma) + nutLog*
exp(-invGamma);
123 case blenderType::TANH:
127 const scalar b1 = nutVis + nutLog;
129 pow(
pow(nutVis, 1.2) +
pow(nutLog, 1.2), 1.0/1.2);
131 nutw[facei] = phiTanh*b1 + (1 - phiTanh)*b2;
147 const label patchi = patch().index();
154 internalField().group()
163 const scalar kappa = wallCoeffs_.kappa();
164 const scalar E = wallCoeffs_.E();
165 const scalar yPlusLam = wallCoeffs_.yPlusLam();
168 auto&
yPlus = tyPlus.ref();
172 const scalar kappaRe = kappa*
magUp[facei]*
y[facei]/nuw[facei];
174 scalar yp = yPlusLam;
175 const scalar ryPlusLam = 1.0/yp;
178 scalar yPlusLast = 0.0;
183 yp = (kappaRe + yp)/(1.0 +
log(E*yp));
185 }
while (
mag(ryPlusLam*(yp - yPlusLast)) > 0.01 && ++iter < 10 );
267 const label patchi = patch().index();
274 internalField().group()
290 const scalar yPlusLam = wallCoeffs_.yPlusLam();
297 if (yPlusLam >
yPlus[facei])
301 y[facei]*
sqrt(nuEff[facei]*magGradUw[facei])/nuw[facei];
315 writeLocalEntries(
os);
316 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.
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.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition provides a wall function for the turbulent viscosity (i.e....
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
void writeLocalEntries(Ostream &) const
Write local wall function variables.
tmp< scalarField > calcYPlus(const scalarField &magUp) const
Calculate yPlus.
virtual tmp< scalarField > calcNut() const
Calculate the turbulent viscosity.
The class nutWallFunction is an abstract base class that hosts calculation methods and common functi...
static const nutWallFunctionFvPatchScalarField & nutw(const turbulenceModel &turbModel, const label patchi)
Return the nut patchField for the given wall patch.
wallFunctionCoefficients wallCoeffs_
Wall-function coefficients.
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.
The class wallFunctionBlenders is a base class that hosts common entries for various derived wall-fun...
void writeEntries(Ostream &) const
Write wall-function blending data as dictionary entries.
blenderType
Options for the blending treatment of viscous and inertial sublayers.
enum blenderType blender_
Blending treatment.
scalar kappa() const noexcept
Return the object: kappa.
scalar E() const noexcept
Return the object: E.
scalar yPlusLam() const noexcept
Return the object: yPlusLam.
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 exp(const dimensionedScalar &ds)
dimensionedScalar tanh(const dimensionedScalar &ds)
dimensionedScalar log(const dimensionedScalar &ds)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
dimensionedScalar pow4(const dimensionedScalar &ds)
static constexpr const zero Zero
Global zero (0)
#define forAll(list, i)
Loop across all elements in list.