Cantera  4.0.0a2
Loading...
Searching...
No Matches
PlasmaPhase Class Reference

Base class for handling plasma properties, specifically focusing on the electron energy distribution. More...

#include <PlasmaPhase.h>

Inheritance diagram for PlasmaPhase:
[legend]

Detailed Description

Base class for handling plasma properties, specifically focusing on the electron energy distribution.

This class provides functionality to manage the the electron energy distribution using two primary methods for defining the electron distribution and electron temperature.

The first method utilizes setElectronTemperature(), which sets the electron temperature and calculates the electron energy distribution assuming an isotropic-velocity model. Note that all units in PlasmaPhase are in SI, except for electron energy, which is measured in volts.

The generalized electron energy distribution for an isotropic-velocity distribution (as described by Gudmundsson [13] and Khalilpour and Foroutan [22]) is given by:

\[ f(\epsilon) = c_1 \frac{\sqrt{\epsilon}}{\epsilon_m^{3/2}} \exp \left(-c_2 \left(\frac{\epsilon}{\epsilon_m}\right)^x \right), \]

where \( x = 1 \) corresponds to a Maxwellian distribution and \( x = 2 \) corresponds to a Druyvesteyn distribution. Here, \( \epsilon_m = \frac{3}{2} T_e \) [V] represents the mean electron energy.

The total probability distribution integrates to one:

\[ \int_0^{\infty} f(\epsilon) d\epsilon = 1. \]

According to Hagelaar and Pitchford [14], the electron energy probability function can be defined as \( F(\epsilon) = \frac{f(\epsilon)}{\sqrt{\epsilon}} \) with units of [V \(^{-3/2}\)]. The generalized form of the electron energy probability function for isotropic-velocity distributions is:

\[ F(\epsilon) = c_1 \frac{1}{\epsilon_m^{3/2}} \exp\left(-c_2 \left(\frac{\epsilon}{\epsilon_m}\right)^x\right), \]

and this form is used to model the isotropic electron energy distribution in PlasmaPhase.

The second method allows for manual definition of the electron energy distribution using setDiscretizedElectronEnergyDist(). In this approach, the electron temperature is derived from the mean electron energy, \( \epsilon_m \), which can be calculated as follows [14] :

\[ \epsilon_m = \int_0^{\infty} \epsilon^{3/2} F(\epsilon) d\epsilon. \]

This integral can be approximated using the trapezoidal rule,

\[ \epsilon_m = \sum_i \left(\epsilon_{i+1}^{5/2} - \epsilon_i^{5/2}\right) \frac{F(\epsilon_{i+1}) + F(\epsilon_i)}{2}, \]

where \( i \) is the index of discrete energy levels, or Simpson's rule.

Thermodynamic consistency of the two-temperature model

When the electron temperature \( T_\text{e} \) differs from the heavy-species temperature \( T \), this phase does not satisfy all of Cantera's standard-state consistency relations simultaneously: one of them is deliberately left unsatisfied. This is a consequence of two design commitments that this implementation makes, both of which are individually reasonable but which cannot be reconciled once \( T_\text{e} \neq T \):

  1. Kinetics uses true concentrations. The generalized (activity) concentrations that drive the law of mass action are kept equal to the true molar concentrations, \( C^a_k = C_k \), so that reaction rates depend on actual number densities. Together with the standard concentration \( C^0_k = P/RT \) (the gas temperature, for all species; see standardConcentration()), this requires the reported activities to be

    \[ a_k = \frac{C^a_k}{C^0_k} = X_k \frac{T}{\overline{T}}, \]

    where \( \overline{T} \) is the mole-fraction-weighted mean temperature (see meanTemperature()). This is what getActivities() returns.
  2. Chemical potentials keep the ideal-gas form. The chemical potentials retain the usual ideal-gas composition dependence, \( \mu_k = \mu^0_k(T_k) + R T_k \ln X_k \), with each species evaluated at its own temperature \( T_k \) ( \( T \) for heavy species, \( T_\text{e} \) for electrons; see getChemPotentials() and getStandardChemPotentials()). This is equivalent to an activity of \( X_k \).

When \( T_\text{e} \neq T \), these two demands imply different values for the activities – \( X_k\,T/\overline{T} \) versus \( X_k \) – which differ by the factor \( T/\overline{T} \). getActivities() reports the first; getChemPotentials() embodies the second; and the identity \( \mu_k = \mu^0_k + R T_k \ln a_k \) is therefore the relation left unsatisfied. This is why the consistency test chem_potentials_to_activities is a known failure for two-temperature states.

The practical consequence of this inconsistency is limited. It formally perturbs any chemical equilibrium computed for the phase, but the concept of chemical equilibrium in the absence of thermal equilibrium ( \( T_\text{e} \neq T \)) is itself ill-posed, so the perturbed quantity has little physical meaning in exactly the regime where the inconsistency appears. The trade-offs and potential approaches for a fully-consistent implementation are documented in https://github.com/Cantera/enhancements/issues/258#issuecomment-4857093158.

Warning
This class is an experimental part of Cantera and may be changed or removed without notice.
Todo:
Implement electron Boltzmann equation solver to solve EEDF. https://github.com/Cantera/enhancements/issues/127

Definition at line 125 of file PlasmaPhase.h.

Public Member Functions

 PlasmaPhase (const string &inputFile="", const string &id="")
 Construct and initialize a PlasmaPhase object directly from an input file.
 
string type () const override
 String indicating the thermodynamic model implemented.
 
void initThermo () override
 Initialize the ThermoPhase object after all species have been set up.
 
Overridden from IdealGasPhase or ThermoPhase
bool addSpecies (shared_ptr< Species > spec) override
 Add a Species to this Phase.
 
virtual void setSolution (std::weak_ptr< Solution > soln) override
 Set the link to the Solution object that owns this ThermoPhase.
 
void getParameters (AnyMap &phaseNode) const override
 Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using the newThermo(AnyMap&) function.
 
void setParameters (const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap()) override
 Set equation of state parameters from an AnyMap phase description.
 
Electron Species Information
size_t electronSpeciesIndex () const
 Electron Species Index.
 
string electronSpeciesName () const
 Electron species name.
 
Electron Energy Distribution Functions
void setElectronEnergyLevels (span< const double > levels)
 Set electron energy levels.
 
void getElectronEnergyLevels (span< double > levels) const
 Get electron energy levels.
 
void setDiscretizedElectronEnergyDist (span< const double > levels, span< const double > distrb)
 Set discretized electron energy distribution.
 
void getElectronEnergyDistribution (span< double > distrb) const
 Get electron energy distribution.
 
void setIsotropicShapeFactor (double x)
 Set the shape factor of isotropic electron energy distribution.
 
double isotropicShapeFactor () const
 The shape factor of isotropic electron energy distribution.
 
double electronTemperature () const override
 Electron Temperature [K].
 
void setElectronTemperature (double Te) override
 Set the internally stored electron temperature of the phase [K].
 
double meanElectronEnergy () const
 Mean electron energy [eV].
 
void setMeanElectronEnergy (double energy)
 Set mean electron energy [eV].
 
string electronEnergyDistributionType () const
 Get electron energy distribution type.
 
void setElectronEnergyDistributionType (const string &type)
 Set electron energy distribution type.
 
string quadratureMethod () const
 Numerical quadrature method. Method: m_quadratureMethod.
 
void setQuadratureMethod (const string &method)
 Set numerical quadrature method for integrating electron energy distribution function.
 
void enableNormalizeElectronEnergyDist (bool enable)
 Set flag of automatically normalize electron energy distribution.
 
bool normalizeElectronEnergyDistEnabled () const
 Flag of automatically normalize electron energy distribution.
 
size_t nElectronEnergyLevels () const
 Number of electron levels.
 
size_t nCollisions () const
 Number of electron collision cross sections.
 
const shared_ptr< Reactioncollision (size_t i) const
 Get the Reaction object associated with electron collision i.
 
const shared_ptr< ElectronCollisionPlasmaRatecollisionRate (size_t i) const
 Get the ElectronCollisionPlasmaRate object associated with electron collision i.
 
void updateElectronEnergyDistribution ()
 Update the electron energy distribution.
 
int distributionNumber () const
 Return the distribution number m_distNum.
 
int levelNumber () const
 Return the electron energy level number m_levelNum.
 
const vector< size_t > & kInelastic () const
 Get the indicies for inelastic electron collisions.
 
const vector< size_t > & kElastic () const
 Get the indices for elastic electron collisions.
 
size_t targetIndex (size_t i) const
 Return the target of a specific process.
 
double electricFieldFrequency () const
 Get the frequency of the applied electric field [Hz].
 
double electricField () const
 Get the applied electric field strength [V/m].
 
void setElectricField (double E)
 Set the absolute electric field strength [V/m].
 
double reducedElectricField () const
 Calculate the degree of ionization.
 
void setReducedElectricField (double EN)
 Set reduced electric field given in [V·m²].
 
double electronMobility () const
 The electron mobility (m²/V/s)
 
double elasticPowerLoss ()
 The elastic power loss [J/s/m³].
 
double jouleHeatingPower () const
 The joule heating power (W/m³)
 
void beginEquilibrate () override
 Hook called at the beginning of an equilibrium calculation on this phase.
 
void endEquilibrate () override
 Hook called at the end of an equilibrium calculation on this phase.
 
double intrinsicHeating () override
 Intrinsic volumetric heating rate [W/m³].
 
Molar Thermodynamic Properties of the Solution
double enthalpy_mole () const override
 Return the Molar enthalpy. Units: J/kmol.
 
double entropy_mole () const override
 Return the molar entropy. Units: J/kmol/K.
 
double gibbs_mole () const override
 Return the molar Gibbs free energy. Units: J/kmol.
 
double intEnergy_mole () const override
 Return the molar internal energy. Units: J/kmol.
 
Mechanical Equation of State
double meanTemperature () const
 Return the mean temperature of the plasma phase. Units: K.
 
double pressure () const override
 Return the pressure of the plasma phase. Units: Pa.
 
void setPressure (double p) override
 Set the pressure at constant temperature and composition. Units: Pa.
 
double RTe () const
 Return the Gas Constant multiplied by the current electron temperature [J/kmol].
 
virtual double electronPressure () const
 Return the electron pressure. Units: Pa.
 
double thermalExpansionCoeff () const override
 Raise NotImplementedError, as there is an ambiguity on the temperature to use.
 
double soundSpeed () const override
 Raise NotImplementedError, as there is an ambiguity on the temperature to use.
 
