Skip to main content

EnSim

EnSim is an open-source desktop application and Python package for liquid-rocket propulsion analysis and six-degree-of-freedom flight simulation. It is intended for preliminary design, reproducible trade studies and engineering education.

CI PyPI Python License

EnSim main window

What EnSim calculates

  • ideal-gas chemical equilibrium by constrained Gibbs-energy minimization;
  • adiabatic chamber temperature from coupled equilibrium and enthalpy balance;
  • frozen-composition, calorically perfect nozzle performance;
  • planar minimum-length method-of-characteristics nozzle contours;
  • preliminary regenerative-cooling heat transfer and pressure loss;
  • acoustic chamber-mode frequencies, with stability classification only when growth and damping rates are supplied;
  • local-frame and WGS-84/J2 six-degree-of-freedom trajectories;
  • staging, dispersion analysis, reduced-order optimization and uncertainty propagation.

The interface uses SI units. Long-running engine, flight and uncertainty jobs run outside the GUI event loop. Project files remain local; the application does not require a network connection.

Scientific status

EnSim distinguishes verification from validation:

  • thermodynamic polynomial evaluation, conservation equations and nozzle relations have analytical or invariant tests;
  • two gas-phase HP equilibrium cases are compared with results produced by the official NASA CEA 3.3.2 Python distribution;
  • dragless WGS-84 translation and torque-free rotation are compared with selected public NASA NESC check-case histories;
  • cooling correlations are checked against their equations and physical trends, but are not calibrated to a particular engine hot-fire data set;
  • the general aerodynamic flight model has not been validated against telemetry.
  • axial flight drag uses an explicit user-supplied coefficient rather than an undocumented synthetic Mach curve.

See validation, model limitations and theory before using results in a design decision. EnSim is not a certification, range-safety or hardware-release tool.

Installation

Python 3.10 or newer is required.

python -m pip install ensim
ensim

For a source checkout:

git clone https://github.com/SpaceEngineerSS/EnSim.git
cd EnSim
python -m venv .venv
python -m pip install -e ".[dev,docs]"
python -m pytest
python main.py

The command ensim --test performs a short installation and coupled-physics smoke test. It is not a substitute for the complete pytest suite.

Minimal Python example

from ensim.core.chemistry import CombustionProblem
from ensim.core.propulsion import NozzleConditions, calculate_performance
from ensim.utils.nasa_parser import load_default_database

database = load_default_database()
problem = CombustionProblem(database)
problem.add_fuel("H2", moles=2.0, temperature=298.15)
problem.add_oxidizer("O2", moles=1.0, temperature=298.15)
equilibrium = problem.solve(pressure=6.89e6)

nozzle = NozzleConditions(
    area_ratio=40.0,
    chamber_pressure=6.89e6,
    ambient_pressure=0.0,
)
performance = calculate_performance(
    T_chamber=equilibrium.temperature,
    P_chamber=nozzle.chamber_pressure,
    gamma=equilibrium.gamma,
    mean_molecular_weight=equilibrium.mean_molecular_weight,
    nozzle=nozzle,
)

print(equilibrium.temperature, performance.isp)

mean_molecular_weight is expressed in g/mol; pressures are Pa and temperatures are K.

Documentation

Development

python -m ruff check src tests
python -m pytest
python -m build
python -m twine check dist/*

Bug reports and scientific challenges are welcome through the issue tracker. A scientific issue should include units, full input data, the reference source and enough information to reproduce the comparison.

Primary references

  1. Gordon, S. and McBride, B. J., Computer Program for Calculation of Complex Chemical Equilibrium Compositions and Applications, Part I: Analysis, NASA RP-1311, 1994.
  2. McBride, B. J., Zehe, M. J. and Gordon, S., NASA Glenn Coefficients for Calculating Thermodynamic Properties of Individual Species, NASA/TP-2002-211556, 2002.
  3. Jackson, E. B., Murri, D. G. and Shelton, R. O., Check-Cases for Verification of 6-Degree-of-Freedom Flight Vehicle Simulations, Volume I, NASA/TM-2015-218675, 2015.
  4. Bartz, D. R., A Simple Equation for Rapid Estimation of Rocket Nozzle Convective Heat Transfer Coefficients, Jet Propulsion, 1957.
  5. Gordon, S. and McBride, B. J., Computer Program for Calculation of Complex Chemical Equilibrium Compositions and Applications, Part II: Users Manual and Program Description, NASA RP-1311, 1996.

License and citation

EnSim is released under the MIT License. Citation metadata is available in CITATION.cff.

Download files

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

Source Distribution

ensim-3.0.0.tar.gz (761.5 kB view details)

Uploaded Source

Built Distribution

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

ensim-3.0.0-py3-none-any.whl (779.9 kB view details)

Uploaded Python 3

File details

Details for the file ensim-3.0.0.tar.gz.

File metadata

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

File hashes

Hashes for ensim-3.0.0.tar.gz
Algorithm Hash digest
SHA256 a5428eae1f902ef99e14a980d613c2519259f3beb6f0f464405a5d9780a799de
MD5 7866f96a71dd174e6eb6dc78847712bb
BLAKE2b-256 efd015cf70b03261590c1c38f7102e06ce3dc6f10a33a0ae21cf21332deeb125

See more details on using hashes here.

Provenance

The following attestation bundles were made for ensim-3.0.0.tar.gz:

Publisher: release.yml on SpaceEngineerSS/EnSim

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

File details

Details for the file ensim-3.0.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for ensim-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 662346e0e4c1cc0c76ba1609784dc616c9851a1feba295f0d520d8c5bc33f866
MD5 e2afe0f4756239c3b31086eca1fd52df
BLAKE2b-256 a069c911e216409bc142f0ec84e1c579a2ba856eb26039750462b4276acb6d1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ensim-3.0.0-py3-none-any.whl:

Publisher: release.yml on SpaceEngineerSS/EnSim

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