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>
95 CsLocalId_(srm.CsLocalId_),
96 O2GlobalId_(srm.O2GlobalId_),
97 CO2GlobalId_(srm.CO2GlobalId_),
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_;
230 return dOmega*(WC_*HsC - (WC_ + WO2_)*HcCO2_);
Graphite solid properties.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const PtrList< solidProperties > & properties() const
Return the solidProperties properties.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
rhoReactionThermo & thermo
const solidMixtureProperties & solids() const
Return reference to the global (additional) solids.
PtrList< volScalarField > & Y()
Return the mass-fraction fields.
Limited to C(s) + O2 -> CO2.
stressControl lookup("compactNormalStress") >> compactNormalStress
const dimensionedScalar e
Elementary charge.
dimensionedScalar exp(const dimensionedScalar &ds)
COxidationMurphyShaddix(const dictionary &dict, CloudType &owner)
Construct from dictionary.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package, and provides:
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
#define WarningInFunction
Report a warning using Foam::Warning.
prefixOSstream Pout(cout, "Pout")
dimensioned< scalar > mag(const dimensioned< Type > &)
const scalar RR
Universal gas constant (default in [J/(kmol K)])
virtual ~COxidationMurphyShaddix()
Destructor.
Templated surface reaction model class.
Templated base class for dsmc cloud.
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.