|
rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
|
Native C++ two-temperature 0D plasma reactor (stateless per-eval evaluator). More...
#include <Plasma0DReactor.h>
Classes | |
| struct | Config |
Public Member Functions | |
| Plasma0DReactor (const Config &cfg) | |
| Construct from a mechanism/phase and collision-model configuration. | |
| std::size_t | nSpecies () const |
| std::vector< std::string > | speciesNames () const |
| double | conductivity (double Tg, double Te, const double *Y, double rho) const |
| Electrical conductivity [S/m] at state \( (T_g, T_e, Y, \rho = \text{mass}/V) \). | |
| double | electronDensity (double Tg, double Te, const double *Y, double rho) const |
| Electron number density [1/m^3]. | |
| void | rhs (double Tg, double Te, double V, const double *Y, double E, double mass, double p_ext, double polytropic_index, double *dydt) const |
| Full 0D RHS. | |
| const ReactorRHS::Diagnostics & | diagnostics () const |
| Power / Maxwellian-condition breakdown from the most recent rhs() call (see ReactorRHS::Diagnostics) – the native counterpart of the Python reference reactor's stored P_elastic/P_inelastic/P_chemical/ P_chemical_e/P_Joule/cond_maxwell_1/cond_maxwell_2 attributes. | |
Native C++ two-temperature 0D plasma reactor (stateless per-eval evaluator).
Wraps the shared ReactorRHS (chemistry/Joule/exchange) with a composition-resolved CollisionModel and the constant-mass volume equation, exposing the per-eval conductivity and rhs that the Python driver (scipy + NRP circuit) calls. The state vector is
\[ y = [T_g,\, T_e,\, V,\, Y_0, \ldots, Y_{K-1}], \qquad \rho = \frac{\text{mass}}{V}. \]
With polytropic_index \( = \infty \) the volume is held constant ( \( dV/dt = 0 \)), matching the 1D channel's constant-volume assumption; a finite index activates the polytropic rarefaction model.
Definition at line 32 of file Plasma0DReactor.h.
|
explicit |
Construct from a mechanism/phase and collision-model configuration.
| cfg | Reactor configuration (mechanism/phase, reacting flag, per-species collision specs, Te grid bounds/resolution, Spitzer flag, electrode gap [m]); see Config above for field-by-field units. |
Definition at line 21 of file Plasma0DReactor.cpp.
|
inline |
Electrical conductivity [S/m] at state \( (T_g, T_e, Y, \rho = \text{mass}/V) \).
| Tg | Gas (heavy-species) temperature [K] |
| Te | Electron temperature [K] |
| Y | Species mass fractions [-], length nSpecies() |
| rho | Mass density [kg/m^3] ( \( = \text{mass}/V \)) |
Definition at line 67 of file Plasma0DReactor.h.
|
inline |
Power / Maxwellian-condition breakdown from the most recent rhs() call (see ReactorRHS::Diagnostics) – the native counterpart of the Python reference reactor's stored P_elastic/P_inelastic/P_chemical/ P_chemical_e/P_Joule/cond_maxwell_1/cond_maxwell_2 attributes.
Definition at line 105 of file Plasma0DReactor.h.
|
inline |
Electron number density [1/m^3].
| Tg | Gas (heavy-species) temperature [K] |
| Te | Electron temperature [K] |
| Y | Species mass fractions [-], length nSpecies() |
| rho | Mass density [kg/m^3] ( \( = \text{mass}/V \)) |
Definition at line 75 of file Plasma0DReactor.h.
|
inline |
Definition at line 58 of file Plasma0DReactor.h.
| void rizer::Plasma0DReactor::rhs | ( | double | Tg, |
| double | Te, | ||
| double | V, | ||
| const double * | Y, | ||
| double | E, | ||
| double | mass, | ||
| double | p_ext, | ||
| double | polytropic_index, | ||
| double * | dydt ) const |
Full 0D RHS.
Writes dydt = [dTg, dTe, dV, dY_0..dY_{K-1}] (length 3 + K), where
\[ \rho = \frac{\text{mass}}{V}, \qquad \text{polytropic\_index} = \infty \implies \frac{dV}{dt} = 0 \]
(constant volume).
| Tg | Gas (heavy-species) temperature [K] | |
| Te | Electron temperature [K] | |
| V | Plasma/reactor volume [m^3] | |
| Y | Species mass fractions [-], length nSpecies() | |
| E | Electric field [V/m] | |
| mass | Reactor mass [kg] (constant) | |
| p_ext | External pressure [Pa] (polytropic relaxation target) | |
| polytropic_index | Polytropic index [-] ( \( \infty \) => constant volume, \( dV/dt = 0 \)) | |
| [out] | dydt | [dTg/dt, dTe/dt, dV/dt, dY_k/dt] in [K/s, K/s, m^3/s, 1/s], length 3 + nSpecies() |
Definition at line 63 of file Plasma0DReactor.cpp.
| std::vector< std::string > rizer::Plasma0DReactor::speciesNames | ( | ) | const |
Definition at line 56 of file Plasma0DReactor.cpp.