48 internalField().
group()
66 const scalar
Re = magUp[facei]*y[facei]/nuw[facei];
68 if (
sqr(yPlus[facei]) > Re)
70 nutw[facei] = nuw[facei]*(
sqr(yPlus[facei])/Re - 1);
94 internalField().
group()
104 static const scalar
c2 = 2.25/(90 - 2.25);
105 static const scalar c3 = 2.0*
atan(1.0)/
log(90/2.25);
106 static const scalar c4 = c3*
log(2.25);
116 const scalar
c1 = 1/(90 - 2.25) + Cs_[facei];
118 const scalar magUpara = magUp[facei];
119 const scalar
Re = magUpara*y[facei]/nuw[facei];
123 const scalar ryPlusLam = 1/yp;
126 scalar yPlusLast = 0.0;
128 const scalar dKsPlusdYPlus = Ks_[facei]/y[facei];
135 scalar KsPlus = yp*dKsPlusdYPlus;
138 scalar yPlusGPrime = 0;
143 const scalar t1 = 1 + Cs_[facei]*KsPlus;
145 yPlusGPrime = Cs_[facei]*KsPlus/t1;
147 else if (KsPlus > 2.25)
149 const scalar t1 = c1*KsPlus -
c2;
150 const scalar t2 = c3*
log(KsPlus) - c4;
151 const scalar sint2 =
sin(t2);
152 const scalar logt1 =
log(t1);
153 E =
E_/
pow(t1, sint2);
155 (c1*sint2*KsPlus/t1) + (c3*logt1*
cos(t2));
164 (kappaRe + yp*(1 - yPlusGPrime))
165 /(1 +
log(E*yp) - yPlusGPrime),
175 (kappaRe + yp*(1 - yPlusGPrime))
176 /(1 +
log(E*yp) - yPlusGPrime),
185 }
while(
mag(ryPlusLam*(yp - yPlusLast)) > 0.0001 && ++iter < 20);
192 const scalar
Re = magUp[facei]*y[facei]/nuw[facei];
197 scalar yPlusLast = yp;
210 }
while(
mag(ryPlusLam*(yp - yPlusLast)) > 0.0001 && ++iter < 20);
242 Ks_(
"Ks", dict, p.
size()),
243 Cs_(
"Cs", dict, p.
size())
256 Ks_(mapper(ptf.Ks_)),
291 nutUWallFunctionFvPatchScalarField::autoMap(m);
303 nutUWallFunctionFvPatchScalarField::rmap(ptf, addr);
306 refCast<const nutURoughWallFunctionFvPatchScalarField>(ptf);
308 Ks_.
rmap(nrwfpsf.Ks_, addr);
309 Cs_.
rmap(nrwfpsf.Cs_, addr);
const char *const group
Group name for atomic constants.
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
#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.
virtual tmp< scalarField > nut() const
Calculate the turbulence viscosity.
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions ...
dimensionedScalar log(const dimensionedScalar &ds)
virtual void writeLocalEntries(Ostream &) const
Write local wall function variables.
const volVectorField & U() const
Access function to velocity field.
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.
T & ref() const
Return non-const reference or generate a fatal error.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual tmp< volScalarField > nu() const =0
Return the laminar viscosity.
const dimensionedScalar c2
Second radiation constant: default SI units: [m K].
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
Abstract base class for turbulence models (RAS, LES and laminar).
Macros for easy insertion into run-time selection tables.
dimensionedScalar cos(const dimensionedScalar &ds)
static const word propertiesName
Default name of the turbulence properties dictionary.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static word groupName(Name name, const word &group)
scalar E() const
Return E.
Foam::fvPatchFieldMapper.
const nearWallDist & y() const
Return the near wall distances.
scalar kappa_
Von Karman constant.
virtual label size() const
Return size.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
dimensionedScalar sin(const dimensionedScalar &ds)
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
nutUWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
virtual void write(Ostream &os) const
Write.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void rmap(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 reverse-map from the given field
nutURoughWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
dimensionedScalar atan(const dimensionedScalar &ds)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dimensionedScalar c1
First radiation constant: default SI units: [W/m^2].
dimensioned< scalar > mag(const dimensioned< Type > &)
A class for managing temporary objects.
scalar yPlusLam_
Y+ at the edge of the laminar sublayer.
static const nutWallFunctionFvPatchScalarField & nutw(const turbulenceModel &turbModel, const label patchi)
Return the nut patchField for the given wall patch.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
scalarField Re(const UList< complex > &cf)