Chemical Potentials and Activities
double standardConcentration (size_t k=0) const override
 Returns the standard concentration \( C^0_k \), which is used to normalize the generalized concentration.
 
void getActivities (span< double > a) const override
 Get the array of non-dimensional activities at the current solution temperature, pressure, and solution concentration.
 
void getActivityCoefficients (span< double > ac) const override
 Get the array of non-dimensional activity coefficients at the current solution temperature, pressure, and solution concentration.
 
Partial Molar Properties of the Solution
void getChemPotentials (span< double > mu) const override
 Return the chemical potentials of the species in the solution. Units: J/kmol.
 
void getPartialMolarEnthalpies (span< double > hbar) const override
 Return the partial molar enthalpies of the species in the solution. Units: J/kmol.
 
void getPartialMolarEntropies (span< double > sbar) const override
 Return the partial molar entropies of the species in the solution. Units: J/kmol/K.
 
void getPartialMolarIntEnergies (span< double > ubar) const override
 Return the partial molar internal energies of the species in the solution. Units: J/kmol.
 
void getPartialMolarVolumes (span< double > vbar) const override
 Return the partial molar volumes of the species in the solution. Units: m³/kmol.
 
Properties of the Standard State of the Species in the Solution
void getStandardChemPotentials (span< double > muStar) const override
 Return the standard chemical potentials of the species. Units: J/kmol.
 
void getStandardVolumes (span< double > vol) const override
 Return the standard molar volumes of the species. Units: m³/kmol.
 
Thermodynamic Values for the Species Reference States
void getGibbs_ref (span< double > g) const override
 Return the reference chemical potentials of the species. Units: J/kmol.
 
void getStandardVolumes_ref (span< double > vol) const override
 Return the molar volumes of the species reference states. Units: m³/kmol.
 
Setting the State

For a plasma phase, setting the state requires specifying both the heavy-species (gas) temperature and the electron temperature.

void setState (const AnyMap &state) override
 Set the state using an AnyMap containing any combination of properties supported by the thermodynamic model.
 
- Public Member Functions inherited from IdealGasPhase
 IdealGasPhase (const string &inputFile="", const string &id="")
 Construct and initialize an IdealGasPhase ThermoPhase object directly from an input file.
 
string type () const override
 String indicating the thermodynamic model implemented.
 
bool isIdeal () const override
 Boolean indicating whether phase is ideal.
 
string phaseOfMatter () const override
 String indicating the mechanical phase of the matter in this Phase.
 
bool addSpecies (shared_ptr< Species > spec) override
 Add a Species to this Phase.
 
void setToEquilState (span< const double > mu_RT) override
 This method is used by the ChemEquil equilibrium solver.
 
double cp_mole () const override
 Molar heat capacity at constant pressure and composition [J/kmol/K].
 
double cv_mole () const override
 Molar heat capacity at constant volume and composition [J/kmol/K].
 
void setState_DP (double rho, double p) override
 Set the density and pressure at constant composition.
 
double isothermalCompressibility () const override
 Returns the isothermal compressibility. Units: 1/Pa.
 
double internalPressure () const override
 Return the internal pressure. Units: Pa.
 
void getActivityConcentrations (span< double > c) const override
 This method returns the array of generalized concentrations.
 
void getPartialMolarIntEnergies_TV (span< double > utilde) const override
 Return an array of partial molar internal energies at constant temperature and volume [J/kmol].
 
void getPartialMolarCp (span< double > cpbar) const override
 Return an array of partial molar heat capacities for the species in the mixture.
 
void getPartialMolarCv_TV (span< double > cvtilde) const override
 Return an array of species molar heat capacities associated with the constant-volume partial molar internal energies [J/kmol/K].
 
void getEnthalpy_RT (span< double > hrt) const override
 Get the nondimensional Enthalpy functions for the species at their standard states at the current T and P of the solution.
 
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 P of the solution.
 
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 P of the solution.
 
void getIntEnergy_RT (span< double > urt) const override
 Returns the vector of nondimensional Internal Energies of the standard state species at the current T and P of the solution.
 
void getCp_R (span< double > cpr) const override
 Get the nondimensional Heat Capacities at constant pressure for the species standard states at the current T and P of the solution.
 
void getEnthalpy_RT_ref (span< double > hrt) const override
 Returns the vector of nondimensional enthalpies of the reference state at the current temperature of the solution and the reference pressure for the species.
 
void getGibbs_RT_ref (span< double > grt) const override
 Returns the vector of nondimensional Gibbs Free Energies of the reference state at the current temperature of the solution and the reference pressure for the species.
 
void getEntropy_R_ref (span< double > er) const override
 Returns the vector of nondimensional entropies of the reference state at the current temperature of the solution and the reference pressure for each species.
 
void getIntEnergy_RT_ref (span< double > urt) const override
 Returns the vector of nondimensional internal Energies of the reference state at the current temperature of the solution and the reference pressure for each species.
 
void getCp_R_ref (span< double > cprt) const override
 Returns the vector of nondimensional constant pressure heat capacities of the reference state at the current temperature of the solution and reference pressure for each species.
 
- Public Member Functions inherited from ThermoPhase
 ThermoPhase ()=default
 Constructor.
 
shared_ptr< ThermoPhaseclone () const
 Create a new ThermoPhase object using the same species definitions, thermodynamic parameters, and state as this one.
 
double RT () const
 Return the Gas Constant multiplied by the current temperature.
 
double equivalenceRatio () const
 Compute the equivalence ratio for the current mixture from available oxygen and required oxygen.
 
virtual AnyMap getAuxiliaryData ()
 Return intermediate or model-specific parameters used by particular derived classes.
 
virtual void setSolution (std::weak_ptr< Solution > soln)
 Set the link to the Solution object that owns this ThermoPhase.
 
shared_ptr< Solutionroot () const
 Get the Solution object containing this ThermoPhase object and linked Kinetics and Transport objects.
 
string type () const override
 String indicating the thermodynamic model implemented.
 
virtual double refPressure () const
 Returns the reference pressure in Pa.
 
virtual double minTemp (size_t k=npos) const
 Minimum temperature for which the thermodynamic data for the species or phase are valid.
 
double Hf298SS (const size_t k) const
 Report the 298 K Heat of Formation of the standard state of one species (J kmol-1)
 
virtual void modifyOneHf298SS (const size_t k, const double Hf298New)
 Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1)
 
virtual void resetHf298 (const size_t k=npos)
 Restore the original heat of formation of one or more species.
 
virtual double maxTemp (size_t k=npos) const
 Maximum temperature for which the thermodynamic data for the species are valid.
 
bool temperatureLimitsEnforced () const
 Returns true if temperature limits are enforced for this phase.
 
void setTemperatureLimitsEnforced (bool enforce)
 Set whether temperature limits are enforced for this phase.
 
bool chargeNeutralityNecessary () const
 Returns the chargeNeutralityNecessity boolean.
 
void setElectricPotential (double v)
 Set the electric potential of this phase (V).
 
double electricPotential () const
 Returns the electric potential of this phase (V).
 
virtual int activityConvention () const
 This method returns the convention used in specification of the activities, of which there are currently two, molar- and molality-based conventions.
 
virtual int standardStateConvention () const
 This method returns the convention used in specification of the standard state, of which there are currently two, temperature based, and variable pressure based.
 
virtual Units standardConcentrationUnits () const
 Returns the units of the "standard concentration" for this phase.
 
virtual double logStandardConc (size_t k=0) const
 Natural logarithm of the standard concentration of the kth species.
 
virtual void getLnActivityCoefficients (span< double > lnac) const
 Get the array of non-dimensional molar-based ln activity coefficients at the current solution temperature, pressure, and solution concentration.
 
void getElectrochemPotentials (span< double > mu) const
 Get the species electrochemical potentials.
 
double enthalpy_mass () const
 Specific enthalpy. Units: J/kg.
 
double intEnergy_mass () const
 Specific internal energy. Units: J/kg.
 
double entropy_mass () const
 Specific entropy. Units: J/kg/K.
 
double gibbs_mass () const
 Specific Gibbs function. Units: J/kg.
 
double cp_mass () const
 Specific heat at constant pressure and composition [J/kg/K].
 
double cv_mass () const
 Specific heat at constant volume and composition [J/kg/K].
 
virtual void setState_TPX (double t, double p, span< const double > x)
 Set the temperature (K), pressure (Pa), and mole fractions.
 
virtual void setState_TPX (double t, double p, const Composition &x)
 Set the temperature (K), pressure (Pa), and mole fractions.
 
virtual void setState_TPX (double t, double p, const string &x)
 Set the temperature (K), pressure (Pa), and mole fractions.
 
virtual void setState_TPY (double t, double p, span< const double > y)
 Set the internally stored temperature (K), pressure (Pa), and mass fractions of the phase.
 
virtual void setState_TPY (double t, double p, const Composition &y)
 Set the internally stored temperature (K), pressure (Pa), and mass fractions of the phase.
 
virtual void setState_TPY (double t, double p, const string &y)
 Set the internally stored temperature (K), pressure (Pa), and mass fractions of the phase.
 
virtual void setState_TP (double t, double p)
 Set the temperature (K) and pressure (Pa)
 
virtual void setState_HP (double h, double p, double tol=1e-9)
 Set the internally stored specific enthalpy (J/kg) and pressure (Pa) of the phase.
 
virtual void setState_UV (double u, double v, double tol=1e-9)
 Set the specific internal energy (J/kg) and specific volume (m^3/kg).
 
virtual void setState_SP (double s, double p, double tol=1e-9)
 Set the specific entropy (J/kg/K) and pressure (Pa).
 
virtual void setState_SV (double s, double v, double tol=1e-9)
 Set the specific entropy (J/kg/K) and specific volume (m^3/kg).
 
virtual void setState_ST (double s, double t, double tol=1e-9)
 Set the specific entropy (J/kg/K) and temperature (K).
 
virtual void setState_TV (double t, double v, double tol=1e-9)
 Set the temperature (K) and specific volume (m^3/kg).
 
virtual void setState_PV (double p, double v, double tol=1e-9)
 Set the pressure (Pa) and specific volume (m^3/kg).
 
virtual void setState_UP (double u, double p, double tol=1e-9)
 Set the specific internal energy (J/kg) and pressure (Pa).
 
virtual void setState_VH (double v, double h, double tol=1e-9)
 Set the specific volume (m^3/kg) and the specific enthalpy (J/kg)
 
