34 namespace compressible
39 scalar alphatJayatillekeWallFunctionFvPatchScalarField::maxExp_ = 50.0;
40 scalar alphatJayatillekeWallFunctionFvPatchScalarField::tolerance_ = 0.01;
41 label alphatJayatillekeWallFunctionFvPatchScalarField::maxIters_ = 10;
45 scalar alphatJayatillekeWallFunctionFvPatchScalarField::Psmooth
50 return 9.24*(
pow(Prat, 0.75) - 1.0)*(1.0 + 0.28*
exp(-0.007*Prat));
54 scalar alphatJayatillekeWallFunctionFvPatchScalarField::yPlusTherm
56 const nutWallFunctionFvPatchScalarField& nutw,
63 for (
int i=0; i<maxIters_; i++)
65 scalar f = ypt - (
log(nutw.E()*ypt)/nutw.kappa() + P)/Prat;
66 scalar df = 1.0 - 1.0/(ypt*nutw.kappa()*Prat);
67 scalar yptNew = ypt - f/df;
73 else if (
mag(yptNew - ypt) < tolerance_)
96 fixedValueFvPatchScalarField(p, iF),
109 fixedValueFvPatchScalarField(p, iF, dict),
123 fixedValueFvPatchScalarField(ptf, p, iF, mapper),
135 fixedValueFvPatchScalarField(awfpsf, iF),
156 thermophysicalTransportModel::typeName,
157 internalField().
group()
195 label celli = patch().faceCells()[facei];
199 scalar
yPlus = uTau*y[facei]/(muw[facei]/rhow[facei]);
202 scalar Pr = muw[facei]/alphaw[facei];
205 scalar Prat = Pr/Prt_;
208 scalar P = Psmooth(Prat);
209 scalar yPlusTherm = this->yPlusTherm(nutw, P, Prat);
212 scalar alphaEff = 0.0;
213 if (yPlus < yPlusTherm)
215 const scalar A = qDot[facei]*rhow[facei]*uTau*y[facei];
217 const scalar B = qDot[facei]*Pr*
yPlus;
219 const scalar
C = Pr*0.5*rhow[facei]*uTau*
sqr(magUp[facei]);
221 alphaEff = A/(B + C + vSmall);
225 const scalar A = qDot[facei]*rhow[facei]*uTau*y[facei];
231 uTau/nutw.
kappa()*
log(nutw.
E()*yPlusTherm) -
mag(Uw[facei]);
235 *(Prt_*
sqr(magUp[facei]) + (Pr - Prt_)*
sqr(magUc));
237 alphaEff = A/(B + C + vSmall);
241 alphatw[facei] =
max(0.0, alphaEff - alphaw[facei]);
245 Info<<
" uTau = " << uTau <<
nl 246 <<
" Pr = " << Pr <<
nl 247 <<
" Prt = " << Prt_ <<
nl 248 <<
" qDot = " << qDot[facei] <<
nl 249 <<
" yPlus = " << yPlus <<
nl 250 <<
" yPlusTherm = " << yPlusTherm <<
nl 251 <<
" alphaEff = " << alphaEff <<
nl 252 <<
" alphaw = " << alphaw[facei] <<
nl 253 <<
" alphatw = " << alphatw[facei] <<
nl const char *const group
Group name for atomic constants.
Graphite solid properties.
#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.
dimensionedScalar log(const dimensionedScalar &ds)
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 > &)
virtual const fluidThermo & thermo() const =0
Access function to incompressible transport model.
const compressibleMomentumTransportModel & momentumTransport() const
const Boundary & boundaryField() const
Return const-reference to the boundary field.
virtual tmp< volScalarField > alphaEff(const volScalarField &alphat) const =0
Effective thermal turbulent diffusivity of mixture [kg/m/s].
dimensionedSymmTensor sqr(const dimensionedVector &dv)
This boundary condition provides a thermal wall function for turbulent thermal diffusivity (usuallyal...
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
dimensionedScalar pow025(const dimensionedScalar &ds)
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
void write(Ostream &) const
Write.
label k
Boltzmann constant.
virtual const volScalarField & alpha() const =0
Thermal diffusivity for enthalpy of mixture [kg/m/s].
virtual void write(Ostream &) const
Write.
scalar Cmu() const
Return Cmu.
Macros for easy insertion into run-time selection tables.
virtual volScalarField & he()=0
Enthalpy/Internal energy [J/kg].
alphatJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
static const nutWallFunctionFvPatchScalarField & nutw(const momentumTransportModel &turbModel, const label patchi)
Return the nut patchField for the given wall patch.
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions...
dimensionedScalar exp(const dimensionedScalar &ds)
static word groupName(Name name, const word &group)
scalar E() const
Return E.
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Abstract base class for thermophysical transport models (RAS, LES and laminar).
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
dimensioned< scalar > mag(const dimensioned< Type > &)
A class for managing temporary objects.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
scalar kappa() const
Return kappa.
Abstract base class for turbulence models (RAS, LES and laminar).
makePatchTypeField(fvPatchScalarField, thermalBaffleFvPatchScalarField)