34 template<
class CloudType>
45 this->owner().composition().carrier().Y()[i][celli]
46 /this->owner().composition().carrier().Wi(i);
53 template<
class CloudType>
66 template<
class CloudType>
74 liquids_(owner.thermo().liquids()),
75 activeLiquids_(this->coeffDict().lookup(
"activeLiquids")),
76 liqToCarrierMap_(activeLiquids_.size(), -1),
77 liqToLiqMap_(activeLiquids_.size(), -1)
79 if (activeLiquids_.size() == 0)
82 <<
"Evaporation model selected, but no active liquids defined" 87 Info<<
"Participating liquid species:" <<
endl;
92 Info<<
" " << activeLiquids_[i] <<
endl;
94 owner.composition().carrierId(activeLiquids_[i]);
98 const label idLiquid = owner.composition().idLiquid();
102 owner.composition().localId(idLiquid, activeLiquids_[i]);
108 template<
class CloudType>
115 liquids_(pcm.
owner().thermo().liquids()),
124 template<
class CloudType>
131 template<
class CloudType>
149 if ((liquids_.Tc(X) -
T) < small)
154 <<
"Parcel reached critical conditions: " 155 <<
"evaporating all available mass" <<
endl;
160 const label lid = liqToLiqMap_[i];
161 dMassPC[lid] = great;
168 scalar ps = liquids_.pv(pc, Ts, X);
171 scalar rhos = ps*liquids_.W(X)/(
RR*Ts);
183 scalar Yc = this->owner().composition().carrier().Y()[i][celli];
184 Hc += Yc*this->owner().composition().carrier().Ha(i, pc, Tc);
185 Hsc += Yc*this->owner().composition().carrier().Ha(i, ps, Ts);
186 Cpc += Yc*this->owner().composition().carrier().Cp(i, ps, Ts);
187 kappac += Yc*this->owner().composition().carrier().kappa(i, ps, Ts);
193 const label gid = liqToCarrierMap_[i];
194 const label lid = liqToLiqMap_[i];
197 const scalar TBoil = liquids_.properties()[lid].pvInvert(pc);
200 const scalar Td =
min(T, 0.999*TBoil);
203 const scalar pSat = liquids_.properties()[lid].pv(pc, Td);
206 const scalar Xc = XcMix[gid];
216 const scalar Dab = liquids_.properties()[lid].D(ps, Ts);
219 const scalar Sc = nu/(Dab + rootVSmall);
222 const scalar Sh = this->Sh(Re, Sc);
229 const scalar deltaT =
max(T - TBoil, 0.5);
232 const scalar hv = liquids_.properties()[lid].hl(pc, Td);
238 alphaS = 760.0*
pow(deltaT, 0.26);
240 else if (deltaT < 25.0)
242 alphaS = 27.0*
pow(deltaT, 2.33);
246 alphaS = 13800.0*
pow(deltaT, 0.39);
250 const scalar Gf = alphaS*deltaT*
pi*
sqr(d)/hv;
254 const scalar A = (Hc - Hsc)/hv;
255 const scalar B =
pi*kappac/Cpc*d*Sh;
264 for (
label i=0; i<50; i++)
268 G = B/(1.0 + Gr)*
log(1.0 + A*(1.0 + Gr));
271 if (
mag(Gr - GrDash)/GrDash < 1
e-3)
278 dMassPC[lid] += (G + Gf)*dt;
285 const scalar Xs = X[lid]*pSat/pc;
288 const scalar
Xr = (Xs - Xc)/
max(small, 1.0 - Xs);
293 dMassPC[lid] +=
pi*d*Sh*Dab*rhos*
log(1.0 + Xr)*dt;
301 template<
class CloudType>
313 if (liquids_.properties()[idl].pv(p, T) >= 0.999*
p)
315 TDash = liquids_.properties()[idl].pvInvert(p);
319 switch (parent::enthalpyTransfer_)
321 case (parent::etLatentHeat):
326 case (parent::etEnthalpyDifference):
328 scalar hc = this->owner().composition().carrier().Ha(idc, p, TDash);
329 scalar hp = liquids_.
properties()[idl].Ha(p, TDash);
345 template<
class CloudType>
351 return liquids_.Tpt(X);
355 template<
class CloudType>
362 return liquids_.pvInvert(p, X);
const dictionary & properties() const
Return const access to the properties dictionary.
tmp< scalarField > calcXc(const label celli) const
Calculate the carrier phase component volume fractions at celli.
#define forAll(list, i)
Loop across all elements in list.
List< word > activeLiquids_
List of active liquid names.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Templated phase change model class.
dimensionedScalar log(const dimensionedScalar &ds)
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.
basicSpecieMixture & composition
dimensionedSymmTensor sqr(const dimensionedVector &dv)
List< label > liqToCarrierMap_
Mapping between liquid and carrier species.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionedScalar G
Newtonian constant of gravitation.
virtual scalar Tvap(const scalarField &X) const
Return vapourisation temperature.
List< label > liqToLiqMap_
Mapping between local and global liquid species.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
const CloudType & owner() const
Return const access to the owner cloud.
const dimensionedScalar RR
Universal gas constant: default SI units: [J/kmol/K].
virtual scalar dh(const label idc, const label idl, const scalar p, const scalar T) const
Return the enthalpy per unit mass.
LiquidEvaporationBoil(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
Liquid evaporation model.
dimensionedScalar cbrt(const dimensionedScalar &ds)
spatialTransform Xr(const vector &a, const scalar omega)
Rotational spatial transformation tensor about axis a by omega radians.
errorManip< error > abort(error &err)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
virtual scalar TMax(const scalar p, const scalarField &X) const
Return maximum/limiting temperature.
#define WarningInFunction
Report a warning using Foam::Warning.
virtual void calculate(const scalar dt, const label celli, const scalar Re, const scalar Pr, const scalar d, const scalar nu, const scalar T, const scalar Ts, const scalar pc, const scalar Tc, const scalarField &X, scalarField &dMassPC) const
Update model.
PtrList< volScalarField > & Y
dimensioned< scalar > mag(const dimensioned< Type > &)
A class for managing temporary objects.
Templated base class for dsmc cloud.
virtual ~LiquidEvaporationBoil()
Destructor.
scalar Sh() const
Sherwood number.