Skip to main content

ExoEOS

Differentiable equations of state for planetary atmospheres and fluids, built with JAX.

The first implementation is a calorically perfect ideal-gas mixture. It provides one small state interface that is intended to remain common to future real-gas models.

Installation

python -m pip install exoeos

Quick start

All public quantities use SI units. Component molar masses are in kg mol-1, component molar heat capacities are in J mol-1 K-1, temperature is in K, and pressure is in Pa.

import jax
import jax.numpy as jnp

from exoeos import IdealGas


eos = IdealGas(
    molar_masses=jnp.array([2.01588e-3, 4.002602e-3]),
    molar_heat_capacities=jnp.array([28.84, 20.786]),
)

x = jnp.array([0.85, 0.15])
state = eos.state(T=1000.0, P=1.0e5, x=x)

state.Z
state.mass_density
state.number_density
state.log_fugacity_coefficients
state.residual_gibbs
state.residual_enthalpy
state.cp
state.cv
state.thermal_expansion
state.adiabatic_gradient

jitted_density = jax.jit(
    lambda temperature: eos.state(temperature, 1.0e5, x).mass_density
)
density_gradient = jax.grad(jitted_density)(1000.0)

x contains normalized mole fractions on its last axis. ExoEOS does not renormalize composition. Component molar masses and heat capacities are required because T, P, and x alone do not determine mass density or caloric properties. Reference enthalpies and entropies default to zero; pass physical reference data when absolute values are needed.

The complete units, shape, reference-state, and transformation contract is in the thermodynamic-state contract.

Development

python -m pip install -e ".[test]"
pytest tests/unittests

The current scope is the ideal gas. Cubic equations of state, including Peng--Robinson, are reserved for later implementations behind the same state contract.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exoeos-0.1.0.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

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

exoeos-0.1.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file exoeos-0.1.0.tar.gz.

File metadata

  • Download URL: exoeos-0.1.0.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for exoeos-0.1.0.tar.gz
Algorithm Hash digest
SHA256 943368dfb7ea8d939352e10a97aa7c0dc15242c20257cc1b6a9aad9d470cd6b9
MD5 baa6185cf174de0678a6dcaa1b52e3b2
BLAKE2b-256 97f1522f18fb7fa4e36fe3658b0033ca3d5d97a31240ab1c68577c0bd6e2c731

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoeos-0.1.0.tar.gz:

Publisher: publish.yml on HajimeKawahara/exoeos

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

File details

Details for the file exoeos-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: exoeos-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for exoeos-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d069a7c15fa7a66ab9780a6c3afd60d7b124f2258b09d845afd8a6c113e21622
MD5 5901135058149d6ddc464e4a883bb171
BLAKE2b-256 890dd808f107f991c2d92570c6721c5e3a46be35858d03cf61dd87a6ff6e45bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for exoeos-0.1.0-py3-none-any.whl:

Publisher: publish.yml on HajimeKawahara/exoeos

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 Sentry Error logging StatusPage Status page