49 alphatWallBoilingWallFunctionFvPatchScalarField::phaseType
52alphatWallBoilingWallFunctionFvPatchScalarField::phaseTypeNames_
54 { phaseType::vaporPhase,
"vapor" },
55 { phaseType::liquidPhase,
"liquid" },
68alphatWallBoilingWallFunctionFvPatchScalarField::
69alphatWallBoilingWallFunctionFvPatchScalarField
76 otherPhaseName_(
"vapor"),
77 phaseType_(liquidPhase),
80 alphatConv_(
p.size(), 0),
81 dDep_(
p.size(), 1
e-5),
84 partitioningModel_(nullptr),
85 nucleationSiteModel_(nullptr),
86 departureDiamModel_(nullptr),
87 departureFreqModel_(nullptr),
88 nucleatingModel_(nullptr),
89 filmBoilingModel_(nullptr),
90 LeidenfrostModel_(nullptr),
92 CHFSoobModel_(nullptr),
96 liquidTatYplus_(false),
97 regimeTypes_(
p.size(), -1)
99 AbyV_ = this->patch().magSf();
102 const label faceCelli = this->patch().faceCells()[facei];
103 AbyV_[facei] /= iF.
mesh().V()[faceCelli];
108alphatWallBoilingWallFunctionFvPatchScalarField::
109alphatWallBoilingWallFunctionFvPatchScalarField
117 otherPhaseName_(
dict.get<
word>(
"otherPhase")),
118 phaseType_(phaseTypeNames_.get(
"phaseType",
dict)),
121 alphatConv_(
p.size(), 0),
122 dDep_(
p.size(), 1
e-5),
125 partitioningModel_(nullptr),
126 nucleationSiteModel_(nullptr),
127 departureDiamModel_(nullptr),
128 departureFreqModel_(nullptr),
129 nucleatingModel_(nullptr),
130 filmBoilingModel_(nullptr),
131 LeidenfrostModel_(nullptr),
133 CHFSoobModel_(nullptr),
137 liquidTatYplus_(
dict.getOrDefault<
bool>(
"liquidTatYplus", false)),
138 regimeTypes_(
p.size(), -1)
141 if (internalField().
group() == otherPhaseName_)
144 <<
"otherPhase should be the name of the vapor phase that "
145 <<
"corresponds to the liquid base of vice versa" <<
nl
146 <<
"This phase: " << internalField().group() <<
nl
147 <<
"otherPhase: " << otherPhaseName_
185 nucleationSiteModel_ =
191 departureDiamModel_ =
197 departureFreqModel_ =
277 AbyV_ = this->patch().magSf();
280 const label faceCelli = this->patch().faceCells()[facei];
281 AbyV_[facei] /= iF.
mesh().V()[faceCelli];
286alphatWallBoilingWallFunctionFvPatchScalarField::
287alphatWallBoilingWallFunctionFvPatchScalarField
302 otherPhaseName_(psf.otherPhaseName_),
303 phaseType_(psf.phaseType_),
304 relax_(psf.relax_.clone()),
306 alphatConv_(psf.alphatConv_, mapper),
307 dDep_(psf.dDep_, mapper),
308 qq_(psf.qq_, mapper),
310 partitioningModel_(psf.partitioningModel_),
311 nucleationSiteModel_(psf.nucleationSiteModel_),
312 departureDiamModel_(psf.departureDiamModel_),
313 nucleatingModel_(psf.nucleatingModel_),
314 filmBoilingModel_(psf.filmBoilingModel_),
315 LeidenfrostModel_(psf.LeidenfrostModel_),
316 CHFModel_(psf.CHFModel_),
317 CHFSoobModel_(psf.CHFSoobModel_),
318 MHFModel_(psf.MHFModel_),
319 TDNBModel_(psf.TDNBModel_),
321 liquidTatYplus_(psf.liquidTatYplus_),
322 regimeTypes_(psf.regimeTypes_)
326alphatWallBoilingWallFunctionFvPatchScalarField::
327alphatWallBoilingWallFunctionFvPatchScalarField
333 otherPhaseName_(psf.otherPhaseName_),
334 phaseType_(psf.phaseType_),
335 relax_(psf.relax_.clone()),
337 alphatConv_(psf.alphatConv_),
341 partitioningModel_(psf.partitioningModel_),
342 nucleationSiteModel_(psf.nucleationSiteModel_),
343 departureDiamModel_(psf.departureDiamModel_),
344 nucleatingModel_(psf.nucleatingModel_),
345 filmBoilingModel_(psf.filmBoilingModel_),
346 LeidenfrostModel_(psf.LeidenfrostModel_),
347 CHFModel_(psf.CHFModel_),
348 CHFSoobModel_(psf.CHFSoobModel_),
349 MHFModel_(psf.MHFModel_),
350 TDNBModel_(psf.TDNBModel_),
352 liquidTatYplus_(psf.liquidTatYplus_),
353 regimeTypes_(psf.regimeTypes_)
357alphatWallBoilingWallFunctionFvPatchScalarField::
358alphatWallBoilingWallFunctionFvPatchScalarField
365 otherPhaseName_(psf.otherPhaseName_),
366 phaseType_(psf.phaseType_),
367 relax_(psf.relax_.clone()),
369 alphatConv_(psf.alphatConv_),
373 partitioningModel_(psf.partitioningModel_),
374 nucleationSiteModel_(psf.nucleationSiteModel_),
375 departureDiamModel_(psf.departureDiamModel_),
376 nucleatingModel_(psf.nucleatingModel_),
377 filmBoilingModel_(psf.filmBoilingModel_),
378 LeidenfrostModel_(psf.LeidenfrostModel_),
379 CHFModel_(psf.CHFModel_),
380 CHFSoobModel_(psf.CHFSoobModel_),
381 MHFModel_(psf.MHFModel_),
382 TDNBModel_(psf.TDNBModel_),
384 liquidTatYplus_(psf.liquidTatYplus_),
385 regimeTypes_(psf.regimeTypes_)
411 <<
" dmdt requested for invalid phasePair!"
426 <<
" mDotL requested for invalid phasePair!"
441 if (!partitioningModel_)
444 <<
"partitioningModel has not been constructed!"
450 refCast<const phaseSystem>
452 db().lookupObject<phaseSystem>(
"phaseProperties")
455 const auto& satModel =
458 const label patchi = patch().index();
460 const scalar t = this->db().time().timeOutputValue();
461 const scalar
relax = relax_->value(t);
489 partitioningModel_->fLiquid(1-vaporw)
497 this->operator[](i) =
499 (1 - fLiquid[i])*(alphatv[i] + alphaw[i])
500 /
max(vaporw[i], scalar(1
e-8))
508 Info<<
" alphatEffv: " <<
gMin(vaporw*(*
this + alphaw))
509 <<
" - " <<
gMax(vaporw*(*
this + alphaw)) <<
endl;
513 Info<<
" qEffVap: " <<
gMin(qEff) <<
" - "
516 scalar Qeff =
gSum(qEff*patch().magSf());
517 Info<<
" Effective heat transfer rate to vapor:" << Qeff
525 if (!nucleatingModel_)
527 if (!nucleationSiteModel_)
530 <<
"nucleationSiteModel has not been constructed!"
535 if (!departureDiamModel_)
538 <<
"departureDiameterModel has not been constructed!"
543 if (!departureFreqModel_)
546 <<
"departureFrequencyModel has not been constructed!"
559 const auto& turbModel =
568 const auto& vaporTurbModel =
595 turbModel.U().boundaryField()[patchi];
600 turbModel.rho().boundaryField()[patchi];
604 liquid.thermo().T().boundaryField()[patchi];
622 vaporTurbModel.rho().boundaryField()[patchi];
630 satModel.Tsat(
liquid.thermo().p());
637 liquid.thermo().p().boundaryField()[patchi];
640 liquid.thermo().he().boundaryField()[patchi];
644 liquid.thermo().he().member() ==
"e"
645 ?
liquid.thermo().he(pw, Tsatc, patchi)
647 :
liquid.thermo().he(pw, Tsatc, patchi)
653 ? vapor.
thermo().
he(pw, Tsatc, patchi) + pw/rhoVaporw - hwLiqSat
654 : vapor.
thermo().
he(pw, Tsatc, patchi) - hwLiqSat
661 const scalarField fLiquid(partitioningModel_->fLiquid(liquidw));
674 Tl =
max(Tc - 40, Tl);
715 CHFSoobModel_->CHFSubCool
728 Info <<
"CHF Sub Cool factor : " << CHFSubCool <<
endl;
746 Info<<
"Temperature departure from biling : "
769 LeidenfrostModel_->TLeid
781 Info<<
"Leidenfrost Temp : " << TLeiden <<
endl;
786 filmBoilingModel_->htcFilmBoil
798 Info<<
"Htc film boiling : " << htcFilmBoiling <<
endl;
809 wp_*(Tw - tDNB)/(TLeiden - tDNB),
816 Qtb = CHFtotal*(1 -
phi) +
phi*MHF;
825 if (nucleatingModel_)
828 nucleatingModel_->qNucleate
839 dmdtSubCooling *= fLiquid;
846 nucleationSiteModel_->N
858 dDep_ = departureDiamModel_->dDeparture
871 departureFreqModel_->fDeparture
882 rhow*Cpw*(Tsatw - Tl)/(rhoVaporw*
L)
887 fLiquid*4.8*
exp(
min(-Ja/80,
log(VGREAT)))
895 A1 =
max(1 - A2, scalar(1
e-4));
905 (1.0/6.0)*A2E*dDep_*rhoVaporw*fDep*AbyV_
913 (0.8/
max(fDep, SMALL))/(
pi*alphaw/rhow)
921 +
relax*A2*hQ*
max(Tw - Tl, scalar(0))
938 if (Tw[i] > Tsatw[i])
944 regimeTypes_[i] = regimeType::subcool;
955 this->operator[](i) =
961 (qq_[i] +
mDotL_[i]/AbyV_[i])
962 /
max(hewSn[i], scalar(1
e-16))
964 /
max(liquidw[i], scalar(1
e-8)),
971 Info<<
"Sub-cool boiling: " <<
nl
972 <<
" fraction Liq: " << fLiquid[i] <<
nl
974 << (qq_[i] +
mDotL_[i]/AbyV_[i]) <<
nl
975 <<
" delta Tsub: " << (Tw[i] - Tsatw[i])
979 else if (Tw[i] > tDNB[i] && Tw[i] < TLeiden[i])
982 regimeTypes_[i] = regimeType::transient;
985 alphatConv_[i] = 0.0;
991 relax*Qtb[i]*AbyV_[i]/
L[i]
1001 this->operator[](i) =
1006 /
max(hewSn[i], scalar(1
e-16))
1007 )/
max(liquidw[i], scalar(1
e-8)),
1013 Info<<
"Transient boiling: " <<
nl
1014 <<
" fraction Liq: " << fLiquid[i] <<
nl
1015 <<
" Heat flux: " << Qtb[i] <<
nl
1016 <<
" delta Tsub: " << (Tw[i] - Tsatw[i])
1021 else if (Tw[i] > TLeiden[i])
1023 regimeTypes_[i] = regimeType::film;
1026 alphatConv_[i] = 0.0;
1032 relax*htcFilmBoiling[i]
1033 *
max(Tw[i] - Tsatw[i], scalar(0))
1046 mDotL_[i]/AbyV_[i]/
max(hewSn[i], scalar(1
e-16))
1052 this->operator[](i) =
1054 alphaFilm[i]/
max(liquidw[i], scalar(1
e-8))
1060 Info<<
"Film boiling: " <<
nl
1061 <<
" fraction Liq: " << fLiquid[i] <<
nl
1063 << htcFilmBoiling[i]*(Tw[i] - Tsatw[i]) <<
nl
1064 <<
" delta Tsub: " << (Tw[i] - Tsatw[i])
1073 regimeTypes_[i] = regimeType::nonBoiling;
1080 this->operator[](i) =
1084 fLiquid[i]*(alphatConv_[i])
1085 /
max(liquidw[i], scalar(1
e-8)),
1096 fLiquid*liquidw*(*
this + alphaw)*hew.
snGrad()
1101 Info<<
" qEffLiq: " <<
gMin(qEff) <<
" - "
1105 Info<<
" alphatl: " <<
gMin((*
this)) <<
" - "
1111 Info<<
" alphatlEff: " <<
gMin(liquidw*(*
this + alphaw))
1112 <<
" - " <<
gMax(liquidw*(*
this + alphaw)) <<
endl;
1114 scalar Qeff =
gSum(qEff*patch().magSf());
1115 Info<<
" Effective heat transfer rate to liquid: " << Qeff
1128 switch (regimeTypes_[i])
1130 case regimeType::subcool:
1134 case regimeType::transient:
1138 case regimeType::film:
1142 case regimeType::nonBoiling:
1143 nNonBoilings[i] = 1;
1148 scalar nSubCool(
gSum(nSubCools));
1149 scalar nTransient(
gSum(nTransients));
1150 scalar nFilm(
gSum(nFilms));
1151 scalar nNonBoiling(
gSum(nNonBoilings));
1155 Info<<
" sub Cool faces : " << nSubCool <<
endl;
1156 Info<<
" transient faces : " << nTransient <<
endl;
1157 Info<<
" film faces : " << nFilm <<
endl;
1158 Info<<
" non-Boiling faces : " << nNonBoiling <<
endl;
1159 Info<<
" total faces : "
1160 << nSubCool + nTransient + nFilm + nNonBoiling
1165 nNonBoilings*fLiquid*(alphatConv_ + alphaw)
1169 scalar Qc =
gSum(qc*patch().magSf());
1170 Info<<
" Convective heat transfer: " << Qc <<
endl;
1174 relax*fLiquid*nFilms*htcFilmBoiling*(Tw - Tsatw)
1177 scalar QFilm =
gSum(qFilm*patch().magSf());
1178 Info<<
" Film boiling heat transfer: " << QFilm <<
endl;
1180 Info<<
" Htc Film Boiling coeff: "
1181 <<
gMin(nFilms*htcFilmBoiling)
1183 <<
gMax(nFilms*htcFilmBoiling) <<
endl;
1186 gSum(fLiquid*nTransients*Qtb*patch().magSf());
1187 Info<<
" Transient boiling heat transfer:" << Qtbtot
1202 scalar QsubCool =
gSum(qSubCool*patch().magSf());
1204 Info<<
" Sub Cool boiling heat transfer: " << QsubCool
1215 <<
"Unknown phase type. Valid types are: "
1220 fixedValueFvPatchScalarField::updateCoeffs();
1228 os.
writeEntry(
"phaseType", phaseTypeNames_[phaseType_]);
1230 relax_->writeData(
os);
1233 partitioningModel_->write(
os);
1242 if (nucleationSiteModel_)
1245 nucleationSiteModel_->write(
os);
1249 if (departureDiamModel_)
1252 departureDiamModel_->write(
os);
1256 if (departureFreqModel_)
1259 departureFreqModel_->write(
os);
1263 if (nucleatingModel_)
1266 nucleatingModel_->write(
os);
1270 if (filmBoilingModel_)
1273 filmBoilingModel_->write(
os);
1277 if (LeidenfrostModel_)
1280 LeidenfrostModel_->write(
os);
1287 CHFModel_->write(
os);
1294 CHFSoobModel_->write(
os);
1301 MHFModel_->write(
os);
1308 TDNBModel_->write(
os);
1326 writeEntry(
"value",
os);
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const Mesh & mesh() const
Return mesh.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
const Boundary & boundaryField() const
Return const-reference to the boundary field.
static word member(const word &name)
Return member (name without the extension)
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual Ostream & endBlock()
Write end block group.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
void size(const label n)
Older name for setAddressableSize.
virtual volScalarField & he()=0
Enthalpy/Internal energy [J/kg].
virtual const volScalarField & alpha() const
Thermal diffusivity for enthalpy of mixture [kg/m/s].
This boundary condition provides a thermal wall function for turbulent thermal diffusivity (usuallyal...
scalar kappa_
Von Karman constant.
tmp< scalarField > calcAlphat(const scalarField &prevAlphat) const
Update turbulent thermal diffusivity.
tmp< scalarField > yPlusTherm(const scalarField &P, const scalarField &Prat) const
Calculate y+ at the edge of the thermal laminar sublayer.
tmp< scalarField > Psmooth(const scalarField &Prat) const
'P' function
scalar Cmu_
Empirical model coefficient.
scalar E_
Wall roughness parameter.
scalar Prt_
Turbulent Prandtl number.
scalarField dmdt_
Rate of phase-change.
scalarField mDotL_
Latent heat of the phase-change.
virtual const scalarField & mDotL() const
Return the enthalpy source due to phase-change.
A thermal wall function for simulation of boiling wall.
virtual const scalarField & dmdt() const
Return the rate of phase-change.
tmp< scalarField > qe() const
Return the evaporation surface heat flux [W/m2].
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual bool activePhasePair(const phasePairKey &) const
Is there phase change mass transfer for this phasePair.
const scalarField & qq() const
Return the quenching surface heat flux [W/m2].
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
Find and return a sub-dictionary pointer if present.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
virtual bool write()
Write the output fields.
A FieldMapper for finite-volume patch fields.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Generic thermophysical properties class for a liquid in which the functions and coefficients for each...
scalar Cp(scalar p, scalar T) const
Liquid heat capacity [J/(kg K)].
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
const word & name() const
virtual const rhoThermo & thermo() const =0
Return the thermophysical model.
An ordered or unorder pair of phase names. Typically specified as follows.
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Class to represent a system of phases and model interfacial transfers between them.
static const word propertiesName
Default name of the phase properties dictionary.
const phaseModelList & phases() const
Return the phase models.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
const tmp< volScalarField > & tCp
const volScalarField & Cp
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
constexpr scalar pi(M_PI)
constexpr const char *const group
Group name for mathematical constants.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Type gSum(const FieldField< Field, Type > &f)
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar log(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0)
Type gMin(const FieldField< Field, Type > &f)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Type gMax(const FieldField< Field, Type > &f)
dimensionedScalar pow025(const dimensionedScalar &ds)
constexpr char nl
The newline '\n' character (0x0a)
dimensionedScalar Pr("Pr", dimless, laminarTransport)
#define forAll(list, i)
Loop across all elements in list.
const vector L(dict.get< vector >("L"))
const Vector< label > N(dict.get< Vector< label > >("N"))