Basic Equations of Motion

The drag force of air can be approximated by the equation:

Where CD is the coefficient of drag, the Greek letter rho represents the density of air, A is the cross-sectional area of the shell perpendicular to the direction of motion, and v is the shell's velocity (varies with time). The program lastshot.f is designed as a simple test of the equation solution method and contains a value of 0.40 for CD. The air density is 1.15 kg/m3, and A = .008 m2.

This leads to an equation of motion in terms of the height above the cannon (z):

which can also be written as a system of 2 first order differential equations:

Assume that the gravitational acceleration g=9.807m/s2, the mass of the shell (m) is 10 kg, and the muzzle velocity is 300 m/s.

The program uses the first negative value of z and the last positive value of z (previous time step), in a linear interpolation to estimate the time of impact. Check your program by comparing this calculated time of impact to the theoretical time of impact. As a sanity check you can compare the final computed velocity to the theoretical terminal velocity (highest possible value).

Your velocity at time of impact should be less than this terminal velocity. As a more detailed check, look at the results printed in the file "shell.output". For time steps of 0.05 s or less the calculated and theoretical answers should be very close ( less than 1% error). If you are getting incorrect answers, run the program under the debugger and watch the calculation of the results of the first time step. Look carefully at all terms to try to understand why you are significantly greater or less than the theoretical results in "shell.output".