Loading [MathJax]/extensions/tex2jax.js
Cantera  3.2.0a1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 //! Get reaction rate in the low-pressure limit
210 const ArrheniusRate& lowRate() const {
211 return m_lowRate;
212 }
213
214 //! Set reaction rate in the low-pressure limit
215 void setLowRate(const ArrheniusRate& low);
216
217 //! Get reaction rate in the high-pressure limit
219 return m_highRate;
220 }
221
222 //! Get reaction rate in the high-pressure limit
223 const ArrheniusRate& highRate() const {
224 return m_highRate;
225 }
226
227 //! Set reaction rate in the high-pressure limit
228 void setHighRate(const ArrheniusRate& high);
229
230protected:
231 ArrheniusRate m_lowRate; //!< The reaction rate in the low-pressure limit
232 ArrheniusRate m_highRate; //!< The reaction rate in the high-pressure limit
233
234 //! Flag labeling reaction as chemically activated
236 //! Flag indicating whether negative A values are permitted
237 bool m_negativeA_ok = false;
238
239 double m_rc_low = NAN; //!< Evaluated reaction rate in the low-pressure limit
240 double m_rc_high = NAN; //!< Evaluated reaction rate in the high-pressure limit
241 vector<double> m_work; //!< Work vector
242};
243
244
245//! The Lindemann falloff parameterization.
246/**
247 * This class implements the trivial falloff function F = 1.0 @cite lindemann1922.
248 *
249 * @ingroup falloffGroup
250 */
251class LindemannRate final : public FalloffRate
252{
253public:
254 LindemannRate() = default;
255
256 LindemannRate(const AnyMap& node, const UnitStack& rate_units={});
257
258 LindemannRate(const ArrheniusRate& low, const ArrheniusRate& high,
259 const vector<double>& c);
260
261 unique_ptr<MultiRateBase> newMultiRate() const override{
262 return make_unique<MultiRate<LindemannRate, FalloffData>>();
263 }
264
265 const string subType() const override {
266 return "Lindemann";
267 }
268};
269
270
271//! The 3- or 4-parameter Troe falloff parameterization.
272/*!
273 * The falloff function defines the value of @f$ F @f$ in the following
274 * rate expression @cite gilbert1983
275 *
276 * @f[
277 * k = k_{\infty} \left( \frac{P_r}{1 + P_r} \right) F(T, P_r)
278 * @f]
279 * where
280 * @f[
281 * P_r = \frac{k_0 [M]}{k_{\infty}}
282 * @f]
283 *
284 * This parameterization is defined by
285 *
286 * @f[
287 * \log_{10} F(T, P_r) = \frac{\log_{10} F_{cent}(T)}{1 + f_1^2}
288 * @f]
289 * where
290 * @f[
291 * F_{cent}(T) = (1 - A)\exp\left(\frac{-T}{T_3}\right)
292 * + A \exp\left(\frac{-T}{T_1}\right) + \exp\left(\frac{-T_2}{T}\right)
293 * @f]
294 *
295 * @f[
296 * f_1 = \frac{\log_{10} P_r + C}{N - 0.14 (\log_{10} P_r + C)}
297 * @f]
298 *
299 * @f[
300 * C = -0.4 - 0.67 \log_{10} F_{cent}
301 * @f]
302 *
303 * @f[
304 * N = 0.75 - 1.27 \log_{10} F_{cent}
305 * @f]
306 *
307 * - If @f$ T_3 @f$ is zero, then the corresponding term is set to zero.
308 * - If @f$ T_1 @f$ is zero, then the corresponding term is set to zero.
309 * - If @f$ T_2 @f$ is zero, then the corresponding term is set to zero.
310 *
311 * @ingroup falloffGroup
312 */
313class TroeRate final : public FalloffRate
314{
315public:
316 //! Constructor
317 TroeRate() : m_a(NAN), m_rt3(0.0), m_rt1(0.0), m_t2(0.0) {
318 m_work.resize(1);
319 }
320
321 TroeRate(const AnyMap& node, const UnitStack& rate_units={});
322 TroeRate(const ArrheniusRate& low, const ArrheniusRate& high,
323 const vector<double>& c);
324
325 unique_ptr<MultiRateBase> newMultiRate() const override {
326 return make_unique<MultiRate<TroeRate, FalloffData>>();
327 }
328
329 //! Set coefficients used by parameterization
330 /*!
331 * @param c Vector of three or four doubles: The doubles are the parameters,
332 * a, T_3, T_1, and (optionally) T_2 of the Troe parameterization
333 */
334 void setFalloffCoeffs(const vector<double>& c) override;
335
336 void getFalloffCoeffs(vector<double>& c) const override;
337
338 //! Update the temperature parameters in the representation
339 /*!
340 * @param T Temperature (Kelvin)
341 * @param work Vector of working space, length 1, representing the
342 * temperature-dependent part of the parameterization.
343 */
344 void updateTemp(double T, double* work) const override;
345
346 double F(double pr, const double* work) const override;
347
348 const string subType() const override {
349 return "Troe";
350 }
351
352 size_t nParameters() const override {
353 return 4;
354 }
355
356 void setParameters(const AnyMap& node, const UnitStack& rate_units) override;
357
358 void getParameters(AnyMap& node) const override;
359
360protected:
361 //! parameter a in the 4-parameter Troe falloff function. Dimensionless
362 double m_a;
363
364 //! parameter 1/T_3 in the 4-parameter Troe falloff function. [K^-1]
365 double m_rt3;
366
367 //! parameter 1/T_1 in the 4-parameter Troe falloff function. [K^-1]
368 double m_rt1;
369
370 //! parameter T_2 in the 4-parameter Troe falloff function. [K]
371 double m_t2;
372};
373
374//! The SRI falloff function
375/*!
376 * This falloff function is based on the one originally due to Stewart et al.
377 * @cite stewart1989, which required three parameters @f$ a @f$, @f$ b @f$, and
378 * @f$ c @f$. Kee et al. @cite kee1989 generalized this slightly by adding two more
379 * parameters @f$ d @f$ and @f$ e @f$. (The original form corresponds to @f$ d = 1 @f$
380 * and @f$ e = 0 @f$.) In keeping with the nomenclature of Kee et al. @cite kee1989,
381 * the rate is referred to as the *SRI falloff function*.
382 *
383 * The falloff function defines the value of @f$ F @f$ in the following
384 * rate expression
385 * @f[
386 * k = k_{\infty} \left( \frac{P_r}{1 + P_r} \right) F
387 * @f]
388 * where
389 * @f[
390 * P_r = \frac{k_0 [M]}{k_{\infty}}
391 * @f]
392 *
393 * @f[
394 * F(T, P_r) = {\left[ a \; \exp\left(\frac{-b}{T}\right)
395 * + \exp\left(\frac{-T}{c}\right)\right]}^n \; d \; T^e
396 * @f]
397 * where
398 * @f[
399 * n = \frac{1.0}{1.0 + (\log_{10} P_r)^2}
400 * @f]
401 *
402 * @f$ c @f$ is required to be greater than or equal to zero. If it is zero, then the
403 * corresponding term is set to zero. @f$ d @f$ is required to be greater than zero.
404 *
405 * @ingroup falloffGroup
406 */
407class SriRate final : public FalloffRate
408{
409public:
410 //! Constructor
411 SriRate() : m_a(NAN), m_b(-1.0), m_c(-1.0), m_d(-1.0), m_e(-1.0) {
412 m_work.resize(2);
413 }
414
415 SriRate(const AnyMap& node, const UnitStack& rate_units={});
416
417 SriRate(const ArrheniusRate& low, const ArrheniusRate& high, const vector<double>& c)
418 : SriRate()
419 {
420 m_lowRate = low;
421 m_highRate = high;
423 }
424
425 unique_ptr<MultiRateBase> newMultiRate() const override {
426 return make_unique<MultiRate<SriRate, FalloffData>>();
427 }
428
429 //! Set coefficients used by parameterization
430 /*!
431 * @param c Vector of three or five doubles: The doubles are the parameters,
432 * a, b, c, d (optional; default 1.0), and e (optional; default
433 * 0.0) of the SRI parameterization
434 */
435 void setFalloffCoeffs(const vector<double>& c) override;
436
437 void getFalloffCoeffs(vector<double>& c) const override;
438
439 //! Update the temperature parameters in the representation
440 /*!
441 * @param T Temperature (Kelvin)
442 * @param work Vector of working space, length 2, representing the
443 * temperature-dependent part of the parameterization.
444 */
445 void updateTemp(double T, double* work) const override;
446
447 double F(double pr, const double* work) const override;
448
449 const string subType() const override {
450 return "SRI";
451 }
452
453 size_t nParameters() const override {
454 return 5;
455 }
456
457 void setParameters(const AnyMap& node, const UnitStack& rate_units) override;
458 void getParameters(AnyMap& node) const override;
459
460protected:
461 //! parameter a in the 5-parameter SRI falloff function. Dimensionless.
462 double m_a;
463
464 //! parameter b in the 5-parameter SRI falloff function. [K]
465 double m_b;
466
467 //! parameter c in the 5-parameter SRI falloff function. [K]
468 double m_c;
469
470 //! parameter d in the 5-parameter SRI falloff function. Dimensionless.
471 double m_d;
472
473 //! parameter d in the 5-parameter SRI falloff function. Dimensionless.
474 double m_e;
475};
476
477//! The 1- or 2-parameter Tsang falloff parameterization.
478/*!
479 * The Tsang falloff model is adapted from that of Troe.
480 * It provides a constant or linear in temperature value for @f$ F_{cent} @f$:
481 * @f[ F_{cent} = A + B*T @f]
482 *
483 * The value of @f$ F_{cent} @f$ is then applied to Troe's model for the
484 * determination of the value of @f$ F(T, P_r) @f$:
485 * @f[ \log_{10} F(T, P_r) = \frac{\log_{10} F_{cent}(T)}{1 + f_1^2} @f]
486 * where
487 * @f[ f_1 = \frac{\log_{10} P_r + C}{N - 0.14 (\log_{10} P_r + C)} @f]
488 *
489 * @f[ C = -0.4 - 0.67 \log_{10} F_{cent} @f]
490 *
491 * @f[ N = 0.75 - 1.27 \log_{10} F_{cent} @f]
492 *
493 * References:
494 * * Example of reaction database developed by Tsang utilizing this format
495 * @cite tsang1991
496 * * Example of Chemkin implementation of Tsang format (supplemental materials)
497 * @cite lucassen2011
498 *
499 * @ingroup falloffGroup
500 */
501class TsangRate final : public FalloffRate
502{
503public:
504 //! Constructor
505 TsangRate() : m_a(NAN), m_b(0.0) {
506 m_work.resize(1);
507 }
508
509 TsangRate(const AnyMap& node, const UnitStack& rate_units={});
510
511 TsangRate(const ArrheniusRate& low, const ArrheniusRate& high, const vector<double>& c)
512 : TsangRate()
513 {
514 m_lowRate = low;
515 m_highRate = high;
517 }
518
519 unique_ptr<MultiRateBase> newMultiRate() const override {
520 return make_unique<MultiRate<TsangRate, FalloffData>>();
521 }
522
523 //! Set coefficients used by parameterization
524 /*!
525 * @param c Vector of one or two doubles: The doubles are the parameters,
526 * a and (optionally) b of the Tsang F_cent parameterization
527 */
528 void setFalloffCoeffs(const vector<double>& c) override;
529
530 void getFalloffCoeffs(vector<double>& c) const override;
531
532 //! Update the temperature parameters in the representation
533 /*!
534 * @param T Temperature (Kelvin)
535 * @param work Vector of working space, length 1, representing the
536 * temperature-dependent part of the parameterization.
537 */
538 void updateTemp(double T, double* work) const override;
539
540 double F(double pr, const double* work) const override;
541
542 const string subType() const override {
543 return "Tsang";
544 }
545
546 size_t nParameters() const override {
547 return 2;
548 }
549
550 void setParameters(const AnyMap& node, const UnitStack& rate_units) override;
551
552 void getParameters(AnyMap& node) const override;
553
554protected:
555 //! parameter a in the Tsang F_cent formulation. Dimensionless
556 double m_a;
557
558 //! parameter b in the Tsang F_cent formulation. [K^-1]
559 double m_b;
560};
561
562typedef FalloffRate Falloff;
564typedef TroeRate Troe;
565typedef SriRate SRI;
566typedef TsangRate Tsang;
567
568}
569
570#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:432
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:218
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:239
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:241
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:232
void validate(const string &equation, const Kinetics &kin) override
Validate the reaction rate expression.
Definition Falloff.cpp:193
const ArrheniusRate & lowRate() const
Get reaction rate in the low-pressure limit.
Definition Falloff.h:210
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:231
bool m_chemicallyActivated
Flag labeling reaction as chemically activated.
Definition Falloff.h:235
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:237
const ArrheniusRate & highRate() const
Get reaction rate in the high-pressure limit.
Definition Falloff.h:223
double m_rc_high
Evaluated reaction rate in the high-pressure limit.
Definition Falloff.h:240
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:252
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
Definition Falloff.h:261
const string subType() const override
String identifying sub-type of reaction rate specialization.
Definition Falloff.h:265
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:408
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:425
const string subType() const override
String identifying sub-type of reaction rate specialization.
Definition Falloff.h:449
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:471
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:462
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:468
double m_b
parameter b in the 5-parameter SRI falloff function. [K]
Definition Falloff.h:465
SriRate()
Constructor.
Definition Falloff.h:411
double m_e
parameter d in the 5-parameter SRI falloff function. Dimensionless.
Definition Falloff.h:474
size_t nParameters() const override
Returns the number of parameters used by this parameterization.
Definition Falloff.h:453
Base class for a phase with thermodynamic properties.
The 3- or 4-parameter Troe falloff parameterization.
Definition Falloff.h:314
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:325
const string subType() const override
String identifying sub-type of reaction rate specialization.
Definition Falloff.h:348
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:371
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:368
double m_a
parameter a in the 4-parameter Troe falloff function. Dimensionless
Definition Falloff.h:362
void getFalloffCoeffs(vector< double > &c) const override
Retrieve coefficients of the falloff parameterization.
Definition Falloff.cpp:270
TroeRate()
Constructor.
Definition Falloff.h:317
double m_rt3
parameter 1/T_3 in the 4-parameter Troe falloff function. [K^-1]
Definition Falloff.h:365
size_t nParameters() const override
Returns the number of parameters used by this parameterization.
Definition Falloff.h:352
The 1- or 2-parameter Tsang falloff parameterization.
Definition Falloff.h:502
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:519
const string subType() const override
String identifying sub-type of reaction rate specialization.
Definition Falloff.h:542
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:505
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:556
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:559
size_t nParameters() const override
Returns the number of parameters used by this parameterization.
Definition Falloff.h:546
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595
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