37 template<
class CloudType>
48 this->owner().thermo().carrier().Y()[i][celli]
49 /this->owner().thermo().carrier().W(i);
56 template<
class CloudType>
69 template<
class CloudType>
77 liquids_(owner.
thermo().liquids()),
78 activeLiquids_(this->coeffDict().
lookup(
"activeLiquids")),
79 liqToCarrierMap_(activeLiquids_.size(), -1),
80 liqToLiqMap_(activeLiquids_.size(), -1)
85 <<
"Evaporation model selected, but no active liquids defined" 90 Info<<
"Participating liquid species:" <<
endl;
101 const label idLiquid =
owner.composition().idLiquid();
111 template<
class CloudType>
114 const LiquidEvaporationBoil<CloudType>& pcm
118 liquids_(pcm.owner().
thermo().liquids()),
119 activeLiquids_(pcm.activeLiquids_),
120 liqToCarrierMap_(pcm.liqToCarrierMap_),
121 liqToLiqMap_(pcm.liqToLiqMap_)
127 template<
class CloudType>
134 template<
class CloudType>
155 if ((liquids_.Tc(X) -
T) < SMALL)
160 <<
"Parcel reached critical conditions: " 161 <<
"evaporating all available mass" <<
endl;
166 const label lid = liqToLiqMap_[i];
167 dMassPC[lid] = GREAT;
174 scalar ps = liquids_.pv(pc, Ts, X);
177 scalar rhos = ps*liquids_.W(X)/(
RR*Ts);
189 scalar Yc = this->owner().thermo().carrier().Y()[i][celli];
190 Hc += Yc*this->owner().thermo().carrier().Ha(i, pc, Tc);
191 Hsc += Yc*this->owner().thermo().carrier().Ha(i, ps, Ts);
192 Cpc += Yc*this->owner().thermo().carrier().Cp(i, ps, Ts);
193 kappac += Yc*this->owner().thermo().carrier().kappa(i, ps, Ts);
199 const label gid = liqToCarrierMap_[i];
200 const label lid = liqToLiqMap_[i];
203 const scalar TBoil = liquids_.properties()[lid].pvInvert(pc);
206 const scalar Td =
min(
T, 0.999*TBoil);
209 const scalar pSat = liquids_.properties()[lid].pv(pc, Td);
212 const scalar Xc = XcMix[gid];
222 const scalar Dab = liquids_.properties()[lid].D(ps, Ts);
225 const scalar Sc =
nu/(Dab + ROOTVSMALL);
228 const scalar Sh = this->Sh(
Re, Sc);
235 const scalar deltaT =
max(
T - TBoil, 0.5);
238 const scalar hv = liquids_.properties()[lid].hl(pc, Td);
244 alphaS = 760.0*
pow(deltaT, 0.26);
246 else if (deltaT < 25.0)
248 alphaS = 27.0*
pow(deltaT, 2.33);
252 alphaS = 13800.0*
pow(deltaT, 0.39);
256 const scalar Gf = alphaS*deltaT*
pi*
sqr(d)/hv;
260 const scalar
A = (Hc - Hsc)/hv;
261 const scalar
B =
pi*kappac/Cpc*d*Sh;
270 for (label i=0; i<50; i++)
274 G =
B/(1.0 + Gr)*
log(1.0 +
A*(1.0 + Gr));
277 if (
mag(Gr - GrDash)/GrDash < 1
e-3)
284 dMassPC[lid] += (
G + Gf)*dt;
291 const scalar Xs = X[lid]*pSat/pc;
294 const scalar
Xr = (Xs - Xc)/
max(SMALL, 1.0 - Xs);
299 dMassPC[lid] +=
pi*d*Sh*Dab*rhos*
log(1.0 +
Xr)*dt;
307 template<
class CloudType>
319 if (liquids_.properties()[idl].pv(
p,
T) >= 0.999*
p)
321 TDash = liquids_.properties()[idl].pvInvert(
p);
324 typedef PhaseChangeModel<CloudType> parent;
325 switch (parent::enthalpyTransfer_)
327 case (parent::etLatentHeat):
329 dh = liquids_.properties()[idl].hl(
p, TDash);
332 case (parent::etEnthalpyDifference):
334 scalar hc = this->owner().composition().carrier().Ha(idc,
p, TDash);
335 scalar hp = liquids_.properties()[idl].h(
p, TDash);
351 template<
class CloudType>
357 return liquids_.Tpt(X);
361 template<
class CloudType>
368 return liquids_.pvInvert(
p, X);
dimensionedScalar Pr("Pr", dimless, laminarTransport)
tmp< scalarField > calcXc(const label celli) const
Calculate the carrier phase component volume fractions at celli.
void size(const label n)
Older name for setAddressableSize.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
List< word > activeLiquids_
List of active liquid names.
DSMCCloud< dsmcParcel > CloudType
Templated phase change model class.
dimensionedScalar log(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const dimensionedScalar G
Newtonian constant of gravitation.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
constexpr char nl
The newline '\n' character (0x0a)
List< label > liqToCarrierMap_
Mapping between liquid and carrier species.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Lookup type of boundary radiation properties.
virtual scalar Tvap(const scalarField &X) const
Return vapourisation temperature.
List< label > liqToLiqMap_
Mapping between local and global liquid species.
const CloudType & owner() const
Return const access to the owner cloud.
#define forAll(list, i)
Loop across all elements in list.
psiReactionThermo & thermo
virtual scalar dh(const label idc, const label idl, const scalar p, const scalar T) const
Return the enthalpy per unit mass.
const dimensionedScalar e
Elementary charge.
LiquidEvaporationBoil(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar cbrt(const dimensionedScalar &ds)
spatialTransform Xr(const vector &a, const scalar omega)
Rotational spatial transformation tensor about axis a by omega radians.
constexpr scalar pi(M_PI)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManip< error > abort(error &err)
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
int debug
Static debugging option.
virtual void calculate(const scalar dt, const label celli, const scalar Re, const scalar Pr, const scalar d, const scalar nu, const scalar rho, const scalar T, const scalar Ts, const scalar pc, const scalar Tc, const scalarField &X, const scalarField &solMass, const scalarField &liqMass, scalarField &dMassPC) const
Update model.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
scalarField Re(const UList< complex > &cmplx)
Extract real component.
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.
PtrList< volScalarField > & Y
messageStream Info
Information stream (stdout output on master, null elsewhere)
const scalar RR
Universal gas constant: default in [J/(kmol K)].
A class for managing temporary objects.
static const Foam::dimensionedScalar A("", Foam::dimPressure, 611.21)
Templated base class for dsmc cloud.
static const Foam::dimensionedScalar B("", Foam::dimless, 18.678)
virtual ~LiquidEvaporationBoil()
Destructor.
scalar Sh() const
Sherwood number.