rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
Toggle main menu visibility
Loading...
Searching...
No Matches
PlasmaReactor0D.h
Go to the documentation of this file.
1
20
21
#ifndef RIZER_PLASMA_REACTOR_0D_H
22
#define RIZER_PLASMA_REACTOR_0D_H
23
24
#ifndef NOMINMAX
25
#define NOMINMAX
26
#endif
27
#include "
cantera/base/Solution.h
"
28
#include "
PlasmaCell.h
"
29
#include "
transport/CollisionModel.h
"
30
31
#include "
cantera/thermo/PlasmaPhase.h
"
32
33
#include <memory>
34
#include <string>
35
#include <vector>
36
37
namespace
rizer
38
{
39
40
struct
PlasmaReactor0DConfig
41
{
42
std::string
mech
,
phase
;
44
bool
reacting
=
true
;
48
std::vector<CollisionModel::SpeciesSpec>
specs
;
51
double
Te_min
= 200.0;
54
double
Te_max
= 1.0e5;
56
std::size_t
Te_n
= 400;
60
double
gap
= 0.0;
65
std::vector<double>
species_h0k
;
66
};
67
68
class
PlasmaReactor0D
69
{
70
public
:
77
explicit
PlasmaReactor0D
(
const
PlasmaReactor0DConfig
&cfg);
78
81
std::size_t
nSpecies
()
const
{
return
m_rhs->nSpecies(); }
82
86
std::vector<std::string>
speciesNames
()
const
;
87
94
double
electricalConductivity
(
double
Tg,
double
Te,
const
double
*Y,
95
double
rho)
const
96
{
97
return
m_rhs->electricalConductivity(Tg, Te, Y, rho);
98
}
99
104
double
electronDensity
(
double
Tg,
double
Te,
const
double
*Y,
double
rho)
const
105
{
106
return
m_rhs->electronDensity(Tg, Te, Y, rho);
107
}
108
136
void
rhs
(
double
Tg,
double
Te,
double
V,
const
double
*Y,
double
E,
double
mass,
137
double
p_ext,
double
polytropic_index,
double
*dydt)
const
;
138
148
const
PlasmaCell::Diagnostics
&
diagnostics
()
const
{
return
m_diag; }
149
150
private
:
153
Cantera::PlasmaPhase
*m_plasma =
nullptr
;
154
156
std::shared_ptr<Cantera::Solution> m_sol;
159
std::unique_ptr<PlasmaCell> m_rhs;
162
std::size_t m_ie;
165
double
m_gap;
169
mutable
PlasmaCell::Diagnostics
m_diag;
170
};
171
172
}
// namespace rizer
173
174
#endif
CollisionModel.h
PlasmaCell.h
One cell of two-temperature reacting plasma: the source terms the 0-D reactor and the 1-D channel bot...
PlasmaPhase.h
Solution.h
Cantera::PlasmaPhase
rizer::PlasmaReactor0D::electronDensity
double electronDensity(double Tg, double Te, const double *Y, double rho) const
Electron number density [1/m^3].
Definition
PlasmaReactor0D.h:104
rizer::PlasmaReactor0D::nSpecies
std::size_t nSpecies() const
Definition
PlasmaReactor0D.h:81
rizer::PlasmaReactor0D::rhs
void rhs(double Tg, double Te, double V, const double *Y, double E, double mass, double p_ext, double polytropic_index, double *dydt) const
Full 0D RHS.
Definition
PlasmaReactor0D.cpp:82
rizer::PlasmaReactor0D::PlasmaReactor0D
PlasmaReactor0D(const PlasmaReactor0DConfig &cfg)
Construct from a mechanism/phase and collision-model configuration.
Definition
PlasmaReactor0D.cpp:22
rizer::PlasmaReactor0D::speciesNames
std::vector< std::string > speciesNames() const
Species names in mechanism index order, so a caller passing plain numbers across the Python boundary ...
Definition
PlasmaReactor0D.cpp:74
rizer::PlasmaReactor0D::diagnostics
const PlasmaCell::Diagnostics & diagnostics() const
Power / Maxwellian-condition breakdown from the most recent rhs() call (see PlasmaCell::Diagnostics) ...
Definition
PlasmaReactor0D.h:148
rizer::PlasmaReactor0D::electricalConductivity
double electricalConductivity(double Tg, double Te, const double *Y, double rho) const
Electrical conductivity [S/m] at state .
Definition
PlasmaReactor0D.h:94
rizer
Definition
ElectronReactions.cpp:11
rizer::PlasmaCell::Diagnostics
Optional power / Maxwellian-condition breakdown filled by rates() when a non-null pointer is passed.
Definition
PlasmaCell.h:98
rizer::PlasmaReactor0DConfig
Definition
PlasmaReactor0D.h:41
rizer::PlasmaReactor0DConfig::Te_max
double Te_max
Upper bound of the tabulated electron-temperature grid [K].
Definition
PlasmaReactor0D.h:54
rizer::PlasmaReactor0DConfig::Te_min
double Te_min
Lower bound of the tabulated electron-temperature grid [K].
Definition
PlasmaReactor0D.h:51
rizer::PlasmaReactor0DConfig::mech
std::string mech
Definition
PlasmaReactor0D.h:42
rizer::PlasmaReactor0DConfig::phase
std::string phase
Mechanism file/URI, and phase name within it.
Definition
PlasmaReactor0D.h:42
rizer::PlasmaReactor0DConfig::gap
double gap
Inter-electrode gap [m], for the polytropic volume equation.
Definition
PlasmaReactor0D.h:60
rizer::PlasmaReactor0DConfig::specs
std::vector< CollisionModel::SpeciesSpec > specs
Per-species cross-section model (cross-section data / radius / ion Z), exactly one entry per mechanis...
Definition
PlasmaReactor0D.h:48
rizer::PlasmaReactor0DConfig::Te_n
std::size_t Te_n
Number of points in the tabulated Te grid [-].
Definition
PlasmaReactor0D.h:56
rizer::PlasmaReactor0DConfig::species_h0k
std::vector< double > species_h0k
Per-species standard enthalpy of formation at 0 K [J/kmol]; forwarded to PlasmaCellConfig::species_h0...
Definition
PlasmaReactor0D.h:65
rizer::PlasmaReactor0DConfig::reacting
bool reacting
If false, disables chemistry source terms in the RHS.
Definition
PlasmaReactor0D.h:44
rizer
cantera_ext
models
nrp
PlasmaReactor0D.h
Generated by
1.18.0