MechConvert¶
Writes a solution object to a chemkin inp file currently only works for Elementary, Falloff and ThreeBody Reactions.
Modified on 2022.08.04
- MechConvert.build_arrhenius(rate, reaction_order, reaction_type)¶
Builds Arrhenius coefficient string based on reaction type.
- Parameters
- Returns
String with Arrhenius coefficients.
- Return type
- MechConvert.build_falloff_arrhenius(rate, reaction_order, reaction_type, pressure_limit)¶
Builds Arrhenius coefficient strings for falloff and chemically-activated reactions.
- Parameters
rate (cantera.Arrhenius) – Arrhenius-form reaction rate coefficient.
reaction_order (int or float) – Order of reaction (sum of reactant stoichiometric coefficients).
reaction_type ({ct.FalloffReaction, ct.ChemicallyActivatedReaction}) – Type of reaction.
pressure_limit ({'high', 'low'}) – string designating pressure limit.
- Returns
Arrhenius coefficient string.
- Return type
- MechConvert.build_falloff(parameters, falloff_function)¶
Creates falloff reaction Troe parameter string
- Parameters
parameters (numpy.ndarray) – Array of falloff parameters; length varies based on
falloff_function.falloff_function ({'Troe', 'SRI'}) – Type of falloff function.
- Returns
falloff_string – String of falloff parameters.
- Return type
- MechConvert.write_thermo_data(species_list, filename='generated_thermo.dat')¶
Writes thermodynamic data to Chemkin-format file.
- Parameters
species_list (list of cantera.Species) – List of species objects.
filename (str, optional) – Filename for new Chemkin thermodynamic database file.
- MechConvert.write_transport_data(species_list, filename='generated_transport.dat')¶
Writes transport data to Chemkin-format file.
- Parameters
species_list (list of cantera.Species) – List of species objects.
filename (str, optional) – Filename for new Chemkin transport database file.
- MechConvert.write_chem_data(solution, output_filename='', path='', skip_thermo=False, skip_transport=False)¶
Writes Cantera solution object to Chemkin-format file.
- Parameters
solution (cantera.Solution) – Model to be written.
output_filename (str, optional) – Name of file to be written; if not provided, use
solution.name.path (str, optional) – Path for writing file.
skip_thermo (bool, optional) – Flag to skip writing thermo data in separate file.
skip_transport (bool, optional) – Flag to skip writing transport data in separate file.
- Returns
output_file_name – Name of output model file (.inp).
- Return type