Go to the documentation of this file.
37 namespace incompressible
49 if (!isA<wallFvPatch>(patch()))
52 <<
"Invalid wall function specification" <<
nl
53 <<
" Patch type for patch " << patch().name()
54 <<
" must be wall" <<
nl
55 <<
" Current patch type is " << patch().type() <<
nl <<
endl
66 return 9.24*(
pow(Prat, 0.75) - 1.0)*(1.0 + 0.28*
exp(-0.007*Prat));
78 for (
int i=0; i<maxIters_; i++)
80 scalar
f = ypt - (
log(E_*ypt)/kappa_ + P)/Prat;
81 scalar df = 1.0 - 1.0/(ypt*kappa_*Prat);
82 scalar yptNew = ypt -
f/df;
88 else if (
mag(yptNew - ypt) < tolerance_)
111 fixedValueFvPatchScalarField(
p, iF),
130 fixedValueFvPatchScalarField(ptf,
p, iF, mapper),
148 fixedValueFvPatchScalarField(
p, iF,
dict),
150 Cmu_(
dict.lookupOrDefault<scalar>(
"Cmu", 0.09)),
151 kappa_(
dict.lookupOrDefault<scalar>(
"kappa", 0.41)),
152 E_(
dict.lookupOrDefault<scalar>(
"E", 9.8))
164 fixedValueFvPatchScalarField(wfpsf),
181 fixedValueFvPatchScalarField(wfpsf, iF),
213 const scalar Cmu25 =
pow(
Cmu_, 0.25);
231 transportProperties.
lookup(
"Pr")
239 label faceCellI = patch().faceCells()[faceI];
242 scalar
yPlus = Cmu25*
sqrt(
k[faceCellI])*
y[faceI]/nuw[faceI];
254 scalar
nu = nuw[faceI];
256 alphatw[faceI] =
max(0.0, kt);
260 alphatw[faceI] = 0.0;
275 writeEntry(
"value", os);
virtual void checkType()
Check the type of the patch.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
virtual void write(Ostream &) const
Write.
static word groupName(Name name, const word &group)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
rDeltaT dimensionedInternalField()
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
static const word propertiesName
Default name of the turbulence properties dictionary.
scalar Cmu_
Cmu coefficient.
const char *const group
Group name for atomic constants.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type & value() const
Return const reference to value.
dimensionedScalar exp(const dimensionedScalar &ds)
const nearWallDist & y() const
Return the near wall distances.
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
This boundary condition provides a kinematic turbulent thermal conductivity for using wall functions,...
scalar Psmooth(const scalar Prat) const
`P' function
virtual void write(Ostream &) const
Write.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
alphatJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
scalar Prt_
Turbulent Prandtl number.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
dimensionedScalar Pr("Pr", dimless, laminarTransport)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
A list of keyword definitions, which are a keyword followed by any number of values (e....
scalar yPlusTherm(const scalar P, const scalar Prat) const
Calculate y+ at the edge of the thermal laminar sublayer.
dimensionedScalar log(const dimensionedScalar &ds)
Macros for easy insertion into run-time selection tables.
Generic dimensioned Type class.
virtual tmp< volScalarField > k() const =0
Return the turbulence kinetic energy.
errorManip< error > abort(error &err)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
scalar kappa_
Von Karman constant.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
dimensionedScalar sqrt(const dimensionedScalar &ds)
tmp< volScalarField > nu() const
Return the laminar viscosity.
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
This function object evaluates and outputs turbulence y+ for turbulence models. The field is stored o...
label k
Boltzmann constant.
Templated abstract base class for single-phase incompressible turbulence models.
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Generic GeometricField class.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
makePatchTypeField(fvPatchScalarField, turbulentBoundaryCoupledFvPatchScalarField)