41 const label patchi = patch().index();
48 internalField().group()
65 sqr(
calcUTau(magGradU))/(magGradU + ROOTVSMALL) - nuw
86 nutw[facei] = this->operator[](facei);
101 return calcUTau(magGradU, maxIter_, err);
113 const label patchi = patch().index();
120 internalField().group()
132 const scalar kappa = wallCoeffs_.kappa();
133 const scalar E = wallCoeffs_.E();
138 auto&
uTau = tuTau.ref();
145 scalar ut =
sqrt((nutw[facei] + nuw[facei])*magGradU[facei]);
155 const scalar kUu =
min(kappa*
magUp[facei]/ut, scalar(50));
156 const scalar fkUu =
exp(kUu) - 1 - kUu*(1 + 0.5*kUu);
159 - ut*
y[facei]/nuw[facei]
161 + 1.0/E*(fkUu - 1.0/6.0*kUu*
sqr(kUu));
168 const scalar uTauNew = ut +
f/df;
169 err[facei] =
mag((ut - uTauNew)/ut);
177 && err[facei] > tolerance_
181 uTau[facei] =
max(scalar(0), ut);
211Foam::nutUSpaldingWallFunctionFvPatchScalarField::
212nutUSpaldingWallFunctionFvPatchScalarField
228Foam::nutUSpaldingWallFunctionFvPatchScalarField::
229nutUSpaldingWallFunctionFvPatchScalarField
238 maxIter_(ptf.maxIter_),
239 tolerance_(ptf.tolerance_)
247Foam::nutUSpaldingWallFunctionFvPatchScalarField::
248nutUSpaldingWallFunctionFvPatchScalarField
256 maxIter_(
dict.getOrDefault<label>(
"maxIter", 10)),
257 tolerance_(
dict.getOrDefault<scalar>(
"tolerance", 0.01))
265Foam::nutUSpaldingWallFunctionFvPatchScalarField::
266nutUSpaldingWallFunctionFvPatchScalarField
272 maxIter_(wfpsf.maxIter_),
273 tolerance_(wfpsf.tolerance_)
281Foam::nutUSpaldingWallFunctionFvPatchScalarField::
282nutUSpaldingWallFunctionFvPatchScalarField
289 maxIter_(wfpsf.maxIter_),
290 tolerance_(wfpsf.tolerance_)
324 const label patchi = patch().index();
331 internalField().group()
352 writeLocalEntries(
os);
353 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.
void setSize(const label n)
Alias for resize()
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,...
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.
const scalar tolerance_
Convergence tolerance.
virtual ~nutUSpaldingWallFunctionFvPatchScalarField()
Destructor.
tmp< scalarField > calcUTau(const scalarField &magGradU) const
Calculate the friction velocity.
virtual tmp< scalarField > calcNut() const
Uncomment in case of intrumentation.
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.
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 exp(const dimensionedScalar &ds)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
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)
#define forAll(list, i)
Loop across all elements in list.