EnSim - Professional Rocket Engine & Flight Simulation Platform
Project description
EnSim
๐ Professional Rocket Engine & Flight Simulation Platform
Features โข Quick Start โข Documentation โข Validation โข Contributing
Overview
EnSim is an open-source desktop application for rocket propulsion analysis and flight simulation. It combines NASA-validated thermochemical equilibrium calculations with full 6-DOF trajectory simulation, all within a modern, user-friendly interface.
Whether you're a student learning rocket science, a researcher exploring propulsion concepts, or an engineer performing preliminary design analysis, EnSim provides the tools you need.
๐ธ Screenshots
Click to expand screenshots
Results & Graphs
Engine Analysis (Thermal & Cooling)
Vehicle Configuration (Multi-Stage)
3D Nozzle Visualization
Advanced Engineering
โจ Features
๐ฌ Thermochemical Analysis
- NASA CEA Methodology: Gordon-McBride equilibrium solver with Gibbs free energy minimization
- Comprehensive Species Database: 35+ species including Hโ, Oโ, CHโ, RP-1, NโOโ, UDMH, MMH
- High-Temperature Dissociation: Full accounting for H, O, OH, NO, and other radicals
- Validated Accuracy: <2% error vs NASA CEA reference data
๐ Performance Calculations
- Chamber Temperature: Adiabatic flame temperature with dissociation
- Characteristic Velocity (C)*: Key measure of combustion efficiency
- Specific Impulse (Isp): Both vacuum and sea-level values
- Thrust Coefficient (Cf): With nozzle divergence corrections
๐ฏ 6-DOF Flight Simulation
- Full Rigid Body Dynamics: Quaternion-based orientation (no gimbal lock)
- Adaptive Integration: RK45 Dormand-Prince with automatic step sizing
- Aerodynamic Models: Configurable drag and stability derivatives
- Dense Output: Cubic Hermite interpolation for smooth trajectories
๐ฒ Monte Carlo Analysis
- Landing Dispersion: CEP and 3-sigma confidence ellipses
- Performance Variability: Statistical analysis of Isp, thrust, burn time
- Parallel Processing: Multi-core execution for thousands of runs
- Visualization: Scatter plots, histograms, and probability contours
๐ง Advanced Engineering Tools
- Multi-Stage Vehicles: Full staging simulation with preset rockets (Falcon 9, Saturn V)
- Regenerative Cooling: Bartz correlation thermal analysis with channel design
- Trajectory Optimization: Nozzle expansion ratio and stage mass allocation
- Materials Database: 10 aerospace materials with thermal properties
- 17 Propellant Presets: Ready-to-use fuel/oxidizer combinations
๐จ Modern User Interface
- Mission Control Aesthetic: SpaceX-inspired dark theme with cyan/green neon accents
- Real-time KPI Dashboard: Live display of key performance metrics
- Interactive 3D Visualization: PyVista-powered nozzle and trajectory display
- SI/Imperial Units: One-click unit system toggle
- Professional Exports: CSV data, Markdown reports, STL/OBJ/PLY 3D models
๐ Quick Start
Prerequisites
- Python 3.10 or higher
- pip package manager
Installation
Option 1: Install from PyPI (Recommended)
pip install ensim
Option 2: Install from Source
# Clone the repository
git clone https://github.com/SpaceEngineerSS/EnSim.git
cd EnSim
# Create virtual environment (recommended)
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# Linux/macOS:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
Running EnSim
# Launch the GUI application
python main.py
# Run with validation tests
python main.py --test
First Simulation
- Select Propellants: Choose fuel (e.g., Hโ) and oxidizer (e.g., Oโ)
- Set Conditions: Enter O/F ratio, chamber pressure, expansion ratio
- Run Simulation: Click "RUN SIMULATION" to calculate performance
- Analyze Results: View KPIs, graphs, and 3D nozzle visualization
๐ Documentation
| Document | Description |
|---|---|
| ARCHITECTURE.md | System design and physics overview |
| docs/THEORY.md | Mathematical formulation and equations |
| docs/VALIDATION.md | NASA CEA comparison results |
| CONTRIBUTING.md | Contribution guidelines |
| CHANGELOG.md | Version history |
โ Validation
EnSim is rigorously validated against NASA CEA, the industry standard for rocket propulsion analysis.
Validation Summary
| Propellant Combination | T_chamber Error | Isp Error | Status |
|---|---|---|---|
| LOX/LHโ | 1.76% | 1.41% | โ Pass |
| LOX/CHโ | 0.48% | 1.07% | โ Pass |
| LOX/RP-1 | 0.49% | 0.86% | โ Pass |
| NโOโ/UDMH | 0.56% | 0.85% | โ Pass |
Overall Accuracy: Average error <1% across all validated cases
See VALIDATION.md for detailed comparison data.
๐๏ธ Architecture
EnSim/
โโโ ๐ src/
โ โโโ ๐ core/ # Physics Engine (Numba JIT)
โ โ โโโ chemistry.py # Gibbs equilibrium solver
โ โ โโโ propulsion.py # Nozzle flow calculations
โ โ โโโ flight_6dof.py # 6-DOF dynamics
โ โ โโโ integrators.py # RK45, Hermite interpolation
โ โ โโโ monte_carlo.py # Dispersion analysis
โ โ โโโ thermodynamics.py # NASA polynomial evaluation
โ โ
โ โโโ ๐ ui/ # User Interface (PyQt6)
โ โ โโโ windows/ # Main window, dialogs
โ โ โโโ widgets/ # Custom widgets
โ โ โโโ workers.py # Background threads
โ โ
โ โโโ ๐ utils/ # Utilities
โ โโโ nasa_parser.py # Thermo data parser
โ โโโ exporters.py # Data export functions
โ
โโโ ๐ data/ # NASA thermodynamic database
โโโ ๐ tests/ # Test suite (pytest)
โโโ ๐ docs/ # Documentation
โโโ ๐ assets/ # Icons, stylesheets
๐ง Technology Stack
| Component | Technology | Purpose |
|---|---|---|
| GUI | PyQt6 | Modern cross-platform interface |
| Numerics | NumPy, SciPy | Array operations, optimization |
| Acceleration | Numba | JIT compilation for 10-100x speedup |
| 3D Visualization | PyVista | Interactive nozzle/trajectory display |
| 2D Plots | Matplotlib | Scientific plotting |
| Testing | pytest | Unit and validation tests |
๐ค Contributing
We welcome contributions from the community! Whether it's:
- ๐ Bug Reports: Found an issue? Open a bug report
- โจ Feature Requests: Have an idea? Suggest a feature
- ๐ฌ Scientific Issues: Validation concerns? Report a scientific issue
- ๐ป Code Contributions: Ready to code? See CONTRIBUTING.md
Development Setup
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Run linting
ruff check src/
# Format code
black src/ tests/
๐ License
This project is licensed under the MIT License - see LICENSE for details.
๐ Acknowledgments
- NASA Glenn Research Center - Thermodynamic polynomial database
- Sutton & Biblarz - "Rocket Propulsion Elements" reference
- The open-source scientific Python community - NumPy, SciPy, Matplotlib
๐ References
-
Gordon, S. & McBride, B.J. (1994). "Computer Program for Calculation of Complex Chemical Equilibrium Compositions and Applications". NASA Reference Publication 1311.
-
McBride, B.J., Zehe, M.J., & Gordon, S. (2002). "NASA Glenn Coefficients for Calculating Thermodynamic Properties of Individual Species". NASA/TP-2002-211556.
-
Sutton, G.P. & Biblarz, O. (2017). "Rocket Propulsion Elements". 9th Edition, Wiley.
-
Anderson, J.D. (2003). "Modern Compressible Flow". 3rd Edition, McGraw-Hill.
Made with โค๏ธ for the aerospace community
Project details
Release history Release notifications | RSS feed
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-2.0.0.tar.gz.
File metadata
- Download URL: ensim-2.0.0.tar.gz
- Upload date:
- Size: 219.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10541962549c630a145f64d4438a32d026e53c3bb3bd229e0c9456d3527c7bb6
|
|
| MD5 |
5cbb5ca9bae5483c696b1492bdca5727
|
|
| BLAKE2b-256 |
7c32106bfadbb8348246dc82b9417d27c0d44fd0b40bd85477ebaeaa301d45ac
|
Provenance
The following attestation bundles were made for ensim-2.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-2.0.0.tar.gz -
Subject digest:
10541962549c630a145f64d4438a32d026e53c3bb3bd229e0c9456d3527c7bb6 - Sigstore transparency entry: 788315790
- Sigstore integration time:
-
Permalink:
SpaceEngineerSS/EnSim@c640b127d19e39c9493a2891401af7353cced8b8 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/SpaceEngineerSS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c640b127d19e39c9493a2891401af7353cced8b8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ensim-2.0.0-py3-none-any.whl.
File metadata
- Download URL: ensim-2.0.0-py3-none-any.whl
- Upload date:
- Size: 249.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4131d97c398df4cb223f5fbafeb4a0180ebffceb6052add860a0a701a1893495
|
|
| MD5 |
f3d1c37b9bc686f5f35f67641099f05b
|
|
| BLAKE2b-256 |
9d4b8c1b183af24c1a56811260ba22777a83dbbf84c212a4a902edb43ade070a
|
Provenance
The following attestation bundles were made for ensim-2.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-2.0.0-py3-none-any.whl -
Subject digest:
4131d97c398df4cb223f5fbafeb4a0180ebffceb6052add860a0a701a1893495 - Sigstore transparency entry: 788315793
- Sigstore integration time:
-
Permalink:
SpaceEngineerSS/EnSim@c640b127d19e39c9493a2891401af7353cced8b8 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/SpaceEngineerSS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c640b127d19e39c9493a2891401af7353cced8b8 -
Trigger Event:
push
-
Statement type: