r/learnpython • u/Miserable-Week3020 • Oct 03 '26
I need help with a rocket simulator I'm buidling
I'm a high school student who is interested in becoming an aerospace engineer so in the summer I decided to start building a rocket simulator in python for fun.
What it does so far:
- Parses real motor thrust-curve files (RASP
.engformat) and interpolates them withnumpy.interpinstead of hardcoding constants - Implements RK4 integration from scratch for the actual flight dynamics (upgraded from Euler once I understood why it wasn't accurate enough)
- Monte Carlo analysis, runs the full flight simulation ~200 times with randomized conditions and aggregates the results
- 3D visualization two ways: PyVista for a quick animated flight path, and a full Blender (
bpy) pipeline that imports a real 3D rocket model, keyframes it along the simulated trajectory, and renders it with Cycles - Modular structure, physics, motor parsing, atmosphere model, and stability calc are all separate importable modules, not one giant script
Would really appreciate feedback on the code itself, structure, whether my module boundaries make sense, anything that reads as non-idiomatic Python, places I should be using classes instead of dicts/functions, that kind of thing.
Github : https://github.com/AliHilalii/Rocket-simulator
Thanks a lot guys.