15const string WhereSetContext =
16 "VibrationalRelaxationRate::setContext";
42 double A,
double b,
double C0,
double C13,
43 double Cm,
double m,
double Cn,
double n)
68 node[
"negative-A"] =
true;
74 node[
"rate-constant"] = std::move(rateNode);
77void VibrationalRelaxationRate::getPreExponentialFactor(
84 rateNode[
"__unconvertible__"] =
true;
102 "Vibrational relaxation rates do not support reversible "
110 if (equation.empty()) {
112 "VibrationalRelaxationRate::check",
113 "Detected negative pre-exponential constant A={}. "
114 "Set 'negative-A: true' to allow it.",
119 "VibrationalRelaxationRate::check",
m_input,
120 "Undeclared negative leading pre-exponential constant found "
127 const string& equation,
const Kinetics& kin)
131 "VibrationalRelaxationRate::validate",
m_input,
132 "Rate object for reaction '{}' is not configured.",
137void VibrationalRelaxationRate::requireKeys(
const AnyMap& node,
138 const string& rateType,
const string& where,
139 std::initializer_list<string> keys)
141 for (
const auto& key : keys) {
146 "Missing required key '{}' for reaction rate type '{}'.",
154void VibrationalRelaxationRate::forbidKeys(
const AnyMap& node,
155 const string& rateType,
const string& where,
156 std::initializer_list<string> keys)
158 for (
const auto& key : keys) {
159 if (node.hasKey(key)) {
160 throw InputFileError(
163 "Key '{}' is not allowed for reaction rate type '{}'.",
Header for vibrational relaxation reaction rates in plasma kinetics.
A map of string keys to values whose type can vary at runtime.
bool hasKey(const string &key) const
Returns true if the map contains an item named key.
void setFlowStyle(bool flow=true)
Use "flow" style when outputting this AnyMap to YAML.
bool getBool(const string &key, bool default_) const
If key exists, return it as a bool, otherwise return default_.
Base class for exceptions thrown by Cantera classes.
Public interface for kinetics managers.
double temperature() const
Temperature (K).
virtual void setParameters(const AnyMap &node, const UnitStack &units)
Set parameters.
const Units & conversionUnits() const
Get the units for converting the leading term in the reaction rate expression.
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.
Abstract base class which stores data about a reaction and its rate parameterization so that it can b...
bool reversible
True if the current reaction is reversible. False otherwise.
AnyMap input
Input data used for specific models.
Base class for a phase with thermodynamic properties.
void setContext(const Reaction &rxn, const Kinetics &kin) override
Set context of reaction rate evaluation.
virtual void getRateParameters(AnyMap &rateNode) const =0
Store the model-specific coefficients in the rate-constant node.
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 .
void validate(const string &equation, const Kinetics &kin) override
Validate the reaction rate expression.
void getParameters(AnyMap &node) const override
Write the fields shared by all vibrational relaxation rates, then delegate the model-specific rate-co...
double m_A
Pre-exponential constant for the reaction rate.
VibrationalRelaxationRate()
Default constructor.
double ddTScaledFromStruct(const VibrationalRelaxationData &shared_data) const
Evaluate the scaled temperature derivative.
bool m_negativeA_ok
Whether a negative leading coefficient is explicitly allowed.
double m_C13
Coefficient multiplying .
double m_b
Temperature exponent for the reaction rate.
void check(const string &equation) override
Check basic syntax and settings of reaction rate expression.
double m_m
Temperature exponent used by the Cm term.
double m_C0
Dimensionless constant in the exponential.
Namespace for the Cantera kernel.
double recipT
inverse of temperature
virtual void update(double T)
Update data container based on temperature T.
double temperature
temperature
Unit aggregation utility.
Shared temperature data for vibrational relaxation rates.
void update(double T) override
Update cached temperature-dependent data directly from temperature.