41 const label patchi =
patch().index();
48 internalField().
group()
66 auto&
nutw = tnutw.ref();
70 const label celli =
patch().faceCells()[facei];
72 const scalar
yPlus = Cmu25*
y[facei]*
sqrt(
k[celli])/nuw[facei];
75 const scalar nutVis = 0;
83 case blenderType::STEPWISE:
96 case blenderType::MAX:
99 nutw[facei] =
max(nutVis, nutLog);
103 case blenderType::BINOMIAL:
115 case blenderType::EXPONENTIAL:
119 const scalar invGamma = scalar(1)/(Gamma + ROOTVSMALL);
121 nutw[facei] = nutVis*
exp(-Gamma) + nutLog*
exp(-invGamma);
125 case blenderType::TANH:
129 const scalar b1 = nutVis + nutLog;
131 pow(
pow(nutVis, 1.2) +
pow(nutLog, 1.2), 1.0/1.2);
133 nutw[facei] = phiTanh*b1 + (1 - phiTanh)*b2;
216 const label patchi =
patch().index();
223 internalField().
group()
243 const scalar Cmu25 =
pow025(wallCoeffs_.Cmu());
244 const scalar yPlusLam = wallCoeffs_.yPlusLam();
247 auto&
yPlus = tyPlus.ref();
252 yPlus[facei] = Cmu25*
y[facei]*
sqrt(kwc[facei])/nuw[facei];
254 if (yPlusLam >
yPlus[facei])
258 y[facei]*
sqrt(nuEff[facei]*magGradUw[facei])/nuw[facei];
272 writeLocalEntries(
os);
273 writeEntry(
"value",
os);
284 nutkWallFunctionFvPatchScalarField
scalar n_
Binomial blending exponent being used when blenderType is blenderType::BINOMIAL.
dimensionedScalar tanh(const dimensionedScalar &ds)
scalar yPlusLam() const noexcept
Return the object: yPlusLam.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
dimensionedScalar log(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
dimensionedScalar pow025(const dimensionedScalar &ds)
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual tmp< scalarField > calcNut() const
Calculate the turbulent viscosity.
label k
Boltzmann constant.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
Abstract base class for turbulence models (RAS, LES and laminar).
The class wallFunctionBlenders is a base class that hosts common entries for various derived wall-fun...
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
constexpr const char *const group
Group name for atomic constants.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
The class nutWallFunction is an abstract base class that hosts calculation methods and common functi...
const dimensionedScalar e
Elementary charge.
dimensionedScalar exp(const dimensionedScalar &ds)
This boundary condition provides a wall function for the turbulent viscosity (i.e. nut) based on the turbulent kinetic energy, (i.e. k) for for low- and high-Reynolds number applications.
fvPatchField< scalar > fvPatchScalarField
static const word propertiesName
Default name of the turbulence properties dictionary.
A FieldMapper for finite-volume patch fields.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
void writeLocalEntries(Ostream &) const
Write local wall function variables.
virtual void write(Ostream &) const
Write.
OBJstream os(runTime.globalPath()/outputName)
scalar Cmu() const noexcept
Return the object: Cmu.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void writeEntries(Ostream &) const
Write wall-function blending data as dictionary entries.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
dimensionedScalar pow4(const dimensionedScalar &ds)
const std::string patch
OpenFOAM patch number as a std::string.
virtual void write(Ostream &) const
Write.
scalar E() const noexcept
Return the object: E.
enum blenderType blender_
Blending treatment.
wallFunctionCoefficients wallCoeffs_
Wall-function coefficients.
scalar kappa() const noexcept
Return the object: kappa.
A class for managing temporary objects.
static const nutWallFunctionFvPatchScalarField & nutw(const turbulenceModel &turbModel, const label patchi)
Return the nut patchField for the given wall patch.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
blenderType
Options for the blending treatment of viscous and inertial sublayers.
nutkWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
static constexpr const zero Zero
Global zero (0)