Skip to main content

Python wrapper for batch simulations

Project description

ci tag PyPI

ctwrap

Python wrapper for batch simulations (e.g. Cantera).

Documentation

Sphinx documentation includes:

Philosophy

The software was developed with the following objectives in mind. It should:

  • provide a low-level interface to essential cantera capabilities
  • create 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

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.

Installation

The simplest approach is to install ctwrap via pip, i.e.

$ pip install ctwrap

Note that ctwrap itself does not depend on a Cantera installation (only simulation modules do). It is recommended to install Cantera before ctwrap in a separate step.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctwrap-0.3.3.tar.gz (29.0 kB view hashes)

Uploaded Source

Built Distribution

ctwrap-0.3.3-py3-none-any.whl (31.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page