Cantera  4.0.0a2
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#include "cantera/base/AnyMap.h"
16
17namespace Cantera
18{
19
20class Reaction;
21class ElectronCollisionPlasmaRate;
22
23//! Base class for handling plasma properties, specifically focusing on the
24//! electron energy distribution.
25/*!
26 * This class provides functionality to manage the the electron energy distribution
27 * using two primary methods for defining the electron distribution and electron
28 * temperature.
29 *
30 * The first method utilizes setElectronTemperature(), which sets the electron
31 * temperature and calculates the electron energy distribution assuming an
32 * isotropic-velocity model. Note that all units in PlasmaPhase are in SI, except
33 * for electron energy, which is measured in volts.
34 *
35 * The generalized electron energy distribution for an isotropic-velocity
36 * distribution (as described by Gudmundsson @cite gudmundsson2001 and Khalilpour
37 * and Foroutan @cite khalilpour2020)
38 * is given by:
39 * @f[
40 * f(\epsilon) = c_1 \frac{\sqrt{\epsilon}}{\epsilon_m^{3/2}}
41 * \exp \left(-c_2 \left(\frac{\epsilon}{\epsilon_m}\right)^x \right),
42 * @f]
43 * where @f$ x = 1 @f$ corresponds to a Maxwellian distribution and
44 * @f$ x = 2 @f$ corresponds to a Druyvesteyn distribution.
45 * Here, @f$ \epsilon_m = \frac{3}{2} T_e @f$ [V] represents the
46 * mean electron energy.
47 *
48 * The total probability distribution integrates to one:
49 * @f[
50 * \int_0^{\infty} f(\epsilon) d\epsilon = 1.
51 * @f]
52 * According to Hagelaar and Pitchford @cite hagelaar2005, the electron energy
53 * probability function can be defined as
54 * @f$ F(\epsilon) = \frac{f(\epsilon)}{\sqrt{\epsilon}} @f$ with units of
55 * [V@f$^{-3/2}@f$]. The generalized form of the electron energy probability
56 * function for isotropic-velocity distributions is:
57 * @f[
58 * F(\epsilon) = c_1 \frac{1}{\epsilon_m^{3/2}}
59 * \exp\left(-c_2 \left(\frac{\epsilon}{\epsilon_m}\right)^x\right),
60 * @f]
61 * and this form is used to model the isotropic electron energy distribution
62 * in PlasmaPhase.
63 *
64 * The second method allows for manual definition of the electron energy
65 * distribution using setDiscretizedElectronEnergyDist(). In this approach,
66 * the electron temperature is derived from the mean electron energy,
67 * @f$ \epsilon_m @f$, which can be calculated as follows @cite hagelaar2005 :
68 * @f[
69 * \epsilon_m = \int_0^{\infty} \epsilon^{3/2} F(\epsilon) d\epsilon.
70 * @f]
71 * This integral can be approximated using the trapezoidal rule,
72 * @f[
73 * \epsilon_m = \sum_i \left(\epsilon_{i+1}^{5/2} - \epsilon_i^{5/2}\right)
74 * \frac{F(\epsilon_{i+1}) + F(\epsilon_i)}{2},
75 * @f]
76 * where @f$ i @f$ is the index of discrete energy levels, or Simpson's rule.
77 *
78 * ## Thermodynamic consistency of the two-temperature model
79 *
80 * When the electron temperature @f$ T_\text{e} @f$ differs from the heavy-species
81 * temperature @f$ T @f$, this phase does not satisfy all of Cantera's standard-state
82 * consistency relations simultaneously: one of them is deliberately left unsatisfied.
83 * This is a consequence of two design commitments that this implementation makes, both
84 * of which are individually reasonable but which cannot be reconciled once
85 * @f$ T_\text{e} \neq T @f$:
86 *
87 * 1. **Kinetics uses true concentrations.** The generalized (activity) concentrations
88 * that drive the law of mass action are kept equal to the true molar concentrations,
89 * @f$ C^a_k = C_k @f$, so that reaction rates depend on actual number densities.
90 * Together with the standard concentration @f$ C^0_k = P/RT @f$ (the gas
91 * temperature, for all species; see #standardConcentration()), this requires the
92 * reported activities to be
93 * @f[ a_k = \frac{C^a_k}{C^0_k} = X_k \frac{T}{\overline{T}}, @f]
94 * where @f$ \overline{T} @f$ is the mole-fraction-weighted mean temperature (see
95 * #meanTemperature()). This is what #getActivities() returns.
96 *
97 * 2. **Chemical potentials keep the ideal-gas form.** The chemical potentials retain
98 * the usual ideal-gas composition dependence,
99 * @f$ \mu_k = \mu^0_k(T_k) + R T_k \ln X_k @f$,
100 * with each species evaluated at its own temperature @f$ T_k @f$ (@f$ T @f$ for
101 * heavy species, @f$ T_\text{e} @f$ for electrons; see #getChemPotentials() and
102 * #getStandardChemPotentials()). This is equivalent to an activity of @f$ X_k @f$.
103 *
104 * When @f$ T_\text{e} \neq T @f$, these two demands imply different values for the
105 * activities -- @f$ X_k\,T/\overline{T} @f$ versus @f$ X_k @f$ -- which differ by the
106 * factor @f$ T/\overline{T} @f$. #getActivities() reports the first;
107 * #getChemPotentials() embodies the second; and the identity
108 * @f$ \mu_k = \mu^0_k + R T_k \ln a_k @f$ is therefore the relation left unsatisfied.
109 * This is why the consistency test `chem_potentials_to_activities` is a known failure
110 * for two-temperature states.
111 *
112 * The practical consequence of this inconsistency is limited. It formally perturbs any
113 * *chemical* equilibrium computed for the phase, but the concept of chemical
114 * equilibrium in the absence of *thermal* equilibrium (@f$ T_\text{e} \neq T @f$) is
115 * itself ill-posed, so the perturbed quantity has little physical meaning in exactly
116 * the regime where the inconsistency appears. The trade-offs and potential approaches
117 * for a fully-consistent implementation are documented in
118 * https://github.com/Cantera/enhancements/issues/258#issuecomment-4857093158.
119 *
120 * @warning This class is an experimental part of %Cantera and may be
121 * changed or removed without notice.
122 * @todo Implement electron Boltzmann equation solver to solve EEDF.
123 * https://github.com/Cantera/enhancements/issues/127
124 * @ingroup thermoprops
125 */
127{
128public:
129 //! Construct and initialize a PlasmaPhase object directly from an input file.
130 //! The constructor initializes the electron energy distribution to be a
131 //! Maxwellian distribution (#m_isotropicShapeFactor = 1.0).
132 //! The initial electron energy grid is set to a linear space which starts
133 //! at 0.01 eV and ends at 1 eV with 1000 points.
134 /*!
135 * @param inputFile Name of the input file containing the phase definition
136 * to set up the object. If blank, an empty phase will be
137 * created.
138 * @param id ID of the phase in the input file. Defaults to the
139 * empty string.
140 */
141 explicit PlasmaPhase(const string& inputFile="", const string& id="");
142
143 ~PlasmaPhase();
144
145 string type() const override {
146 return "plasma";
147 }
148
149 void initThermo() override;
150
151 //! @name Overridden from IdealGasPhase or ThermoPhase
152 //! @{
153 bool addSpecies(shared_ptr<Species> spec) override;
154 virtual void setSolution(std::weak_ptr<Solution> soln) override;
155 void getParameters(AnyMap& phaseNode) const override;
156 void setParameters(const AnyMap& phaseNode,
157 const AnyMap& rootNode=AnyMap()) override;
158 //! @}
159 //! @name Electron Species Information
160 //! @{
161
162 //! Electron Species Index
163 size_t electronSpeciesIndex() const {
165 }
166
167 //! Electron species name
168 string electronSpeciesName() const {
170 }
171
172 //! @}
173 //! @name Electron Energy Distribution Functions
174 //! @{
175
176 //! Set electron energy levels.
177 //! @param levels The vector of electron energy levels [eV].
178 //! Length: #m_nPoints.
179 void setElectronEnergyLevels(span<const double> levels);
180
181 //! Get electron energy levels.
182 //! @param levels The vector of electron energy levels [eV]. Length: #m_nPoints
183 void getElectronEnergyLevels(span<double> levels) const {
184 Eigen::Map<Eigen::ArrayXd>(levels.data(), levels.size()) = m_electronEnergyLevels;
185 }
186
187 //! Set discretized electron energy distribution.
188 //! @param levels The vector of electron energy levels [eV].
189 //! Length: #m_nPoints.
190 //! @param distrb The vector of electron energy distribution.
191 //! Length: #m_nPoints.
192 void setDiscretizedElectronEnergyDist(span<const double> levels,
193 span<const double> distrb);
194
195 //! Get electron energy distribution.
196 //! @param distrb The vector of electron energy distribution.
197 //! Length: #m_nPoints.
198 void getElectronEnergyDistribution(span<double> distrb) const {
199 Eigen::Map<Eigen::ArrayXd>(distrb.data(), distrb.size()) = m_electronEnergyDist;
200 }
201
202 //! Set the shape factor of isotropic electron energy distribution.
203 //! Note that @f$ x = 1 @f$ and @f$ x = 2 @f$ correspond to the
204 //! Maxwellian and Druyvesteyn distribution, respectively.
205 //! @param x The shape factor
206 void setIsotropicShapeFactor(double x);
207
208 //! The shape factor of isotropic electron energy distribution.
209 double isotropicShapeFactor() const {
210 return m_isotropicShapeFactor;
211 }
212
213 //! Electron Temperature [K].
214 //! @return The electron temperature of the phase.
215 double electronTemperature() const override {
216 return m_electronTemp;
217 }
218 //! Set the internally stored electron temperature of the phase [K].
219 //! @param Te Electron temperature in Kelvin.
220 void setElectronTemperature(double Te) override;
221
222 //! Mean electron energy [eV].
223 double meanElectronEnergy() const {
224 return 3.0 / 2.0 * electronTemperature() * Boltzmann / ElectronCharge;
225 }
226
227 //! Set mean electron energy [eV].
228 //! This method also sets electron temperature accordingly.
229 void setMeanElectronEnergy(double energy);
230
231 //! Get electron energy distribution type.
233 return m_distributionType;
234 }
235
236 //! Set electron energy distribution type.
237 void setElectronEnergyDistributionType(const string& type);
238
239 //! Numerical quadrature method. Method: #m_quadratureMethod
240 string quadratureMethod() const {
241 return m_quadratureMethod;
242 }
243
244 //! Set numerical quadrature method for integrating electron
245 //! energy distribution function. Method: #m_quadratureMethod
246 void setQuadratureMethod(const string& method) {
247 m_quadratureMethod = method;
248 }
249
250 //! Set flag of automatically normalize electron energy distribution.
251 //! Flag: #m_do_normalizeElectronEnergyDist
254 }
255
256 //! Flag of automatically normalize electron energy distribution.
257 //! Flag: #m_do_normalizeElectronEnergyDist
260 }
261
262 //! Number of electron levels.
263 size_t nElectronEnergyLevels() const {
264 return m_nPoints;
265 }
266
267 //! Number of electron collision cross sections.
268 size_t nCollisions() const {
269 return m_collisions.size();
270 }
271
272 //! Get the Reaction object associated with electron collision *i*.
273 //! @since New in %Cantera 3.2.
274 const shared_ptr<Reaction> collision(size_t i) const {
275 return m_collisions[i];
276 }
277
278 //! Get the ElectronCollisionPlasmaRate object associated with electron collision
279 //! *i*.
280 //! @since New in %Cantera 3.2.
281 const shared_ptr<ElectronCollisionPlasmaRate> collisionRate(size_t i) const {
282 return m_collisionRates[i];
283 }
284
285 //! Update the electron energy distribution.
287
288 //! Return the distribution number #m_distNum.
289 int distributionNumber() const {
290 return m_distNum;
291 }
292
293 //! Return the electron energy level number #m_levelNum.
294 int levelNumber() const {
295 return m_levelNum;
296 }
297
298 //! Get the indicies for inelastic electron collisions.
299 //! @since New in %Cantera 3.2.
300 const vector<size_t>& kInelastic() const {
301 return m_kInelastic;
302 }
303
304 //! Get the indices for elastic electron collisions.
305 //! @since New in %Cantera 3.2.
306 const vector<size_t>& kElastic() const {
307 return m_kElastic;
308 }
309
310 //! Return the target of a specific process.
311 //! @since New in %Cantera 3.2.
312 size_t targetIndex(size_t i) const {
313 return m_targetSpeciesIndices[i];
314 }
315
316 //! Get the frequency of the applied electric field [Hz].
317 //! @since New in %Cantera 3.2.
318 double electricFieldFrequency() const {
320 }
321
322 //! Get the applied electric field strength [V/m].
323 double electricField() const {
324 return m_electricField;
325 }
326
327 //! Set the absolute electric field strength [V/m].
328 void setElectricField(double E) {
329 m_electricField = E;
330 }
331
332 //! Calculate the degree of ionization
333 //double ionDegree() const {
334 // double ne = concentration(m_electronSpeciesIndex); // [kmol/m³]
335 // double n_total = molarDensity(); // [kmol/m³]
336 // return ne / n_total;
337 //}
338
339 //! Get the reduced electric field strength [V·m²].
340 double reducedElectricField() const {
342 }
343
344 //! Set reduced electric field given in [V·m²].
345 void setReducedElectricField(double EN) {
346 m_electricField = EN * molarDensity() * Avogadro; // [V/m]
347 }
348
349 /**
350 * The electron mobility (m²/V/s)
351 * @f[
352 * \mu = \nu_d / E,
353 * @f]
354 * where @f$ \nu_d @f$ is the drift velocity (m²/s), and @f$ E @f$ is the electric
355 * field strength (V/m).
356 */
357 double electronMobility() const;
358
359 /**
360 * The elastic power loss [J/s/m³]
361 * @f[
362 * P_k = N_A N_A C_e e \sum_k C_k K_k,
363 * @f]
364 * where @f$ C_k @f$ and @f$ C_e @f$ are the concentration (kmol/m³) of the
365 * target species and electrons, respectively. @f$ K_k @f$ is the elastic
366 * electron energy loss coefficient (eV-m³/s).
367 */
368 double elasticPowerLoss();
369
370 /**
371 * The joule heating power (W/m³)
372 * @f[
373 * q_J = \sigma * E^2,
374 * @f]
375 * where @f$ \sigma @f$ is the conductivity (S/m), defined by:
376 * @f[
377 * \sigma = e * n_e * \mu_e
378 * @f]
379 * and @f$ E @f$ is the electric field strength (V/m).
380 */
381 double jouleHeatingPower() const;
382
383 void beginEquilibrate() override;
384
385 void endEquilibrate() override;
386
387 double intrinsicHeating() override;
388
389 //! Set parameters for the electron energy distribution.
390 /*!
391 * This method configures the electron energy distribution using the same
392 * mapping as the YAML `electron-energy-distribution` entry for a plasma phase.
393 *
394 * The mapping must contain the key `type`, which selects the electron energy
395 * distribution model. Supported values are:
396 *
397 * - `isotropic`
398 * - `discretized`
399 * - `Boltzmann-two-term`
400 *
401 * For `isotropic`, the mapping must contain:
402 *
403 * - `shape-factor`
404 * - `mean-electron-energy`
405 *
406 * The optional key `energy-levels` may be used to specify the energy grid.
407 *
408 * For `discretized`, the mapping must contain:
409 *
410 * - `energy-levels`
411 * - `distribution`
412 *
413 * The optional key `normalize` controls whether the distribution is normalized.
414 *
415 * For `Boltzmann-two-term`, the mapping may specify either:
416 *
417 * - `energy-levels`, defining an explicit fixed grid; or
418 * - `initial-max-energy-level` and `grid-cell-count`, defining a generated grid.
419 *
420 * Generated grids may also use:
421 *
422 * - `energy-level-spacing`, with supported values `linear`, `quadratic`,
423 * and `geometric`. If omitted, `linear` is used.
424 * - `geometric-grid-ratio`, used only for `geometric` grids.
425 * - `energy-grid-adaptation`, a mapping controlling automatic grid adaptation (see
426 * the [`plasma` input documentation](../reference/yaml/phases.html) for further
427 * details on energy-grid adaptation).
428 *
429 * The optional key `reduced-field-threshold-before-Maxwellian` applies to
430 * `Boltzmann-two-term` for both explicit and generated grids: below this threshold,
431 * a gas-temperature Maxwellian is imposed.
432 *
433 * This method updates the electron energy levels and electron energy
434 * distribution stored by `PlasmaPhase`. Changing the EEDF model or grid
435 * invalidates the previously stored EEDF.
436 *
437 * @param eedf Mapping using the same keys as the YAML
438 * `electron-energy-distribution` entry.
439 *
440 * @since New in Cantera 4.0
441 */
443
444
445 //! @}
446 //! @name Molar Thermodynamic Properties of the Solution
447 //! @{
448
449 //! Return the Molar enthalpy. Units: J/kmol.
450 /*!
451 * For an ideal gas mixture with electrons at a different temperature
452 * than the heavy species, the molar enthalpy is calculated as:
453 * @f[
454 * \begin{align}
455 * \hat h(T, T_\text{e})
456 * &= \sum_{k} X_k h^0_k(T_k) \\
457 * &= \sum_{k \neq e} X_k h^0_k(T) + X_\text{e} h_\text{e}^0(T_\text{e})
458 * \end{align}
459 * @f]
460 * where heavy-species properties are evaluated at @f$ T @f$, electron properties
461 * at @f$ T_\text{e} @f$, and @f$ P @f$ is the total pressure of the mixture.
462 * For an ideal gas, enthalpy is independent of pressure.
463 * The standard-state pure-species enthalpies @f$ h^0_k(T_k) @f$ are
464 * computed by the species thermodynamic property manager.
465 */
466 double enthalpy_mole() const override;
467
468 //! Return the molar entropy. Units: J/kmol/K.
469 /*!
470 * For an ideal gas mixture with electrons at a different temperature
471 * than the heavy species, the molar entropy is calculated as:
472 * @f[
473 * \hat s(T,T_\text{e},P) = \sum_k X_k \hat s^0_k(T_k) - \hat R \ln \frac{P}{P^0}
474 * @f]
475 * where heavy-species properties are evaluated at @f$ T @f$, electron properties
476 * at @f$ T_\text{e} @f$, and @f$ P @f$ is the total pressure of the mixture.
477 */
478 double entropy_mole() const override;
479
480 //! Return the molar Gibbs free energy. Units: J/kmol.
481 /*!
482 * For an ideal gas mixture with electrons at a different temperature
483 * than the heavy species, the molar Gibbs free energy is calculated as:
484 * @f[
485 * \begin{align}
486 * \hat g(T,T_\text{e},P)
487 * &= \sum_{k} X_k \tilde{g}_k(T_k, P)
488 * = \sum_{k} X_k \mu_k(T_k, P) \\
489 * &= \sum_{k} X_k \left[\mu^0_k(T_k)
490 * + R T_k \ln \left( \frac{X_k P}{P^0} \right) \right] \\
491 * \end{align}
492 * @f]
493 * where heavy-species properties are evaluated at @f$ T @f$, electron properties
494 * at @f$ T_\text{e} @f$, and @f$ P @f$ is the total pressure of the mixture.
495 */
496 double gibbs_mole() const override;
497
498 //! Return the molar internal energy. Units: J/kmol.
499 /*!
500 * For an ideal gas mixture with electrons at a different temperature
501 * than the heavy species, the molar internal energy is calculated as:
502 * @f[
503 * \hat u(T,T_\text{e},P)
504 * = \sum_{k} X_k \tilde{u}_k(T_k)
505 * = \sum_{k} X_k (\tilde{h}_k(T_k) - R T_k)
506 * @f]
507 * where heavy-species properties are evaluated at @f$ T @f$, electron properties
508 * at @f$ T_\text{e} @f$, and @f$ P @f$ is the total pressure of the mixture.
509 * For an ideal gas, internal energy is independent of pressure.
510 */
511 double intEnergy_mole() const override;
512
513 //! @}
514 //! @name Mechanical Equation of State
515 //! @{
516
517 //! Return the mean temperature of the plasma phase. Units: K.
518 /*!
519 * In a plasma phase, the electron temperature can differ from the
520 * heavy-species (gas) temperature. Therefore, the mean temperature is
521 * defined as a mole-fraction-weighted average of the electron and
522 * heavy-species temperatures:
523 * @f[
524 * \begin{align}
525 * \overline{T} &= \sum_{k \neq e} X_k T + X_\text{e} T_\text{e} \\
526 * &= (1 - X_\text{e}) T + X_\text{e} T_\text{e} \\
527 * &= T + X_\text{e} (T_\text{e} - T)
528 * \end{align}
529 * @f]
530 * See the #pressure() method for usage of the mean temperature in
531 * calculating the pressure of the plasma phase.
532 */
533 double meanTemperature() const;
534
535 //! Return the pressure of the plasma phase. Units: Pa.
536 /*!
537 * The pressure of the plasma phase is calculated using the mean temperature,
538 * which is a mole-fraction-weighted average of the electron and heavy-species
539 * temperatures.
540 * @f[
541 * \begin{align}
542 * P &= \sum_k n_k k_\text{B} T_k \\
543 * &= \sum_{k \neq e} n_k k_\text{B} T
544 * + n_\text{e} k_\text{B} T_\text{e} \\
545 * &= (n_\text{total} - n_\text{e}) k_\text{B} T
546 * + n_\text{e} k_\text{B} T_\text{e} \\
547 * &= n_\text{total} (1 - X_\text{e}) k_\text{B} T
548 * + n_\text{total} X_\text{e} k_\text{B} T_\text{e} \\
549 * &= n_\text{total} k_\text{B} \overline{T} \\
550 * \end{align}
551 * @f]
552 * where @f$ \overline{T} @f$ is the mean temperature of the plasma phase,
553 * defined in the #meanTemperature() method.
554 * Here, @f$ n_k @f$ is the number density of species *k* [in 1/m³],
555 * @f$ n_\text{total} @f$ is the total number density of the phase [in 1/m³],
556 * @f$ X_\text{e} @f$ is the mole fraction of electrons,
557 * @f$ T @f$ is the heavy-species (gas) temperature [K],
558 * @f$ T_\text{e} @f$ is the electron temperature [K],
559 * and @f$ k_\text{B} @f$ is the Boltzmann constant [J/K].
560 *
561 * The number density times Boltzmann constant can be expressed as
562 * @f$ n_\text{total} k_\text{B} = C_\text{total} R @f$, where
563 * @f$ C_\text{total} @f$ is the total molar concentration of the phase [kmol/m³]
564 * and @f$ R @f$ is the gas constant [J/kmol/K], so that:
565 * @f[
566 * P = C_\text{total} R \overline{T}.
567 * @f]
568 *
569 * Here, the pressure is set via the density, via:
570 * @f[
571 * P = R \overline{T} \frac{\rho}{\overline{W}}
572 * @f]
573 * where @f$ \overline{W} @f$ is the mean molecular weight.
574 */
575 double pressure() const override;
576
577 //! Set the pressure at constant temperature and composition. Units: Pa.
578 /*!
579 * This method is implemented by setting the mass density to
580 * @f[
581 * \rho = \frac{P \overline{W}}{\hat R \overline{T} }.
582 * @f]
583 *
584 * where @f$ \overline{W} @f$ is the mean molecular weight,
585 * and @f$ \overline{T} @f$ is the mean temperature (see #meanTemperature()).
586 *
587 * @param p Pressure [Pa].
588 */
589 void setPressure(double p) override {
591 }
592
593 //! Return the Gas Constant multiplied by the current electron temperature [J/kmol].
594 double RTe() const {
596 }
597
598 //! Return the electron pressure. Units: Pa.
599 /*!
600 * The partial pressure of electrons is calculated using the electron temperature:
601 * @f[
602 * P_\text{e} = n_\text{e} k_\text{B} T_\text{e} = C_\text{e} R T_\text{e},
603 * @f]
604 * where @f$ n_\text{e} @f$ is the particular density of electrons [in 1/m³],
605 * @f$ k_\text{B} @f$ is the Boltzmann constant [J/K],
606 * @f$ C_\text{e} @f$ is the molar concentration of electrons [in kmol/m³],
607 * @f$ R @f$ is the gas constant [J/kmol/K], and
608 * @f$ T_\text{e} @f$ is the electron temperature [K].
609 */
610 virtual double electronPressure() const {
613 }
614
615 //! Raise NotImplementedError, as there is an ambiguity on the temperature to use.
616 double thermalExpansionCoeff() const override {
617 throw NotImplementedError("PlasmaPhase::thermalExpansionCoeff");
618 }
619
620 //! Raise NotImplementedError, as there is an ambiguity on the temperature to use.
621 double soundSpeed() const override {
622 throw NotImplementedError("PlasmaPhase::soundSpeed");
623 }
624
625 //! @}
626 //! @name Chemical Potentials and Activities
627 //! @{
628
629 //! Returns the standard concentration @f$ C^0_k @f$, which is used to
630 //! normalize the generalized concentration. Units: m³/kmol.
631 /*!
632 * The standard concentration is chosen to be equal to @f[ C^0_k = \frac{P}{R T} @f]
633 * where @f$ P @f$ is the total pressure of the mixture,
634 * @f$ R @f$ is the gas constant, and @f$ T @f$ is the gas temperature.
635 *
636 * @note The gas temperature @f$ T @f$ (not the electron temperature or the
637 * mean temperature) is used for *all* species, including electrons.
638 * Consequently @f$ C^0_\text{e} = P/RT \neq 1/V^0_\text{e} = P/R T_\text{e} @f$
639 * when @f$ T_\text{e} \neq T @f$. This is intentional: the reciprocal
640 * relation @f$ C^0_k = 1/V^0_k @f$ is a coincidence of the
641 * single-temperature ideal gas and is not a thermodynamic requirement.
642 * See the class documentation.
643 *
644 * @param k Parameter indicating the species. The default
645 * is to assume this refers to species 0.
646 */
647 double standardConcentration(size_t k=0) const override;
648
649 //! Get the array of non-dimensional activities at the current solution
650 //! temperature, pressure, and solution concentration.
651 /*!
652 * Since @f$ a_k = C^a_k / C^0_k @f$, where @f$ C^a_k = C_k @f$ is the true molar
653 * concentration, and @f$ C^0_k @f$ is the standard concentration defined above,
654 * the activities are equal to @f$ a_k = X_k T / \overline{T} @f$.
655 *
656 * @note These activities are defined for consistency with the kinetics
657 * (law-of-mass-action) concentrations and, when @f$ T_\text{e} \neq T @f$,
658 * differ by a factor of @f$ T/\overline{T} @f$ from the activities implied by
659 * the chemical-potential model (@f$ a_k = X_k @f$). See the class documentation
660 * for a discussion of this intentional inconsistency.
661 *
662 * @param a Output vector of activities. Length: m_kk.
663 */
664 void getActivities(span<double> a) const override;
665
666 //! Get the array of non-dimensional activity coefficients at the current
667 //! solution temperature, pressure, and solution concentration.
668 /*!
669 * The activity coefficients are defined by @f$ \gamma_k = a_k / X_k @f$.
670 * With the current definition of the activities, the activity coefficients are
671 * equal to @f$ \gamma_k = T / \overline{T} @f$.
672 *
673 * @param ac Output vector of activity coefficients. Length: m_kk.
674 */
675 void getActivityCoefficients(span<double> ac) const override;
676
677 //! @}
678 //! @name Partial Molar Properties of the Solution
679 //! @{
680
681 //! Return the chemical potentials of the species in the solution. Units: J/kmol.
682 /*!
683 * The chemical potential of species *k* is calculated as:
684 * @f[
685 * \begin{align}
686 * \mu_k(T_k, X_k, P)
687 * &= \mu_k^o(T_k, P) + R T_k \ln(X_k) \\
688 * &= \mu^0_k(T_k)(T_k)
689 * + R T_k \ln\left(\frac{P}{P^0}\right)
690 * + R T_k \ln(X_k) \\
691 * &= h^0_k(T_k)
692 * - T_k s^0_k(T_k)
693 * + R T_k \ln\left(\frac{P X_k}{P^0}\right) \\
694 * \end{align}
695 * @f]
696 * Note that it is also equal to the partial molar Gibbs free energy.
697 */
698 void getChemPotentials(span<double> mu) const override;
699
700 //! Return the partial molar enthalpies of the species in the solution. Units: J/kmol.
701 /*!
702 * The partial molar enthalpy of species *k* is
703 * @f$ \tilde{h}_k(T_k,P) = h^o_k(T,P) = h^{ref}_k(T_k) @f$,
704 * where heavy-species properties are evaluated at the gas temperature @f$ T @f$,
705 * and electron properties are evaluated at the electron temperature @f$ T_e @f$.
706 */
707 void getPartialMolarEnthalpies(span<double> hbar) const override;
708
709 //! Return the partial molar entropies of the species in the solution. Units: J/kmol/K.
710 /*!
711 * The partial molar enthalpy of species *k* is:
712 * @f[
713 * \tilde{s}_k(T_k, P) = s^0_k(T_k) - R \ln \frac{X_k P}{P^0}
714 * @f]
715 * where heavy-species properties are evaluated at the gas temperature,
716 * and electron properties are evaluated at the electron temperature.
717 * Here, @f$ P @f$ is the total pressure of the mixture, as defined in #pressure().
718 */
719 void getPartialMolarEntropies(span<double> sbar) const override;
720
721 //! Return the partial molar internal energies of the species in the solution. Units: J/kmol.
722 /*!
723 * The partial molar internal energy of species *k* is calculated as:
724 * @f[
725 * \tilde{u}_k(T_k,P) = \tilde{h}_k(T_k,P) - R T_k = h^{ref}_k(T_k) - R T_k
726 * @f]
727 * where @f$ \tilde{h}_k @f$ is the partial molar enthalpy of species *k*, and
728 * @f$ T_k @f$ is the temperature at which the partial molar enthalpy is evaluated.
729 * For heavy species, the partial molar enthalpy is evaluated at the gas temperature,
730 * while for electrons, it is evaluated at the electron temperature.
731 */
732 void getPartialMolarIntEnergies(span<double> ubar) const override;
733
734 //! Return the partial molar volumes of the species in the solution. Units: m³/kmol.
735 /*!
736 * For a multitemperature system,
737 * @f[
738 * v_k = \frac{R T_k}{P}
739 * @f]
740 * where @f$ T_k @f$ is the temperature at which the
741 * partial molar enthalpy is evaluated.
742 */
743 void getPartialMolarVolumes(span<double> vbar) const override;
744
745 //! @}
746 //! @name Properties of the Standard State of the Species in the Solution
747 //! @{
748
749 //! Return the standard chemical potentials of the species. Units: J/kmol.
750 /*!
751 * The standard chemical potentials (or standard state Gibbs free energy)
752 * of species *k* is calculated as:
753 * @f[
754 * \begin{align}
755 * \mu^0_k(T_k, X_k, P)
756 * &= mu^0_k(T_k)(T_k)
757 * + R T_k \ln\left(\frac{P}{P^0}\right) \\
758 * &= h^0_k(T_k) - T_k s^0_k(T_k)
759 * + R T_k \ln\left(\frac{P X_k}{P^0}\right) \\
760 * \end{align}
761 * @f]
762 * Here, @f$ P @f$ is the total pressure of the mixture, as defined in #pressure().
763 */
764 void getStandardChemPotentials(span<double> muStar) const override;
765
766 //! Return the standard molar volumes of the species. Units: m³/kmol.
767 /*!
768 * For a multitemperature system,
769 * @f[
770 * v_k = \frac{R T_k}{P},
771 * @f]
772 * where @f$ T_k @f$ is the temperature at which
773 * the standard molar volume is evaluated.
774 */
775 void getStandardVolumes(span<double> vol) const override;
776
777 //! @}
778 //! @name Thermodynamic Values for the Species Reference States
779 //! @{
780
781 //! Return the reference chemical potentials of the species. Units: J/kmol.
782 /*!
783 * The reference chemical potentials (or reference state Gibbs free energy)
784 * of species *k* is calculated as:
785 * @f[
786 * \mu^0_k(T_k) = h^0_k(T_k) - T_k s^0_k(T_k)
787 * @f]
788 */
789 void getGibbs_ref(span<double> g) const override;
790
791 //! Return the molar volumes of the species reference states. Units: m³/kmol.
792 /*!
793 * The molar volumes of the species reference states of species *k*
794 * is calculated as:
795 * @f[
796 * v^o_k(T_k) = \frac{R T_k}{P^0}
797 * @f]
798 *
799 * @param vol Output vector containing the standard state volumes.
800 * Length: m_kk.
801
802 */
803 void getStandardVolumes_ref(span<double> vol) const override;
804
805 //! @}
806 //! @name Setting the State
807 //!
808 //! For a plasma phase, setting the state requires specifying both
809 //! the heavy-species (gas) temperature and the electron temperature.
810 //! @{
811
812 //! Set the state using an AnyMap containing any combination of properties
813 //! supported by the thermodynamic model
814 /*!
815 * Accepted keys are:
816 * * `X` (mole fractions)
817 * * `Y` (mass fractions)
818 * * `T` or `Tg` or `gas-temperature` [K]
819 * * `Te` or `electron-temperature` [K]
820 * * `P` or `pressure` [Pa]
821 * * `H` or `enthalpy` [J/kg]
822 * * `U` or `internal-energy` [J/kg]
823 * * `S` or `entropy` [J/kg/K]
824 * * `V` or `specific-volume` [m^3/kg]
825 * * `D` or `density` [kg/m^3]
826 *
827 * Composition can be specified as either an AnyMap of species names to
828 * values or as a composition string. All other values can be given as
829 * floating point values in Cantera's default units, or as strings with the
830 * units specified, which will be converted using the Units class.
831 *
832 * If no thermodynamic property pair is given, or only one of temperature or
833 * pressure is given, then 298.15 K and 101325 Pa will be used as necessary
834 * to fully set the state.
835 *
836 * Set the electron temperature first, and call ThermoPhase::setState.
837 */
838 void setState(const AnyMap& state) override;
839
840
841 //! @}
842
843protected:
844 //! Update the species reference state thermodynamic functions
845 /*!
846 * This method is called each time a thermodynamic property is requested,
847 * to check whether the internal species properties within the object
848 * need to be updated (like getPartialMolarCp, getEnthalpy_RT, getEntropy_R,
849 * getGibbs_RT, getIntEnergy_RT, getCp_R, and getEnthalpy_RT_ref and alike).
850 * Currently, this updates the species thermo polynomial values for the current
851 * value of the gas temperature for heavy species, and of the electron
852 * temperature for the electron species. A check is made to see if gas
853 * or electron temperatures have changed since the last evaluation.
854 * This object does not contain any persistent data that depends on the
855 * concentration, that needs to be updated. The state object modifies its
856 * concentration dependent information at the time the setMoleFractions()
857 * (or equivalent) call is made.
858 */
859 void updateThermo() const override;
860
861 //! When electron energy distribution changed, plasma properties such as
862 //! electron-collision reaction rates need to be re-evaluated.
864
865 //! When electron energy level changed, plasma properties such as
866 //! electron-collision reaction rates need to be re-evaluate.
867 //! In addition, the cross-sections need to be interpolated at
868 //! the new level.
870
871 //! Check the electron energy levels
872 /*!
873 * The values of electron energy levels need to be positive and
874 * monotonically increasing.
875 */
876 void checkElectronEnergyLevels() const;
877
878 //! Check the electron energy distribution
879 /*!
880 * This method check the electron energy distribution for the criteria
881 * below.
882 *
883 * 1. The values of electron energy distribution cannot be negative.
884 *
885 * 2. If the last value of electron energy distribution is larger
886 * than 0.01, it will raise a warning to suggest using a higher electron
887 * energy levels.
888 */
890
891 //! Set isotropic electron energy distribution
893
894 //! Update electron temperature (K) From energy distribution.
895 //! #m_electronTemp
897
898 //! Electron energy distribution norm
900
901 //! Update interpolated cross section of a collision
902 bool updateInterpolatedCrossSection(size_t k);
903
904 //! Update electron energy distribution difference
906
907 // Electron energy order in the exponential term
908 double m_isotropicShapeFactor = 1.0;
909
910 //! Number of points of electron energy levels
911 size_t m_nPoints = 1001;
912
913 //! electron energy levels [ev]. Length: #m_nPoints
915
916 //! Normalized electron energy distribution vector [-]
917 //! Length: #m_nPoints
918 Eigen::ArrayXd m_electronEnergyDist;
919
920 //! Index of electron species.
922
923 //! Electron temperature [K].
925
926 //! Electron energy distribution type. Can be "isotropic", "discretized" or "Boltzmann-two-term".
927 string m_distributionType = "isotropic";
928
929 //! Numerical quadrature method for electron energy distribution.
930 string m_quadratureMethod = "simpson";
931
932 //! Flag of normalizing electron energy distribution.
934
935 //! Indices of inelastic collisions in m_crossSections.
936 vector<size_t> m_kInelastic;
937
938 //! Indices of elastic collisions in m_crossSections.
939 vector<size_t> m_kElastic;
940
941 //! electric field [V/m].
942 double m_electricField = 0.0;
943
944 //! electric field freq [Hz].
946
947 //! Cross section data. m_crossSections[i][j], where i is the specific process,
948 //! j is the index of vector. Unit: [m^2]
949 vector<vector<double>> m_crossSections;
950
951 //! Electron energy levels corresponding to the cross section data. m_energyLevels[i][j],
952 //! where i is the specific process, j is the index of vector. Unit: [eV]
953 vector<vector<double>> m_energyLevels;
954
955 //! ionization degree for the electron-electron collisions (tmp is the previous one)
956 //double m_ionDegree = 0.0;
957
958 //! Electron energy distribution Difference dF/dε (V^-5/2)
960
961 //! Elastic electron energy loss coefficients (eV m3/s)
962 /*! The elastic electron energy loss coefficient for species k is,
963 * @f[
964 * K_k = \frac{2 m_e}{m_k} \sqrt{\frac{2 e}{m_e}} \int_0^{\infty} \sigma_k
965 * \epsilon^2 \left( F_0 + \frac{k_\text{B} T}{e}
966 * \frac{\partial F_0}{\partial \epsilon} \right) d \epsilon,
967 * @f]
968 * where @f$ m_e @f$ [kg] is the electron mass, @f$ \epsilon @f$ [V] is the
969 * electron energy, @f$ \sigma_k @f$ [m2] is the reaction collision cross section,
970 * @f$ F_0 @f$ [V^(-3/2)] is the normalized electron energy distribution function.
971 */
973
974 //! Updates the elastic electron energy loss coefficient for collision index i
975 /*! Calculates the elastic energy loss coefficient using the current electron
976 energy distribution and cross sections.
977 */
979
980 //! Update elastic electron energy loss coefficients
981 /*! Used by elasticPowerLoss() and other plasma property calculations that
982 depends on #m_elasticElectronEnergyLossCoefficients. This function calls
983 updateInterpolatedCrossSection() before calling
984 updateElasticElectronEnergyLossCoefficient()
985 */
987
988private:
989
990 //! Solver used to calculate the EEDF based on electron collision rates
991 unique_ptr<EEDFTwoTermApproximation> m_eedfSolver = nullptr;
992
993 //! Electron energy distribution change variable. Whenever
994 //! #m_electronEnergyDist changes, this int is incremented.
995 int m_distNum = -1;
996
997 //! Electron energy level change variable. Whenever
998 //! #m_electronEnergyLevels changes, this int is incremented.
999 int m_levelNum = -1;
1000
1001 //! The list of shared pointers of plasma collision reactions
1002 vector<shared_ptr<Reaction>> m_collisions;
1003
1004 //! The list of shared pointers of collision rates
1005 vector<shared_ptr<ElectronCollisionPlasmaRate>> m_collisionRates;
1006
1007 //! The collision-target species indices of #m_collisions
1009
1010 //! The list of whether the interpolated cross sections is ready
1011 vector<bool> m_interp_cs_ready;
1012
1013 //! Set collisions. This function sets the list of collisions and
1014 //! the list of target species using #addCollision.
1015 void setCollisions();
1016
1017 //! Add a collision and record the target species
1018 void addCollision(shared_ptr<Reaction> collision);
1019
1020 //! Saved electron temperature during an equilibrium solve
1022
1023 //! Lock flag (default off)
1024 bool m_inEquilibrate = false;
1025
1026 //! Work array
1027 mutable std::vector<double> m_work;
1028};
1029
1030}
1031
1032#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.
An error indicating that an unimplemented function has been called.
virtual double molarDensity() const
Molar density (kmol/m^3).
Definition Phase.cpp:597
double meanMolecularWeight() const
The mean molecular weight. Units: (kg/kmol)
Definition Phase.h:677
virtual double concentration(const size_t k) const
Concentration of species k.
Definition Phase.cpp:495
string speciesName(size_t k) const
Name of the species with index k.
Definition Phase.cpp:143
virtual void setDensity(const double density_)
Set the internally stored density (kg/m^3) of the phase.
Definition Phase.cpp:607
Base class for handling plasma properties, specifically focusing on the electron energy distribution.
void checkElectronEnergyDistribution() const
Check the electron energy distribution.
void getStandardChemPotentials(span< double > muStar) const override
Return the standard chemical potentials of the species. Units: J/kmol.
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
Return the reference chemical potentials of the species. Units: J/kmol.
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.
void setState(const AnyMap &state) override
Set the state using an AnyMap containing any combination of properties supported by the thermodynamic...
int levelNumber() const
Return the electron energy level number m_levelNum.
void getActivities(span< double > a) const override
Get the array of non-dimensional activities at the current solution temperature, pressure,...
double thermalExpansionCoeff() const override
Raise NotImplementedError, as there is an ambiguity on the temperature to use.
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
Return the partial molar enthalpies of the species in the solution. Units: J/kmol.
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 soundSpeed() const override
Raise NotImplementedError, as there is an ambiguity on the temperature to use.
double pressure() const override
Return the pressure of the plasma phase. Units: Pa.
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 getActivityCoefficients(span< double > ac) const override
Get the array of non-dimensional activity coefficients at the current solution temperature,...
double meanTemperature() const
Return the mean temperature of the plasma phase. Units: K.
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.
void setPressure(double p) override
Set the pressure at constant temperature and composition. Units: Pa.
string m_distributionType
Electron energy distribution type. Can be "isotropic", "discretized" or "Boltzmann-two-term".
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.
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 [J/kmol].
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 setElectronEnergyDistributionParameters(const AnyMap &eedf)
Set parameters for the electron energy distribution.
void setIsotropicElectronEnergyDistribution()
Set isotropic electron energy distribution.
void getPartialMolarVolumes(span< double > vbar) const override
Return the partial molar volumes of the species in the solution. Units: m³/kmol.
Eigen::ArrayXd m_electronEnergyDistDiff
ionization degree for the electron-electron collisions (tmp is the previous one)
void getStandardVolumes(span< double > vol) const override
Return the standard molar volumes of the species. Units: m³/kmol.
double isotropicShapeFactor() const
The shape factor of isotropic electron energy distribution.
void getPartialMolarEntropies(span< double > sbar) const override
Return the partial molar entropies of the species in the solution. Units: J/kmol/K.
double gibbs_mole() const override
Return the molar Gibbs free energy. Units: J/kmol.
double standardConcentration(size_t k=0) const override
Returns the standard concentration , which is used to normalize the generalized concentration.
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
Return the chemical potentials of the species in the solution. Units: J/kmol.
void setElectronEnergyLevels(span< const double > levels)
Set electron energy levels.
size_t targetIndex(size_t i) const
Return the 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
Return the molar volumes of the species reference states. Units: m³/kmol.
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
Return the electron pressure. Units: Pa.
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.
void getPartialMolarIntEnergies(span< double > ubar) const override
Return the partial molar internal energies of the species in the solution. Units: J/kmol.
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