CSE5004 Scientific Computation with Python Solved

$ 24.99


HW5. Simulation of Baseball Dynamics
1. (Runge-Kutta Methods) Solve the initial-value problem x′ = t + 2xt with x(0) = 0 on the interval [0,2] using the Runge-Kutta formulas.
(1) Find x(t) using the second-order Runge-Kutta method with h = 0.01.
(2) Find x(t) using the fourth-order Runge-Kutta method with h = 0.01.
(3) Compare the solutions in (1) and (2) with the true solution: 1) and discuss order of accuracy for two Runge-Kutta methods.
(4) Discuss the effect of the step size h on the solutions by using the fourth-order Runge-Kutta method.
Hint: Compare the errors at t = 2 between the numerical and true solution for the different step sizes h = 0.01,0.05,0.1.
) (4)
where vx,vy,vz are the velocity vector components of the baseball, is the speed of the baseball. B is a dimensionless quantity that specifies the magnitude of the Magnus force, ω is the rotation rate of the baseball and ϕ describes the direction of ω, relative to z axis. g is the gravitational acceleration (g = 9.81m/s2). Note that B = 4.1 × 10−4 and ω = 1800rpm. The drag force on the ball F(V ) is assumed as:
. (7)
(1) Make a code for solving the above six equations using the fourth-order Runge-Kutta method. Appropriate initial conditions at t = 0 are x(0) = 0,y(0) = 0,z(0) = h,vx = v0 cosθ,vy = 0,vz = v0 sinθ where v0 is the initial speed of the pitch, θ is the elevation angle of the pitch and h is the vertical displacement from the ground to ball release point. You need to solve the equations until the baseball reaches to the catcher x(t) = 18.39m. Provide a detailed procedure for making a code.

Figure 1: (a) Physics of baseball and (b) rotation direction for four pitches
(2) Solve the equations for four pitches shown in Figure 1(b) and plot trajectories of the baseball for each pitches. Typical elevation angle is θ = 1◦, the initial speeds of the fastball and others are v0 = 40m/s and v0 = 30m/s, respectively. Rotation directions ( and 135◦ for the fastball, curveball, slider and screwball, respectively. Note that h = 1.7m.


There are no reviews yet.

Be the first to review “CSE5004 Scientific Computation with Python Solved”

Your email address will not be published. Required fields are marked *