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 LiquidEvaporation<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;
179 const label gid = liqToCarrierMap_[i];
180 const label lid = liqToLiqMap_[i];
183 const scalar Dab = liquids_.properties()[lid].D(pc, Ts);
191 const scalar pSat = liquids_.properties()[lid].pv(pc,
T);
194 const scalar Sc =
nu/(Dab + ROOTVSMALL);
197 const scalar Sh = this->Sh(
Re, Sc);
200 const scalar kc = Sh*Dab/(d + ROOTVSMALL);
203 const scalar
Cs = pSat/(
RR*Ts);
206 const scalar Cinf = Xc[gid]*pc/(
RR*Ts);
209 const scalar Ni =
max(kc*(
Cs - Cinf), 0.0);
212 dMassPC[lid] += Ni*
pi*
sqr(d)*liquids_.properties()[lid].W()*dt;
217 template<
class CloudType>
228 typedef PhaseChangeModel<CloudType> parent;
229 switch (parent::enthalpyTransfer_)
231 case (parent::etLatentHeat):
233 dh = liquids_.properties()[idl].hl(
p,
T);
236 case (parent::etEnthalpyDifference):
238 scalar hc = this->owner().composition().carrier().Ha(idc,
p,
T);
239 scalar hp = liquids_.properties()[idl].h(
p,
T);
255 template<
class CloudType>
261 return liquids_.Tpt(X);
265 template<
class CloudType>
272 return liquids_.pvInvert(
p, X);
dimensionedScalar Pr("Pr", dimless, laminarTransport)
void size(const label n)
Older name for setAddressableSize.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
DSMCCloud< dsmcParcel > CloudType
Templated phase change model class.
List< word > activeLiquids_
List of active liquid names.
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...
virtual scalar TMax(const scalar p, const scalarField &X) const
Return maximum/limiting temperature.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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.
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)
virtual scalar Tvap(const scalarField &X) const
Return vapourisation temperature.
dimensionedScalar sqrt(const dimensionedScalar &ds)
List< label > liqToCarrierMap_
Mapping between liquid and carrier species.
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< label > liqToLiqMap_
Mapping between local and global liquid species.
Lookup type of boundary radiation properties.
const CloudType & owner() const
Return const access to the owner cloud.
#define forAll(list, i)
Loop across all elements in list.
psiReactionThermo & thermo
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar cbrt(const dimensionedScalar &ds)
virtual scalar dh(const label idc, const label idl, const scalar p, const scalar T) const
Return the enthalpy per unit mass.
constexpr scalar pi(M_PI)
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.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
virtual ~LiquidEvaporation()
Destructor.
scalarField Re(const UList< complex > &cmplx)
Extract real component.
LiquidEvaporation(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
#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.
Templated base class for dsmc cloud.
scalar Sh() const
Sherwood number.
tmp< scalarField > calcXc(const label celli) const
Calculate the carrier phase component volume fractions at celli.