8#ifndef CT_EEDF_TWO_TERM_APPROXIMATION_H
9#define CT_EEDF_TWO_TERM_APPROXIMATION_H
12#include "cantera/numerics/eigen_sparse.h"
69 int calculateDistributionFunction();
71 void setLinearGrid(
double& kTe_max,
size_t& ncell);
75 vector<double> getGridEdge()
const {
79 vector<double> getEEDFEdge()
const {
83 double getElectronMobility()
const {
131 Eigen::VectorXd
iterate(
const Eigen::VectorXd& f0,
double delta);
135 double integralPQ(
double a,
double b,
double u0,
double u1,
136 double g,
double x0);
144 vector<double>
vector_g(
const Eigen::VectorXd& f0);
153 Eigen::SparseMatrix<double>
matrix_P(
const vector<double>& g,
size_t k);
172 Eigen::SparseMatrix<double>
matrix_Q(
const vector<double>& g,
size_t k);
184 Eigen::SparseMatrix<double>
matrix_A(
const Eigen::VectorXd& f0);
216 double norm(
const Eigen::VectorXd& f,
const Eigen::VectorXd& grid);
228 vector<vector<size_t>>
m_j;
231 vector<vector<size_t>>
m_i;
237 vector<vector<vector<double>>>
m_eps;
Boltzmann equation solver for the electron energy distribution function based on the two-term approxi...
double m_rtol
Error tolerance for convergence.
Eigen::VectorXd m_f0
normalized electron energy distribution function
vector< double > m_gridEdge
Grid of electron energy (cell boundary i-1/2) [eV].
vector< vector< size_t > > m_i
Location of cell i for grid cache.
void calculateTotalCrossSection()
Compute the total (elastic + inelastic) cross section.
vector< vector< size_t > > m_j
Location of cell j for grid cache.
vector< double > m_X_targets_prev
Previous mole fraction of targets used to compute eedf.
vector< vector< vector< double > > > m_eps
The energy boundaries of the overlap of cell i and j.
vector< vector< vector< double > > > m_sigma
Cross section at the boundaries of the overlap of cell i and j.
vector< size_t > m_k_lg_Targets
Local to global indices.
Eigen::SparseMatrix< double > matrix_Q(const vector< double > &g, size_t k)
The matrix of scattering-in.
double m_moleFractionThreshold
The threshold for species mole fractions.
bool m_first_call
First call to calculateDistributionFunction.
void converge(Eigen::VectorXd &f0)
Iterate f0 (EEDF) until convergence.
double m_delta0
Formerly options for the EEDF solver.
double electronDiffusivity(const Eigen::VectorXd &f0)
Diffusivity.
PlasmaPhase * m_phase
Pointer to the PlasmaPhase object used to initialize this object.
double norm(const Eigen::VectorXd &f, const Eigen::VectorXd &grid)
Compute the L1 norm of a function f defined over a given energy grid.
void updateMoleFractions()
Update the vector of species mole fractions.
vector< size_t > m_kTargets
list of target species indices in global Cantera numbering (1 index per cs)
bool m_has_EEDF
flag of having an EEDF
double electronMobility(const Eigen::VectorXd &f0)
Mobility.
Eigen::VectorXd m_gridCenter
Grid of electron energy (cell center) [eV].
size_t m_maxn
Maximum number of iterations.
Eigen::SparseMatrix< double > matrix_A(const Eigen::VectorXd &f0)
Matrix A (Ax = b) of the equation of EEDF, which is discretized by the exponential scheme of Scharfet...
Eigen::VectorXd iterate(const Eigen::VectorXd &f0, double delta)
An iteration of solving electron energy distribution function.
double m_electronMobility
Electron mobility [m²/V·s].
size_t m_points
The number of points in the EEDF grid.
vector< size_t > m_kOthers
Indices of species which has no cross-section data.
double m_factorM
The factor for step size change.
void calculateTotalElasticCrossSection()
Compute the total elastic collision cross section.
void updateCrossSections()
Update the total cross sections based on the current state.
void initSpeciesIndexCrossSections()
Initialize species indices associated with cross-section data.
double m_init_kTe
The initial electron temperature [eV].
Eigen::SparseMatrix< double > matrix_P(const vector< double > &g, size_t k)
The matrix of scattering-out.
double netProductionFrequency(const Eigen::VectorXd &f0)
Reduced net production frequency.
std::string m_firstguess
The first guess for the EEDF.
std::string m_growth
The growth model of EEDF.
vector< double > m_totalCrossSectionEdge
Total electron cross section on the cell boundary (i-1/2) of energy grid.
vector< double > m_f0_edge
EEDF at grid edges (cell boundaries)
vector< size_t > m_klocTargets
list of target species indices in local X EEDF numbering (1 index per cs)
vector< double > m_X_targets
Mole fraction of targets.
double integralPQ(double a, double b, double u0, double u1, double g, double x0)
The integral in [a, b] of assuming that u is linear with u(a) = u0 and u(b) = u1.
vector< double > m_totalCrossSectionCenter
Total electron cross section on the cell center of energy grid.
vector< double > vector_g(const Eigen::VectorXd &f0)
Vector g is used by matrix_P() and matrix_Q().
vector< int > m_inFactor
in factor.
vector< double > m_sigmaElastic
vector of total elastic cross section weighted with mass ratio
Base class for handling plasma properties, specifically focusing on the electron energy distribution.
This file contains definitions of constants, types and terms that are used in internal routines and a...
Namespace for the Cantera kernel.