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

Calorically perfect ideal-gas accessor: one constant \(\gamma_\mathrm{H}\) for the heavy pool, ElectronGamma for the electron pool. More...

#include <GammaLawThermo.h>

Inheritance diagram for rizer::GammaLawThermo:
rizer::ThermoAccessor

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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ GammaLawThermo()

rizer::GammaLawThermo::GammaLawThermo ( double gamma,
std::vector< double > molecular_weights,
int electron_index )
Parameters
[in]gammaRatio 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_weightsPer-species molecular weight [kg/kmol], length K, all > 0
[in]electron_indexIndex 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.

Member Function Documentation

◆ densityFromPressure()

double rizer::GammaLawThermo::densityFromPressure ( double pressure,
double Tg,
double Te,
const double * Y ) const
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.

Parameters
[in]pressureTarget total pressure \(p_\mathrm{H}+p_\mathrm{e}\) [Pa]
[in]TgHeavy-pool temperature [K]
[in]TeElectron temperature [K]
[in]YSpecies mass fractions [-], length K
Returns
Mixture mass density [kg/m^3]

Implements rizer::ThermoAccessor.

Definition at line 107 of file GammaLawThermo.cpp.

◆ electronCv()

double rizer::GammaLawThermo::electronCv ( ) const
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.

Returns
Electron \(c_v\) [J/kg/K]

Implements rizer::ThermoAccessor.

Definition at line 95 of file GammaLawThermo.cpp.

◆ heavyEnergy()

double rizer::GammaLawThermo::heavyEnergy ( double Tg,
const double * Y ) const
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.

Parameters
[in]TgHeavy-pool temperature [K]
[in]YSpecies mass fractions [-], length K
Returns
Heavy-pool internal energy [J/kg of mixture]

Implements rizer::ThermoAccessor.

Definition at line 88 of file GammaLawThermo.cpp.

◆ heavyTemperature()

double rizer::GammaLawThermo::heavyTemperature ( double rho,
const double * Y,
double heavy_internal_energy_target,
double Tg_seed ) const
overridevirtual

Invert \(e_\mathrm{H}\) for \(T_\mathrm{H}\) at fixed density and composition (NUMERICS.md section 8).

Parameters
[in]rhoMixture mass density [kg/m^3]
[in]YSpecies mass fractions [-], length K
[in]heavy_internal_energy_targetTarget \(e_\mathrm{H}\) [J/kg of mixture]
[in]Tg_seedPrevious \(T_\mathrm{H}\) [K], used to seed an iterative implementation; a closed-form one ignores it
Returns
Heavy-pool temperature reproducing the target energy [K]

Implements rizer::ThermoAccessor.

Definition at line 137 of file GammaLawThermo.cpp.

◆ pressures()

void rizer::GammaLawThermo::pressures ( double r,
double t,
double rho,
double Tg,
double Te,
const double * Y,
double & p_heavy,
double & p_electron ) const
overridevirtual

Per-pool partial pressures, PHYSICS.md equation (G6).

Parameters
[in]rNode radius [m]
[in]tCurrent time [s]
[in]rhoMixture mass density [kg/m^3]
[in]TgHeavy-pool temperature [K]
[in]TeElectron temperature [K]
[in]YSpecies mass fractions [-], length K
[out]p_heavyHeavy-pool partial pressure [Pa]
[out]p_electronElectron partial pressure [Pa]

Implements rizer::ThermoAccessor.

Definition at line 59 of file GammaLawThermo.cpp.

◆ soundSpeed()

double rizer::GammaLawThermo::soundSpeed ( double r,
double t,
double rho,
double Tg,
double Te,
const double * Y ) const
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.

Parameters
[in]rNode radius [m]
[in]tCurrent time [s]
[in]rhoMixture mass density [kg/m^3]
[in]TgHeavy-pool temperature [K]
[in]TeElectron temperature [K]
[in]YSpecies mass fractions [-], length K
Returns
Sound speed [m/s]

Implements rizer::ThermoAccessor.

Definition at line 69 of file GammaLawThermo.cpp.


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