36template<
class CloudType>
46 rMean_(this->
coeffDict().getScalar(
"rMean")),
47 theta_(this->
coeffDict().getScalar(
"theta")),
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>
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_;
#define R(A, B, C, D, E, F, K, M)
Intrinsic char surface reaction mndel.
COxidationIntrinsicRate(const dictionary &dict, CloudType &owner)
Construct from dictionary.
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.
const CloudType & owner() const
Return const access to the owner cloud.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
Templated surface reaction model class.
SurfaceReactionModel(CloudType &owner)
Construct null from owner.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
const dictionary & dict() const
Return const access to the cloud dictionary.
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)
const scalar RR
Universal gas constant: default in [J/(kmol K)].
Different types of constants.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
DSMCCloud< dsmcParcel > CloudType
dimensionedScalar exp(const dimensionedScalar &ds)
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).
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
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.
scalarField Re(const UList< complex > &cmplx)
Extract real component.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
constexpr char nl
The newline '\n' character (0x0a).
scalarList Y0(nSpecie, Zero)
psiReactionThermo & thermo
const Vector< label > N(dict.get< Vector< label > >("N"))