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.0.4.tar.gz (716.7 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.0.4-cp313-cp313-win_amd64.whl (3.0 MB view details)

Uploaded CPython 3.13Windows x86-64

cea-3.0.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.8 MB view details)

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

cea-3.0.4-cp313-cp313-macosx_15_0_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.13macOS 15.0+ x86-64

cea-3.0.4-cp313-cp313-macosx_14_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

cea-3.0.4-cp312-cp312-win_amd64.whl (3.0 MB view details)

Uploaded CPython 3.12Windows x86-64

cea-3.0.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.8 MB view details)

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

cea-3.0.4-cp312-cp312-macosx_15_0_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.12macOS 15.0+ x86-64

cea-3.0.4-cp312-cp312-macosx_14_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

cea-3.0.4-cp311-cp311-win_amd64.whl (3.0 MB view details)

Uploaded CPython 3.11Windows x86-64

cea-3.0.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.8 MB view details)

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

cea-3.0.4-cp311-cp311-macosx_15_0_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.11macOS 15.0+ x86-64

cea-3.0.4-cp311-cp311-macosx_14_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for cea-3.0.4.tar.gz
Algorithm Hash digest
SHA256 d32a8544134d24929b169e68e82b653b4bc785ef935e196636dfdcd69336ec43
MD5 9d59d81a6883ea55e61892ed79782e5e
BLAKE2b-256 52db40562f750c1672eaa75b14ce5048a8806324429ab99ac4f160fb6945eae0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.0.4.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.0.4-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: cea-3.0.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.0 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.0.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b4181e53f0095bd77881f52085a98a7c66272b031c0b7b9f2c7079c753e559af
MD5 fdbeb61ab8f2153fc93f11c034c0beaa
BLAKE2b-256 2db2858da74bb8d33f19c60457f7754e2bece95b3c56f0443e5712de69a0546b

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.0.4-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.0.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cea-3.0.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0eb6be2964727c375730d18c1a1291697803b685117d63b22addd8d95d196b15
MD5 66dd00c94677b091ad16b72a28ac7000
BLAKE2b-256 6404ac18df7a8490195a25d462964fd1cb680ce3576bc93711b8e95e7506bf33

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.0.4-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.0.4-cp313-cp313-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for cea-3.0.4-cp313-cp313-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 d3c52c219e215e59c8ffe3f2fc32d4ef87d2f7650545bddbc8262b13145b6844
MD5 cb98012f842b0c713237f9e8da2edbc3
BLAKE2b-256 d367c2137b6cfc0ac27eb524357eac728098bed860e4b76e44b2f7b741257f65

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.0.4-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.0.4-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

  • Download URL: cea-3.0.4-cp313-cp313-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 2.2 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.0.4-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 0143abcbf806157628cc147926c9ca4f6b6fd500aedcfaf6be03738fbe4a5fe1
MD5 fbd45d51e5f0642aa37d97a1c247bc0f
BLAKE2b-256 6bec7d9dad7bcb2e5aad3989894e0b3cc2fbca8433f11790e3daf9ea4d288a73

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.0.4-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.0.4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: cea-3.0.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.0 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.0.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 383b64757fb4d58aab2e95d0e907aed5fa430d787547aa8a24739db34e184eb3
MD5 95a4bf573138c1fcad2558251abc5e73
BLAKE2b-256 6f4d2d20fe587afc34df030124d8191829386e7fd8104adb44034d59f3873e98

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.0.4-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.0.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cea-3.0.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f56c0eb52fc4e9867f448352768550ad029b494814dd714b9c80599c4ada6388
MD5 b4aec1d826584b1f026c6600cea14aba
BLAKE2b-256 b91098db7545ce798214cef5ffbec0d840b27a3e05849733a7936fee10759fb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.0.4-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.0.4-cp312-cp312-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for cea-3.0.4-cp312-cp312-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 9cf179522300bed20f38e74b75eb2099d9dc0ff8c4c145a825f39f6f2d2b9dfa
MD5 94a38e86ff85f651310485201077ba9e
BLAKE2b-256 3837426b46d18f462428a749f23367152d186d2e34c7235ea3df956944d846c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.0.4-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.0.4-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

  • Download URL: cea-3.0.4-cp312-cp312-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 2.2 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.0.4-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 9344c5b8d07a5ca5c0bc8a91c615c6299ac0c3d955d5d2a2fac2f01df443a860
MD5 d7c8cc72ef1fbf8817e070119f258e18
BLAKE2b-256 fa606b69a599fef371d5b3e86900fb8660dbe68f1b41c0fabdec0f375becafb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.0.4-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.0.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: cea-3.0.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.0 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.0.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fcb4bb7b834123f460ea5a6cea8669cd16a800d3c0a6356f0364c8c752edaad6
MD5 057bafe8787b4e0d1dab65ee1f4400ac
BLAKE2b-256 7323b87601b228f526d1cf9707d94bb17062e1045a1ba63bc6d766d98e398826

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.0.4-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.0.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cea-3.0.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5c336e3154b3ffcb28a793eb241ecea138ed706cb3e5ca7c84e30792e20149f6
MD5 6d693cdd01355486e903e3a06ce32455
BLAKE2b-256 f68f951099b0670693c689ada89c365e781258b28557f7d400679ac288da0627

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.0.4-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.0.4-cp311-cp311-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for cea-3.0.4-cp311-cp311-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 8295c412c86c319aa0e17168524c4437991d9b4a3e64a54dcd71d2b483f2bff7
MD5 60cb389b399c3d6b43e899ad60e10247
BLAKE2b-256 a12b9318a689ae0857fdfd49b63ec3e62552876c92b9037c3c5d2a04c331f8dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.0.4-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.0.4-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

  • Download URL: cea-3.0.4-cp311-cp311-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 2.2 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.0.4-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 b77b4de2866ece35bda25797f54f9a1bfed7691a45d1b20424b1bfc2e2ba92bc
MD5 4c5d4ccdca4872108be9257e824abdd5
BLAKE2b-256 a32ad918e52db52da0a0a60b2b275110b93783648743b0ec6a7d59d335dfede8

See more details on using hashes here.

Provenance

The following attestation bundles were made for cea-3.0.4-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