34 template<
class CombThermoType,
class ThermoType>
39 if (this->coeffs().
found(
"Ci"))
41 this->coeffs().lookup(
"Ci") >> Ci_;
44 if (this->coeffs().
found(
"YoxStream"))
46 this->coeffs().lookup(
"YoxStream") >> YoxStream_;
49 if (this->coeffs().
found(
"YfStream"))
51 this->coeffs().lookup(
"YfStream") >> YfStream_;
54 if (this->coeffs().
found(
"sigma"))
56 this->coeffs().lookup(
"sigma") >> sigma_;
59 if (this->coeffs().
found(
"ftCorr"))
61 this->coeffs().lookup(
"ftCorr") >> ftCorr_;
64 if (this->coeffs().
found(
"alpha"))
69 if (this->coeffs().
found(
"laminarIgn"))
71 this->coeffs().lookup(
"laminarIgn") >> laminarIgn_;
79 const label nReactions = reactions_.size();
91 this->mesh_.time().timeName(),
99 zeroGradientFvPatchScalarField::typeName
103 RijPtr_[
k].storePrevIter();
108 const label fuelIndex = species[fuelNames_[
k]];
109 const label oxidantIndex = species[oxidantNames_[
k]];
111 const scalar Wu = specieThermo_[fuelIndex].W();
112 const scalar Wox = specieThermo_[oxidantIndex].W();
116 const label specieI = lhs[i].index;
117 specieStoichCoeffs[specieI] = -lhs[i].stoichCoeff;
119 specieThermo_[specieI].hc()*lhs[i].stoichCoeff/Wu;
124 const label specieI = rhs[i].index;
125 specieStoichCoeffs[specieI] = rhs[i].stoichCoeff;
127 specieThermo_[specieI].hc()*rhs[i].stoichCoeff/Wu;
130 Info <<
"Fuel heat of combustion : " << qFuel_[
k] <<
endl;
133 (Wox*
mag(specieStoichCoeffs[oxidantIndex]))
134 / (Wu*
mag(specieStoichCoeffs[fuelIndex]));
136 Info <<
"stoichiometric oxygen-fuel ratio : " << s_[
k] <<
endl;
138 stoicRatio_[
k] = s_[
k]*YfStream_[
k]/YoxStream_[
k];
140 Info <<
"stoichiometric air-fuel ratio : " << stoicRatio_[
k] <<
endl;
142 const scalar fStoich = 1.0/(1.0 + stoicRatio_[
k]);
144 Info <<
"stoichiometric mixture fraction : " << fStoich <<
endl;
152 template<
class CombThermoType,
class ThermoType>
159 CombThermoType(modelType,
mesh, phaseName),
167 (this->
thermo()).speciesData()
169 RijPtr_(reactions_.size()),
170 Ci_(reactions_.size(), 1.0),
171 fuelNames_(this->coeffs().
lookup(
"fuels")),
172 oxidantNames_(this->coeffs().
lookup(
"oxidants")),
173 qFuel_(reactions_.size()),
174 stoicRatio_(reactions_.size()),
175 s_(reactions_.size()),
176 YoxStream_(reactions_.size(), 0.23),
177 YfStream_(reactions_.size(), 1.0),
178 sigma_(reactions_.size(), 0.02),
179 oxidantRes_(this->coeffs().
lookup(
"oxidantRes")),
180 ftCorr_(reactions_.size(), 0.0),
190 template<
class CombThermoType,
class ThermoType>
198 template<
class CombThermoType,
class ThermoType>
202 return this->chemistryPtr_->tc();
206 template<
class CombThermoType,
class ThermoType>
215 const label nReactions = reactions_.size();
219 for (
label k=0;
k < nReactions;
k++)
230 this->mesh_.time().timeName(),
238 zeroGradientFvPatchScalarField::typeName
245 const label fuelIndex = species[fuelNames_[
k]];
250 -this->chemistryPtr_->calculateRR(
k, fuelIndex);
261 const label lIndex = lhs[l].index;
262 this->chemistryPtr_->RR(lIndex) =
268 const label rIndex = rhs[l].index;
269 this->chemistryPtr_->RR(rIndex) =
275 for (
label k=0;
k < nReactions;
k++)
277 const label fuelIndex = species[fuelNames_[
k]];
278 const label oxidantIndex = species[oxidantNames_[
k]];
281 this->
thermo().composition().Y(fuelIndex);
284 this->
thermo().composition().Y(oxidantIndex);
291 - (Yox - YoxStream_[
k])
295 s_[
k]*YfStream_[
k] + YoxStream_[
k]
299 const scalar
sigma = sigma_[
k];
301 const scalar fStoich = 1.0/(1.0 + stoicRatio_[
k]) + ftCorr_[
k];
306 Yox/
max(oxidantRes_[
k], 1
e-3)
312 1.0 +
sqr(OAvailScaled)
328 "prob" +
name(
k), preExp*filter
346 min(RijkDiff, topHatFilter*RijlPtr[
k]*
pos(Yox)*
pos(Yfuel));
355 if (this->mesh_.time().outputTime() && debug)
365 scalar fuelStoic = 1.0;
368 const label lIndex = lhs[l].index;
369 if (lIndex == fuelIndex)
371 fuelStoic = lhs[l].stoichCoeff;
376 const scalar MwFuel = specieThermo_[fuelIndex].W();
381 const label lIndex = lhs[l].index;
383 const scalar stoichCoeff = lhs[l].stoichCoeff;
385 this->chemistryPtr_->RR(lIndex) +=
386 -Rijk*stoichCoeff*specieThermo_[lIndex].W()
394 const label rIndex = rhs[r].index;
396 const scalar stoichCoeff = rhs[r].stoichCoeff;
398 this->chemistryPtr_->RR(rIndex) +=
399 Rijk*stoichCoeff*specieThermo_[rIndex].W()
407 template<
class CombThermoType,
class ThermoType>
418 const label specieI = this->
thermo().composition().species()[Y.name()];
419 Su += this->chemistryPtr_->RR(specieI);
426 template<
class CombThermoType,
class ThermoType>
446 zeroGradientFvPatchScalarField::typeName
453 dQ = this->chemistryPtr_->dQ();
460 template<
class CombThermoType,
class ThermoType>
480 zeroGradientFvPatchScalarField::typeName
487 Sh = this->chemistryPtr_->Sh();
494 template<
class CombThermoType,
class ThermoType>
500 this->coeffs().readIfPresent(
"Ci", Ci_);
501 this->coeffs().readIfPresent(
"sigma", sigma_);
502 this->coeffs().readIfPresent(
"oxidantRes", oxidantRes_);
503 this->coeffs().readIfPresent(
"ftCorr", ftCorr_);
504 this->coeffs().readIfPresent(
"alpha", alpha_);
505 this->coeffs().readIfPresent(
"laminarIgn", laminarIgn_);