40namespace incompressible
52 if (!isA<wallFvPatch>(patch()))
55 <<
"Invalid wall function specification" <<
nl
56 <<
" Patch type for patch " << patch().name()
57 <<
" must be wall" <<
nl
58 <<
" Current patch type is " << patch().type() <<
nl <<
endl
69 const label patchi = patch().index();
73 if (isA<nutWallFunctionFvPatchScalarField>(
nut.boundaryField()[patchi]))
78 nut.boundaryField()[patchi]
90 /turbModel.
nu(patchi);
100 return 9.24*(
pow(Prat, 0.75) - 1.0)*(1.0 + 0.28*
exp(-0.007*Prat));
112 for (
int iter = 0; iter <
maxIters_; ++iter)
115 const scalar df = 1.0 - 1.0/(ypt*
kappa_*Prat);
116 const scalar yptNew = ypt -
f/df;
138alphatJayatillekeWallFunctionFvPatchScalarField::
139alphatJayatillekeWallFunctionFvPatchScalarField
145 fixedValueFvPatchScalarField(
p, iF),
154alphatJayatillekeWallFunctionFvPatchScalarField::
155alphatJayatillekeWallFunctionFvPatchScalarField
163 fixedValueFvPatchScalarField(ptf,
p, iF, mapper),
172alphatJayatillekeWallFunctionFvPatchScalarField::
173alphatJayatillekeWallFunctionFvPatchScalarField
180 fixedValueFvPatchScalarField(
p, iF,
dict),
181 Prt_(
dict.get<scalar>(
"Prt")),
182 kappa_(
dict.getOrDefault<scalar>(
"kappa", 0.41)),
183 E_(
dict.getOrDefault<scalar>(
"E", 9.8))
189alphatJayatillekeWallFunctionFvPatchScalarField::
190alphatJayatillekeWallFunctionFvPatchScalarField
195 fixedValueFvPatchScalarField(wfpsf),
197 kappa_(wfpsf.kappa_),
204alphatJayatillekeWallFunctionFvPatchScalarField::
205alphatJayatillekeWallFunctionFvPatchScalarField
211 fixedValueFvPatchScalarField(wfpsf, iF),
213 kappa_(wfpsf.kappa_),
229 const label patchi = patch().index();
238 internalField().group()
261 const scalar
yPlus = yPlusp[facei];
264 const scalar Prat =
Pr/
Prt_;
267 const scalar P =
Psmooth(Prat);
273 const scalar
nu = nuw[facei];
277 alphatw[facei] =
max(scalar(0), kt);
281 alphatw[facei] = 0.0;
295 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...
const Boundary & boundaryField() const
Return const-reference to the boundary field.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
Templated abstract base class for single-phase incompressible turbulence models.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool write()
Write the output fields.
Computes the near wall for turbulence models.
A FieldMapper for finite-volume patch fields.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition provides a kinematic turbulent thermal conductivity for using wall functions,...
scalar kappa_
Von Karman constant.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
scalar yPlusTherm(const scalar P, const scalar Prat) const
Calculate y+ at the edge of the thermal laminar sublayer.
scalar Psmooth(const scalar Prat) const
`P' function
virtual void checkType()
Check the type of the patch.
scalar Prt_
Turbulent Prandtl number.
The class nutWallFunction is an abstract base class that hosts calculation methods and common functi...
virtual tmp< scalarField > yPlus() const =0
Calculate and return the yPlus at the boundary.
static const word propertiesName
Default name of the phase properties dictionary.
A class for managing temporary objects.
const volVectorField & U() const
Access function to velocity field.
virtual tmp< volScalarField > nut() const =0
Return the turbulence viscosity.
const nearWallDist & y() const
Return the near wall distances.
virtual tmp< volScalarField > nuEff() const =0
Return the effective viscosity.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedScalar exp(const dimensionedScalar &ds)
const dimensionSet dimless
Dimensionless.
dimensionedScalar log(const dimensionedScalar &ds)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
constexpr char nl
The newline '\n' character (0x0a)
IOdictionary transportProperties(IOobject("transportProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
dimensionedScalar Pr("Pr", dimless, laminarTransport)
#define forAll(list, i)
Loop across all elements in list.