Question: python PYTHON you computed and plotted the trajectory of a projectile, neglecting air-resistance (drag) on the projectile. In this problem you will incorporate air resistance.
python
PYTHON
you computed and plotted the trajectory of a projectile, neglecting air-resistance (drag) on the projectile. In this problem you will incorporate air resistance. The drag force f, for a projectile (like a football or a tennis ball) is proportional to the square of the projectile's speed: f = Dv2 and the direction of f is opposite to the direction of the projectile's velocity. =-Dvd fa = -Dv. V, & fy = -Dv. Vy Where f, fy are the components of the drag force and the proportionality constant D is given by: ppA D= 2. where A is the cross-sectional area of the projectile (a ball of mass m), CD is the drag coefficient (dependent on the shape of the projectile) and p is the density of air. From Newton's second law, the acceleration of the "ball is proportional to the external unbalanced force: The xv and y component of the net force on the ball are: Fr= -Dv. Vi = max Fy = -9 - Dv. Vy = may The particle moves in the +x and +y direction. The negative signs on the x and y components of the acceleration indicate that these are opposite to the direction of motion. Knowing the mass of the projectile (ball), the accelera- tion can be computed. () Use numpy and Matplolib to compute and plot the trajectory of a base- ball, projected at a speed and angle input by the user. The program should print the maximum height and the range that the ball reaches. The steps to compute the positions and velocities are given below. (ii) Plot the trajectory of the baseball with and without air resistance on the same plot. For a regulation baseball, assume m = 0.145Kg, the radiu sr = 0.0366m, Cp = 0.5 and the density of air (at standard temperature and pressure) is p= 1.2kg/m3 (a) Choose a time interval At and define the initial values of X, Y, Vr, Vy, t. (choose At to be a suitable value in the range 0.05 to 0.1). (b) Choose N - the maximum number of intervals (this gives the max. time: tmax = N * At for the numerical solution). So at the kth timestep: tk = k* At. Experiment with various values for N and At, to find a suitable plot for the trajectory. (c) Iterate (loop) the next 4 steps repeating the steps while n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
