34 namespace incompressible
39 scalar alphatJayatillekeWallFunctionFvPatchScalarField::tolerance_ = 0.01;
40 label alphatJayatillekeWallFunctionFvPatchScalarField::maxIters_ = 10;
49 return 9.24*(
pow(Prat, 0.75) - 1.0)*(1.0 + 0.28*
exp(-0.007*Prat));
62 for (
int i=0; i<maxIters_; i++)
64 scalar
f = ypt - (
log(nutw.
E()*ypt)/nutw.
kappa() + P)/Prat;
65 scalar df = 1.0 - 1.0/(ypt*nutw.
kappa()*Prat);
66 scalar yptNew = ypt - f/df;
72 else if (
mag(yptNew - ypt) < tolerance_)
95 fixedValueFvPatchScalarField(p, iF),
109 fixedValueFvPatchScalarField(ptf, p, iF, mapper),
122 fixedValueFvPatchScalarField(p, iF, dict),
133 fixedValueFvPatchScalarField(wfpsf),
145 fixedValueFvPatchScalarField(wfpsf, iF),
168 internalField().
group()
175 const scalar Cmu25 =
pow(nutw.Cmu(), 0.25);
193 transportProperties.
lookup(
"Pr")
201 const label celli = patch().faceCells()[facei];
203 const scalar
yPlus = Cmu25*
sqrt(k[celli])*y[facei]/nuw[facei];
206 const scalar Prat = Pr/
Prt_;
209 const scalar P =
Psmooth(Prat);
213 if (yPlus > yPlusTherm)
215 const scalar nu = nuw[facei];
217 nu*(yPlus/(
Prt_*(
log(nutw.E()*
yPlus)/nutw.kappa() + P)) - 1/Pr);
219 alphatw[facei] =
max(0.0, kt);
223 alphatw[facei] = 0.0;
const char *const group
Group name for atomic constants.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedScalar log(const dimensionedScalar &ds)
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const Boundary & boundaryField() const
Return const-reference to the boundary field.
virtual void write(Ostream &) const
Write.
alphatJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
scalar Psmooth(const scalar Prat) const
`P' function
label k
Boltzmann constant.
virtual void write(Ostream &) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Macros for easy insertion into run-time selection tables.
scalar yPlusTherm(const nutWallFunctionFvPatchScalarField &nutw, const scalar P, const scalar Prat) const
Calculate y+ at the edge of the thermal laminar sublayer.
virtual tmp< volScalarField > k() const =0
Return the turbulence kinetic energy.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Templated abstract base class for single-phase incompressible turbulence models.
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions...
dimensionedScalar exp(const dimensionedScalar &ds)
static const word propertiesName
Default name of the turbulence properties dictionary.
static word groupName(Name name, const word &group)
scalar E() const
Return E.
This boundary condition provides a kinematic turbulent thermal conductivity for using wall functions...
Foam::fvPatchFieldMapper.
makePatchTypeField(fvPatchScalarField, alphatJayatillekeWallFunctionFvPatchScalarField)
const nearWallDist & y() const
Return the near wall distances.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
scalar Prt_
Turbulent Prandtl number.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
dimensioned< scalar > mag(const dimensioned< Type > &)
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.
scalar kappa() const
Return kappa.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.