15const string WhereSetParameters =
16 "StarikovskiyVibrationalRelaxationRate::setParameters";
20StarikovskiyVibrationalRelaxationRate::
21 StarikovskiyVibrationalRelaxationRate(
27StarikovskiyVibrationalRelaxationRate::
28 StarikovskiyVibrationalRelaxationRate(
29 double A,
double b,
double C0,
double C13,
double Cm,
double m,
33 if (m <= 0.0 || n <= 0.0) {
35 "StarikovskiyVibrationalRelaxationRate",
36 "The exponents 'm' and 'n' must be positive.");
45 const auto& rateMap = node[
"rate-constant"].as<
AnyMap>();
47 requireKeys(rateMap,
type(), WhereSetParameters, {
"A"});
50 rateMap,
type(), WhereSetParameters,
51 {
"C23",
"Ea",
"a",
"reference-pressure"});
53 const double m = rateMap.
getDouble(
"m", 1.0);
55 const double n = rateMap.getDouble(
"n", 1.0);
57 if (m <= 0.0 || n <= 0.0) {
61 "The Starikovskiy exponents 'm' and 'n' "
68 m_b = rateMap.getDouble(
"b", 0.0);
70 m_C0 = rateMap.getDouble(
"C0", 0.0);
71 m_C13 = rateMap.getDouble(
"C13", 0.0);
72 m_Cm = rateMap.getDouble(
"Cm", 0.0);
75 m_Cn = rateMap.getDouble(
"Cn", 0.0);
83 getPreExponentialFactor(rateNode);
87 rateNode[
"C0"] =
m_C0;
88 rateNode[
"C13"] =
m_C13;
90 rateNode[
"Cm"] =
m_Cm;
93 rateNode[
"Cn"] =
m_Cn;
Starikovskiy vibrational relaxation reaction rate.
A map of string keys to values whose type can vary at runtime.
double getDouble(const string &key, double default_) const
If key exists, return it as a double, otherwise return default_.
const UnitSystem & units() const
Return the default units that should be used to convert stored values.
const Units & conversionUnits() const
Get the units for converting the leading term in the reaction rate expression.
bool m_valid
Flag indicating whether reaction rate is set up correctly.
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters.
void getRateParameters(AnyMap &rateNode) const override
Store the model-specific coefficients in the rate-constant node.
const string type() const override
String identifying reaction rate specialization.
double convertRateCoeff(const AnyValue &val, const Units &dest) const
Convert a generic AnyValue node representing a reaction rate coefficient to the units specified in de...
Common implementation for vibrational relaxation reaction rates.
double m_n
Temperature exponent used by the Cn term.
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters.
double m_Cn
Coefficient multiplying .
double m_Cm
Coefficient multiplying .
double m_A
Pre-exponential constant for the reaction rate.
double m_C13
Coefficient multiplying .
double m_b
Temperature exponent for the reaction rate.
double m_m
Temperature exponent used by the Cm term.
double m_C0
Dimensionless constant in the exponential.
Namespace for the Cantera kernel.
Unit aggregation utility.