rizer.io.generate_janev_cross_section#
Generates Janev cross section in LXCat format (understandable by Bolsig+).
Janev cross sections informations can be found in [Janev2002] and [Janev2004]. They have been digitized and stored in JSON files, in ./data/kin/janev_cross_section_parameters.
Attributes#
Classes#
Class to generate Janev cross sections in LXCat format, for hydrocarbons CxHy, 0⩽x⩽3, 0⩽y⩽8. |
Module Contents#
- class rizer.io.generate_janev_cross_section.JanevCrossSection(energy_min: float = 1, energy_max: float = 1000.0, number_of_points: int = 100)#
Class to generate Janev cross sections in LXCat format, for hydrocarbons CxHy, 0⩽x⩽3, 0⩽y⩽8.
Janev cross sections informations can be found in [Janev2002] and [Janev2004].
- Parameters:
energy_min (
float, optional) – The minimum energy, in eV, by default 0.01.energy_max (
float, optional) – The maximum energy, in eV, by default 100.number_of_points (
int, optional) – The number of points, by default 100.
- LX#
LXCat cross section writer
- load_all_cross_sections() None#
Load all Janev cross section parameters and compute the cross sections.
Load all Janev cross section parameters and compute the cross sections for the following reactions:
Neutral CxHy ionization (I + DI)
Ion CxHy ionization (DI+)
Neutral CxHy dissociative excitation (DE)
Ion CxHy dissociative excitation (DE+)
Neutral CxHy dissociative recombination (DR)
- load_reaction_rates(which_one='all') dict[str, float]#
Load the reaction rates for the C2Hy and C3Hy DR reactions.
Load the reaction rates for the C2Hy and C3Hy DR reactions, using the Janev formula.
These reaction rate are approximated by an Arrehnius law (no correcting factor due to Cantera inability to handle i with electron temperature):
\[k(T) = A \cdot T^{-0.5}\]The pre-exponential factor \(A\) is in cm3/moles/s. The exponent of the temperature is always -0.5.
- Parameters:
which_one (
str, optional) – Which reaction rate to load, by default “all”. Can be “all”, “C2Hy” or “C3Hy”.- Returns:
The pre-exponential factor, in cm3/moles/s.
- Return type:
dict[str,float]
- neutral_CxHy_ionization_cross_sections(json_path: pathlib.Path) None#
Calculate cross section using formula provided by Janev for CxHy ionization (I and DI) process.
Compute the cross section for electron-impact ionization (I and DI) of neutral CHy ([Janev2002] (eq. 8, 9)), C2Hy ([Janev2004] (eq. 47, 48)) and C3Hy ([Janev2004] (eq. 81, 82)).
Load and check the parameters for the reaction, compute the cross section and add it to the database.
- Parameters:
json_path (
Path) – Path to Janev cross section parameters.- Raises:
ValueError – If a parameter is missing or not of the right type.
See also
- CxHy_dissociative_excitation_cross_sections(json_path: pathlib.Path, charge: str) None#
Calculate cross section using formula provided by Janev for CxHy DE and DE+ process.
Compute the cross section for electron-impact dissociative excitation (DE) of neutral CHy ([Janev2002] (eq. 12, 13)), C2Hy ([Janev2004] (eq. 54, 55, 56)) and C3Hy ([Janev2004] (eq. 87, 88, 89)).
Compute the cross section for electron-impact dissociative excitation (DE+) of ionic CHy+ ([Janev2002] (eq. 14, 15, 16)), C2Hy+ ([Janev2004] (eq. 60, 63, 64)) and C3Hy+ ([Janev2004] (eq. 92, 93, 94)).
Load and check the parameters for the reaction, compute the cross section and add it to the database.
- Parameters:
json_path (
Path) – Path to Janev cross section parameters.charge (
str) – “neutral” or “ion”.
- Raises:
ValueError – If a parameter is missing or not of the right type.
- CxHy_dissociative_recombination_cross_sections(json_path: pathlib.Path) None#
Calculate cross section using formula provided by Janev for CHy dissociative recombination process.
Compute the cross section for electron-impact dissociative recombination (DR) of neutral CHy ([Janev2002] (eq. 19, 20)).
Load and check the parameters for the reaction, compute the cross section and add it to the database.
- Parameters:
json_path (
Path) – Path to Janev cross section parameters.- Raises:
ValueError – If a parameter is missing or not of the right type.
See also
compute_cross_section_DR_neutral()
- static remove_electron_from_reaction(reaction: str) str#
Remove electron from the reaction.
For a reaction e + A -> B + C + ne, return A -> B + C
- Parameters:
reaction (
str) – The reaction to normalize.- Returns:
The normalized reaction.
- Return type:
str
Examples
>>> from rizer.io.generate_janev_cross_section import JanevCrossSection >>> JanevCrossSection.remove_electron_from_reaction("e + CH4 -> CH3 + H + e") "CH4 -> CH3 + H"
- static load_json(path: pathlib.Path) dict#
Load a JSON file.
- Parameters:
path (
Path) – The path to the JSON file.- Returns:
The loaded JSON file.
- Return type:
dict
- compute_cross_section_IDI_neutral(A: list[float], I_c: float, E_th: float, E: numpy.ndarray) numpy.ndarray#
Compute cross-section for ionization of neutral hydrocarbons by electron impact.
Compute cross-section for electron-impact direct (I) and dissociative (DI) ionization of neutral CHy, C2Hy and C3Hy, using Janev’s formula ([Janev2002] (8) & [Janev2004] (47) & (81)).
The cross section is return in cm^2. It is null for energy lower than the threshold energy E_th or the parameter I_c.
- Parameters:
A (
list[float]) – Coefficients of the formula.I_c (
float) – Parameter close (or equal) to the ionization threshold, in eV.E_th (
float) – Ionization threshold, in eV.E (
np.ndarray) – Energies, in eV.
- Returns:
Cross section for electron-impact ionization of CHy, C2Hy and C3Hy, in cm^2.
- Return type:
np.ndarray- Raises:
AssertionError – If the number of coefficients for A is not 6.
Note
The cross section is computed using the formula provided by Janev for CHy ionization (I and DI) (eq. 8 in [Janev2002]), C2Hy ionization (eq. 47 in [Janev2004]) and C3Hy ionization (eq. 81 in [Janev2004]):
\[\sigma_I(E) = \frac{10^{-13}}{E \cdot I_c} \left[ A_0 \log \left( \frac{E}{I_c} \right) + \sum_{j=1}^{5} A_j \left( 1 - \frac{I_c}{E} \right)^j \right]\]with:
\(\sigma_I(E)\) the ionization cross section,
\(E\) the energy of the incident electron,
\(I_c\) a parameter clos (or equal) to the ionization threshold,
\(A\) the coefficients of the formula.
- abstractmethod compute_cross_section_IDI_ion()#
Compute cross-section for ionization of ions by electron impact.
Since the threshold energy for such reaction is really high (around 30 eV), and since for now, we are only working at low energy, we can consider that the cross section for ionization of ions is null.
- Raises:
NotImplementedError – This method is not implemented yet.
- compute_cross_section_DE_neutral(E_th: float, R_DE: float, E: numpy.ndarray, x: int, y: int) numpy.ndarray#
Compute cross-section for dissociative excitation of neutral hydrocarbons to neutrals.
Compute cross-section for electron-impact dissociative excitation (DE) of neutral CHy ([Janev2002] (eq. 12, 13)), C2Hy ([Janev2004] (eq. 54, 55, 56)) and C3Hy ([Janev2004] (eq. 87, 88, 89)).
The cross section is return in cm^2.
- Parameters:
E_th (
float) – Threshold energy, in eV.R_DE (
float) – Branching ratio.E (
np.ndarray) – Energies, in eV.x (
int) – The number of carbon.y (
int) – The number of hydrogen.
- Returns:
Cross section for electron-impact dissociative excitation of CHy, C2Hy and C3Hy, in cm^2.
- Return type:
np.ndarray
Note
The cross section is computed using the formula provided by Janev for CHy dissociative excitation (DE) (eq. 12 and 13 in [Janev2002]), C2Hy dissociative excitation (eq. 54, 55 and 56 in [Janev2004]) and C3Hy dissociative excitation (eq. 87, 88 and 89 in [Janev2004]):
\[\sigma_{DE}(E) = 34.6 \cdot 10^{-16} \cdot R_{DE} F_x^{DE}(y) \left( 1 - \frac{E_{th}}{E} \right)^3 \frac{1}{E} \log \left( e + 0.15 \cdot E \right)\]with:
\(\sigma_{DE}(E)\) the dissociative excitation cross section,
\(E\) the energy of the incident electron,
\(E_{th}\) the threshold energy,
\(R_{DE}\) the branching ratio,
\(F_x^{DE}(y)\) a function which depends on x and y.
- F_DE_neutral(x: int, y: int) float#
Factor for dissociative excitation of neutral hydrocarbons.
- Parameters:
x (
int) – Number of carbon.y (
int) – Number of hydrogen.
- Returns:
Factor for dissociative excitation of neutral hydrocarbons.
- Return type:
float- Raises:
ValueError – The factor is not defined for x > 3.
Note
The factor is computed using the formula provided by Janev for CHy dissociative excitation (DE) (eq. 12 in [Janev2002]), C2Hy dissociative excitation (eq. 55 in [Janev2004]) and C3Hy dissociative excitation (eq. 88 in [Janev2004]).
The formula for CHy is (eq. 12 in [Janev2002]):
\[F_{DE} = 1 + 0.29 \cdot y\]The formula for C2Hy is (eq. 55 in [Janev2004]):
\[F_{DE} = 1.35 + 0.177 \cdot y\]The formula for C3Hy is (eq. 88 in [Janev2004]):
\[F_{DE} = 2.2 + 0.19 \cdot y\]See also
- compute_cross_section_DE_ion(E_th: float, R_DE: float, E: numpy.ndarray, x: int, y: int) numpy.ndarray#
Compute cross-section for dissociative excitation of ionic hydrocarbons to neutrals.
Compute cross-section for electron-impact dissociative excitation (DE+) of ionic CHy+ ([Janev2002] (eq. 14, 15, 16)), C2Hy+ ([Janev2004] (eq. 60, 63, 64)) and C3Hy+ ([Janev2004] (eq. 92, 93, 94)).
The cross section is return in cm^2.
- Parameters:
E_th (
float) – Threshold energy, in eV.R_DE (
float) – Branching ratio.E (
np.ndarray) – Energies, in eV.x (
int) – The number of carbon.y (
int) – The number of hydrogen.
- Returns:
Cross section for electron-impact dissociative excitation of CHy+, C2Hy+ and C3Hy+, in cm^2.
- Return type:
np.ndarray
Note
The cross section is computed using the formula provided by Janev for dissociative excitation (DE+) of CHy+ (eq. 14, 15 and 16 in [Janev2002]), C2Hy+ (eq. 60, 63 and 64 in [Janev2004]) and C3Hy+ (eq. 92, 93 and 94 in [Janev2004]):
\[\sigma_{DE^+}(E) = 29.4 \cdot 10^{-16} \cdot R_{DE}^+ F_x^{DE^+}(y) \left( 1 - \frac{E_{th}}{E} \right)^{2.5} \frac{1}{E} \log \left( e + 0.9 \cdot E \right)\]with:
\(\sigma_{DE^+}(E)\) the dissociative excitation cross section, in cm^2,
\(E\) the energy of the incident electron, in eV,
\(E_{th}\) the threshold energy, in eV (given in the Janev parameters),
\(R_{DE^+}\) the branching ratio (given in the Janev parameters),
\(F_x^{DE^+}(y)\) a function which depends on x and y (given in the Janev parameters).
- F_DE_ions(x: int, y: int) float#
Factor for dissociative excitation of hydrocarbon ions.
- Parameters:
x (
int) – Number of carbon.y (
int) – Number of hydrogen.
- Returns:
Factor for dissociative excitation of hydrocarbon ions.
- Return type:
float- Raises:
ValueError – The factor is not defined for x > 3.
Note
The factor is computed using the formula provided by Janev for CHy dissociative excitation (DE) (eq. 14 in [Janev2002]), C2Hy dissociative excitation (eq. 63 in [Janev2004]) and C3Hy dissociative excitation (eq. 93 in [Janev2004]).
The formula for CHy is (eq. 14 in [Janev2002]):
\[F_{DE^+}(y) = 1 + 0.71 \cdot (y - 1)\]The formula for C2Hy is (eq. 63 in [Janev2004]):
\[F_{DE^+}(y) = 0.74 + 0.9 \cdot y\]The formula for C3Hy is (eq. 93 in [Janev2004]):
\[F_{DE^+}(y) = 1.19 + 0.91 \cdot y\]See also
- compute_cross_section_DR(A: float, a: float, alpha: float, beta: float, R_DR: float, E: numpy.ndarray) numpy.ndarray#
Compute cross-section for dissociative recombination of ion CHy by electron impact.
Compute cross-section for electron-impact dissociative recombination (DR) of ion CHy ([Janev2002] (eq. 19, 20)). The are no formula for C2Hy and C3Hy.
The cross section is return in cm^2.
- Parameters:
A (
float) – Coefficient of the formula.a (
float) – Coefficient of the formula.alpha (
float) – Coefficient of the formula.beta (
float) – Coefficient of the formula.R_DR (
float) – Branching ratio.E (
np.ndarray) – Energies, in eV.
- Returns:
Cross section for electron-impact dissociative recombination of CHy, in cm^2.
- Return type:
np.ndarray
Note
The cross section is computed using the formula provided by Janev for CHy ionization (DE) (eq. 19 and 20 in [Janev2002]):
\[\sigma_{DR}(E) = 10^{-16} \cdot R_{DR} \frac{A}{E^\alpha \left(1 + a \cdot E \right)^{\beta}}\]with:
\(\sigma_{DR}(E)\) the dissociative recombination cross section, in cm^2,
\(E\) the energy of the incident electron, in eV,
\(R_{DR}\) the branching ratio (from the Janev parameters),
\(A\) the coefficient of the formula (from the Janev parameters),
\(a\) the coefficient of the formula (from the Janev parameters),
\(\alpha\) the coefficient of the formula (from the Janev parameters),
\(\beta\) the coefficient of the formula (from the Janev parameters).
- compute_reaction_rate_DR(T: float | numpy.ndarray, R_DR: float, x: int, y: int) float | numpy.ndarray#
Compute the reaction rate for dissociative recombination of ion CxHy (x=2,3) by electron impact.
Compute the reaction rate for electron-impact dissociative recombination (DR) of ion C2Hy ([Janev2004] (eq. 70, 71, 72)), and C3Hy ([Janev2004] (eq. 99, 100, 101)).
- Parameters:
T (
float | np.ndarray) – Temperature, in eV.R_DR (
float) – Branching ratio.x (
int) – The number of carbon.y (
int) – The number of hydrogen.
- Returns:
The reaction rate for electron-impact dissociative recombination of C2Hy and C3Hy, in cm^3/s.
- Return type:
float | np.ndarray
Note
The reaction rate is computed using the formula provided by Janev for C2Hy dissociative recombination (DR) (eq. 70, 71 and 72 in [Janev2004]) and C3Hy dissociative recombination (eq. 99, 100 and 101 in [Janev2004]):
\[k_{DR} = 10^{-8} \cdot R_{DR} \frac{F_x^{DR}(y)} {T^{\frac{1}{2}} \left(1 + 0.27 \cdot T^{0.55} \right) }\]with:
\(k_{DR}\) the reaction rate for dissociative recombination of C2Hy and C3Hy, in cm^3/s,
\(T\) the temperature in eV,
\(R_{DR}\) the branching ratio (given in the Janev parameters),
\(F_x^{DR}(y)\) a function which depends on x and y.
See also
- compute_reaction_rate_DR_cantera(R_DR: float, x: int, y: int) float#
Compute the reaction rate for dissociative recombination of ion CxHy (x=2,3) by electron impact.
Compute the reaction rate for electron-impact dissociative recombination (DR) of ion C2Hy ([Janev2004] (eq. 70, 71, 72)), and C3Hy ([Janev2004] (eq. 99, 100, 101)).
- Parameters:
R_DR (
float) – Branching ratio.x (
int) – The number of carbon.y (
int) – The number of hydrogen.
- Returns:
The pre-exponential factor of the reaction rate for electron-impact dissociative recombination of C2Hy and C3Hy, in cm^3/moles/s.
- Return type:
float | np.ndarray
Note
The reaction rate is computed using the formula provided by Janev for C2Hy dissociative recombination (DR) (eq. 70, 71 and 72 in [Janev2004]) and C3Hy dissociative recombination (eq. 99, 100 and 101 in [Janev2004]):
\[k_{DR} = 10^{-8} \cdot R_{DR} \frac{F_x^{DR}(y)} {T^{\frac{1}{2}} \left(1 + 0.27 \cdot T^{0.55} \right) }\]with:
\(k_{DR}\) the reaction rate for dissociative recombination of C2Hy and C3Hy, in cm^3/s,
\(T\) the temperature in K,
\(R_{DR}\) the branching ratio (given in the Janev parameters),
\(F_x^{DR}(y)\) a function which depends on x and y.
However, since Cantera does not support this formula with the electron temperature, we can use the following approximation:
\[A = R_{DR} \cdot 10^{-8} \cdot F_x^{DR}(y) \cdot N_A\]with:
- \(A\) the pre-exponential factor of the reaction rate for dissociative recombination of
C2Hy and C3Hy, in cm^3/moles/s,
no correcting factor, i.e. no \(\frac{1}{1 + 0.27 \cdot T^{0.55} }\)
\(N_A\) the Avogadro constant.
See also
- F_DR(x: int, y: int) float#
Factor for dissociative recombination of hydrocarbons.
- Parameters:
x (
int) – Number of carbon.y (
int) – Number of hydrogen.
- Returns:
Factor for dissociative recombination of hydrocarbons.
- Return type:
float- Raises:
ValueError – The factor is not defined for x == 1 and x > 3.
Note
The factor is computed using the formula provided by Janev for C2Hy dissociative recombination (DR) (eq. 71 in [Janev2004]) and C3Hy dissociative recombination (DR) (eq. 100 in [Janev2004]).
The formula for C2Hy is (eq. 71 in [Janev2004]):
\[\begin{split}F_{DR} = \begin{cases} 1.87 & \text{if } y = 0 \\ 3.105 \cdot \left(1 + 0.45 \cdot y \right) & \text{if } y \neq 0 \end{cases}\end{split}\]The formula for C3Hy is (eq. 100 in [Janev2004]):
\[\begin{split}F_{DR} = \begin{cases} 2.8 & \text{if } y = 0 \\ 6.84 \cdot \left(1 + 0.15 \cdot y \right) & \text{if } y \neq 0 \end{cases}\end{split}\]See also
- C2Hy_C3Hy_DR_reaction_rates(json_path: pathlib.Path) dict[str, float]#
Compute the pre-exponential factor for dissociative recombination of ions C2Hy+ and C3Hy+.
Load and check the parameters for the reaction, compute the pre-exponential factor for dissociative recombinations of ions C2Hy+ and C3Hy+.
- Parameters:
json_path (
Path) – Path to Janev cross section parameters.- Returns:
The pre-exponential factor for dissociative recombination of ions C2Hy+ and C3Hy+.
- Return type:
dict[str,float]- Raises:
ValueError – If a parameter is missing or not of the right type.
See also
xxx()
- rizer.io.generate_janev_cross_section.janev_cross_section#