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
11#include "cantera/base/global.h"
12#include "cantera/base/AnyMap.h"
13#include "cantera/kinetics/Falloff.h"
16
17namespace Cantera
18{
19
20FalloffData::FalloffData()
21{
22 conc_3b.resize(1, NAN);
23 m_conc_3b_buf.resize(1, NAN);
24}
25
26void FalloffData::update(double T)
27{
28 throw CanteraError("FalloffData::update",
29 "Missing state information: 'FalloffData' requires third-body concentration.");
30}
31
32void FalloffData::update(double T, double M)
33{
35 conc_3b[0] = M;
36}
37
38bool 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) {
46 changed = true;
47 }
48 if (rho_m != molar_density || mf != m_state_mf_number) {
49 molar_density = rho_m;
52 changed = true;
53 }
54 return changed;
55}
56
58{
59 if (m_perturbed) {
60 throw CanteraError("FalloffData::perturbThirdBodies",
61 "Cannot apply another perturbation as state is already perturbed.");
62 }
64 for (auto& c3b : conc_3b) {
65 c3b *= 1. + deltaM;
66 }
67 m_perturbed = true;
68}
69
71{
73 // only restore if there is a valid buffered value
74 if (!m_perturbed) {
75 return;
76 }
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
87void FalloffRate::init(const vector<double>& c)
88{
89 warn_deprecated("FalloffRate::init",
90 "To be removed after Cantera 3.0; superseded by setFalloffCoeffs.");
92}
93
95{
96 ArrheniusRate _low = low;
98 _low.check(m_input.getString("equation", ""));
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
108{
109 ArrheniusRate _high = high;
111 _high.check(m_input.getString("equation", ""));
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
120void 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
130void FalloffRate::getFalloffCoeffs(vector<double>& c) const
131{
132 c.clear();
133}
134
135void 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") {
145 }
146
147 UnitStack low_rate_units = rate_units;
148 UnitStack high_rate_units = rate_units;
149 if (rate_units.size()) {
151 high_rate_units.join(1);
152 } else {
153 low_rate_units.join(-1);
154 }
155 }
156 if (node.hasKey("low-P-rate-constant")) {
158 node["low-P-rate-constant"], node.units(), low_rate_units);
160 }
161 if (node.hasKey("high-P-rate-constant")) {
163 node["high-P-rate-constant"], node.units(), high_rate_units);
165 }
166}
167
169{
170 if (m_negativeA_ok) {
171 node["negative-A"] = true;
172 }
173 AnyMap rNode;
175 if (!rNode.empty()) {
176 node["low-P-rate-constant"] = std::move(rNode);
177 }
178 rNode.clear();
180 if (!rNode.empty()) {
181 node["high-P-rate-constant"] = std::move(rNode);
182 }
183}
184
185void 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 }
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
200void 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;
223}
224
225TroeRate::TroeRate(const AnyMap& node, const UnitStack& rate_units)
226 : TroeRate()
227{
228 setParameters(node, rate_units);
229}
230
231TroeRate::TroeRate(const ArrheniusRate& low, const ArrheniusRate& high,
232 const vector<double>& c)
233 : TroeRate()
234{
235 m_lowRate = low;
236 m_highRate = high;
238}
239
240void 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
277void 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
290void 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
299double 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
309void 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
331void 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
341{
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
357SriRate::SriRate(const AnyMap& node, const UnitStack& rate_units)
358 : SriRate()
359{
360 setParameters(node, rate_units);
361}
362
363void 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
393void 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
407void 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
416double 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
423void 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
448void 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
460{
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
477TsangRate::TsangRate(const AnyMap& node, const UnitStack& rate_units)
478 : TsangRate()
479{
480 setParameters(node, rate_units);
481}
482
483void 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
501void 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
512void 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
518double 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
528void 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
546void 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
554{
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}
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
Header file for class ThermoPhase, the base class for phases with thermodynamic properties,...
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:427
size_t size() const
Returns the number of elements in this map.
Definition AnyMap.h:622
bool hasKey(const string &key) const
Returns true if the map contains an item named key.
Definition AnyMap.cpp:1423
const UnitSystem & units() const
Return the default units that should be used to convert stored values.
Definition AnyMap.h:630
bool empty() const
Return boolean indicating whether AnyMap is empty.
Definition AnyMap.cpp:1418
void setFlowStyle(bool flow=true)
Use "flow" style when outputting this AnyMap to YAML.
Definition AnyMap.cpp:1726
bool getBool(const string &key, bool default_) const
If key exists, return it as a bool, otherwise return default_.
Definition AnyMap.cpp:1515
void clear()
Erase all items in the mapping.
Definition AnyMap.cpp:1433
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
void setAllowNegativePreExponentialFactor(bool value)
Set flag indicating whether negative A values are permitted.
Definition Arrhenius.h:141
void getRateParameters(AnyMap &node) const
Get Arrhenius parameters used to populate the rate-coefficient or equivalent field.
Definition Arrhenius.cpp:76
void validate(const string &equation, const Kinetics &kin) override
Validate the reaction rate expression.
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
void check(const string &equation) override
Check rate expression.
Arrhenius reaction rate type depends only on temperature.
Definition Arrhenius.h:170
Base class for exceptions thrown by Cantera classes.
virtual string getMessage() const
Method overridden by derived classes to format the error message.
Base class for falloff rate calculators.
Definition Falloff.h:83
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters.
Definition Falloff.cpp:135
void setHighRate(const ArrheniusRate &high)
Set reaction rate in the high-pressure limit.
Definition Falloff.cpp:107
virtual void setFalloffCoeffs(const vector< double > &c)
Set coefficients of the falloff parameterization.
Definition Falloff.cpp:120
virtual void getParameters(double *params) const
Get the values of the parameters for this object.
Definition Falloff.h:178
ArrheniusRate m_highRate
The reaction rate in the high-pressure limit.
Definition Falloff.h:252
void validate(const string &equation, const Kinetics &kin) override
Validate the reaction rate expression.
Definition Falloff.cpp:200
ArrheniusRate m_lowRate
The reaction rate in the low-pressure limit.
Definition Falloff.h:251
bool m_chemicallyActivated
Flag labeling reaction as chemically activated.
Definition Falloff.h:255
bool m_negativeA_ok
Flag indicating whether negative A values are permitted.
Definition Falloff.h:257
void check(const string &equation) override
Check basic syntax and settings of reaction rate expression.
Definition Falloff.cpp:185
void init(const vector< double > &c)
Initialize.
Definition Falloff.cpp:87
virtual void getFalloffCoeffs(vector< double > &c) const
Retrieve coefficients of the falloff parameterization.
Definition Falloff.cpp:130
void setLowRate(const ArrheniusRate &low)
Set reaction rate in the low-pressure limit.
Definition Falloff.cpp:94
Error thrown for problems processing information contained in an AnyMap or AnyValue.
Definition AnyMap.h:738
Public interface for kinetics managers.
Definition Kinetics.h:126
virtual const vector< double > & thirdBodyConcentrations() const
Provide direct access to current third-body concentration values.
Definition Kinetics.h:557
The Lindemann falloff parameterization.
Definition Falloff.h:272
virtual double molarDensity() const
Molar density (kmol/m^3).
Definition Phase.cpp:689
double temperature() const
Temperature (K).
Definition Phase.h:662
int stateMFNumber() const
Return the State Mole Fraction Number.
Definition Phase.h:866
virtual void setParameters(const AnyMap &node, const UnitStack &units)
Set parameters.
bool valid() const
Get flag indicating whether reaction rate is set up correctly.
bool m_valid
Flag indicating whether reaction rate is set up correctly.
AnyMap m_input
Input data used for specific models.
The SRI falloff function.
Definition Falloff.h:438
double F(double pr, const double *work) const override
The falloff function.
Definition Falloff.cpp:416
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters.
Definition Falloff.cpp:423
void setFalloffCoeffs(const vector< double > &c) override
Set coefficients used by parameterization.
Definition Falloff.cpp:363
void updateTemp(double T, double *work) const override
Update the temperature parameters in the representation.
Definition Falloff.cpp:407
double m_d
parameter d in the 5-parameter SRI falloff function. Dimensionless.
Definition Falloff.h:512
void getParameters(double *params) const override
Sets params to contain, in order,.
Definition Falloff.cpp:448
double m_a
parameter a in the 5-parameter SRI falloff function. Dimensionless.
Definition Falloff.h:503
void getFalloffCoeffs(vector< double > &c) const override
Retrieve coefficients of the falloff parameterization.
Definition Falloff.cpp:393
double m_c
parameter c in the 5-parameter SRI falloff function. [K]
Definition Falloff.h:509
double m_b
parameter b in the 5-parameter SRI falloff function. [K]
Definition Falloff.h:506
SriRate()
Constructor.
Definition Falloff.h:441
double m_e
parameter d in the 5-parameter SRI falloff function. Dimensionless.
Definition Falloff.h:515
Base class for a phase with thermodynamic properties.
double F(double pr, const double *work) const override
The falloff function.
Definition Falloff.cpp:299
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters.
Definition Falloff.cpp:309
void setFalloffCoeffs(const vector< double > &c) override
Set coefficients used by parameterization.
Definition Falloff.cpp:240
void updateTemp(double T, double *work) const override
Update the temperature parameters in the representation.
Definition Falloff.cpp:290
double m_t2
parameter T_2 in the 4-parameter Troe falloff function. [K]
Definition Falloff.h:401
void getParameters(double *params) const override
Sets params to contain, in order,.
Definition Falloff.cpp:331
double m_rt1
parameter 1/T_1 in the 4-parameter Troe falloff function. [K^-1]
Definition Falloff.h:398
double m_a
parameter a in the 4-parameter Troe falloff function. Dimensionless
Definition Falloff.h:392
void getFalloffCoeffs(vector< double > &c) const override
Retrieve coefficients of the falloff parameterization.
Definition Falloff.cpp:277
TroeRate()
Constructor.
Definition Falloff.h:337
double m_rt3
parameter 1/T_3 in the 4-parameter Troe falloff function. [K^-1]
Definition Falloff.h:395
The 1- or 2-parameter Tsang falloff parameterization.
Definition Falloff.h:543
double F(double pr, const double *work) const override
The falloff function.
Definition Falloff.cpp:518
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters.
Definition Falloff.cpp:528
void setFalloffCoeffs(const vector< double > &c) override
Set coefficients used by parameterization.
Definition Falloff.cpp:483
void updateTemp(double T, double *work) const override
Update the temperature parameters in the representation.
Definition Falloff.cpp:512
TsangRate()
Constructor.
Definition Falloff.h:546
void getParameters(double *params) const override
Sets params to contain, in order,.
Definition Falloff.cpp:546
double m_a
parameter a in the Tsang F_cent formulation. Dimensionless
Definition Falloff.h:607
void getFalloffCoeffs(vector< double > &c) const override
Retrieve coefficients of the falloff parameterization.
Definition Falloff.cpp:501
double m_b
parameter b in the Tsang F_cent formulation. [K^-1]
Definition Falloff.h:610
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
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
Namespace for the Cantera kernel.
Definition AnyMap.cpp:564
const double SmallNumber
smallest number to compare to zero.
Definition ct_defs.h:158
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
Contains declarations for string manipulation functions within Cantera.
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
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
bool m_perturbed
boolean indicating whether 3-rd body values are perturbed
Definition Falloff.h:60
virtual void update(double T)
Update data container based on temperature T
double temperature
temperature
virtual void restore()
Restore data container after a perturbation.
Unit aggregation utility.
Definition Units.h:105
size_t size() const
Size of UnitStack.
Definition Units.h:118
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