@zhongwei1234
2017-10-13T14:11:44.000000Z
字数 2440
阅读 48
一. 课题
Use the adiabatic model of the air density to calculate the cannon shell trajectory, and compare with the result found using.Also , one can further incorporate the effects of the variation of the ground temperature (seasonal changes) by replacing by T_0T_{ref} , where is the value of at a reference temperature and is the actual ground temperature. The value quoted in the text is appropriate for =300K. In particular, how much effect will the adiabtic model have on the maximum range and the launch angle to achieve it? how much do they vary from a cold day in winter to a hot summer day?
"""Created on Thu Oct 10 10:05:35 2017@author: 钟伟"""import matplotlib.pyplot as pltimport math"""初值设置"""x = 0y = 0v = float(input("请输入初射速度:"))angel = float(input("请输入初射角度:"))v_x = v*math.cos(math.radians(angel))v_y = v*math.sin(math.radians(angel))"""基本常量设置"""delt_t = 0.05B = 0.00004g = 9.8h = 2.5a = 0.0065T_ref = 300"""温度随季节变化"""T_c=float(input("请输入当前温度:"))T = T_c + 273.15"""设定两个列表储存数据"""list_x=[x,]list_y=[y,]list_v_x=[v_x,]list_v_y=[v_y,]list_v=[v,]"""进行计算,并将计算结果储存在列表中"""while y>=0:x = x + v_x*delt_ty = y + v_y*delt_tp=(1-a*y/T)*(T/T_ref)B_cor = B*math.pow(p,h)v_x = v_x - B_cor*v*v_x*delt_tv_y = v_y - g*delt_t - B_cor*v*v_y*delt_tv = math.sqrt(v_x*v_x + v_y*v_y)list_x.append(x/1000)list_y.append(y/1000)"""画图"""plt.figure(figsize=(10,5))plt.plot(list_x,list_y,label="$canon shell trajectory$",marker='.')plt.xlabel("X/km")plt.ylabel("Y/km")plt.title("canon shell trajectory")plt.ylim(0,10)plt.legend()plt.show()
创建时间
oct 11 12:46:29 2017
本次实验调过很多参数,包含初速度,初始角度,温度(对空气阻力的影响),目的在于了解这些因素对加农炮弹的影响,以便我们能有一个直观的看法。
在过程中,我尝试了很多极端不可能的情况,看能否得出一些奇怪而有趣的结果,这也是计算物理的魅力所在,可以低成本的探究一些极端情况。产生矛盾并解决矛盾
在一个很普遍的温度下T=300K 我取温度参数27度 *当速度只有100m/s时,可以看到只有六百米远并且打不高,这个速度很快了如果对人来说,古代抛投石机大概能达到,火铳也可以。但和高速比可以看到这个高度与距离是远远不够的。证明科技就是力量,火铳肯定干不过手枪

再看看当低温时似乎并没有什么影响t=-30度

那我们接下来用一个高中生知道的45度最远射程来打它(得到结果是忽略了空气阻力,不过事实有阻力最远射程大概所要射角也是45度左右)
射程被极大的提高
这告诉我们找好角度射的重要性!!!
看看大角度射出,结论相似 前者 后者
这是27度室温
这是-100极端
轨迹可以看到炮弹过最高点后有下坠趋势 ,这也是为什么子弹如果不加螺线膛线,如老式来福枪,打出去子弹回直线下坠

不难发现低温下有助于炮弹的自由飞翔
最后附上一张很理想的2000m/s告诉 角度45度 温度一般27度的轨迹
总得说 我玩了许多种情况,发现低温可以让空气阻力影响减小,同时发现速度过大其他条件相同阻力影响越大,轨迹有急速下坠的趋势。
这让我想到C罗的电梯球,球速太高并且压缩了空气产生过大阻力,球急速下坠不是玄学
感谢观看!!!
钟伟 武汉大学 2015301020164