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()
199 label celli = patch().faceCells()[facei];
203 scalar
yPlus = uTau*y[facei]/nuw[facei];
206 scalar Pr = rhow[facei]*nuw[facei]/alphaw[facei];
209 scalar Prat = Pr/Prt_;
212 scalar P = Psmooth(Prat);
213 scalar yPlusTherm = this->yPlusTherm(nutw, P, Prat);
216 scalar alphaEff = 0.0;
217 if (yPlus < yPlusTherm)
219 const scalar A = qDot[facei]*rhow[facei]*uTau*y[facei];
221 const scalar B = qDot[facei]*Pr*
yPlus;
223 const scalar
C = Pr*0.5*rhow[facei]*uTau*
sqr(magUp[facei]);
225 alphaEff = A/(B + C + vSmall);
229 const scalar A = qDot[facei]*rhow[facei]*uTau*y[facei];
235 uTau/nutw.
kappa()*
log(nutw.
E()*yPlusTherm) -
mag(Uw[facei]);
239 *(Prt_*
sqr(magUp[facei]) + (Pr - Prt_)*
sqr(magUc));
241 alphaEff = A/(B + C + vSmall);
245 alphatw[facei] =
max(0.0, alphaEff - alphaw[facei]);
249 Info<<
" uTau = " << uTau <<
nl 250 <<
" Pr = " << Pr <<
nl 251 <<
" Prt = " << Prt_ <<
nl 252 <<
" qDot = " << qDot[facei] <<
nl 253 <<
" yPlus = " << yPlus <<
nl 254 <<
" yPlusTherm = " << yPlusTherm <<
nl 255 <<
" alphaEff = " << alphaEff <<
nl 256 <<
" alphaw = " << alphaw[facei] <<
nl 257 <<
" 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.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
FvWallInfoData< WallInfo, label > 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...
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 turbulent thermal diffusivity of energy.
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 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].
virtual const volScalarField & Cp() const =0
Heat capacity at constant pressure [J/kg/K].
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.
virtual const volScalarField & kappa() const =0
Thermal conductivity of mixture [W/m/K].
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.
Base class for single-phase compressible turbulence models.
makePatchTypeField(fvPatchScalarField, thermalBaffleFvPatchScalarField)