The V2 Rocket was the world's first long-range ballistic missile.
total mass = 12500 kg
mass of propellant = 8720 kg
mass of rocket body = 3780 kg
exhaust speed = 2000 m/s
thrust = 265,000 N
In [1]:
%matplotlib inline
In [2]:
from __future__ import division, print_function
from numpy import *
from ivisual import *
import matplotlib.pyplot as plt
In [3]:
mfuel=8720
mbody=3780
m0=mfuel+mbody
m=mfuel+mbody
mf=mbody
vexhaust=2000
thrust=2.65e5
mdot=-thrust/vexhaust
r=vector(0,0,0)
v=vector(0,0,0)
t=0
dt=0.005
tlist=[]
xlist=[]
vxlist=[]
mlist=[]
vtheorlist=[]
while m>mf:
Fthrust=vector(thrust,0,0)
Fnet=Fthrust
m=m+mdot*dt
v=v+Fnet/m*dt
r=r+v*dt
vtheor=vexhaust*log(m0/m)
t=t+dt
tlist.append(t)
xlist.append(r.x)
vxlist.append(v.x)
mlist.append(m)
vtheorlist.append(vtheor)
print("burnout at t=",t," s")
print("velocity at burnout = ",v.x," m/s")
print("mass at burnout = ",m," kg")
print("displacement at burnout=",r.x," m")
In [4]:
plt.title('vx vs m')
plt.xlabel('m (kg)')
plt.ylabel('vx (m/s)')
plt.plot(mlist,vxlist,'y.',mlist,vtheorlist,'r-')
plt.show()
In [5]:
plt.title('vx vs t')
plt.xlabel('t (s)')
plt.ylabel('vx (m/s)')
plt.plot(tlist,vxlist,'b.')
plt.show()
In [6]:
plt.title('x vs t')
plt.xlabel('t (s)')
plt.ylabel('x (m)')
plt.plot(tlist,xlist,'b.')
plt.show()
In [6]: