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))),
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_];
143 const SLGThermo&
thermo = this->owner().thermo();
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_;
Different types of constants.
dimensionedScalar tanh(const dimensionedScalar &ds)
errorManipArg< error, int > exit(error &err, const int errNo=1)
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
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
constexpr char nl
The newline '\n' character (0x0a)
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const CloudType & owner() const
Return const access to the owner cloud.
psiReactionThermo & thermo
dimensionedScalar exp(const dimensionedScalar &ds)
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"))
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 > &cmplx)
Extract real component.
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.
messageStream Info
Information stream (stdout output on master, null elsewhere)
const scalar RR
Universal gas constant: default in [J/(kmol K)].
Templated surface reaction model class.
Templated base class for dsmc cloud.