37 namespace compressible
42 scalar alphatJayatillekeWallFunctionFvPatchScalarField::maxExp_ = 50.0;
43 scalar alphatJayatillekeWallFunctionFvPatchScalarField::tolerance_ = 0.01;
44 label alphatJayatillekeWallFunctionFvPatchScalarField::maxIters_ = 10;
48 void alphatJayatillekeWallFunctionFvPatchScalarField::checkType()
50 if (!isA<wallFvPatch>(patch()))
53 <<
"Patch type for patch " << patch().name() <<
" must be wall\n" 54 <<
"Current patch type is " << patch().type() <<
nl 60 scalar alphatJayatillekeWallFunctionFvPatchScalarField::Psmooth
65 return 9.24*(
pow(Prat, 0.75) - 1.0)*(1.0 + 0.28*
exp(-0.007*Prat));
69 scalar alphatJayatillekeWallFunctionFvPatchScalarField::yPlusTherm
77 for (
int i=0; i<maxIters_; i++)
79 scalar f = ypt - (
log(E_*ypt)/kappa_ + P)/Prat;
80 scalar df = 1.0 - 1.0/(ypt*kappa_*Prat);
81 scalar yptNew = ypt - f/df;
87 else if (
mag(yptNew - ypt) < tolerance_)
110 fixedValueFvPatchScalarField(p, iF),
129 fixedValueFvPatchScalarField(ptf, p, iF, mapper),
145 fixedValueFvPatchScalarField(p, iF, dict),
161 fixedValueFvPatchScalarField(awfpsf),
164 kappa_(awfpsf.kappa_),
178 fixedValueFvPatchScalarField(awfpsf, iF),
181 kappa_(awfpsf.kappa_),
205 compressible::turbulenceModel::propertiesName,
206 internalField().
group()
210 const scalar Cmu25 =
pow025(Cmu_);
231 turbModel.transport().he().boundaryField()[
patchi];
242 label celli = patch().faceCells()[facei];
246 scalar
yPlus = uTau*y[facei]/(muw[facei]/rhow[facei]);
249 scalar
Pr = muw[facei]/alphaw[facei];
252 scalar Prat = Pr/Prt_;
255 scalar P = Psmooth(Prat);
256 scalar yPlusTherm = this->yPlusTherm(P, Prat);
260 if (yPlus < yPlusTherm)
262 scalar A = qDot[facei]*rhow[facei]*uTau*y[facei];
263 scalar B = qDot[facei]*Pr*
yPlus;
264 scalar
C = Pr*0.5*rhow[facei]*uTau*
sqr(magUp[facei]);
265 alphaEff = A/(B + C + vSmall);
269 scalar A = qDot[facei]*rhow[facei]*uTau*y[facei];
270 scalar B = qDot[facei]*Prt_*(1.0/kappa_*
log(E_*yPlus) + P);
271 scalar magUc = uTau/kappa_*
log(E_*yPlusTherm) -
mag(Uw[facei]);
274 *(Prt_*
sqr(magUp[facei]) + (Pr - Prt_)*
sqr(magUc));
275 alphaEff = A/(B + C + vSmall);
279 alphatw[facei] =
max(0.0, alphaEff - alphaw[facei]);
283 Info<<
" uTau = " << uTau <<
nl 284 <<
" Pr = " << Pr <<
nl 285 <<
" Prt = " << Prt_ <<
nl 286 <<
" qDot = " << qDot[facei] <<
nl 287 <<
" yPlus = " << yPlus <<
nl 288 <<
" yPlusTherm = " << yPlusTherm <<
nl 289 <<
" alphaEff = " << alphaEff <<
nl 290 <<
" alphaw = " << alphaw[facei] <<
nl 291 <<
" alphatw = " << alphatw[facei] <<
nl 307 writeEntry(
"value", os);
const char *const group
Group name for atomic constants.
dimensionedScalar Pr("Pr", dimless, laminarTransport)
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)
errorManipArg< error, int > exit(error &err, const int errNo=1)
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 > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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.
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
virtual void write(Ostream &) const
Write.
Macros for easy insertion into run-time selection tables.
virtual tmp< volScalarField > alphaEff() const
Effective thermal turbulent diffusivity of mixture [kg/m/s].
alphatJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
dimensionedScalar exp(const dimensionedScalar &ds)
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...
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
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 > &)
volScalarField alphaEff("alphaEff", turbulence->nu()/Pr+alphat)
A class for managing temporary objects.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual tmp< volScalarField > alpha() const
Thermal diffusivity for enthalpy of mixture [kg/m/s].
makePatchTypeField(fvPatchScalarField, thermalBaffleFvPatchScalarField)