Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flight-dynamics

Flight dynamics simulator written in Python. Simulate complex multi-stage rockets with different propellant and engine configuration.


How It Works

  • Implements NASA's Isentropic Flow equations.
  • A propellant class and an engine class calculate the thrust and geometry of the required engine.
  • Includes graph visualisation for altitude, velocity, thrust and dynamic pressure to visualise your rocket's flightpath.
  • Multiple stage simulation for more complex rocketry simulations.

Rocket Flight Analysis

Physics

The system estimates for the Mach number using the Newton-Raphson method. The Area-Mach relation equation is as follows:

$$\frac{A}{A^*}=\frac{1}{M}\left[\frac{2}{\gamma+1}(1+\frac{\gamma-1}{2}M^2)\right]^{\frac{\gamma+1}{2(\gamma-1)}}$$

Where $\gamma$ is the ratio of specific heats of the liquid propellant. The ratio shows that there are two solutions, one subsonic and one supersonic.


Historical Simulations

Rocket Fuel Graph
V2 B-Stoff (3:1 Ethanol:Water) V2 + B-Stoff Fuel
Falcon 9 Kerosene Falcon 9 + Kerosene

Tech Stack

  • Languages used: Python
  • Frameworks/libraries: matplotlib

What I Learned

  • Python OOP
  • Translating equations into code
  • Numerical Methods
  • Aerospace Engineering principles

Project Structure

├── README.md
├── data.py
├── engine.py
├── engine_math.py
├── images
│   ├── flight_20260308-235112.png
│   └── latest.png
├── main.py
└── requirements.txt

How to Run the Project

git clone https://github.com/liampallett/flight-dynamics.git
pip install -r requirements.txt
python main.py

Future Improvements

  • Implement a propellant dataset so hard-coded values are not necessary. Many simulations can be run with varying propellants to see the most effective for your rocket setup.

AI Usage Disclosure

The use of the generative AI tool Gemini 3 Fast/Pro was used in this project for consultation only. No code in this project was created by AI.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages