rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
Loading...
Searching...
No Matches
rizer::Plasma0DReactor Class Reference

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::Diagnosticsdiagnostics () 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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ Plasma0DReactor()

rizer::Plasma0DReactor::Plasma0DReactor ( const Config & cfg)
explicit

Construct from a mechanism/phase and collision-model configuration.

Parameters
cfgReactor 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.

Member Function Documentation

◆ conductivity()

double rizer::Plasma0DReactor::conductivity ( double Tg,
double Te,
const double * Y,
double rho ) const
inline

Electrical conductivity [S/m] at state \( (T_g, T_e, Y, \rho = \text{mass}/V) \).

Parameters
TgGas (heavy-species) temperature [K]
TeElectron temperature [K]
YSpecies mass fractions [-], length nSpecies()
rhoMass density [kg/m^3] ( \( = \text{mass}/V \))

Definition at line 67 of file Plasma0DReactor.h.

◆ diagnostics()

const ReactorRHS::Diagnostics & rizer::Plasma0DReactor::diagnostics ( ) const
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.

◆ electronDensity()

double rizer::Plasma0DReactor::electronDensity ( double Tg,
double Te,
const double * Y,
double rho ) const
inline

Electron number density [1/m^3].

Parameters
TgGas (heavy-species) temperature [K]
TeElectron temperature [K]
YSpecies mass fractions [-], length nSpecies()
rhoMass density [kg/m^3] ( \( = \text{mass}/V \))

Definition at line 75 of file Plasma0DReactor.h.

◆ nSpecies()

std::size_t rizer::Plasma0DReactor::nSpecies ( ) const
inline

Definition at line 58 of file Plasma0DReactor.h.

◆ rhs()

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).

Parameters
TgGas (heavy-species) temperature [K]
TeElectron temperature [K]
VPlasma/reactor volume [m^3]
YSpecies mass fractions [-], length nSpecies()
EElectric field [V/m]
massReactor mass [kg] (constant)
p_extExternal pressure [Pa] (polytropic relaxation target)
polytropic_indexPolytropic 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.

◆ speciesNames()

std::vector< std::string > rizer::Plasma0DReactor::speciesNames ( ) const

Definition at line 56 of file Plasma0DReactor.cpp.


The documentation for this class was generated from the following files: