34template<
class CloudType>
37template<
class CloudType>
43template<
class CloudType>
51 D0_(this->coeffDict().getScalar(
"D0")),
52 rho0_(this->coeffDict().getScalar(
"rho0")),
53 T0_(this->coeffDict().getScalar(
"T0")),
54 Dn_(this->coeffDict().getScalar(
"Dn")),
55 A_(this->coeffDict().getScalar(
"A")),
56 E_(this->coeffDict().getScalar(
"E")),
57 n_(this->coeffDict().getScalar(
"n")),
58 WVol_(this->coeffDict().getScalar(
"WVol")),
67 label idSolid =
owner.composition().idSolid();
68 CsLocalId_ =
owner.composition().localId(idSolid,
"C");
71 WO2_ =
owner.thermo().carrier().W(O2GlobalId_);
72 const scalar WCO2 =
owner.thermo().carrier().W(CO2GlobalId_);
75 HcCO2_ =
owner.thermo().carrier().Hc(CO2GlobalId_);
77 const scalar YCloc =
owner.composition().Y0(idSolid)[CsLocalId_];
78 const scalar YSolidTot =
owner.composition().YMixture0()[idSolid];
79 Info<<
" C(s): particle mass fraction = " << YCloc*YSolidTot <<
endl;
83template<
class CloudType>
98 CsLocalId_(srm.CsLocalId_),
99 O2GlobalId_(srm.O2GlobalId_),
100 CO2GlobalId_(srm.CO2GlobalId_),
109template<
class CloudType>
135 const scalar fComb = YMixture[idSolid]*YSolid[CsLocalId_];
146 const scalar rhoO2 = rhoc*
thermo.carrier().Y(O2GlobalId_)[celli];
158 const scalar
D = D0_*(rho0_/rhoc)*
pow(Tc/T0_, Dn_);
161 const scalar ppO2 = rhoO2/WO2_*RR*Tc;
164 const scalar
C = pc/(RR*Tc);
168 Pout<<
"mass = " << mass <<
nl
169 <<
"fComb = " << fComb <<
nl
170 <<
"Ap = " << Ap <<
nl
171 <<
"dt = " << dt <<
nl
180 const scalar qCsLim = mass*fComb/(WC_*Ap*dt);
184 Pout<<
"qCsLim = " << qCsLim <<
endl;
188 while ((
mag(qCs - qCsOld)/qCs > tolerance_) && (iter <= maxIters_))
191 const scalar PO2Surface = ppO2*
exp(-(qCs +
N)*d/(2*
C*
D));
192 qCs = A_*
exp(-E_/(RR*
T))*
pow(PO2Surface, n_);
193 qCs = (100.0*qCs + iter*qCsOld)/(100.0 + iter);
194 qCs =
min(qCs, qCsLim);
198 Pout<<
"iter = " << iter
199 <<
", qCsOld = " << qCsOld
207 if (iter > maxIters_)
210 <<
"iter limit reached (" << maxIters_ <<
")" <<
nl <<
endl;
214 scalar dOmega = qCs*Ap*dt;
217 dMassSRCarrier[O2GlobalId_] += -dOmega*WO2_;
218 dMassSRCarrier[CO2GlobalId_] += dOmega*(WC_ + WO2_);
221 dMassSolid[CsLocalId_] += dOmega*WC_;
223 const scalar HsC =
thermo.solids().properties()[CsLocalId_].Hs(
T);
228 return dOmega*(WC_*HsC - (WC_ + WO2_)*HcCO2_);
Limited to C(s) + O2 -> CO2.
Graphite solid properties.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
Templated surface reaction model class.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
basicSpecieMixture & composition
#define WarningInFunction
Report a warning using Foam::Warning.
constexpr scalar pi(M_PI)
dimensionedScalar exp(const dimensionedScalar &ds)
scalarField Re(const UList< complex > &cf)
Extract real component.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
messageStream Info
Information stream (stdout output on master, null elsewhere)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
constexpr char nl
The newline '\n' character (0x0a)
const dimensionedScalar & D
const Vector< label > N(dict.get< Vector< label > >("N"))