rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
Loading...
Searching...
No Matches
CollisionModel.h
Go to the documentation of this file.
1
46
47#ifndef RIZER_COLLISION_MODEL_H
48#define RIZER_COLLISION_MODEL_H
49
51
52#include <cstddef>
53#include <vector>
54
55namespace rizer {
56
58public:
61 struct SpeciesSpec {
62 std::vector<double> energy_J;
63 std::vector<double> sigma_m2;
64 double radius = -1.0;
65 int Z = 0;
66 bool is_electron = false;
67 double molar_mass = 0.0;
68 };
69
70 CollisionModel() = default;
78 CollisionModel(const std::vector<SpeciesSpec>& specs, double Te_min, double Te_max,
79 std::size_t Te_n, bool spitzer_correction = true);
80
81 bool empty() const { return m_species.empty(); }
82
101 void evaluate(double Te, double n_e, const double* n_k, std::size_t nsp,
102 double& sigma, double& nu_E, double& nu_eH, double& nu_eI,
103 double& nu_eH_mass_weighted) const;
104
113 static double electronElectronCollisionFrequency(double n_e, double Te);
114
124 static double meanCrossSection(const std::vector<double>& energy_J,
125 const std::vector<double>& sigma_m2, double Te,
126 double x_max = 20.0, int N = 1000);
127
136 static std::vector<double> meanCrossSectionTable(
137 const std::vector<double>& energy_J, const std::vector<double>& sigma_m2,
138 const std::vector<double>& Te, double x_max = 20.0, int N = 1000);
139
140private:
141 enum class Kind { Skip, Tabulated, HardSphere, Ion };
142 struct Sp {
143 Kind kind = Kind::Skip;
144 PropertyTable Qbar;
145 double cst = 0.0;
146 int Z = 0;
147 double two_me_over_mh = 0.0;
148 double inv_mh = 0.0;
149 };
150 std::vector<Sp> m_species;
151 bool m_spitzer = true;
152};
153
154} // namespace rizer
155
156#endif
static double electronElectronCollisionFrequency(double n_e, double Te)
Electron-electron collision frequency [1/s] (Mitchner II-8.11e with Z=1), the closed-form ingredient...
static double meanCrossSection(const std::vector< double > &energy_J, const std::vector< double > &sigma_m2, double Te, double x_max=20.0, int N=1000)
The Maxwellian momentum-transfer kernel Qbar(Te) [m^2] (single source of truth; also exposed to Pytho...
void evaluate(double Te, double n_e, const double *n_k, std::size_t nsp, double &sigma, double &nu_E, double &nu_eH, double &nu_eI, double &nu_eH_mass_weighted) const
Composition-resolved electron transport.
static std::vector< double > meanCrossSectionTable(const std::vector< double > &energy_J, const std::vector< double > &sigma_m2, const std::vector< double > &Te, double x_max=20.0, int N=1000)
Tabulated variant of meanCrossSection, evaluated at each Te in the input vector.
Per-species spec, in species-index order.
bool is_electron
true for the electron species (skipped)
std::vector< double > energy_J
tabulated cross-section abscissa [J]
double molar_mass
[kg/mol], for the elastic 2 m_e/m_h factor
double radius
hard-sphere radius [m] (>0 if used)
std::vector< double > sigma_m2
tabulated cross-section [m^2]
int Z
ion charge number (>0 marks an ion)