Cantera  4.0.0a1
Loading...
Searching...
No Matches
PlasmaPhase.h
Go to the documentation of this file.
1/**
2 * @file PlasmaPhase.h
3 * Header file for class PlasmaPhase.
4 */
5
6// This file is part of Cantera. See License.txt in the top-level directory or
7// at https://cantera.org/license.txt for license and copyright information.
8
9#ifndef CT_PLASMAPHASE_H
10#define CT_PLASMAPHASE_H
11
14#include "cantera/numerics/eigen_sparse.h"
15
16namespace Cantera
17{
18
19class Reaction;
20class ElectronCollisionPlasmaRate;
21
22//! Base class for handling plasma properties, specifically focusing on the
23//! electron energy distribution.
24/*!
25 * This class provides functionality to manage the the electron energy distribution
26 * using two primary methods for defining the electron distribution and electron
27 * temperature.
28 *
29 * The first method utilizes setElectronTemperature(), which sets the electron
30 * temperature and calculates the electron energy distribution assuming an
31 * isotropic-velocity model. Note that all units in PlasmaPhase are in SI, except
32 * for electron energy, which is measured in volts.
33 *
34 * The generalized electron energy distribution for an isotropic-velocity
35 * distribution (as described by Gudmundsson @cite gudmundsson2001 and Khalilpour
36 * and Foroutan @cite khalilpour2020)
37 * is given by:
38 * @f[
39 * f(\epsilon) = c_1 \frac{\sqrt{\epsilon}}{\epsilon_m^{3/2}}
40 * \exp \left(-c_2 \left(\frac{\epsilon}{\epsilon_m}\right)^x \right),
41 * @f]
42 * where @f$ x = 1 @f$ corresponds to a Maxwellian distribution and
43 * @f$ x = 2 @f$ corresponds to a Druyvesteyn distribution.
44 * Here, @f$ \epsilon_m = \frac{3}{2} T_e @f$ [V] represents the
45 * mean electron energy.
46 *
47 * The total probability distribution integrates to one:
48 * @f[
49 * \int_0^{\infty} f(\epsilon) d\epsilon = 1.
50 * @f]
51 * According to Hagelaar and Pitchford @cite hagelaar2005, the electron energy
52 * probability function can be defined as
53 * @f$ F(\epsilon) = \frac{f(\epsilon)}{\sqrt{\epsilon}} @f$ with units of
54 * [V@f$^{-3/2}@f$]. The generalized form of the electron energy probability
55 * function for isotropic-velocity distributions is:
56 * @f[
57 * F(\epsilon) = c_1 \frac{1}{\epsilon_m^{3/2}}
58 * \exp\left(-c_2 \left(\frac{\epsilon}{\epsilon_m}\right)^x\right),
59 * @f]
60 * and this form is used to model the isotropic electron energy distribution
61 * in PlasmaPhase.
62 *
63 * The second method allows for manual definition of the electron energy
64 * distribution using setDiscretizedElectronEnergyDist(). In this approach,
65 * the electron temperature is derived from the mean electron energy,
66 * @f$ \epsilon_m @f$, which can be calculated as follows @cite hagelaar2005 :
67 * @f[
68 * \epsilon_m = \int_0^{\infty} \epsilon^{3/2} F(\epsilon) d\epsilon.
69 * @f]
70 * This integral can be approximated using the trapezoidal rule,
71 * @f[
72 * \epsilon_m = \sum_i \left(\epsilon_{i+1}^{5/2} - \epsilon_i^{5/2}\right)
73 * \frac{F(\epsilon_{i+1}) + F(\epsilon_i)}{2},
74 * @f]
75 * where @f$ i @f$ is the index of discrete energy levels, or Simpson's rule.
76 *
77 * @warning This class is an experimental part of %Cantera and may be
78 * changed or removed without notice.
79 * @todo Implement electron Boltzmann equation solver to solve EEDF.
80 * https://github.com/Cantera/enhancements/issues/127
81 * @ingroup thermoprops
82 */
84{
85public:
86 //! Construct and initialize a PlasmaPhase object
87 //! directly from an input file. The constructor initializes the electron
88 //! energy distribution to be Druyvesteyn distribution (m_x = 2.0). The initial
89 //! electron energy grid is set to a linear space which starts at 0.01 eV and ends
90 //! at 1 eV with 1000 points.
91 /*!
92 * @param inputFile Name of the input file containing the phase definition
93 * to set up the object. If blank, an empty phase will be
94 * created.
95 * @param id ID of the phase in the input file. Defaults to the
96 * empty string.
97 */
98 explicit PlasmaPhase(const string& inputFile="", const string& id="");
99
100 ~PlasmaPhase();
101
102 string type() const override {
103 return "plasma";
104 }
105
106 void initThermo() override;
107
108 //! Set electron energy levels.
109 //! @param levels The vector of electron energy levels (eV).
110 //! Length: #m_nPoints.
111 void setElectronEnergyLevels(span<const double> levels);
112
113 //! Get electron energy levels.
114 //! @param levels The vector of electron energy levels (eV). Length: #m_nPoints
115 void getElectronEnergyLevels(span<double> levels) const {
116 Eigen::Map<Eigen::ArrayXd>(levels.data(), levels.size()) = m_electronEnergyLevels;
117 }
118
119 //! Set discretized electron energy distribution.
120 //! @param levels The vector of electron energy levels (eV).
121 //! Length: #m_nPoints.
122 //! @param distrb The vector of electron energy distribution.
123 //! Length: #m_nPoints.
124 void setDiscretizedElectronEnergyDist(span<const double> levels,
125 span<const double> distrb);
126
127 //! Get electron energy distribution.
128 //! @param distrb The vector of electron energy distribution.
129 //! Length: #m_nPoints.
130 void getElectronEnergyDistribution(span<double> distrb) const {
131 Eigen::Map<Eigen::ArrayXd>(distrb.data(), distrb.size()) = m_electronEnergyDist;
132 }
133
134 //! Set the shape factor of isotropic electron energy distribution.
135 //! Note that @f$ x = 1 @f$ and @f$ x = 2 @f$ correspond to the
136 //! Maxwellian and Druyvesteyn distribution, respectively.
137 //! @param x The shape factor
138 void setIsotropicShapeFactor(double x);
139
140 //! The shape factor of isotropic electron energy distribution
141 double isotropicShapeFactor() const {
142 return m_isotropicShapeFactor;
143 }
144
145 //! Set the internally stored electron temperature of the phase (K).
146 //! @param Te Electron temperature in Kelvin
147 void setElectronTemperature(double Te) override;
148
149 //! Set mean electron energy [eV]. This method also sets electron temperature
150 //! accordingly.
151 void setMeanElectronEnergy(double energy);
152
153 //! Get electron energy distribution type
155 return m_distributionType;
156 }
157
158 //! Set electron energy distribution type
159 void setElectronEnergyDistributionType(const string& type);
160
161 //! Numerical quadrature method. Method: #m_quadratureMethod
162 string quadratureMethod() const {
163 return m_quadratureMethod;
164 }
165
166 //! Set numerical quadrature method for integrating electron
167 //! energy distribution function. Method: #m_quadratureMethod
168 void setQuadratureMethod(const string& method) {
169 m_quadratureMethod = method;
170 }
171
172 //! Mean electron energy [eV]
173 double meanElectronEnergy() const {
174 return 3.0 / 2.0 * electronTemperature() * Boltzmann / ElectronCharge;
175 }
176
177 //! Set flag of automatically normalize electron energy distribution
178 //! Flag: #m_do_normalizeElectronEnergyDist
181 }
182
183 //! Flag of automatically normalize electron energy distribution.
184 //! Flag: #m_do_normalizeElectronEnergyDist
187 }
188
189 bool addSpecies(shared_ptr<Species> spec) override;
190
191 //! Electron Temperature (K)
192 //! @return The electron temperature of the phase
193 double electronTemperature() const override {
194 return m_electronTemp;
195 }
196
197 //! Return the Gas Constant multiplied by the current electron temperature
198 /*!
199 * The units are Joules kmol-1
200 */
201 double RTe() const {
203 }
204
205 /**
206 * Electron pressure. Units: Pa.
207 * @f[P = n_{k_e} R T_e @f]
208 */
209 virtual double electronPressure() const {
212 }
213
214 //! Number of electron levels
215 size_t nElectronEnergyLevels() const {
216 return m_nPoints;
217 }
218
219 //! Number of electron collision cross sections
220 size_t nCollisions() const {
221 return m_collisions.size();
222 }
223
224 //! Get the Reaction object associated with electron collision *i*.
225 //! @since New in %Cantera 3.2.
226 const shared_ptr<Reaction> collision(size_t i) const {
227 return m_collisions[i];
228 }
229
230 //! Get the ElectronCollisionPlasmaRate object associated with electron collision
231 //! *i*.
232 //! @since New in %Cantera 3.2.
233 const shared_ptr<ElectronCollisionPlasmaRate> collisionRate(size_t i) const {
234 return m_collisionRates[i];
235 }
236
237 //! Electron Species Index
238 size_t electronSpeciesIndex() const {
240 }
241
242 //! Return the Molar enthalpy. Units: J/kmol.
243 /*!
244 * For an ideal gas mixture with additional electron,
245 * @f[
246 * \hat h(T) = \sum_{k \neq k_e} X_k \hat h^0_k(T) + X_{k_e} \hat h^0_{k_e}(T_e),
247 * @f]
248 * and is a function only of temperature. The standard-state pure-species
249 * enthalpies @f$ \hat h^0_k(T) @f$ are computed by the species
250 * thermodynamic property manager.
251 *
252 * @see MultiSpeciesThermo
253 */
254 double enthalpy_mole() const override;
255
256 //! Return the molar entropy. Units: J/kmol/K.
257 /*!
258 * For an ideal gas mixture with an additional electron species,
259 * @f[
260 * \hat s(T,T_e,p,X)
261 * = \sum_{k\neq k_e} X_k\left[\hat s_k^0(T) - R\ln\left(\frac{X_k p}{p^0}\right)\right]
262 * + X_{k_e}\left[\hat s_{k_e}^0(T_e) - R\ln\left(\frac{X_{k_e} p_e}{p^0}\right)\right],
263 * @f]
264 * where heavy-species properties are evaluated at @f$T@f$, electron properties at
265 * @f$T_e@f$, and the electron mixing term uses the electron pressure
266 * @f$p_e = n_{k_e} R T_e@f$.
267 *
268 * @see MultiSpeciesThermo
269 */
270 double entropy_mole() const override;
271
272 //! Return the molar Gibbs free energy. Units: J/kmol.
273 /*!
274 * For an ideal gas mixture with an additional electron species,
275 * @f[
276 * \hat g(T, T_e, p, X) = \sum_k X_k \mu_k(T_k, p_k, X),
277 * @f]
278 * where heavy species use the gas temperature @f$T@f$ and bulk pressure,
279 * while the electron chemical potential uses @f$T_e@f$ and
280 * @f$p_e = n_{k_e} R T_e@f$.
281 *
282 * @see MultiSpeciesThermo
283 */
284 double gibbs_mole() const override;
285
286 //! Return the molar internal energy. Units: J/kmol.
287 /*!
288 * For an ideal gas mixture with an additional electron species,
289 * @f[
290 * \hat u(T,T_e) = \sum_{k \neq k_e} X_k \hat u^0_k(T) + X_{k_e} \hat u^0_{k_e}(T_e),
291 * @f]
292 * where @f$\hat u^0_k(T) = \hat h^0_k(T) - R T@f$ for heavy species and
293 * @f$\hat u^0_{k_e}(T_e) = \hat h^0_{k_e}(T_e) - R T_e@f$ for electrons.
294 *
295 * @see MultiSpeciesThermo
296 */
297 double intEnergy_mole() const override;
298
299 void getEntropy_R(span<double> sr) const override;
300
301 void getGibbs_RT(span<double> grt) const override;
302
303 void getGibbs_ref(span<double> g) const override;
304
305 void getStandardVolumes_ref(span<double> vol) const override;
306
307 void getChemPotentials(span<double> mu) const override;
308
309 void getStandardChemPotentials(span<double> muStar) const override;
310
311 void getPartialMolarEnthalpies(span<double> hbar) const override;
312
313 void getPartialMolarEntropies(span<double> sbar) const override;
314
315 void getPartialMolarIntEnergies(span<double> ubar) const override;
316
317 void getParameters(AnyMap& phaseNode) const override;
318
319 void setParameters(const AnyMap& phaseNode,
320 const AnyMap& rootNode=AnyMap()) override;
321
322 //! Update the electron energy distribution.
324
325 //! Electron species name
326 string electronSpeciesName() const {
328 }
329
330 //! Return the distribution Number #m_distNum
331 int distributionNumber() const {
332 return m_distNum;
333 }
334
335 //! Return the electron energy level Number #m_levelNum
336 int levelNumber() const {
337 return m_levelNum;
338 }
339
340 //! Get the indicies for inelastic electron collisions
341 //! @since New in %Cantera 3.2.
342 const vector<size_t>& kInelastic() const {
343 return m_kInelastic;
344 }
345
346 //! Get the indices for elastic electron collisions
347 //! @since New in %Cantera 3.2.
348 const vector<size_t>& kElastic() const {
349 return m_kElastic;
350 }
351
352 //! target of a specific process
353 //! @since New in %Cantera 3.2.
354 size_t targetIndex(size_t i) const {
355 return m_targetSpeciesIndices[i];
356 }
357
358 //! Get the frequency of the applied electric field [Hz]
359 //! @since New in %Cantera 3.2.
360 double electricFieldFrequency() const {
362 }
363
364 //! Get the applied electric field strength [V/m]
365 double electricField() const {
366 return m_electricField;
367 }
368
369 //! Set the absolute electric field strength [V/m]
370 void setElectricField(double E) {
371 m_electricField = E;
372 }
373
374 //! Calculate the degree of ionization
375 //double ionDegree() const {
376 // double ne = concentration(m_electronSpeciesIndex); // [kmol/m³]
377 // double n_total = molarDensity(); // [kmol/m³]
378 // return ne / n_total;
379 //}
380
381 //! Get the reduced electric field strength [V·m²]
382 double reducedElectricField() const {
384 }
385
386 //! Set reduced electric field given in [V·m²]
387 void setReducedElectricField(double EN) {
388 m_electricField = EN * molarDensity() * Avogadro; // [V/m]
389 }
390
391 virtual void setSolution(std::weak_ptr<Solution> soln) override;
392
393 /**
394 * The elastic power loss (J/s/m³)
395 * @f[
396 * P_k = N_A N_A C_e e \sum_k C_k K_k,
397 * @f]
398 * where @f$ C_k @f$ and @f$ C_e @f$ are the concentration (kmol/m³) of the
399 * target species and electrons, respectively. @f$ K_k @f$ is the elastic
400 * electron energy loss coefficient (eV-m³/s).
401 */
402 double elasticPowerLoss();
403
404 /**
405 * The electron mobility (m²/V/s)
406 * @f[
407 * \mu = \nu_d / E,
408 * @f]
409 * where @f$ \nu_d @f$ is the drift velocity (m²/s), and @f$ E @f$ is the electric
410 * field strength (V/m).
411 */
412 double electronMobility() const;
413
414 /**
415 * The joule heating power (W/m³)
416 * @f[
417 * q_J = \sigma * E^2,
418 * @f]
419 * where @f$ \sigma @f$ is the conductivity (S/m), defined by:
420 * @f[
421 * \sigma = e * n_e * \mu_e
422 * @f]
423 * and @f$ E @f$ is the electric field strength (V/m).
424 */
425 double jouleHeatingPower() const;
426
427 void beginEquilibrate() override;
428
429 void endEquilibrate() override;
430
431 double intrinsicHeating() override;
432
433protected:
434 void updateThermo() const override;
435
436 //! When electron energy distribution changed, plasma properties such as
437 //! electron-collision reaction rates need to be re-evaluated.
439
440 //! When electron energy level changed, plasma properties such as
441 //! electron-collision reaction rates need to be re-evaluate.
442 //! In addition, the cross-sections need to be interpolated at
443 //! the new level.
445
446 //! Check the electron energy levels
447 /*!
448 * The values of electron energy levels need to be positive and
449 * monotonically increasing.
450 */
451 void checkElectronEnergyLevels() const;
452
453 //! Check the electron energy distribution
454 /*!
455 * This method check the electron energy distribution for the criteria
456 * below.
457 *
458 * 1. The values of electron energy distribution cannot be negative.
459 *
460 * 2. If the last value of electron energy distribution is larger
461 * than 0.01, it will raise a warning to suggest using a higher electron
462 * energy levels.
463 */
465
466 //! Set isotropic electron energy distribution
468
469 //! Update electron temperature (K) From energy distribution.
470 //! #m_electronTemp
472
473 //! Electron energy distribution norm
475
476 //! Update interpolated cross section of a collision
477 bool updateInterpolatedCrossSection(size_t k);
478
479 //! Update electron energy distribution difference
481
482 // Electron energy order in the exponential term
483 double m_isotropicShapeFactor = 1.0;
484
485 //! Number of points of electron energy levels
486 size_t m_nPoints = 1001;
487
488 //! electron energy levels [ev]. Length: #m_nPoints
490
491 //! Normalized electron energy distribution vector [-]
492 //! Length: #m_nPoints
493 Eigen::ArrayXd m_electronEnergyDist;
494
495 //! Index of electron species
497
498 //! Electron temperature [K]
500
501 //! Electron energy distribution type
502 string m_distributionType = "isotropic";
503
504 //! Numerical quadrature method for electron energy distribution
505 string m_quadratureMethod = "simpson";
506
507 //! Flag of normalizing electron energy distribution
509
510 //! Indices of inelastic collisions in m_crossSections
511 vector<size_t> m_kInelastic;
512
513 //! Indices of elastic collisions in m_crossSections
514 vector<size_t> m_kElastic;
515
516 //! electric field [V/m]
517 double m_electricField = 0.0;
518
519 //! electric field freq [Hz]
521
522 //! Cross section data. m_crossSections[i][j], where i is the specific process,
523 //! j is the index of vector. Unit: [m^2]
524 vector<vector<double>> m_crossSections;
525
526 //! Electron energy levels corresponding to the cross section data. m_energyLevels[i][j],
527 //! where i is the specific process, j is the index of vector. Unit: [eV]
528 vector<vector<double>> m_energyLevels;
529
530 //! ionization degree for the electron-electron collisions (tmp is the previous one)
531 //double m_ionDegree = 0.0;
532
533 //! Electron energy distribution Difference dF/dε (V^-5/2)
535
536 //! Elastic electron energy loss coefficients (eV m3/s)
537 /*! The elastic electron energy loss coefficient for species k is,
538 * @f[
539 * K_k = \frac{2 m_e}{m_k} \sqrt{\frac{2 e}{m_e}} \int_0^{\infty} \sigma_k
540 * \epsilon^2 \left( F_0 + \frac{k_B T}{e}
541 * \frac{\partial F_0}{\partial \epsilon} \right) d \epsilon,
542 * @f]
543 * where @f$ m_e @f$ [kg] is the electron mass, @f$ \epsilon @f$ [V] is the
544 * electron energy, @f$ \sigma_k @f$ [m2] is the reaction collision cross section,
545 * @f$ F_0 @f$ [V^(-3/2)] is the normalized electron energy distribution function.
546 */
548
549 //! Updates the elastic electron energy loss coefficient for collision index i
550 /*! Calculates the elastic energy loss coefficient using the current electron
551 energy distribution and cross sections.
552 */
554
555 //! Update elastic electron energy loss coefficients
556 /*! Used by elasticPowerLoss() and other plasma property calculations that
557 depends on #m_elasticElectronEnergyLossCoefficients. This function calls
558 updateInterpolatedCrossSection() before calling
559 updateElasticElectronEnergyLossCoefficient()
560 */
562
563private:
564
565 //! Solver used to calculate the EEDF based on electron collision rates
566 unique_ptr<EEDFTwoTermApproximation> m_eedfSolver = nullptr;
567
568 //! Electron energy distribution change variable. Whenever
569 //! #m_electronEnergyDist changes, this int is incremented.
570 int m_distNum = -1;
571
572 //! Electron energy level change variable. Whenever
573 //! #m_electronEnergyLevels changes, this int is incremented.
574 int m_levelNum = -1;
575
576 //! The list of shared pointers of plasma collision reactions
577 vector<shared_ptr<Reaction>> m_collisions;
578
579 //! The list of shared pointers of collision rates
580 vector<shared_ptr<ElectronCollisionPlasmaRate>> m_collisionRates;
581
582 //! The collision-target species indices of #m_collisions
584
585 //! The list of whether the interpolated cross sections is ready
586 vector<bool> m_interp_cs_ready;
587
588 //! Set collisions. This function sets the list of collisions and
589 //! the list of target species using #addCollision.
590 void setCollisions();
591
592 //! Add a collision and record the target species
593 void addCollision(shared_ptr<Reaction> collision);
594
595 //! Saved electron temperature during an equilibrium solve
597
598 //! Lock flag (default off)
599 bool m_inEquilibrate = false;
600
601 //! Work array
602 mutable std::vector<double> m_work;
603};
604
605}
606
607#endif
EEDF Two-Term approximation solver.
ThermoPhase object for the ideal gas equation of state - workhorse for Cantera (see Thermodynamic Pro...
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:431
Class IdealGasPhase represents low-density gases that obey the ideal gas equation of state.
virtual double molarDensity() const
Molar density (kmol/m^3).
Definition Phase.cpp:587
virtual double concentration(const size_t k) const
Concentration of species k.
Definition Phase.cpp:485
string speciesName(size_t k) const
Name of the species with index k.
Definition Phase.cpp:143
Base class for handling plasma properties, specifically focusing on the electron energy distribution.
Definition PlasmaPhase.h:84
void checkElectronEnergyDistribution() const
Check the electron energy distribution.
void getStandardChemPotentials(span< double > muStar) const override
Get the array of chemical potentials at unit activity for the species at their standard states at the...
vector< vector< double > > m_energyLevels
Electron energy levels corresponding to the cross section data.
void setCollisions()
Set collisions.
double meanElectronEnergy() const
Mean electron energy [eV].
int distributionNumber() const
Return the distribution Number m_distNum.
void getGibbs_ref(span< double > g) const override
Returns the vector of the Gibbs function of the reference state at the current temperature of the sol...
double m_electronTempEquil
Saved electron temperature during an equilibrium solve.
double enthalpy_mole() const override
Return the Molar enthalpy. Units: J/kmol.
void setQuadratureMethod(const string &method)
Set numerical quadrature method for integrating electron energy distribution function.
size_t m_nPoints
Number of points of electron energy levels.
int levelNumber() const
Return the electron energy level Number m_levelNum.
void addCollision(shared_ptr< Reaction > collision)
Add a collision and record the target species.
virtual void setSolution(std::weak_ptr< Solution > soln) override
Set the link to the Solution object that owns this ThermoPhase.
void normalizeElectronEnergyDistribution()
Electron energy distribution norm.
void updateThermo() const override
Update the species reference state thermodynamic functions.
void getPartialMolarEnthalpies(span< double > hbar) const override
Returns an array of partial molar enthalpies for the species in the mixture.
vector< size_t > m_targetSpeciesIndices
The collision-target species indices of m_collisions.
void setElectronTemperature(double Te) override
Set the internally stored electron temperature of the phase (K).
void electronEnergyLevelChanged()
When electron energy level changed, plasma properties such as electron-collision reaction rates need ...
double m_electricFieldFrequency
electric field freq [Hz]
string electronEnergyDistributionType() const
Get electron energy distribution type.
double elasticPowerLoss()
The elastic power loss (J/s/m³)
int m_levelNum
Electron energy level change variable.
bool updateInterpolatedCrossSection(size_t k)
Update interpolated cross section of a collision.
bool m_inEquilibrate
Lock flag (default off)
void electronEnergyDistributionChanged()
When electron energy distribution changed, plasma properties such as electron-collision reaction rate...
void setElectricField(double E)
Set the absolute electric field strength [V/m].
string quadratureMethod() const
Numerical quadrature method. Method: m_quadratureMethod.
double electricFieldFrequency() const
Get the frequency of the applied electric field [Hz].
size_t nElectronEnergyLevels() const
Number of electron levels.
size_t nCollisions() const
Number of electron collision cross sections.
void endEquilibrate() override
Hook called at the end of an equilibrium calculation on this phase.
Eigen::ArrayXd m_electronEnergyDist
Normalized electron energy distribution vector [-] Length: m_nPoints.
double electricField() const
Get the applied electric field strength [V/m].
Eigen::ArrayXd m_electronEnergyLevels
electron energy levels [ev]. Length: m_nPoints
void getGibbs_RT(span< double > grt) const override
Get the nondimensional Gibbs functions for the species in their standard states at the current T and ...
double intrinsicHeating() override
Intrinsic volumetric heating rate [W/m³].
double electronMobility() const
The electron mobility (m²/V/s)
void getParameters(AnyMap &phaseNode) const override
Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using ...
void getElectronEnergyDistribution(span< double > distrb) const
Get electron energy distribution.
string type() const override
String indicating the thermodynamic model implemented.
void checkElectronEnergyLevels() const
Check the electron energy levels.
void initThermo() override
Initialize the ThermoPhase object after all species have been set up.
void updateElasticElectronEnergyLossCoefficients()
Update elastic electron energy loss coefficients.
void updateElectronTemperatureFromEnergyDist()
Update electron temperature (K) From energy distribution.
string m_distributionType
Electron energy distribution type.
const vector< size_t > & kElastic() const
Get the indices for elastic electron collisions.
const shared_ptr< ElectronCollisionPlasmaRate > collisionRate(size_t i) const
Get the ElectronCollisionPlasmaRate object associated with electron collision i.
void updateElectronEnergyDistribution()
Update the electron energy distribution.
vector< double > m_elasticElectronEnergyLossCoefficients
Elastic electron energy loss coefficients (eV m3/s)
string m_quadratureMethod
Numerical quadrature method for electron energy distribution.
double m_electricField
electric field [V/m]
void beginEquilibrate() override
Hook called at the beginning of an equilibrium calculation on this phase.
void getEntropy_R(span< double > sr) const override
Get the array of nondimensional Entropy functions for the standard state species at the current T and...
size_t electronSpeciesIndex() const
Electron Species Index.
void setDiscretizedElectronEnergyDist(span< const double > levels, span< const double > distrb)
Set discretized electron energy distribution.
double m_electronTemp
Electron temperature [K].
double RTe() const
Return the Gas Constant multiplied by the current electron temperature.
double intEnergy_mole() const override
Return the molar internal energy. Units: J/kmol.
double entropy_mole() const override
Return the molar entropy. Units: J/kmol/K.
bool m_do_normalizeElectronEnergyDist
Flag of normalizing electron energy distribution.
void updateElectronEnergyDistDifference()
Update electron energy distribution difference.
bool normalizeElectronEnergyDistEnabled() const
Flag of automatically normalize electron energy distribution.
void getElectronEnergyLevels(span< double > levels) const
Get electron energy levels.
void updateElasticElectronEnergyLossCoefficient(size_t i)
Updates the elastic electron energy loss coefficient for collision index i.
vector< size_t > m_kElastic
Indices of elastic collisions in m_crossSections.
void setReducedElectricField(double EN)
Set reduced electric field given in [V·m²].
unique_ptr< EEDFTwoTermApproximation > m_eedfSolver
Solver used to calculate the EEDF based on electron collision rates.
string electronSpeciesName() const
Electron species name.
void setIsotropicElectronEnergyDistribution()
Set isotropic electron energy distribution.
Eigen::ArrayXd m_electronEnergyDistDiff
ionization degree for the electron-electron collisions (tmp is the previous one)
double isotropicShapeFactor() const
The shape factor of isotropic electron energy distribution.
void getPartialMolarEntropies(span< double > sbar) const override
Returns an array of partial molar entropies of the species in the solution.
double gibbs_mole() const override
Return the molar Gibbs free energy. Units: J/kmol.
std::vector< double > m_work
Work array.
double reducedElectricField() const
Calculate the degree of ionization.
bool addSpecies(shared_ptr< Species > spec) override
Add a Species to this Phase.
const shared_ptr< Reaction > collision(size_t i) const
Get the Reaction object associated with electron collision i.
vector< bool > m_interp_cs_ready
The list of whether the interpolated cross sections is ready.
vector< shared_ptr< ElectronCollisionPlasmaRate > > m_collisionRates
The list of shared pointers of collision rates.
void getChemPotentials(span< double > mu) const override
Get the species chemical potentials. Units: J/kmol.
void setElectronEnergyLevels(span< const double > levels)
Set electron energy levels.
size_t targetIndex(size_t i) const
target of a specific process
vector< shared_ptr< Reaction > > m_collisions
The list of shared pointers of plasma collision reactions.
void setParameters(const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap()) override
Set equation of state parameters from an AnyMap phase description.
void setMeanElectronEnergy(double energy)
Set mean electron energy [eV].
void getStandardVolumes_ref(span< double > vol) const override
Get the molar volumes of the species reference states at the current T and P_ref of the solution.
size_t m_electronSpeciesIndex
Index of electron species.
const vector< size_t > & kInelastic() const
Get the indicies for inelastic electron collisions.
vector< vector< double > > m_crossSections
Cross section data.
void setElectronEnergyDistributionType(const string &type)
Set electron energy distribution type.
virtual double electronPressure() const
Electron pressure.
double jouleHeatingPower() const
The joule heating power (W/m³)
vector< size_t > m_kInelastic
Indices of inelastic collisions in m_crossSections.
double electronTemperature() const override
Electron Temperature (K)
void setIsotropicShapeFactor(double x)
Set the shape factor of isotropic electron energy distribution.
void enableNormalizeElectronEnergyDist(bool enable)
Set flag of automatically normalize electron energy distribution Flag: m_do_normalizeElectronEnergyDi...
void getPartialMolarIntEnergies(span< double > ubar) const override
Return an array of partial molar internal energies for the species in the mixture.
int m_distNum
Electron energy distribution change variable.
const double Boltzmann
Boltzmann constant [J/K].
Definition ct_defs.h:87
const double Avogadro
Avogadro's Number [number/kmol].
Definition ct_defs.h:84
const double GasConstant
Universal Gas Constant [J/kmol/K].
Definition ct_defs.h:123
const double ElectronCharge
Elementary charge [C].
Definition ct_defs.h:93
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595
const size_t npos
index returned by functions to indicate "no position"
Definition ct_defs.h:183