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);
84 internalField().
group()
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));
135 internalField().
group()
147 sqr(
calcUTau(magGradU))/(magGradU + ROOTVSMALL) - nuw
227 internalField().
group()
246 writeEntry(
"value", os);
scalar B_
B Coefficient (default = 5.5)
const char *const group
Group name for atomic constants.
#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.
const Time & time() const
Return the reference to the time database.
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 > &)
bool foundObject(const word &name) const
Is the named Type found?
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual tmp< scalarField > calcNut() const
Calculate the turbulence viscosity.
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
makePatchTypeField(fvPatchScalarField, alphatFilmWallFunctionFvPatchScalarField)
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
label k
Boltzmann constant.
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
Macros for easy insertion into run-time selection tables.
virtual void writeLocalEntries(Ostream &) const
Write local wall function variables.
scalar yPlusCrit_
y+ value for laminar -> turbulent transition (default = 11.05)
dimensionedScalar exp(const dimensionedScalar &ds)
static const word propertiesName
Default name of the turbulence properties dictionary.
virtual tmp< scalarField > calcUTau(const scalarField &magGradU) const
Calculate the friction velocity.
virtual void write(Ostream &os) const
Write.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static word groupName(Name name, const word &group)
Foam::fvPatchFieldMapper.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
nutkFilmWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Base class for surface film models.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
dimensioned< scalar > mag(const dimensioned< Type > &)
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
This boundary condition provides a turbulent viscosity condition when using wall functions, based on turbulence kinetic energy, for use with surface film models.
nutkWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void write(Ostream &) const
Write.