34 template<
class CloudType>
40 scalarField Xc(this->owner().composition().carrier().
Y().size());
45 this->owner().composition().carrier().Y()[i][celli]
46 /this->owner().composition().carrier().WiValue(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)
82 <<
"Evaporation model selected, but no active liquids defined"
87 Info<<
"Participating liquid species:" <<
endl;
98 const label idLiquid =
owner.composition().idLiquid();
108 template<
class CloudType>
115 liquids_(pcm.owner().
thermo().liquids()),
116 activeLiquids_(pcm.activeLiquids_),
117 liqToCarrierMap_(pcm.liqToCarrierMap_),
118 liqToLiqMap_(pcm.liqToLiqMap_)
124 template<
class CloudType>
131 template<
class CloudType>
135 const typename CloudType::parcelType::trackingData& td,
150 if ((liquids_.Tc(X) -
T) < small)
155 <<
"Parcel reached critical conditions: "
156 <<
"evaporating all available mass" <<
endl;
161 const label lid = liqToLiqMap_[i];
162 dMassPC[lid] = great;
169 scalar ps = liquids_.pv(pc, Ts, X);
172 scalar rhos = ps*liquids_.W(X)/(
RR*Ts);
182 forAll(this->owner().composition().carrier().
Y(), i)
184 scalar Yc = this->owner().composition().carrier().Y()[i][
p.cell()];
185 hc += Yc*this->owner().composition().carrier().hai(i, pc, Tc);
186 hsc += Yc*this->owner().composition().carrier().hai(i, ps, Ts);
187 Cpc += Yc*this->owner().composition().carrier().Cpi(i, ps, Ts);
188 kappac += Yc*this->owner().composition().carrier().kappai(i, ps, Ts);
194 const label gid = liqToCarrierMap_[i];
195 const label lid = liqToLiqMap_[i];
198 const scalar TBoil = liquids_.properties()[lid].pvInvert(pc);
201 const scalar Td =
min(
T, 0.999*TBoil);
204 const scalar pSat = liquids_.properties()[lid].pv(pc, Td);
207 const scalar Xc = XcMix[gid];
217 const scalar Dab = liquids_.properties()[lid].D(ps, Ts);
220 const scalar Sc = nu/(Dab + rootVSmall);
223 const scalar Sh = this->Sh(
Re, Sc);
230 const scalar deltaT =
max(
T - TBoil, 0.5);
233 const scalar hv = liquids_.properties()[lid].hl(pc, Td);
239 alphaS = 760.0*
pow(deltaT, 0.26);
241 else if (deltaT < 25.0)
243 alphaS = 27.0*
pow(deltaT, 2.33);
247 alphaS = 13800.0*
pow(deltaT, 0.39);
251 const scalar Gf = alphaS*deltaT*
pi*
sqr(d)/hv;
255 const scalar
A = (hc - hsc)/hv;
256 const scalar
B =
pi*kappac/Cpc*d*Sh;
265 for (
label i=0; i<50; i++)
269 G =
B/(1.0 + Gr)*
log(1.0 +
A*(1.0 + Gr));
272 if (
mag(Gr - GrDash)/GrDash < 1
e-3)
279 dMassPC[lid] += (
G + Gf)*dt;
286 const scalar Xs = X[lid]*pSat/pc;
289 const scalar
Xr = (Xs - Xc)/
max(small, 1.0 - Xs);
294 dMassPC[lid] +=
pi*d*Sh*Dab*rhos*
log(1.0 +
Xr)*dt;
302 template<
class CloudType>
314 if (liquids_.properties()[idl].pv(
p,
T) >= 0.999*
p)
316 TDash = liquids_.properties()[idl].pvInvert(
p);
320 switch (parent::enthalpyTransfer_)
322 case (parent::etLatentHeat):
327 case (parent::etEnthalpyDifference):
330 this->owner().composition().carrier().hai(idc,
p, TDash);
331 scalar hp = liquids_.properties()[idl].ha(
p, TDash);
347 template<
class CloudType>
353 return liquids_.Tpt(X);
357 template<
class CloudType>
364 return liquids_.pvInvert(
p, X);
static const Foam::dimensionedScalar A("A", Foam::dimPressure, 611.21)
static const Foam::dimensionedScalar B("B", Foam::dimless, 18.678)
#define forAll(list, i)
Loop across all elements in list.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Liquid evaporation model.
List< word > activeLiquids_
List of active liquid names.
LiquidEvaporationBoil(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
virtual ~LiquidEvaporationBoil()
Destructor.
virtual scalar dh(const label idc, const label idl, const scalar p, const scalar T) const
Return the enthalpy per unit mass.
List< label > liqToLiqMap_
Mapping between local and global liquid species.
List< label > liqToCarrierMap_
Mapping between liquid and carrier species.
virtual scalar Tvap(const scalarField &X) const
Return vapourisation temperature.
virtual void calculate(const typename CloudType::parcelType &p, const typename CloudType::parcelType::trackingData &td, const scalar dt, 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.
tmp< scalarField > calcXc(const label celli) const
Calculate the carrier phase component volume fractions at celli.
virtual scalar TMax(const scalar p, const scalarField &X) const
Return maximum/limiting temperature.
void size(const label)
Override size to be inconsistent with allocated storage.
Templated phase change model class.
scalar Sh() const
Sherwood number.
A list of keyword definitions, which are a keyword followed by any number of values (e....
const dictionary & properties() const
Return const access to the properties dictionary.
A class for managing temporary objects.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionedScalar RR
Universal gas constant: default SI units: [J/kmol/K].
const dimensionedScalar G
Newtonian constant of gravitation.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
spatialTransform Xr(const vector &a, const scalar omega)
Rotational spatial transformation tensor about axis a by omega radians.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
errorManip< error > abort(error &err)
dimensionedScalar log(const dimensionedScalar &ds)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar cbrt(const dimensionedScalar &ds)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
scalarField Re(const UList< complex > &cf)
PtrList< volScalarField > & Y
fluidMulticomponentThermo & thermo