virtual void setState_TH (double t, double h, double tol=1e-9)
 Set the temperature (K) and the specific enthalpy (J/kg)
 
virtual void setState_SH (double s, double h, double tol=1e-9)
 Set the specific entropy (J/kg/K) and the specific enthalpy (J/kg)
 
void setMixtureFraction (double mixFrac, span< const double > fuelComp, span< const double > oxComp, ThermoBasis basis=ThermoBasis::molar)
 Set the mixture composition according to the mixture fraction = kg fuel / (kg oxidizer + kg fuel)
 
void setMixtureFraction (double mixFrac, const string &fuelComp, const string &oxComp, ThermoBasis basis=ThermoBasis::molar)
 Set the mixture composition according to the mixture fraction = kg fuel / (kg oxidizer + kg fuel)
 
void setMixtureFraction (double mixFrac, const Composition &fuelComp, const Composition &oxComp, ThermoBasis basis=ThermoBasis::molar)
 Set the mixture composition according to the mixture fraction = kg fuel / (kg oxidizer + kg fuel)
 
double mixtureFraction (span< const double > fuelComp, span< const double > oxComp, ThermoBasis basis=ThermoBasis::molar, const string &element="Bilger") const
 Compute the mixture fraction = kg fuel / (kg oxidizer + kg fuel) for the current mixture given fuel and oxidizer compositions.
 
double mixtureFraction (const string &fuelComp, const string &oxComp, ThermoBasis basis=ThermoBasis::molar, const string &element="Bilger") const
 Compute the mixture fraction = kg fuel / (kg oxidizer + kg fuel) for the current mixture given fuel and oxidizer compositions.
 
double mixtureFraction (const Composition &fuelComp, const Composition &oxComp, ThermoBasis basis=ThermoBasis::molar, const string &element="Bilger") const
 Compute the mixture fraction = kg fuel / (kg oxidizer + kg fuel) for the current mixture given fuel and oxidizer compositions.
 
void setEquivalenceRatio (double phi, span< const double > fuelComp, span< const double > oxComp, ThermoBasis basis=ThermoBasis::molar)
 Set the mixture composition according to the equivalence ratio.
 
void setEquivalenceRatio (double phi, const string &fuelComp, const string &oxComp, ThermoBasis basis=ThermoBasis::molar)
 Set the mixture composition according to the equivalence ratio.
 
void setEquivalenceRatio (double phi, const Composition &fuelComp, const Composition &oxComp, ThermoBasis basis=ThermoBasis::molar)
 Set the mixture composition according to the equivalence ratio.
 
double equivalenceRatio (span< const double > fuelComp, span< const double > oxComp, ThermoBasis basis=ThermoBasis::molar) const
 Compute the equivalence ratio for the current mixture given the compositions of fuel and oxidizer.
 
double equivalenceRatio (const string &fuelComp, const string &oxComp, ThermoBasis basis=ThermoBasis::molar) const
 Compute the equivalence ratio for the current mixture given the compositions of fuel and oxidizer.
 
double equivalenceRatio (const Composition &fuelComp, const Composition &oxComp, ThermoBasis basis=ThermoBasis::molar) const
 Compute the equivalence ratio for the current mixture given the compositions of fuel and oxidizer.
 
double stoichAirFuelRatio (span< const double > fuelComp, span< const double > oxComp, ThermoBasis basis=ThermoBasis::molar) const
 Compute the stoichiometric air to fuel ratio (kg oxidizer / kg fuel) given fuel and oxidizer compositions.
 
double stoichAirFuelRatio (const string &fuelComp, const string &oxComp, ThermoBasis basis=ThermoBasis::molar) const
 Compute the stoichiometric air to fuel ratio (kg oxidizer / kg fuel) given fuel and oxidizer compositions.
 
double stoichAirFuelRatio (const Composition &fuelComp, const Composition &oxComp, ThermoBasis basis=ThermoBasis::molar) const
 Compute the stoichiometric air to fuel ratio (kg oxidizer / kg fuel) given fuel and oxidizer compositions.
 
void equilibrate (const string &XY, const string &solver="auto", double rtol=1e-9, int max_steps=50000, int max_iter=100, int estimate_equil=0, int log_level=0)
 Equilibrate a ThermoPhase object.
 
virtual bool compatibleWithMultiPhase () const
 Indicates whether this phase type can be used with class MultiPhase for equilibrium calculations.
 
virtual double critTemperature () const
 Critical temperature (K).
 
virtual double critPressure () const
 Critical pressure (Pa).
 
virtual double critVolume () const
 Critical volume (m3/kmol).
 
virtual double critCompressibility () const
 Critical compressibility (unitless).
 
virtual double critDensity () const
 Critical density (kg/m3).
 
virtual double satTemperature (double p) const
 Return the saturation temperature given the pressure.
 
virtual double satPressure (double t)
 Return the saturation pressure given the temperature.
 
virtual double vaporFraction () const
 Return the fraction of vapor at the current conditions.
 
virtual void setState_Tsat (double t, double x)
 Set the state to a saturated system at a particular temperature.
 
virtual void setState_Psat (double p, double x)
 Set the state to a saturated system at a particular pressure.
 
void setState_TPQ (double T, double P, double Q)
 Set the temperature, pressure, and vapor fraction (quality).
 
bool addSpecies (shared_ptr< Species > spec) override
 Add a Species to this Phase.
 
void modifySpecies (size_t k, shared_ptr< Species > spec) override
 Modify the thermodynamic data associated with a species.
 
virtual MultiSpeciesThermospeciesThermo (int k=-1)
 Return a changeable reference to the calculation manager for species reference-state thermodynamic properties.
 
virtual const MultiSpeciesThermospeciesThermo (int k=-1) const
 
void initThermoFile (const string &inputFile, const string &id)
 Initialize a ThermoPhase object using an input file.
 
AnyMap parameters (bool withInput=true) const
 Returns the parameters of a ThermoPhase object such that an identical one could be reconstructed using the newThermo(AnyMap&) function.
 
virtual void getSpeciesParameters (const string &name, AnyMap &speciesNode) const
 Get phase-specific parameters of a Species object such that an identical one could be reconstructed and added to this phase.
 
const AnyMapinput () const
 Access input data associated with the phase description.
 
AnyMapinput ()
 
void invalidateCache () override
 Invalidate any cached values which are normally updated only when a change in state is detected.
 
virtual void getdlnActCoeffds (const double dTds, span< const double > dXds, span< double > dlnActCoeffds) const
 Get the change in activity coefficients wrt changes in state (temp, mole fraction, etc) along a line in parameter space or along a line in physical space.
 
virtual void getdlnActCoeffdlnX_diag (span< double > dlnActCoeffdlnX_diag) const
 Get the array of ln mole fraction derivatives of the log activity coefficients - diagonal component only.
 
virtual void getdlnActCoeffdlnN_diag (span< double > dlnActCoeffdlnN_diag) const
 Get the array of log species mole number derivatives of the log activity coefficients.
 
virtual void getdlnActCoeffdlnN (const size_t ld, span< double > dlnActCoeffdlnN)
 Get the array of derivatives of the log activity coefficients with respect to the log of the species mole numbers.
 
virtual void getdlnActCoeffdlnN_numderiv (const size_t ld, span< double > dlnActCoeffdlnN)
 
virtual string report (bool show_thermo=true, double threshold=-1e-14) const
 returns a summary of the state of the phase as a string
 
- Public Member Functions inherited from Phase
 Phase ()=default
 Default constructor.
 
 Phase (const Phase &)=delete
 
Phaseoperator= (const Phase &)=delete
 
virtual bool isPure () const
 Return whether phase represents a pure (single species) substance.
 
virtual bool hasPhaseTransition () const
 Return whether phase represents a substance with phase transitions.
 
virtual bool isCompressible () const
 Return whether phase represents a compressible substance.
 
virtual map< string, size_t > nativeState () const
 Return a map of properties defining the native state of a substance.
 
string nativeMode () const
 Return string acronym representing the native state of a Phase.
 
virtual vector< string > fullStates () const
 Return a vector containing full states defining a phase.
 
virtual vector< string > partialStates () const
 Return a vector of settable partial property sets within a phase.
 
virtual size_t partialStateSize () const
 Get the size of the partial state vector of the phase.
 
virtual void savePartialState (span< double > state) const
 Save the current thermodynamic state of the phase, excluding composition.
 
virtual void restorePartialState (span< const double > state)
 Set the internal thermodynamic state of the phase, excluding composition.
 
virtual size_t stateSize () const
 Return size of vector defining internal state of the phase.
 
virtual void saveState (span< double > state) const
 Write to array 'state' the current internal state.
 
virtual void restoreState (span< const double > state)
 Restore the state of the phase from a previously saved state vector.
 
double molecularWeight (size_t k) const
 Molecular weight of species k.
 
void getMolecularWeights (span< double > weights) const
 Copy the vector of molecular weights into array weights.
 
span< const double > molecularWeights () const
 Return a const reference to the internal vector of molecular weights.
 
span< const double > inverseMolecularWeights () const
 Return a const reference to the internal vector of molecular weights.
 
void getCharges (span< double > charges) const
 Copy the vector of species charges into array charges.
 
virtual void setMolesNoTruncate (span< const double > N)
 Set the state of the object with moles in [kmol].
 
double elementalMassFraction (const size_t m) const
 Elemental mass fraction of element m.
 
double elementalMoleFraction (const size_t m) const
 Elemental mole fraction of element m.
 
double charge (size_t k) const
 Dimensionless electrical charge of a single molecule of species k The charge is normalized by the the magnitude of the electron charge.
 
double chargeDensity () const
 Charge density [C/m^3].
 
size_t nDim () const
 Returns the number of spatial dimensions (1, 2, or 3)
 
void setNDim (size_t ndim)
 Set the number of spatial dimensions (1, 2, or 3).
 
virtual bool ready () const
 Returns a bool indicating whether the object is ready for use.
 
int stateMFNumber () const
 Return the State Mole Fraction Number.
 
virtual void invalidateCache ()
 Invalidate any cached values which are normally updated only when a change in state is detected.
 
bool caseSensitiveSpecies () const
 Returns true if case sensitive species names are enforced.
 
void setCaseSensitiveSpecies (bool cflag=true)
 Set flag that determines whether case sensitive species are enforced in look-up operations, for example speciesIndex.
 
vector< double > getCompositionFromMap (const Composition &comp) const
 Converts a Composition to a vector with entries for each species Species that are not specified are set to zero in the vector.
 
