rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
Toggle main menu visibility
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
27
#include "
cantera/thermo/PlasmaPhase.h
"
28
29
namespace
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
71
struct
TwoTemperatureState
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
84
inline
TwoTemperatureState
readTwoTemperatureState
(
const
Cantera::PlasmaPhase
&phase)
85
{
86
const
std::size_t electron = phase.
electronSpeciesIndex
();
87
TwoTemperatureState
state;
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
PlasmaPhase.h
Cantera::Phase::concentration
virtual double concentration(const size_t k) const
Cantera::Phase::moleFraction
double moleFraction(size_t k) const
Cantera::PlasmaPhase
Cantera::PlasmaPhase::pressure
double pressure() const override
Cantera::PlasmaPhase::meanTemperature
double meanTemperature() const
Cantera::PlasmaPhase::electronSpeciesIndex
size_t electronSpeciesIndex() const
Cantera::PlasmaPhase::electronPressure
virtual double electronPressure() const
Cantera::Avogadro
const double Avogadro
rizer::units::k_b
constexpr double k_b
Boltzmann constant [J/K]. Exact (CODATA).
Definition
units.h:28
rizer::units::R_kmol
constexpr double R_kmol
Ideal gas constant [J/(kmol K)] (matches Cantera's GasConstant).
Definition
units.h:60
rizer
Definition
ElectronReactions.cpp:11
rizer::Boltzmann
constexpr double Boltzmann
Definition
PlasmaState.h:49
rizer::TemperatureFloor
constexpr double TemperatureFloor
Lower limit of the mechanism's NASA polynomials [K].
Definition
PlasmaState.h:34
rizer::monatomicElectronCv
double monatomicElectronCv(double electron_molecular_weight)
Electron specific heat at constant volume, per kg of ELECTRONS, .
Definition
PlasmaState.h:64
rizer::GasConstant
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
rizer::TemperatureCeiling
constexpr double TemperatureCeiling
Upper limit of the physically meaningful range [K].
Definition
PlasmaState.h:43
rizer::readTwoTemperatureState
TwoTemperatureState readTwoTemperatureState(const Cantera::PlasmaPhase &phase)
Read the two-temperature EOS back from a phase whose state is set.
Definition
PlasmaState.h:84
rizer::TwoTemperatureState
The two-temperature equation of state at the state currently set on a phase, PHYSICS....
Definition
PlasmaState.h:72
rizer::TwoTemperatureState::mean_temperature
double mean_temperature
[K], the one pressure uses
Definition
PlasmaState.h:77
rizer::TwoTemperatureState::electron_fraction
double electron_fraction
[-]
Definition
PlasmaState.h:76
rizer::TwoTemperatureState::pressure
double pressure
Total [Pa].
Definition
PlasmaState.h:73
rizer::TwoTemperatureState::electron_density
double electron_density
[1/m^3]
Definition
PlasmaState.h:78
rizer::TwoTemperatureState::electron_pressure
double electron_pressure
[Pa]
Definition
PlasmaState.h:74
rizer::TwoTemperatureState::heavy_pressure
double heavy_pressure
[Pa]
Definition
PlasmaState.h:75
units.h
Physical constants and unit conversions, in SI by default.
rizer
cantera_ext
thermo
PlasmaState.h
Generated by
1.18.0