|
rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
|
Shared data for all reverse-two-temperature-plasma reactions. More...
#include <PlasmaRates.h>
Public Member Functions | |
| bool | update (const Cantera::ThermoPhase &phase, const Cantera::Kinetics &kin) override |
| Refresh the cached Tg, Te, P and the shadow-solution rate/equilibrium constants. | |
| void | invalidateCache () override |
| void | buildShadow (const Cantera::ThermoPhase &phase, const Cantera::Kinetics &kin) |
| Lazily build the ideal-gas shadow Solution from the main phase + kinetics. | |
| double | gasTemperature () const |
| Gas temperature from the last update() [K]. | |
| double | electronTemperature () const |
| Electron temperature from the last update() [K]. | |
| virtual void | update (double T) |
| virtual void | update (double T, double extra) |
| virtual void | update (double T, span< const double > extra) |
| Public Member Functions inherited from Cantera::ReactionData | |
| void | perturbTemperature (double deltaT) |
| virtual void | restore () |
| virtual void | resize (Kinetics &kin) |
Public Attributes | |
| std::shared_ptr< Cantera::Solution > | shadow |
| Forward-only ideal-gas shadow solution [-]. | |
| std::vector< double > | kf_Tg |
| Per-reaction forward rate constant [kmol/m^3/s units, order-dependent] and dimensionless Kc, both evaluated at Tg [K]. | |
| std::vector< double > | Keq_Tg |
| std::vector< double > | kf_Te |
| Per-reaction forward rate constant [kmol/m^3/s units, order-dependent] and dimensionless Kc, both evaluated at Te [K]. | |
| std::vector< double > | Keq_Te |
| std::vector< double > | logKeq_Tg |
| Per-reaction natural log of Kc at Tg and at Te [-], from the standard Gibbs energy of reaction, so it stays finite where Kc underflows. | |
| std::vector< double > | logKeq_Te |
| std::unordered_map< std::string, size_t > | fwdIndex |
| Forward reaction equation string -> index into the shadow kinetics' reaction list [-]. | |
| std::unordered_set< std::string > | ambiguousForward |
| Forward equations shared by more than one forward reaction [-]. | |
| bool | anyTeTagged = false |
| Whether any reverse reaction is tagged T: Te. | |
| std::vector< std::shared_ptr< Cantera::ReactionRate > > | fwdRate |
| Per-reaction forward rate of the shadow, read by the log-space path. | |
| std::vector< double > | deltaN |
| Per-reaction change in moles, products minus reactants [-]. | |
| Public Attributes inherited from Cantera::ReactionData | |
| double | temperature |
| double | logT |
| double | recipT |
Additional Inherited Members | |
| Protected Attributes inherited from Cantera::ReactionData | |
| double | m_temperature_buf |
Shared data for all reverse-two-temperature-plasma reactions.
Holds a single-temperature ideal-gas "shadow" Solution built from the forward reactions only (so it contains no reverse/janev rates and cannot recurse).
This mirrors rizer's Python reference (ExtensibleTwoTempPlasmaRateData): the shadow is evaluated at BOTH the gas temperature Tg and the electron temperature Te (each a single-temperature ideal-gas state), caching the forward rate constants and equilibrium constants at each. A reverse reaction then uses \( k_{rev} = k_{fwd}(T)/K_{eq}(T) \) at the temperature named by its T: tag (Tg for heavy reactions, Te for electron reactions) – detailed balance at one temperature.
Definition at line 204 of file PlasmaRates.h.
| void rizer::ReverseTwoTempData::buildShadow | ( | const Cantera::ThermoPhase & | phase, |
| const Cantera::Kinetics & | kin ) |
Lazily build the ideal-gas shadow Solution from the main phase + kinetics.
| phase | Main (plasma) phase whose species/state seed the shadow ideal-gas phase. |
| kin | Main kinetics manager whose forward reactions are copied into the shadow. |
Definition at line 370 of file PlasmaRates.cpp.
|
inline |
Electron temperature from the last update() [K].
Definition at line 258 of file PlasmaRates.h.
|
inline |
Gas temperature from the last update() [K].
Definition at line 256 of file PlasmaRates.h.
|
inlineoverridevirtual |
Reimplemented from Cantera::ReactionData.
Definition at line 215 of file PlasmaRates.h.
|
overridevirtual |
Refresh the cached Tg, Te, P and the shadow-solution rate/equilibrium constants.
| phase | Main (plasma) phase to read Tg, Te, P and composition from. |
| kin | Main kinetics manager, source of the forward reactions to shadow. |
Implements Cantera::ReactionData.
Definition at line 309 of file PlasmaRates.cpp.
|
virtual |
Reimplemented from Cantera::ReactionData.
|
virtual |
Reimplemented from Cantera::ReactionData.
|
virtual |
Reimplemented from Cantera::ReactionData.
| std::unordered_set<std::string> rizer::ReverseTwoTempData::ambiguousForward |
Forward equations shared by more than one forward reaction [-].
Definition at line 246 of file PlasmaRates.h.
| bool rizer::ReverseTwoTempData::anyTeTagged = false |
Whether any reverse reaction is tagged T: Te.
Without one, nothing reads the Te columns, so update() neither fills them nor checks Te.
Definition at line 249 of file PlasmaRates.h.
| std::vector<double> rizer::ReverseTwoTempData::deltaN |
Per-reaction change in moles, products minus reactants [-].
Definition at line 253 of file PlasmaRates.h.
| std::unordered_map<std::string, size_t> rizer::ReverseTwoTempData::fwdIndex |
Forward reaction equation string -> index into the shadow kinetics' reaction list [-].
Definition at line 244 of file PlasmaRates.h.
| std::vector<std::shared_ptr<Cantera::ReactionRate> > rizer::ReverseTwoTempData::fwdRate |
Per-reaction forward rate of the shadow, read by the log-space path.
Definition at line 251 of file PlasmaRates.h.
| std::vector<double> rizer::ReverseTwoTempData::Keq_Te |
Definition at line 236 of file PlasmaRates.h.
| std::vector<double> rizer::ReverseTwoTempData::Keq_Tg |
Definition at line 233 of file PlasmaRates.h.
| std::vector<double> rizer::ReverseTwoTempData::kf_Te |
Per-reaction forward rate constant [kmol/m^3/s units, order-dependent] and dimensionless Kc, both evaluated at Te [K].
Definition at line 236 of file PlasmaRates.h.
| std::vector<double> rizer::ReverseTwoTempData::kf_Tg |
Per-reaction forward rate constant [kmol/m^3/s units, order-dependent] and dimensionless Kc, both evaluated at Tg [K].
Definition at line 233 of file PlasmaRates.h.
| std::vector<double> rizer::ReverseTwoTempData::logKeq_Te |
Definition at line 241 of file PlasmaRates.h.
| std::vector<double> rizer::ReverseTwoTempData::logKeq_Tg |
Per-reaction natural log of Kc at Tg and at Te [-], from the standard Gibbs energy of reaction, so it stays finite where Kc underflows.
Refreshed only when some kf or Kc at that temperature is not a normal number, which is the only case evalFromStruct reads it.
Definition at line 241 of file PlasmaRates.h.
| std::shared_ptr<Cantera::Solution> rizer::ReverseTwoTempData::shadow |
Forward-only ideal-gas shadow solution [-].
Definition at line 230 of file PlasmaRates.h.