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