kyleniemeyer / create_rate_subs

Create hardcoded species and reaction rate subroutines from Chemkin-style mechanisms
Other
7 stars 3 forks source link

create_rate_subs

DOI

This utility creates species and reaction rate subroutines for either C or CUDA from a Chemkin- or Cantera-format reaction mechanism.

Usage

create\_rate\_subs can be run either as an executable or script via Python. To run as an executable, from the command line change to the proper directory, change the file mode to executable and run:

chmod +x create_rate_subs.py
./create_rate_subs [options]

To run it as a script, change to the appropriate directory and run:

python create_rate_subs.py [options]

The generated source code is placed within the out directory, which is created if it doesn't exist initially.

Options

In the above, [options] indicates where command line options should be specified. The options available can be seen using -h or --help, or below:

-h, --help            show this help message and exit
-l {c,cuda,fortran,matlab}, --lang {c,cuda,fortran,matlab}
                      Programming language for output source files.
-i INPUT, --input INPUT
                      Input mechanism filename (e.g., mech.dat).
-t THERMO, --thermo THERMO
                      Thermodynamic database filename (e.g., therm.dat), or
                      nothing if in mechanism.
-ls LAST_SPECIES, --last_species LAST_SPECIES
                      The name of the species to set as the last in the
                      mechanism. If not specified, defaults to the first of
                      N2, AR, and HE in the mechanism.

License

create_rate_subs is released under the modified BSD license, see LICENSE for details.

Citation

If you use this software as part of a scholarly publication, please cite the software directly using the DOI: 10.5281/zenodo.44336

The following paper includes the first mention of this software, in addition to some description:

Author

Created by Kyle Niemeyer. Email address: kyle.niemeyer@gmail.com