33template<
class CloudType>
42 const scalar Yliq = massliq/(massliq + masssol);
43 const scalar Ysol = 1 - Yliq;
44 Xliq = Yliq/liquids_.properties()[liqToLiqMap_].W();
45 Xsol = Ysol/this->owner().thermo().solids().properties()[solToSolMap_].W();
46 Xliq /= (Xliq + Xsol);
51template<
class CloudType>
62 this->owner().thermo().carrier().Y()[i][celli]
63 /this->owner().thermo().carrier().W(i);
70template<
class CloudType>
81template<
class CloudType>
93 <<
"Activity coefficient UNIFAC is not implemented " <<
nl
99 const scalar ic = this->coeffDict().getScalar(
"ic");
100 return inv((1 + ic*Xsol/(Xliq + ROOTVSMALL)));
110template<
class CloudType>
119 gamma_(this->coeffDict().getScalar(
"gamma")),
120 alpha_(this->coeffDict().getScalar(
"alpham")),
121 liquids_(owner.
thermo().liquids()),
122 solution_(this->coeffDict().
lookup(
"solution")),
123 liqToCarrierMap_(-1),
130 <<
"Solution is not well defined. It should be (liquid solid)"
135 Info<<
"Participating liquid-solid species:" <<
endl;
142 const label idLiquid =
owner.composition().idLiquid();
147 const label idSolid =
owner.composition().idSolid();
152 const word activityCoefficienType
154 this->
coeffDict().getWord(
"activityCoefficient")
157 if (activityCoefficienType ==
"Hoff")
161 else if (activityCoefficienType ==
"UNIFAC")
168 <<
"activityCoefficient must be either 'Hoff' or 'UNIFAC'"
175template<
class CloudType>
182 method_(pcm.method_),
185 liquids_(pcm.owner().
thermo().liquids()),
186 solution_(pcm.solution_),
187 liqToCarrierMap_(pcm.liqToCarrierMap_),
188 liqToLiqMap_(pcm.liqToLiqMap_),
189 solToSolMap_(pcm.solToSolMap_)
195template<
class CloudType>
215 const scalar
rhog = this->owner().thermo().thermo().rho()()[celli];
217 const label gid = liqToCarrierMap_;
218 const label lid = liqToLiqMap_;
219 const label sid = solToSolMap_;
221 const scalar W = liquids_.properties()[lid].W();
223 const scalar YeInf = this->owner().thermo().carrier().Y()[gid][celli];
225 const scalar sigma = liquids_.properties()[lid].sigma(pc, Ts);
228 const scalar Ke =
exp(4*sigma*W/(RR*
rho*d*
T));
231 const scalar Dab = liquids_.properties()[lid].D(pc, Ts);
234 const scalar pSat = liquids_.properties()[lid].pv(pc,
T);
236 scalar Xliq(0), Xsol(0);
237 calcXcSolution(liqMass[lid], solMass[sid], Xliq, Xsol);
240 const scalar
gamma = activityCoeff(Xliq, Xsol);
243 const scalar Rliq = RR/W;
246 const scalar Kn = 2*gamma_/d;
248 (1+Kn)/(1+ (4/(3*alpha_) + 0.377)*Kn +
sqr(Kn)*4/(3*alpha_));
251 const scalar Sc =
nu/(Dab + ROOTVSMALL);
254 const scalar Sherwood = Sh(
Re, Sc);
257 const scalar Ni = (
rhog*Sherwood*Dab*Cm/d)*
log((1 - YeInf)/(1 - YeSurf));
261 dMassPC[lid] += Ni*As*dt;
265template<
class CloudType>
277 switch (parent::enthalpyTransfer_)
279 case (parent::etLatentHeat):
284 case (parent::etEnthalpyDifference):
286 scalar hc = this->owner().composition().carrier().Ha(idc,
p,
T);
287 scalar hp = liquids_.properties()[idl].h(
p,
T);
303template<
class CloudType>
313template<
class CloudType>
323 return liquids_.pvInvert(
p, X);
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
Liquid evaporation/condensation model for solution of liquid and solid.
label liqToCarrierMap_
Mapping between liquid and carrier species.
List< word > solution_
List of active liquid names i.e (liquidName solidName)
virtual scalar dh(const label idc, const label idl, const scalar p, const scalar T) const
Return the enthalpy per unit mass.
scalar activityCoeff(const scalar Xliq, const scalar Ysol) const
Return activity coefficient.
activityCoeffMethodType method_
Method used.
label solToSolMap_
Mapping between local and global solid species.
virtual scalar Tvap(const scalarField &X) const
Return vapourisation temperature.
tmp< scalarField > calcXc(const label celli) const
Calculate the carrier phase component volume fractions at celli.
void calcXcSolution(const scalar massliq, const scalar masssol, scalar &Xliq, scalar &Xsol) const
Calculate volumetric fractions of components in the solution.
label liqToLiqMap_
Mapping between local and global liquid species.
Templated phase change model class.
scalar Sh() const
Sherwood number.
scalar TMax() const
Return const access to maximum temperature [K].
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Lookup type of boundary radiation properties.
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
const dictionary & properties() const
Return const access to the properties dictionary.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
PtrList< volScalarField > & Y
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr scalar pi(M_PI)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedScalar exp(const dimensionedScalar &ds)
scalarField Re(const UList< complex > &cf)
Extract real component.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
messageStream Info
Information stream (stdout output on master, null elsewhere)
dimensionedScalar log(const dimensionedScalar &ds)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
dimensionedScalar cbrt(const dimensionedScalar &ds)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
dimensionedScalar rhog("rhog", dimDensity, transportProperties)
dimensionedScalar Pr("Pr", dimless, laminarTransport)
#define forAll(list, i)
Loop across all elements in list.