Loading [MathJax]/extensions/tex2jax.js
Cantera  3.2.0a1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 m_dist_number = -1;
35 m_level_number = -1;
36 }
37
38 vector<double> energyLevels; //!< electron energy levels
39 vector<double> distribution; //!< electron energy distribution
40 bool levelChanged;
41
42protected:
43 //! integer that is incremented when electron energy distribution changes
44 int m_dist_number = -1;
45
46 //! integer that is incremented when electron energy level changes
48};
49
50
51//! Electron collision plasma reaction rate type
52/*!
53 * The electron collision plasma reaction rate uses the electron collision
54 * data and the electron energy distribution to calculate the reaction rate.
55 * Hagelaar and Pitchford @cite hagelaar2005 define the reaction rate
56 * coefficient (Eqn. 63) as,
57 *
58 * @f[
59 * k = \gamma \int_0^{\infty} \epsilon \sigma F_0 d\epsilon,
60 * @f]
61 *
62 * where @f$ \gamma = \sqrt{2/m_e} @f$ (Eqn.4 in @cite hagelaar2015),
63 * @f$ m_e @f$ [kg] is the electron mass, @f$ \epsilon @f$ [J] is the electron
64 * energy, @f$ \sigma @f$ [m2] is the reaction collision cross section,
65 * @f$ F_0 @f$ [J^(-3/2)] is the normalized electron energy distribution function,
66 * and @f$ k @f$ has the unit of [m3/s]. The collision process is treated as a
67 * bimolecular reaction and should have units of [m3/kmol/s]. Therefore the
68 * forward reaction coefficient becomes,
69 *
70 * @f[
71 * k_f = \gamma N_A \int_0^{\infty} \epsilon \sigma F_0 d\epsilon,
72 * @f]
73 *
74 * where @f$ N_A @f$ [1/kmol] is the Avogadro's number. Since the unit of the
75 * electron energy downloaded from LXCat is in [V], the forward reaction
76 * coefficient can be written as,
77 *
78 * @f[
79 * k_f = \sqrt{\frac{2e}{m_e}} N_A \int_0^{\infty} \epsilon_V \sigma F_0 d\epsilon_V.
80 * @f]
81 *
82 * For the convenience of calculation, the final form becomes,
83 *
84 * @f[
85 * k_f = 0.5 \sqrt{\frac{2e}{m_e}} N_A \int_0^{\infty} \sigma F_0 d{{\epsilon_V}^2}.
86 * @f]
87 *
88 * @ingroup otherRateGroup
89 * @since New in %Cantera 3.1.
90 */
92{
93public:
94
96
98 const UnitStack& rate_units={})
99 {
100 setParameters(node, rate_units);
101 }
102
103 virtual void setParameters(const AnyMap& node, const UnitStack& units) override;
104
105 virtual void getParameters(AnyMap& node) const override;
106
107 unique_ptr<MultiRateBase> newMultiRate() const override {
108 return unique_ptr<MultiRateBase>(
110 }
111
112 virtual const std::string type() const override {
113 return "electron-collision-plasma";
114 }
115
116 virtual void setContext(const Reaction& rxn, const Kinetics& kin) override;
117
118 //! Evaluate reaction rate
119 /*!
120 * @param shared_data data shared by all reactions of a given type
121 */
122 double evalFromStruct(const ElectronCollisionPlasmaData& shared_data);
123
124 //! Evaluate derivative of reaction rate with respect to temperature
125 //! divided by reaction rate
126 //! @param shared_data data shared by all reactions of a given type
127 double ddTScaledFromStruct(const ElectronCollisionPlasmaData& shared_data) const {
128 throw NotImplementedError("ElectronCollisionPlasmaRate::ddTScaledFromStruct");
129 }
130
131 //! The value of #m_energyLevels [eV]
132 const vector<double>& energyLevels() const {
133 return m_energyLevels;
134 }
135
136 //! The value of #m_crossSections [m2]
137 const vector<double>& crossSections() const {
138 return m_crossSections;
139 }
140
141 //! The value of #m_crossSectionsInterpolated [m2]
142 const vector<double>& crossSectionInterpolated() const {
144 }
145
146 //! Update the value of #m_crossSectionsInterpolated [m2]
147 void updateInterpolatedCrossSection(const vector<double>&);
148
149private:
150 //! electron energy levels [eV]
151 vector<double> m_energyLevels;
152
153 //! collision cross sections [m2] at #m_energyLevels
154 vector<double> m_crossSections;
155
156 //! collision cross sections [m2] after interpolation
158};
159
160}
161
162#endif
Header file for class PlasmaPhase.
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:432
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].
const vector< double > & crossSectionInterpolated() const
The value of m_crossSectionsInterpolated [m2].
virtual void getParameters(AnyMap &node) const override
Get parameters.
void updateInterpolatedCrossSection(const vector< double > &)
Update the value of m_crossSectionsInterpolated [m2].
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