| Cantera 3.0.0

Loading...
Searching...
No Matches
Falloff.h
1// This file is part of Cantera. See License.txt in the top-level directory or
2// at https://cantera.org/license.txt for license and copyright information.
3
4#ifndef CT_FALLOFF_H
5#define CT_FALLOFF_H
6
7#include "cantera/kinetics/Arrhenius.h"
8#include "MultiRate.h"
9
10 namespace Cantera
11{
12
13 class AnyMap;
14
15//! Data container holding shared data specific to Falloff rates
16/**
17 * The data container `FalloffData` holds precalculated data common to
18 * all Falloff related reaction rate classes.
19 */
20 struct FalloffData : public ReactionData
21{
22 FalloffData();
23
24 bool update(const ThermoPhase& phase, const Kinetics& kin) override;
25
26 void update(double T) override;
27
28 void update(double T, double M) override;
29
30 using ReactionData::update;
31
32 //! Perturb third-body concentration vector of data container
33 /**
34 * The method is used for the evaluation of numerical derivatives.
35 * @param deltaM relative third-body perturbation
36 */
37 void perturbThirdBodies(double deltaM);
38
39 void restore() override;
40
41 void resize(size_t nSpecies, size_t nReactions, size_t nPhases) override {
42 conc_3b.resize(nReactions, NAN);
43 m_conc_3b_buf.resize(nReactions, NAN);
44 ready = true;
45 }
46
47 void invalidateCache() override {
48 ReactionData::invalidateCache();
49 molar_density = NAN;
50 }
51
52 bool ready = false; //!< boolean indicating whether vectors are accessible
53 double molar_density = NAN; //!< used to determine if updates are needed
54 vector<double> conc_3b; //!< vector of effective third-body concentrations
55
56 protected:
57 //! integer that is incremented when composition changes
58 int m_state_mf_number = -1;
59 //! boolean indicating whether 3-rd body values are perturbed
60 bool m_perturbed = false;
61 vector<double> m_conc_3b_buf; //!< buffered third-body concentrations
62};
63
64
65/**
66 * Base class for falloff rate calculators.
67 * Each instance of a subclass of FalloffRate calculates the falloff reaction rate
68 * based on specific implementations of the falloff function.
69 *
70 * The falloff function @f$ F(P_r, T) @f$ is implemented by FalloffRate specializations,
71 * and is defined so that the rate coefficient is
72 * @f[
73 * k = k_\infty \frac{P_r}{1 + P_r} F(P_r,T)
74 * @f]
75 *
76 * Here @f$ P_r @f$ is the reduced pressure, defined by
77 * @f[
78 * P_r = \frac{k_0 [M]}{k_\infty}.
79 * @f]
80 * @ingroup falloffGroup
81 */
82 class FalloffRate : public ReactionRate
83{
84 public:
85 FalloffRate() = default;
86
87 FalloffRate(const AnyMap& node, const UnitStack& rate_units={});
88
89 /**
90 * Initialize. Must be called before any other method is invoked.
91 *
92 * @param c Vector of coefficients of the parameterization. The number and
93 * meaning of these coefficients is subclass-dependent.
94 *
95 * @deprecated To be removed after %Cantera 3.0; superseded by setFalloffCoeffs()
96 */
97 void init(const vector<double>& c);
98
99 /**
100 * Set coefficients of the falloff parameterization.
101 *
102 * @param c Vector of coefficients of the parameterization. The number and
103 * meaning of these coefficients is subclass-dependent.
104 */
105 virtual void setFalloffCoeffs(const vector<double>& c);
106
107 /**
108 * Retrieve coefficients of the falloff parameterization.
109 *
110 * @param c Vector of coefficients of the parameterization. The number and
111 * meaning of these coefficients is subclass-dependent.
112 */
113 virtual void getFalloffCoeffs(vector<double>& c) const;
114
115 /**
116 * Update the temperature-dependent portions of the falloff function, if
117 * any, and store them in the 'work' array. If not overloaded, the default
118 * behavior is to do nothing.
119 * @param T Temperature [K].
120 * @param work storage space for intermediate results.
121 */
122 virtual void updateTemp(double T, double* work) const {}
123
124 /**
125 * The falloff function.
126 *
127 * @param pr reduced pressure (dimensionless).
128 * @param work array of size workSize() containing cached
129 * temperature-dependent intermediate results from a prior call
130 * to updateTemp.
131 * @returns the value of the falloff function @f$ F @f$ defined above
132 */
133 virtual double F(double pr, const double* work) const {
134 return 1.0;
135 }
136
137 //! Evaluate falloff function at current conditions
138 double evalF(double T, double conc3b) {
139 updateTemp(T, m_work.data());
140 double logT = std::log(T);
141 double recipT = 1. / T;
142 m_rc_low = m_lowRate.evalRate(logT, recipT);
143 m_rc_high = m_highRate.evalRate(logT, recipT);
144 double pr = conc3b * m_rc_low / (m_rc_high + SmallNumber);
145 return F(pr, m_work.data());
146 }
147
148 //! The size of the work array required.
149 /**
150 * @deprecated To be removed after %Cantera 3.0; unused.
151 */
152 virtual size_t workSize() const {
153 warn_deprecated("FalloffRate::workSize",
154 "To be removed after Cantera 3.0; unused.");
155 return 0;
156 }
157
158 const string type() const override {
159 if (m_chemicallyActivated) {
160 return "chemically-activated";
161 }
162 return "falloff";
163 }
164
165 //! Returns the number of parameters used by this parameterization. The
166 //! values of these parameters can be obtained from getParameters().
167 virtual size_t nParameters() const {
168 return 0;
169 }
170
171 void setParameters(const AnyMap& node, const UnitStack& rate_units) override;
172
173 //! Get the values of the parameters for this object. *params* must be an
174 //! array of at least nParameters() elements.
175 /**
176 * @deprecated To be removed after %Cantera 3.0; superseded by getFalloffCoeffs()
177 */
178 virtual void getParameters(double* params) const {
179 warn_deprecated("FalloffRate::getParameters",
180 "To be removed after Cantera 3.0; superseded by getFalloffCoeffs.");
181 }
182
183 void getParameters(AnyMap& node) const override;
184
185 //! Evaluate reaction rate
186 //! @param shared_data data shared by all reactions of a given type
187 double evalFromStruct(const FalloffData& shared_data) {
188 updateTemp(shared_data.temperature, m_work.data());
189 m_rc_low = m_lowRate.evalRate(shared_data.logT, shared_data.recipT);
190 m_rc_high = m_highRate.evalRate(shared_data.logT, shared_data.recipT);
191 double thirdBodyConcentration;
192 if (shared_data.ready) {
193 thirdBodyConcentration = shared_data.conc_3b[m_rate_index];
194 } else {
195 thirdBodyConcentration = shared_data.conc_3b[0];
196 }
197 double pr = thirdBodyConcentration * m_rc_low / (m_rc_high + SmallNumber);
198
199 // Apply falloff function
200 if (m_chemicallyActivated) {
201 // 1 / (1 + Pr) * F
202 pr = F(pr, m_work.data()) / (1.0 + pr);
203 return pr * m_rc_low;
204 }
205
206 // Pr / (1 + Pr) * F
207 pr *= F(pr, m_work.data()) / (1.0 + pr);
208 return pr * m_rc_high;
209 }
210
211 void check(const string& equation) override;
212 void validate(const string& equation, const Kinetics& kin) override;
213
214 //! Get flag indicating whether negative A values are permitted
215 bool allowNegativePreExponentialFactor() const {
216 return m_negativeA_ok;
217 }
218
219 //! Set flag indicating whether negative A values are permitted
220 void setAllowNegativePreExponentialFactor(bool value) {
221 m_negativeA_ok = value;
222 }
223
224 //! Get flag indicating whether reaction is chemically activated
225 bool chemicallyActivated() const {
226 return m_chemicallyActivated;
227 }
228
229 //! Set flag indicating whether reaction is chemically activated
230 void setChemicallyActivated(bool activated) {
231 m_chemicallyActivated = activated;
232 }
233
234 //! Get reaction rate in the low-pressure limit
235 ArrheniusRate& lowRate() {
236 return m_lowRate;
237 }
238
239 //! Set reaction rate in the low-pressure limit
240 void setLowRate(const ArrheniusRate& low);
241
242 //! Get reaction rate in the high-pressure limit
243 ArrheniusRate& highRate() {
244 return m_highRate;
245 }
246
247 //! Set reaction rate in the high-pressure limit
248 void setHighRate(const ArrheniusRate& high);
249
250 protected:
251 ArrheniusRate m_lowRate; //!< The reaction rate in the low-pressure limit
252 ArrheniusRate m_highRate; //!< The reaction rate in the high-pressure limit
253
254 //! Flag labeling reaction as chemically activated
255 bool m_chemicallyActivated = false;
256 //! Flag indicating whether negative A values are permitted
257 bool m_negativeA_ok = false;
258
259 double m_rc_low = NAN; //!< Evaluated reaction rate in the low-pressure limit
260 double m_rc_high = NAN; //!< Evaluated reaction rate in the high-pressure limit
261 vector<double> m_work; //!< Work vector
262};
263
264
265//! The Lindemann falloff parameterization.
266/**
267 * This class implements the trivial falloff function F = 1.0 @cite lindemann1922.
268 *
269 * @ingroup falloffGroup
270 */
271 class LindemannRate final : public FalloffRate
272{
273 public:
274 LindemannRate() = default;
275
276 LindemannRate(const AnyMap& node, const UnitStack& rate_units={});
277
278 LindemannRate(const ArrheniusRate& low, const ArrheniusRate& high,
279 const vector<double>& c);
280
281 unique_ptr<MultiRateBase> newMultiRate() const override{
282 return make_unique<MultiRate<LindemannRate, FalloffData>>();
283 }
284
285 const string subType() const override {
286 return "Lindemann";
287 }
288};
289
290
291//! The 3- or 4-parameter Troe falloff parameterization.
292/*!
293 * The falloff function defines the value of @f$ F @f$ in the following
294 * rate expression @cite gilbert1983
295 *
296 * @f[
297 * k = k_{\infty} \left( \frac{P_r}{1 + P_r} \right) F(T, P_r)
298 * @f]
299 * where
300 * @f[
301 * P_r = \frac{k_0 [M]}{k_{\infty}}
302 * @f]
303 *
304 * This parameterization is defined by
305 *
306 * @f[
307 * \log_{10} F(T, P_r) = \frac{\log_{10} F_{cent}(T)}{1 + f_1^2}
308 * @f]
309 * where
310 * @f[
311 * F_{cent}(T) = (1 - A)\exp\left(\frac{-T}{T_3}\right)
312 * + A \exp\left(\frac{-T}{T_1}\right) + \exp\left(\frac{-T_2}{T}\right)
313 * @f]
314 *
315 * @f[
316 * f_1 = \frac{\log_{10} P_r + C}{N - 0.14 (\log_{10} P_r + C)}
317 * @f]
318 *
319 * @f[
320 * C = -0.4 - 0.67 \log_{10} F_{cent}
321 * @f]
322 *
323 * @f[
324 * N = 0.75 - 1.27 \log_{10} F_{cent}
325 * @f]
326 *
327 * - If @f$ T_3 @f$ is zero, then the corresponding term is set to zero.
328 * - If @f$ T_1 @f$ is zero, then the corresponding term is set to zero.
329 * - If @f$ T_2 @f$ is zero, then the corresponding term is set to zero.
330 *
331 * @ingroup falloffGroup
332 */
333 class TroeRate final : public FalloffRate
334{
335 public:
336 //! Constructor
337 TroeRate() : m_a(NAN), m_rt3(0.0), m_rt1(0.0), m_t2(0.0) {
338 m_work.resize(1);
339 }
340
341 TroeRate(const AnyMap& node, const UnitStack& rate_units={});
342 TroeRate(const ArrheniusRate& low, const ArrheniusRate& high,
343 const vector<double>& c);
344
345 unique_ptr<MultiRateBase> newMultiRate() const override {
346 return make_unique<MultiRate<TroeRate, FalloffData>>();
347 }
348
349 //! Set coefficients used by parameterization
350 /*!
351 * @param c Vector of three or four doubles: The doubles are the parameters,
352 * a, T_3, T_1, and (optionally) T_2 of the Troe parameterization
353 */
354 void setFalloffCoeffs(const vector<double>& c) override;
355
356 void getFalloffCoeffs(vector<double>& c) const override;
357
358 //! Update the temperature parameters in the representation
359 /*!
360 * @param T Temperature (Kelvin)
361 * @param work Vector of working space, length 1, representing the
362 * temperature-dependent part of the parameterization.
363 */
364 void updateTemp(double T, double* work) const override;
365
366 double F(double pr, const double* work) const override;
367
368 size_t workSize() const override {
369 return 1;
370 }
371
372 const string subType() const override {
373 return "Troe";
374 }
375
376 size_t nParameters() const override {
377 return 4;
378 }
379
380 void setParameters(const AnyMap& node, const UnitStack& rate_units) override;
381
382 //! Sets params to contain, in order, @f[ (A, T_3, T_1, T_2) @f]
383 /**
384 * @deprecated To be removed after %Cantera 3.0; superseded by getFalloffCoeffs()
385 */
386 void getParameters(double* params) const override;
387
388 void getParameters(AnyMap& node) const override;
389
390 protected:
391 //! parameter a in the 4-parameter Troe falloff function. Dimensionless
392 double m_a;
393
394 //! parameter 1/T_3 in the 4-parameter Troe falloff function. [K^-1]
395 double m_rt3;
396
397 //! parameter 1/T_1 in the 4-parameter Troe falloff function. [K^-1]
398 double m_rt1;
399
400 //! parameter T_2 in the 4-parameter Troe falloff function. [K]
401 double m_t2;
402};
403
404//! The SRI falloff function
405/*!
406 * This falloff function is based on the one originally due to Stewart et al.
407 * @cite stewart1989, which required three parameters @f$ a @f$, @f$ b @f$, and
408 * @f$ c @f$. Kee et al. @cite kee1989 generalized this slightly by adding two more
409 * parameters @f$ d @f$ and @f$ e @f$. (The original form corresponds to @f$ d = 1 @f$
410 * and @f$ e = 0 @f$.) In keeping with the nomenclature of Kee et al. @cite kee1989,
411 * the rate is referred to as the *SRI falloff function*.
412 *
413 * The falloff function defines the value of @f$ F @f$ in the following
414 * rate expression
415 * @f[
416 * k = k_{\infty} \left( \frac{P_r}{1 + P_r} \right) F
417 * @f]
418 * where
419 * @f[
420 * P_r = \frac{k_0 [M]}{k_{\infty}}
421 * @f]
422 *
423 * @f[
424 * F(T, P_r) = {\left[ a \; \exp\left(\frac{-b}{T}\right)
425 * + \exp\left(\frac{-T}{c}\right)\right]}^n \; d \; T^e
426 * @f]
427 * where
428 * @f[
429 * n = \frac{1.0}{1.0 + (\log_{10} P_r)^2}
430 * @f]
431 *
432 * @f$ c @f$ is required to be greater than or equal to zero. If it is zero, then the
433 * corresponding term is set to zero. @f$ d @f$ is required to be greater than zero.
434 *
435 * @ingroup falloffGroup
436 */
437 class SriRate final : public FalloffRate
438{
439 public:
440 //! Constructor
441 SriRate() : m_a(NAN), m_b(-1.0), m_c(-1.0), m_d(-1.0), m_e(-1.0) {
442 m_work.resize(2);
443 }
444
445 SriRate(const AnyMap& node, const UnitStack& rate_units={});
446
447 SriRate(const ArrheniusRate& low, const ArrheniusRate& high, const vector<double>& c)
448 : SriRate()
449 {
450 m_lowRate = low;
451 m_highRate = high;
452 setFalloffCoeffs(c);
453 }
454
455 unique_ptr<MultiRateBase> newMultiRate() const override {
456 return make_unique<MultiRate<SriRate, FalloffData>>();
457 }
458
459 //! Set coefficients used by parameterization
460 /*!
461 * @param c Vector of three or five doubles: The doubles are the parameters,
462 * a, b, c, d (optional; default 1.0), and e (optional; default
463 * 0.0) of the SRI parameterization
464 */
465 void setFalloffCoeffs(const vector<double>& c) override;
466
467 void getFalloffCoeffs(vector<double>& c) const override;
468
469 //! Update the temperature parameters in the representation
470 /*!
471 * @param T Temperature (Kelvin)
472 * @param work Vector of working space, length 2, representing the
473 * temperature-dependent part of the parameterization.
474 */
475 void updateTemp(double T, double* work) const override;
476
477 double F(double pr, const double* work) const override;
478
479 size_t workSize() const override {
480 return 2;
481 }
482
483 const string subType() const override {
484 return "SRI";
485 }
486
487 size_t nParameters() const override {
488 return 5;
489 }
490
491 void setParameters(const AnyMap& node, const UnitStack& rate_units) override;
492
493 //! Sets params to contain, in order, @f[ (a, b, c, d, e) @f]
494 /**
495 * @deprecated To be removed after %Cantera 3.0; superseded by getFalloffCoeffs()
496 */
497 void getParameters(double* params) const override;
498
499 void getParameters(AnyMap& node) const override;
500
501 protected:
502 //! parameter a in the 5-parameter SRI falloff function. Dimensionless.
503 double m_a;
504
505 //! parameter b in the 5-parameter SRI falloff function. [K]
506 double m_b;
507
508 //! parameter c in the 5-parameter SRI falloff function. [K]
509 double m_c;
510
511 //! parameter d in the 5-parameter SRI falloff function. Dimensionless.
512 double m_d;
513
514 //! parameter d in the 5-parameter SRI falloff function. Dimensionless.
515 double m_e;
516};
517
518//! The 1- or 2-parameter Tsang falloff parameterization.
519/*!
520 * The Tsang falloff model is adapted from that of Troe.
521 * It provides a constant or linear in temperature value for @f$ F_{cent} @f$:
522 * @f[ F_{cent} = A + B*T @f]
523 *
524 * The value of @f$ F_{cent} @f$ is then applied to Troe's model for the
525 * determination of the value of @f$ F(T, P_r) @f$:
526 * @f[ \log_{10} F(T, P_r) = \frac{\log_{10} F_{cent}(T)}{1 + f_1^2} @f]
527 * where
528 * @f[ f_1 = \frac{\log_{10} P_r + C}{N - 0.14 (\log_{10} P_r + C)} @f]
529 *
530 * @f[ C = -0.4 - 0.67 \log_{10} F_{cent} @f]
531 *
532 * @f[ N = 0.75 - 1.27 \log_{10} F_{cent} @f]
533 *
534 * References:
535 * * Example of reaction database developed by Tsang utilizing this format
536 * @cite tsang1991
537 * * Example of Chemkin implementation of Tsang format (supplemental materials)
538 * @cite lucassen2011
539 *
540 * @ingroup falloffGroup
541 */
542 class TsangRate final : public FalloffRate
543{
544 public:
545 //! Constructor
546 TsangRate() : m_a(NAN), m_b(0.0) {
547 m_work.resize(1);
548 }
549
550 TsangRate(const AnyMap& node, const UnitStack& rate_units={});
551
552 TsangRate(const ArrheniusRate& low, const ArrheniusRate& high, const vector<double>& c)
553 : TsangRate()
554 {
555 m_lowRate = low;
556 m_highRate = high;
557 setFalloffCoeffs(c);
558 }
559
560 unique_ptr<MultiRateBase> newMultiRate() const override {
561 return make_unique<MultiRate<TsangRate, FalloffData>>();
562 }
563
564 //! Set coefficients used by parameterization
565 /*!
566 * @param c Vector of one or two doubles: The doubles are the parameters,
567 * a and (optionally) b of the Tsang F_cent parameterization
568 */
569 void setFalloffCoeffs(const vector<double>& c) override;
570
571 void getFalloffCoeffs(vector<double>& c) const override;
572
573 //! Update the temperature parameters in the representation
574 /*!
575 * @param T Temperature (Kelvin)
576 * @param work Vector of working space, length 1, representing the
577 * temperature-dependent part of the parameterization.
578 */
579 void updateTemp(double T, double* work) const override;
580
581 double F(double pr, const double* work) const override;
582
583 size_t workSize() const override {
584 return 1;
585 }
586
587 const string subType() const override {
588 return "Tsang";
589 }
590
591 size_t nParameters() const override {
592 return 2;
593 }
594
595 void setParameters(const AnyMap& node, const UnitStack& rate_units) override;
596
597 //! Sets params to contain, in order, @f[ (A, B) @f]
598 /**
599 * @deprecated To be removed after %Cantera 3.0; superseded by getFalloffCoeffs()
600 */
601 void getParameters(double* params) const override;
602
603 void getParameters(AnyMap& node) const override;
604
605 protected:
606 //! parameter a in the Tsang F_cent formulation. Dimensionless
607 double m_a;
608
609 //! parameter b in the Tsang F_cent formulation. [K^-1]
610 double m_b;
611};
612
613 typedef FalloffRate Falloff;
614 typedef LindemannRate Lindemann;
615 typedef TroeRate Troe;
616 typedef SriRate SRI;
617 typedef TsangRate Tsang;
618
619}
620
621#endif
Arrhenius.h
Header for reaction rates that involve Arrhenius-type kinetics.
MultiRate.h
Cantera::AnyMap
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:427
Cantera::ArrheniusRate
Arrhenius reaction rate type depends only on temperature.
Definition Arrhenius.h:170
Cantera::ArrheniusRate::evalRate
double evalRate(double logT, double recipT) const
Evaluate reaction rate.
Definition Arrhenius.h:183
Cantera::FalloffRate
Base class for falloff rate calculators.
Definition Falloff.h:83
Cantera::FalloffRate::highRate
ArrheniusRate & highRate()
Get reaction rate in the high-pressure limit.
Definition Falloff.h:243
Cantera::FalloffRate::evalFromStruct
double evalFromStruct(const FalloffData &shared_data)
Evaluate reaction rate.
Definition Falloff.h:187
Cantera::FalloffRate::setAllowNegativePreExponentialFactor
void setAllowNegativePreExponentialFactor(bool value)
Set flag indicating whether negative A values are permitted.
Definition Falloff.h:220
Cantera::FalloffRate::nParameters
virtual size_t nParameters() const
Returns the number of parameters used by this parameterization.
Definition Falloff.h:167
Cantera::FalloffRate::F
virtual double F(double pr, const double *work) const
The falloff function.
Definition Falloff.h:133
Cantera::FalloffRate::setParameters
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters.
Definition Falloff.cpp:135
Cantera::FalloffRate::m_rc_low
double m_rc_low
Evaluated reaction rate in the low-pressure limit.
Definition Falloff.h:259
Cantera::FalloffRate::setHighRate
void setHighRate(const ArrheniusRate &high)
Set reaction rate in the high-pressure limit.
Definition Falloff.cpp:107
Cantera::FalloffRate::m_work
vector< double > m_work
Work vector.
Definition Falloff.h:261
Cantera::FalloffRate::setFalloffCoeffs
virtual void setFalloffCoeffs(const vector< double > &c)
Set coefficients of the falloff parameterization.
Definition Falloff.cpp:120
Cantera::FalloffRate::getParameters
virtual void getParameters(double *params) const
Get the values of the parameters for this object.
Definition Falloff.h:178
Cantera::FalloffRate::m_highRate
ArrheniusRate m_highRate
The reaction rate in the high-pressure limit.
Definition Falloff.h:252
Cantera::FalloffRate::validate
void validate(const string &equation, const Kinetics &kin) override
Validate the reaction rate expression.
Definition Falloff.cpp:200
Cantera::FalloffRate::workSize
virtual size_t workSize() const
The size of the work array required.
Definition Falloff.h:152
Cantera::FalloffRate::evalF
double evalF(double T, double conc3b)
Evaluate falloff function at current conditions.
Definition Falloff.h:138
Cantera::FalloffRate::chemicallyActivated
bool chemicallyActivated() const
Get flag indicating whether reaction is chemically activated.
Definition Falloff.h:225
Cantera::FalloffRate::lowRate
ArrheniusRate & lowRate()
Get reaction rate in the low-pressure limit.
Definition Falloff.h:235
Cantera::FalloffRate::m_lowRate
ArrheniusRate m_lowRate
The reaction rate in the low-pressure limit.
Definition Falloff.h:251
Cantera::FalloffRate::m_chemicallyActivated
bool m_chemicallyActivated
Flag labeling reaction as chemically activated.
Definition Falloff.h:255
Cantera::FalloffRate::updateTemp
virtual void updateTemp(double T, double *work) const
Update the temperature-dependent portions of the falloff function, if any, and store them in the 'wor...
Definition Falloff.h:122
Cantera::FalloffRate::allowNegativePreExponentialFactor
bool allowNegativePreExponentialFactor() const
Get flag indicating whether negative A values are permitted.
Definition Falloff.h:215
Cantera::FalloffRate::m_negativeA_ok
bool m_negativeA_ok
Flag indicating whether negative A values are permitted.
Definition Falloff.h:257
Cantera::FalloffRate::m_rc_high
double m_rc_high
Evaluated reaction rate in the high-pressure limit.
Definition Falloff.h:260
Cantera::FalloffRate::check
void check(const string &equation) override
Check basic syntax and settings of reaction rate expression.
Definition Falloff.cpp:185
Cantera::FalloffRate::init
void init(const vector< double > &c)
Initialize.
Definition Falloff.cpp:87
Cantera::FalloffRate::getFalloffCoeffs
virtual void getFalloffCoeffs(vector< double > &c) const
Retrieve coefficients of the falloff parameterization.
Definition Falloff.cpp:130
Cantera::FalloffRate::type
const string type() const override
String identifying reaction rate specialization.
Definition Falloff.h:158
Cantera::FalloffRate::setLowRate
void setLowRate(const ArrheniusRate &low)
Set reaction rate in the low-pressure limit.
Definition Falloff.cpp:94
Cantera::FalloffRate::setChemicallyActivated
void setChemicallyActivated(bool activated)
Set flag indicating whether reaction is chemically activated.
Definition Falloff.h:230
Cantera::Kinetics
Public interface for kinetics managers.
Definition Kinetics.h:126
Cantera::LindemannRate
The Lindemann falloff parameterization.
Definition Falloff.h:272
Cantera::LindemannRate::newMultiRate
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
Definition Falloff.h:281
Cantera::LindemannRate::subType
const string subType() const override
String identifying sub-type of reaction rate specialization.
Definition Falloff.h:285
Cantera::ReactionRate
Abstract base class for reaction rate definitions; this base class is used by user-facing APIs to acc...
Definition ReactionRate.h:49
Cantera::ReactionRate::m_rate_index
size_t m_rate_index
Index of reaction rate within kinetics evaluator.
Definition ReactionRate.h:250
Cantera::SriRate
The SRI falloff function.
Definition Falloff.h:438
Cantera::SriRate::F
double F(double pr, const double *work) const override
The falloff function.
Definition Falloff.cpp:416
Cantera::SriRate::newMultiRate
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
Definition Falloff.h:455
Cantera::SriRate::subType
const string subType() const override
String identifying sub-type of reaction rate specialization.
Definition Falloff.h:483
Cantera::SriRate::setParameters
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters.
Definition Falloff.cpp:423
Cantera::SriRate::setFalloffCoeffs
void setFalloffCoeffs(const vector< double > &c) override
Set coefficients used by parameterization.
Definition Falloff.cpp:363
Cantera::SriRate::updateTemp
void updateTemp(double T, double *work) const override
Update the temperature parameters in the representation.
Definition Falloff.cpp:407
Cantera::SriRate::workSize
size_t workSize() const override
The size of the work array required.
Definition Falloff.h:479
Cantera::SriRate::m_d
double m_d
parameter d in the 5-parameter SRI falloff function. Dimensionless.
Definition Falloff.h:512
Cantera::SriRate::getParameters
void getParameters(double *params) const override
Sets params to contain, in order,.
Definition Falloff.cpp:448
Cantera::SriRate::m_a
double m_a
parameter a in the 5-parameter SRI falloff function. Dimensionless.
Definition Falloff.h:503
Cantera::SriRate::getFalloffCoeffs
void getFalloffCoeffs(vector< double > &c) const override
Retrieve coefficients of the falloff parameterization.
Definition Falloff.cpp:393
Cantera::SriRate::m_c
double m_c
parameter c in the 5-parameter SRI falloff function. [K]
Definition Falloff.h:509
Cantera::SriRate::m_b
double m_b
parameter b in the 5-parameter SRI falloff function. [K]
Definition Falloff.h:506
Cantera::SriRate::SriRate
SriRate()
Constructor.
Definition Falloff.h:441
Cantera::SriRate::m_e
double m_e
parameter d in the 5-parameter SRI falloff function. Dimensionless.
Definition Falloff.h:515
Cantera::SriRate::nParameters
size_t nParameters() const override
Returns the number of parameters used by this parameterization.
Definition Falloff.h:487
Cantera::ThermoPhase
Base class for a phase with thermodynamic properties.
Definition ThermoPhase.h:390
Cantera::TroeRate
The 3- or 4-parameter Troe falloff parameterization.
Definition Falloff.h:334
Cantera::TroeRate::F
double F(double pr, const double *work) const override
The falloff function.
Definition Falloff.cpp:299
Cantera::TroeRate::newMultiRate
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
Definition Falloff.h:345
Cantera::TroeRate::subType
const string subType() const override
String identifying sub-type of reaction rate specialization.
Definition Falloff.h:372
Cantera::TroeRate::setParameters
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters.
Definition Falloff.cpp:309
Cantera::TroeRate::setFalloffCoeffs
void setFalloffCoeffs(const vector< double > &c) override
Set coefficients used by parameterization.
Definition Falloff.cpp:240
Cantera::TroeRate::updateTemp
void updateTemp(double T, double *work) const override
Update the temperature parameters in the representation.
Definition Falloff.cpp:290
Cantera::TroeRate::m_t2
double m_t2
parameter T_2 in the 4-parameter Troe falloff function. [K]
Definition Falloff.h:401
Cantera::TroeRate::workSize
size_t workSize() const override
The size of the work array required.
Definition Falloff.h:368
Cantera::TroeRate::getParameters
void getParameters(double *params) const override
Sets params to contain, in order,.
Definition Falloff.cpp:331
Cantera::TroeRate::m_rt1
double m_rt1
parameter 1/T_1 in the 4-parameter Troe falloff function. [K^-1]
Definition Falloff.h:398
Cantera::TroeRate::m_a
double m_a
parameter a in the 4-parameter Troe falloff function. Dimensionless
Definition Falloff.h:392
Cantera::TroeRate::getFalloffCoeffs
void getFalloffCoeffs(vector< double > &c) const override
Retrieve coefficients of the falloff parameterization.
Definition Falloff.cpp:277
Cantera::TroeRate::TroeRate
TroeRate()
Constructor.
Definition Falloff.h:337
Cantera::TroeRate::m_rt3
double m_rt3
parameter 1/T_3 in the 4-parameter Troe falloff function. [K^-1]
Definition Falloff.h:395
Cantera::TroeRate::nParameters
size_t nParameters() const override
Returns the number of parameters used by this parameterization.
Definition Falloff.h:376
Cantera::TsangRate
The 1- or 2-parameter Tsang falloff parameterization.
Definition Falloff.h:543
Cantera::TsangRate::F
double F(double pr, const double *work) const override
The falloff function.
Definition Falloff.cpp:518
Cantera::TsangRate::newMultiRate
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
Definition Falloff.h:560
Cantera::TsangRate::subType
const string subType() const override
String identifying sub-type of reaction rate specialization.
Definition Falloff.h:587
Cantera::TsangRate::setParameters
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters.
Definition Falloff.cpp:528
Cantera::TsangRate::setFalloffCoeffs
void setFalloffCoeffs(const vector< double > &c) override
Set coefficients used by parameterization.
Definition Falloff.cpp:483
Cantera::TsangRate::updateTemp
void updateTemp(double T, double *work) const override
Update the temperature parameters in the representation.
Definition Falloff.cpp:512
Cantera::TsangRate::workSize
size_t workSize() const override
The size of the work array required.
Definition Falloff.h:583
Cantera::TsangRate::TsangRate
TsangRate()
Constructor.
Definition Falloff.h:546
Cantera::TsangRate::getParameters
void getParameters(double *params) const override
Sets params to contain, in order,.
Definition Falloff.cpp:546
Cantera::TsangRate::m_a
double m_a
parameter a in the Tsang F_cent formulation. Dimensionless
Definition Falloff.h:607
Cantera::TsangRate::getFalloffCoeffs
void getFalloffCoeffs(vector< double > &c) const override
Retrieve coefficients of the falloff parameterization.
Definition Falloff.cpp:501
Cantera::TsangRate::m_b
double m_b
parameter b in the Tsang F_cent formulation. [K^-1]
Definition Falloff.h:610
Cantera::TsangRate::nParameters
size_t nParameters() const override
Returns the number of parameters used by this parameterization.
Definition Falloff.h:591
Cantera
Namespace for the Cantera kernel.
Definition AnyMap.cpp:564
Cantera::SmallNumber
const double SmallNumber
smallest number to compare to zero.
Definition ct_defs.h:158
Cantera::warn_deprecated
void warn_deprecated(const string &source, const AnyBase &node, const string &message)
A deprecation warning for syntax in an input file.
Definition AnyMap.cpp:1926
Cantera::FalloffData
Data container holding shared data specific to Falloff rates.
Definition Falloff.h:21
Cantera::FalloffData::m_state_mf_number
int m_state_mf_number
integer that is incremented when composition changes
Definition Falloff.h:58
Cantera::FalloffData::m_conc_3b_buf
vector< double > m_conc_3b_buf
buffered third-body concentrations
Definition Falloff.h:61
Cantera::FalloffData::perturbThirdBodies
void perturbThirdBodies(double deltaM)
Perturb third-body concentration vector of data container.
Definition Falloff.cpp:57
Cantera::FalloffData::update
bool update(const ThermoPhase &phase, const Kinetics &kin) override
Update data container based on thermodynamic phase state.
Definition Falloff.cpp:38
Cantera::FalloffData::resize
void resize(size_t nSpecies, size_t nReactions, size_t nPhases) override
Update number of species, reactions and phases.
Definition Falloff.h:41
Cantera::FalloffData::ready
bool ready
boolean indicating whether vectors are accessible
Definition Falloff.h:52
Cantera::FalloffData::conc_3b
vector< double > conc_3b
vector of effective third-body concentrations
Definition Falloff.h:54
Cantera::FalloffData::molar_density
double molar_density
used to determine if updates are needed
Definition Falloff.h:53
Cantera::FalloffData::restore
void restore() override
Restore data container after a perturbation.
Definition Falloff.cpp:70
Cantera::FalloffData::invalidateCache
void invalidateCache() override
Force shared data and reaction rates to be updated next time.
Definition Falloff.h:47
Cantera::FalloffData::m_perturbed
bool m_perturbed
boolean indicating whether 3-rd body values are perturbed
Definition Falloff.h:60
Cantera::ReactionData
Data container holding shared data used for ReactionRate calculation.
Definition ReactionData.h:27
Cantera::ReactionData::recipT
double recipT
inverse of temperature
Definition ReactionData.h:112
Cantera::ReactionData::update
virtual void update(double T)
Update data container based on temperature T
Definition ReactionData.h:36
Cantera::ReactionData::temperature
double temperature
temperature
Definition ReactionData.h:110
Cantera::ReactionData::logT
double logT
logarithm of temperature
Definition ReactionData.h:111
Cantera::ReactionData::invalidateCache
virtual void invalidateCache()
Force shared data and reaction rates to be updated next time.
Definition ReactionData.h:106
Cantera::UnitStack
Unit aggregation utility.
Definition Units.h:105