void massFractionsToMoleFractions (span< const double > Y, span< double > X) const
 Converts a mixture composition from mole fractions to mass fractions.
 
void moleFractionsToMassFractions (span< const double > X, span< double > Y) const
 Converts a mixture composition from mass fractions to mole fractions.
 
string name () const
 Return the name of the phase.
 
void setName (const string &nm)
 Sets the string name for the phase.
 
string elementName (size_t m) const
 Name of the element with index m.
 
size_t elementIndex (const string &name, bool raise=true) const
 Return the index of element named 'name'.
 
const vector< string > & elementNames () const
 Return a read-only reference to the vector of element names.
 
double atomicWeight (size_t m) const
 Atomic weight of element m.
 
double entropyElement298 (size_t m) const
 Entropy of the element in its standard state at 298 K and 1 bar.
 
int atomicNumber (size_t m) const
 Atomic number of element m.
 
int elementType (size_t m) const
 Return the element constraint type Possible types include:
 
int changeElementType (int m, int elem_type)
 Change the element type of the mth constraint Reassigns an element type.
 
span< const double > atomicWeights () const
 Return a read-only reference to the vector of atomic weights.
 
size_t nElements () const
 Number of elements.
 
size_t checkElementIndex (size_t m) const
 Check that the specified element index is in range.
 
double nAtoms (size_t k, size_t m) const
 Number of atoms of element m in species k.
 
size_t speciesIndex (const string &name, bool raise=true) const
 Returns the index of a species named 'name' within the Phase object.
 
string speciesName (size_t k) const
 Name of the species with index k.
 
const vector< string > & speciesNames () const
 Return a const reference to the vector of species names.
 
size_t nSpecies () const
 Returns the number of species in the phase.
 
size_t checkSpeciesIndex (size_t k) const
 Check that the specified species index is in range.
 
void setMoleFractionsByName (const Composition &xMap)
 Set the species mole fractions by name.
 
void setMoleFractionsByName (const string &x)
 Set the mole fractions of a group of species by name.
 
void setMassFractionsByName (const Composition &yMap)
 Set the species mass fractions by name.
 
void setMassFractionsByName (const string &x)
 Set the species mass fractions by name.
 
virtual void setState_TD (double t, double rho)
 Set the internally stored temperature (K) and density (kg/m^3)
 
Composition getMoleFractionsByName (double threshold=0.0) const
 Get the mole fractions by name.
 
double moleFraction (size_t k) const
 Return the mole fraction of a single species.
 
double moleFraction (const string &name) const
 Return the mole fraction of a single species.
 
Composition getMassFractionsByName (double threshold=0.0) const
 Get the mass fractions by name.
 
double massFraction (size_t k) const
 Return the mass fraction of a single species.
 
double massFraction (const string &name) const
 Return the mass fraction of a single species.
 
void getMoleFractions (span< double > x) const
 Get the species mole fraction vector.
 
virtual void setMoleFractions (span< const double > x)
 Set the mole fractions to the specified values.
 
virtual void setMoleFractions_NoNorm (span< const double > x)
 Set the mole fractions to the specified values without normalizing.
 
void getMassFractions (span< double > y) const
 Get the species mass fractions.
 
span< const double > massFractions () const
 Return a view of the mass fraction array.
 
virtual void setMassFractions (span< const double > y)
 Set the mass fractions to the specified values and normalize them.
 
virtual void setMassFractions_NoNorm (span< const double > y)
 Set the mass fractions to the specified values without normalizing.
 
virtual void getConcentrations (span< double > c) const
 Get the species concentrations (kmol/m^3).
 
virtual double concentration (const size_t k) const
 Concentration of species k.
 
virtual void setConcentrations (span< const double > conc)
 Set the concentrations to the specified values within the phase.
 
virtual void setConcentrationsNoNorm (span< const double > conc)
 Set the concentrations without ignoring negative concentrations.
 
double temperature () const
 Temperature (K).
 
virtual double density () const
 Density (kg/m^3).
 
virtual double molarDensity () const
 Molar density (kmol/m^3).
 
virtual double molarVolume () const
 Molar volume (m^3/kmol).
 
virtual void setDensity (const double density_)
 Set the internally stored density (kg/m^3) of the phase.
 
virtual void setTemperature (double temp)
 Set the internally stored temperature of the phase (K).
 
double mean_X (span< const double > Q) const
 Evaluate the mole-fraction-weighted mean of an array Q.
 
double meanMolecularWeight () const
 The mean molecular weight. Units: (kg/kmol)
 
double sum_xlogx () const
 Evaluate \( \sum_k X_k \ln X_k \).
 
size_t addElement (const string &symbol, double weight=-12345.0, int atomicNumber=0, double entropy298=ENTROPY298_UNKNOWN, int elem_type=CT_ELEM_TYPE_ABSPOS)
 Add an element.
 
vector< AnyMapelementDefinitions () const
 Return explicit element definitions needed to reconstruct this phase.
 
void addSpeciesAlias (const string &name, const string &alias)
 Add a species alias (that is, a user-defined alternative species name).
 
void addSpeciesLock ()
 Lock species list to prevent addition of new species.
 
void removeSpeciesLock ()
 Decrement species lock counter.
 
virtual vector< string > findIsomers (const Composition &compMap) const
 Return a vector with isomers names matching a given composition map.
 
virtual vector< string > findIsomers (const string &comp) const
 Return a vector with isomers names matching a given composition string.
 
shared_ptr< Speciesspecies (const string &name) const
 Return the Species object for the named species.
 
shared_ptr< Speciesspecies (size_t k) const
 Return the Species object for species whose index is k.
 
void ignoreUndefinedElements ()
 Set behavior when adding a species containing undefined elements to just skip the species.
 
void addUndefinedElements ()
 Set behavior when adding a species containing undefined elements to add those elements to the phase.
 
void throwUndefinedElements ()
 Set the behavior when adding a species containing undefined elements to throw an exception.
 

Protected Member Functions

void updateThermo () const override
 Update the species reference state thermodynamic functions.
 
void electronEnergyDistributionChanged ()
 When electron energy distribution changed, plasma properties such as electron-collision reaction rates need to be re-evaluated.
 
void electronEnergyLevelChanged ()
 When electron energy level changed, plasma properties such as electron-collision reaction rates need to be re-evaluate.
 
void checkElectronEnergyLevels () const
 Check the electron energy levels.
 
void checkElectronEnergyDistribution () const
 Check the electron energy distribution.
 
void setIsotropicElectronEnergyDistribution ()
 Set isotropic electron energy distribution.
 
void updateElectronTemperatureFromEnergyDist ()
 Update electron temperature (K) From energy distribution.
 
void normalizeElectronEnergyDistribution ()
 Electron energy distribution norm.
 
bool updateInterpolatedCrossSection (size_t k)
 Update interpolated cross section of a collision.
 
void updateElectronEnergyDistDifference ()
 Update electron energy distribution difference.
 
void updateElasticElectronEnergyLossCoefficient (size_t i)
 Updates the elastic electron energy loss coefficient for collision index i.
 
void updateElasticElectronEnergyLossCoefficients ()
 Update elastic electron energy loss coefficients.
 
- Protected Member Functions inherited from IdealGasPhase
virtual void updateThermo () const
 Update the species reference state thermodynamic functions.
 
span< const double > enthalpy_RT_ref () const
 Returns a reference to the dimensionless reference state enthalpy vector.
 
span< const double > gibbs_RT_ref () const
 Returns a reference to the dimensionless reference state Gibbs free energy vector.
 
span< const double > entropy_R_ref () const
 Returns a reference to the dimensionless reference state Entropy vector.
 
span< const double > cp_R_ref () const
 Returns a reference to the dimensionless reference state Heat Capacity vector.
 
virtual void getParameters (AnyMap &phaseNode) const
 Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using the newThermo(AnyMap&) function.
 
- Protected Member Functions inherited from Phase
void assertCompressible (const string &setter) const
 Ensure that phase is compressible.
 
void assignDensity (const double density_)
 Set the internally stored constant density (kg/m^3) of the phase.
 
void setMolecularWeight (const int k, const double mw)
 Set the molecular weight of a single species to a given value.
 
virtual void compositionChanged ()
 Apply changes to the state which are needed after the composition changes.
 

Protected Attributes

double m_isotropicShapeFactor = 1.0
 
size_t m_nPoints = 1001
 Number of points of electron energy levels.
 
Eigen::ArrayXd m_electronEnergyLevels
 electron energy levels [ev]. Length: m_nPoints
 
Eigen::ArrayXd m_electronEnergyDist
 Normalized electron energy distribution vector [-] Length: m_nPoints.
 
size_t m_electronSpeciesIndex = npos
 Index of electron species.
 
double m_electronTemp
 Electron temperature [K].
 
string m_distributionType = "isotropic"
 Electron energy distribution type. Can be "isotropic", "discretized" or "Boltzmann-two-term".
 
string m_quadratureMethod = "simpson"
 Numerical quadrature method for electron energy distribution.
 
bool m_do_normalizeElectronEnergyDist = true
 Flag of normalizing electron energy distribution.
 
vector< size_t > m_kInelastic
 Indices of inelastic collisions in m_crossSections.
 
vector< size_t > m_kElastic
 Indices of elastic collisions in m_crossSections.
 
double m_electricField = 0.0
 electric field [V/m].
 
double m_electricFieldFrequency = 0.0
 electric field freq [Hz].
 
vector< vector< double > > m_crossSections
 Cross section data.
 
vector< vector< double > > m_energyLevels
 Electron energy levels corresponding to the cross section data.
 
Eigen::ArrayXd m_electronEnergyDistDiff
 ionization degree for the electron-electron collisions (tmp is the previous one)
 
vector< double > m_elasticElectronEnergyLossCoefficients
 Elastic electron energy loss coefficients (eV m3/s)
 
- Protected Attributes inherited from IdealGasPhase
double m_p0 = -1.0
 Reference state pressure.
 
vector< double > m_h0_RT
 Temporary storage for dimensionless reference state enthalpies.
 
vector< double > m_cp0_R
 Temporary storage for dimensionless reference state heat capacities.
 
vector< double > m_g0_RT
 Temporary storage for dimensionless reference state Gibbs energies.
 
vector< double > m_s0_R
 Temporary storage for dimensionless reference state entropies.
 
vector< double > m_expg0_RT
 
vector< double > m_pp
 Temporary array containing internally calculated partial pressures.
 
