In this problem you are going to model the motion of a human doing a cannonball dive into a pool.

While in the air, the drag force on the person is negligible. Once in the water, however, the drag force is significant and is given by $F^d=\frac{1}{2}\rho_wC_dAv^2$, where $\rho_w$ is the density of water, $C_d\simeq 0.5$ is the drag coefficient for a sphere, and $A$ is the cross-sectional area. Another force that is significant in the water but not the air is the buoyant force, which points upward and is given by $F^b=\rho_wVg$, where $\rho_w$ is the density of the water and $V$ is the volume of the water that is displaced. (For the sake of simplicity, you can assume that the displaced volume is equal to the volume of the sphere even when the sphere is only partially submerged.)
Determine an expression for the velocity of a person in cannonball position as a function of time. Do this in three separate stages: falling through air, falling through water, and rising through water.
Create a VPython simulation of the motion assuming that the person drops from rest above the pool. Don't use the expression for velocity that you derived above; instead start with the expression for acceleration and update the velocity in small time steps. Since drag and the buoyant force are not important until the person hits the water, you will have to use an if/else statement to "turn on" those forces. Have the simulation stop after 10 seconds. (Hint: The VPython functions mag and hat will be useful here.)
*The person is a point mass
*The person drops from rest above the pool
*While in the air, the drag force on the person is negligible.
*The displaced volume is equal to the volume of the sphere even when the sphere is only partially submerged.
Include interaction diagrams and free body diagrams with axes indicated.

$\ - F^g_{EP} = m\ddot{y} $
$\ - mg = m\ddot{y} $
$\ \ddot{y} = - g $
$\ F^B_{WP} - F^D_{WP} - F^g_{EP} = m\ddot{y} $
$\ \frac{1}{2}P_{w}C_{d}A\dot{y^2} + P_{w}V_{g} - mg = m\ddot{y} $
$\ \ddot{y} = \frac{\frac{1}{2}P_{w}C_{d}A\dot{y^2} + P_{w}V_{g} - mg}{m} $
$\ F^D_{WP} + F^B_{WP} - F^g_{EP} = m\ddot{y} $
$\ P_{w}V_{g} - \frac{1}{2}P_{w}C_{d}A\dot{y^2} - mg = m\ddot{y} $
$\ \ddot{y} = \frac{\frac{1}{2}P_{w}C_{d}A\dot{y^2} + P_{w}V_{g} - mg}{m} $
$\ \frac{dv}{dt} = -g $
$\ \int^{v(t)}_{v_{0}} dv = int^{t}_{0} -g dt $
$\ v(t) = v_{0} - g $
$\ \frac{dv}{dt}m = \frac{1}{2}P_{w}C_{d}A\dot{y^2} + P_{w}V_{g} - mg $
$\ \frac{2m}{P_{w}C_{d}A} \int^{v(t)}_{v_{0}} \frac{dv}{v^2 + \frac{2vg}{c_{d}A} - \frac{2mg}{P_{w}C_{d}A}} = \int^{0}_{t} dt $
$\ a^2 = \frac{2vg}{c_{d}A} - \frac{2mg}{P_{w}C_{d}A} $
$\ \int^{v(t)}_{v_{0}} \frac{dv}{v^2 + a^2} = \frac{P_{w}C_{d}A}{2m} \int^{0}_{t} dt $
$\ \frac{1}{a} \tan^{-1}(\frac{v(t)}{a}) - \frac{1}{a} \tan^{-1}(\frac{v(t)}{a}) = \frac{P_{w}C_{d}A}{2m}t $
$\ v(t) = a\tan [\frac{P_{w}C_{d}A}{2m}t + tan^{-1}(\frac{v_{0}}{a}) $
$\ \frac{m}{s} = \frac{m}{s^2}s = \frac{m}{s} $
$\ a^2 = \frac{m^3 \frac{m}{s^2}}{m^2} - \frac{kg \frac{m}{s^2}}{\frac{kg}{m^3}m^2} = \frac{m^2}{s^2} $
$\ a = \frac{m}{s} $
$\ \frac{m}{s} = \frac{m}{s} \times [\frac{\frac{m \times kg}{s \times m^3} \times m^2s}{kg} - \tan^{-1}(\frac{\frac{m}{s}}{\frac{m}{s}})] $
$\ \frac{m}{s} = \frac{m}{s} \times [(unitless) + \tan^{-1}(unitless)] $
$\ \gamma = e^{[ln(\frac{\frac{m}{s} - \frac{m}{s}}{\frac{m}{s} + \frac{m}{s}} - \frac{\frac{kg}{m^3} \times m^3}{kg})]} $
$\ \gamma = (unitless) $
$\ \frac{m}{s} = \frac{\frac{m}{s} \times (unitless)}{(unitless)} $
In this type of motion, gravity is the only force acting on the person doing the cannonball while in the air. However, once the person touches the water everything changes. Two forces are now introduced to problem. They are the buoyancy force and the drag force. They are similar because both drag and buoyant forces occur due to the pressure differences. Nonetheless, they are also different because the drag results from pressure differences arising from fluid motion. Which makes perfect sense.
#Write your VPython program here. Don't forget to add comments to explain your code.
from __future__ import division, print_function
from vpython import *
#initial conditions
y=2 #initial height of person above water
r=0.25 #radius of person in cannonball position (assuming a spherical shape)
#draw the scene
scene=canvas(range=5)
person=sphere(pos=vec(0,y,0),radius=r)
water=box(pos=vec(0,-5,0),length=10,width=10, height=10,color=color.blue,opacity=0.5)
t = 0; #initial time
dt = 0.01; #time increment
g = 9.8 #gravity, m/s^2
ddy = vec(0,0,0); #initial acceleration
person.v = vec(0,0,0) #initial velocity
m = 45 #mass
p = 1000 #density of water
c = 0.5 #drag coefficient
A = pi*r**2
V = (4/3)*pi*r**3 #volume of sphere
Fd = vec(0,0.5*p*c*A,0); #drag force
Fb = vec(0,p*V*g,0); #buoyancy force
Fg = vec(0,-g*m,0) #gravitational force
while (t <= 15) :
rate(1/dt) #simulation speed
#if statement for person above water
if (person.pos.y > 0) :
ddy = Fg/m #acceleration out of water is just gravity
person.v = person.v + ddy*dt #updating velocity
person.pos = person.pos + person.v*dt #updating position
#else statement for in water
else:
Fd = -0.5*p*c*A*mag(person.v)**2*hat(person.v) #drag on person in water
ddy = ((Fd + Fb + Fg)/m) #vertical acceleration
person.v = person.v + ddy*dt #updating velocity
person.pos = person.pos + person.v*dt #updating position
t = t + dt #time incrementer
| Section | Points | Max Points |
|---|---|---|
| Assumptions | 1 | |
| Diagrams | 1 | |
| Analysis | 3 | |
| Check | 1 | |
| Interpretation | 1 | |
| Code | 3 |