33 template<
class CloudType>
48 tau_(this->coeffDict().lookupOrDefault(
"tau",
sqrt(2.0))),
50 O2GlobalId_(owner.composition().carrierId(
"O2")),
51 CO2GlobalId_(owner.composition().carrierId(
"CO2")),
57 label idSolid = owner.composition().idSolid();
58 CsLocalId_ = owner.composition().localId(idSolid,
"C");
61 WO2_ = owner.thermo().carrier().W(O2GlobalId_);
62 const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_);
65 HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_);
70 <<
"Stoichiometry of reaction, Sb, must be greater than zero" <<
nl 74 const scalar YCloc = owner.composition().Y0(idSolid)[CsLocalId_];
75 const scalar YSolidTot = owner.composition().YMixture0()[idSolid];
76 Info<<
" C(s): particle mass fraction = " << YCloc*YSolidTot <<
endl;
80 template<
class CloudType>
95 CsLocalId_(srm.CsLocalId_),
96 O2GlobalId_(srm.O2GlobalId_),
97 CO2GlobalId_(srm.CO2GlobalId_),
106 template<
class CloudType>
114 template<
class CloudType>
137 const label idSolid = CloudType::parcelType::SLD;
138 const scalar Ychar = YMixture[idSolid]*YSolid[CsLocalId_];
149 const scalar YO2 = thermo.
carrier().
Y(O2GlobalId_)[celli];
152 if (YO2 < rootVSmall)
158 const scalar D0 = C1_/d*
pow(0.5*(T + Tc), 0.75);
164 const scalar Dkn = 97.0*rMean_*
sqrt(T/WO2_);
167 const scalar De = theta_/
sqr(tau_)/(1.0/Dkn + 1/D0);
170 const scalar rhoO2 = rhoc*YO2;
173 const scalar ppO2 = rhoO2/WO2_*
RR*Tc;
176 const scalar ki = Ai_*
exp(-Ei_/
RR/T);
180 max(0.5*d*
sqrt(Sb_*rhop*Ag_*ki*ppO2/(De*rhoO2)), rootVSmall);
183 const scalar eta =
max(3.0*
sqr(phi)*(phi/
tanh(phi) - 1.0), 0.0);
186 const scalar
R = eta*d/6.0*rhop*Ag_*ki;
192 scalar dmC = Ap*rhoc*
RR*Tc*YO2/WO2_*D0*R/(D0 +
R)*dt;
195 dmC =
min(mass*Ychar, dmC);
198 const scalar dOmega = dmC/WC_;
201 const scalar dmO2 = dOmega*Sb_*WO2_;
204 const scalar dmCO2 = dOmega*(WC_ + Sb_*WO2_);
207 dMassSolid[CsLocalId_] += dOmega*WC_;
210 dMassSRCarrier[O2GlobalId_] -= dmO2;
211 dMassSRCarrier[CO2GlobalId_] += dmCO2;
218 return dmC*HsC - dmCO2*HcCO2_;
dimensionedScalar tanh(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const PtrList< solidProperties > & properties() const
Return the solidProperties properties.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
rhoReactionThermo & thermo
const solidMixtureProperties & solids() const
Return reference to the global (additional) solids.
PtrList< volScalarField > & Y()
Return the mass-fraction fields.
virtual ~COxidationIntrinsicRate()
Destructor.
stressControl lookup("compactNormalStress") >> compactNormalStress
dimensionedScalar exp(const dimensionedScalar &ds)
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package, and provides:
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar pow3(const dimensionedScalar &ds)
COxidationIntrinsicRate(const dictionary &dict, CloudType &owner)
Construct from dictionary.
#define R(A, B, C, D, E, F, K, M)
Intrinsic char surface reaction mndel.
const scalar RR
Universal gas constant (default in [J/(kmol K)])
virtual scalar calculate(const scalar dt, 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.
Templated surface reaction model class.
Templated base class for dsmc cloud.