12#ifndef CHEMISTRY_MECHANISM_H
13#define CHEMISTRY_MECHANISM_H
58 std::vector<std::array<double, 9>>
coeffs;
65 size_t range(
double T)
const;
127 std::vector<std::pair<uint32_t, double>>
orders;
136 std::vector<std::pair<double, Arrhenius>>
plog;
167Mechanism
read_mechanism(
const std::string & file,
const std::string & phase =
"");
KOKKOS_INLINE_FUNCTION rtype dot(const rtype *a, const rtype *b)
Compute the dot product of two arrays.
Definition common_math.h:32
const char * symbol
Definition mechanism.cpp:33
constexpr double ONE_ATM
Definition mechanism.h:28
MoleculeGeometry
Definition mechanism.h:68
constexpr double GAS_CONSTANT
Definition mechanism.h:26
ThermoModel
Definition mechanism.h:38
constexpr double BOLTZMANN
Definition mechanism.h:25
double atomic_weight(const std::string &symbol)
Atomic weight in kg/kmol of an element symbol (Cantera's table; case-insensitive),...
Definition mechanism.cpp:600
constexpr double LIGHT_SPEED
Definition mechanism.h:29
constexpr double ELEMENTARY_CHARGE
Definition mechanism.h:27
ReactionType
Definition mechanism.h:103
FalloffType
Definition mechanism.h:111
constexpr double EPSILON_0
Definition mechanism.h:30
constexpr double AVOGADRO
Definition mechanism.h:24
Mechanism read_mechanism(const std::string &file, const std::string &phase)
Read a phase of a Cantera YAML file.
Definition mechanism.cpp:628
Modified Arrhenius rate k = A T^b exp(-Ea / (R T)), SI units with kmol.
Definition mechanism.h:97
double b
Definition mechanism.h:99
double A
Definition mechanism.h:98
double Ea_R
Definition mechanism.h:100
One ideal-gas phase of a Cantera YAML file: its elements, species and reactions.
Definition mechanism.h:145
std::vector< Species > species
Definition mechanism.h:149
uint32_t n_species() const
Definition mechanism.h:152
std::vector< std::string > species_names() const
Definition mechanism.cpp:622
std::vector< std::string > elements
Definition mechanism.h:148
int32_t species_index(const std::string &name) const
Index of a species by name, or -1 if the mechanism has none.
Definition mechanism.cpp:615
std::string phase
Definition mechanism.h:147
std::vector< Reaction > reactions
Definition mechanism.h:150
std::string file
Definition mechanism.h:146
A gas-phase reaction: elementary, three-body or falloff (Lindemann, Troe, SRI), reversible (reverse r...
Definition mechanism.h:122
std::array< double, 5 > falloff_params
Definition mechanism.h:133
FalloffType falloff
Definition mechanism.h:132
bool reversible
Definition mechanism.h:128
ReactionType type
Definition mechanism.h:124
uint32_t chebyshev_n_p
Definition mechanism.h:138
std::vector< std::pair< double, Arrhenius > > plog
Definition mechanism.h:136
std::vector< double > chebyshev
Definition mechanism.h:139
std::vector< std::pair< uint32_t, double > > products
Definition mechanism.h:126
std::vector< std::pair< uint32_t, double > > reactants
Definition mechanism.h:125
uint32_t chebyshev_n_T
Definition mechanism.h:138
std::string equation
Definition mechanism.h:123
double default_efficiency
Definition mechanism.h:135
std::vector< std::pair< uint32_t, double > > efficiencies
Definition mechanism.h:134
Arrhenius low
Definition mechanism.h:131
Arrhenius rate
Definition mechanism.h:130
std::vector< std::pair< uint32_t, double > > orders
Definition mechanism.h:127
std::array< double, 4 > chebyshev_range
Definition mechanism.h:137
bool duplicate
Definition mechanism.h:129
Species thermodynamics as piecewise polynomials in NASA-9 form, one per temperature range: cp/R = a0/...
Definition mechanism.h:55
std::array< double, 4 > constant_cp
Definition mechanism.h:59
ThermoModel model
Definition mechanism.h:56
std::vector< std::array< double, 9 > > coeffs
Definition mechanism.h:58
size_t range(double T) const
Index of the range used at T. As in Cantera, a NASA-7 bound belongs to the range below it,...
Definition mechanism.cpp:608
std::vector< double > T_bounds
Definition mechanism.h:57
Gas transport data of a species (Cantera's "gas" transport model), in SI units.
Definition mechanism.h:78
double rotational_relaxation
Definition mechanism.h:84
double well_depth
Definition mechanism.h:81
double dipole
Definition mechanism.h:82
double diameter
Definition mechanism.h:80
MoleculeGeometry geometry
Definition mechanism.h:79
double polarizability
Definition mechanism.h:83
Definition mechanism.h:87
std::vector< std::pair< std::string, double > > composition
Definition mechanism.h:89
double molecular_weight
Definition mechanism.h:90
SpeciesTransport transport
Definition mechanism.h:93
std::string name
Definition mechanism.h:88
SpeciesThermo thermo
Definition mechanism.h:91
bool has_transport
Definition mechanism.h:92