- Protected Attributes inherited from ThermoPhase
MultiSpeciesThermo m_spthermo
 Pointer to the calculation manager for species reference-state thermodynamic properties.
 
AnyMap m_input
 Data supplied via setParameters.
 
double m_phi = 0.0
 Stored value of the electric potential for this phase. Units are Volts.
 
bool m_chargeNeutralityNecessary = false
 Boolean indicating whether a charge neutrality condition is a necessity.
 
int m_ssConvention = cSS_CONVENTION_TEMPERATURE
 Contains the standard state convention.
 
bool m_enforceTemperatureLimits = false
 Whether to enforce temperature limits in iterative solvers.
 
double m_tlast = 0.0
 last value of the temperature processed by reference state
 
std::weak_ptr< Solutionm_soln
 reference to Solution
 
- Protected Attributes inherited from Phase
ValueCache m_cache
 Cached for saved calculations within each ThermoPhase.
 
size_t m_kk = 0
 Number of species in the phase.
 
size_t m_ndim = 3
 Dimensionality of the phase.
 
vector< double > m_speciesComp
 Atomic composition of the species.
 
vector< double > m_speciesCharge
 Vector of species charges.
 
map< string, shared_ptr< Species > > m_species
 Map of Species objects.
 
size_t m_nSpeciesLocks = 0
 Reference counter preventing species addition.
 
UndefElement::behavior m_undefinedElementBehavior = UndefElement::add
 Flag determining behavior when adding species with an undefined element.
 
bool m_caseSensitiveSpecies = false
 Flag determining whether case sensitive species names are enforced.
 
vector< double > m_workS
 Vector of size m_kk, used as a temporary holding area.
 

Private Member Functions

void setCollisions ()
 Set collisions.
 
void addCollision (shared_ptr< Reaction > collision)
 Add a collision and record the target species.
 

Private Attributes

unique_ptr< EEDFTwoTermApproximationm_eedfSolver = nullptr
 Solver used to calculate the EEDF based on electron collision rates.
 
int m_distNum = -1
 Electron energy distribution change variable.
 
int m_levelNum = -1
 Electron energy level change variable.
 
vector< shared_ptr< Reaction > > m_collisions
 The list of shared pointers of plasma collision reactions.
 
vector< shared_ptr< ElectronCollisionPlasmaRate > > m_collisionRates
 The list of shared pointers of collision rates.
 
vector< size_t > m_targetSpeciesIndices
 The collision-target species indices of m_collisions.
 
vector< bool > m_interp_cs_ready
 The list of whether the interpolated cross sections is ready.
 
double m_electronTempEquil = 0.0
 Saved electron temperature during an equilibrium solve.
 
bool m_inEquilibrate = false
 Lock flag (default off)
 
std::vector< double > m_work
 Work array.
 

Constructor & Destructor Documentation

◆ PlasmaPhase()

PlasmaPhase ( const string &  inputFile = "",
const string &  id = "" 
)
explicit

Construct and initialize a PlasmaPhase object directly from an input file.

The constructor initializes the electron energy distribution to be a Maxwellian distribution (m_isotropicShapeFactor = 1.0). The initial electron energy grid is set to a linear space which starts at 0.01 eV and ends at 1 eV with 1000 points.

Parameters
inputFileName of the input file containing the phase definition to set up the object. If blank, an empty phase will be created.
idID of the phase in the input file. Defaults to the empty string.

Definition at line 24 of file PlasmaPhase.cpp.

◆ ~PlasmaPhase()

Definition at line 43 of file PlasmaPhase.cpp.

Member Function Documentation

◆ type()

string type ( ) const
inlineoverridevirtual

String indicating the thermodynamic model implemented.

Usually corresponds to the name of the derived class, less any suffixes such as "Phase", TP", "VPSS", etc.

Since
Starting in Cantera 3.0, the name returned by this method corresponds to the canonical name used in the YAML input format.

Reimplemented from IdealGasPhase.

Definition at line 144 of file PlasmaPhase.h.

◆ initThermo()

void initThermo ( )
overridevirtual

Initialize the ThermoPhase object after all species have been set up.

This method is provided to allow subclasses to perform any initialization required after all species have been added. For example, it might be used to resize internal work arrays that must have an entry for each species. The base class implementation does nothing, and subclasses that do not require initialization do not need to overload this method. Derived classes which do override this function should call their parent class's implementation of this function as their last action.

When importing from an AnyMap phase description (or from a YAML file), setupPhase() adds all the species, stores the input data in m_input, and then calls this method to set model parameters from the data stored in m_input.

Reimplemented from ThermoPhase.

Definition at line 55 of file PlasmaPhase.cpp.

◆ addSpecies()

bool addSpecies ( shared_ptr< Species spec)
overridevirtual

Add a Species to this Phase.

Returns true if the species was successfully added, or false if the species was ignored.

Derived classes which need to size arrays according to the number of species should overload this method. The derived class implementation should call the base class method, and, if this returns true (indicating that the species has been added), adjust their array sizes accordingly.

See also
ignoreUndefinedElements addUndefinedElements throwUndefinedElements

Reimplemented from IdealGasPhase.

Definition at line 95 of file PlasmaPhase.cpp.

◆ setSolution()

void setSolution ( std::weak_ptr< Solution soln)
overridevirtual

Set the link to the Solution object that owns this ThermoPhase.

Parameters
solnWeak pointer to the parent Solution object

Reimplemented from ThermoPhase.

Definition at line 115 of file PlasmaPhase.cpp.

◆ getParameters()

void getParameters ( AnyMap phaseNode) const
overridevirtual

Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using the newThermo(AnyMap&) function.

This does not include user-defined fields available in input().

Reimplemented from ThermoPhase.

Definition at line 126 of file PlasmaPhase.cpp.

◆ setParameters()

void setParameters ( const AnyMap phaseNode,
const AnyMap rootNode = AnyMap() 
)
overridevirtual

Set equation of state parameters from an AnyMap phase description.

Phases that need additional parameters from the root node should override this method.

Reimplemented from ThermoPhase.

Definition at line 146 of file PlasmaPhase.cpp.

◆ electronSpeciesIndex()

size_t electronSpeciesIndex ( ) const
inline

Electron Species Index.

Definition at line 162 of file PlasmaPhase.h.

◆ electronSpeciesName()

string electronSpeciesName ( ) const
inline

Electron species name.

Definition at line 167 of file PlasmaPhase.h.

◆ setElectronEnergyLevels()

void setElectronEnergyLevels ( span< const double >  levels)

Set electron energy levels.

Parameters
levelsThe vector of electron energy levels [eV]. Length: m_nPoints.

Definition at line 327 of file PlasmaPhase.cpp.

◆ getElectronEnergyLevels()

void getElectronEnergyLevels ( span< double >  levels) const
inline

Get electron energy levels.

Parameters
levelsThe vector of electron energy levels [eV]. Length: m_nPoints

Definition at line 182 of file PlasmaPhase.h.

◆ setDiscretizedElectronEnergyDist()

void setDiscretizedElectronEnergyDist ( span< const double >  levels,
span< const double >  distrb 
)

Set discretized electron energy distribution.

Parameters
levelsThe vector of electron energy levels [eV]. Length: m_nPoints.
distrbThe vector of electron energy distribution. Length: m_nPoints.

Definition at line 382 of file PlasmaPhase.cpp.

◆ getElectronEnergyDistribution()

void getElectronEnergyDistribution ( span< double >  distrb) const
inline

Get electron energy distribution.

Parameters
distrbThe vector of electron energy distribution. Length: m_nPoints.

Definition at line 197 of file PlasmaPhase.h.

◆ setIsotropicShapeFactor()

void setIsotropicShapeFactor ( double  x)

Set the shape factor of isotropic electron energy distribution.

Note that \( x = 1 \) and \( x = 2 \) correspond to the Maxwellian and Druyvesteyn distribution, respectively.

Parameters
xThe shape factor

Definition at line 420 of file PlasmaPhase.cpp.

◆ isotropicShapeFactor()

double isotropicShapeFactor ( ) const
inline

The shape factor of isotropic electron energy distribution.

Definition at line 208 of file PlasmaPhase.h.

◆ electronTemperature()

double electronTemperature ( ) const
inlineoverridevirtual

Electron Temperature [K].

Returns
The electron temperature of the phase.

Reimplemented from Phase.

Definition at line 214 of file PlasmaPhase.h.

◆ setElectronTemperature()

void setElectronTemperature ( double  Te)
overridevirtual

Set the internally stored electron temperature of the phase [K].

Parameters
TeElectron temperature in Kelvin.

Reimplemented from Phase.

Definition at line 291 of file PlasmaPhase.cpp.

◆ meanElectronEnergy()

double meanElectronEnergy ( ) const
inline

Mean electron energy [eV].

Definition at line 222 of file PlasmaPhase.h.

◆ setMeanElectronEnergy()

void setMeanElectronEnergy ( double  energy)

Set mean electron energy [eV].

This method also sets electron temperature accordingly.

Definition at line 323 of file PlasmaPhase.cpp.

◆ electronEnergyDistributionType()

string electronEnergyDistributionType ( ) const
inline

Get electron energy distribution type.

Definition at line 231 of file PlasmaPhase.h.

◆ setElectronEnergyDistributionType()

void setElectronEnergyDistributionType ( const string &  type)

Set electron energy distribution type.

Definition at line 264 of file PlasmaPhase.cpp.

◆ quadratureMethod()

string quadratureMethod ( ) const
inline

Numerical quadrature method. Method: m_quadratureMethod.

Definition at line 239 of file PlasmaPhase.h.

◆ setQuadratureMethod()

void setQuadratureMethod ( const string &  method)
inline

Set numerical quadrature method for integrating electron energy distribution function.

Method: m_quadratureMethod

Definition at line 245 of file PlasmaPhase.h.

◆ enableNormalizeElectronEnergyDist()

void enableNormalizeElectronEnergyDist ( bool  enable)
inline

Set flag of automatically normalize electron energy distribution.

Flag: m_do_normalizeElectronEnergyDist

Definition at line 251 of file PlasmaPhase.h.

◆ normalizeElectronEnergyDistEnabled()

bool normalizeElectronEnergyDistEnabled ( ) const
inline

Flag of automatically normalize electron energy distribution.

Flag: m_do_normalizeElectronEnergyDist

Definition at line 257 of file PlasmaPhase.h.

◆ nElectronEnergyLevels()

size_t nElectronEnergyLevels ( ) const
inline

Number of electron levels.

Definition at line 262 of file PlasmaPhase.h.

