tools

Module with miscellanous tools.

pymars.tools.compare_models(model1, model2)

Checks whether two Cantera models are equivalent.

Parameters
Returns

True if models match, False if models disagree

Return type

bool

pymars.tools.convert(model_file, thermo_file=None, transport_file=None, path='')

Function to convert between Cantera and Chemkin model formats.

Parameters
  • model_file (str) – Input model file (Cantera .cti or Chemkin)

  • thermo_file (str, optional) – Chemkin thermodynamic properties file

  • transport_file (str, optional) – Chemkin transport data file

  • path (str, optional) – Path for writing file

Returns

Path to converted file, or list of files (for Chemkin)

Return type

str or list

Example

>>> convert('gri30.inp')
gri30.cti
>>> convert('gri30.cti')
[gri30.inp, gri30_thermo.dat, gri30_transport.dat]