07-A The Physics of a Thrown Baseball

In this exercise we will study the trajectory of a thrown baseball. In particular we will consider a June, 10 2014 throw by Oakland A’s outfielder Yoenis Cespedes where he threw California Angel’s baserunner Howie Kendrick out at home plate.  This particular throw received considerable media attention and was analyzed by Professor Alan Nathan, an Emeritus Professor of Physics at the University of Illinois, Urbana-Champaign.

Professor Nathan reviewed the video and estimated that Cespedes released the ball 6 ft (1.83 m) above the ground and that it took 2.82 seconds to travel a horizontal distance of 300 ft (91.44 m) before being caught by the catcher (Derek Norris) 5 ft (1.52 m) above the ground.  Using these data and a model that included gravity, air resistance, and lift, Professor Nathan determined that the ball was thrown with an approximate speed of 101.5 miles per hour (44.7 m/s) at an angle of 10° above the horizontal.

Create a program in VPython that uses the initial position and velocity described above to plot the trajectory for the following models:

  1. A constant gravitational force only
  2. A gravitational force and an air resistance force that depends on the square of the velocity.

In the model with the air resistance use the following expression for the force:

$$\vec{F}_\textrm{air} = -\frac{1}{2}C \rho A v^2 \hat{v}$$

Take the bluntness coefficient for a baseball to be \(C\) = 0.35.  A major league baseball has a mass of 0.145 kg and a diameter of 70 mm.  Take the density of air at the baseball stadium to be 1.3 kg/m\(^3\).

The following starter code can be used to help you with the problem.  You will need to update several details of the physics in the code.

# Trajectory of a thrown baseball

# Define characteristics of and initial conditions for the baseball
mass   = 0.145                      # Mass of baseball [kg]
radius = 0.035                      # Radius of baseball [m]
speed = 101.5 * 0.44704             # Initial speed of baseball [m/s]
theta = radians(10)                 # Initial angle [rad]

# A - Add additional constants below as needed for computing the air resistance force.
#
# Define needed constants
g  = 9.8                            # Acceleration due to gravity [N/kg]
dt = 0.005                          # Time step [sec]
t  = 0.0                            # Elapsed time counter [sec]

# Create a graph object to display the trajectory (y vs x) of the ball
graph = gdisplay(width=800, height=300, title='Trajectory', 
    xtitle='Horizontal Distance, x [m]', ytitle='Vertical Distance, y [m]')

# Print a set of column headers for the data
print("Distance [m]\tHeight [m]\tDuration [s]")

# Define names of each model and colors for the trajectory plots
models = ["Gravity", "Gravity and Drag"]
colors = [color.blue, color.red]

# Loop over the different models and graph colors
for model, graphColor in zip(models, colors):

    # B - Define the initial velocity in terms of the given 'speed' and angle 'theta'.
    #
    # Set initial conditions
    position = vector(0, 1.83, 0)                       # Initial position [m]
    velocity = vector(0, 0, 0)                          # Initial Velocity [m/s] 
    momentum = mass * velocity                          # Initial Momentum [kg m/s]
    
    # Create a new curve for the trajectory
    trajectory = gcurve(color=graphColor, label=model)

    # Initialize variables for this model
    max_height = 0
    t = 0

    # C - Change the conditiion below so the while loop will continue 
    # until the ball is caught by the catcher at y = 5 ft (1.52m)
    while (t < 2):

        # Test for the maximum height
        if position.y > max_height:
            max_height = position.y

        # Compute the gravitational force on the ball
        Fg = vector(0,-mass * g,0)

        # D - Compute the Air Resistance Force
        Fr = vector(0,0,0)
        
        # Compute the Net Force depending on which model we are using
        
        if (model == "Gravity"):
            Fnet = Fg
        elif (model == "Gravity and Drag"):
            Fnet= Fg + Fr
    
        # E - Use the Momentum Principle to update Momentum, Velocity and Position
        momentum = momentum 
        velocity = velocity
        position = position 

        t = t + dt
    
        trajectory.plot(pos=(position.x, position.y))

    print (position.x,"\t\t",max_height,"\t\t",t,"\t\t", model) 

Extra Credit

For extra credit, you can add a third model that also includes a lift force. Sherwood and Chabay mention on page 309 of our text that if the ball has spin that there is an additional force that on the ball due to pressure differences on either side of the ball. If the ball is traveling horizontally and has backspin then this is an upward force. This force is often called the Magnus force. Here is an interesting video by @thephysicsgirl that describes the Magnus force in general terms as applied to a soccer kick.

The authors do not give a model for the Magnus force, but it is often written as

$$\vec{F}_M = (1/2) C_L \rho A v^2 \hat{\omega} \times \hat{v}$$

where \(C_L\) is a lift coefficient that depends on the spin rate, and \(\vec{\omega}\) is the angular velocity of the baseball. For our purposes, if the baseball has backspin then \(\hat{\omega}\) will be in the positive \(\hat{z}\) direction or out of the page in the following diagram which shows the forces on the baseball. Notice that direction of the Magnus force is perpendicular to the velocity while the drag force is opposite the velocity.