Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RxnRates.h
Go to the documentation of this file.
1 /**
2  * @file RxnRates.h
3  *
4  */
5 // Copyright 2001 California Institute of Technology
6 
7 
8 #ifndef CT_RXNRATES_H
9 #define CT_RXNRATES_H
10 
11 #include "ReactionData.h"
14 
15 #include <iostream>
16 
17 namespace Cantera
18 {
19 
20 class Array2D;
21 
22 //! Arrhenius reaction rate type depends only on temperature
23 /**
24  * A reaction rate coefficient of the following form.
25  *
26  * \f[
27  * k_f = A T^b \exp (-E/RT)
28  * \f]
29  *
30  */
31 class Arrhenius
32 {
33 public:
34  //! return the rate coefficient type.
35  static int type() {
36  return ARRHENIUS_REACTION_RATECOEFF_TYPE;
37  }
38 
39  //! Default constructor.
40  Arrhenius();
41 
42  //! Constructor from ReactionData.
43  explicit Arrhenius(const ReactionData& rdata);
44 
45  /// Constructor.
46  /// @param A pre-exponential. The unit system is
47  /// (kmol, m, s). The actual units depend on the reaction
48  /// order and the dimensionality (surface or bulk).
49  /// @param b Temperature exponent. Non-dimensional.
50  /// @param E Activation energy in temperature units. Kelvin.
51  Arrhenius(doublereal A, doublereal b, doublereal E);
52 
53  //! Update concentration-dependent parts of the rate coefficient.
54  /*!
55  * For this class, there are no
56  * concentration-dependent parts, so this method does nothing.
57  */
58  void update_C(const doublereal* c) {
59  }
60 
61  /**
62  * Update the value of the logarithm of the rate constant.
63  *
64  * Note, this function should never be called for negative A values.
65  * If it does then it will produce a negative overflow result, and
66  * a zero net forwards reaction rate, instead of a negative reaction
67  * rate constant that is the expected result.
68  * @deprecated. To be removed after Cantera 2.2
69  */
70  doublereal update(doublereal logT, doublereal recipT) const {
71  return m_logA + m_b*logT - m_E*recipT;
72  }
73 
74  /**
75  * Update the value of the natural logarithm of the rate constant.
76  */
77  doublereal updateLog(doublereal logT, doublereal recipT) const {
78  return m_logA + m_b*logT - m_E*recipT;
79  }
80 
81  /**
82  * Update the value the rate constant.
83  *
84  * This function returns the actual value of the rate constant.
85  * It can be safely called for negative values of the pre-exponential
86  * factor.
87  */
88  doublereal updateRC(doublereal logT, doublereal recipT) const {
89  return m_A * std::exp(m_b*logT - m_E*recipT);
90  }
91 
92  //! @deprecated. To be removed after Cantera 2.2
93  void writeUpdateRHS(std::ostream& s) const {
94  s << " exp(" << m_logA;
95  if (m_b != 0.0) {
96  s << " + " << m_b << " * tlog";
97  }
98  if (m_E != 0.0) {
99  s << " - " << m_E << " * rt";
100  }
101  s << ");" << std::endl;
102  }
103 
104  //! Return the pre-exponential factor *A* (in m, kmol, s to powers depending
105  //! on the reaction order)
106  double preExponentialFactor() const {
107  return m_A;
108  }
109 
110  //! Return the temperature exponent *b*
111  double temperatureExponent() const {
112  return m_b;
113  }
114 
115  //! Return the activation energy divided by the gas constant (i.e. the
116  //! activation temperature) [K]
117  doublereal activationEnergy_R() const {
118  return m_E;
119  }
120 
121  //! @deprecated. To be removed after Cantera 2.2
122  static bool alwaysComputeRate() {
123  return false;
124  }
125 
126 protected:
127  doublereal m_logA, m_b, m_E, m_A;
128 };
129 
130 
131 /**
132  * An Arrhenius rate with coverage-dependent terms.
133  *
134  * The rate expression is given by:
135  * \f[
136  * k_f = A T^b \exp \left(
137  * \ln 10 \sum a_k \theta_k
138  * - \frac{1}{RT} \left( E_a + \sum E_k\theta_k \right)
139  * + \sum m_k \ln \theta_k
140  * \right)
141  * \f]
142  * where the parameters \f$ (a_k, E_k, m_k) \f$ describe the dependency on the
143  * surface coverage of species \f$k, \theta_k \f$.
144  */
146 {
147 
148 public:
149  static int type() {
150  return SURF_ARRHENIUS_REACTION_RATECOEFF_TYPE;
151  }
152 
154  explicit SurfaceArrhenius(double A, double b, double Ta);
155  explicit SurfaceArrhenius(const ReactionData& rdata);
156 
157  //! Add a coverage dependency for species *k*, with pre-exponential
158  //! dependence *a*, temperature exponent dependence *m* and activation
159  //! energy dependence *e*, where *e* is in Kelvin, i.e. energy divided by
160  //! the molar gas constant.
161  void addCoverageDependence(size_t k, doublereal a,
162  doublereal m, doublereal e);
163 
164  void update_C(const doublereal* theta) {
165  m_acov = 0.0;
166  m_ecov = 0.0;
167  m_mcov = 0.0;
168  size_t k;
169  doublereal th;
170  for (size_t n = 0; n < m_ncov; n++) {
171  k = m_sp[n];
172  m_acov += m_ac[n] * theta[k];
173  m_ecov += m_ec[n] * theta[k];
174  }
175  for (size_t n = 0; n < m_nmcov; n++) {
176  k = m_msp[n];
177  // changed n to k, dgg 1/22/04
178  th = std::max(theta[k], Tiny);
179  // th = fmaxx(theta[n], Tiny);
180  m_mcov += m_mc[n]*std::log(th);
181  }
182  }
183 
184  /**
185  * Update the value of the logarithm of the rate constant.
186  *
187  * This calculation is not safe for negative values of
188  * the preexponential.
189  * @deprecated. To be removed after Cantera 2.2
190  */
191  doublereal update(doublereal logT, doublereal recipT) const {
192  return m_logA + m_acov + m_b*logT
193  - (m_E + m_ecov)*recipT + m_mcov;
194  }
195 
196  /**
197  * Update the value the rate constant.
198  *
199  * This function returns the actual value of the rate constant.
200  * It can be safely called for negative values of the pre-exponential
201  * factor.
202  */
203  doublereal updateRC(doublereal logT, doublereal recipT) const {
204  return m_A * std::exp(std::log(10.0)*m_acov + m_b*logT -
205  (m_E + m_ecov)*recipT + m_mcov);
206  }
207 
208  doublereal activationEnergy_R() const {
209  return m_E + m_ecov;
210  }
211 
212  //! @deprecated. To be removed after Cantera 2.2
213  static bool alwaysComputeRate() {
214  return true;
215  }
216 
217 protected:
218  doublereal m_logA, m_b, m_E, m_A;
219  doublereal m_acov, m_ecov, m_mcov;
220  std::vector<size_t> m_sp, m_msp;
221  vector_fp m_ac, m_ec, m_mc;
222  size_t m_ncov, m_nmcov;
223 };
224 
225 
226 //! Arrhenius reaction rate type depends only on temperature
227 /**
228  * A reaction rate coefficient of the following form.
229  *
230  * \f[
231  * k_f = A T^b \exp (-E/RT)
232  * \f]
233  *
234  * @deprecated Duplicate of class Arrhenius. To be removed after Cantera 2.2.
235  */
237 {
238 public:
239 
240  //! return the rate coefficient type.
241  static int type() {
242  return EXCHANGE_CURRENT_REACTION_RATECOEFF_TYPE;
243  }
244 
245  //! Default constructor.
246  ExchangeCurrent();
247 
248  //! Constructor with Arrhenius parameters from a ReactionData struct.
249  explicit ExchangeCurrent(const ReactionData& rdata);
250 
251  /// Constructor.
252  /// @param A pre-exponential. The unit system is
253  /// (kmol, m, s). The actual units depend on the reaction
254  /// order and the dimensionality (surface or bulk).
255  /// @param b Temperature exponent. Non-dimensional.
256  /// @param E Activation energy in temperature units. Kelvin.
257  ExchangeCurrent(doublereal A, doublereal b, doublereal E);
258 
259  //! Update concentration-dependent parts of the rate coefficient.
260  /*!
261  * For this class, there are no
262  * concentration-dependent parts, so this method does nothing.
263  */
264  void update_C(const doublereal* c) {
265  }
266 
267  /**
268  * Update the value of the logarithm of the rate constant.
269  *
270  * Note, this function should never be called for negative A values.
271  * If it does then it will produce a negative overflow result, and
272  * a zero net forwards reaction rate, instead of a negative reaction
273  * rate constant that is the expected result.
274  * @deprecated. To be removed after Cantera 2.2
275  */
276  doublereal update(doublereal logT, doublereal recipT) const {
277  return m_logA + m_b*logT - m_E*recipT;
278  }
279 
280  /**
281  * Update the value the rate constant.
282  *
283  * This function returns the actual value of the rate constant.
284  * It can be safely called for negative values of the pre-exponential
285  * factor.
286  */
287  doublereal updateRC(doublereal logT, doublereal recipT) const {
288  return m_A * std::exp(m_b*logT - m_E*recipT);
289  }
290 
291  //! @deprecated. To be removed after Cantera 2.2
292  void writeUpdateRHS(std::ostream& s) const {
293  s << " exp(" << m_logA;
294  if (m_b != 0.0) {
295  s << " + " << m_b << " * tlog";
296  }
297  if (m_E != 0.0) {
298  s << " - " << m_E << " * rt";
299  }
300  s << ");" << std::endl;
301  }
302 
303  //! @deprecated. To be removed after Cantera 2.2
304  doublereal activationEnergy_R() const {
305  return m_E;
306  }
307 
308  //! @deprecated. To be removed after Cantera 2.2
309  static bool alwaysComputeRate() {
310  return false;
311  }
312 
313 protected:
314  doublereal m_logA, m_b, m_E, m_A;
315 };
316 
317 //! Pressure-dependent reaction rate expressed by logarithmically interpolating
318 //! between Arrhenius rate expressions at various pressures.
319 class Plog
320 {
321 public:
322  //! return the rate coefficient type.
323  static int type() {
324  return PLOG_REACTION_RATECOEFF_TYPE;
325  }
326 
327  //! Default constructor.
328  Plog() {}
329 
330  //! Constructor from ReactionData.
331  explicit Plog(const ReactionData& rdata);
332 
333  //! Constructor from Arrhenius rate expressions at a set of pressures
334  explicit Plog(const std::multimap<double, Arrhenius>& rates);
335 
336  //! Update concentration-dependent parts of the rate coefficient.
337  //! @param c natural log of the pressure in Pa
338  void update_C(const doublereal* c) {
339  logP_ = c[0];
340  if (logP_ > logP1_ && logP_ < logP2_) {
341  return;
342  }
343 
344  pressureIter iter = pressures_.upper_bound(c[0]);
345  AssertThrowMsg(iter != pressures_.end(), "Plog::update_C",
346  "Pressure out of range: " + fp2str(logP_));
347  AssertThrowMsg(iter != pressures_.begin(), "Plog::update_C",
348  "Pressure out of range: " + fp2str(logP_));
349 
350  // upper interpolation pressure
351  logP2_ = iter->first;
352  ihigh1_ = iter->second.first;
353  ihigh2_ = iter->second.second;
354 
355  // lower interpolation pressure
356  logP1_ = (--iter)->first;
357  ilow1_ = iter->second.first;
358  ilow2_ = iter->second.second;
359 
360  rDeltaP_ = 1.0 / (logP2_ - logP1_);
361  }
362 
363  /**
364  * Update the value of the logarithm of the rate constant.
365  * @deprecated. To be removed after Cantera 2.2
366  */
367  doublereal update(doublereal logT, doublereal recipT) const {
368  return std::log(updateRC(logT, recipT));
369  }
370 
371  /**
372  * Update the value the rate constant.
373  *
374  * This function returns the actual value of the rate constant.
375  */
376  doublereal updateRC(doublereal logT, doublereal recipT) const {
377  double log_k1, log_k2;
378  if (ilow1_ == ilow2_) {
379  log_k1 = rates_[ilow1_].updateLog(logT, recipT);
380  } else {
381  double k = 1e-300; // non-zero to make log(k) finite
382  for (size_t i = ilow1_; i < ilow2_; i++) {
383  k += rates_[i].updateRC(logT, recipT);
384  }
385  log_k1 = std::log(k);
386  }
387 
388  if (ihigh1_ == ihigh2_) {
389  log_k2 = rates_[ihigh1_].updateLog(logT, recipT);
390  } else {
391  double k = 1e-300; // non-zero to make log(k) finite
392  for (size_t i = ihigh1_; i < ihigh2_; i++) {
393  k += rates_[i].updateRC(logT, recipT);
394  }
395  log_k2 = std::log(k);
396  }
397 
398  return std::exp(log_k1 + (log_k2-log_k1) * (logP_-logP1_) * rDeltaP_);
399  }
400 
401  //! @deprecated. To be removed after Cantera 2.2
402  doublereal activationEnergy_R() const {
403  throw CanteraError("Plog::activationEnergy_R", "Not implemented");
404  }
405 
406  //! @deprecated. To be removed after Cantera 2.2
407  static bool alwaysComputeRate() {
408  return false;
409  }
410 
411  //! Check to make sure that the rate expression is finite over a range of
412  //! temperatures at each interpolation pressure. This is potentially an
413  //! issue when one of the Arrhenius expressions at a particular pressure
414  //! has a negative pre-exponential factor.
415  void validate(const std::string& equation);
416 
417  //! Return the pressures and Arrhenius expressions which comprise this
418  //! reaction.
419  std::vector<std::pair<double, Arrhenius> > rates() const;
420 
421 protected:
422  //! log(p) to (index range) in the rates_ vector
423  std::map<double, std::pair<size_t, size_t> > pressures_;
424  typedef std::map<double, std::pair<size_t, size_t> >::iterator pressureIter;
425 
426  // Rate expressions which are referenced by the indices stored in pressures_
427  std::vector<Arrhenius> rates_;
428 
429  double logP_; //!< log(p) at the current state
430  double logP1_, logP2_; //!< log(p) at the lower / upper pressure reference
431 
432  //! Indices to the ranges within rates_ for the lower / upper pressure, such
433  //! that rates_[ilow1_] through rates_[ilow2_] (inclusive) are the rates
434  //! expressions which are combined to form the rate at the lower reference
435  //! pressure.
436  size_t ilow1_, ilow2_, ihigh1_, ihigh2_;
437 
438  double rDeltaP_; //!< reciprocal of (logP2 - logP1)
439 };
440 
441 //! Pressure-dependent rate expression where the rate coefficient is expressed
442 //! as a bivariate Chebyshev polynomial in temperature and pressure.
444 {
445 public:
446  //! return the rate coefficient type.
447  static int type() {
448  return CHEBYSHEV_REACTION_RATECOEFF_TYPE;
449  }
450 
451  //! Default constructor.
453 
454  //! Constructor from ReactionData.
455  explicit ChebyshevRate(const ReactionData& rdata);
456 
457  //! Constructor directly from coefficient array
458  /*
459  * @param Tmin Minimum temperature [K]
460  * @param Tmax Maximum temperature [K]
461  * @param Pmin Minimum pressure [Pa]
462  * @param Pmax Maximum pressure [Pa]
463  * @param coeffs Coefficient array dimensioned `nT` by `nP` where `nT` and
464  * `nP` are the number of temperatures and pressures used in the fit,
465  * respectively.
466  */
467  ChebyshevRate(double Tmin, double Tmax, double Pmin, double Pmax,
468  const Array2D& coeffs);
469 
470  //! Update concentration-dependent parts of the rate coefficient.
471  //! @param c base-10 logarithm of the pressure in Pa
472  void update_C(const doublereal* c) {
473  double Pr = (2 * c[0] + PrNum_) * PrDen_;
474  double Cnm1 = 1;
475  double Cn = Pr;
476  double Cnp1;
477  for (size_t j = 0; j < nT_; j++) {
478  dotProd_[j] = chebCoeffs_[nP_*j] + Pr * chebCoeffs_[nP_*j+1];
479  }
480  for (size_t i = 2; i < nP_; i++) {
481  Cnp1 = 2 * Pr * Cn - Cnm1;
482  for (size_t j = 0; j < nT_; j++) {
483  dotProd_[j] += Cnp1 * chebCoeffs_[nP_*j + i];
484  }
485  Cnm1 = Cn;
486  Cn = Cnp1;
487  }
488  }
489 
490  /**
491  * Update the value of the base-10 logarithm of the rate constant.
492  * @deprecated. To be removed after Cantera 2.2
493  */
494  doublereal update(doublereal logT, doublereal recipT) const {
495  return std::log10(updateRC(logT, recipT));
496  }
497 
498  /**
499  * Update the value the rate constant.
500  *
501  * This function returns the actual value of the rate constant.
502  */
503  doublereal updateRC(doublereal logT, doublereal recipT) const {
504  double Tr = (2 * recipT + TrNum_) * TrDen_;
505  double Cnm1 = 1;
506  double Cn = Tr;
507  double Cnp1;
508  double logk = dotProd_[0] + Tr * dotProd_[1];
509  for (size_t i = 2; i < nT_; i++) {
510  Cnp1 = 2 * Tr * Cn - Cnm1;
511  logk += Cnp1 * dotProd_[i];
512  Cnm1 = Cn;
513  Cn = Cnp1;
514  }
515  return std::pow(10, logk);
516  }
517 
518  //! @deprecated. To be removed after Cantera 2.2
519  doublereal activationEnergy_R() const {
520  return 0.0;
521  }
522 
523  //! @deprecated. To be removed after Cantera 2.2
524  static bool alwaysComputeRate() {
525  return false;
526  }
527 
528  //! Minimum valid temperature [K]
529  double Tmin() const {
530  return Tmin_;
531  }
532 
533  //! Maximum valid temperature [K]
534  double Tmax() const {
535  return Tmax_;
536  }
537 
538  //! Minimum valid pressure [Pa]
539  double Pmin() const {
540  return Pmin_;
541  }
542 
543  //! Maximum valid pressure [Pa]
544  double Pmax() const {
545  return Pmax_;
546  }
547 
548  //! Number of points in the pressure direction
549  size_t nPressure() const {
550  return nP_;
551  }
552 
553  //! Number of points in the temperature direction
554  size_t nTemperature() const {
555  return nT_;
556  }
557 
558  //! Access the Chebyshev coefficients.
559  /*!
560  * \f$ \alpha_{t,p} = \mathrm{coeffs}[N_P*t + p] \f$ where
561  * \f$ 0 <= t < N_T \f$ and \f$ 0 <= p < N_P \f$.
562  */
563  const vector_fp& coeffs() const {
564  return chebCoeffs_;
565  }
566 
567 protected:
568  double Tmin_, Tmax_; //!< valid temperature range
569  double Pmin_, Pmax_; //!< valid pressure range
570  double TrNum_, TrDen_; //!< terms appearing in the reduced temperature
571  double PrNum_, PrDen_; //!< terms appearing in the reduced pressure
572 
573  size_t nP_; //!< number of points in the pressure direction
574  size_t nT_; //!< number of points in the temperature direction
575  vector_fp chebCoeffs_; //!< Chebyshev coefficients, length nP * nT
576  vector_fp dotProd_; //!< dot product of chebCoeffs with the reduced pressure polynomial
577 };
578 
579 }
580 
581 #endif
size_t ilow1_
Indices to the ranges within rates_ for the lower / upper pressure, such that rates_[ilow1_] through ...
Definition: RxnRates.h:436
size_t nPressure() const
Number of points in the pressure direction.
Definition: RxnRates.h:549
doublereal activationEnergy_R() const
Definition: RxnRates.h:402
void update_C(const doublereal *c)
Update concentration-dependent parts of the rate coefficient.
Definition: RxnRates.h:58
Plog()
Default constructor.
Definition: RxnRates.h:328
doublereal activationEnergy_R() const
Definition: RxnRates.h:519
const vector_fp & coeffs() const
Access the Chebyshev coefficients.
Definition: RxnRates.h:563
void addCoverageDependence(size_t k, doublereal a, doublereal m, doublereal e)
Add a coverage dependency for species k, with pre-exponential dependence a, temperature exponent depe...
Definition: RxnRates.cpp:91
size_t nP_
number of points in the pressure direction
Definition: RxnRates.h:573
static int type()
return the rate coefficient type.
Definition: RxnRates.h:323
doublereal update(doublereal logT, doublereal recipT) const
Update the value of the logarithm of the rate constant.
Definition: RxnRates.h:191
Pressure-dependent rate expression where the rate coefficient is expressed as a bivariate Chebyshev p...
Definition: RxnRates.h:443
double logP2_
log(p) at the lower / upper pressure reference
Definition: RxnRates.h:430
doublereal activationEnergy_R() const
Return the activation energy divided by the gas constant (i.e.
Definition: RxnRates.h:117
double Pmax() const
Maximum valid pressure [Pa].
Definition: RxnRates.h:544
void writeUpdateRHS(std::ostream &s) const
Definition: RxnRates.h:93
static bool alwaysComputeRate()
Definition: RxnRates.h:122
double Pmin() const
Minimum valid pressure [Pa].
Definition: RxnRates.h:539
void update_C(const doublereal *c)
Update concentration-dependent parts of the rate coefficient.
Definition: RxnRates.h:472
Arrhenius()
Default constructor.
Definition: RxnRates.cpp:8
doublereal updateRC(doublereal logT, doublereal recipT) const
Update the value the rate constant.
Definition: RxnRates.h:287
#define AssertThrowMsg(expr, procedure, message)
Assertion must be true or an error is thrown.
Definition: ctexceptions.h:301
static int type()
return the rate coefficient type.
Definition: RxnRates.h:241
A class for 2D arrays stored in column-major (Fortran-compatible) form.
Definition: Array.h:29
doublereal updateLog(doublereal logT, doublereal recipT) const
Update the value of the natural logarithm of the rate constant.
Definition: RxnRates.h:77
std::vector< std::pair< double, Arrhenius > > rates() const
Return the pressures and Arrhenius expressions which comprise this reaction.
Definition: RxnRates.cpp:231
doublereal updateRC(doublereal logT, doublereal recipT) const
Update the value the rate constant.
Definition: RxnRates.h:203
void update_C(const doublereal *c)
Update concentration-dependent parts of the rate coefficient.
Definition: RxnRates.h:264
doublereal updateRC(doublereal logT, doublereal recipT) const
Update the value the rate constant.
Definition: RxnRates.h:503
std::string fp2str(const double x, const std::string &fmt)
Convert a double into a c++ string.
Definition: stringUtils.cpp:28
Arrhenius reaction rate type depends only on temperature.
Definition: RxnRates.h:236
size_t nTemperature() const
Number of points in the temperature direction.
Definition: RxnRates.h:554
Intermediate class which stores data about a reaction and its rate parameterization before adding the...
Definition: ReactionData.h:22
vector_fp dotProd_
dot product of chebCoeffs with the reduced pressure polynomial
Definition: RxnRates.h:576
double TrDen_
terms appearing in the reduced temperature
Definition: RxnRates.h:570
double temperatureExponent() const
Return the temperature exponent b
Definition: RxnRates.h:111
Base class for exceptions thrown by Cantera classes.
Definition: ctexceptions.h:99
static bool alwaysComputeRate()
Definition: RxnRates.h:213
void validate(const std::string &equation)
Check to make sure that the rate expression is finite over a range of temperatures at each interpolat...
Definition: RxnRates.cpp:209
Pressure-dependent reaction rate expressed by logarithmically interpolating between Arrhenius rate ex...
Definition: RxnRates.h:319
double preExponentialFactor() const
Return the pre-exponential factor A (in m, kmol, s to powers depending on the reaction order) ...
Definition: RxnRates.h:106
static bool alwaysComputeRate()
Definition: RxnRates.h:309
void update_C(const doublereal *c)
Update concentration-dependent parts of the rate coefficient.
Definition: RxnRates.h:338
Arrhenius reaction rate type depends only on temperature.
Definition: RxnRates.h:31
doublereal update(doublereal logT, doublereal recipT) const
Update the value of the base-10 logarithm of the rate constant.
Definition: RxnRates.h:494
doublereal update(doublereal logT, doublereal recipT) const
Update the value of the logarithm of the rate constant.
Definition: RxnRates.h:367
double Tmax() const
Maximum valid temperature [K].
Definition: RxnRates.h:534
doublereal update(doublereal logT, doublereal recipT) const
Update the value of the logarithm of the rate constant.
Definition: RxnRates.h:276
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
double Pmax_
valid pressure range
Definition: RxnRates.h:569
static bool alwaysComputeRate()
Definition: RxnRates.h:524
size_t nT_
number of points in the temperature direction
Definition: RxnRates.h:574
std::map< double, std::pair< size_t, size_t > > pressures_
log(p) to (index range) in the rates_ vector
Definition: RxnRates.h:423
const doublereal Tiny
Small number to compare differences of mole fractions against.
Definition: ct_defs.h:142
double logP_
log(p) at the current state
Definition: RxnRates.h:429
void writeUpdateRHS(std::ostream &s) const
Definition: RxnRates.h:292
doublereal updateRC(doublereal logT, doublereal recipT) const
Update the value the rate constant.
Definition: RxnRates.h:88
ChebyshevRate()
Default constructor.
Definition: RxnRates.h:452
static bool alwaysComputeRate()
Definition: RxnRates.h:407
Contains declarations for string manipulation functions within Cantera.
doublereal updateRC(doublereal logT, doublereal recipT) const
Update the value the rate constant.
Definition: RxnRates.h:376
doublereal activationEnergy_R() const
Definition: RxnRates.h:304
ExchangeCurrent()
Default constructor.
Definition: RxnRates.cpp:104
static int type()
return the rate coefficient type.
Definition: RxnRates.h:447
double PrDen_
terms appearing in the reduced pressure
Definition: RxnRates.h:571
double rDeltaP_
reciprocal of (logP2 - logP1)
Definition: RxnRates.h:438
An Arrhenius rate with coverage-dependent terms.
Definition: RxnRates.h:145
double Tmax_
valid temperature range
Definition: RxnRates.h:568
static int type()
return the rate coefficient type.
Definition: RxnRates.h:35
vector_fp chebCoeffs_
Chebyshev coefficients, length nP * nT.
Definition: RxnRates.h:575
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
doublereal update(doublereal logT, doublereal recipT) const
Update the value of the logarithm of the rate constant.
Definition: RxnRates.h:70
double Tmin() const
Minimum valid temperature [K].
Definition: RxnRates.h:529