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.
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
- Architecture
- Theory and equations
- Validation evidence
- Flight verification
- Cooling model
- Combustion-instability model
- Uncertainty quantification
- API overview
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
- Gordon, S. and McBride, B. J., Computer Program for Calculation of Complex Chemical Equilibrium Compositions and Applications, Part I: Analysis, NASA RP-1311, 1994.
- McBride, B. J., Zehe, M. J. and Gordon, S., NASA Glenn Coefficients for Calculating Thermodynamic Properties of Individual Species, NASA/TP-2002-211556, 2002.
- 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.
- Bartz, D. R., A Simple Equation for Rapid Estimation of Rocket Nozzle Convective Heat Transfer Coefficients, Jet Propulsion, 1957.
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5428eae1f902ef99e14a980d613c2519259f3beb6f0f464405a5d9780a799de
|
|
| MD5 |
7866f96a71dd174e6eb6dc78847712bb
|
|
| BLAKE2b-256 |
efd015cf70b03261590c1c38f7102e06ce3dc6f10a33a0ae21cf21332deeb125
|
Provenance
The following attestation bundles were made for ensim-3.0.0.tar.gz:
Publisher:
release.yml on SpaceEngineerSS/EnSim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ensim-3.0.0.tar.gz -
Subject digest:
a5428eae1f902ef99e14a980d613c2519259f3beb6f0f464405a5d9780a799de - Sigstore transparency entry: 2454515731
- Sigstore integration time:
-
Permalink:
SpaceEngineerSS/EnSim@b65cafac0af8330386f97de5a53df5ca3c69280f -
Branch / Tag:
refs/tags/v3.0.0 - Owner: https://github.com/SpaceEngineerSS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b65cafac0af8330386f97de5a53df5ca3c69280f -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
662346e0e4c1cc0c76ba1609784dc616c9851a1feba295f0d520d8c5bc33f866
|
|
| MD5 |
e2afe0f4756239c3b31086eca1fd52df
|
|
| BLAKE2b-256 |
a069c911e216409bc142f0ec84e1c579a2ba856eb26039750462b4276acb6d1d
|
Provenance
The following attestation bundles were made for ensim-3.0.0-py3-none-any.whl:
Publisher:
release.yml on SpaceEngineerSS/EnSim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ensim-3.0.0-py3-none-any.whl -
Subject digest:
662346e0e4c1cc0c76ba1609784dc616c9851a1feba295f0d520d8c5bc33f866 - Sigstore transparency entry: 2454516434
- Sigstore integration time:
-
Permalink:
SpaceEngineerSS/EnSim@b65cafac0af8330386f97de5a53df5ca3c69280f -
Branch / Tag:
refs/tags/v3.0.0 - Owner: https://github.com/SpaceEngineerSS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b65cafac0af8330386f97de5a53df5ca3c69280f -
Trigger Event:
push
-
Statement type: