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

Equation-of-state and caloric accessor injected into hydroStep(). More...

#include <ThermoAccessor.h>

Inheritance diagram for rizer::ThermoAccessor:
rizer::CanteraThermo rizer::GammaLawThermo rizer::PrescribedPressureThermo

Public Member Functions

virtual ~ThermoAccessor ()=default
virtual void pressures (double r, double t, double rho, double Tg, double Te, const double *Y, double &p_heavy, double &p_electron) const =0
 Per-pool partial pressures, PHYSICS.md equation (G6).
virtual double soundSpeed (double r, double t, double rho, double Tg, double Te, const double *Y) const =0
 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.
virtual double heavyEnergy (double Tg, const double *Y) const =0
 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).
virtual double electronCv () const =0
 Electron specific heat at constant volume, per kg of ELECTRONS, \(c_{v,\mathrm{e}}=\tfrac32 k_\mathrm{B}/m_\mathrm{e}\).
virtual double densityFromPressure (double pressure, double Tg, double Te, const double *Y) const =0
 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.
virtual double heavyTemperature (double rho, const double *Y, double heavy_internal_energy_target, double Tg_seed) const =0
 Invert \(e_\mathrm{H}\) for \(T_\mathrm{H}\) at fixed density and composition (NUMERICS.md section 8).
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

Equation-of-state and caloric accessor injected into hydroStep().

Every method that evaluates a FIELD takes the node radius and the current time, because a validation case may PRESCRIBE that field rather than recover it from the state (NUMERICS.md section "Momentum alone", cases 1-2); densityFromPressure() is the exception, since the pressure it inverts is handed in. A production accessor backed by Cantera's PlasmaPhase ignores both arguments; a prescribed- field stub is the reason they exist, exactly as the ghost-state callback takes (r_face, t) for the same reason.

Definition at line 45 of file ThermoAccessor.h.

Constructor & Destructor Documentation

◆ ~ThermoAccessor()

virtual rizer::ThermoAccessor::~ThermoAccessor ( )
virtualdefault

Member Function Documentation

◆ densityFromPressure()

virtual double rizer::ThermoAccessor::densityFromPressure ( double pressure,
double Tg,
double Te,
const double * Y ) const
pure virtual

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]

Implemented in rizer::CanteraThermo, rizer::GammaLawThermo, and rizer::PrescribedPressureThermo.

◆ electronCv()

virtual double rizer::ThermoAccessor::electronCv ( ) const
pure virtual

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]

Implemented in rizer::CanteraThermo, rizer::GammaLawThermo, and rizer::PrescribedPressureThermo.

◆ heavyEnergy()

virtual double rizer::ThermoAccessor::heavyEnergy ( double Tg,
const double * Y ) const
pure virtual

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]

Implemented in rizer::CanteraThermo, rizer::GammaLawThermo, and rizer::PrescribedPressureThermo.

◆ heavyTemperature()

virtual double rizer::ThermoAccessor::heavyTemperature ( double rho,
const double * Y,
double heavy_internal_energy_target,
double Tg_seed ) const
pure virtual

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]

Implemented in rizer::CanteraThermo, rizer::GammaLawThermo, and rizer::PrescribedPressureThermo.

◆ pressures()

virtual void rizer::ThermoAccessor::pressures ( double r,
double t,
double rho,
double Tg,
double Te,
const double * Y,
double & p_heavy,
double & p_electron ) const
pure virtual

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]

Implemented in rizer::CanteraThermo, rizer::GammaLawThermo, and rizer::PrescribedPressureThermo.

◆ soundSpeed()

virtual double rizer::ThermoAccessor::soundSpeed ( double r,
double t,
double rho,
double Tg,
double Te,
const double * Y ) const
pure virtual

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]

Implemented in rizer::CanteraThermo, rizer::GammaLawThermo, and rizer::PrescribedPressureThermo.

◆ stateProperties()

virtual StateProperties rizer::ThermoAccessor::stateProperties ( double r,
double t,
double rho,
double Tg,
double Te,
const double * Y ) const
inlinevirtual

pressures(), soundSpeed() and heavyEnergy() at one state, in one call.

hydroStep() needs all three for every cell of every sub-cycle. This default composes the three methods; an accessor whose state is costly to set, such as CanteraThermo, overrides it to set the state once.

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
The two partial pressures, the sound speed and e_H

Reimplemented in rizer::CanteraThermo.

Definition at line 136 of file ThermoAccessor.h.


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