56 fixedValueFvPatchScalarField(
p, iF),
57 filmRegionName_(
"surfaceFilmProperties"),
75 fixedValueFvPatchScalarField(ptf,
p, iF, mapper),
76 filmRegionName_(ptf.filmRegionName_),
78 yPlusCrit_(ptf.yPlusCrit_),
93 fixedValueFvPatchScalarField(
p, iF,
dict),
96 dict.getOrDefault<
word>(
"filmRegion",
"surfaceFilmProperties")
98 B_(
dict.getOrDefault(
"B", 5.5)),
99 yPlusCrit_(
dict.getOrDefault(
"yPlusCrit", 11.05)),
100 Cmu_(
dict.getOrDefault(
"Cmu", 0.09)),
101 kappa_(
dict.getOrDefault(
"kappa", 0.41)),
102 Prt_(
dict.getOrDefault(
"Prt", 0.85))
112 fixedValueFvPatchScalarField(fwfpsf),
113 filmRegionName_(fwfpsf.filmRegionName_),
115 yPlusCrit_(fwfpsf.yPlusCrit_),
117 kappa_(fwfpsf.kappa_),
129 fixedValueFvPatchScalarField(fwfpsf, iF),
130 filmRegionName_(fwfpsf.filmRegionName_),
132 yPlusCrit_(fwfpsf.yPlusCrit_),
134 kappa_(fwfpsf.kappa_),
148 const auto* filmModelPtr = db().time().findObject
158 const auto& filmModel = *filmModelPtr;
166 const label patchi =
patch().index();
169 const label filmPatchi = filmModel.regionPatchID(patchi);
172 scalarField mDotFilmp = mDotFilm().boundaryField()[filmPatchi];
173 filmModel.toPrimary(filmPatchi, mDotFilmp);
181 internalField().
group()
187 const scalarField& rhow = turbModel.rho().boundaryField()[patchi];
204 const label faceCelli =
patch().faceCells()[facei];
206 const scalar
uTau = Cmu25*
sqrt(
k[faceCelli]);
208 const scalar
yPlus =
y[facei]*
uTau/(muw[facei]/rhow[facei]);
210 const scalar
Pr = muw[facei]/alphaw[facei];
213 const scalar mStar = mDotFilmp[facei]/(
y[facei]*
uTau);
221 mStar/(expTerm*(
pow(yPlusRatio, powTerm)) - 1.0 + ROOTVSMALL);
227 factor = mStar/(expTerm - 1.0 + ROOTVSMALL);
230 const scalar dx =
patch().deltaCoeffs()[facei];
234 alphat[facei] =
max(
alphaEff - alphaw[facei], scalar(0));
240 fixedValueFvPatchScalarField::updateCoeffs();
249 os.writeEntryIfDifferent<
word>
252 "surfaceFilmProperties",
255 os.writeEntryIfDifferent<scalar>(
"B", 5.5,
B_);
256 os.writeEntryIfDifferent<scalar>(
"yPlusCrit", 11.05,
yPlusCrit_);
257 os.writeEntryIfDifferent<scalar>(
"Cmu", 0.09,
Cmu_);
258 os.writeEntryIfDifferent<scalar>(
"kappa", 0.41,
kappa_);
259 os.writeEntryIfDifferent<scalar>(
"Prt", 0.85,
Prt_);
270 alphatFilmWallFunctionFvPatchScalarField
dimensionedScalar Pr("Pr", dimless, laminarTransport)
Base class for surface film models.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
dimensionedScalar pow025(const dimensionedScalar &ds)
scalar yPlusCrit_
y+ value for laminar -> turbulent transition
makePatchTypeField(fvPatchScalarField, alphatFilmWallFunctionFvPatchScalarField)
static int & msgType() noexcept
Message tag of standard messages.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
label k
Boltzmann constant.
virtual void write(Ostream &) const
Write.
Abstract base class for turbulence models (RAS, LES and laminar).
scalar kappa_
Von-Karman constant.
alphatFilmWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
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.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
dimensionedScalar exp(const dimensionedScalar &ds)
scalar Prt_
Turbulent Prandtl number.
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from Foam::string.
A FieldMapper for finite-volume patch fields.
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...
OBJstream os(runTime.globalPath()/outputName)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
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.
virtual void write(Ostream &) const
Write.
volScalarField alphaEff("alphaEff", turbulence->nu()/Pr+alphat)
A class for managing temporary objects.
word filmRegionName_
Name of film region.
scalar Cmu_
Empirical model coefficient.
This boundary condition provides a turbulent thermal diffusivity condition when using wall functions...