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.

Build and Install

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.inp

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

The new Python binding provides direct access to compiled CEA routines. The basic installation process is as follows:

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

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

python source/bind/python/cea/samples/h2_02.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.0.tar.gz (709.5 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.0-cp313-cp313-win_amd64.whl (3.0 MB view details)

Uploaded CPython 3.13Windows x86-64

cea-3.0.0-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.0-cp313-cp313-macosx_15_0_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.13macOS 15.0+ x86-64

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

Uploaded CPython 3.13macOS 14.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

cea-3.0.0-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.0-cp312-cp312-macosx_15_0_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.12macOS 15.0+ x86-64

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

Uploaded CPython 3.12macOS 14.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

cea-3.0.0-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.0-cp311-cp311-macosx_15_0_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.11macOS 15.0+ x86-64

cea-3.0.0-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.0.tar.gz.

File metadata

  • Download URL: cea-3.0.0.tar.gz
  • Upload date:
  • Size: 709.5 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.0.tar.gz
Algorithm Hash digest
SHA256 319b650d6ed9ecc92f5eafc180dbd9fd3e51a4394dcb9b7177d366c52813f6be
MD5 cd54d87de6ff051f54260f9ff9dac6e0
BLAKE2b-256 81a02015b48f8e2af31c886be6683678659c3e3844f7cdcbfb2ecc012d7f4498

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cea-3.0.0-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.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 fb13797d3081e63edec38477aede8e94a779799deb45240381c2f17bbf644e26
MD5 0318fb7a16415c6c3823f5c0e477077b
BLAKE2b-256 d91b61837070d9e5e7a2b369e75a0c525c00a6b07d7f868b17a41f9d44982d9d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cea-3.0.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f484e334f88efcd6cf3f8392e38265624c8c0b457f39188bb29f7adab0db176f
MD5 d97f656467d15b2e6e8d11c417e0a577
BLAKE2b-256 29c6c5bd3d7b83d975483bd0d38042efd83cd66de28a33c2555b3272effa229b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cea-3.0.0-cp313-cp313-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 32ee5a31f8482383f46afddcae27949be22c10f901778a92c278e833e9b5c119
MD5 171d844d120a90838ae6fab0f304174a
BLAKE2b-256 34aa6386eab3bfd6173797f27f582939fb792b17a1908fe66af99deaa04e0d00

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cea-3.0.0-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.0-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 3fdaee87a44f19e992e3a38afce3e84f742248793ca2e6a83b990392bbf69101
MD5 5a00b5c58650334c8e8e1651a2112e64
BLAKE2b-256 7dc89d0593ca7281559963e80970c65f15af469feaea8dde4190929660cbb602

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cea-3.0.0-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.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fa5950a9b367ae223a76db4008b0ee62ef1aee42925270dc38fd5cf9279942b8
MD5 85a9d3dc64cbdb8b923cc97c48ace78a
BLAKE2b-256 126676d69babf337b6921feccd1b0a6fdd1d023633432cec4c682063b9d8fb59

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cea-3.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f2f702bf85466af3af9dcb7ad3286ba3489553227b804d091628791df73e0a40
MD5 d585419fe286ea02e17e2134b0dff99e
BLAKE2b-256 8cc0b69ece9ba8bc3e60249532f0f37a744ffb9d30a002de0f6d91df2ec7c7b7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cea-3.0.0-cp312-cp312-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 fa6a6622f73c0b5acc9056d602e2d7faf82375bc5a7704fc8b492ece5545e258
MD5 2426ab2ec6b07d9ce085ee1a21e2c210
BLAKE2b-256 45f397c247f89a21caa5ac01f7f3b8300ad7978b27a6cd05da7db3762b98764d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cea-3.0.0-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.0-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 072d54d744b438ebe74aafd1a30967b505ec773be96acb5fa50254d0d71f2883
MD5 715c6093719c18952c5c034b0028f933
BLAKE2b-256 2e059756d43e057d8dee0eddeba3885c9aa2693fb693a76d09aa5cdcfd2a1d22

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cea-3.0.0-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.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 490489529710b4d98e8b85839d7b77883caaf1060fb695e8ce5567d09d8b75c0
MD5 fbce3ae7c748bbae447adc8a6d00eac3
BLAKE2b-256 a247d535e36eed9bbacde4e620146c464ab7fd0f79a863ecb5226c38fa526788

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cea-3.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a759ec1c59818120852691257bd84dc495b17ce973150d2b18685fefa69ff9b9
MD5 6d8d0bee13f3b9811807abeb3e49e88f
BLAKE2b-256 791e81d205bf2b0087ff959a5ed2f94c4b65f364e29e644a80f552ac4b6d906c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cea-3.0.0-cp311-cp311-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 9d6e54147c89ce4d5964b3d2e33f2bba4d3718b6ea58d3c720dbfe4422c64215
MD5 36724e6df5abb1e1ee77db0ed5fad6f0
BLAKE2b-256 8af013bacd61e159c6588cdcf991a242649b2a33966fb7624ba1d1d3a4415dad

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cea-3.0.0-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.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 b7d3960793421279b9329611d046951dabdbba10cbd2a5e86c9127acdf6c0c20
MD5 693445543c488724373994db293e55c0
BLAKE2b-256 1823979f3d728879015616eb2d7e7747e64ef30cdc57930e37213dfe59a65049

See more details on using hashes here.

Provenance

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