39 const label patchi = patch().index();
46 internalField().group()
59 sqr(
calcUTau(magGradU))/(magGradU + ROOTVSMALL) - nuw
70 const label patchi = patch().index();
77 internalField().group()
93 auto& uTaup = tuTaup.ref();
97 const scalar kappa = wallCoeffs_.kappa();
98 const scalar E = wallCoeffs_.E();
102 scalar ut =
sqrt((nutw[facei] + nuw[facei])*magGradU[facei]);
103 if (
mag(ut) > ROOTVSMALL)
105 scalar
error = GREAT;
107 while (iter++ < 10 &&
error > 0.001)
109 const scalar
yPlus =
y[facei]*ut/nuw[facei];
111 const scalar uTauLog =
115 pow(
pow(uTauVis, n_) +
pow(uTauLog, n_), 1.0/n_);
116 error =
mag(ut - utNew)/(ut + ROOTVSMALL);
117 ut = 0.5*(ut + utNew);
138Foam::nutUBlendedWallFunctionFvPatchScalarField::
139nutUBlendedWallFunctionFvPatchScalarField
150Foam::nutUBlendedWallFunctionFvPatchScalarField::
151nutUBlendedWallFunctionFvPatchScalarField
164Foam::nutUBlendedWallFunctionFvPatchScalarField::
165nutUBlendedWallFunctionFvPatchScalarField
173 n_(
dict.getOrDefault<scalar>(
"n", 4.0))
177Foam::nutUBlendedWallFunctionFvPatchScalarField::
178nutUBlendedWallFunctionFvPatchScalarField
188Foam::nutUBlendedWallFunctionFvPatchScalarField::
189nutUBlendedWallFunctionFvPatchScalarField
205 const label patchi = patch().index();
212 internalField().group()
224 return y*calcUTau(magGradU)/nuw;
234 writeLocalEntries(
os);
235 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,...
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
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,...
Class to handle errors and exceptions in a simple, consistent stream-based manner.
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 > calcUTau(const scalarField &magGradU) const
Calculate the friction velocity.
virtual tmp< scalarField > calcNut() const
Calculate the turbulent viscosity.
The class nutWallFunction is an abstract base class that hosts calculation methods and common functi...
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.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
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)
static constexpr const zero Zero
Global zero (0)
#define forAll(list, i)
Loop across all elements in list.