rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
Loading...
Searching...
No Matches
PlasmaState.h
Go to the documentation of this file.
1
21
22#ifndef RIZER_PLASMA_STATE_H
23#define RIZER_PLASMA_STATE_H
24
25#include "units.h"
26
28
29namespace rizer
30{
31
34 constexpr double TemperatureFloor = 200.0;
35
43 constexpr double TemperatureCeiling = 1.0e5;
44
48 constexpr double GasConstant = units::R_kmol;
49 constexpr double Boltzmann = units::k_b;
50
64 inline double monatomicElectronCv(double electron_molecular_weight)
65 {
66 return 1.5 * GasConstant / electron_molecular_weight;
67 }
68
72 {
73 double pressure = 0.0;
74 double electron_pressure = 0.0;
75 double heavy_pressure = 0.0;
76 double electron_fraction = 0.0;
77 double mean_temperature = 0.0;
78 double electron_density = 0.0;
79 };
80
85 {
86 const std::size_t electron = phase.electronSpeciesIndex();
88 state.pressure = phase.pressure();
89 state.electron_pressure = phase.electronPressure();
90 state.heavy_pressure = state.pressure - state.electron_pressure;
91 state.electron_fraction = phase.moleFraction(electron);
92 state.mean_temperature = phase.meanTemperature();
93 // concentration() is in kmol/m^3 and Avogadro's number is per kmol, so
94 // the product is the number density the collision model wants.
95 state.electron_density = phase.concentration(electron) * Cantera::Avogadro;
96 return state;
97 }
98
99} // namespace rizer
100
101#endif // RIZER_PLASMA_STATE_H
virtual double concentration(const size_t k) const
double moleFraction(size_t k) const
double pressure() const override
double meanTemperature() const
size_t electronSpeciesIndex() const
virtual double electronPressure() const
const double Avogadro
constexpr double k_b
Boltzmann constant [J/K]. Exact (CODATA).
Definition units.h:28
constexpr double R_kmol
Ideal gas constant [J/(kmol K)] (matches Cantera's GasConstant).
Definition units.h:60
constexpr double Boltzmann
Definition PlasmaState.h:49
constexpr double TemperatureFloor
Lower limit of the mechanism's NASA polynomials [K].
Definition PlasmaState.h:34
double monatomicElectronCv(double electron_molecular_weight)
Electron specific heat at constant volume, per kg of ELECTRONS, .
Definition PlasmaState.h:64
constexpr double GasConstant
Universal gas constant [J/kmol/K] and Boltzmann's constant [J/K], from units.h rather than Cantera's ...
Definition PlasmaState.h:48
constexpr double TemperatureCeiling
Upper limit of the physically meaningful range [K].
Definition PlasmaState.h:43
TwoTemperatureState readTwoTemperatureState(const Cantera::PlasmaPhase &phase)
Read the two-temperature EOS back from a phase whose state is set.
Definition PlasmaState.h:84
The two-temperature equation of state at the state currently set on a phase, PHYSICS....
Definition PlasmaState.h:72
double mean_temperature
[K], the one pressure uses
Definition PlasmaState.h:77
double pressure
Total [Pa].
Definition PlasmaState.h:73
double electron_density
[1/m^3]
Definition PlasmaState.h:78
Physical constants and unit conversions, in SI by default.