soln2cti¶
writes a solution object to a cantera cti file.
currently only works for Elementary, Falloff, Plog and ThreeBody Reactions Cantera development version 2.3.0a2 required
-
pymars.soln2cti.
build_arrhenius
(rate, reaction_order, reaction_type)¶ Builds Arrhenius coefficient string based on reaction type.
- Parameters
rate (cantera.Arrhenius) – Arrhenius-form reaction rate coefficient
reaction_order (int or float) – Order of reaction (sum of reactant stoichiometric coefficients)
reaction_type ({cantera.ElementaryReaction, cantera.ThreeBodyReaction, cantera.PlogReaction}) – Type of reaction
- Returns
String with Arrhenius coefficients
- Return type
-
pymars.soln2cti.
build_efficiencies
(efficiencies, species_names, default_efficiency=1.0)¶ Creates line with list of third-body species efficiencies.
- Parameters
- Returns
Line with list of efficiencies
- Return type
-
pymars.soln2cti.
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
-
pymars.soln2cti.
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
-
pymars.soln2cti.
section_break
(section_title)¶ Return string with break and new section title
-
pymars.soln2cti.
write
(solution, output_filename='', path='')¶ Function to write cantera solution object to cti 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.
- Returns
output_filename – Name of output model file (.cti)
- Return type
Examples
>>> gas = cantera.Solution('gri30.cti') >>> soln2cti.write(gas, 'copy_gri30.cti') copy_gri30.cti