- Considers rocket and propellant mass (dry = 0.6 * total)
- will let you know if your proposed nozzle geometry is garbage (does not accept shock waves)
- long time ago hobby project for a friend's aerospace course (no warranty, express or implied)
REQUIRES PYTHON 3.13
- Make sure build tools are upgraded
pip install --upgrade pip setuptools wheel pip install -r requirements.txt- Original dependency gas_dynamics requires incompatible numpy version, so we build it from this fork instead,
which has removed the dependency version constraints from gas_dynamics.
Note that this might break some stuff but for our usage it seems to work.
pip install git+https://github.com/SamuelHelbling/gas_dynamics.git
- numpy and matplotlib are required by gas_dynamics and my code
- scipy is just required by gas_dynamics
Run: python calculate.py [A*] [A/A*] [initial mass] [0 | 1]
Last 0 or 1 param specifies if the following graphs are generated:
Acceleration = f(t)Velocity = f(t)Height = f(t)Thrust = f(t)Drag = f(t)
- For small-scale supersonic nozzles, area ratios are often
2–10. For rocket engines, ratios can be up to50–100. - Typical throat areas
0.0003-0.03for small and lab nozzles,0.7-12for large rocket engines. - Throat area affects mass flow!
- This program considers 60% initial mass as dry mass (hardcoded - but easy to change)
This script simulates a rocket powered by perfect air (γ=1.4) with the following input parameters:
- Critical Area (= area at throat) [m2] ->
A* - Area Ratio ->
A/A* - Rocket Mass

The frontal area considered for drag calculations is equal to the nozzle exit area.
Stagnation pressure (P0) and temperature (T0) may also be specified by editing the script file.
Runs several iterations looking for the combination that produces the highest flying rocket.
At the moment this is ridiculously slow (optimization required xd)
Tweak the parameter ranges directly in the code