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
45
46#ifndef RIZER_COLLISION_MODEL_H
47#define RIZER_COLLISION_MODEL_H
48
49#include "PropertyTable.h"
50
51#include <cstddef>
52#include <vector>
53
54namespace rizer {
55
57public:
60 struct SpeciesSpec {
61 std::vector<double> energy_J;
62 std::vector<double> sigma_m2;
63 double radius = -1.0;
64 int Z = 0;
65 bool is_electron = false;
66 double molar_mass = 0.0;
67 };
68
69 CollisionModel() = default;
77 CollisionModel(const std::vector<SpeciesSpec>& specs, double Te_min, double Te_max,
78 std::size_t Te_n, bool spitzer_correction = true);
79
80 bool empty() const { return m_species.empty(); }
81
92 void evaluate(double Te, double n_e, const double* n_k, std::size_t nsp,
93 double& sigma, double& nu_E, double& cond_maxwell_2) const;
94
100 double conductivity(double Te, double n_e, const double* n_k,
101 std::size_t nsp) const;
102
111 static double electronElectronCollisionFrequency(double n_e, double Te);
112
122 static double meanCrossSection(const std::vector<double>& energy_J,
123 const std::vector<double>& sigma_m2, double Te,
124 double x_max = 20.0, int N = 1000);
125
134 static std::vector<double> meanCrossSectionTable(
135 const std::vector<double>& energy_J, const std::vector<double>& sigma_m2,
136 const std::vector<double>& Te, double x_max = 20.0, int N = 1000);
137
138private:
139 enum class Kind { Skip, Tabulated, HardSphere, Ion };
140 struct Sp {
141 Kind kind = Kind::Skip;
142 PropertyTable Qbar;
143 double cst = 0.0;
144 int Z = 0;
145 double two_me_over_mh = 0.0;
146 double inv_mh = 0.0;
147 };
148 std::vector<Sp> m_species;
149 bool m_spitzer = true;
150};
151
152} // namespace rizer
153
154#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...
double conductivity(double Te, double n_e, const double *n_k, std::size_t nsp) const
Conductivity only [S/m].
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...
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.
void evaluate(double Te, double n_e, const double *n_k, std::size_t nsp, double &sigma, double &nu_E, double &cond_maxwell_2) const
Composition-resolved electron transport.
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)