|
rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
|
Calorically perfect ideal-gas accessor: one constant \(\gamma_\mathrm{H}\) for the heavy pool, ElectronGamma for the electron pool. More...
#include <GammaLawThermo.h>
Public Member Functions | |
| GammaLawThermo (double gamma, std::vector< double > molecular_weights, int electron_index) | |
| void | pressures (double r, double t, double rho, double Tg, double Te, const double *Y, double &p_heavy, double &p_electron) const override |
| Per-pool partial pressures, PHYSICS.md equation (G6). | |
| double | soundSpeed (double r, double t, double rho, double Tg, double Te, const double *Y) const override |
| Sound speed, PHYSICS.md appendix A.4: the frozen two-pool speed \(c=\sqrt{(\gamma_\mathrm{H}p_\mathrm{H}
+\gamma_\mathrm{e}p_\mathrm{e})/\rho}\), each pool following its own adiabat so that their isentropic bulk moduli add. | |
| double | heavyEnergy (double Tg, const double *Y) const override |
| Heavy-pool internal energy per kg of MIXTURE, \(e_\mathrm{H}=\sum_{s\neq\mathrm{e}}Y_se_s(T_\mathrm{H})\) – the basis that makes \(\rho e_\mathrm{H}\) the conserved variable of equation (4b). | |
| double | electronCv () const override |
| Electron specific heat at constant volume, per kg of ELECTRONS, \(c_{v,\mathrm{e}}=\tfrac32 k_\mathrm{B}/m_\mathrm{e}\). | |
| double | densityFromPressure (double pressure, double Tg, double Te, const double *Y) const override |
| Density reproducing a target total pressure at a given temperature pair and composition – the inverse of pressures(), needed by both outer boundary treatments of NUMERICS.md section 7, which impose a pressure and close \(\rho\) from the equation of state. | |
| double | heavyTemperature (double rho, const double *Y, double heavy_internal_energy_target, double Tg_seed) const override |
| Invert \(e_\mathrm{H}\) for \(T_\mathrm{H}\) at fixed density and composition (NUMERICS.md section 8). | |
| Public Member Functions inherited from rizer::ThermoAccessor | |
| virtual | ~ThermoAccessor ()=default |
| virtual StateProperties | stateProperties (double r, double t, double rho, double Tg, double Te, const double *Y) const |
| pressures(), soundSpeed() and heavyEnergy() at one state, in one call. | |
Calorically perfect ideal-gas accessor: one constant \(\gamma_\mathrm{H}\) for the heavy pool, ElectronGamma for the electron pool.
Every method is closed form, so hydroStep() runs with no Cantera object and no mechanism file – which is what lets the pure-array unit tests cover the flux scheme, the boundary treatment and the axis factor without loading a mechanism.
Definition at line 27 of file GammaLawThermo.h.
| rizer::GammaLawThermo::GammaLawThermo | ( | double | gamma, |
| std::vector< double > | molecular_weights, | ||
| int | electron_index ) |
| [in] | gamma | Ratio of the HEAVY pool's specific heats, \(\gamma_\mathrm{H}=c_{p,\mathrm{H}}/c_{v,\mathrm{H}}\) [-], > 1. Not a mixture ratio: the electron pool has its own, fixed at ElectronGamma |
| [in] | molecular_weights | Per-species molecular weight [kg/kmol], length K, all > 0 |
| [in] | electron_index | Index of the electron species in Y, or -1 for a mixture with no electron species (then \(X_\mathrm{e}=0\) and \(T_\mathrm{mean}=T_\mathrm{H}\)) |
Definition at line 18 of file GammaLawThermo.cpp.
|
overridevirtual |
Density reproducing a target total pressure at a given temperature pair and composition – the inverse of pressures(), needed by both outer boundary treatments of NUMERICS.md section 7, which impose a pressure and close \(\rho\) from the equation of state.
Alone among the field methods it takes no \((r, t)\): the pressure to invert is an argument, so there is no field left to look up, and a prescribed-field accessor has nothing to prescribe here.
| [in] | pressure | Target total pressure \(p_\mathrm{H}+p_\mathrm{e}\) [Pa] |
| [in] | Tg | Heavy-pool temperature [K] |
| [in] | Te | Electron temperature [K] |
| [in] | Y | Species mass fractions [-], length K |
Implements rizer::ThermoAccessor.
Definition at line 107 of file GammaLawThermo.cpp.
|
overridevirtual |
Electron specific heat at constant volume, per kg of ELECTRONS, \(c_{v,\mathrm{e}}=\tfrac32 k_\mathrm{B}/m_\mathrm{e}\).
Fixed at the analytic monatomic value, so the electron energy recovery of NUMERICS.md section 8 is a division rather than an iteration.
Implements rizer::ThermoAccessor.
Definition at line 95 of file GammaLawThermo.cpp.
|
overridevirtual |
Heavy-pool internal energy per kg of MIXTURE, \(e_\mathrm{H}=\sum_{s\neq\mathrm{e}}Y_se_s(T_\mathrm{H})\) – the basis that makes \(\rho e_\mathrm{H}\) the conserved variable of equation (4b).
Not per kg of heavy species.
| [in] | Tg | Heavy-pool temperature [K] |
| [in] | Y | Species mass fractions [-], length K |
Implements rizer::ThermoAccessor.
Definition at line 88 of file GammaLawThermo.cpp.
|
overridevirtual |
Invert \(e_\mathrm{H}\) for \(T_\mathrm{H}\) at fixed density and composition (NUMERICS.md section 8).
| [in] | rho | Mixture mass density [kg/m^3] |
| [in] | Y | Species mass fractions [-], length K |
| [in] | heavy_internal_energy_target | Target \(e_\mathrm{H}\) [J/kg of mixture] |
| [in] | Tg_seed | Previous \(T_\mathrm{H}\) [K], used to seed an iterative implementation; a closed-form one ignores it |
Implements rizer::ThermoAccessor.
Definition at line 137 of file GammaLawThermo.cpp.
|
overridevirtual |
Per-pool partial pressures, PHYSICS.md equation (G6).
| [in] | r | Node radius [m] |
| [in] | t | Current time [s] |
| [in] | rho | Mixture mass density [kg/m^3] |
| [in] | Tg | Heavy-pool temperature [K] |
| [in] | Te | Electron temperature [K] |
| [in] | Y | Species mass fractions [-], length K |
| [out] | p_heavy | Heavy-pool partial pressure [Pa] |
| [out] | p_electron | Electron partial pressure [Pa] |
Implements rizer::ThermoAccessor.
Definition at line 59 of file GammaLawThermo.cpp.
|
overridevirtual |
Sound speed, PHYSICS.md appendix A.4: the frozen two-pool speed \(c=\sqrt{(\gamma_\mathrm{H}p_\mathrm{H} +\gamma_\mathrm{e}p_\mathrm{e})/\rho}\), each pool following its own adiabat so that their isentropic bulk moduli add.
Sets the Rusanov dissipation coefficient and the CFL bound, both of which want an upper bound on the signal speed.
| [in] | r | Node radius [m] |
| [in] | t | Current time [s] |
| [in] | rho | Mixture mass density [kg/m^3] |
| [in] | Tg | Heavy-pool temperature [K] |
| [in] | Te | Electron temperature [K] |
| [in] | Y | Species mass fractions [-], length K |
Implements rizer::ThermoAccessor.
Definition at line 69 of file GammaLawThermo.cpp.