◆ nCollisions()

size_t nCollisions ( ) const
inline

Number of electron collision cross sections.

Definition at line 267 of file PlasmaPhase.h.

◆ collision()

const shared_ptr< Reaction > collision ( size_t  i) const
inline

Get the Reaction object associated with electron collision i.

Since
New in Cantera 3.2.

Definition at line 273 of file PlasmaPhase.h.

◆ collisionRate()

const shared_ptr< ElectronCollisionPlasmaRate > collisionRate ( size_t  i) const
inline

Get the ElectronCollisionPlasmaRate object associated with electron collision i.

Since
New in Cantera 3.2.

Definition at line 280 of file PlasmaPhase.h.

◆ updateElectronEnergyDistribution()

void updateElectronEnergyDistribution ( )

Update the electron energy distribution.

Definition at line 216 of file PlasmaPhase.cpp.

◆ distributionNumber()

int distributionNumber ( ) const
inline

Return the distribution number m_distNum.

Definition at line 288 of file PlasmaPhase.h.

◆ levelNumber()

int levelNumber ( ) const
inline

Return the electron energy level number m_levelNum.

Definition at line 293 of file PlasmaPhase.h.

◆ kInelastic()

const vector< size_t > & kInelastic ( ) const
inline

Get the indicies for inelastic electron collisions.

Since
New in Cantera 3.2.

Definition at line 299 of file PlasmaPhase.h.

◆ kElastic()

const vector< size_t > & kElastic ( ) const
inline

Get the indices for elastic electron collisions.

Since
New in Cantera 3.2.

Definition at line 305 of file PlasmaPhase.h.

◆ targetIndex()

size_t targetIndex ( size_t  i) const
inline

Return the target of a specific process.

Since
New in Cantera 3.2.

Definition at line 311 of file PlasmaPhase.h.

◆ electricFieldFrequency()

double electricFieldFrequency ( ) const
inline

Get the frequency of the applied electric field [Hz].

Since
New in Cantera 3.2.

Definition at line 317 of file PlasmaPhase.h.

◆ electricField()

double electricField ( ) const
inline

Get the applied electric field strength [V/m].

Definition at line 322 of file PlasmaPhase.h.

◆ setElectricField()

void setElectricField ( double  E)
inline

Set the absolute electric field strength [V/m].

Definition at line 327 of file PlasmaPhase.h.

◆ reducedElectricField()

double reducedElectricField ( ) const
inline

Calculate the degree of ionization.

Get the reduced electric field strength [V·m²].

Definition at line 339 of file PlasmaPhase.h.

◆ setReducedElectricField()

void setReducedElectricField ( double  EN)
inline

Set reduced electric field given in [V·m²].

Definition at line 344 of file PlasmaPhase.h.

◆ electronMobility()

double electronMobility ( ) const

The electron mobility (m²/V/s)

\[ \mu = \nu_d / E, \]

where \( \nu_d \) is the drift velocity (m²/s), and \( E \) is the electric field strength (V/m).

Definition at line 640 of file PlasmaPhase.cpp.

◆ elasticPowerLoss()

double elasticPowerLoss ( )

The elastic power loss [J/s/m³].

\[ P_k = N_A N_A C_e e \sum_k C_k K_k, \]

where \( C_k \) and \( C_e \) are the concentration (kmol/m³) of the target species and electrons, respectively. \( K_k \) is the elastic electron energy loss coefficient (eV-m³/s).

Definition at line 613 of file PlasmaPhase.cpp.

◆ jouleHeatingPower()

double jouleHeatingPower ( ) const

The joule heating power (W/m³)

\[ q_J = \sigma * E^2, \]

where \( \sigma \) is the conductivity (S/m), defined by:

\[ \sigma = e * n_e * \mu_e \]

and \( E \) is the electric field strength (V/m).

Definition at line 881 of file PlasmaPhase.cpp.

◆ beginEquilibrate()

void beginEquilibrate ( )
overridevirtual

Hook called at the beginning of an equilibrium calculation on this phase.

Non-equilibrium phase models can override this to adjust internal state while an equilibrium solver is active (e.g., locking the electron temperature to the gas temperature).

Since
New in Cantera 4.0.

Reimplemented from ThermoPhase.

Definition at line 300 of file PlasmaPhase.cpp.

◆ endEquilibrate()

void endEquilibrate ( )
overridevirtual

Hook called at the end of an equilibrium calculation on this phase.

Any changes made in beginEquilibrate() are undone here.

Since
New in Cantera 4.0.

Reimplemented from ThermoPhase.

Definition at line 312 of file PlasmaPhase.cpp.

◆ intrinsicHeating()

double intrinsicHeating ( )
overridevirtual

Intrinsic volumetric heating rate [W/m³].

Returns the power density generated by internal processes within this phase (e.g., Joule heating in a plasma). The default implementation returns zero, and phases that don't have intrinsic heating don't override this method.

Since
New in Cantera 4.0.

Reimplemented from ThermoPhase.

Definition at line 900 of file PlasmaPhase.cpp.

◆ enthalpy_mole()

double enthalpy_mole ( ) const
overridevirtual

Return the Molar enthalpy. Units: J/kmol.

For an ideal gas mixture with electrons at a different temperature than the heavy species, the molar enthalpy is calculated as:

\[ \begin{align} \hat h(T, T_\text{e}) &= \sum_{k} X_k h^0_k(T_k) \\ &= \sum_{k \neq e} X_k h^0_k(T) + X_\text{e} h_\text{e}^0(T_\text{e}) \end{align} \]

where heavy-species properties are evaluated at \( T \), electron properties at \( T_\text{e} \), and \( P \) is the total pressure of the mixture. For an ideal gas, enthalpy is independent of pressure. The standard-state pure-species enthalpies \( h^0_k(T_k) \) are computed by the species thermodynamic property manager.

Reimplemented from IdealGasPhase.

Definition at line 656 of file PlasmaPhase.cpp.

◆ entropy_mole()

double entropy_mole ( ) const
overridevirtual

Return the molar entropy. Units: J/kmol/K.

For an ideal gas mixture with electrons at a different temperature than the heavy species, the molar entropy is calculated as:

\[ \hat s(T,T_\text{e},P) = \sum_k X_k \hat s^0_k(T_k) - \hat R \ln \frac{P}{P^0} \]

where heavy-species properties are evaluated at \( T \), electron properties at \( T_\text{e} \), and \( P \) is the total pressure of the mixture.

Reimplemented from IdealGasPhase.

Definition at line 678 of file PlasmaPhase.cpp.

◆ gibbs_mole()

double gibbs_mole ( ) const
overridevirtual

Return the molar Gibbs free energy. Units: J/kmol.

For an ideal gas mixture with electrons at a different temperature than the heavy species, the molar Gibbs free energy is calculated as:

\[ \begin{align} \hat g(T,T_\text{e},P) &= \sum_{k} X_k \tilde{g}_k(T_k, P) = \sum_{k} X_k \mu_k(T_k, P) \\ &= \sum_{k} X_k \left[\mu^0_k(T_k) + R T_k \ln \left( \frac{X_k P}{P^0} \right) \right] \\ \end{align} \]

where heavy-species properties are evaluated at \( T \), electron properties at \( T_\text{e} \), and \( P \) is the total pressure of the mixture.

Reimplemented from ThermoPhase.

Definition at line 689 of file PlasmaPhase.cpp.

◆ intEnergy_mole()

double intEnergy_mole ( ) const
overridevirtual

Return the molar internal energy. Units: J/kmol.

For an ideal gas mixture with electrons at a different temperature than the heavy species, the molar internal energy is calculated as:

\[ \hat u(T,T_\text{e},P) = \sum_{k} X_k \tilde{u}_k(T_k) = \sum_{k} X_k (\tilde{h}_k(T_k) - R T_k) \]

where heavy-species properties are evaluated at \( T \), electron properties at \( T_\text{e} \), and \( P \) is the total pressure of the mixture. For an ideal gas, internal energy is independent of pressure.

Reimplemented from ThermoPhase.

Definition at line 667 of file PlasmaPhase.cpp.

◆ meanTemperature()

double meanTemperature ( ) const

Return the mean temperature of the plasma phase. Units: K.

In a plasma phase, the electron temperature can differ from the heavy-species (gas) temperature. Therefore, the mean temperature is defined as a mole-fraction-weighted average of the electron and heavy-species temperatures:

\[ \begin{align} \overline{T} &= \sum_{k \neq e} X_k T + X_\text{e} T_\text{e} \\ &= (1 - X_\text{e}) T + X_\text{e} T_\text{e} \\ &= T + X_\text{e} (T_\text{e} - T) \end{align} \]

See the pressure() method for usage of the mean temperature in calculating the pressure of the plasma phase.

Definition at line 704 of file PlasmaPhase.cpp.

◆ pressure()

double pressure ( ) const
overridevirtual

Return the pressure of the plasma phase. Units: Pa.

The pressure of the plasma phase is calculated using the mean temperature, which is a mole-fraction-weighted average of the electron and heavy-species temperatures.

\[ \begin{align} P &= \sum_k n_k k_\text{B} T_k \\ &= \sum_{k \neq e} n_k k_\text{B} T + n_\text{e} k_\text{B} T_\text{e} \\ &= (n_\text{total} - n_\text{e}) k_\text{B} T + n_\text{e} k_\text{B} T_\text{e} \\ &= n_\text{total} (1 - X_\text{e}) k_\text{B} T + n_\text{total} X_\text{e} k_\text{B} T_\text{e} \\ &= n_\text{total} k_\text{B} \overline{T} \\ \end{align} \]

where \( \overline{T} \) is the mean temperature of the plasma phase, defined in the meanTemperature() method. Here, \( n_k \) is the number density of species k [in 1/m³], \( n_\text{total} \) is the total number density of the phase [in 1/m³], \( X_\text{e} \) is the mole fraction of electrons, \( T \) is the heavy-species (gas) temperature [K], \( T_\text{e} \) is the electron temperature [K], and \( k_\text{B} \) is the Boltzmann constant [J/K].

The number density times Boltzmann constant can be expressed as \( n_\text{total} k_\text{B} = C_\text{total} R \), where \( C_\text{total} \) is the total molar concentration of the phase [kmol/m³] and \( R \) is the gas constant [J/kmol/K], so that:

\[ P = C_\text{total} R \overline{T}. \]

Here, the pressure is set via the density, via:

\[ P = R \overline{T} \frac{\rho}{\overline{W}} \]

