soln2yaml¶
Writes a Cantera Solution object to a YAML file.
Delegates to Cantera’s built-in write_yaml() method (available in Cantera 3.0+).
- pymars.soln2yaml.write(solution, output_filename='', path='')¶
Write a Cantera solution object to a YAML file.
- Parameters:
solution (cantera.Solution) – Model to be written
output_filename (str, optional) – Name of file to be written; if not provided, use
solution.namepath (str, optional) – Path for writing file.
- Returns:
output_filename – Name of output model file (.yaml)
- Return type:
Examples
>>> gas = cantera.Solution('gri30.yaml') >>> soln2yaml.write(gas, 'copy_gri30.yaml') copy_gri30.yaml