| Cantera 3.0.0

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
12 namespace 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 */
20 struct 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;
27 using ReactionData::update;
28
29 virtual void updateTe(double Te);
30
31 void invalidateCache() override {
32 ReactionData::invalidateCache();
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
42//! Two temperature plasma reaction rate type depends on both
43//! gas temperature and electron temperature.
44/*!
45 * The form of the two temperature plasma reaction rate coefficient is similar to an
46 * Arrhenius reaction rate coefficient. The temperature exponent (b) is applied to
47 * the electron temperature instead. In addition, the exponential term with
48 * activation energy for electron is included.
49 *
50 * @f[
51 * k_f = A T_e^b \exp (-E_{a,g}/RT) \exp (E_{a,e} (T_e - T)/(R T T_e))
52 * @f]
53 *
54 * where @f$ T_e @f$ is the electron temperature, @f$ E_{a,g} @f$ is the activation
55 * energy for gas, and @f$ E_{a,e} @f$ is the activation energy for electron, see
56 * Kossyi, et al. @cite kossyi1992.
57 *
58 * @ingroup arrheniusGroup
59 */
60 class TwoTempPlasmaRate : public ArrheniusBase
61{
62 public:
63 TwoTempPlasmaRate();
64
65 //! Constructor.
66 /*!
67 * @param A Pre-exponential factor. The unit system is (kmol, m, s); actual units
68 * depend on the reaction order and the dimensionality (surface or bulk).
69 * @param b Temperature exponent (non-dimensional)
70 * @param Ea Activation energy in energy units [J/kmol]
71 * @param EE Activation electron energy in energy units [J/kmol]
72 */
73 TwoTempPlasmaRate(double A, double b, double Ea=0.0, double EE=0.0);
74
75 TwoTempPlasmaRate(const AnyMap& node, const UnitStack& rate_units={});
76
77 unique_ptr<MultiRateBase> newMultiRate() const override {
78 return make_unique<MultiRate<TwoTempPlasmaRate, TwoTempPlasmaData>>();
79 }
80
81 const string type() const override {
82 return "two-temperature-plasma";
83 }
84
85 void setContext(const Reaction& rxn, const Kinetics& kin) override;
86
87 //! Evaluate reaction rate
88 /*!
89 * @param shared_data data shared by all reactions of a given type
90 */
91 double evalFromStruct(const TwoTempPlasmaData& shared_data) const {
92 // m_E4_R is the electron activation (in temperature units)
93 return m_A * std::exp(m_b * shared_data.logTe -
94 m_Ea_R * shared_data.recipT +
95 m_E4_R * (shared_data.electronTemp - shared_data.temperature)
96 * shared_data.recipTe * shared_data.recipT);
97 }
98
99 //! Evaluate derivative of reaction rate with respect to temperature
100 //! divided by reaction rate
101 /*!
102 * This method does not consider changes of electron temperature.
103 * A corresponding warning is raised.
104 * @param shared_data data shared by all reactions of a given type
105 */
106 double ddTScaledFromStruct(const TwoTempPlasmaData& shared_data) const;
107
108 //! Return the electron activation energy *Ea* [J/kmol]
109 double activationElectronEnergy() const {
110 return m_E4_R * GasConstant;
111 }
112};
113
114}
115
116#endif
Arrhenius.h
Header for reaction rates that involve Arrhenius-type kinetics.
Cantera::AnyMap
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:427
Cantera::ArrheniusBase
Base class for Arrhenius-type Parameterizations.
Definition Arrhenius.h:44
Cantera::ArrheniusBase::m_E4_R
double m_E4_R
Optional 4th energy parameter (in temperature units)
Definition Arrhenius.h:150
Cantera::ArrheniusBase::m_A
double m_A
Pre-exponential factor.
Definition Arrhenius.h:147
Cantera::ArrheniusBase::m_b
double m_b
Temperature exponent.
Definition Arrhenius.h:148
Cantera::ArrheniusBase::m_Ea_R
double m_Ea_R
Activation energy (in temperature units)
Definition Arrhenius.h:149
Cantera::Kinetics
Public interface for kinetics managers.
Definition Kinetics.h:126
Cantera::Reaction
Abstract base class which stores data about a reaction and its rate parameterization so that it can b...
Definition Reaction.h:27
Cantera::ThermoPhase
Base class for a phase with thermodynamic properties.
Definition ThermoPhase.h:390
Cantera::TwoTempPlasmaRate
Two temperature plasma reaction rate type depends on both gas temperature and electron temperature.
Definition TwoTempPlasmaRate.h:61
Cantera::TwoTempPlasmaRate::evalFromStruct
double evalFromStruct(const TwoTempPlasmaData &shared_data) const
Evaluate reaction rate.
Definition TwoTempPlasmaRate.h:91
Cantera::TwoTempPlasmaRate::setContext
void setContext(const Reaction &rxn, const Kinetics &kin) override
Set context of reaction rate evaluation.
Definition TwoTempPlasmaRate.cpp:75
Cantera::TwoTempPlasmaRate::newMultiRate
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
Definition TwoTempPlasmaRate.h:77
Cantera::TwoTempPlasmaRate::ddTScaledFromStruct
double ddTScaledFromStruct(const TwoTempPlasmaData &shared_data) const
Evaluate derivative of reaction rate with respect to temperature divided by reaction rate.
Definition TwoTempPlasmaRate.cpp:68
Cantera::TwoTempPlasmaRate::activationElectronEnergy
double activationElectronEnergy() const
Return the electron activation energy Ea [J/kmol].
Definition TwoTempPlasmaRate.h:109
Cantera::TwoTempPlasmaRate::type
const string type() const override
String identifying reaction rate specialization.
Definition TwoTempPlasmaRate.h:81
Cantera::GasConstant
const double GasConstant
Universal Gas Constant [J/kmol/K].
Definition ct_defs.h:120
Cantera
Namespace for the Cantera kernel.
Definition AnyMap.cpp:564
Cantera::ReactionData
Data container holding shared data used for ReactionRate calculation.
Definition ReactionData.h:27
Cantera::ReactionData::recipT
double recipT
inverse of temperature
Definition ReactionData.h:112
Cantera::ReactionData::update
virtual void update(double T)
Update data container based on temperature T
Definition ReactionData.h:36
Cantera::ReactionData::temperature
double temperature
temperature
Definition ReactionData.h:110
Cantera::ReactionData::invalidateCache
virtual void invalidateCache()
Force shared data and reaction rates to be updated next time.
Definition ReactionData.h:106
Cantera::TwoTempPlasmaData
Data container holding shared data specific to TwoTempPlasmaRate.
Definition TwoTempPlasmaRate.h:21
Cantera::TwoTempPlasmaData::update
bool update(const ThermoPhase &phase, const Kinetics &kin) override
Update data container based on thermodynamic phase state.
Definition TwoTempPlasmaRate.cpp:13
Cantera::TwoTempPlasmaData::electronTemp
double electronTemp
electron temperature
Definition TwoTempPlasmaRate.h:36
Cantera::TwoTempPlasmaData::logTe
double logTe
logarithm of electron temperature
Definition TwoTempPlasmaRate.h:37
Cantera::TwoTempPlasmaData::recipTe
double recipTe
inverse of electron temperature
Definition TwoTempPlasmaRate.h:38
Cantera::TwoTempPlasmaData::invalidateCache
void invalidateCache() override
Force shared data and reaction rates to be updated next time.
Definition TwoTempPlasmaRate.h:31
Cantera::UnitStack
Unit aggregation utility.
Definition Units.h:105