AeroProp-X
Open-source rocket nozzle design, Method-of-Characteristics (MOC) solver, and aerothermodynamic performance analysis — in pure Python.
AeroProp-X turns chamber conditions and a target expansion into a mathematically-grounded converging–diverging (de Laval) nozzle contour. It generates minimum-length MOC bells, Rao thrust-optimised bells, and conical baselines; maps the supersonic flow field; analyses over/under-expansion and flow separation; and exports CAD (CSV / DXF / FreeCAD-STEP) you can open in Fusion 360, SolidWorks, or FreeCAD. No paywalled toolbox required.
Scope and honesty. AeroProp-X models steady, inviscid, adiabatic, shock-free flow of a calorically-perfect gas. Results are ideal preliminary-design estimates — excellent for learning, sizing, and early trade studies, but not a replacement for CFD or hot-fire testing. Every approximation is documented in
docs/theory.md.
Architecture
┌─────────────────────────────────────────────┐
│ High-pressure combustion chamber (p0,T0) │
└───────────────────────┬─────────────────────┘
▼
Converging section
(subsonic acceleration)
│
▼
Throat (M = 1, sonic)
│
▼
┌──────────────── Diverging section ───────────────┐
│ supersonic expansion, M > 1 │
│ │
│ gasdynamics ──► moc ──► nozzle ──► flowfield │
│ (isentropic + (char. (MOC/Rao/ (Mach/p/T │
│ Prandtl-Meyer) mesh) conical) field) │
└──────────────────────┬───────────────────────────┘
▼
performance ──► cad_export / plotting
(C_F, c*, Isp, thrust, (CSV / DXF / FreeCAD-STEP,
expansion regime) contour & flow-field figures)
│
▼
Optimal contour: max thrust, shock-free,
uniform axial exit
Note on the original project brief. The brief that seeded this repo contained pipeline labels copied from an unrelated speech/NLP template — "Linguistic & Acoustic Decomposition", "Neural Synthesis Module", "Linguistic/Acoustic Expansion Lane". Those concepts have no meaning in nozzle aerodynamics and are not implemented. The architecture above reflects the actual gas-dynamics pipeline.
Installation
git clone https://github.com/your-org/aeroprop-x
cd aeroprop-x
pip install . # core (numpy, scipy)
pip install .[plot] # add matplotlib for figures
pip install .[dev] # add pytest for the test-suite
Requires Python ≥ 3.9.
Quick start (Python)
from aeroprop_x import moc_nozzle, evaluate, to_freecad_macro
# 1. Minimum-length MOC contour for exit Mach 2.6, 40 mm throat radius.
contour = moc_nozzle(exit_mach=2.6, n_characteristics=80, throat_radius=0.04)
print(contour.area_ratio, contour.length, contour.meta["area_ratio_error"])
# 2. Ideal performance at 10 km (pa ~ 26.5 kPa).
perf = evaluate(exit_mach=2.6, p0=5e6, pa=26_500, gamma=1.4,
R=287, T0=3000, throat_area=3.14159 * 0.04**2)
print(perf.report()) # C_F, c*, Isp, thrust, expansion regime
# 3. Export a FreeCAD macro that revolves the contour and writes STEP.
to_freecad_macro(contour, "nozzle.FCMacro")
Quick start (CLI)
# Design a minimum-length MOC contour and save CSV + DXF + a PNG.
aeroprop-x design moc --exit-mach 2.4 --throat-radius 0.05 \
--csv nozzle.csv --dxf nozzle.dxf --plot contour.png
# Design an 80% Rao bell from an area ratio.
aeroprop-x design bell --area-ratio 25 --throat-radius 0.05 --csv bell.csv
# Evaluate performance at altitude.
aeroprop-x analyze --area-ratio 25 --p0 7e6 --pa 26500 \
--gamma 1.22 --R 320 --T0 3500 --throat-area 0.01
# Export an MOC design straight to a FreeCAD STEP macro.
aeroprop-x export moc --exit-mach 3.0 --throat-radius 0.04 --freecad nozzle.FCMacro
What it does
- Nozzle contour generation. A rigorous planar minimum-length MOC solver (sharp-corner centred expansion, shock-free wall cancellation), plus a Rao thrust-optimised parabolic bell and a conical baseline. Enter exit Mach or area ratio.
- Supersonic flow-field plotting. Extract Mach, pressure, and temperature over the characteristic mesh and interpolate onto a regular grid for colour-mapped field plots.
- Expansion & separation analysis. Classify perfectly / under / over- expanded operation against ambient pressure and flag likely flow separation (Summerfield criterion).
- CAD export. Write CSV, ASCII DXF polylines, or a FreeCAD
.FCMacrothat revolves the contour to a solid and exports STEP for SolidWorks / Fusion 360 / FreeCAD.
Repository layout
aeroprop-x/
├── src/aeroprop_x/
│ ├── gasdynamics.py isentropic + Prandtl-Meyer relations
│ ├── moc.py Method-of-Characteristics min-length solver
│ ├── nozzle.py MOC / Rao bell / conical contour generators
│ ├── flowfield.py mesh -> Mach/p/T field extraction & gridding
│ ├── performance.py C_F, c*, Isp, thrust, expansion analysis
│ ├── cad_export.py CSV / DXF / FreeCAD-STEP export
│ ├── plotting.py contour, mesh, and field figures (matplotlib)
│ └── cli.py `aeroprop-x` command-line interface
├── tests/ pytest suite (gas dynamics, MOC, nozzle, perf)
├── examples/ quickstart.py, design_ssme_like.py
├── docs/theory.md equations, derivations, assumptions
├── validation_cases/ comparison vs tables & historical engines
├── pyproject.toml packaging + console-script entry point
├── CHANGELOG.md CONTRIBUTING.md LICENSE (MIT)
Validation
- Isentropic and Prandtl–Meyer outputs match standard compressible-flow tables to table precision.
- The MOC solver self-tests: for planar flow the exit height ratio converges to
the exact isentropic
A/A*(relative error ≈ 3×10⁻⁴ at n = 160 for M = 2.4), the peak centreline Mach equals the design Mach, and the exit flow leaves parallel to the axis.
See validation_cases/README.md for the full
tables and reproduction commands.
Key limitations (read before trusting a number)
- Planar MOC. The MOC solver is 2-D. Revolving its contour as axisymmetric
overshoots the design area ratio by
√(A/A*); for accurate axisymmetric area ratios userao_bell. A true axisymmetric MOC is on the roadmap. - Ideal gas, inviscid. No boundary layers, finite-rate chemistry, heat transfer, or real-gas effects; Isp and thrust are ideal upper estimates.
- Approximate defaults. Rao wall angles are coarse chart interpolations; the Summerfield separation threshold is an engineering estimate.
License
MIT — see LICENSE. Contributions welcome; see
CONTRIBUTING.md.
References
Anderson, Modern Compressible Flow (MOC, minimum-length nozzle) · Sutton & Biblarz, Rocket Propulsion Elements · Rao, "Exhaust Nozzle Contour for Optimum Thrust" (1958).
Metadata
Release files for aeroprop-x 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aeroprop_x-0.1.0.tar.gz | 30.4 kB | Without provenance | Details for aeroprop_x-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aeroprop_x-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for aeroprop_x-0.1.0-py3-none-any.whl |
Total release size: 58.6 kB
Release files / aeroprop_x-0.1.0.tar.gz
| Download URL | aeroprop_x-0.1.0.tar.gz |
|---|---|
| Size | 30.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88c6e2fd43bdfecbb6bbd9d4da1d2c76207958dfaae38da278b5b3665b1d2b95
|
|
BLAKE2b-256 checksum How to use checksums |
34ab7bf9293acddbbf67b9b8b47ab4620b784f7870dd9601c2752306bf1362ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.13
|
Release files / aeroprop_x-0.1.0-py3-none-any.whl
| Download URL | aeroprop_x-0.1.0-py3-none-any.whl |
|---|---|
| Size | 28.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
efe11b3a5c4e70b6f6f8015dc8af0333f0dd7d209dabfe759c081a804d11ed3d
|
|
BLAKE2b-256 checksum How to use checksums |
834bcd5224938cbae86c33234085c73d63b2295abe93d37931de42e80078a407
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.13
|
Security for aeroprop-x 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.