[关闭]
@zqbinggong 2016-04-10T02:45:53.000000Z 字数 4296 阅读 1116

the Trajectory of Cannon

homework of Computational Physics(level2)
张强 2013301020039

code

cannon.py

Abstract

The Euler methonds we used to treat the bicycle problem can easily be generalized to deal with motion in two spatial dimentions.To be spoecific, we consider a projectile such as a shell shot by a cannon.We have a very large cannon in mind,and the large size will determine some of the important physics.

Key word

Euler methonds,projectile,air drag,isothermal,adiabatic

Background

The problem ask us to deal with situations in which the target is at a different altitude than the cannon, and consider cases in which the target is highter or lower than the cannon.Also we have to investigate how tge minumum firing velocity required to hit the target varies tas teh altitude of the target is varied;.

Body

1.Projectile motion

1.Kinematic quantities of projectile motion

In projectile motion, the horizontal motion and the vertical motion are independent of each other; that is, neither motion affects the other. This is the principle of ''compound motion'' established by Galileo in 1638.Galileo Galilei, ''[[Two New Sciences]]'', Leiden, 1638, p.249

2.Acceleration
Since there is only in the vertical direction, the velocity in the horizontal direction is constant, being equal to . The vertical motion of the projectile is the motion of a particle during its free fall. Here the acceleration is constant, being equal to g .The g is the Standard gravity|acceleration due to gravity. ( 9.81 m/s^2 near the surface of the Earth) The components of the acceleration are:

3.Velocity
The horizontal component of the [[velocity]] of the object remains unchanged throughout the motion. The downward vertical component of the velocity increases linearly, because the acceleration due to gravity is constant. The accelerations in the x and y directions can be integrated to solve for the components of velocity at any time t , as follows:


The magnitude of the velocity (under the Pythagorean theorem, also known as the triangle law):

4.Displacement

At any time t , the projectile's horizontal and vertical are:


The magnitude of the displacement is:

2.Air Drag

As is mentioned above and will be discussed thoroughly in our codes, air drag force plays a critical role in the shells' trajactory. But engineers have come up ideas of rifling to fight against such impedence.
Rifling is a series of spiral line inside the pipe of fire guns like rifles and cannons. When the shells get out of the pipe pushed by the gunpowder at the end of the bore of a gun, the high temperarure will inflate the shell making it rub with the rifling and spin. Such spin motion will effectively reduce the air drag force.

Air Density Distribution

In the first section we gave the form of air drag force under simple assumptions. Now we come to a stage a little more complex. The force is sill propotional to the density of air. However, the density of air is a decreaseing function of altitude.

Isothermal Condition

The simplest approximation is to treat the atmosphere as an isothermal ideal gas.One then finds that the pressure p depends on altitude according to tex2img.php?eq=p(y)%3Dp(0) e^{-mgy%2F k_{B} T } &bc=White&fc=Black&im=jpg&fs=12&ff=arev&edit=0未知大小

Adiabatic condition

The more realistic approach is to assume that the ait is a poor conductor of heat, and that convection is very slow.
The adiabatic approxination leads to a somewhat different dependence of the density on altitude tex2img.php?eq= \rho %3D \rho _{0} (1- \frac{ay}{ T_{0} } )&bc=White&fc=Black&im=jpg&fs=12&ff=arev&edit=0未知大小

3. Implementation of the program

1.Firstly,the program ask you to input some parameters such as target coordinate,the effective attack range and the "d",which is used to determine the approximation methonds.For d=0,we consider the isothermal condition and d=1 for adiabatic condition.
2.Then,the program run ,draw the figure and calculate the firing speed and angular.
3.In the end,tehe program outpute the related information.

Results

1.

please input the hit_area : 10
please enter the distance of the target : 20000
please enter the height of the target : 2000
please enter 0 for isothermal gas or 1 for adiabatic gas : 0
sita: 49.5
initSpeed: 565.773929138

2.

please input the hit_area : 10
please enter the distance of the target : 20000
please enter the height of the target : 2000
please enter 0 for isothermal gas or 1 for adiabatic gas : 1
sita: 48.6
initSpeed: 584.738975708

3.

please input the hit_area : 10
please enter the distance of the target : 30000
please enter the height of the target : 3000
please enter 0 for isothermal gas or 1 for adiabatic gas : 0
sita: 49.8
initSpeed: 733.751512241

4.

please input the hit_area : 10
please enter the distance of the target : 30000
please enter the height of the target : 3000
please enter 0 for isothermal gas or 1 for adiabatic gas : 1
sita: 49.2
initSpeed: 779.306132074

Conclusion

According to the results,we draw a conclusion that the cannon needs faster speeds and smaller angular on adiabatic condition to hit the same target.

Acknowledgement

Thanks to Liu Wentao for his template.

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注