Skip to main content

Chemical Equilibrium with Applications

Project description

Build and docs Basic Build License Release

CEA (Chemical Equilibrium with Applications)

CEA logo

A modernized version of NASA's Chemical Equilibrium with Applications.

Online documentation and examples are located at https://nasa.github.io/cea/

Overview

The NASA software package CEA (Chemical Equilibrium with Applications) enables the rapid solution of chemical equilibrium problems for complex mixtures. The core solver computes equilibrium product concentrations given a set of reactants and thermodynamic states. These product concentrations are then used to compute the thermodynamic and transport properties of the equilibrium mixture. Applications include estimation of theoretical rocket performance, Chapman-Jouguet detonation characteristics, and shock-tube parameters for incident and reflected shocks. Associated with the program are independent databases with transport and thermodynamic properties of individual species. Over 2000 species are contained in the thermodynamic database.

This software repository is a complete re-implementation of the original CEA software, with initial development supported by the NASA Engineering & Safety Center (NESC). The software represents the latest evolution of a series of computer programs that developed at the NASA Glenn (formerly Lewis) Research Center since the 1950s. The primary goals of the re-implementation were to modernize the CEA code base to adopt modern software engineering practices and improve CEA's ability to interface with other software packages and analysis environments via well-defined programming APIs in multiple languages.

Install (Recommended)

For most users, install the published Python package directly:

python -m pip install cea

This is the fastest path to start using the Python API (import cea) without building from source.

If you need the legacy CLI executable (cea) or C/Fortran build artifacts, use the source build path below.

Prebuilt release assets are also available on the GitHub Releases page, including platform executables and shared libraries (.so, .dll, .lib, .dll.a).

Build and Install from Source

The CEA software package is compiled and installed using CMake v3.19+. The core software has no external dependencies, and is known to build successfully on a wide range of platforms and using the Intel and GNU Fortran compilers. The basic installation process is as follows:

cd <cea_source_dir>
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=<cea_install_dir> -DCEA_BUILD_TESTING=OFF ..
cmake --build .
cmake --install .

This will build and install the cea executable, libcea library, default thermodynamic and transport property databases, documentation, and sample problems to the user-specified cea_install_dir.

Upon installation, all that is required to use the cea applications is to add the CEA install directory to the user's PATH environment variable, e.g.:

export PATH="<cea_install_dir>/bin:$PATH"

Once properly configured, you should be able to run the provided sample problems from any working directory as follows:

cea <cea_source_dir>/samples/rp1311_examples

Build Prerequisites

To build the Python bindings from source, Ninja is required (scikit-build-core uses the Ninja generator). Ensure ninja is available on your PATH before running pip install . or pip install -e ..

Minimal Builds

If you want a Fortran-only build or a Fortran+C build without Python/Cython/NumPy dependencies, use the presets below.

Fortran-only (no C/Python bindings):

cmake --preset core
cmake --build build-core
cmake --install build-core

Fortran + C (no Python bindings):

cmake --preset core-c
cmake --build build-core-c
cmake --install build-core-c

If you are not using presets, set -DCEA_ENABLE_BIND_PYTHON=OFF and also disable the MATLAB wrapper (it forces Python on). For Fortran-only, also set -DCEA_ENABLE_BIND_C=OFF.

Python Binding from a Source Checkout

The new Python binding provides direct access to compiled CEA routines. If you are developing locally or want to build from a checkout, use:

cd <cea_source_dir>
pip install .

A binary wheel distribution can also be generated with the following:

cd <cea_source_dir>
pip wheel --no-deps -w dist .

This will build a standalone binary wheel distribution in the ./dist directory. This distribution can then be installed on compatible local hosts with:

pip install path/to/wheel/<wheel-file-name>

The Python binding to CEA has been successfully compiled and executed on macOS, Linux, and Windows systems.

Examples

Legacy CLI (classic .inp deck - run this from the build/source directory):

./cea ../samples/example1

Note that specifying the .inp extension for input files is optional.

Python example (runs the H2/O2 case after installing the Python bindings):

python source/bind/python/cea/samples/h2_o2.py

Database Generation

CEA requires thermodynamic and transport property databases. When using the provided CMake build system, these databases are automatically compiled from data/thermo.inp and data/trans.inp during the build process and installed alongside the cea executable.

Custom Database Generation

In many applications it is necessary to perform calculations with modified versions of the provided databases. To generate custom databases, run the cea program in compilation mode with your modified input files:

./cea --compile-thermo path/to/thermo.inp
./cea --compile-trans path/to/trans.inp

