Cantera
Loading...
Searching...
No Matches
VibrationalRelaxationRate Class Referenceabstract

Common implementation for vibrational relaxation reaction rates. More...

#include <VibrationalRelaxationRate.h>

Inheritance diagram for VibrationalRelaxationRate:
[legend]

Detailed Description

Common implementation for vibrational relaxation reaction rates.

This intermediate class provides the common data storage and evaluation used by the concrete vibrational relaxation rate implementations.

Internally, the supported parameterizations are mapped to

\[k_f = A T^b \exp\left( C_0 + C_{1/3} T^{-1/3} + C_m T^{-m} + C_n T^{-n} \right). \]

Concrete derived classes are responsible for mapping their user-facing parameters onto this internal representation.

Vibrational relaxation rates are restricted to irreversible reactions.

Definition at line 67 of file VibrationalRelaxationRate.h.

Public Member Functions

void setParameters (const AnyMap &node, const UnitStack &rate_units) override
 Set parameters.
void setContext (const Reaction &rxn, const Kinetics &kin) override
 Set context of reaction rate evaluation.
double evalFromStruct (const VibrationalRelaxationData &shared_data) const
double ddTScaledFromStruct (const VibrationalRelaxationData &shared_data) const
 Evaluate the scaled temperature derivative.
void check (const string &equation) override
 Check basic syntax and settings of reaction rate expression.
void validate (const string &equation, const Kinetics &kin) override
 Validate the reaction rate expression.
Public Member Functions inherited from ReactionRate
 ReactionRate (const ReactionRate &other)
ReactionRate & operator= (const ReactionRate &other)
virtual unique_ptr< MultiRateBasenewMultiRate () const
 Create a rate evaluator for reactions of a particular derived type.
virtual const string type () const =0
 String identifying reaction rate specialization.
virtual const string subType () const
 String identifying sub-type of reaction rate specialization.
AnyMap parameters () const
 Return the parameters such that an identical Reaction could be reconstructed using the newReaction() function.
const UnitsconversionUnits () const
 Get the units for converting the leading term in the reaction rate expression.
virtual void setRateUnits (const UnitStack &rate_units)
 Set the units of the reaction rate expression.
size_t rateIndex () const
 Reaction rate index within kinetics evaluator.
void setRateIndex (size_t idx)
 Set reaction rate index within kinetics evaluator.
double eval (double T)
 Evaluate reaction rate based on temperature.
double eval (double T, double extra)
 Evaluate reaction rate based on temperature and an extra parameter.
double eval (double T, span< const double > extra)
 Evaluate reaction rate based on temperature and an extra vector parameter.
bool valid () const
 Get flag indicating whether reaction rate is set up correctly.
bool compositionDependent ()
 Boolean indicating whether rate has compositional dependence.
void setCompositionDependence (bool comp_dep)
 Set rate compositional dependence.

Protected Member Functions

 VibrationalRelaxationRate ()
 Default constructor.
 VibrationalRelaxationRate (double A, double b, double C0, double C13, double Cm, double m, double Cn, double n)
 Construct from the common internal representation.
void getParameters (AnyMap &node) const override
 Write the fields shared by all vibrational relaxation rates, then delegate the model-specific rate-constant entries to getRateParameters().
virtual void getRateParameters (AnyMap &rateNode) const =0
 Store the model-specific coefficients in the rate-constant node.
void getPreExponentialFactor (AnyMap &rateNode) const

Static Protected Member Functions

static void requireKeys (const AnyMap &node, const string &rateType, const string &where, std::initializer_list< string > keys)
static void forbidKeys (const AnyMap &node, const string &rateType, const string &where, std::initializer_list< string > keys)

Protected Attributes

double m_A = NAN
 Pre-exponential constant for the reaction rate.
double m_b = NAN
 Temperature exponent for the reaction rate.
double m_C0 = 0.0
 Dimensionless constant in the exponential.
double m_C13 = 0.0
 Coefficient multiplying \( T^{-1/3} \).
double m_Cm = 0.0
 Coefficient multiplying \( T^{-m} \).
double m_m = 1.0
 Temperature exponent used by the Cm term.
double m_Cn = 0.0
 Coefficient multiplying \( T^{-n} \).
double m_n = 1.0
 Temperature exponent used by the Cn term.
Protected Attributes inherited from ReactionRate
AnyMap m_input
 Input data used for specific models.
size_t m_rate_index = npos
 Index of reaction rate within kinetics evaluator.
bool m_valid = false
 Flag indicating whether reaction rate is set up correctly.
bool m_composition_dependent_rate = false
 Flag indicating composition dependent rate.
Units m_conversion_units {0.}
 Units of the leading term in the reaction rate expression.

Private Attributes

bool m_negativeA_ok = false
 Whether a negative leading coefficient is explicitly allowed.

Constructor & Destructor Documentation

◆ VibrationalRelaxationRate() [1/2]

VibrationalRelaxationRate ( )
protecteddefault

Default constructor.

◆ VibrationalRelaxationRate() [2/2]