where \( \overline{W} \) is the mean molecular weight.

Reimplemented from IdealGasPhase.

Definition at line 712 of file PlasmaPhase.cpp.

◆ setPressure()

void setPressure ( double  p)
inlineoverridevirtual

Set the pressure at constant temperature and composition. Units: Pa.

This method is implemented by setting the mass density to

\[ \rho = \frac{P \overline{W}}{\hat R \overline{T} }. \]

where \( \overline{W} \) is the mean molecular weight, and \( \overline{T} \) is the mean temperature (see meanTemperature()).

Parameters
pPressure [Pa].

Reimplemented from IdealGasPhase.

Definition at line 532 of file PlasmaPhase.h.

◆ RTe()

double RTe ( ) const
inline

Return the Gas Constant multiplied by the current electron temperature [J/kmol].

Definition at line 537 of file PlasmaPhase.h.

◆ electronPressure()

virtual double electronPressure ( ) const
inlinevirtual

Return the electron pressure. Units: Pa.

The partial pressure of electrons is calculated using the electron temperature:

\[ P_\text{e} = n_\text{e} k_\text{B} T_\text{e} = C_\text{e} R T_\text{e}, \]

where \( n_\text{e} \) is the particular density of electrons [in 1/m³], \( k_\text{B} \) is the Boltzmann constant [J/K], \( C_\text{e} \) is the molar concentration of electrons [in kmol/m³], \( R \) is the gas constant [J/kmol/K], and \( T_\text{e} \) is the electron temperature [K].

Definition at line 553 of file PlasmaPhase.h.

◆ thermalExpansionCoeff()

double thermalExpansionCoeff ( ) const
inlineoverridevirtual

Raise NotImplementedError, as there is an ambiguity on the temperature to use.

Reimplemented from IdealGasPhase.

Definition at line 559 of file PlasmaPhase.h.

◆ soundSpeed()

double soundSpeed ( ) const
inlineoverridevirtual

Raise NotImplementedError, as there is an ambiguity on the temperature to use.

Reimplemented from IdealGasPhase.

Definition at line 564 of file PlasmaPhase.h.

◆ standardConcentration()

double standardConcentration ( size_t  k = 0) const
overridevirtual

Returns the standard concentration \( C^0_k \), which is used to normalize the generalized concentration.

Units: m³/kmol.

The standard concentration is chosen to be equal to

\[ C^0_k = \frac{P}{R T} \]

where \( P \) is the total pressure of the mixture, \( R \) is the gas constant, and \( T \) is the gas temperature.

Note
The gas temperature \( T \) (not the electron temperature or the mean temperature) is used for all species, including electrons. Consequently \( C^0_\text{e} = P/RT \neq 1/V^0_\text{e} = P/R T_\text{e} \) when \( T_\text{e} \neq T \). This is intentional: the reciprocal relation \( C^0_k = 1/V^0_k \) is a coincidence of the single-temperature ideal gas and is not a thermodynamic requirement. See the class documentation.
Parameters
kParameter indicating the species. The default is to assume this refers to species 0.

Reimplemented from IdealGasPhase.

Definition at line 721 of file PlasmaPhase.cpp.

◆ getActivities()

void getActivities ( span< double >  a) const
overridevirtual

Get the array of non-dimensional activities at the current solution temperature, pressure, and solution concentration.

Since \( a_k = C^a_k / C^0_k \), where \( C^a_k = C_k \) is the true molar concentration, and \( C^0_k \) is the standard concentration defined above, the activities are equal to \( a_k = X_k T / \overline{T} \).

Note
These activities are defined for consistency with the kinetics (law-of-mass-action) concentrations and, when \( T_\text{e} \neq T \), differ by a factor of \( T/\overline{T} \) from the activities implied by the chemical-potential model ( \( a_k = X_k \)). See the class documentation for a discussion of this intentional inconsistency.
Parameters
aOutput vector of activities. Length: m_kk.

Reimplemented from ThermoPhase.

Definition at line 726 of file PlasmaPhase.cpp.

◆ getActivityCoefficients()

void getActivityCoefficients ( span< double >  ac) const
overridevirtual

Get the array of non-dimensional activity coefficients at the current solution temperature, pressure, and solution concentration.

The activity coefficients are defined by \( \gamma_k = a_k / X_k \). With the current definition of the activities, the activity coefficients are equal to \( \gamma_k = T / \overline{T} \).

Parameters
acOutput vector of activity coefficients. Length: m_kk.

Reimplemented from IdealGasPhase.

Definition at line 734 of file PlasmaPhase.cpp.

◆ getChemPotentials()

void getChemPotentials ( span< double >  mu) const
overridevirtual

Return the chemical potentials of the species in the solution. Units: J/kmol.

The chemical potential of species k is calculated as:

\[ \begin{align} \mu_k(T_k, X_k, P) &= \mu_k^o(T_k, P) + R T_k \ln(X_k) \\ &= \mu^0_k(T_k)(T_k) + R T_k \ln\left(\frac{P}{P^0}\right) + R T_k \ln(X_k) \\ &= h^0_k(T_k) - T_k s^0_k(T_k) + R T_k \ln\left(\frac{P X_k}{P^0}\right) \\ \end{align} \]

Note that it is also equal to the partial molar Gibbs free energy.

Reimplemented from IdealGasPhase.

Definition at line 748 of file PlasmaPhase.cpp.

◆ getPartialMolarEnthalpies()

void getPartialMolarEnthalpies ( span< double >  hbar) const
overridevirtual

Return the partial molar enthalpies of the species in the solution. Units: J/kmol.

The partial molar enthalpy of species k is \( \tilde{h}_k(T_k,P) = h^o_k(T,P) = h^{ref}_k(T_k) \), where heavy-species properties are evaluated at the gas temperature \( T \), and electron properties are evaluated at the electron temperature \( T_e \).

Reimplemented from IdealGasPhase.

Definition at line 756 of file PlasmaPhase.cpp.

◆ getPartialMolarEntropies()

void getPartialMolarEntropies ( span< double >  sbar) const
overridevirtual

Return the partial molar entropies of the species in the solution. Units: J/kmol/K.

The partial molar enthalpy of species k is:

\[ \tilde{s}_k(T_k, P) = s^0_k(T_k) - R \ln \frac{X_k P}{P^0} \]

where heavy-species properties are evaluated at the gas temperature, and electron properties are evaluated at the electron temperature. Here, \( P \) is the total pressure of the mixture, as defined in pressure().

Reimplemented from IdealGasPhase.

Definition at line 768 of file PlasmaPhase.cpp.

◆ getPartialMolarIntEnergies()

void getPartialMolarIntEnergies ( span< double >  ubar) const
overridevirtual

Return the partial molar internal energies of the species in the solution. Units: J/kmol.

The partial molar internal energy of species k is calculated as:

\[ \tilde{u}_k(T_k,P) = \tilde{h}_k(T_k,P) - R T_k = h^{ref}_k(T_k) - R T_k \]

where \( \tilde{h}_k \) is the partial molar enthalpy of species k, and \( T_k \) is the temperature at which the partial molar enthalpy is evaluated. For heavy species, the partial molar enthalpy is evaluated at the gas temperature, while for electrons, it is evaluated at the electron temperature.

Reimplemented from IdealGasPhase.

Definition at line 778 of file PlasmaPhase.cpp.

◆ getPartialMolarVolumes()

void getPartialMolarVolumes ( span< double >  vbar) const
overridevirtual

Return the partial molar volumes of the species in the solution. Units: m³/kmol.

For a multitemperature system,

\[ v_k = \frac{R T_k}{P} \]

where \( T_k \) is the temperature at which the partial molar enthalpy is evaluated.

Reimplemented from IdealGasPhase.

Definition at line 790 of file PlasmaPhase.cpp.

◆ getStandardChemPotentials()

void getStandardChemPotentials ( span< double >  muStar) const
overridevirtual

Return the standard chemical potentials of the species. Units: J/kmol.

The standard chemical potentials (or standard state Gibbs free energy) of species k is calculated as:

\[ \begin{align} \mu^0_k(T_k, X_k, P) &= mu^0_k(T_k)(T_k) + R T_k \ln\left(\frac{P}{P^0}\right) \\ &= h^0_k(T_k) - T_k s^0_k(T_k) + R T_k \ln\left(\frac{P X_k}{P^0}\right) \\ \end{align} \]

Here, \( P \) is the total pressure of the mixture, as defined in pressure().

Reimplemented from IdealGasPhase.

Definition at line 803 of file PlasmaPhase.cpp.

◆ getStandardVolumes()

void getStandardVolumes ( span< double >  vol) const
overridevirtual

Return the standard molar volumes of the species. Units: m³/kmol.

For a multitemperature system,

\[ v_k = \frac{R T_k}{P}, \]

where \( T_k \) is the temperature at which the standard molar volume is evaluated.

Reimplemented from IdealGasPhase.

Definition at line 821 of file PlasmaPhase.cpp.

◆ getGibbs_ref()

void getGibbs_ref ( span< double >  g) const
overridevirtual

Return the reference chemical potentials of the species. Units: J/kmol.

The reference chemical potentials (or reference state Gibbs free energy) of species k is calculated as:

\[ \mu^0_k(T_k) = h^0_k(T_k) - T_k s^0_k(T_k) \]

Reimplemented from IdealGasPhase.

Definition at line 834 of file PlasmaPhase.cpp.

◆ getStandardVolumes_ref()

void getStandardVolumes_ref ( span< double >  vol) const
overridevirtual

Return the molar volumes of the species reference states. Units: m³/kmol.

The molar volumes of the species reference states of species k is calculated as:

\[ v^o_k(T_k) = \frac{R T_k}{P^0} \]

Parameters
volOutput vector containing the standard state volumes. Length: m_kk.

Reimplemented from IdealGasPhase.

Definition at line 846 of file PlasmaPhase.cpp.

◆ setState()

void setState ( const AnyMap state)
overridevirtual

Set the state using an AnyMap containing any combination of properties supported by the thermodynamic model.

Accepted keys are:

  • X (mole fractions)
  • Y (mass fractions)
  • T or Tg or gas-temperature [K]
  • Te or electron-temperature [K]
  • P or pressure [Pa]
  • H or enthalpy [J/kg]
  • U or internal-energy [J/kg]
  • S or entropy [J/kg/K]
  • V or specific-volume [m^3/kg]
  • D or density [kg/m^3]

