Rocket launch

A model rocket with a mass $m$ is launched with a motor that provides a upward force of $F_{\text{thrust}}$ for 3 seconds. This force can be expressed mathematically as $\vec{F}=F_{\text{thrust}}H(3-t)\hat{z}$ where $H(x)$ is the Heaviside step function. As the rocket uses fuel, its mass decreases. In the example below, the rocket looses half of its mass in the three seconds that it accelerates and then the mass remains constant, $m=0.1(2-H(3-t)t/3-H(t-3))$. Other forces that act on the rocket are gravity $-mg\hat{z}$ and a drag force that can be described by,

$\large \vec{F}_{fric} = -a(\vec{v}-\vec{v}_{\text{wind}}) - b(\vec{v}-\vec{v}_{\text{wind}})|(\vec{v}-\vec{v}_{\text{wind}})|,$

where $a$ and $b$ are constants and $\vec{v}_{\text{wind}}$ is the velocity of the wind which can depend on position and time.

$\vec{F}=0.1(2-H(3-t)t/3-H(t-3))\frac{d^2\vec{r}}{dt^2} = F_{\text{thrust}}H(3-t)\hat{z}-a(\vec{v}-\vec{v}_{\text{wind}}) - b(\vec{v}-\vec{v}_{\text{wind}})|(\vec{v}-\vec{v}_{\text{wind}})|-mg\,\hat{z}$

$m=$  kg $F_{\text{thrust}}=$  N $a=$  N s/m $b=$  N s²/m²

The three components of the wind vectors can be functions of space and time.
$v_{\text{wind},x}=$  m/s $v_{\text{wind},y}=$  m/s $v_{\text{wind},z}=$  m/s

The initial conditions at time $t=0$ are,
$x=$  m  $y=$  m  $z=$  m  $v_x=$  m/s  $v_y=$  m/s  $v_z=$  m/s

 3-D motion differential equation solver 

$ F_x=$

 [N]

$ F_y=$

 [N]

$ F_z=$

 [N]

$ m=$

 [kg]  
Initial conditions:

$t_0=$

 [s]

$\Delta t=$

 [s]

$x(t_0)=$

 [m]

$N_{steps}$

$v_x(t_0)=$

 [m/s]

Plot:

vs.

$y(t_0)=$

 [m]

$v_y(t_0)=$

 [m/s]

$z(t_0)=$

 [m]

$v_z(t_0)=$

 [m/s]

 

= , =


the animation to zoom or rotate.

 $t$ [s] $x$ [m] $y$ [m] $z$ [m] $v_x$ [m/s] $v_y$ [m/s] $v_z$ [m/s] $F_x$ [N] $F_y$ [N] $F_z$ [N] $P$ [W] $E_{\text{kin}}$ [J] $W$ [J]