ctwrap - Wrapper for Batch Simulations¶
Python wrapper for batch simulations (e.g. Cantera). The source code is available at the ctwrap Github repository.
Table of Contents¶
Philosophy¶
The software was developed with the following objectives in mind. It should:
provide a low-level interface to essential
cantera
capabilitiescreate a flexible framework for generic simulations
provide a command line interface
be easily scriptable (using YAML configuration files)
enforce units (via
pint
)enable parallel execution of (single-threaded) simulations (via
multiprocessing
)enable simple re-import of simulation results into native Cantera objects
Note
Although core functions of this software are continuously tested, there may be remaining bugs, non-working features, or other issues that could prevent a user from using this software to their specification. If you find problems, please report them in the issue tracker.
Example¶
A parallel batch job for adiabatic flame calculations uses the
freeflame
module (modified from Cantera’s adiabatic_flame.py
example). Based on the
YAML configuration given as a reference, a variation of 12 equivalence ratio values
is run as:
$ ctwrap run freeflame freeflame.yaml --parallel
Results are written to a single file freeflame.h5
.