CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

Jupyter notebook Assignments/Cannonball!/Cannonball.ipynb

Views: 55
Kernel: Python 3 (Anaconda)

Cannonball!

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 Fd=12ρwCdAv2F^d=\frac{1}{2}\rho_wC_dAv^2, where ρw\rho_w is the density of water, Cd0.5C_d\simeq 0.5 is the drag coefficient for a sphere, and AA 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 Fb=ρwVgF^b=\rho_wVg, where ρw\rho_w is the density of the water and VV 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.)

Solution


Assumptions

*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.

Diagrams

Include interaction diagrams and free body diagrams with axes indicated. ![Cannonball Diagram](Cannonball Diagram.png)

Please also show force diagram for when person is in water.

Analysis

 FEPg=my¨\ - F^g_{EP} = m\ddot{y}

 mg=my¨\ - mg = m\ddot{y}

 y¨=g\ \ddot{y} = - g

 FWPBFWPDFEPg=my¨\ F^B_{WP} - F^D_{WP} - F^g_{EP} = m\ddot{y}

 12PwCdAy2˙+PwVgmg=my¨\ \frac{1}{2}P_{w}C_{d}A\dot{y^2} + P_{w}V_{g} - mg = m\ddot{y}

 y¨=12PwCdAy2˙+PwVgmgm\ \ddot{y} = \frac{\frac{1}{2}P_{w}C_{d}A\dot{y^2} + P_{w}V_{g} - mg}{m}

 FWPD+FWPBFEPg=my¨\ F^D_{WP} + F^B_{WP} - F^g_{EP} = m\ddot{y}

 PwVg12PwCdAy2˙mg=my¨\ P_{w}V_{g} - \frac{1}{2}P_{w}C_{d}A\dot{y^2} - mg = m\ddot{y}

 y¨=12PwCdAy2˙+PwVgmgm\ \ddot{y} = \frac{\frac{1}{2}P_{w}C_{d}A\dot{y^2} + P_{w}V_{g} - mg}{m}

 dvdt=g\ \frac{dv}{dt} = -g

 v0v(t)dv=int0tgdt\ \int^{v(t)}_{v_{0}} dv = int^{t}_{0} -g dt

 v(t)=v0g\ v(t) = v_{0} - g

 dvdtm=12PwCdAy2˙+PwVgmg\ \frac{dv}{dt}m = \frac{1}{2}P_{w}C_{d}A\dot{y^2} + P_{w}V_{g} - mg

 2mPwCdAv0v(t)dvv2+2vgcdA2mgPwCdA=t0dt\ \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

 a2=2vgcdA2mgPwCdA\ a^2 = \frac{2vg}{c_{d}A} - \frac{2mg}{P_{w}C_{d}A}

 v0v(t)dvv2+a2=PwCdA2mt0dt\ \int^{v(t)}_{v_{0}} \frac{dv}{v^2 + a^2} = \frac{P_{w}C_{d}A}{2m} \int^{0}_{t} dt

 1atan1(v(t)a)1atan1(v(t)a)=PwCdA2mt\ \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)=atan[PwCdA2mt+tan1(v0a)\ v(t) = a\tan [\frac{P_{w}C_{d}A}{2m}t + tan^{-1}(\frac{v_{0}}{a})

There is a third solution for when the person starts to float back up.

Check

 ms=ms2s=ms\ \frac{m}{s} = \frac{m}{s^2}s = \frac{m}{s}

 a2=m3ms2m2kgms2kgm3m2=m2s2\ 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=ms\ a = \frac{m}{s}

 ms=ms×[m×kgs×m3×m2skgtan1(msms)]\ \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}})]

 ms=ms×[(unitless)+tan1(unitless)]\ \frac{m}{s} = \frac{m}{s} \times [(unitless) + \tan^{-1}(unitless)]

 γ=e[ln(msmsms+mskgm3×m3kg)]\ \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})]}

 γ=(unitless)\ \gamma = (unitless)

 ms=ms×(unitless)(unitless)\ \frac{m}{s} = \frac{\frac{m}{s} \times (unitless)}{(unitless)}

Check special cases.

Interpretation

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
<IPython.core.display.Javascript object>

Rubric

SectionPointsMax Points
Assumptions11
Diagrams01
Analysis23
Check01
Interpretation11
Code33