Skip to content
/ KinetiX Public
forked from bogdandanciu/KinetiX

KinetiX - a performance portable code generator for chemical kinetics and transport properties

License

Notifications You must be signed in to change notification settings

LHCFD/KinetiX

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License

KinetiX

A software toolkit for generating CPU and GPU code to compute chemical kinetics, thermodynamics, and transport properties from a chemical reaction mechanism.

kinetix python package

Requirements

  • Python v3.8 and later

Download or clone the repository.

Local installation (optional)

Using the downloaded source code, kinetix can be installed as a Python module:

python3 install . 

Usage

If locally installed

python3 -m kinetix --mechanism kinetix/mechanisms/gri30.yaml --output kinetix/out/mechanisms/gri

Standalone usage

python3 kinetix/__main__.py --mechanism kinetix/mechanisms/gri30.yaml --output kinetix/out/mechanisms/gri

Benchmark kernels

Benchmark kernels are provided to evaluate the performance of the routines generated by kinetix for different computing platforms. These kernels use the OCCA library to support various hardware targets such as CPUs (SERIAL backend) and GPUs (CUDA or HIP backend).

Requirements:

Minimum

  • Linux, Mac OS X (Microsoft Windows is not supported)
  • C++17/C99 compatible compilers + GNU/Intel Fortran
  • MPI-3.1 or later
  • CMake version 3.21 or later

Optional

  • CUDA 9 or later
  • HIP 4.2 or later
  • SYCL 2020 or later
  • Cantera 2.5 or later

Installation:

To install the benchmark kernels, use the provided setup script:

cd benchmark
./install_bk.sh

For custom installation options, such as changing the installation directory or changing the amrex backend, run:

source ./install_bk.sh --help

BK1: Species Production Rates

export OCCA_CXX=mpic++
mpirun -np 1 ${KINETIX_PATH}/bin/kinetix_bk --backend SERIAL --n-states 10 --mode 1 --yaml-file kinetix/mechanisms/gri30.yaml
mpirun -np 1 ${KINETIX_PATH}/bin/kinetix_bk --backend CUDA --n-states 10 --mode 1 --yaml-file kinetix/mechanisms/gri30.yaml --unroll-loops

BK2: Mixture-Averaged Transport Properties

export OCCA_CXX=mpic++
mpirun -np 1 ${KINETIX_PATH}/bin/kinetix_bk --backend SERIAL --n-states 1000000 --mode 2  --yaml-file kinetix/mechanisms/gri30.yaml
mpirun -np 1 ${KINETIX_PATH}/bin/kinetix_bk --backend CUDA --n-states 1000000 --mode 2  --yaml-file kinetix/mechanisms/gri30.yaml --unroll-loops

Examples

Check the examples/ directory to see how the generated routines by KinetiX (or PelePhysics or Cantera) can be integrated in a simple MPI program without OCCA dependency (CPU only).

Citing KinetiX

To cite KinetiX, please use this Computer Physics Communications article:

@article{Danciu2025,
  title = {KinetiX: A performance portable code generator for chemical kinetics and transport properties},
  volume = {310},
  ISSN = {0010-4655},
  url = {http://dx.doi.org/10.1016/j.cpc.2025.109504},
  DOI = {10.1016/j.cpc.2025.109504},
  journal = {Computer Physics Communications},
  publisher = {Elsevier BV},
  author = {Danciu,  Bogdan A. and Frouzakis,  Christos E.},
  year = {2025},
  month = may,
  pages = {109504}
}

License

KinetiX is licensed under the BSD-2 Clause License - see the LICENSE file for details.

About

KinetiX - a performance portable code generator for chemical kinetics and transport properties

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.7%
  • Python 1.4%
  • Other 0.9%