Cantera  3.1.0
Loading...
Searching...
No Matches
ElectronCollisionPlasmaRate.h
Go to the documentation of this file.
1//! @file ElectronCollisionPlasmaRate.h Header for plasma reaction rates parameterized
2//! by electron collision cross section and electron energy distribution.
3
4// This file is part of Cantera. See License.txt in the top-level directory or
5// at https://cantera.org/license.txt for license and copyright information.
6
7#ifndef CT_ELECTRONCOLLISIONPLASMARATE_H
8#define CT_ELECTRONCOLLISIONPLASMARATE_H
9
12#include "ReactionRate.h"
13#include "MultiRate.h"
14
15namespace Cantera
16{
17
18//! Data container holding shared data specific to ElectronCollisionPlasmaRate
19/**
20 * The data container `ElectronCollisionPlasmaData` holds precalculated data common to
21 * all `ElectronCollisionPlasmaRate` objects.
22 */
24{
26
27 virtual bool update(const ThermoPhase& phase, const Kinetics& kin) override;
29
30 virtual void invalidateCache() override {
32 energyLevels.resize(0);
33 distribution.resize(0);
34 }
35
36 vector<double> energyLevels; //!< electron energy levels
37 vector<double> distribution; //!< electron energy distribution
38 bool levelChanged;
39
40protected:
41 //! integer that is incremented when electron energy distribution changes
42 int m_dist_number = -1;
43
44 //! integer that is incremented when electron energy level changes
46};
47
48
49//! Electron collision plasma reaction rate type
50/*!
51 * The electron collision plasma reaction rate uses the electron collision
52 * data and the electron energy distribution to calculate the reaction rate.
53 * Hagelaar and Pitchford @cite hagelaar2005 define the reaction rate
54 * coefficient (Eqn. 63) as,
55 *
56 * @f[
57 * k = \gamma \int_0^{\infty} \epsilon \sigma F_0 d\epsilon,
58 * @f]
59 *
60 * where @f$ \gamma = \sqrt{2/m_e} @f$ (Eqn.4 in @cite hagelaar2015),
61 * @f$ m_e @f$ [kg] is the electron mass, @f$ \epsilon @f$ [J] is the electron
62 * energy, @f$ \sigma @f$ [m2] is the reaction collision cross section,
63 * @f$ F_0 @f$ [J^(-3/2)] is the normalized electron energy distribution function,
64 * and @f$ k @f$ has the unit of [m3/s]. The collision process is treated as a
65 * bimolecular reaction and should have units of [m3/kmol/s]. Therefore the
66 * forward reaction coefficient becomes,
67 *
68 * @f[
69 * k_f = \gamma N_A \int_0^{\infty} \epsilon \sigma F_0 d\epsilon,
70 * @f]
71 *
72 * where @f$ N_A @f$ [1/kmol] is the Avogadro's number. Since the unit of the
73 * electron energy downloaded from LXCat is in [V], the forward reaction
74 * coefficient can be written as,
75 *
76 * @f[
77 * k_f = \sqrt{\frac{2e}{m_e}} N_A \int_0^{\infty} \epsilon_V \sigma F_0 d\epsilon_V.
78 * @f]
79 *
80 * For the convenience of calculation, the final form becomes,
81 *
82 * @f[
83 * k_f = 0.5 \sqrt{\frac{2e}{m_e}} N_A \int_0^{\infty} \sigma F_0 d{{\epsilon_V}^2}.
84 * @f]
85 *
86 * @ingroup otherRateGroup
87 * @since New in %Cantera 3.1.
88 */
90{
91public:
93
95 const UnitStack& rate_units={})
96 {
97 setParameters(node, rate_units);
98 }
99
100 virtual void setParameters(const AnyMap& node, const UnitStack& units) override;
101
102 virtual void getParameters(AnyMap& node) const override;
103
104 unique_ptr<MultiRateBase> newMultiRate() const override {
105 return unique_ptr<MultiRateBase>(
107 }
108
109 virtual const std::string type() const override {
110 return "electron-collision-plasma";
111 }
112
113 virtual void setContext(const Reaction& rxn, const Kinetics& kin) override;
114
115 //! Evaluate reaction rate
116 /*!
117 * @param shared_data data shared by all reactions of a given type
118 */
119 double evalFromStruct(const ElectronCollisionPlasmaData& shared_data);
120
121 //! Evaluate derivative of reaction rate with respect to temperature
122 //! divided by reaction rate
123 //! @param shared_data data shared by all reactions of a given type
124 double ddTScaledFromStruct(const ElectronCollisionPlasmaData& shared_data) const {
125 throw NotImplementedError("ElectronCollisionPlasmaRate::ddTScaledFromStruct");
126 }
127
128 //! The value of #m_energyLevels [eV]
129 const vector<double>& energyLevels() const {
130 return m_energyLevels;
131 }
132
133 //! The value of #m_crossSections [m2]
134 const vector<double>& crossSections() const {
135 return m_crossSections;
136 }
137
138private:
139 //! electron energy levels [eV]
140 vector<double> m_energyLevels;
141
142 //! collision cross sections [m2] at #m_energyLevels
143 vector<double> m_crossSections;
144
145 //! collision cross sections [m2] after interpolation
147};
148
149}
150
151#endif
Header file for class PlasmaPhase.
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:431
Electron collision plasma reaction rate type.
vector< double > m_crossSectionsInterpolated
collision cross sections [m2] after interpolation
virtual void setContext(const Reaction &rxn, const Kinetics &kin) override
Set context of reaction rate evaluation.
double ddTScaledFromStruct(const ElectronCollisionPlasmaData &shared_data) const
Evaluate derivative of reaction rate with respect to temperature divided by reaction rate.
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
vector< double > m_crossSections
collision cross sections [m2] at m_energyLevels
const vector< double > & crossSections() const
The value of m_crossSections [m2].
virtual void getParameters(AnyMap &node) const override
Get parameters.
vector< double > m_energyLevels
electron energy levels [eV]
virtual void setParameters(const AnyMap &node, const UnitStack &units) override
Set parameters.
virtual const std::string type() const override
String identifying reaction rate specialization.
const vector< double > & energyLevels() const
The value of m_energyLevels [eV].
double evalFromStruct(const ElectronCollisionPlasmaData &shared_data)
Evaluate reaction rate.
Public interface for kinetics managers.
Definition Kinetics.h:125
A class template handling ReactionRate specializations.
Definition MultiRate.h:22
An error indicating that an unimplemented function has been called.
Abstract base class for reaction rate definitions; this base class is used by user-facing APIs to acc...
Abstract base class which stores data about a reaction and its rate parameterization so that it can b...
Definition Reaction.h:25
Base class for a phase with thermodynamic properties.
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595
Data container holding shared data specific to ElectronCollisionPlasmaRate.
vector< double > energyLevels
electron energy levels
virtual bool update(const ThermoPhase &phase, const Kinetics &kin) override
Update data container based on thermodynamic phase state.
virtual void invalidateCache() override
Force shared data and reaction rates to be updated next time.
vector< double > distribution
electron energy distribution
int m_level_number
integer that is incremented when electron energy level changes
int m_dist_number
integer that is incremented when electron energy distribution changes
Data container holding shared data used for ReactionRate calculation.
virtual void update(double T)
Update data container based on temperature T
virtual void invalidateCache()
Force shared data and reaction rates to be updated next time.
Unit aggregation utility.
Definition Units.h:105