A bouncing ball

A ball of mass $m$ is thrown and bounces on the floor. The forces acting on this ball are gravity $-mg\hat{z}$, a drag force proportional to the velocity$-a\vec{v}$, and the force exerted by the floor when it bounces. The floor can be described as an elastic material that pushes up with a force $-kzH(-z)\hat{z}$. Here $k$ is the elastic contant and the Heaviside function $H(-z)$ ensures that this force only if the ball falls below $z=0$.

The larger the elastic constant $k$ is, the less the ball will go below $z=0$ and the simulation will approach bounces off a hard floor. However, some care must be taken in choosing the time step $\Delta t$. It should be much smaller than $2\pi\sqrt{m/k}$ so that the solver can describe the bounces off the floor properly. Some differential equation solvers adjust the time step automatically to account for problems like this.

$\vec{F} = m\frac{d^2\vec{r}}{dt^2} = -a\vec{v}-mg\hat{z} -kzH(-z)\hat{z}$

$m=$  kg $a=$  N s/m $k=$  N/m

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]