55 auto&
uTau = tuTau.ref();
57 const auto* filmModelPtr = db().time().findObject
67 const label patchi = patch().index();
70 const auto& filmModel = *filmModelPtr;
72 const label filmPatchi = filmModel.regionPatchID(patchi);
75 scalarField mDotFilmp = mDotFilm().boundaryField()[filmPatchi];
76 filmModel.toPrimary(filmPatchi, mDotFilmp);
85 internalField().group()
102 const label faceCelli = patch().faceCells()[facei];
104 const scalar ut = Cmu25*
sqrt(
k[faceCelli]);
106 const scalar
yPlus =
y[facei]*ut/nuw[facei];
108 const scalar mStar = mDotFilmp[facei]/(
y[facei]*ut);
113 const scalar expTerm =
exp(
min(scalar(50),
B_*mStar));
114 const scalar powTerm =
pow(
yPlus, mStar/kappa);
115 factor = mStar/(expTerm*powTerm - 1.0 + ROOTVSMALL);
119 const scalar expTerm =
exp(
min(scalar(50), mStar));
121 factor = mStar/(expTerm*
yPlus - 1.0 + ROOTVSMALL);
124 uTau[facei] =
sqrt(
max(scalar(0), magGradU[facei]*ut*factor));
133 const label patchi = patch().index();
140 internalField().group()
153 sqr(
calcUTau(magGradU))/(magGradU + ROOTVSMALL) - nuw
166 "surfaceFilmProperties",
183 filmRegionName_(
"surfaceFilmProperties"),
198 filmRegionName_(ptf.filmRegionName_),
214 dict.getOrDefault<
word>(
"filmRegion",
"surfaceFilmProperties")
216 B_(
dict.getOrDefault(
"B", 5.5)),
217 yPlusCrit_(
dict.getOrDefault(
"yPlusCrit", 11.05))
227 filmRegionName_(wfpsf.filmRegionName_),
229 yPlusCrit_(wfpsf.yPlusCrit_)
240 filmRegionName_(wfpsf.filmRegionName_),
242 yPlusCrit_(wfpsf.yPlusCrit_)
250 const label patchi = patch().index();
257 internalField().group()
276 writeEntry(
"value",
os);
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...
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,...
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
This boundary condition provides a turbulent viscosity condition when using wall functions,...
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
tmp< scalarField > calcUTau(const scalarField &magGradU) const
Calculate the friction velocity.
void writeLocalEntries(Ostream &) const
Write local wall function variables.
scalar yPlusCrit_
y+ value for laminar -> turbulent transition
virtual tmp< scalarField > calcNut() const
Calculate the turbulence viscosity.
word filmRegionName_
Name of film region.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool write()
Write the output fields.
A FieldMapper for finite-volume patch fields.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
wallFunctionCoefficients wallCoeffs_
Wall-function coefficients.
This boundary condition provides a wall function for the turbulent viscosity (i.e....
static const word propertiesName
Default name of the phase properties dictionary.
Base class for surface film models.
A class for managing temporary objects.
scalar kappa() const noexcept
Return the object: kappa.
scalar Cmu() const noexcept
Return the object: Cmu.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
static constexpr const zero Zero
Global zero (0)
dimensionedScalar pow025(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.