Go to the documentation of this file.
31 template<
class CloudType>
34 template<
class CloudType>
40 template<
class CloudType>
57 O2GlobalId_(owner.composition().carrierId(
"O2")),
58 CO2GlobalId_(owner.composition().carrierId(
"CO2")),
64 label idSolid = owner.composition().idSolid();
65 CsLocalId_ = owner.composition().localId(idSolid,
"C");
68 WO2_ = owner.thermo().carrier().W(O2GlobalId_);
69 const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_);
72 HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_);
74 const scalar YCloc = owner.composition().Y0(idSolid)[CsLocalId_];
75 const scalar YSolidTot = owner.composition().YMixture0()[idSolid];
76 Info<<
" C(s): particle mass fraction = " << YCloc*YSolidTot <<
endl;
80 template<
class CloudType>
106 template<
class CloudType>
113 template<
class CloudType>
136 const label idSolid = CloudType::parcelType::SLD;
137 const scalar fComb = YMixture[idSolid]*YSolid[CsLocalId_];
148 const scalar rhoO2 = rhoc*
thermo.carrier().Y(O2GlobalId_)[cellI];
160 const scalar D = D0_*(rho0_/rhoc)*
pow(Tc/T0_, Dn_);
163 const scalar ppO2 = rhoO2/WO2_*
RR*Tc;
166 const scalar
C = pc/(
RR*Tc);
170 Pout<<
"mass = " << mass <<
nl
171 <<
"fComb = " << fComb <<
nl
172 <<
"Ap = " << Ap <<
nl
173 <<
"dt = " << dt <<
nl
182 const scalar qCsLim = mass*fComb/(WC_*Ap*dt);
186 Pout<<
"qCsLim = " << qCsLim <<
endl;
190 while ((
mag(qCs - qCsOld)/qCs > tolerance_) && (iter <= maxIters_))
193 const scalar PO2Surface = ppO2*
exp(-(qCs +
N)*d/(2*
C*D));
194 qCs = A_*
exp(-E_/(
RR*
T))*
pow(PO2Surface, n_);
195 qCs = (100.0*qCs + iter*qCsOld)/(100.0 + iter);
196 qCs =
min(qCs, qCsLim);
200 Pout<<
"iter = " << iter
201 <<
", qCsOld = " << qCsOld
209 if (iter > maxIters_)
212 <<
"iter limit reached (" << maxIters_ <<
")" <<
nl <<
endl;
216 scalar dOmega = qCs*Ap*dt;
219 dMassSRCarrier[O2GlobalId_] += -dOmega*WO2_;
220 dMassSRCarrier[CO2GlobalId_] += dOmega*(WC_ + WO2_);
223 dMassSolid[CsLocalId_] += dOmega*WC_;
225 const scalar HsC =
thermo.solids().properties()[CsLocalId_].Hs(
T);
230 return dOmega*(WC_*HsC - (WC_ + WO2_)*HcCO2_);
const scalar RR
Universal gas constant (default in [J/(kmol K)])
label CsLocalId_
Cs positions in global/local lists.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
const scalar WVol_
Effective molecular weight of gaseous volatiles.
const scalar E_
Kinetic rate activation energy.
scalar WC_
Molecular weight of C [kg/kmol].
const scalar T0_
Reference temperature for reference diffusion constant.
scalar HcCO2_
Formation enthalpy for CO2 [J/kg].
const scalar D0_
Reference diffusion constant.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar exp(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
const scalar rho0_
Reference density for reference diffusion constant.
virtual scalar calculate(const scalar dt, const label cellI, const scalar d, const scalar T, const scalar Tc, const scalar pc, const scalar rhoc, const scalar mass, const scalarField &YGas, const scalarField &YLiquid, const scalarField &YSolid, const scalarField &YMixture, const scalar N, scalarField &dMassGas, scalarField &dMassLiquid, scalarField &dMassSolid, scalarField &dMassSRCarrier) const
Update surface reactions.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
virtual ~COxidationMurphyShaddix()
Destructor.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
label CO2GlobalId_
CO2 positions in global list.
Templated base class for dsmc cloud.
label O2GlobalId_
O2 position in global list.
A list of keyword definitions, which are a keyword followed by any number of values (e....
const scalar n_
Reaction order.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
COxidationMurphyShaddix(const dictionary &dict, CloudType &owner)
Construct from dictionary.
prefixOSstream Pout(cout, "Pout")
const dimensionedScalar e
Elementary charge.
scalar WO2_
Molecular weight of O2 [kg/kmol].
Limited to C(s) + O2 -> CO2.
Graphite solid properties.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
#define WarningInFunction
Report a warning using Foam::Warning.
const scalar A_
Kinetic rate coefficient.
const scalar Dn_
Exponent for diffusion equation.
stressControl lookup("compactNormalStress") >> compactNormalStress