Question
The American League of Major League Baseball has decided to replace the Designated Hitter (the player who bats for the pitcher) with a Robotic Designated
The American League of Major League Baseball has decided to replace the Designated Hitter (the player who bats for the pitcher) with a Robotic Designated Hitter (RDH) for the 2021 season. Careful measurements of the adopted model of robotic hitter reveal that the distribution of ball speed off the bat is a Gaussian of mean 100 miles per hour and standard deviation 15 mph, and the distribution of launch angle is a Gaussian of mean 45 degrees and standard deviation 10 degrees. The American League is concerned that the new robotic hitters will so outperform human players that they will face a backlash from fans. Your job is to quantify how good a home-run hitter this RDH actually is by computing the expected ratio of at-bats to home runs, the AB/HR-ratio. Top human hitters have AB/HR-ratios of 10 or so (Babe Ruths was 11.76; note that better hitters have smaller AB/HR ratios).
To compute the expected AB/HR-ratio for a RDH, model the ball as it leaves the bat as a projectile moving under the combined forces of gravity and air resistance. If the motion in confined to the x y plane, with y being the height above the ground, the motion of the ball is governed by the equations
dv/dt = -g - v (Cd A v)/2m and
dr/dt = v
where the state of the ball is given by r = (x,y) and v = (vx,vy). is the unit vector in the y direction.
[Note Feb 21, 2023: corrected a typo above where dr/dt = dv/dt instead of dr/dt = v was given above.]
Assume the baseball has a mass of 0.145 kg and a diameter of 7.4 cm. The additional parameters are g, the acceleration of gravity at the Earths surface (9.81 m s2), the density of air (1.2 kg m3), and Cd is the balls drag coefficient, which you can take to be equal to the constant 0.35. Finally, A is the cross-sectional area of the ball and v = | v |. Assume the ball is hit from a starting height of 1 m.
Solve the projectile problem above by writing a Python function that implements the Euler, Euler-Cromer and Midpoint methods. Required input should be the initial ball speed (in m/s), the launch angle (in degrees), the time-step used to numerically integrate the equations of motion (in seconds, called in your textbook), and which of the three methods (Euler, Euler-Cromer or Midpoint) should be used for the integration. It would be useful to be able to turn off air resistance; handle this with an argument to your function. Your routine should return the horizontal range of the ball as an array(in metres).
As a test, run your routine for the initial conditions of velocity = 15 m/s, theta=45 degrees, tau=0.1 using the Euler method. Keep in mind that the trajectory shown for Eulers method in this figure is computed without air resistance.
Plot a figure showing the outputs from the Euler, Euler-Cromer and Midpoint methods with a time-step of 0.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started