18#ifndef RIZER_PLASMARATES_H
19#define RIZER_PLASMARATES_H
27#include <unordered_map>
84 std::unique_ptr<Cantera::MultiRateBase>
newMultiRate()
const override;
86 const std::string
type()
const override {
87 return "janev-dissociative-recombination-C2Hy";
136 std::unique_ptr<Cantera::MultiRateBase>
newMultiRate()
const override;
138 const std::string
type()
const override {
return "Druyvesteyn"; }
153 void validate(
const std::string& equation,
199 m_Tg = m_Te = m_P = NAN;
212 std::shared_ptr<Cantera::Solution>
shadow;
247 std::unique_ptr<Cantera::MultiRateBase>
newMultiRate()
const override;
249 const std::string
type()
const override {
250 return "reverse-two-temperature-plasma";
void setParameters(const Cantera::AnyMap &node, const Cantera::UnitStack &rate_units) override
Set the rate parameters from a YAML/AnyMap rate node.
std::unique_ptr< Cantera::MultiRateBase > newMultiRate() const override
double m_b
Te exponent [-].
const std::string type() const override
double m_A
Pre-factor in Cantera's internal (kmol, m, s) rate-coefficient units [order-dependent].
void getParameters(Cantera::AnyMap &node) const override
void validate(const std::string &equation, const Cantera::Kinetics &kin) override
Reject a missing or negative pre-factor (mirrors the Python rate's validate; missing "A" leaves m_A a...
double evalFromStruct(const ElectronTemperatureData &shared_data) const
Evaluate the Druyvesteyn rate .
double m_Ea_K
Activation energy expressed in Kelvin [K].
DruyvesteynRate()=default
std::unique_ptr< Cantera::MultiRateBase > newMultiRate() const override
const std::string type() const override
void setParameters(const Cantera::AnyMap &node, const Cantera::UnitStack &rate_units) override
Set the rate parameters from a YAML/AnyMap rate node.
JanevDissociativeRecombinationC2HyRate()=default
double evalFromStruct(const ElectronTemperatureData &shared_data) const
Evaluate the Janev dissociative-recombination rate .
double m_A
Rate pre-factor, in Cantera's internal (kmol, m, s) rate-coefficient units [kmol/m^3/s units,...
void getParameters(Cantera::AnyMap &node) const override
std::unique_ptr< Cantera::MultiRateBase > newMultiRate() const override
double evalFromStruct(const ReverseTwoTempData &shared_data) const
Evaluate the reverse rate at the tagged temperature.
ReverseTwoTemperaturePlasmaRate()=default
void getParameters(Cantera::AnyMap &node) const override
std::string m_forward_equation
Equation string of the forward reaction this rate reverses [-].
const std::string type() const override
size_t m_idx
Cached index of the forward reaction in the shadow kinetics' reaction list [-].
void setParameters(const Cantera::AnyMap &node, const Cantera::UnitStack &rate_units) override
Set the rate parameters from a YAML/AnyMap rate node.
std::string m_T
Which temperature tags this reaction ("Te" or "Tg"); informational, kept for YAML round-trip [-].
void registerPlasmaRates()
Register the custom plasma reaction rates with Cantera's ReactionRateFactory.
virtual void update(double T)
virtual void invalidateCache()
Shared data carrying the electron temperature (mirrors Cantera's own TwoTempPlasmaData but only needs...
void invalidateCache() override
double electronTemp
electron temperature [K]
bool update(const Cantera::ThermoPhase &phase, const Cantera::Kinetics &kin) override
Read the electron temperature from the phase.
Shared data for all reverse-two-temperature-plasma reactions.
bool update(const Cantera::ThermoPhase &phase, const Cantera::Kinetics &kin) override
Refresh the cached Tg, Te, P and the shadow-solution rate/equilibrium constants.
std::shared_ptr< Cantera::Solution > shadow
Forward-only ideal-gas shadow solution [-].
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,...
std::vector< double > Keq_Te
std::unordered_map< std::string, size_t > fwdIndex
Forward reaction equation string -> index into the shadow kinetics' reaction list [-].
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.
std::vector< double > kf_Tg
Per-reaction forward rate constant [kmol/m^3/s units, order-dependent] and dimensionless Kc,...