30 template<
class ThermoType>
40 const wordHashSet initSet(this->coeffsDict_.lookup(
"initialSet"));
43 searchInitSet_.append(chemistry.
mixture().species()[iter.key()]);
50 template<
class ThermoType>
57 template<
class ThermoType>
93 forAll(this->chemistry_.reactions(), i)
98 scalar omegaf, omegar;
99 const scalar omegai = R.
omega(p, T, c1, li, omegaf, omegar);
110 scalar sl = -R.
lhs()[
s].stoichCoeff;
123 wA.append(sl*omegai);
130 scalar sl = R.
rhs()[
s].stoichCoeff;
143 wA.append(sl*omegai);
154 label curID = wAID[id];
157 scalar curwA = ((wA[id]>=0) ? wA[
id] : -wA[
id]);
175 deltaBi[curID] =
false;
176 while(!usedIndex.empty())
180 if (deltaBi[curIndex])
183 deltaBi[curIndex] =
false;
186 if (rABPos(curID, curIndex)==-1)
188 rABPos(curID, curIndex) = NbrABInit[curID];
190 rABNum(curID, rABPos(curID, curIndex)) = curwA;
191 rABOtherSpec(curID, rABPos(curID, curIndex)) = curIndex;
195 rABNum(curID, rABPos(curID, curIndex)) += curwA;
199 if (rABDen[curID] == 0.0)
201 rABDen[curID] = curwA;
205 rABDen[curID] +=curwA;
215 this->activeSpecies_[i] =
false;
222 for (
label i=0; i<searchInitSet_.size(); i++)
224 label q = searchInitSet_[i];
225 this->activeSpecies_[q] =
true;
233 scalar Den = rABDen[u];
237 for (
label v=0; v<NbrABInit[u]; v++)
239 label otherSpec = rABOtherSpec(u, v);
240 scalar rAB = rABNum(u, v)/Den;
251 rAB >= this->tolerance()
252 && !this->activeSpecies_[otherSpec]
256 this->activeSpecies_[otherSpec] =
true;
A FIFO stack based on a singly-linked list.
A HashTable with keys but without contents.
#define forAll(list, i)
Loop across all elements in list.
scalar omega(const scalar p, const scalar T, const scalarField &c, const label li, scalar &omegaf, scalar &omegar) const
Net reaction rate.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
const List< specieCoeffs > & lhs() const
Return the components of the left hand side.
Simple extension of ReactionThermo to handle reaction kinetics in addition to the equilibrium thermod...
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
const dimensionedScalar c1
First radiation constant: default SI units: [W/m^2].
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
DRG(const IOdictionary &dict, chemistryModel< ThermoType > &chemistry)
Construct from components.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
basicChemistryModel & chemistry
const multiComponentMixture< ThermoType > & mixture() const
Return reference to the mixture.
Extends base chemistry model by adding a thermo package, and ODE functions. Introduces chemistry equa...
const List< specieCoeffs > & rhs() const
Return the components of the right hand side.
#define R(A, B, C, D, E, F, K, M)
void push(const T &a)
Push an element onto the stack.
T pop()
Pop the bottom element off the stack.
An abstract class for methods of chemical mechanism reduction.
virtual void reduceMechanism(const scalar p, const scalar T, const scalarField &c, List< label > &ctos, DynamicList< label > &stoc, const label li)
Reduce the mechanism.