%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
Skim through the entire lab before beginning. Read the text carefully and complete the steps as indicated. Submit your completed lab through the D2L dropbox.
Start by carefully watching the following video:
from IPython.display import YouTubeVideo
YouTubeVideo("QtP_bh2lMXc")
The purpose of this lab is to analyze the motion of spinning ball dropped vertically from the top of Gordon Dam as shown in the video.
The initial dropping of the basket ball shows that it deviates from falling straight down. This is probably due to the wind. Notwithstanding this potentially important effect, the analysis in this lab is ignore the effect of the wind.
The dynamics of spinning ball under the influence of both a quadratic drag force and the Magnus force have been discussed in Lecture 5.
Basketballs and physics go naturally together. In 2011, The University Physics Competition proposed the following problem:
In the game of basketball, a player scores three points by successfully making a shot from beyond the three point line, which is 6.2 meters away from the basket in international games, such as the Olympics. Suppose a player in an Olympic basketball game is at the three point line standing at a point making an angle 45 degrees to the principal axes of the court. What initial ball velocities and spins will result in a successful shot from this point?
A winning paper from that competition was
Team 379: Rebecca Schutzengel, Patrick Varin, & Brendan Quinlivan
Institution: F. W. Olin College of Engineering
Team Advisor: Yevgeniya V. Zastavker
The 2011 Problem B Gold Medal Winning Paper: "The Physics of a Three Point Shot"
Go and briefly skim their award winning paper. In particular, note their discussion of the path through air when describing their model. Their theory and assumptions are reproduced below:
A spinning ball in the air is subject to three forces: gravity, drag and the Magnus force.
Therefore, the motion of the ball is governed by the following equation:
\begin{align} \frac{d^2 \vec{r}}{dt^2} =\vec{g} + \frac{1}{m_{ball}}\left( \frac{16}{3} \pi^2 r_{ball}^3 \rho \vec{\omega} \times \vec{v} - \frac{1}{2} C_d \rho A |\vec{v}|^2 \hat{v} \right) \end{align}where $\vec{r}$, $\vec{v}$, and $\vec{\omega}$ are the position, velocity, and angular
velocity of the basketball, $\vec{g}$ is the acceleration due to gravity, $m_{ball}$, $r_{ball}$ and $A$ are the mass, radius, and cross-sectional area of the basketball, $\rho$ is the density of air and Cd is the drag coefficient of the basketball in the air which we found in literature to be 0.54. The first term in Equation 1 accounts for gravity, the second term accounts for the Magnus force due to the ball’s spin and the third term accounts for the drag force. For simplicity, the basketball was assumed to be spinning with a constant angular velocity throughout its trajectory. It was also assumed that the spin was purely backspin, meaning that the axis of rotation lies in the $xy$-plane and is perpendicular to the ball’s trajectory
Also make note the table of Model Parameters found at the end of their paper.
While the paper is on different physical problem, their analysis serves as a useful starting point for our own simulation of a basketball projectile.
Our goal will be to develop a numerical model to predict the trajectory of dropped basketball from an initial height $H$ and rotation rate $\omega$.
Starting by defining some variables for various physical parameters in the system. For each parameter need, type in a values from taken from either video or the paper. Be sure to include a comment describing the parameter and the units. Value for acceleration due to gravity and air density have already been added to show the expected format.
If you require additional physical parameters, please add them here as well.
g = 9.81 # m/s^2, accleration due to gravity
ρ = 1.225 # kg/m^3, density of air
H = ___
r = ___
m = ___
C = ___
The code below is intended to solve equation of motion shown above using Euler's method. Fill in the missing parts to complete the implementation. In order to do this, it will probably be helpful to work out the details on scrap paper first.
def calculate(ω=0.0, dt=1.0, tmax=30.0):
"""
Solve for the trajectory of a spinning basketball dropped from a height H spinning
Inputs: ω is the rotation rate of the back spin on the ball
dt is the time step for the simulation
tmax is the length in time of the simulation
Return t, y, x giving the trajectory of the basketball.
"""
# calculate the required number of time steps
N = np.round(tmax/dt)
# allocated arrays
t = np.zeros(N)
y = np.zeros(N)
x = np.zeros(N)
vx = np.zeros(N)
vy = np.zeros(N)
# intialize variables
t[0] = ___
y[0] = ___
x[0] = ___
vx[0] = ___
vy[0] = ___
# apply Euler's method
for i in range(N-1):
# update the positions
x[i+1] = x[i] + ___
y[i+1] = y[i] + ___
# calculate the velocity magnitude
v_mag = np.sqrt(vx[i]**2 + vy[i]**2)
# compute air drag
Fdrag_x = ___
Fdrag_y = ___
# compute Magnus force
Fmagnus_x = ___
Fmagnus_y = ___
# update velocities
vx[i+1] = vx[i] + ( ___ ) * dt
vy[i+1] = vy[i] + ( ___ ) * dt
# when the ball hits the ground/water, assume it stops immediately.
if y[i+1] < 0:
vx[i+1] = 0
vy[i+1] = 0
return t, y, x, vx, vy
def plot(t, y, x, label=''):
plt.plot(x, y, label='')
plt.xlabel('x (m)')
plt.ylable('y (m)')
fig, axes = plt.subplots(figsize=(8,6))
t, y, x, vx, vy = calculate(ω=0)
plot(t, y, x, label='No rotation')
plt.title('Trajectory of a Basketball dropped off of Gordon Dam')
Verify that we have made a reasonable choice for the time step dt
and, if needed, adjust the time step accordingly.
At the very end of the video, the presenter estimates the horizontal distance traveled by the basketball. Let's call this distance $L$ and define it to be the distance until the first bounce of the basketball off the water. We may assume the water is at a height of $y = 0$ m. Fill in the estimated value of $L$ below.
L = ___ # m, horizontal distance travelled by basketball before first bounce
One parameter that we do not know is the rotation rate of the basketball. Notice that the calculate()
function has an argument ω
that can be used to pass in a value for this rotation rate.
Using the calculate()
and plot()
functions defined above, try and estimate the experimental value of $\omega$ that best matches the observed distance traveled.
There are a few approaches you could take to solve this part of the lab. Talk with the intructor or the TA if you need a suggestion.
Just before the basketball hits the water, use your numerical model to estimate the impact velocity.
Let's go back and improve the calculate()
function so that instead of the basketball immediately coming to rest upon impact, it bounces off the water as shown in the video.
The bounce of the basketball on the water is not perfectly elastic but there loss of energy and momentum (due to the water waves, the acoustic wave, material properties of the ball, etc.). As a parametrization, we could make the assumption that the velocity upon impact (which occurs if $y<0$) is modified as follows
\begin{align} v_x &= \;\; \epsilon v_x \\ v_y &= - \epsilon v_y \\ \end{align}for some unknown parameter $\epsilon$ with $0 \leq \epsilon \leq 1$. The case $\epsilon = 1$ would be for a perfectly elastic collision again a rigid horizontal surface.
Go back and modify (only slightly) the calculate()
function to include this effect. You'll will need to choose a value of $\epsilon$ (see the observations from the video). Any plots or analysis you made above should not be affected by this change but go back and recompute the entire notebook.
This lab is based on the assumption that the only forces on the ball were air drag, gravity and the Magnus force. Based on your analysis of the dynamics in the lab as compared to the observation of the trajectory in the video, do you think that our model reasonably captures the motion of the Magnus force? If not, what other physical aspects might we want to include in our model?
your answer here...