30 #include "twoPhaseSystem.H" 54 const DimensionedField<scalar, volMesh>& iF
57 alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF),
60 alphatConv_(p.size(), 0.0)
62 AbyV_ = this->patch().magSf();
65 label faceCelli = this->patch().faceCells()[facei];
66 AbyV_[facei] /= iF.mesh().V()[faceCelli];
75 const DimensionedField<scalar, volMesh>& iF,
76 const dictionary& dict
80 relax_(dict.lookupOrDefault<scalar>(
"relax", 0.5)),
82 alphatConv_(p.size(), 0.0)
84 if (dict.found(
"alphatConv"))
86 alphatConv_ =
scalarField(
"alphatConv", dict, p.size());
89 AbyV_ = this->patch().magSf();
92 label faceCelli = this->patch().faceCells()[facei];
93 AbyV_[facei] /= iF.mesh().V()[faceCelli];
101 const alphatWallBoilingWallFunctionFvPatchScalarField& psf,
103 const DimensionedField<scalar, volMesh>& iF,
104 const fvPatchFieldMapper& mapper
116 alphatConv_(psf.alphatConv_, mapper)
123 const alphatWallBoilingWallFunctionFvPatchScalarField& psf
129 alphatConv_(psf.alphatConv_)
136 const alphatWallBoilingWallFunctionFvPatchScalarField& psf,
137 const DimensionedField<scalar, volMesh>& iF
143 alphatConv_(psf.alphatConv_)
157 const ThermalPhaseChangePhaseSystem<MomentumTransferPhaseSystem
164 const ThermalPhaseChangePhaseSystem
166 MomentumTransferPhaseSystem<twoPhaseSystem>
170 db().lookupObject<phaseSystem>(
"phaseProperties")
173 const phaseModel& liquid
175 fluid.phase1().name() == internalField().group()
180 const phaseModel& vapor(
fluid.otherPhase(liquid));
182 const label patchi = patch().index();
187 const tmp<scalarField> tnutw = turbModel.
nut(patchi);
193 const tmp<scalarField> tmuw = turbModel.mu(patchi);
196 const tmp<scalarField> talphaw = liquid.thermo().alpha(patchi);
199 const tmp<volScalarField> tk = turbModel.k();
209 liquid.thermo().he().boundaryField()[
patchi];
212 liquid.thermo().T().boundaryField()[
patchi];
231 tmp<volScalarField> trhoVapor = vapor.thermo().rho();
234 rhoVapor.boundaryField()[
patchi];
235 const scalarField rhoVaporp(rhoVaporw.patchInternalField());
237 tmp<volScalarField> tCp = liquid.thermo().Cp();
242 const tmp<volScalarField> tTsat =
243 fluid.saturation().Tsat(liquid.thermo().p());
246 const scalarField Tsatc(Tsatw.patchInternalField());
253 liquid.thermo().p().boundaryField()[
patchi];
257 vapor.thermo().he(pw,Tsatc,patchi)-hew.patchInternalField()
265 Tl =
max(Tc - 40,
min(Tc, Tl));
271 0.8*9.922e5*
pow(
max((Tw - Tsatw)/10, scalar(0)), 1.805)
279 max(
min(0.0006*
exp(-Tsub/45), scalar(0.0014)), scalar(1
e-6))
288 4*
mag(g).value()*(
max(rhoc - rhoVaporp, scalar(0.1)))/(3*Ddep*rhow)
312 dmdt_ = (1 - relax_)*
dmdt_ + relax_*Qe*AbyV_/L;
320 2*(alphaw*Cpw)*
F*
sqrt((0.8/
F)/(M_PI*alphaw/rhow))
335 A1*alphatConv_ + (Qq + Qe)/
max(liquidw*hew.snGrad(), scalar(1
e-16))
350 const scalarField Qc(A1*(alphatConv_ + alphaw)*hew.snGrad());
354 const scalarField QEff(liquidw*(*
this + alphaw)*hew.snGrad());
357 Info<<
" alphatConv: " <<
gMin(alphatConv_)
358 <<
" - " <<
gMax(alphatConv_) <<
endl;
361 fixedValueFvPatchScalarField::updateCoeffs();
370 alphatConv_.writeEntry(
"alphatConv", os);
371 writeEntry(
"value", os);
380 alphatWallBoilingWallFunctionFvPatchScalarField
dimensionedScalar Pr("Pr", dimless, laminarTransport)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
#define forAll(list, i)
Loop across all elements in list.
scalarField dmdt_
Rate of phase-change.
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)
const double e
Elementary charge.
UniformDimensionedField< vector > uniformDimensionedVectorField
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Type gMin(const FieldField< Field, Type > &f)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
To & refCast(From &r)
Reference type cast template function.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
alphatWallBoilingWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void write(Ostream &) const
Write.
Type gMax(const FieldField< Field, Type > &f)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
scalar kappa_
Von Karman constant.
scalarField mDotL_
Latent heat of the phase-change.
tmp< scalarField > calcAlphat(const scalarField &prevAlphat) const
Update turbulent thermal diffusivity.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const dimensionedScalar F
Faraday constant: default SI units: [C/mol].
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 > &)
virtual tmp< volScalarField > nut() const =0
Return the turbulence viscosity.
tmp< scalarField > Psmooth(const scalarField &Prat) const
'P' function
makePatchTypeField(fvPatchScalarField, thermalBaffleFvPatchScalarField)
virtual void write(Ostream &) const
Write.