|
rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
|
Pressure prescribed as a function of (r, t), every other property delegated to a GammaLawThermo. More...
#include <PrescribedPressureThermo.h>
Public Types | |
| using | PressureFn = std::function<double(double r, double t)> |
| Total prescribed pressure as a function of radius [m] and time [s], returning [Pa]. | |
Public Member Functions | |
| PrescribedPressureThermo (PressureFn pressure, GammaLawThermo backing) | |
| 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. | |
Pressure prescribed as a function of (r, t), every other property delegated to a GammaLawThermo.
TEST-ONLY. It exists for NUMERICS.md section "Momentum alone"'s cases 1-2, which isolate the momentum row against Bernoulli and linear acoustics by holding p prescribed rather than recovered from the state. It is reachable only through the eos="prescribed_p" argument of solve_hydro_step_only and is absent from every production config.
Definition at line 27 of file PrescribedPressureThermo.h.
| using rizer::PrescribedPressureThermo::PressureFn = std::function<double(double r, double t)> |
Total prescribed pressure as a function of radius [m] and time [s], returning [Pa].
Assigned entirely to the heavy pool; the electron partial pressure is zero.
Definition at line 33 of file PrescribedPressureThermo.h.
| rizer::PrescribedPressureThermo::PrescribedPressureThermo | ( | PressureFn | pressure, |
| GammaLawThermo | backing ) |
| [in] | pressure | Prescribed p(r, t) [Pa] |
| [in] | backing | Accessor supplying sound speed and the caloric relations |
Definition at line 15 of file PrescribedPressureThermo.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 76 of file PrescribedPressureThermo.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 71 of file PrescribedPressureThermo.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 66 of file PrescribedPressureThermo.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 85 of file PrescribedPressureThermo.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 30 of file PrescribedPressureThermo.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 55 of file PrescribedPressureThermo.cpp.