Go to the documentation of this file.
36 template<
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))),
53 O2GlobalId_(owner.composition().carrierId(
"O2")),
54 CO2GlobalId_(owner.composition().carrierId(
"CO2")),
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;
83 template<
class CloudType>
98 CsLocalId_(srm.CsLocalId_),
99 O2GlobalId_(srm.O2GlobalId_),
100 CO2GlobalId_(srm.CO2GlobalId_),
109 template<
class CloudType>
134 const label idSolid = CloudType::parcelType::SLD;
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_;
const scalar RR
Universal gas constant: default in [J/(kmol K)].
Templated surface reaction model class.
Intrinsic char surface reaction mndel.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
Different types of constants.
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)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define R(A, B, C, D, E, F, K, M)
dimensionedScalar tanh(const dimensionedScalar &ds)
dimensionedScalar pow3(const dimensionedScalar &ds)
messageStream Info
Information stream (uses stdout - output is on the master only)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
COxidationIntrinsicRate(const dictionary &dict, CloudType &owner)
Construct from dictionary.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Templated base class for dsmc cloud.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
constexpr scalar pi(M_PI)
dimensionedScalar sqrt(const dimensionedScalar &ds)
virtual scalar calculate(const scalar dt, const scalar Re, const scalar nu, 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.
scalarField Re(const UList< complex > &cf)
Extract real component.
const Vector< label > N(dict.get< Vector< label >>("N"))