Cantera
Loading...
Searching...
No Matches
TwoTempPlasmaRate.h
Go to the documentation of this file.
1//! @file TwoTempPlasmaRate.h Header for plasma reaction rates parameterized by two
2//! temperatures (gas and electron).
3
4// This file is part of Cantera. See License.txt in the top-level directory or
5// at https://cantera.org/license.txt for license and copyright information.
6
7#ifndef CT_TWOTEMPPLASMARATE_H
8#define CT_TWOTEMPPLASMARATE_H
9
10#include "Arrhenius.h"
11
12namespace Cantera
13{
14
15//! Data container holding shared data specific to TwoTempPlasmaRate.
16/**
17 * The data container `TwoTempPlasmaData` holds precalculated data common to
18 * all `TwoTempPlasmaRate` objects.
19 */
20struct TwoTempPlasmaData : public ReactionData
21{
22 TwoTempPlasmaData() = default;
23
24 bool update(const ThermoPhase& phase, const Kinetics& kin) override;
25 void update(double T) override;
26 void update(double T, double Te) override;
28
29 virtual void updateTe(double Te);
30
31 void invalidateCache() override {
33 electronTemp = NAN;
34 }
35
36 double electronTemp = 1.0; //!< electron temperature
37 double logTe = 0.0; //!< logarithm of electron temperature
38 double recipTe = 1.0; //!< inverse of electron temperature
39};
40
41//! Two temperature plasma reaction rate type depends on both
42//! gas temperature and electron temperature.
43/*!
44 * The form of the two temperature plasma reaction rate coefficient is similar to an
45 * Arrhenius reaction rate coefficient. The temperature exponent (b) is applied to
46 * the electron temperature instead. In addition, the exponential term with
47 * activation energy for electron is included.
48 *
49 * @f[
50 * k_f = A T^{b_g} T_e^b
51 * \exp\left(-\frac{E_{a,g}}{RT}\right)
52 * \exp\left(\frac{E_{a,e}(T_e - T)}{R T T_e}\right)
53 * \exp\left(-\frac{T}{T_\mathrm{inv}}\right)
54 * @f]
55 *
56 * where @f$ T_e @f$ is the electron temperature, @f$ E_{a,g} @f$ is the activation
57 * energy for gas, and @f$ E_{a,e} @f$ is the activation energy for electron, see
58 * Kossyi, et al. @cite kossyi1992.
59 * The Kossyi parameterization is generalized by the addition of two optional terms,
60 * the optional gas temperature exponent @f$ b_g @f$ (defaulting to 0) and the optional
61 * temperature scale @f$ T_\mathrm{inv} @f$ @cite capitelli2000. The term
62 * @f$ \exp(-T/T_\mathrm{inv}) @f$ is active only if a value is provided for
63 * @f$ T_\mathrm{inv} @f$.
64 *
65 * @ingroup arrheniusGroup
66 */
67class TwoTempPlasmaRate : public ArrheniusBase
68{
69public:
70 TwoTempPlasmaRate();
71
72 //! Constructor.
73 /*!
74 * @param A Pre-exponential factor. The unit system is (kmol, m, s); actual units
75 * depend on the reaction order and the dimensionality (surface or bulk).
76 * @param b Electron temperature exponent (non-dimensional).
77 * @param Ea Activation energy in energy units [J/kmol]. Defaults to 0.
78 * @param EE Activation electron energy in energy units [J/kmol]. Defaults to 0.
79 * @param bg Optional. Gas temperature exponent (non-dimensional). Defaults to 0.
80 * @param Tinv Optional. Temperature scale for the term
81 * @f$ \exp(-T/T_\mathrm{inv}) @f$ [K]. If zero, this term is omitted.
82 * Defaults to 0.
83 */
84 TwoTempPlasmaRate(double A, double b, double Ea=0.0, double EE=0.0, double bg=0.0,
85 double Tinv=0.0);
86
87 //! Constructor based on an AnyMap object instead of all parameters directly.
88 TwoTempPlasmaRate(const AnyMap& node, const UnitStack& rate_units={});
89
90 //! Set parameters from an AnyMap object.
91 void setParameters(const AnyMap& node, const UnitStack& rate_units) override;
92
93 //! Creates a new two-temperature-plasma reaction.
94 unique_ptr<MultiRateBase> newMultiRate() const override {
95 return make_unique<MultiRate<TwoTempPlasmaRate, TwoTempPlasmaData>>();
96 }
97
98 //! Returns the reaction type.
99 const string type() const override {
100 return "two-temperature-plasma";
101 }
102
103 //! Check that the reaction does not have the 'reversible: true' attribute.
104 void setContext(const Reaction& rxn, const Kinetics& kin) override;
105
106 //! Evaluates reaction rate.
107 /*!
108 * @param shared_data data shared by all reactions of a given type.
109 */
110 double evalFromStruct(const TwoTempPlasmaData& shared_data) const {
111 // m_E4_R is the electron activation energy in temperature units.
112 return m_A * std::exp(m_bg * shared_data.logT
113 + m_b * shared_data.logTe
114 - m_Ea_R * shared_data.recipT
115 + m_E4_R * (shared_data.electronTemp - shared_data.temperature)
116 * shared_data.recipTe * shared_data.recipT
117 - shared_data.temperature * m_recip_Tinv);
118 }
119
120 //! Evaluate derivative of reaction rate with respect to temperature
121 //! divided by reaction rate.
122 /*!
123 * This method does not consider changes of electron temperature.
124 * A corresponding warning is raised.
125 * @param shared_data data shared by all reactions of a given type.
126 */
127 double ddTScaledFromStruct(const TwoTempPlasmaData& shared_data) const;
128
129 //! Return the electron activation energy *Ea* [J/kmol].
131 return m_E4_R * GasConstant;
132 }
133
134protected:
135 //! Get parameters.
136 void getParameters(AnyMap& node) const override;
137
138 //! Gas temperature exponent.
139 double m_bg = 0.0;
140
141 //! Reciprocate of the temperature scale for the optional term
142 //! @f$ \exp(-T/T_\mathrm{inv}) @f$.
143 /*!
144 * A value of zero disables this term.
145 */
146 double m_recip_Tinv = 0.0;
147};
148
149}
150
151#endif
Header for reaction rates that involve Arrhenius-type kinetics.
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:431
double m_E4_R
Optional 4th energy parameter (in temperature units).
Definition Arrhenius.h:150
double m_A
Pre-exponential factor.
Definition Arrhenius.h:147
double m_b
Temperature exponent.
Definition Arrhenius.h:148
ArrheniusBase()
Default constructor.
Definition Arrhenius.h:47
double m_Ea_R
Activation energy (in temperature units).
Definition Arrhenius.h:149
Public interface for kinetics managers.
Definition Kinetics.h:124
Abstract base class which stores data about a reaction and its rate parameterization so that it can b...
Definition Reaction.h:25
Base class for a phase with thermodynamic properties.
double evalFromStruct(const TwoTempPlasmaData &shared_data) const
Evaluates reaction rate.
void setContext(const Reaction &rxn, const Kinetics &kin) override
Check that the reaction does not have the 'reversible: true' attribute.
unique_ptr< MultiRateBase > newMultiRate() const override
Creates a new two-temperature-plasma reaction.
double ddTScaledFromStruct(const TwoTempPlasmaData &shared_data) const
Evaluate derivative of reaction rate with respect to temperature divided by reaction rate.
double m_recip_Tinv
Reciprocate of the temperature scale for the optional term .
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters from an AnyMap object.
double m_bg
Gas temperature exponent.
void getParameters(AnyMap &node) const override
Get parameters.
double activationElectronEnergy() const
Return the electron activation energy Ea [J/kmol].
const string type() const override
Returns the reaction type.
const double GasConstant
Universal Gas Constant [J/kmol/K].
Definition ct_defs.h:123
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595
double recipT
inverse of temperature
virtual void update(double T)
Update data container based on temperature T.
double temperature
temperature
double logT
logarithm of temperature
virtual void invalidateCache()
Force shared data and reaction rates to be updated next time.
Data container holding shared data specific to TwoTempPlasmaRate.
bool update(const ThermoPhase &phase, const Kinetics &kin) override
Update data container based on thermodynamic phase state.
double electronTemp
electron temperature
double logTe
logarithm of electron temperature
double recipTe
inverse of electron temperature
void invalidateCache() override
Force shared data and reaction rates to be updated next time.
Unit aggregation utility.
Definition Units.h:105