rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
Toggle main menu visibility
Loading...
Searching...
No Matches
Plasma0DReactor.h
Go to the documentation of this file.
1
15
16
#ifndef RIZER_PLASMA_0D_REACTOR_H
17
#define RIZER_PLASMA_0D_REACTOR_H
18
19
#ifndef NOMINMAX
20
#define NOMINMAX
21
#endif
22
#include "
cantera/base/Solution.h
"
23
#include "
ReactorRHS.h
"
24
#include "
CollisionModel.h
"
25
26
#include <memory>
27
#include <string>
28
#include <vector>
29
30
namespace
rizer
{
31
32
class
Plasma0DReactor
{
33
public
:
34
struct
Config
{
35
std::string
mech
,
phase
;
37
bool
reacting
=
true
;
40
std::vector<CollisionModel::SpeciesSpec>
specs
;
42
double
Te_min
= 300.0;
44
double
Te_max
= 1.0e5;
46
std::size_t
Te_n
= 400;
48
bool
spitzer
=
true
;
49
double
gap
= 0.0;
50
};
51
56
explicit
Plasma0DReactor
(
const
Config
& cfg);
57
58
std::size_t
nSpecies
()
const
{
return
m_rhs->nSpecies(); }
59
std::vector<std::string>
speciesNames
()
const
;
60
67
double
conductivity
(
double
Tg,
double
Te,
const
double
* Y,
double
rho)
const
{
68
return
m_rhs->conductivity(Tg, Te, Y, rho);
69
}
70
75
double
electronDensity
(
double
Tg,
double
Te,
const
double
* Y,
double
rho)
const
{
76
return
m_rhs->electronDensity(Tg, Te, Y, rho);
77
}
78
98
void
rhs
(
double
Tg,
double
Te,
double
V,
const
double
* Y,
double
E,
double
mass,
99
double
p_ext,
double
polytropic_index,
double
* dydt)
const
;
100
105
const
ReactorRHS::Diagnostics
&
diagnostics
()
const
{
return
m_diag; }
106
107
private
:
109
std::shared_ptr<Cantera::Solution> m_sol;
112
std::unique_ptr<ReactorRHS> m_rhs;
115
std::size_t m_ie;
118
double
m_gap;
122
mutable
ReactorRHS::Diagnostics
m_diag;
123
};
124
125
}
// namespace rizer
126
127
#endif
CollisionModel.h
ReactorRHS.h
Solution.h
rizer::Plasma0DReactor::nSpecies
std::size_t nSpecies() const
Definition
Plasma0DReactor.h:58
rizer::Plasma0DReactor::electronDensity
double electronDensity(double Tg, double Te, const double *Y, double rho) const
Electron number density [1/m^3].
Definition
Plasma0DReactor.h:75
rizer::Plasma0DReactor::speciesNames
std::vector< std::string > speciesNames() const
Definition
Plasma0DReactor.cpp:56
rizer::Plasma0DReactor::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
Plasma0DReactor.cpp:63
rizer::Plasma0DReactor::diagnostics
const ReactorRHS::Diagnostics & diagnostics() const
Power / Maxwellian-condition breakdown from the most recent rhs() call (see ReactorRHS::Diagnostics) ...
Definition
Plasma0DReactor.h:105
rizer::Plasma0DReactor::Plasma0DReactor
Plasma0DReactor(const Config &cfg)
Construct from a mechanism/phase and collision-model configuration.
Definition
Plasma0DReactor.cpp:21
rizer::Plasma0DReactor::conductivity
double conductivity(double Tg, double Te, const double *Y, double rho) const
Electrical conductivity [S/m] at state .
Definition
Plasma0DReactor.h:67
rizer
Definition
CollisionModel.cpp:7
rizer::Plasma0DReactor::Config
Definition
Plasma0DReactor.h:34
rizer::Plasma0DReactor::Config::spitzer
bool spitzer
Use Spitzer (Coulomb) conductivity contribution when true.
Definition
Plasma0DReactor.h:48
rizer::Plasma0DReactor::Config::gap
double gap
[m], for the polytropic volume equation (optional)
Definition
Plasma0DReactor.h:49
rizer::Plasma0DReactor::Config::Te_n
std::size_t Te_n
Number of points in the tabulated Te grid [-].
Definition
Plasma0DReactor.h:46
rizer::Plasma0DReactor::Config::Te_max
double Te_max
Upper bound of the tabulated electron-temperature grid [K].
Definition
Plasma0DReactor.h:44
rizer::Plasma0DReactor::Config::reacting
bool reacting
If false, disables chemistry source terms in the RHS.
Definition
Plasma0DReactor.h:37
rizer::Plasma0DReactor::Config::specs
std::vector< CollisionModel::SpeciesSpec > specs
Per-species cross-section model (cross-section data / radius / ion Z).
Definition
Plasma0DReactor.h:40
rizer::Plasma0DReactor::Config::phase
std::string phase
Mechanism file/URI, and phase name within it.
Definition
Plasma0DReactor.h:35
rizer::Plasma0DReactor::Config::mech
std::string mech
Definition
Plasma0DReactor.h:35
rizer::Plasma0DReactor::Config::Te_min
double Te_min
Lower bound of the tabulated electron-temperature grid [K].
Definition
Plasma0DReactor.h:42
rizer::ReactorRHS::Diagnostics
Optional power / Maxwellian-condition breakdown filled by rates() when a non-null pointer is passed.
Definition
ReactorRHS.h:43
rizer
cantera_ext
src
Plasma0DReactor.h
Generated by
1.17.0