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

Pressure prescribed as a function of (r, t), every other property delegated to a GammaLawThermo. More...

#include <PrescribedPressureThermo.h>

Inheritance diagram for rizer::PrescribedPressureThermo:
rizer::ThermoAccessor

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.

Detailed Description

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.

Member Typedef Documentation

◆ PressureFn

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.

Constructor & Destructor Documentation

◆ PrescribedPressureThermo()

rizer::PrescribedPressureThermo::PrescribedPressureThermo ( PressureFn pressure,
GammaLawThermo backing )
Parameters
[in]pressurePrescribed p(r, t) [Pa]
[in]backingAccessor supplying sound speed and the caloric relations

Definition at line 15 of file PrescribedPressureThermo.cpp.

Member Function Documentation

◆ densityFromPressure()

double rizer::PrescribedPressureThermo::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 76 of file PrescribedPressureThermo.cpp.

◆ electronCv()

double rizer::PrescribedPressureThermo::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 71 of file PrescribedPressureThermo.cpp.

◆ heavyEnergy()

double rizer::PrescribedPressureThermo::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 66 of file PrescribedPressureThermo.cpp.

◆ heavyTemperature()

double rizer::PrescribedPressureThermo::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 85 of file PrescribedPressureThermo.cpp.

◆ pressures()

void rizer::PrescribedPressureThermo::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 30 of file PrescribedPressureThermo.cpp.

◆ soundSpeed()

double rizer::PrescribedPressureThermo::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 55 of file PrescribedPressureThermo.cpp.


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