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