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();
78 nut.boundaryField()[patchi]
90 /turbModel.
nu(patchi);
95scalar alphatJayatillekeWallFunctionFvPatchScalarField::Psmooth
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),
181 Prt_(
dict.get<scalar>(
"Prt")),
183 E_(
dict.getOrDefault<scalar>(
"E", 9.8))
195 fixedValueFvPatchScalarField(wfpsf),
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
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 noexcept
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.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A FieldMapper for finite-volume patch fields.
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition provides a kinematic turbulent thermal conductivity for using wall functions,...
tmp< scalarField > yPlus(const turbulenceModel &turbModel) const
Return the patch y+.
scalar kappa_
Von Karman constant.
virtual void write(Ostream &) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
scalar yPlusTherm(const scalar P, const scalar Prat) const
`P' function */ scalar Psmooth(const scalar Prat) const;
alphatJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
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.
A class for managing temporary objects.
Abstract base class for turbulence models (RAS, LES and laminar).
const volVectorField & U() const
Access function to velocity field.
static const word propertiesName
Default name of the turbulence properties dictionary.
virtual tmp< volScalarField > nu() const =0
Return the laminar viscosity.
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)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
IncompressibleTurbulenceModel< transportModel > turbulenceModel
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.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
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)
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fvPatchField< vector > fvPatchVectorField
fvPatchField< scalar > fvPatchScalarField
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.