| Cantera 3.0.0

Loading...
Searching...
No Matches
Falloff.cpp
Go to the documentation of this file.
1/**
2 * @file Falloff.cpp Definitions for member functions of classes derived from
3 * Falloff
4 */
5
6// This file is part of Cantera. See License.txt in the top-level directory or
7// at https://cantera.org/license.txt for license and copyright information.
8
9#include "cantera/base/stringUtils.h"
10#include "cantera/base/ctexceptions.h"
11#include "cantera/base/global.h"
12#include "cantera/base/AnyMap.h"
13#include "cantera/kinetics/Falloff.h"
14#include "cantera/kinetics/Kinetics.h"
15#include "cantera/thermo/ThermoPhase.h"
16
17 namespace Cantera
18{
19
20FalloffData::FalloffData()
21{
22 conc_3b.resize(1, NAN);
23 m_conc_3b_buf.resize(1, NAN);
24}
25
26 void FalloffData::update(double T)
27{
28 throw CanteraError("FalloffData::update",
29 "Missing state information: 'FalloffData' requires third-body concentration.");
30}
31
32 void FalloffData::update(double T, double M)
33{
34 ReactionData::update(T);
35 conc_3b[0] = M;
36}
37
38 bool FalloffData::update(const ThermoPhase& phase, const Kinetics& kin)
39{
40 double rho_m = phase.molarDensity();
41 int mf = phase.stateMFNumber();
42 double T = phase.temperature();
43 bool changed = false;
44 if (T != temperature) {
45 ReactionData::update(T);
46 changed = true;
47 }
48 if (rho_m != molar_density || mf != m_state_mf_number) {
49 molar_density = rho_m;
50 m_state_mf_number = mf;
51 conc_3b = kin.thirdBodyConcentrations();
52 changed = true;
53 }
54 return changed;
55}
56
57 void FalloffData::perturbThirdBodies(double deltaM)
58{
59 if (m_perturbed) {
60 throw CanteraError("FalloffData::perturbThirdBodies",
61 "Cannot apply another perturbation as state is already perturbed.");
62 }
63 m_conc_3b_buf = conc_3b;
64 for (auto& c3b : conc_3b) {
65 c3b *= 1. + deltaM;
66 }
67 m_perturbed = true;
68}
69
70 void FalloffData::restore()
71{
72 ReactionData::restore();
73 // only restore if there is a valid buffered value
74 if (!m_perturbed) {
75 return;
76 }
77 conc_3b = m_conc_3b_buf;
78 m_perturbed = false;
79}
80
81FalloffRate::FalloffRate(const AnyMap& node, const UnitStack& rate_units)
82 : FalloffRate()
83{
84 setParameters(node, rate_units);
85}
86
87 void FalloffRate::init(const vector<double>& c)
88{
89 warn_deprecated("FalloffRate::init",
90 "To be removed after Cantera 3.0; superseded by setFalloffCoeffs.");
91 setFalloffCoeffs(c);
92}
93
94 void FalloffRate::setLowRate(const ArrheniusRate& low)
95{
96 ArrheniusRate _low = low;
97 _low.setAllowNegativePreExponentialFactor(m_negativeA_ok);
98 _low.check(m_input.getString("equation", ""));
99 if (_low.preExponentialFactor() * m_highRate.preExponentialFactor() < 0.) {
100 throw CanteraError("FalloffRate::setLowRate",
101 "Detected inconsistent rate definitions;\nhigh and low "
102 "rate pre-exponential factors must have the same sign.");
103 }
104 m_lowRate = std::move(_low);
105}
106
107 void FalloffRate::setHighRate(const ArrheniusRate& high)
108{
109 ArrheniusRate _high = high;
110 _high.setAllowNegativePreExponentialFactor(m_negativeA_ok);
111 _high.check(m_input.getString("equation", ""));
112 if (m_lowRate.preExponentialFactor() * _high.preExponentialFactor() < 0.) {
113 throw CanteraError("FalloffRate::setHighRate",
114 "Detected inconsistent rate definitions;\nhigh and low "
115 "rate pre-exponential factors must have the same sign.");
116 }
117 m_highRate = std::move(_high);
118}
119
120 void FalloffRate::setFalloffCoeffs(const vector<double>& c)
121{
122 if (c.size() != 0) {
123 throw InputFileError("FalloffRate::setFalloffCoeffs", m_input,
124 "Incorrect number of parameters. 0 required. Received {}.",
125 c.size());
126 }
127 m_valid = true;
128}
129
130 void FalloffRate::getFalloffCoeffs(vector<double>& c) const
131{
132 c.clear();
133}
134
135 void FalloffRate::setParameters(const AnyMap& node, const UnitStack& rate_units)
136{
137 ReactionRate::setParameters(node, rate_units);
138 if (node.empty()) {
139 return;
140 }
141
142 m_negativeA_ok = node.getBool("negative-A", false);
143 if (node["type"] == "chemically-activated") {
144 m_chemicallyActivated = true;
145 }
146
147 UnitStack low_rate_units = rate_units;
148 UnitStack high_rate_units = rate_units;
149 if (rate_units.size()) {
150 if (m_chemicallyActivated) {
151 high_rate_units.join(1);
152 } else {
153 low_rate_units.join(-1);
154 }
155 }
156 if (node.hasKey("low-P-rate-constant")) {
157 m_lowRate = ArrheniusRate(
158 node["low-P-rate-constant"], node.units(), low_rate_units);
159 m_lowRate.setAllowNegativePreExponentialFactor(m_negativeA_ok);
160 }
161 if (node.hasKey("high-P-rate-constant")) {
162 m_highRate = ArrheniusRate(
163 node["high-P-rate-constant"], node.units(), high_rate_units);
164 m_highRate.setAllowNegativePreExponentialFactor(m_negativeA_ok);
165 }
166}
167
168 void FalloffRate::getParameters(AnyMap& node) const
169{
170 if (m_negativeA_ok) {
171 node["negative-A"] = true;
172 }
173 AnyMap rNode;
174 m_lowRate.getRateParameters(rNode);
175 if (!rNode.empty()) {
176 node["low-P-rate-constant"] = std::move(rNode);
177 }
178 rNode.clear();
179 m_highRate.getRateParameters(rNode);
180 if (!rNode.empty()) {
181 node["high-P-rate-constant"] = std::move(rNode);
182 }
183}
184
185 void FalloffRate::check(const string& equation)
186{
187 m_lowRate.check(equation);
188 m_highRate.check(equation);
189 if (!m_lowRate.valid() || !m_highRate.valid()) {
190 // arrhenius rates are not initialized
191 return;
192 }
193 if (m_lowRate.preExponentialFactor() * m_highRate.preExponentialFactor() < 0) {
194 throw InputFileError("FalloffRate::check", m_input,
195 "Inconsistent rate definitions found in reaction '{}';\nhigh and low "
196 "rate pre-exponential factors must have the same sign.", equation);
197 }
198}
199
200 void FalloffRate::validate(const string& equation, const Kinetics& kin)
201{
202 try {
203 m_lowRate.validate(equation, kin);
204 m_highRate.validate(equation, kin);
205 } catch (CanteraError& err) {
206 throw InputFileError("FalloffRate::validate", m_input, err.getMessage());
207 }
208}
209
210LindemannRate::LindemannRate(const AnyMap& node, const UnitStack& rate_units)
211 : LindemannRate()
212{
213 setParameters(node, rate_units);
214}
215
216LindemannRate::LindemannRate(const ArrheniusRate& low, const ArrheniusRate& high,
217 const vector<double>& c)
218 : LindemannRate()
219{
220 m_lowRate = low;
221 m_highRate = high;
222 setFalloffCoeffs(c);
223}
224
225 TroeRate::TroeRate(const AnyMap& node, const UnitStack& rate_units)
226 : TroeRate()
227{
228 setParameters(node, rate_units);
229}
230
231 TroeRate::TroeRate(const ArrheniusRate& low, const ArrheniusRate& high,
232 const vector<double>& c)
233 : TroeRate()
234{
235 m_lowRate = low;
236 m_highRate = high;
237 setFalloffCoeffs(c);
238}
239
240 void TroeRate::setFalloffCoeffs(const vector<double>& c)
241{
242 if (c.size() != 3 && c.size() != 4) {
243 throw InputFileError("TroeRate::setFalloffCoeffs", m_input,
244 "Incorrect number of coefficients. 3 or 4 required. Received {}.",
245 c.size());
246 }
247 m_a = c[0];
248 if (std::abs(c[1]) < SmallNumber) {
249 m_rt3 = std::numeric_limits<double>::infinity();
250 } else {
251 m_rt3 = 1.0 / c[1];
252 }
253
254 if (std::abs(c[2]) < SmallNumber) {
255 m_rt1 = std::numeric_limits<double>::infinity();
256 } else {
257 m_rt1 = 1.0 / c[2];
258 }
259
260 if (c.size() == 4) {
261 if (std::abs(c[3]) < SmallNumber) {
262 warn_user("TroeRate::setFalloffCoeffs",
263 "Unexpected parameter value T2=0. Omitting exp(T2/T) term from "
264 "falloff expression. To suppress this warning, remove value "
265 "for T2 from the input file. In the unlikely case that the "
266 "exp(T2/T) term should be included with T2 effectively equal "
267 "to 0, set T2 to a sufficiently small value "
268 "(for example, T2 < 1e-16).");
269 }
270 m_t2 = c[3];
271 } else {
272 m_t2 = 0.;
273 }
274 m_valid = true;
275}
276
277 void TroeRate::getFalloffCoeffs(vector<double>& c) const
278{
279 if (std::abs(m_t2) < SmallNumber) {
280 c.resize(3);
281 } else {
282 c.resize(4, 0.);
283 c[3] = m_t2;
284 }
285 c[0] = m_a;
286 c[1] = 1.0 / m_rt3;
287 c[2] = 1.0 / m_rt1;
288}
289
290 void TroeRate::updateTemp(double T, double* work) const
291{
292 double Fcent = (1.0 - m_a) * exp(-T*m_rt3) + m_a * exp(-T*m_rt1);
293 if (m_t2) {
294 Fcent += exp(- m_t2 / T);
295 }
296 *work = log10(std::max(Fcent, SmallNumber));
297}
298
299 double TroeRate::F(double pr, const double* work) const
300{
301 double lpr = log10(std::max(pr,SmallNumber));
302 double cc = -0.4 - 0.67 * (*work);
303 double nn = 0.75 - 1.27 * (*work);
304 double f1 = (lpr + cc)/ (nn - 0.14 * (lpr + cc));
305 double lgf = (*work) / (1.0 + f1 * f1);
306 return pow(10.0, lgf);
307}
308
309 void TroeRate::setParameters(const AnyMap& node, const UnitStack& rate_units)
310{
311 if (node.empty()) {
312 return;
313 }
314
315 FalloffRate::setParameters(node, rate_units);
316 auto& f = node["Troe"].as<AnyMap>();
317 if (f.empty()) {
318 return;
319 }
320 vector<double> params{
321 f["A"].asDouble(),
322 f["T3"].asDouble(),
323 f["T1"].asDouble()
324 };
325 if (f.hasKey("T2")) {
326 params.push_back(f["T2"].asDouble());
327 }
328 setFalloffCoeffs(params);
329}
330
331 void TroeRate::getParameters(double* params) const {
332 warn_deprecated("TroeRate::getParameters",
333 "To be removed after Cantera 3.0; superseded by getFalloffCoeffs.");
334 params[0] = m_a;
335 params[1] = 1.0/m_rt3;
336 params[2] = 1.0/m_rt1;
337 params[3] = m_t2;
338}
339
340 void TroeRate::getParameters(AnyMap& node) const
341{
342 FalloffRate::getParameters(node);
343
344 AnyMap params;
345 if (valid()) {
346 params["A"] = m_a;
347 params["T3"].setQuantity(1.0 / m_rt3, "K");
348 params["T1"].setQuantity(1.0 / m_rt1, "K");
349 if (std::abs(m_t2) > SmallNumber) {
350 params["T2"].setQuantity(m_t2, "K");
351 }
352 }
353 params.setFlowStyle();
354 node["Troe"] = std::move(params);
355}
356
357 SriRate::SriRate(const AnyMap& node, const UnitStack& rate_units)
358 : SriRate()
359{
360 setParameters(node, rate_units);
361}
362
363 void SriRate::setFalloffCoeffs(const vector<double>& c)
364{
365 if (c.size() != 3 && c.size() != 5) {
366 throw InputFileError("SriRate::setFalloffCoeffs", m_input,
367 "Incorrect number of coefficients. 3 or 5 required. Received {}.",
368 c.size());
369 }
370
371 if (c[2] < 0.0) {
372 throw InputFileError("SriRate::setFalloffCoeffs()", m_input,
373 "m_c parameter is less than zero: {}", c[2]);
374 }
375 m_a = c[0];
376 m_b = c[1];
377 m_c = c[2];
378
379 if (c.size() == 5) {
380 if (c[3] < 0.0) {
381 throw InputFileError("SriRate::setFalloffCoeffs()", m_input,
382 "m_d parameter is less than zero: {}", c[3]);
383 }
384 m_d = c[3];
385 m_e = c[4];
386 } else {
387 m_d = 1.0;
388 m_e = 0.0;
389 }
390 m_valid = true;
391}
392
393 void SriRate::getFalloffCoeffs(vector<double>& c) const
394{
395 if (m_e < SmallNumber && std::abs(m_e - 1.) < SmallNumber) {
396 c.resize(3);
397 } else {
398 c.resize(5, 0.);
399 c[3] = m_d;
400 c[4] = m_e;
401 }
402 c[0] = m_a;
403 c[1] = m_b;
404 c[2] = m_c;
405}
406
407 void SriRate::updateTemp(double T, double* work) const
408{
409 *work = m_a * exp(- m_b / T);
410 if (m_c != 0.0) {
411 *work += exp(- T/m_c);
412 }
413 work[1] = m_d * pow(T,m_e);
414}
415
416 double SriRate::F(double pr, const double* work) const
417{
418 double lpr = log10(std::max(pr,SmallNumber));
419 double xx = 1.0/(1.0 + lpr*lpr);
420 return pow(*work, xx) * work[1];
421}
422
423 void SriRate::setParameters(const AnyMap& node, const UnitStack& rate_units)
424{
425 if (node.empty()) {
426 return;
427 }
428
429 FalloffRate::setParameters(node, rate_units);
430 auto& f = node["SRI"].as<AnyMap>();
431 if (f.empty()) {
432 return;
433 }
434 vector<double> params{
435 f["A"].asDouble(),
436 f["B"].asDouble(),
437 f["C"].asDouble()
438 };
439 if (f.hasKey("D")) {
440 params.push_back(f["D"].asDouble());
441 }
442 if (f.hasKey("E")) {
443 params.push_back(f["E"].asDouble());
444 }
445 setFalloffCoeffs(params);
446}
447
448 void SriRate::getParameters(double* params) const
449{
450 warn_deprecated("SriRate::getParameters",
451 "To be removed after Cantera 3.0; superseded by getFalloffCoeffs.");
452 params[0] = m_a;
453 params[1] = m_b;
454 params[2] = m_c;
455 params[3] = m_d;
456 params[4] = m_e;
457}
458
459 void SriRate::getParameters(AnyMap& node) const
460{
461 FalloffRate::getParameters(node);
462
463 AnyMap params;
464 if (valid()) {
465 params["A"] = m_a;
466 params["B"].setQuantity(m_b, "K");
467 params["C"].setQuantity(m_c, "K");
468 if (m_d != 1.0 || m_e != 0.0) {
469 params["D"] = m_d;
470 params["E"] = m_e;
471 }
472 }
473 params.setFlowStyle();
474 node["SRI"] = std::move(params);
475}
476
477 TsangRate::TsangRate(const AnyMap& node, const UnitStack& rate_units)
478 : TsangRate()
479{
480 setParameters(node, rate_units);
481}
482
483 void TsangRate::setFalloffCoeffs(const vector<double>& c)
484{
485 if (c.size() != 1 && c.size() != 2) {
486 throw InputFileError("TsangRate::init", m_input,
487 "Incorrect number of coefficients. 1 or 2 required. Received {}.",
488 c.size());
489 }
490 m_a = c[0];
491
492 if (c.size() == 2) {
493 m_b = c[1];
494 }
495 else {
496 m_b = 0.0;
497 }
498 m_valid = true;
499}
500
501 void TsangRate::getFalloffCoeffs(vector<double>& c) const
502{
503 if (std::abs(m_b) < SmallNumber) {
504 c.resize(1);
505 } else {
506 c.resize(2, 0.);
507 c[1] = m_b;
508 }
509 c[0] = m_a;
510}
511
512 void TsangRate::updateTemp(double T, double* work) const
513{
514 double Fcent = m_a + (m_b * T);
515 *work = log10(std::max(Fcent, SmallNumber));
516}
517
518 double TsangRate::F(double pr, const double* work) const
519{ //identical to TroeRate::F
520 double lpr = log10(std::max(pr,SmallNumber));
521 double cc = -0.4 - 0.67 * (*work);
522 double nn = 0.75 - 1.27 * (*work);
523 double f1 = (lpr + cc)/ (nn - 0.14 * (lpr + cc));
524 double lgf = (*work) / (1.0 + f1 * f1);
525 return pow(10.0, lgf);
526}
527
528 void TsangRate::setParameters(const AnyMap& node, const UnitStack& rate_units)
529{
530 if (node.empty()) {
531 return;
532 }
533
534 FalloffRate::setParameters(node, rate_units);
535 auto& f = node["Tsang"].as<AnyMap>();
536 if (f.empty()) {
537 return;
538 }
539 vector<double> params{
540 f["A"].asDouble(),
541 f["B"].asDouble()
542 };
543 setFalloffCoeffs(params);
544}
545
546 void TsangRate::getParameters(double* params) const {
547 warn_deprecated("TsangRate::getParameters",
548 "To be removed after Cantera 3.0; superseded by getFalloffCoeffs.");
549 params[0] = m_a;
550 params[1] = m_b;
551}
552
553 void TsangRate::getParameters(AnyMap& node) const
554{
555 FalloffRate::getParameters(node);
556
557 AnyMap params;
558 if (!valid()) {
559 // pass
560 } else {
561 // Parameters do not have unit system (yet)
562 params["A"] = m_a;
563 params["B"] = m_b;
564 }
565 params.setFlowStyle();
566 node["Tsang"] = std::move(params);
567}
568
569}
AnyMap.h
Kinetics.h
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
ThermoPhase.h
Header file for class ThermoPhase, the base class for phases with thermodynamic properties,...
Cantera::AnyMap
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:427
Cantera::AnyMap::size
size_t size() const
Returns the number of elements in this map.
Definition AnyMap.h:622
Cantera::AnyMap::hasKey
bool hasKey(const string &key) const
Returns true if the map contains an item named key.
Definition AnyMap.cpp:1423
Cantera::AnyMap::units
const UnitSystem & units() const
Return the default units that should be used to convert stored values.
Definition AnyMap.h:630
Cantera::AnyMap::empty
bool empty() const
Return boolean indicating whether AnyMap is empty.
Definition AnyMap.cpp:1418
Cantera::AnyMap::setFlowStyle
void setFlowStyle(bool flow=true)
Use "flow" style when outputting this AnyMap to YAML.
Definition AnyMap.cpp:1726
Cantera::AnyMap::getBool
bool getBool(const string &key, bool default_) const
If key exists, return it as a bool, otherwise return default_.
Definition AnyMap.cpp:1515
Cantera::AnyMap::clear
void clear()
Erase all items in the mapping.
Definition AnyMap.cpp:1433
Cantera::AnyMap::getString
const string & getString(const string &key, const string &default_) const
If key exists, return it as a string, otherwise return default_.
Definition AnyMap.cpp:1530
Cantera::ArrheniusBase::setAllowNegativePreExponentialFactor
void setAllowNegativePreExponentialFactor(bool value)
Set flag indicating whether negative A values are permitted.
Definition Arrhenius.h:141
Cantera::ArrheniusBase::getRateParameters
void getRateParameters(AnyMap &node) const
Get Arrhenius parameters used to populate the rate-coefficient or equivalent field.
Definition Arrhenius.cpp:76
Cantera::ArrheniusBase::validate
void validate(const string &equation, const Kinetics &kin) override
Validate the reaction rate expression.
Definition Arrhenius.cpp:138
Cantera::ArrheniusBase::preExponentialFactor
virtual double preExponentialFactor() const
Return the pre-exponential factor A (in m, kmol, s to powers depending on the reaction order)
Definition Arrhenius.h:97
Cantera::ArrheniusBase::check
void check(const string &equation) override
Check rate expression.
Definition Arrhenius.cpp:123
Cantera::ArrheniusRate
Arrhenius reaction rate type depends only on temperature.
Definition Arrhenius.h:170
Cantera::CanteraError
Base class for exceptions thrown by Cantera classes.
Definition ctexceptions.h:66
Cantera::CanteraError::getMessage
virtual string getMessage() const
Method overridden by derived classes to format the error message.
Definition ctexceptions.cpp:45
Cantera::FalloffRate
Base class for falloff rate calculators.
Definition Falloff.h:83
Cantera::FalloffRate::setParameters
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters.
Definition Falloff.cpp:135
Cantera::FalloffRate::setHighRate
void setHighRate(const ArrheniusRate &high)
Set reaction rate in the high-pressure limit.
Definition Falloff.cpp:107
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::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::m_negativeA_ok
bool m_negativeA_ok
Flag indicating whether negative A values are permitted.
Definition Falloff.h:257
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::setLowRate
void setLowRate(const ArrheniusRate &low)
Set reaction rate in the low-pressure limit.
Definition Falloff.cpp:94
Cantera::InputFileError
Error thrown for problems processing information contained in an AnyMap or AnyValue.
Definition AnyMap.h:738
Cantera::Kinetics
Public interface for kinetics managers.
Definition Kinetics.h:126
Cantera::Kinetics::thirdBodyConcentrations
virtual const vector< double > & thirdBodyConcentrations() const
Provide direct access to current third-body concentration values.
Definition Kinetics.h:557
Cantera::LindemannRate
The Lindemann falloff parameterization.
Definition Falloff.h:272
Cantera::Phase::molarDensity
virtual double molarDensity() const
Molar density (kmol/m^3).
Definition Phase.cpp:689
Cantera::Phase::temperature
double temperature() const
Temperature (K).
Definition Phase.h:662
Cantera::Phase::stateMFNumber
int stateMFNumber() const
Return the State Mole Fraction Number.
Definition Phase.h:866
Cantera::ReactionRate::setParameters
virtual void setParameters(const AnyMap &node, const UnitStack &units)
Set parameters.
Definition ReactionRate.h:101
Cantera::ReactionRate::valid
bool valid() const
Get flag indicating whether reaction rate is set up correctly.
Definition ReactionRate.h:220
Cantera::ReactionRate::m_valid
bool m_valid
Flag indicating whether reaction rate is set up correctly.
Definition ReactionRate.h:253
Cantera::ReactionRate::m_input
AnyMap m_input
Input data used for specific models.
Definition ReactionRate.h:247
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::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::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::ThermoPhase
Base class for a phase with thermodynamic properties.
Definition ThermoPhase.h:390
Cantera::TroeRate::F
double F(double pr, const double *work) const override
The falloff function.
Definition Falloff.cpp:299
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::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::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::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::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
ctexceptions.h
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
global.h
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
Cantera::warn_user
void warn_user(const string &method, const string &msg, const Args &... args)
Print a user warning raised from method as CanteraWarning.
Definition global.h:267
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
stringUtils.h
Contains declarations for string manipulation functions within Cantera.
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::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::m_perturbed
bool m_perturbed
boolean indicating whether 3-rd body values are perturbed
Definition Falloff.h:60
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::restore
virtual void restore()
Restore data container after a perturbation.
Definition ReactionData.h:90
Cantera::UnitStack
Unit aggregation utility.
Definition Units.h:105
Cantera::UnitStack::size
size_t size() const
Size of UnitStack.
Definition Units.h:118
Cantera::UnitStack::join
void join(double exponent)
Join (update) exponent of standard units, where the updated exponent is the sum of the pre-existing e...
Definition Units.cpp:352