1515namespace Cantera
1616{
1717
18+ class Reaction ;
19+ class ElectronCollisionPlasmaRate ;
20+
1821/* *
1922 * Base class for a phase with plasma properties. This class manages the
2023 * plasma properties such as electron energy distribution function (EEDF).
@@ -99,13 +102,6 @@ class PlasmaPhase: public IdealGasPhase
99102 const double * distrb,
100103 size_t length);
101104
102- // ! Set discretized electron energy distribution.
103- // ! @param distrb The vector of electron energy distribution.
104- // ! Length: #m_nPoints.
105- // ! @param length The length of the vectors, which equals #m_nPoints.
106- void setDiscretizedElectronEnergyDist (const double * distrb,
107- size_t length);
108-
109105 // ! Get electron energy distribution.
110106 // ! @param distrb The vector of electron energy distribution.
111107 // ! Length: #m_nPoints.
@@ -198,6 +194,11 @@ class PlasmaPhase: public IdealGasPhase
198194 return m_nPoints;
199195 }
200196
197+ // ! Number of collisions
198+ size_t nCollisions () const {
199+ return m_collisions.size ();
200+ }
201+
201202 // ! Electron Species Index
202203 size_t electronSpeciesIndex () const {
203204 return m_electronSpeciesIndex;
@@ -271,6 +272,25 @@ class PlasmaPhase: public IdealGasPhase
271272 return m_levelNum;
272273 }
273274
275+ // ! Return the interpolated cross section Number #m_csNum
276+ int interpCrossSectionNum () const {
277+ return m_csNum;
278+ }
279+
280+ // ! add Solution object
281+ virtual void addSolution (std::weak_ptr<Solution> soln) override ;
282+
283+ /* *
284+ * The elastic power loss(J/s/m3)
285+ * @f[
286+ * P_k = N_A N_A C_e e \sum_k C_k K_k,
287+ * @f]
288+ * where @f$ C_k @f$ and @f$ C_e @f$ are the concentration (kmol/m3) of the
289+ * target species and electrons, respectively. @f$ K_k @f$ is the elastic
290+ * electron energy loss coefficient (eV-m3/s).
291+ */
292+ double elasticPowerLoss ();
293+
274294protected:
275295 void updateThermo () const override ;
276296
@@ -284,6 +304,10 @@ class PlasmaPhase: public IdealGasPhase
284304 // ! the new level.
285305 void electronEnergyLevelChanged ();
286306
307+ // ! When the interpolated cross sections changed, plasma properties such as
308+ // ! elastic power loss need to be re-evaluated.
309+ void interpolatedCrossSectionsChanged ();
310+
287311 // ! Check the electron energy levels
288312 /* !
289313 * The values of electron energy levels need to be positive and
@@ -317,6 +341,12 @@ class PlasmaPhase: public IdealGasPhase
317341 // ! Electron energy distribution norm
318342 void normalizeElectronEnergyDistribution ();
319343
344+ // ! Update interpolated cross sections
345+ void updateInterpolatedCrossSections ();
346+
347+ // ! Update electron energy distribution difference
348+ void updateElectronEnergyDistDifference ();
349+
320350 // Electron energy order in the exponential term
321351 double m_isotropicShapeFactor = 2.0 ;
322352
@@ -345,6 +375,28 @@ class PlasmaPhase: public IdealGasPhase
345375 // ! Flag of normalizing electron energy distribution
346376 bool m_do_normalizeElectronEnergyDist = true ;
347377
378+ // ! Data for initiate reaction
379+ AnyMap m_root;
380+
381+ // ! Electron energy distribution Difference dF/dε (V^-5/2)
382+ Eigen::ArrayXd m_electronEnergyDistDiff;
383+
384+ // ! Elastic electron energy loss coefficients (eV m3/s)
385+ /* ! The elastic electron energy loss coefficient for species k is,
386+ * @f[
387+ * K_k = \frac{2 m_e}{m_k} \sqrt{\frac{2 e}{m_e}} \int_0^{\infty} \sigma_k
388+ * \epsilon^2 \left( F_0 + \frac{k_B T}{e}
389+ * \frac{\partial F_0}{\partial \epsilon} \right) d \epsilon,
390+ * @f]
391+ * where @f$ m_e @f$ [kg] is the electron mass, @f$ \epsilon @f$ [V] is the
392+ * electron energy, @f$ \sigma_k @f$ [m2] is the reaction collision cross section,
393+ * @f$ F_0 @f$ [V^(-3/2)] is the normalized electron energy distribution function.
394+ */
395+ vector<double > m_elasticElectronEnergyLossCoefficients;
396+
397+ // ! update elastic electron energy loss coefficients
398+ void updateElasticElectronEnergyLossCoefficients ();
399+
348400private:
349401 // ! Electron energy distribution change variable. Whenever
350402 // ! #m_electronEnergyDist changes, this int is incremented.
@@ -353,6 +405,28 @@ class PlasmaPhase: public IdealGasPhase
353405 // ! Electron energy level change variable. Whenever
354406 // ! #m_electronEnergyLevels changes, this int is incremented.
355407 int m_levelNum = -1 ;
408+
409+ // ! Interpolated collision cross section change variable. Whenever
410+ // ! #ElectronCollisionPlasmaRate::m_crossSectionsInterpolated changes,
411+ // ! this int is incremented.
412+ int m_csNum = -1 ;
413+
414+ // ! The list of shared pointers of plasma collision reactions
415+ vector<shared_ptr<Reaction>> m_collisions;
416+
417+ // ! The list of shared pointers of ElectronCollisionPlasmaRate
418+ vector<shared_ptr<ElectronCollisionPlasmaRate>> m_collisionRates;
419+
420+ // ! The collision-target species indices of #m_collisions
421+ vector<size_t > m_targetSpeciesIndices;
422+
423+ // ! Interpolated cross sections. This is used for storing
424+ // ! interpolated cross sections temporarily.
425+ vector<double > m_interp_cs;
426+
427+ // ! Set collisions
428+ void setCollisions ();
429+
356430};
357431
358432}
0 commit comments