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.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
#define forAll(list, i)
Loop across all elements in list.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
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...
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...
label k
Boltzmann constant.
const Time & time() const
Return the reference to the time database.
virtual void write(Ostream &) const
Write.
const volScalarField::Boundary & y() const
Return the near wall distance.
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.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
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)
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,.
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.
Base class for single-phase compressible turbulence models.
nutkWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.