Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GasKinetics.cpp
Go to the documentation of this file.
1 /**
2  * @file GasKinetics.cpp
3  *
4  * Homogeneous kinetics in ideal gases
5  */
6 
7 // Copyright 2001 California Institute of Technology
8 
10 
11 using namespace std;
12 
13 namespace Cantera
14 {
15 GasKinetics::GasKinetics(thermo_t* thermo) :
16  BulkKinetics(thermo),
17  m_nfall(0),
18  m_logp_ref(0.0),
19  m_logc_ref(0.0),
20  m_logStandConc(0.0),
21  m_pres(0.0)
22 {
23 }
24 
25 Kinetics* GasKinetics::duplMyselfAsKinetics(const std::vector<thermo_t*> & tpVector) const
26 {
27  GasKinetics* gK = new GasKinetics(*this);
28  gK->assignShallowPointers(tpVector);
29  return gK;
30 }
31 
33 {
34  doublereal T = thermo().temperature();
35  doublereal P = thermo().pressure();
36  m_logStandConc = log(thermo().standardConcentration());
37  doublereal logT = log(T);
38 
39  if (T != m_temp) {
40  if (!m_rfn.empty()) {
41  m_rates.update(T, logT, &m_rfn[0]);
42  }
43 
44  if (!m_rfn_low.empty()) {
45  m_falloff_low_rates.update(T, logT, &m_rfn_low[0]);
46  m_falloff_high_rates.update(T, logT, &m_rfn_high[0]);
47  }
48  if (!falloff_work.empty()) {
49  m_falloffn.updateTemp(T, &falloff_work[0]);
50  }
51  updateKc();
52  m_ROP_ok = false;
53  }
54 
55  if (T != m_temp || P != m_pres) {
56  if (m_plog_rates.nReactions()) {
57  m_plog_rates.update(T, logT, &m_rfn[0]);
58  m_ROP_ok = false;
59  }
60 
61  if (m_cheb_rates.nReactions()) {
62  m_cheb_rates.update(T, logT, &m_rfn[0]);
63  m_ROP_ok = false;
64  }
65  }
66  m_pres = P;
67  m_temp = T;
68 }
69 
71 {
72  thermo().getActivityConcentrations(&m_conc[0]);
73  doublereal ctot = thermo().molarDensity();
74 
75  // 3-body reactions
76  if (!concm_3b_values.empty()) {
77  m_3b_concm.update(m_conc, ctot, &concm_3b_values[0]);
78  }
79 
80  // Falloff reactions
81  if (!concm_falloff_values.empty()) {
82  m_falloff_concm.update(m_conc, ctot, &concm_falloff_values[0]);
83  }
84 
85  // P-log reactions
86  if (m_plog_rates.nReactions()) {
87  double logP = log(thermo().pressure());
88  m_plog_rates.update_C(&logP);
89  }
90 
91  // Chebyshev reactions
92  if (m_cheb_rates.nReactions()) {
93  double log10P = log10(thermo().pressure());
94  m_cheb_rates.update_C(&log10P);
95  }
96 
97  m_ROP_ok = false;
98 }
99 
101 {
102  thermo().getStandardChemPotentials(&m_grt[0]);
103  fill(m_rkcn.begin(), m_rkcn.end(), 0.0);
104 
105  // compute Delta G^0 for all reversible reactions
106  getRevReactionDelta(&m_grt[0], &m_rkcn[0]);
107 
108  doublereal rrt = 1.0/(GasConstant * thermo().temperature());
109  for (size_t i = 0; i < m_revindex.size(); i++) {
110  size_t irxn = m_revindex[i];
111  m_rkcn[irxn] = std::min(exp(m_rkcn[irxn]*rrt - m_dn[irxn]*m_logStandConc),
112  BigNumber);
113  }
114 
115  for (size_t i = 0; i != m_irrev.size(); ++i) {
116  m_rkcn[ m_irrev[i] ] = 0.0;
117  }
118 }
119 
121 {
122  update_rates_T();
123  thermo().getStandardChemPotentials(&m_grt[0]);
124  fill(m_rkcn.begin(), m_rkcn.end(), 0.0);
125 
126  // compute Delta G^0 for all reactions
127  getReactionDelta(&m_grt[0], &m_rkcn[0]);
128 
129  doublereal rrt = 1.0/(GasConstant * thermo().temperature());
130  for (size_t i = 0; i < m_ii; i++) {
131  kc[i] = exp(-m_rkcn[i]*rrt + m_dn[i]*m_logStandConc);
132  }
133 
134  // force an update of T-dependent properties, so that m_rkcn will
135  // be updated before it is used next.
136  m_temp = 0.0;
137 }
138 
139 void GasKinetics::processFalloffReactions()
140 {
141  // use m_ropr for temporary storage of reduced pressure
142  vector_fp& pr = m_ropr;
143 
144  for (size_t i = 0; i < m_nfall; i++) {
145  pr[i] = concm_falloff_values[i] * m_rfn_low[i] / (m_rfn_high[i] + SmallNumber);
146  AssertFinite(pr[i], "GasKinetics::processFalloffReactions",
147  "pr[" + int2str(i) + "] is not finite.");
148  }
149 
150  double* work = (falloff_work.empty()) ? 0 : &falloff_work[0];
151  m_falloffn.pr_to_falloff(&pr[0], work);
152 
153  for (size_t i = 0; i < m_nfall; i++) {
154  if (m_rxntype[m_fallindx[i]] == FALLOFF_RXN) {
155  pr[i] *= m_rfn_high[i];
156  } else { // CHEMACT_RXN
157  pr[i] *= m_rfn_low[i];
158  }
159  }
160 
161  scatter_copy(pr.begin(), pr.begin() + m_nfall,
162  m_ropf.begin(), m_fallindx.begin());
163 }
164 
165 void GasKinetics::updateROP()
166 {
167  update_rates_C();
168  update_rates_T();
169 
170  if (m_ROP_ok) {
171  return;
172  }
173 
174  // copy rate coefficients into ropf
175  copy(m_rfn.begin(), m_rfn.end(), m_ropf.begin());
176 
177  // multiply ropf by enhanced 3b conc for all 3b rxns
178  if (!concm_3b_values.empty()) {
179  m_3b_concm.multiply(&m_ropf[0], &concm_3b_values[0]);
180  }
181 
182  if (m_nfall) {
183  processFalloffReactions();
184  }
185 
186  // multiply by perturbation factor
187  multiply_each(m_ropf.begin(), m_ropf.end(), m_perturb.begin());
188 
189  // copy the forward rates to the reverse rates
190  copy(m_ropf.begin(), m_ropf.end(), m_ropr.begin());
191 
192  // for reverse rates computed from thermochemistry, multiply the forward
193  // rates copied into m_ropr by the reciprocals of the equilibrium constants
194  multiply_each(m_ropr.begin(), m_ropr.end(), m_rkcn.begin());
195 
196  // multiply ropf by concentration products
197  m_reactantStoich.multiply(&m_conc[0], &m_ropf[0]);
198 
199  // for reversible reactions, multiply ropr by concentration products
200  m_revProductStoich.multiply(&m_conc[0], &m_ropr[0]);
201 
202  for (size_t j = 0; j != m_ii; ++j) {
203  m_ropnet[j] = m_ropf[j] - m_ropr[j];
204  }
205 
206  for (size_t i = 0; i < m_rfn.size(); i++) {
207  AssertFinite(m_rfn[i], "GasKinetics::updateROP",
208  "m_rfn[" + int2str(i) + "] is not finite.");
209  AssertFinite(m_ropf[i], "GasKinetics::updateROP",
210  "m_ropf[" + int2str(i) + "] is not finite.");
211  AssertFinite(m_ropr[i], "GasKinetics::updateROP",
212  "m_ropr[" + int2str(i) + "] is not finite.");
213  }
214 
215  m_ROP_ok = true;
216 }
217 
218 void GasKinetics::getFwdRateConstants(doublereal* kfwd)
219 {
220  update_rates_C();
221  update_rates_T();
222 
223  // copy rate coefficients into ropf
224  copy(m_rfn.begin(), m_rfn.end(), m_ropf.begin());
225 
226  // multiply ropf by enhanced 3b conc for all 3b rxns
227  if (!concm_3b_values.empty()) {
228  m_3b_concm.multiply(&m_ropf[0], &concm_3b_values[0]);
229  }
230 
231  if (m_nfall) {
232  processFalloffReactions();
233  }
234 
235  // multiply by perturbation factor
236  multiply_each(m_ropf.begin(), m_ropf.end(), m_perturb.begin());
237 
238  for (size_t i = 0; i < m_ii; i++) {
239  kfwd[i] = m_ropf[i];
240  }
241 }
242 
244 {
245  switch (r.reactionType) {
246  case ELEMENTARY_RXN:
247  addElementaryReaction(r);
248  break;
249  case THREE_BODY_RXN:
250  addThreeBodyReaction(r);
251  break;
252  case FALLOFF_RXN:
253  case CHEMACT_RXN:
254  addFalloffReaction(r);
255  break;
256  case PLOG_RXN:
257  addPlogReaction(r);
258  break;
259  case CHEBYSHEV_RXN:
260  addChebyshevReaction(r);
261  break;
262  default:
263  throw CanteraError("GasKinetics::addReaction", "Invalid reaction type specified");
264  }
265 
266  // operations common to all reaction types
268 }
269 
270 bool GasKinetics::addReaction(shared_ptr<Reaction> r)
271 {
272  // operations common to all reaction types
273  bool added = BulkKinetics::addReaction(r);
274  if (!added) {
275  return false;
276  }
277 
278  switch (r->reaction_type) {
279  case ELEMENTARY_RXN:
280  addElementaryReaction(dynamic_cast<ElementaryReaction&>(*r));
281  break;
282  case THREE_BODY_RXN:
283  addThreeBodyReaction(dynamic_cast<ThreeBodyReaction&>(*r));
284  break;
285  case FALLOFF_RXN:
286  case CHEMACT_RXN:
287  addFalloffReaction(dynamic_cast<FalloffReaction&>(*r));
288  break;
289  case PLOG_RXN:
290  addPlogReaction(dynamic_cast<PlogReaction&>(*r));
291  break;
292  case CHEBYSHEV_RXN:
293  addChebyshevReaction(dynamic_cast<ChebyshevReaction&>(*r));
294  break;
295  default:
296  throw CanteraError("GasKinetics::addReaction",
297  "Unknown reaction type specified: " + int2str(r->reaction_type));
298  }
299  return true;
300 }
301 
302 void GasKinetics::addFalloffReaction(ReactionData& r)
303 {
304  // install high and low rate coeff calculators
305  // and add constant terms to high and low rate coeff value vectors
306  m_falloff_high_rates.install(m_nfall, r);
307  m_rfn_high.push_back(r.rateCoeffParameters[0]);
309  m_falloff_low_rates.install(m_nfall, r);
310  m_rfn_low.push_back(r.rateCoeffParameters[0]);
311 
312  // add this reaction number to the list of falloff reactions
313  m_fallindx.push_back(nReactions());
314  m_rfallindx[nReactions()] = m_nfall;
315 
316  // install the enhanced third-body concentration calculator for this
317  // reaction
318  m_falloff_concm.install(m_nfall, r.thirdBodyEfficiencies,
319  r.default_3b_eff);
320 
321  // install the falloff function calculator for this reaction
322  m_falloffn.install(m_nfall, r.falloffType, r.reactionType,
324 
325  // increment the falloff reaction counter
326  ++m_nfall;
327 }
328 
329 void GasKinetics::addThreeBodyReaction(ReactionData& r)
330 {
331  m_rates.install(nReactions(), r);
332  m_3b_concm.install(nReactions(), r.thirdBodyEfficiencies,
333  r.default_3b_eff);
334 }
335 
336 void GasKinetics::addPlogReaction(ReactionData& r)
337 {
338  m_plog_rates.install(nReactions(), r);
339 }
340 
341 void GasKinetics::addChebyshevReaction(ReactionData& r)
342 {
343  m_cheb_rates.install(nReactions(), r);
344 }
345 
346 void GasKinetics::addFalloffReaction(FalloffReaction& r)
347 {
348  // install high and low rate coeff calculators
349  // and extend the high and low rate coeff value vectors
350  m_falloff_high_rates.install(m_nfall, r.high_rate);
351  m_rfn_high.push_back(0.0);
352  m_falloff_low_rates.install(m_nfall, r.low_rate);
353  m_rfn_low.push_back(0.0);
354 
355  // add this reaction number to the list of falloff reactions
356  m_fallindx.push_back(nReactions()-1);
357  m_rfallindx[nReactions()-1] = m_nfall;
358 
359  // install the enhanced third-body concentration calculator
360  map<size_t, double> efficiencies;
361  for (Composition::const_iterator iter = r.third_body.efficiencies.begin();
362  iter != r.third_body.efficiencies.end();
363  ++iter) {
364  size_t k = kineticsSpeciesIndex(iter->first);
365  if (k != npos) {
366  efficiencies[k] = iter->second;
367  } else if (!m_skipUndeclaredThirdBodies) {
368  throw CanteraError("GasKinetics::addTFalloffReaction", "Found "
369  "third-body efficiency for undefined species '" + iter->first +
370  "' while adding reaction '" + r.equation() + "'");
371  }
372  }
373  m_falloff_concm.install(m_nfall, efficiencies,
374  r.third_body.default_efficiency);
375 
376  // install the falloff function calculator for this reaction
377  m_falloffn.install(m_nfall, r.reaction_type, r.falloff);
378 
379  // increment the falloff reaction counter
380  ++m_nfall;
381 }
382 
383 void GasKinetics::addThreeBodyReaction(ThreeBodyReaction& r)
384 {
385  m_rates.install(nReactions()-1, r.rate);
386  map<size_t, double> efficiencies;
387  for (Composition::const_iterator iter = r.third_body.efficiencies.begin();
388  iter != r.third_body.efficiencies.end();
389  ++iter) {
390  size_t k = kineticsSpeciesIndex(iter->first);
391  if (k != npos) {
392  efficiencies[k] = iter->second;
393  } else if (!m_skipUndeclaredThirdBodies) {
394  throw CanteraError("GasKinetics::addThreeBodyReaction", "Found "
395  "third-body efficiency for undefined species '" + iter->first +
396  "' while adding reaction '" + r.equation() + "'");
397  }
398  }
399  m_3b_concm.install(nReactions()-1, efficiencies,
400  r.third_body.default_efficiency);
401 }
402 
403 void GasKinetics::addPlogReaction(PlogReaction& r)
404 {
405  m_plog_rates.install(nReactions()-1, r.rate);
406 }
407 
408 void GasKinetics::addChebyshevReaction(ChebyshevReaction& r)
409 {
410  m_cheb_rates.install(nReactions()-1, r.rate);
411 }
412 
413 void GasKinetics::modifyReaction(size_t i, shared_ptr<Reaction> rNew)
414 {
415  // operations common to all reaction types
417 
418  switch (rNew->reaction_type) {
419  case ELEMENTARY_RXN:
420  modifyElementaryReaction(i, dynamic_cast<ElementaryReaction&>(*rNew));
421  break;
422  case THREE_BODY_RXN:
423  modifyThreeBodyReaction(i, dynamic_cast<ThreeBodyReaction&>(*rNew));
424  break;
425  case FALLOFF_RXN:
426  case CHEMACT_RXN:
427  modifyFalloffReaction(i, dynamic_cast<FalloffReaction&>(*rNew));
428  break;
429  case PLOG_RXN:
430  modifyPlogReaction(i, dynamic_cast<PlogReaction&>(*rNew));
431  break;
432  case CHEBYSHEV_RXN:
433  modifyChebyshevReaction(i, dynamic_cast<ChebyshevReaction&>(*rNew));
434  break;
435  default:
436  throw CanteraError("GasKinetics::modifyReaction",
437  "Unknown reaction type specified: " + int2str(rNew->reaction_type));
438  }
439 
440  // invalidate all cached data
441  m_ROP_ok = false;
442  m_temp += 0.1234;
443  m_pres += 0.1234;
444 }
445 
446 void GasKinetics::modifyThreeBodyReaction(size_t i, ThreeBodyReaction& r)
447 {
448  m_rates.replace(i, r.rate);
449 }
450 
451 void GasKinetics::modifyFalloffReaction(size_t i, FalloffReaction& r)
452 {
453  size_t iFall = m_rfallindx[i];
454  m_falloff_high_rates.replace(iFall, r.high_rate);
455  m_falloff_low_rates.replace(iFall, r.low_rate);
456  m_falloffn.replace(iFall, r.falloff);
457 }
458 
459 void GasKinetics::modifyPlogReaction(size_t i, PlogReaction& r)
460 {
461  m_plog_rates.replace(i, r.rate);
462 }
463 
464 void GasKinetics::modifyChebyshevReaction(size_t i, ChebyshevReaction& r)
465 {
466  m_cheb_rates.replace(i, r.rate);
467 }
468 
470 {
472  m_logp_ref = log(thermo().refPressure()) - log(GasConstant);
473 }
474 
476 {
478  falloff_work.resize(m_falloffn.workSize());
479  concm_3b_values.resize(m_3b_concm.workSize());
480  concm_falloff_values.resize(m_falloff_concm.workSize());
481 }
482 
483 bool GasKinetics::ready() const
484 {
485  return m_finalized;
486 }
487 
488 }
virtual void modifyReaction(size_t i, shared_ptr< Reaction > rNew)
Modify the rate expression associated with a reaction.
Definition: Kinetics.cpp:773
const int PLOG_RXN
A pressure-dependent rate expression consisting of several Arrhenius rate expressions evaluated at di...
Definition: reaction_defs.h:50
StoichManagerN m_revProductStoich
Stoichiometry manager for the products of reversible reactions.
Definition: Kinetics.h:971
void pr_to_falloff(doublereal *values, const doublereal *work)
Given a vector of reduced pressures for each falloff reaction, replace each entry by the value of the...
Definition: FalloffMgr.h:98
std::string int2str(const int n, const std::string &fmt)
Convert an int to a string using a format converter.
Definition: stringUtils.cpp:39
vector_fp m_ropr
Reverse rate-of-progress for each reaction.
Definition: Kinetics.h:1107
vector_fp falloffParameters
Values used in the falloff parameterization.
Definition: ReactionData.h:165
void install(size_t rxn, int falloffType, int reactionType, const vector_fp &c)
Install a new falloff function calculator.
Definition: FalloffMgr.h:43
int reactionType
Type of the reaction.
Definition: ReactionData.h:58
virtual void assignShallowPointers(const std::vector< thermo_t * > &tpVector)
Reassign the pointers within the Kinetics object.
Definition: Kinetics.cpp:140
thermo_t & thermo(size_t n=0)
This method returns a reference to the nth ThermoPhase object defined in this kinetics mechanism...
Definition: Kinetics.h:285
vector_fp auxRateCoeffParameters
Vector of auxiliary rate coefficient parameters.
Definition: ReactionData.h:157
void replace(size_t rxn, shared_ptr< Falloff > f)
Definition: FalloffMgr.h:73
virtual void getFwdRateConstants(doublereal *kfwd)
Return the forward rate constants.
const size_t npos
index returned by functions to indicate "no position"
Definition: ct_defs.h:165
int falloffType
Type of falloff parameterization to use.
Definition: ReactionData.h:161
const int CHEBYSHEV_RXN
A general gas-phase pressure-dependent reaction where k(T,P) is defined in terms of a bivariate Cheby...
Definition: reaction_defs.h:56
virtual void init()
Prepare the class for the addition of reactions.
virtual void getStandardChemPotentials(doublereal *mu) const
Get the array of chemical potentials at unit activity for the species at their standard states at the...
Definition: ThermoPhase.h:670
virtual void getRevReactionDelta(const doublereal *g, doublereal *dg)
Given an array of species properties 'g', return in array 'dg' the change in this quantity in the rev...
Definition: Kinetics.cpp:466
vector_fp m_ropnet
Net rate-of-progress for each reaction.
Definition: Kinetics.h:1110
doublereal molarDensity() const
Molar density (kmol/m^3).
Definition: Phase.cpp:663
const int CHEMACT_RXN
A chemical activation reaction.
Definition: reaction_defs.h:64
void updateTemp(doublereal t, doublereal *work)
Update the cached temperature-dependent intermediate results for all installed falloff functions...
Definition: FalloffMgr.h:88
size_t workSize()
Size of the work array required to store intermediate results.
Definition: FalloffMgr.h:78
Kinetics manager for elementary gas-phase chemistry.
Definition: GasKinetics.h:26
#define AssertFinite(expr, procedure, message)
Throw an exception if the specified exception is not a finite number.
Definition: ctexceptions.h:308
void multiply_each(OutputIter x_begin, OutputIter x_end, InputIter y_begin)
Multiply each entry in x by the corresponding entry in y.
Definition: utilities.h:234
virtual void init()
Prepare the class for the addition of reactions.
vector_fp rateCoeffParameters
Vector of rate coefficient parameters.
Definition: ReactionData.h:152
std::map< size_t, doublereal > thirdBodyEfficiencies
Map of species index to third body efficiency.
Definition: ReactionData.h:107
virtual void update_rates_T()
Update temperature-dependent portions of reaction rates and falloff functions.
Definition: GasKinetics.cpp:32
vector_fp m_ropf
Forward rate-of-progress for each reaction.
Definition: Kinetics.h:1104
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:97
Partial specialization of Kinetics for chemistry in a single bulk phase.
Definition: BulkKinetics.h:18
const int FALLOFF_RXN
The general form for a gas-phase association or dissociation reaction, with a pressure-dependent rate...
Definition: reaction_defs.h:42
virtual void getEquilibriumConstants(doublereal *kc)
Return a vector of Equilibrium constants.
virtual bool ready() const
Returns true if the kinetics manager has been properly initialized and finalized. ...
Rate1< Arrhenius > m_falloff_high_rates
Rate expressions for falloff reactions at the high-pressure limit.
Definition: GasKinetics.h:88
std::vector< size_t > m_irrev
Indices of irreversible reactions.
Definition: BulkKinetics.h:53
const doublereal BigNumber
largest number to compare to inf.
Definition: ct_defs.h:128
vector_fp m_rfn
Forward rate constant for each reaction.
Definition: Kinetics.h:1098
StoichManagerN m_reactantStoich
Stoichiometry manager for the reactants for each reaction.
Definition: Kinetics.h:968
bool m_skipUndeclaredThirdBodies
Definition: Kinetics.h:1116
void updateKc()
Update the equilibrium constants in molar units.
vector_fp m_perturb
Vector of perturbation factors for each reaction's rate of progress vector.
Definition: Kinetics.h:986
Public interface for kinetics managers.
Definition: Kinetics.h:128
doublereal default_3b_eff
The default third body efficiency for species not listed in thirdBodyEfficiencies.
Definition: ReactionData.h:180
Intermediate class which stores data about a reaction and its rate parameterization before adding the...
Definition: ReactionData.h:22
GasKinetics(thermo_t *thermo=0)
Constructor.
Definition: GasKinetics.cpp:15
Base class for exceptions thrown by Cantera classes.
Definition: ctexceptions.h:99
std::vector< size_t > m_revindex
Indices of reversible reactions.
Definition: BulkKinetics.h:52
std::vector< size_t > m_fallindx
Reaction index of each falloff reaction.
Definition: GasKinetics.h:78
virtual Kinetics * duplMyselfAsKinetics(const std::vector< thermo_t * > &tpVector) const
Duplication routine for objects which inherit from Kinetics.
Definition: GasKinetics.cpp:25
const int THREE_BODY_RXN
A gas-phase reaction that requires a third-body collision partner.
Definition: reaction_defs.h:36
size_t kineticsSpeciesIndex(size_t k, size_t n) const
The location of species k of phase n in species arrays.
Definition: Kinetics.h:323
vector_fp m_rkcn
Reciprocal of the equilibrium constant in concentration units.
Definition: Kinetics.h:1101
virtual void update_rates_C()
Update properties that depend on concentrations.
Definition: GasKinetics.cpp:70
virtual doublereal pressure() const
Return the thermodynamic pressure (Pa).
Definition: ThermoPhase.h:278
doublereal temperature() const
Temperature (K).
Definition: Phase.h:602
virtual void getActivityConcentrations(doublereal *c) const
This method returns an array of generalized concentrations.
Definition: ThermoPhase.h:425
const doublereal SmallNumber
smallest number to compare to zero.
Definition: ct_defs.h:126
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Definition: ct_defs.h:157
virtual void addReaction(ReactionData &r)
Add a single reaction to the mechanism.
doublereal m_pres
Last pressure at which rates were evaluated.
Definition: GasKinetics.h:106
std::map< size_t, size_t > m_rfallindx
Map of reaction index to falloff reaction index (i.e indices in m_falloff_low_rates and m_falloff_hig...
Definition: GasKinetics.h:82
A reaction with a non-reacting third body "M" that acts to add or remove energy from the reacting spe...
Definition: Reaction.h:110
void scatter_copy(InputIter begin, InputIter end, OutputIter result, IndexIter index)
Copies a contiguous range in a sequence to indexed positions in another sequence. ...
Definition: utilities.h:439
vector_fp m_dn
Difference between the global reactants order and the global products order.
Definition: BulkKinetics.h:58
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
Definition: ct_defs.h:64
size_t m_ii
Number of reactions in the mechanism.
Definition: Kinetics.h:978
const int ELEMENTARY_RXN
A reaction with a rate coefficient that depends only on temperature and voltage that also obeys mass-...
Definition: reaction_defs.h:30
size_t nReactions() const
Number of reactions in the reaction mechanism.
Definition: Kinetics.h:193
virtual void finalize()
Finish adding reactions and prepare for use.
virtual void addReaction(ReactionData &r)
Add a single reaction to the mechanism.
virtual void modifyReaction(size_t i, shared_ptr< Reaction > rNew)
Modify the rate expression associated with a reaction.
Rate1< Arrhenius > m_falloff_low_rates
Rate expressions for falloff reactions at the low-pressure limit.
Definition: GasKinetics.h:85
virtual void finalize()
Finish adding reactions and prepare for use.
virtual void getReactionDelta(const doublereal *property, doublereal *deltaProperty)
Change in species properties.
Definition: Kinetics.cpp:456