48 momentumTransportModel::typeName,
49 internalField().
group()
67 const scalar
Re = magUp[facei]*y[facei]/nuw[facei];
69 if (
sqr(yPlus[facei]) > Re)
71 nutw[facei] = nuw[facei]*(
sqr(yPlus[facei])/Re - 1);
95 momentumTransportModel::typeName,
96 internalField().
group()
106 static const scalar
c2 = 2.25/(90 - 2.25);
107 static const scalar c3 = 2.0*
atan(1.0)/
log(90/2.25);
108 static const scalar c4 = c3*
log(2.25);
118 const scalar
c1 = 1/(90 - 2.25) + Cs_[facei];
120 const scalar magUpara = magUp[facei];
121 const scalar
Re = magUpara*y[facei]/nuw[facei];
125 const scalar ryPlusLam = 1/yp;
128 scalar yPlusLast = 0.0;
130 const scalar dKsPlusdYPlus = Ks_[facei]/y[facei];
137 scalar KsPlus = yp*dKsPlusdYPlus;
140 scalar yPlusGPrime = 0;
145 const scalar t1 = 1 + Cs_[facei]*KsPlus;
147 yPlusGPrime = Cs_[facei]*KsPlus/t1;
149 else if (KsPlus > 2.25)
151 const scalar t1 = c1*KsPlus -
c2;
152 const scalar t2 = c3*
log(KsPlus) - c4;
153 const scalar sint2 =
sin(t2);
154 const scalar logt1 =
log(t1);
155 E =
E_/
pow(t1, sint2);
157 (c1*sint2*KsPlus/t1) + (c3*logt1*
cos(t2));
166 (kappaRe + yp*(1 - yPlusGPrime))
167 /(1 +
log(E*yp) - yPlusGPrime),
177 (kappaRe + yp*(1 - yPlusGPrime))
178 /(1 +
log(E*yp) - yPlusGPrime),
187 }
while(
mag(ryPlusLam*(yp - yPlusLast)) > 0.0001 && ++iter < 20);
194 const scalar
Re = magUp[facei]*y[facei]/nuw[facei];
199 scalar yPlusLast = yp;
212 }
while(
mag(ryPlusLam*(yp - yPlusLast)) > 0.0001 && ++iter < 20);
244 Ks_(
"Ks", dict, p.
size()),
245 Cs_(
"Cs", dict, p.
size())
258 Ks_(mapper(ptf.Ks_)),
282 nutUWallFunctionFvPatchScalarField::autoMap(m);
294 nutUWallFunctionFvPatchScalarField::rmap(ptf, addr);
297 refCast<const nutURoughWallFunctionFvPatchScalarField>(ptf);
299 Ks_.
rmap(nrwfpsf.Ks_, addr);
300 Cs_.
rmap(nrwfpsf.Cs_, addr);
virtual tmp< volScalarField > nu() const =0
Return the laminar viscosity.
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.
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)
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...
const nearWallDist & y() const
Return the near wall distances.
virtual void write(Ostream &) const
Write.
Macros for easy insertion into run-time selection tables.
const dimensionedScalar c2
Second radiation constant: default SI units: [m K].
const dimensionedScalar c1
First radiation constant: default SI units: [W/m^2].
static const nutWallFunctionFvPatchScalarField & nutw(const momentumTransportModel &turbModel, const label patchi)
Return the nut patchField for the given wall patch.
dimensionedScalar cos(const dimensionedScalar &ds)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static word groupName(Name name, const word &group)
scalar E() const
Return E.
Foam::fvPatchFieldMapper.
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.
Abstract base class for turbulence models (RAS, LES and laminar).
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const volVectorField & U() const
Access function to velocity field.
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...
dimensioned< scalar > mag(const dimensioned< Type > &)
A class for managing temporary objects.
scalar yPlusLam_
Y+ at the edge of the laminar sublayer.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
scalarField Re(const UList< complex > &cf)