diff --git a/interfaces/cython/cantera/__init__.py b/interfaces/cython/cantera/__init__.py index 29a0a7426..2703eb17e 100644 --- a/interfaces/cython/cantera/__init__.py +++ b/interfaces/cython/cantera/__init__.py @@ -1,6 +1,7 @@ from ._cantera import * from ._cantera import __version__, _have_sundials from .liquidvapor import * +from .utils import * import os as _os add_directory(_os.path.join(_os.path.dirname(__file__), 'data')) diff --git a/interfaces/cython/cantera/utils.py b/interfaces/cython/cantera/utils.py new file mode 100644 index 000000000..fd82e75eb --- /dev/null +++ b/interfaces/cython/cantera/utils.py @@ -0,0 +1,9 @@ +from . import Solution + + +def import_phases(filename, phase_names): + """ + Import multiple phases from one file. The phase names should be + entered as a list of strings. + """ + return [Solution(filename, p) for p in phase_names]