|
rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
|
Shared single-cell two-temperature reacting-plasma RHS (one physics source). More...
#include <ReactorRHS.h>
Classes | |
| struct | Diagnostics |
| Optional power / Maxwellian-condition breakdown filled by rates() when a non-null pointer is passed. More... | |
| struct | Config |
Public Member Functions | |
| ReactorRHS (std::shared_ptr< Cantera::Solution > sol, Config cfg) | |
| Construct a ReactorRHS for a given plasma Solution and configuration. | |
| std::size_t | nSpecies () const |
| std::size_t | electronIndex () const |
| const std::vector< double > & | molecularWeights () const |
| std::string | speciesName (std::size_t k) const |
| Name of species k in the mechanism. | |
| const std::shared_ptr< Cantera::Solution > & | solution () const |
| const std::vector< double > & | speciesCp () const |
| Mass-basis species heat capacity at constant pressure c_p,k [J/kg/K], length nSpecies(), valid as of the most recent rates() call for this state (rates() must be called first for the same (Tg,Te,Y,rho); this reads back that call's already-evaluated Cantera thermo state rather than re-evaluating it). | |
| void | rates (double Tg, double Te, const double *Y, double rho, double E, double &dTg, double &dTe, double *dY, double &lhs_Tg, double &lhs_Te, Diagnostics *diag=nullptr) const |
| Single-cell RHS (no transport, no volume work). | |
| double | conductivity (double Tg, double Te, const double *Y, double rho) const |
| Electrical conductivity [S/m] at a node state. | |
| double | electronDensity (double Tg, double Te, const double *Y, double rho) const |
| Electron number density [1/m^3], \(n_e = X_e P / (k_B T_{mean})\). | |
Shared single-cell two-temperature reacting-plasma RHS (one physics source).
The two-temperature (Te != Tg) energy/chemistry/Joule physics of a single plasma cell, factored out of PlasmaChannel1D so the standalone 0D reactor (Plasma0DReactor) and the 1D channel share ONE implementation. Per call it sets the Cantera state, evaluates finite-rate chemistry, the Joule source \(\sigma E^2\), the elastic/inelastic electron-heavy exchange, and the two energy-equation capacitances.
Conductivity sigma and the elastic energy-exchange frequency nu_E come from a composition-resolved CollisionModel when one is supplied (preferred: tracks the evolving composition); otherwise from the legacy nu_m(Te)/sigma(Te) tables / scalar nu_m + scalar nu_E (the path the monolithic 1D channel has used).
Definition at line 33 of file ReactorRHS.h.
| rizer::ReactorRHS::ReactorRHS | ( | std::shared_ptr< Cantera::Solution > | sol, |
| Config | cfg ) |
Construct a ReactorRHS for a given plasma Solution and configuration.
| sol | Cantera plasma Solution (thermo + kinetics) this RHS evaluates against |
| cfg | Closure selection and legacy fallback tables/scalars (see Config above) |
Definition at line 49 of file ReactorRHS.cpp.
| double rizer::ReactorRHS::conductivity | ( | double | Tg, |
| double | Te, | ||
| const double * | Y, | ||
| double | rho ) const |
Electrical conductivity [S/m] at a node state.
| Tg | Gas temperature [K] |
| Te | Electron temperature [K] |
| Y | Mass fractions, length nSpecies [-] |
| rho | Mass density [kg/m^3] |
Definition at line 264 of file ReactorRHS.cpp.
| double rizer::ReactorRHS::electronDensity | ( | double | Tg, |
| double | Te, | ||
| const double * | Y, | ||
| double | rho ) const |
Electron number density [1/m^3], \(n_e = X_e P / (k_B T_{mean})\).
| Tg | Gas temperature [K] |
| Te | Electron temperature [K] |
| Y | Mass fractions, length nSpecies [-] |
| rho | Mass density [kg/m^3] |
Definition at line 273 of file ReactorRHS.cpp.
|
inline |
Definition at line 93 of file ReactorRHS.h.
|
inline |
Definition at line 94 of file ReactorRHS.h.
|
inline |
Definition at line 92 of file ReactorRHS.h.
| void rizer::ReactorRHS::rates | ( | double | Tg, |
| double | Te, | ||
| const double * | Y, | ||
| double | rho, | ||
| double | E, | ||
| double & | dTg, | ||
| double & | dTe, | ||
| double * | dY, | ||
| double & | lhs_Tg, | ||
| double & | lhs_Te, | ||
| Diagnostics * | diag = nullptr ) const |
Single-cell RHS (no transport, no volume work).
rho [kg/m^3], E [V/m]. Outputs dTg,dTe [K/s], dY [1/s] (length nSpecies), and the energy-equation capacitances lhs_Tg,lhs_Te [J/m^3/K].
| Tg | Gas (heavy-species) temperature [K] | |
| Te | Electron temperature [K] | |
| Y | Mass fractions, length nSpecies [-] | |
| rho | Mass density [kg/m^3] | |
| E | Electric field magnitude [V/m] | |
| [out] | dTg | Gas temperature time derivative [K/s] |
| [out] | dTe | Electron temperature time derivative [K/s] |
| [out] | dY | Mass fraction time derivatives, length nSpecies [1/s] |
| [out] | lhs_Tg | Gas-energy-equation capacitance (heavy-species \(\rho c_v\)) [J/m^3/K] |
| [out] | lhs_Te | Electron-energy-equation capacitance ( \(Y_e \rho c_{v,e}\)) [J/m^3/K] |
| [out] | diag | If non-null, filled with the power / Maxwellian- condition breakdown for this evaluation (see Diagnostics). |
Definition at line 153 of file ReactorRHS.cpp.
|
inline |
Definition at line 98 of file ReactorRHS.h.
|
inline |
Mass-basis species heat capacity at constant pressure c_p,k [J/kg/K], length nSpecies(), valid as of the most recent rates() call for this state (rates() must be called first for the same (Tg,Te,Y,rho); this reads back that call's already-evaluated Cantera thermo state rather than re-evaluating it).
For a heavy species k, \(c_{p,k} = (C_{p,k}/R)\,R/W_k\), i.e. Cantera's dimensionless molar \(C_p/R\) (from getCp_R(), evaluated at Tg) converted to a mass-specific quantity by the molecular weight W_k [kg/kmol]. The electron entry (index electronIndex()) instead holds the analytic monatomic-ideal-gas value \(c_{p,e} = c_{v,e} + R/W_e = 2.5\,R/W_e\) – consistent with the cv_e already used internally by rates() for lhs_Te, rather than Cantera's own (thermo-fit) electron Cp. Used by PlasmaChannel1D's species-diffusion enthalpy-transport (energy- equation "enthalpy diffusion") term.
Definition at line 114 of file ReactorRHS.h.
| std::string rizer::ReactorRHS::speciesName | ( | std::size_t | k | ) | const |
Name of species k in the mechanism.
| k | Species index into the mechanism, 0..nSpecies()-1 [-] |
Definition at line 93 of file ReactorRHS.cpp.