36 template<
class CloudType>
44 Sb_(this->coeffDict().getScalar(
"Sb")),
45 D_(this->coeffDict().getScalar(
"D")),
54 label idSolid =
owner.composition().idSolid();
55 CsLocalId_ =
owner.composition().localId(idSolid,
"C");
58 WO2_ =
owner.thermo().carrier().W(O2GlobalId_);
59 const scalar WCO2 =
owner.thermo().carrier().W(CO2GlobalId_);
62 HcCO2_ =
owner.thermo().carrier().Hc(CO2GlobalId_);
67 <<
"Stoichiometry of reaction, Sb, must be greater than zero" <<
nl 71 const scalar YCloc =
owner.composition().Y0(idSolid)[CsLocalId_];
72 const scalar YSolidTot =
owner.composition().YMixture0()[idSolid];
73 Info<<
" C(s): particle mass fraction = " << YCloc*YSolidTot <<
endl;
77 template<
class CloudType>
86 CsLocalId_(srm.CsLocalId_),
87 O2GlobalId_(srm.O2GlobalId_),
88 CO2GlobalId_(srm.CO2GlobalId_),
97 template<
class CloudType>
122 const label idSolid = CloudType::parcelType::SLD;
123 const scalar fComb = YMixture[idSolid]*YSolid[CsLocalId_];
131 const SLGThermo&
thermo = this->owner().thermo();
134 const scalar YO2 =
thermo.carrier().Y(O2GlobalId_)[celli];
140 dmC =
min(mass*fComb, dmC);
143 const scalar dmO2 = dmC/WC_*Sb_*WO2_;
146 const scalar dmCO2 = dmC + dmO2;
149 dMassSolid[CsLocalId_] += dmC;
152 dMassSRCarrier[O2GlobalId_] -= dmO2;
153 dMassSRCarrier[CO2GlobalId_] += dmCO2;
155 const scalar HsC =
thermo.solids().properties()[CsLocalId_].Hs(
T);
160 return dmC*HsC - dmCO2*HcCO2_;
Different types of constants.
errorManipArg< error, int > exit(error &err, const int errNo=1)
COxidationDiffusionLimitedRate(const dictionary &dict, CloudType &owner)
Construct from dictionary.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
basicSpecieMixture & composition
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Diffusion limited rate surface reaction model for coal parcels. Limited to:
const CloudType & owner() const
Return const access to the owner cloud.
psiReactionThermo & thermo
constexpr scalar pi(M_PI)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const Vector< label > N(dict.get< Vector< label >>("N"))
scalarField Re(const UList< complex > &cmplx)
Extract real component.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Templated surface reaction model class.
Templated base class for dsmc cloud.
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.