39 namespace compressible
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 momentumTransportModel::typeName,
85 internalField().
group()
95 const scalar Cmu25 =
pow(Cmu_, 0.25);
99 label faceCelli = patch().faceCells()[facei];
101 scalar ut = Cmu25*
sqrt(k[faceCelli]);
103 scalar
yPlus = y[facei]*ut/nuw[facei];
105 scalar mStar = mDotFilmp[facei]/(y[facei]*ut);
108 if (yPlus > yPlusCrit_)
110 scalar expTerm =
exp(
min(50.0, B_*mStar));
111 scalar powTerm =
pow(yPlus, mStar/kappa_);
112 factor = mStar/(expTerm*powTerm - 1.0 + rootVSmall);
116 scalar expTerm =
exp(
min(50.0, mStar));
117 factor = mStar/(expTerm*yPlus - 1.0 + rootVSmall);
120 uTau[facei] =
sqrt(
max(0, magGradU[facei]*ut*factor));
136 momentumTransportModel::typeName,
137 internalField().
group()
149 sqr(
calcUTau(magGradU))/(magGradU + rootVSmall) - nuw
218 momentumTransportModel::typeName,
219 internalField().
group()
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.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
Base class for surface film models.
virtual void writeLocalEntries(Ostream &) const
Write local wall function variables.
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 > &)
Templated abstract base class for single-phase compressible turbulence models.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
T & ref() const
Return non-const reference or generate a fatal error.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
bool foundObject(const word &name) const
Is the named Type found?
makePatchTypeField(fvPatchScalarField, alphatFilmWallFunctionFvPatchScalarField)
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
const nearWallDist & y() const
Return the near wall distances.
label k
Boltzmann constant.
const Time & time() const
Return the reference to the time database.
virtual void write(Ostream &) const
Write.
virtual void write(Ostream &os) const
Write.
Macros for easy insertion into run-time selection tables.
scalar yPlusCrit_
y+ value for laminar -> turbulent transition (default = 11.05)
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
dimensionedScalar exp(const dimensionedScalar &ds)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static word groupName(Name name, const word &group)
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
virtual tmp< volScalarField > k() const =0
Return the turbulence kinetic energy.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const volVectorField & U() const
Access function to velocity field.
nutkFilmWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual tmp< scalarField > nut() const
Calculate the turbulence viscosity.
A class for managing temporary objects.
virtual 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.
nutkWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.