68 const modelType& filmModel =
69 db().time().lookupObject<modelType>(
"surfaceFilmProperties");
71 const label filmPatchI = filmModel.regionPatchID(patchi);
74 scalarField mDotFilmp = mDotFilm().boundaryField()[filmPatchI];
75 filmModel.toPrimary(filmPatchI, mDotFilmp);
94 const scalar Cmu25 =
pow(Cmu_, 0.25);
98 label faceCellI = patch().faceCells()[faceI];
100 scalar ut = Cmu25*
sqrt(k[faceCellI]);
102 scalar
yPlus = y[faceI]*ut/nuw[faceI];
104 scalar mStar = mDotFilmp[faceI]/(y[faceI]*ut);
107 if (yPlus > yPlusCrit_)
109 scalar expTerm =
exp(
min(50.0, B_*mStar));
110 scalar powTerm =
pow(yPlus, mStar/kappa_);
111 factor = mStar/(expTerm*powTerm - 1.0 + ROOTVSMALL);
115 scalar expTerm =
exp(
min(50.0, mStar));
116 factor = mStar/(expTerm*yPlus - 1.0 + ROOTVSMALL);
119 uTau[faceI] =
sqrt(
max(0, magGradU[faceI]*ut*factor));
147 sqr(
calcUTau(magGradU))/(magGradU + ROOTVSMALL) - nuw
246 writeEntry(
"value", os);
dimensionedScalar sqrt(const dimensionedScalar &ds)
virtual void writeLocalEntries(Ostream &) const
Write local wall function variables.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
scalar yPlusCrit_
y+ value for laminar -> turbulent transition (default = 11.05)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
nutkWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
bool foundObject(const word &name) const
Is the named Type found?
const char *const group
Group name for atomic constants.
virtual void write(Ostream &os) 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.
Foam::fvPatchFieldMapper.
dimensionedScalar exp(const dimensionedScalar &ds)
const Time & time() const
Return the reference to the time database.
nutkFilmWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual void write(Ostream &) const
Write.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static word groupName(Name name, const word &group)
scalar B_
B Coefficient (default = 5.5)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
label k
Boltzmann constant.
Macros for easy insertion into run-time selection tables.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
rDeltaT dimensionedInternalField()
virtual tmp< scalarField > calcUTau(const scalarField &magGradU) const
Calculate the friction velocity.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
virtual tmp< scalarField > calcNut() const
Calculate the turbulence viscosity.
Base class for surface film models.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
static const word propertiesName
Default name of the turbulence properties dictionary.
makePatchTypeField(fvPatchScalarField, alphatFilmWallFunctionFvPatchScalarField)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Evaluates and outputs turbulence y+ for models. Values written to time directories as field 'yPlus'...
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
A class for managing temporary objects.
This boundary condition provides a turbulent viscosity condition when using wall functions, based on turbulence kinetic energy, for use with surface film models.