Composition can be specified as either an AnyMap of species names to values or as a composition string. All other values can be given as floating point values in Cantera's default units, or as strings with the units specified, which will be converted using the Units class.

If no thermodynamic property pair is given, or only one of temperature or pressure is given, then 298.15 K and 101325 Pa will be used as necessary to fully set the state.

Set the electron temperature first, and call ThermoPhase::setState.

Reimplemented from ThermoPhase.

Definition at line 856 of file PlasmaPhase.cpp.

◆ updateThermo()

void updateThermo ( ) const
overrideprotectedvirtual

Update the species reference state thermodynamic functions.

This method is called each time a thermodynamic property is requested, to check whether the internal species properties within the object need to be updated (like getPartialMolarCp, getEnthalpy_RT, getEntropy_R, getGibbs_RT, getIntEnergy_RT, getCp_R, and getEnthalpy_RT_ref and alike). Currently, this updates the species thermo polynomial values for the current value of the gas temperature for heavy species, and of the electron temperature for the electron species. A check is made to see if gas or electron temperatures have changed since the last evaluation. This object does not contain any persistent data that depends on the concentration, that needs to be updated. The state object modifies its concentration dependent information at the time the setMoleFractions() (or equivalent) call is made.

Reimplemented from IdealGasPhase.

Definition at line 66 of file PlasmaPhase.cpp.

◆ electronEnergyDistributionChanged()

void electronEnergyDistributionChanged ( )
protected

When electron energy distribution changed, plasma properties such as electron-collision reaction rates need to be re-evaluated.

Definition at line 336 of file PlasmaPhase.cpp.

◆ electronEnergyLevelChanged()

void electronEnergyLevelChanged ( )
protected

When electron energy level changed, plasma properties such as electron-collision reaction rates need to be re-evaluate.

In addition, the cross-sections need to be interpolated at the new level.

Definition at line 341 of file PlasmaPhase.cpp.

◆ checkElectronEnergyLevels()

void checkElectronEnergyLevels ( ) const
protected

Check the electron energy levels.

The values of electron energy levels need to be positive and monotonically increasing.

Definition at line 354 of file PlasmaPhase.cpp.

◆ checkElectronEnergyDistribution()

void checkElectronEnergyDistribution ( ) const
protected

Check the electron energy distribution.

This method check the electron energy distribution for the criteria below.

  1. The values of electron energy distribution cannot be negative.
  2. If the last value of electron energy distribution is larger than 0.01, it will raise a warning to suggest using a higher electron energy levels.

Definition at line 365 of file PlasmaPhase.cpp.

◆ setIsotropicElectronEnergyDistribution()

void setIsotropicElectronEnergyDistribution ( )
protected

Set isotropic electron energy distribution.

Definition at line 276 of file PlasmaPhase.cpp.

◆ updateElectronTemperatureFromEnergyDist()

void updateElectronTemperatureFromEnergyDist ( )
protected

Update electron temperature (K) From energy distribution.

m_electronTemp

Definition at line 400 of file PlasmaPhase.cpp.

◆ normalizeElectronEnergyDistribution()

void normalizeElectronEnergyDistribution ( )
protected

Electron energy distribution norm.

Definition at line 252 of file PlasmaPhase.cpp.

◆ updateInterpolatedCrossSection()

bool updateInterpolatedCrossSection ( size_t  k)
protected

Update interpolated cross section of a collision.

Definition at line 521 of file PlasmaPhase.cpp.

◆ updateElectronEnergyDistDifference()

void updateElectronEnergyDistDifference ( )
protected

Update electron energy distribution difference.

Definition at line 533 of file PlasmaPhase.cpp.

◆ updateElasticElectronEnergyLossCoefficient()

void updateElasticElectronEnergyLossCoefficient ( size_t  i)
protected

Updates the elastic electron energy loss coefficient for collision index i.

Calculates the elastic energy loss coefficient using the current electron energy distribution and cross sections.

Definition at line 590 of file PlasmaPhase.cpp.

◆ updateElasticElectronEnergyLossCoefficients()

void updateElasticElectronEnergyLossCoefficients ( )
protected

Update elastic electron energy loss coefficients.

Used by elasticPowerLoss() and other plasma property calculations that depends on m_elasticElectronEnergyLossCoefficients. This function calls updateInterpolatedCrossSection() before calling updateElasticElectronEnergyLossCoefficient()

Definition at line 559 of file PlasmaPhase.cpp.

◆ setCollisions()

void setCollisions ( )
private

Set collisions.

This function sets the list of collisions and the list of target species using addCollision.

Definition at line 425 of file PlasmaPhase.cpp.

◆ addCollision()

void addCollision ( shared_ptr< Reaction collision)
private

Add a collision and record the target species.

Definition at line 459 of file PlasmaPhase.cpp.

Member Data Documentation

◆ m_isotropicShapeFactor

double m_isotropicShapeFactor = 1.0
protected

Definition at line 852 of file PlasmaPhase.h.

◆ m_nPoints

size_t m_nPoints = 1001
protected

Number of points of electron energy levels.

Definition at line 855 of file PlasmaPhase.h.

◆ m_electronEnergyLevels

Eigen::ArrayXd m_electronEnergyLevels
protected

electron energy levels [ev]. Length: m_nPoints

Definition at line 858 of file PlasmaPhase.h.

◆ m_electronEnergyDist

Eigen::ArrayXd m_electronEnergyDist
protected

Normalized electron energy distribution vector [-] Length: m_nPoints.

Definition at line 862 of file PlasmaPhase.h.

◆ m_electronSpeciesIndex

size_t m_electronSpeciesIndex = npos
protected

Index of electron species.

Definition at line 865 of file PlasmaPhase.h.

◆ m_electronTemp

double m_electronTemp
protected

Electron temperature [K].

Definition at line 868 of file PlasmaPhase.h.

◆ m_distributionType

string m_distributionType = "isotropic"
protected

Electron energy distribution type. Can be "isotropic", "discretized" or "Boltzmann-two-term".

Definition at line 871 of file PlasmaPhase.h.

◆ m_quadratureMethod

string m_quadratureMethod = "simpson"
protected

Numerical quadrature method for electron energy distribution.

Definition at line 874 of file PlasmaPhase.h.

◆ m_do_normalizeElectronEnergyDist

bool m_do_normalizeElectronEnergyDist = true
protected

Flag of normalizing electron energy distribution.

Definition at line 877 of file PlasmaPhase.h.

◆ m_kInelastic

vector<size_t> m_kInelastic
protected

Indices of inelastic collisions in m_crossSections.

Definition at line 880 of file PlasmaPhase.h.

◆ m_kElastic

vector<size_t> m_kElastic
protected

Indices of elastic collisions in m_crossSections.

Definition at line 883 of file PlasmaPhase.h.

◆ m_electricField

double m_electricField = 0.0
protected

electric field [V/m].

Definition at line 886 of file PlasmaPhase.h.

◆ m_electricFieldFrequency

double m_electricFieldFrequency = 0.0
protected

electric field freq [Hz].

Definition at line 889 of file PlasmaPhase.h.

◆ m_crossSections

vector<vector<double> > m_crossSections
protected

Cross section data.

m_crossSections[i][j], where i is the specific process, j is the index of vector. Unit: [m^2]

Definition at line 893 of file PlasmaPhase.h.

◆ m_energyLevels

vector<vector<double> > m_energyLevels
protected

Electron energy levels corresponding to the cross section data.

m_energyLevels[i][j], where i is the specific process, j is the index of vector. Unit: [eV]

Definition at line 897 of file PlasmaPhase.h.

◆ m_electronEnergyDistDiff

Eigen::ArrayXd m_electronEnergyDistDiff
protected

ionization degree for the electron-electron collisions (tmp is the previous one)

Electron energy distribution Difference dF/dε (V^-5/2)

Definition at line 903 of file PlasmaPhase.h.

◆ m_elasticElectronEnergyLossCoefficients

vector<double> m_elasticElectronEnergyLossCoefficients
protected

Elastic electron energy loss coefficients (eV m3/s)

The elastic electron energy loss coefficient for species k is,

\[ K_k = \frac{2 m_e}{m_k} \sqrt{\frac{2 e}{m_e}} \int_0^{\infty} \sigma_k \epsilon^2 \left( F_0 + \frac{k_\text{B} T}{e} \frac{\partial F_0}{\partial \epsilon} \right) d \epsilon, \]

where \( m_e \) [kg] is the electron mass, \( \epsilon \) [V] is the electron energy, \( \sigma_k \) [m2] is the reaction collision cross section, \( F_0 \) [V^(-3/2)] is the normalized electron energy distribution function.

Definition at line 916 of file PlasmaPhase.h.

◆ m_eedfSolver

unique_ptr<EEDFTwoTermApproximation> m_eedfSolver = nullptr
private

Solver used to calculate the EEDF based on electron collision rates.

Definition at line 935 of file PlasmaPhase.h.

◆ m_distNum

int m_distNum = -1
private

Electron energy distribution change variable.

Whenever m_electronEnergyDist changes, this int is incremented.

Definition at line 939 of file PlasmaPhase.h.

◆ m_levelNum

int m_levelNum = -1
private

Electron energy level change variable.

Whenever m_electronEnergyLevels changes, this int is incremented.

Definition at line 943 of file PlasmaPhase.h.

◆ m_collisions

vector<shared_ptr<Reaction> > m_collisions
private

The list of shared pointers of plasma collision reactions.

Definition at line 946 of file PlasmaPhase.h.

◆ m_collisionRates

vector<shared_ptr<ElectronCollisionPlasmaRate> > m_collisionRates
private

The list of shared pointers of collision rates.

Definition at line 949 of file PlasmaPhase.h.

◆ m_targetSpeciesIndices

vector<size_t> m_targetSpeciesIndices
private

The collision-target species indices of m_collisions.

Definition at line 952 of file PlasmaPhase.h.

◆ m_interp_cs_ready

vector<bool> m_interp_cs_ready
private

The list of whether the interpolated cross sections is ready.

Definition at line 955 of file PlasmaPhase.h.

◆ m_electronTempEquil

double m_electronTempEquil = 0.0
private

Saved electron temperature during an equilibrium solve.

Definition at line 965 of file PlasmaPhase.h.

◆ m_inEquilibrate

bool m_inEquilibrate = false
private

Lock flag (default off)

Definition at line 968 of file PlasmaPhase.h.

◆ m_work

std::vector<double> m_work
mutableprivate

Work array.

Definition at line 971 of file PlasmaPhase.h.


The documentation for this class was generated from the following files: