30 #include "twoPhaseSystem.H" 47 scalar alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::maxExp_
49 scalar alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::tolerance_
51 label alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::maxIters_
58 if (!isA<wallFvPatch>(patch()))
61 <<
"Patch type for patch " << patch().name() <<
" must be wall\n" 62 <<
"Current patch type is " << patch().type() << nl
74 return 9.24*(
pow(Prat, 0.75) - 1.0)*(1.0 + 0.28*
exp(-0.007*Prat));
85 tmp<scalarField> typsf(
new scalarField(this->size()));
94 scalar f = ypt - (
log(
E_*ypt)/
kappa_ + P[facei])/Prat[facei];
95 scalar df = 1 - 1.0/(ypt*
kappa_*Prat[facei]);
96 scalar yptNew = ypt - f/df;
104 ypsf[facei] = yptNew;
125 const ThermalPhaseChangePhaseSystem
127 MomentumTransferPhaseSystem<twoPhaseSystem>
131 const ThermalPhaseChangePhaseSystem
133 MomentumTransferPhaseSystem<twoPhaseSystem>
137 db().lookupObject<phaseSystem>(
"phaseProperties")
140 const phaseModel& liquid
142 fluid.phase1().name() == internalField().group()
147 const label patchi = patch().index();
156 const tmp<scalarField> tmuw = turbModel.mu(patchi);
159 const tmp<scalarField> talphaw = liquid.thermo().alpha(patchi);
162 const tmp<volScalarField> tk = turbModel.k();
172 liquid.thermo().he().boundaryField()[
patchi];
175 liquid.thermo().T().boundaryField()[
patchi];
182 (prevAlphat + alphaw)*hew.snGrad()
199 tmp<scalarField> talphatConv(
new scalarField(this->size()));
206 scalar alphaEff = 0.0;
209 scalar A = qDot[facei]*rhow[facei]*
uTau[facei]*y[facei];
210 scalar B = qDot[facei]*
Pr[facei]*
yPlus[facei];
212 alphaEff = A/(B + C + VSMALL);
216 scalar A = qDot[facei]*rhow[facei]*
uTau[facei]*y[facei];
222 0.5*rhow[facei]*
uTau[facei]
224 alphaEff = A/(B + C + VSMALL);
228 alphatConv[facei] =
max(0.0, alphaEff - alphaw[facei]);
241 const DimensionedField<scalar, volMesh>& iF
258 const DimensionedField<scalar, volMesh>& iF,
259 const dictionary&
dict 263 Prt_(dict.lookupOrDefault<scalar>(
"Prt", 0.85)),
264 Cmu_(dict.lookupOrDefault<scalar>(
"Cmu", 0.09)),
265 kappa_(dict.lookupOrDefault<scalar>(
"kappa", 0.41)),
266 E_(dict.lookupOrDefault<scalar>(
"E", 9.8))
275 const DimensionedField<scalar, volMesh>& iF,
276 const fvPatchFieldMapper& mapper
305 const DimensionedField<scalar, volMesh>& iF
327 fixedValueFvPatchScalarField::updateCoeffs();
342 writeEntry(
"value", os);
dimensionedScalar Pr("Pr", dimless, laminarTransport)
#define forAll(list, i)
Loop across all elements in list.
scalarField dmdt_
Rate of phase-change.
void checkType()
Check the type of the patch.
ThermalDiffusivity< PhaseCompressibleTurbulenceModel< phaseModel > > phaseCompressibleTurbulenceModel
Typedef for phaseCompressibleTurbulenceModel.
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)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
To & refCast(From &r)
Reference type cast template function.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensionedScalar pow025(const dimensionedScalar &ds)
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
scalar Cmu_
Cmu coefficient.
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionedScalar exp(const dimensionedScalar &ds)
scalar Prt_
Turbulent Prandtl number.
fvPatchField< scalar > fvPatchScalarField
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
alphatPhaseChangeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
scalar kappa_
Von Karman constant.
tmp< scalarField > calcAlphat(const scalarField &prevAlphat) const
Update turbulent thermal diffusivity.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
tmp< scalarField > yPlusTherm(const scalarField &P, const scalarField &Prat) const
Calculate y+ at the edge of the thermal laminar sublayer.
dimensioned< scalar > mag(const dimensioned< Type > &)
tmp< scalarField > Psmooth(const scalarField &Prat) const
'P' function
makePatchTypeField(fvPatchScalarField, thermalBaffleFvPatchScalarField)
virtual void write(Ostream &) const
Write.
virtual void write(Ostream &) const
Write.