Skip to main content

PyChemkin provides Pythonic interface to Ansys chemkin utilities and reactor models

Reason this release was yanked:

Deprecated in favor of ansys-chemkin-core==0.1.1

Project description


PyAnsys Python MIT

Overview

PyChemkin (Ansys-chemkin package) provides pythonic access to Ansys Chemkin. It facilitates programmatic customization of Chemkin simulation workflow within the Python ecosystem and permits access to Chemkin property and rate utilities as well as selected reactor models:

  • Process Chemkin-compatible gas-phase mechanisms

  • Evaluate species and mixture thermodynamic and transport properties

  • Compute reaction rate of progress and species rate of production (ROP)

  • Combine gas mixtures isothermally or adiabatically

  • Find the equilibrium state of a gas mixture

  • Run gas-phase batch reactor models

For more information on Chemkin, see the Ansys Chemkin page on the Ansys website.

Installation

pip is the preferred installation method. You can use pip to install PyChemkin.

pip install ansys-chemkin

Verifying the installation

Invoke the Python interpreter interface from Windows’ command prompt and try to import the ansys-chemkin package as

import ansys.chemkin
  • PyChemkin is correctly installed if python returns

Chemkin version number = xxx
  • It is likely there is no Ansys product installed locally if python does not return anything.

  • The local Ansys Chemkin version needs to be updated to at least version 2025 Release 2 if Python returns

** PyChemkin does not support Chemkin versions older than 2025 R2

For more information, see Getting Started.

Basic usage

Here is a PyChemkin project to compute the density of mixture air. This code shows how to import PyChemkin (Ansys Chemkin) and use some basic capabilities:

import os

# import PyChemkin
import ansys.chemkin as chemkin

# create a Chemistry Set for GRI 3.0 mechanism in the data directory
mech_dir = os.path.join(chemkin.ansys_dir, "reaction", "data")
# set up mechanism file names
mech_file = os.path.join(mech_dir, "grimech30_chem.inp")
therm_file = os.path.join(mech_dir, "grimech30_thermo.dat")
tran_file = os.path.join(mech_dir, "grimech30_transport.dat")
# instantiate Chemistry Set 'GasMech'
GasMech = chemkin.Chemistry(chem=mech_file, therm=therm_file,  tran=tran_file,  label='GRI 3.0')
# pre-process the Chemistry Set
status = GasMech.preprocess()
# check preprocess status
if status != 0:
    # failed
    print(f'PreProcess: error encountered...code = {status:d}')
    print(f'see the summary file {GasMech.summaryfile} for details')
    exit()
# Create Mixture 'air' based on 'GasMech'
air = chemkin.Mixture(GasMech)
# set 'air' condition
# mixture pressure in [dynes/cm2]
air.pressure = 1.0 * chemkin.Patm
# mixture temperature in [K]
air.temperature = 300.0
# mixture composition in mole fractions
air.X = [('O2', 0.21), ('N2', 0.79)]
#
print(f"pressure    = {air.pressure/chemkin.Patm} [atm]")
print(f"temperature = {air.temperature} [K]")
# print the 'air' composition in mass fractions
air.list_composition(mode='mass')
# get 'air' mixture density [g/cm3]
print(f"the mixture density = {air.RHO} [g/cm3]")

For comprehensive usage information, see the Tutorials in the PyChemkin documentation.

Documentation and issues

Documentation for the latest stable release of PyChemkin is hosted at PyChemkin documentation.

In the upper right corner of the documentation’s title bar, there is an option for switching from viewing the documentation for the latest stable release to viewing the documentation for the development version or previously released versions.

User manuals and tutorials for Chemkin can be found at Chemkin Documents.

On the PyAnsys Chemkin Issues page, you can create issues to report bugs and request new features. On the PyChemkin Discussions page or the Discussions page on the Ansys Developer portal, you can post questions, share ideas, and get community feedback.

To reach the project support team, email pyansys.core@ansys.com.

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

ansys_chemkin-2025.2.0.tar.gz (132.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansys_chemkin-2025.2.0-py3-none-any.whl (151.6 kB view details)

Uploaded Python 3

File details

Details for the file ansys_chemkin-2025.2.0.tar.gz.

File metadata

  • Download URL: ansys_chemkin-2025.2.0.tar.gz
  • Upload date:
  • Size: 132.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ansys_chemkin-2025.2.0.tar.gz
Algorithm Hash digest
SHA256 3bafba337f7dfb2747c36f279c6880a26fe6f56192eb82b4884ed46868528c0d
MD5 4b1d952c308c321b46705f5a1acc06c2
BLAKE2b-256 790ad650e86f937cfbad528cabf06a4c9b4cbeda53acb6d362b48693f82d8d90

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_chemkin-2025.2.0.tar.gz:

Publisher: ci.yml on ansys/pychemkin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ansys_chemkin-2025.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ansys_chemkin-2025.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4dacad2e80cb6e1d37c0857611dc0e65e40c8d71ddd6188a59e423b86c23cc58
MD5 7944b0fb9d5cf395f22e119399deeff4
BLAKE2b-256 a7e76b3753b96666e7b17a8054a5c407483cd51bdefccf6f62566cb7dff282b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_chemkin-2025.2.0-py3-none-any.whl:

Publisher: ci.yml on ansys/pychemkin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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