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));
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);
133 const label patchi =
patch().index();
140 internalField().
group()
153 sqr(
calcUTau(magGradU))/(magGradU + ROOTVSMALL) - nuw
163 os.writeEntryIfDifferent<
word>
166 "surfaceFilmProperties",
169 os.writeEntryIfDifferent<scalar>(
"B", 5.5,
B_);
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()
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
Base class for surface film models.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
dimensionedScalar pow025(const dimensionedScalar &ds)
makePatchTypeField(fvPatchScalarField, alphatFilmWallFunctionFvPatchScalarField)
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
label k
Boltzmann constant.
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
word filmRegionName_
Name of film region.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
virtual void write(Ostream &os) const
Write.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
constexpr const char *const group
Group name for atomic constants.
void writeLocalEntries(Ostream &) const
Write local wall function variables.
scalar yPlusCrit_
y+ value for laminar -> turbulent transition
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
dimensionedScalar exp(const dimensionedScalar &ds)
This boundary condition provides a wall function for the turbulent viscosity (i.e. nut) based on the turbulent kinetic energy, (i.e. k) for for low- and high-Reynolds number applications.
static const word propertiesName
Default name of the turbulence properties dictionary.
virtual tmp< scalarField > calcNut() const
Calculate the turbulence viscosity.
A class for handling words, derived from Foam::string.
A FieldMapper for finite-volume patch fields.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual void write(Ostream &) const
Write.
OBJstream os(runTime.globalPath()/outputName)
scalar Cmu() const noexcept
Return the object: Cmu.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
nutkFilmWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
wallFunctionCoefficients wallCoeffs_
Wall-function coefficients.
scalar kappa() const noexcept
Return the object: kappa.
A class for managing temporary objects.
tmp< scalarField > calcUTau(const scalarField &magGradU) const
Calculate the friction velocity.
This boundary condition provides a turbulent viscosity condition when using wall functions, based on turbulence kinetic energy, for use with surface film models.
static constexpr const zero Zero
Global zero (0)