rizer.kin.umist_to_cantera#
This script converts the [UMIST] database to a [Cantera]-readable format.
The reaction rate looked are those involving at least an ion, and only between the accepted species. The accepted species are CHy, CHy+, C2Hy, C2Hy+, Hy and Hy+. If a reaction does not contain one of these species, it is not considered.
The reaction rate constants are in the form of the Arrhenius equation:
where:
\(k\) is the rate constant [\(\text{cm}^3/\text{moles}/\text{s}\)],
\(A\) is the pre-exponential factor [\(\text{cm}^3/\text{moles}/\text{s}\)],
\(T\) is the temperature [\(K\)],
\(n\) is the temperature exponent [-],
\(E_a\) is the activation energy [\(\text{kJ/mol}\)].
Note
The UMIST database is a collection of reaction rate constants for astrochemistry. The data comes from https://umistdatabase.uk/files/rate22_final.rates.
Cantera is a software suite for chemical kinetics, thermodynamics, and transport processes.
Attributes#
Functions#
|
Read the UMIST database from a text file. |
|
Convert the UMIST database to Cantera format. |
Module Contents#
- rizer.kin.umist_to_cantera.read_umist_database() str#
Read the UMIST database from a text file.
- Returns:
The content of the UMIST database as a string.
- Return type:
- rizer.kin.umist_to_cantera.convert_umist_to_cantera(accepted_species: list[str], ignored_reactions: list[str], output_path: pathlib.Path | None = None, include_only_reactions_involving_accepted_species: bool = True, convert_species_names: list[tuple[str, str]] = [('CH3CH3+', 'C2H6+'), ('CH3CH3', 'C2H6')]) str#
Convert the UMIST database to Cantera format.
- Parameters:
accepted_species (
listofstr) – The list of accepted species. Only reactions involving at least one of these species will be included.ignored_reactions (
listofstr) – The list of reactions to ignore. Reactions in this list will be commented out in the output.output_path (
pathlib.PathorNone, optional) – The path to the output file. If None, the output will not be saved to a file, by default None.include_only_reactions_involving_accepted_species (
bool, optional) – Whether to include only reactions involving at least one of the accepted species, by default True.convert_species_names (
listoftupleofstr, optional) – A list of tuples where the first element is the old species name and the second element is the new species name. This is used to convert species names from UMIST to Cantera format, by default [(“CH3CH3+”, “C2H6+”), (“CH3CH3”, “C2H6”)].
- Returns:
The content of the UMIST database in Cantera format as a string.
- Return type:
- rizer.kin.umist_to_cantera.accepted_species = ['H', 'H+', 'H2', 'H2+', 'C', 'C+', 'CH', 'CH+', 'CH2', 'CH2+', 'CH3', 'CH3+', 'CH4', 'CH4+',...#