@Zemel-Yang
2016-10-23T17:00:17.000000Z
字数 1820
阅读 812
python homework
In this exercise, we will discuss the tajectories of cannon further.We also consider the drag force and altitude factor. The problem is described by ordinary differential equations in which initial values are given and can be solved using Euler method.

Problem 2.10
Generalize the program developed for the previous problem so that it can deal with sistuations in which the target is at a defferent altitude than the cannon. Consider cases in which the target is higher and lower than the cannon. Also investigate how the minimum firing velocity required to hit the target varies as the altitude of target is varied.
Numerial approach
We know that the pressure p depends on altitude from thermology according to:
Realization by python
There are many variations in problem 2.10. So, I choose a spercific firing angle. If the target's altitude is at the top of the cannon shell trajectory, the firing velocity of cannon is minimum. I draw the figure is the trajectory of cannon which firing velocity is at the range of 100~700m/s and the firing angle is 45°.
Result:
And here is the data:
Codes
Click "codes" to see the python code of this program.