36template<
class CloudType>
44 Sb_(this->coeffDict().getScalar(
"Sb")),
45 C1_(this->coeffDict().getScalar(
"C1")),
46 rMean_(this->coeffDict().getScalar(
"rMean")),
47 theta_(this->coeffDict().getScalar(
"theta")),
48 Ai_(this->coeffDict().getScalar(
"Ai")),
49 Ei_(this->coeffDict().getScalar(
"Ei")),
50 Ag_(this->coeffDict().getScalar(
"Ag")),
51 tau_(this->coeffDict().getOrDefault(
"tau",
sqrt(2.0))),
60 label idSolid =
owner.composition().idSolid();
61 CsLocalId_ =
owner.composition().localId(idSolid,
"C");
64 WO2_ =
owner.thermo().carrier().W(O2GlobalId_);
65 const scalar WCO2 =
owner.thermo().carrier().W(CO2GlobalId_);
68 HcCO2_ =
owner.thermo().carrier().Hc(CO2GlobalId_);
73 <<
"Stoichiometry of reaction, Sb, must be greater than zero" <<
nl
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 Ychar = YMixture[idSolid]*YSolid[CsLocalId_];
146 const scalar YO2 =
thermo.carrier().Y(O2GlobalId_)[celli];
149 if (YO2 < ROOTVSMALL)
155 const scalar D0 = C1_/d*
pow(0.5*(
T + Tc), 0.75);
161 const scalar Dkn = 97.0*rMean_*
sqrt(
T/WO2_);
164 const scalar De = theta_/
sqr(tau_)/(1.0/Dkn + 1/D0);
167 const scalar rhoO2 = rhoc*YO2;
170 const scalar ppO2 = rhoO2/WO2_*RR*Tc;
173 const scalar ki = Ai_*
exp(-Ei_/RR/
T);
177 max(0.5*d*
sqrt(Sb_*rhop*Ag_*ki*ppO2/(De*rhoO2)), ROOTVSMALL);
183 const scalar
R = eta*d/6.0*rhop*Ag_*ki;
189 scalar dmC = Ap*rhoc*RR*Tc*YO2/WO2_*D0*
R/(D0 +
R)*dt;
192 dmC =
min(mass*Ychar, dmC);
195 const scalar dOmega = dmC/WC_;
198 const scalar dmO2 = dOmega*Sb_*WO2_;
201 const scalar dmCO2 = dOmega*(WC_ + Sb_*WO2_);
204 dMassSolid[CsLocalId_] += dOmega*WC_;
207 dMassSRCarrier[O2GlobalId_] -= dmO2;
208 dMassSRCarrier[CO2GlobalId_] += dmCO2;
210 const scalar HsC =
thermo.solids().properties()[CsLocalId_].Hs(
T);
215 return dmC*HsC - dmCO2*HcCO2_;
#define R(A, B, C, D, E, F, K, M)
Intrinsic char surface reaction mndel.
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 FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr scalar pi(M_PI)
Different types of constants.
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)
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedScalar tanh(const dimensionedScalar &ds)
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.
dimensionedScalar sqrt(const dimensionedScalar &ds)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
const Vector< label > N(dict.get< Vector< label > >("N"))