35 namespace compressible
40 scalar alphatPhaseJayatillekeWallFunctionFvPatchScalarField::maxExp_ = 50.0;
41 scalar alphatPhaseJayatillekeWallFunctionFvPatchScalarField::tolerance_ = 0.01;
42 label alphatPhaseJayatillekeWallFunctionFvPatchScalarField::maxIters_ = 10;
51 return 9.24*(
pow(Prat, 0.75) - 1.0)*(1.0 + 0.28*
exp(-0.007*Prat));
58 const nutWallFunctionFvPatchScalarField& nutw,
63 tmp<scalarField> typsf(
new scalarField(this->size()));
73 ypt - (
log(nutw.E()*ypt)/nutw.kappa() + P[facei])/Prat[facei];
74 const scalar df = 1 - 1.0/(ypt*nutw.kappa()*Prat[facei]);
75 const scalar yptNew = ypt - f/df;
105 const DimensionedField<scalar, volMesh>& iF
108 fixedValueFvPatchScalarField(p, iF),
117 const DimensionedField<scalar, volMesh>& iF,
118 const dictionary&
dict 121 fixedValueFvPatchScalarField(p, iF, dict),
122 Prt_(dict.lookupOrDefault<scalar>(
"Prt", 0.85))
131 const DimensionedField<scalar, volMesh>& iF,
132 const fvPatchFieldMapper& mapper
135 fixedValueFvPatchScalarField(ptf, p, iF, mapper),
144 const DimensionedField<scalar, volMesh>& iF
147 fixedValueFvPatchScalarField(awfpsf, iF),
161 const phaseSystem& fluid =
162 db().lookupObject<phaseSystem>(
"phaseProperties");
164 const phaseModel& phase
166 fluid.phases()[internalField().group()]
169 const label patchi = patch().index();
178 const nutWallFunctionFvPatchScalarField& nutw =
181 const scalar Cmu25 =
pow025(nutw.Cmu());
185 const tmp<scalarField> tmuw = turbModel.mu(patchi);
188 const tmp<scalarField> talphaw = phase.thermo().alpha(patchi);
191 const tmp<volScalarField> tk = turbModel.k();
201 phase.thermo().he().boundaryField()[
patchi];
204 phase.thermo().T().boundaryField()[
patchi];
211 (prevAlphat + alphaw)*hew.snGrad()
228 tmp<scalarField> talphatConv(
new scalarField(this->size()));
235 scalar alphaEff = 0.0;
238 const scalar A = qDot[facei]*rhow[facei]*
uTau[facei]*y[facei];
240 const scalar B = qDot[facei]*Pr[facei]*
yPlus[facei];
243 Pr[facei]*0.5*rhow[facei]*
uTau[facei]*
sqr(
magUp[facei]);
245 alphaEff = A/(B + C + vSmall);
249 const scalar A = qDot[facei]*rhow[facei]*
uTau[facei]*y[facei];
253 *(1.0/nutw.kappa()*
log(nutw.E()*
yPlus[facei]) + P[facei]);
256 uTau[facei]/nutw.kappa()
260 0.5*rhow[facei]*
uTau[facei]
263 alphaEff = A/(B + C + vSmall);
267 alphatConv[facei] =
max(0.0, alphaEff - alphaw[facei]);
283 fixedValueFvPatchScalarField::updateCoeffs();
virtual void write(Ostream &) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
#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.
fvPatchField< vector > fvPatchVectorField
dimensionedScalar log(const dimensionedScalar &ds)
tmp< scalarField > calcAlphat(const scalarField &prevAlphat) const
Evaluate the turbulent thermal diffusivity.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
scalar Prt_
Turbulent Prandtl number.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensionedScalar pow025(const dimensionedScalar &ds)
virtual void write(Ostream &) const
Write.
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
static const nutWallFunctionFvPatchScalarField & nutw(const momentumTransportModel &turbModel, const label patchi)
Return the nut patchField for the given wall patch.
dimensionedScalar exp(const dimensionedScalar &ds)
fvPatchField< scalar > fvPatchScalarField
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static word groupName(Name name, const word &group)
tmp< scalarField > yPlusTherm(const nutWallFunctionFvPatchScalarField &nutw, const scalarField &P, const scalarField &Prat) const
Calculate y+ at the edge of the thermal laminar sublayer.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
tmp< scalarField > Psmooth(const scalarField &Prat) const
'P' function
PhaseCompressibleMomentumTransportModel< dynamicTransportModel > momentumTransportModel
alphatPhaseJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
dimensioned< scalar > mag(const dimensioned< Type > &)
makePatchTypeField(fvPatchScalarField, thermalBaffleFvPatchScalarField)