VibrationalRelaxationRate ( double A,
double b,
double C0,
double C13,
double Cm,
double m,
double Cn,
double n )
protected

Construct from the common internal representation.

Parameters
APre-exponential factor.
bTemperature exponent.
C0Constant exponential coefficient.
C13Coefficient multiplying T^(-1/3).
CmCoefficient multiplying T^(-m).
mExponent associated with Cm.
CnCoefficient multiplying T^(-n).
nExponent associated with Cn.

Definition at line 41 of file VibrationalRelaxationRate.cpp.

Member Function Documentation

◆ setParameters()

void setParameters ( const AnyMap & node,
const UnitStack & units )
overridevirtual

Set parameters.

Parameters
nodeAnyMap object containing reaction rate specification
unitsunit definitions specific to rate information

Reimplemented from ReactionRate.

Definition at line 50 of file VibrationalRelaxationRate.cpp.

◆ setContext()

void setContext ( const Reaction & rxn,
const Kinetics & kin )
overridevirtual

Set context of reaction rate evaluation.

Vibrational relaxation rates are intended for irreversible non-equilibrium plasma reactions. Reversible reactions are rejected because the reverse rate cannot be obtained from conventional thermochemistry for these models.

Reimplemented from ReactionRate.

Definition at line 98 of file VibrationalRelaxationRate.cpp.

◆ evalFromStruct()

double evalFromStruct ( const VibrationalRelaxationData & shared_data) const
inline

Definition at line 81 of file VibrationalRelaxationRate.h.

◆ ddTScaledFromStruct()

double ddTScaledFromStruct ( const VibrationalRelaxationData & shared_data) const

Evaluate the scaled temperature derivative.

This returns:

\[\frac{1}{k_f} \frac{d k_f}{dT} = \frac{d \ln k_f}{dT} \]

For the internal generic expression, this is:

\[\frac{b}{T} - \frac{C_{1/3}}{3} T^{-4/3} - m C_m T^{-m-1} - n C_n T^{-n-1} \]

Definition at line 88 of file VibrationalRelaxationRate.cpp.

◆ check()

void check ( const string & equation)
overridevirtual

Check basic syntax and settings of reaction rate expression.

Reimplemented from ReactionRate.

Definition at line 107 of file VibrationalRelaxationRate.cpp.

◆ validate()

void validate ( const string & equation,
const Kinetics & kin )
overridevirtual

Validate the reaction rate expression.

Reimplemented from ReactionRate.

Definition at line 126 of file VibrationalRelaxationRate.cpp.

◆ requireKeys()

void requireKeys ( const AnyMap & node,
const string & rateType,
const string & where,
std::initializer_list< string > keys )
staticprotected

Definition at line 137 of file VibrationalRelaxationRate.cpp.

◆ forbidKeys()

void forbidKeys ( const AnyMap & node,
const string & rateType,
const string & where,
std::initializer_list< string > keys )
staticprotected

Definition at line 154 of file VibrationalRelaxationRate.cpp.

◆ getParameters()

void getParameters ( AnyMap & node) const
overrideprotectedvirtual

Write the fields shared by all vibrational relaxation rates, then delegate the model-specific rate-constant entries to getRateParameters().

Reimplemented from ReactionRate.

Definition at line 61 of file VibrationalRelaxationRate.cpp.

◆ getRateParameters()

virtual void getRateParameters ( AnyMap & rateNode) const
protectedpure virtual

◆ getPreExponentialFactor()

void getPreExponentialFactor ( AnyMap & rateNode) const
protected

Definition at line 77 of file VibrationalRelaxationRate.cpp.

Member Data Documentation

◆ m_A

double m_A = NAN
protected

Pre-exponential constant for the reaction rate.

Definition at line 159 of file VibrationalRelaxationRate.h.

◆ m_b

double m_b = NAN
protected

Temperature exponent for the reaction rate.

Definition at line 162 of file VibrationalRelaxationRate.h.

◆ m_C0

double m_C0 = 0.0
protected

Dimensionless constant in the exponential.

Definition at line 165 of file VibrationalRelaxationRate.h.

◆ m_C13

double m_C13 = 0.0
protected

Coefficient multiplying \( T^{-1/3} \).

Definition at line 168 of file VibrationalRelaxationRate.h.

◆ m_Cm

double m_Cm = 0.0
protected

Coefficient multiplying \( T^{-m} \).

Definition at line 171 of file VibrationalRelaxationRate.h.

◆ m_m

double m_m = 1.0
protected

Temperature exponent used by the Cm term.

Definition at line 174 of file VibrationalRelaxationRate.h.

◆ m_Cn

double m_Cn = 0.0
protected

Coefficient multiplying \( T^{-n} \).

Definition at line 177 of file VibrationalRelaxationRate.h.

◆ m_n

double m_n = 1.0
protected

Temperature exponent used by the Cn term.

Definition at line 180 of file VibrationalRelaxationRate.h.

◆ m_negativeA_ok

bool m_negativeA_ok = false
private

Whether a negative leading coefficient is explicitly allowed.

Definition at line 185 of file VibrationalRelaxationRate.h.


The documentation for this class was generated from the following files: