https://github.com/forentfraps/rocket-flight-simulation
Made a graphical for rocket flying considering non-constant mass and air friction, turned out to look pretty cool
https://github.com/forentfraps/rocket-flight-simulation
physics physics-3d python rocket science scipy
Last synced: about 1 month ago
JSON representation
Made a graphical for rocket flying considering non-constant mass and air friction, turned out to look pretty cool
- Host: GitHub
- URL: https://github.com/forentfraps/rocket-flight-simulation
- Owner: forentfraps
- Created: 2022-03-23T00:07:48.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-24T18:28:50.000Z (about 3 years ago)
- Last Synced: 2025-01-26T17:37:17.019Z (3 months ago)
- Topics: physics, physics-3d, python, rocket, science, scipy
- Language: Python
- Homepage:
- Size: 36.1 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rocket-flight-simulation
Made a graphical demonstration for rocket flying, considering non-constant mass and air friction, turned out to look pretty cool# Theory
For such tasks involving non-constant mass I will be using the *mesherskiy equation*

"F.." means external forces, such as air friction and gravitation pull

Our rocket will have 2 phases:
- With fuel, meaning differing mass, drag from the fuel exhaustion
- Without fuel, constant mass, basically only air friction
After all those preparations we can finally make out final equations

After expanding it into a 3 equation system it turnes out to be non-linear differential equations, which i am not going to solve analytically
However we can try them out with some test data, to later reffer to this as an expected result
*Note:* I will be doing x/y reffering to horizontal/vertical plane, however in the code x\y is horizontal and z in vertical**PART 1**

**PART 2**

# Testing Theory
*Im using this input to plot my data manually: plot_me("red", a =math.pi/4 , b = math.pi/2.38,fcons =700,fsp = 23000 , v =10)*
it has a very horizontal trajectory, much like a real rocket
x1[t]

v1x[t]

x2[t]

v2x[t]

z1[t]

vz1[t]

z2[t]

vz2[t]

Compairing theory and my data, it seems as it is quite similar, which concludes as a success
I will include some actual plots, which my code can perform:



**Note:** after a closer look at the code, you could see that wind is indeed in the equation, HOWEVER, it shows wierd results, so it is better left at 0


**TODO:**
-Make dynamic graphs, add easy support for x/y/z[t] as shown above (were done in a janky way)
-Fix the windHUGE THANKS TO Chelovechecheggg#5451 for helping