This will produce thermo.lib and trans.lib in the current directory.

To use the customized databases, copy them into the working directory where you will be executing the cea program (usually the same directory as the .inp problem definition file). Database files in the working directory will take precedence over the installed database files in <cea_install_dir>/data/.

Database Lookup

CEA locates thermo.lib and trans.lib in the following order:

  • For the CLI and C/Fortran APIs: current working directory, CEA_DATA_DIR (if set), ./data, then <cea_install_dir>/data.
  • For Python (cea.init() with no path): current working directory, CEA_DATA_DIR (if set), packaged cea/data, then the repo data/ directory when running from a source checkout.

You can override the search path by setting CEA_DATA_DIR or by passing explicit paths:

export CEA_DATA_DIR=/path/to/cea/data
import cea
cea.init("/path/to/cea/data")

References

  1. McBride, B.J., Zehe, M. J., Gordon, S., "NASA Glenn Coefficients for Calculating Thermodynamic Properties of Individual Species", NASA TP-2002-211556, 2002. NTRS
  2. McBride, B.J., Gordon, S., and Reno, M.A., "Thermodynamic Data for Fifty Reference Elements", NASA TP-3287/REV1, 2001. NTRS
  3. Gordon, S., McBride, B.J., "Thermodynamic Data to 20 000 K for Monatomic Gases", NASA TP-1999-208523, 1999. NTRS
  4. Svehla, R.A., "Transport Coefficients for the NASA Lewis Chemical Equilibrium Program", NASA TM-4647, 1995. NTRS
  5. McBride, B.J., and Gordon, S., "Computer Program for Calculating and Fitting Thermodynamic Functions", NASA RP-1271, 1992. NTRS

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

cea-3.1.0.tar.gz (754.9 kB view details)

Uploaded Source

Built Distributions

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

cea-3.1.0-cp313-cp313-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.13Windows x86-64

cea-3.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cea-3.1.0-cp313-cp313-macosx_15_0_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.13macOS 15.0+ x86-64

cea-3.1.0-cp313-cp313-macosx_14_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

cea-3.1.0-cp312-cp312-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.12Windows x86-64

cea-3.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cea-3.1.0-cp312-cp312-macosx_15_0_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.12macOS 15.0+ x86-64

cea-3.1.0-cp312-cp312-macosx_14_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

cea-3.1.0-cp311-cp311-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.11Windows x86-64

cea-3.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cea-3.1.0-cp311-cp311-macosx_15_0_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.11macOS 15.0+ x86-64

cea-3.1.0-cp311-cp311-macosx_14_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

File details

Details for the file cea-3.1.0.tar.gz.

File metadata

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

File hashes

Hashes for cea-3.1.0.tar.gz
Algorithm Hash digest
SHA256 e9cb82627bcd08cafa96f34b8cb1676a21d2c6f3787d0975e714d3670232408a
MD5 6ee6aa1f43107d71a3fc41951d6ea848
BLAKE2b-256 2eae10b79fe8f7e3560e8d50d7909633784603656f60fd884eccf54b77169506

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.1.0.tar.gz:

Publisher: publish_wheels.yml on nasa/cea

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

File details

Details for the file cea-3.1.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: cea-3.1.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cea-3.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e89e045b0f3c84bfc419bc14b74755c1fd195f5bc26563f399d0e1da2f8819ae
MD5 855efd041fc39330d82c65f71511a7d4
BLAKE2b-256 ffd456d85c7bb84e4008701f9f3acba8e81e433312dcfe392257c1b9f3ce2ca6

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.1.0-cp313-cp313-win_amd64.whl:

Publisher: publish_wheels.yml on nasa/cea

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

File details

Details for the file cea-3.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cea-3.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2967a358ad9941c1d1aafaf192c64579f8d842b73f461693365973d99ebf6eab
MD5 2e4cf6f895b61282298e074e70963c75
BLAKE2b-256 9444ae222d1789826d22ded3a7f4040f366df6b54012894fa5da6ef935ba79ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish_wheels.yml on nasa/cea

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

File details

Details for the file cea-3.1.0-cp313-cp313-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for cea-3.1.0-cp313-cp313-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 d8edea04540856dc993644b2852a4644d8b446c9e81b40ff524785a536768027
MD5 7d031947225a5f258e05d2531fd0f406
BLAKE2b-256 9c7190298ff840c4ff87910ba4f3e302fb0b56f8015f2a9e103abd0908a05bf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.1.0-cp313-cp313-macosx_15_0_x86_64.whl:

Publisher: publish_wheels.yml on nasa/cea

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

File details

Details for the file cea-3.1.0-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

  • Download URL: cea-3.1.0-cp313-cp313-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.13, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cea-3.1.0-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 7f46212aad738033b406695624aac0e9fed3ea60a375ba217b9def5eeb55df7f
MD5 d688eba1fbd80394bcb0f2881888713a
BLAKE2b-256 37a8a5c9ba7b524e82558d00dc890ffd0902ea70d47c28b145ca18b03fc25488

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.1.0-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: publish_wheels.yml on nasa/cea

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

File details

Details for the file cea-3.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: cea-3.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cea-3.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6cf8a57a4286c02856d51c76213930c5f47bd8202b747d5961823da4d54a8171
MD5 5a180c83d2d15ead28a28935c0e61e2a
BLAKE2b-256 38f76bfaf70f89c9df994767dc41398089282ce5fe9053f1a793d9e8c258d57b

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.1.0-cp312-cp312-win_amd64.whl:

Publisher: publish_wheels.yml on nasa/cea

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

File details

Details for the file cea-3.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cea-3.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2b6df966f20a4cf2af4bc6a95544092d7a6b0c988ea7e12d6737fa0e54da0389
MD5 f4ec9c5eb8bd1a0cef323f48c0b352ee
BLAKE2b-256 1fdbceb5c13c2b8716448e74c101af72c29eee06d13ea940ca7b99115c2e135e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish_wheels.yml on nasa/cea

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

File details

Details for the file cea-3.1.0-cp312-cp312-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for cea-3.1.0-cp312-cp312-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 efa1b84d43978a502fc4bf87f81cc6d31df5b920a0b530fc7e80193be7ddc0f4
MD5 e3189b767d8d57a0305f78a97773db03
BLAKE2b-256 d0d93362c7b3d57bd4c5c4d04c94bdec8d6216343ead3e782eda4fd8599a5e65

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.1.0-cp312-cp312-macosx_15_0_x86_64.whl:

Publisher: publish_wheels.yml on nasa/cea

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

File details

Details for the file cea-3.1.0-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

  • Download URL: cea-3.1.0-cp312-cp312-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.12, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cea-3.1.0-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 8ed89b6251b26d0ef1a437951db209d515560ec8cd5c71bba9958a71616c90b0
MD5 cde26318fbdad3192620ffc08a36b9c6
BLAKE2b-256 cfd50f7dd7e8afd79754ecc9d3d5b07fd6136bfdb3fcfed0c36241d6ed1d9682

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.1.0-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: publish_wheels.yml on nasa/cea

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

File details

Details for the file cea-3.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: cea-3.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cea-3.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 846aa8b9e5e89f4e40bdc30ba9cac9d338ab9e23202da50f60114cf153ea1ca2
MD5 f9945e897caf4804a0884d8e0844f024
BLAKE2b-256 050ca0bff467c22c068a7c221c8b22df45964db2b2e059d2f3780dc6954f3d70

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.1.0-cp311-cp311-win_amd64.whl:

Publisher: publish_wheels.yml on nasa/cea

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

File details

Details for the file cea-3.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cea-3.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 44a4525b7f1d40622abac2dd5b571e008ffa07a25f3504e436a6ab9416799bc0
MD5 4d755b08b17e997a40cb3b343c4cf3d0
BLAKE2b-256 ff67f6d2cc371176624bd8c854e4dab96fea2361659e697a282e12a2fc8d6f7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish_wheels.yml on nasa/cea

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

File details

Details for the file cea-3.1.0-cp311-cp311-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for cea-3.1.0-cp311-cp311-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 cb571eb7706b9b1348b37628eddc6558b11225252ad7fea963de4d61b8a50587
MD5 ad2983d115d0b16cb6975421bf6f3c0b
BLAKE2b-256 778df3f8a0d08a74785fc15372d2dfbf84a3cba2db5993667f9a768e7ce0d402

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.1.0-cp311-cp311-macosx_15_0_x86_64.whl:

Publisher: publish_wheels.yml on nasa/cea

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

File details

Details for the file cea-3.1.0-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

  • Download URL: cea-3.1.0-cp311-cp311-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: CPython 3.11, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cea-3.1.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 56b5b38a84f1c01a98a72b9676fd0de4cfb5060945cb00cbe9c45a7bef629991
MD5 41c687941cea995c41fe1e0a732b7395
BLAKE2b-256 12d47bd28ebb72391dc9fa39747b4351004e4d27bdf088a1d806b9f49b802c64

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.1.0-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: publish_wheels.yml on nasa/cea

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