40 namespace incompressible
52 if (!isA<wallFvPatch>(
patch()))
55 <<
"Invalid wall function specification" <<
nl 56 <<
" Patch type for patch " <<
patch().name()
57 <<
" must be wall" <<
nl 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;
145 fixedValueFvPatchScalarField(
p, iF),
163 fixedValueFvPatchScalarField(ptf,
p, iF, mapper),
180 fixedValueFvPatchScalarField(
p, iF,
dict),
182 kappa_(
dict.getOrDefault<scalar>(
"kappa", 0.41)),
183 E_(
dict.getOrDefault<scalar>(
"E", 9.8))
195 fixedValueFvPatchScalarField(wfpsf),
197 kappa_(wfpsf.kappa_),
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;
292 os.writeEntry(
"Prt",
Prt_);
293 os.writeEntryIfDifferent<scalar>(
"kappa", 0.41,
kappa_);
294 os.writeEntryIfDifferent<scalar>(
"E", 9.8,
E_);
304 alphatJayatillekeWallFunctionFvPatchScalarField
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
dimensionedScalar Pr("Pr", dimless, laminarTransport)
fvPatchField< vector > fvPatchVectorField
dimensionedScalar log(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const volVectorField & U() const
Access function to velocity field.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
virtual void write(Ostream &) const
Write.
constexpr char nl
The newline '\n' character (0x0a)
virtual tmp< volScalarField > nu() const =0
Return the laminar viscosity.
alphatJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
scalar Psmooth(const scalar Prat) const
`P' function
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
const dimensionSet dimless
Dimensionless.
virtual void write(Ostream &) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Abstract base class for turbulence models (RAS, LES and laminar).
Macros for easy insertion into run-time selection tables.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
#define forAll(list, i)
Loop across all elements in list.
constexpr const char *const group
Group name for atomic constants.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
The class nutWallFunction is an abstract base class that hosts calculation methods and common functi...
dimensionedScalar exp(const dimensionedScalar &ds)
scalar yPlusTherm(const scalar P, const scalar Prat) const
Calculate y+ at the edge of the thermal laminar sublayer.
fvPatchField< scalar > fvPatchScalarField
static const word propertiesName
Default name of the turbulence properties dictionary.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
This boundary condition provides a kinematic turbulent thermal conductivity for using wall functions...
A FieldMapper for finite-volume patch fields.
makePatchTypeField(fvPatchScalarField, alphatJayatillekeWallFunctionFvPatchScalarField)
const nearWallDist & y() const
Return the near wall distances.
IOdictionary transportProperties(IOobject("transportProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
errorManip< error > abort(error &err)
virtual tmp< volScalarField > nuEff() const =0
Return the effective viscosity.
OBJstream os(runTime.globalPath()/outputName)
virtual void checkType()
Check the type of the patch.
scalar Prt_
Turbulent Prandtl number.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
scalar kappa_
Von Karman constant.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
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...
const std::string patch
OpenFOAM patch number as a std::string.
virtual tmp< volScalarField > nut() const =0
Return the turbulence viscosity.
A class for managing temporary objects.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
tmp< scalarField > yPlus(const turbulenceModel &turbModel) const
Return the patch y+.
virtual tmp< scalarField > yPlus() const =0
Calculate and return the yPlus at the boundary.