@zhongwei1234
2017-12-13T11:28:43.000000Z
字数 1760
阅读 46
一. 课题
It is often the case that the frictional force on an object will increase as object moves faster. A fortunate example of this is a parachutist; the role of the parachute is to produce a frictional force due to air drag, which is narmally larger than would normally be the case without the parachute. Here we consider a very simple examle in which the frictional force depends on the velocity. Assume that the velocity of a object obeys the equation of the form
1 用欧拉法拟合出速度随时间的变化,并用mathplotile在python上绘出
2 该速度微分方程可以轻松算出解析解,同样地绘出解析解的速度随时间变化的曲线
3 观察收尾速度
4 改变a与b的设定值,观察变化
*本有四段代码,但区别是改变a与b的设定值, 故不重复粘贴
@author: 钟伟"""import numpy as npimport matplotlib.pyplot as plta = 10b = 1"""设置初始条件"""vi = int(input("please input the initial velovity:"))"""输入初始速度"""t = 0delt_t = 0.1process_v = vi"""设定两个列表储存数据"""list_v=[process_v,]list_t=[t,]"""进行计算,并将计算结果储存在列表中"""while t<4:process_v = process_v + (a-b*process_v)*delt_t"""欧拉法计算"""t=t+delt_tlist_v.append(process_v)list_t.append(t)"""解析解的方程由积分法求出"""c=a-b*vit=np.linspace(0,4,1000)v=(a-c*np.exp(-b*t))/b"""画出图像"""plt.figure(figsize=(50,25))plt.plot(list_t,list_v,label="$v(t)$",marker='s')plt.plot(t,v,linewidth=2,color="yellow")plt.xlabel("Time(s)")plt.ylabel("velocity(m/s)")plt.title("velocity variation")plt.ylim(0,11)plt.legend()plt.show()
创建时间
Sep 28 15:46:29 2017
*均为v=1 a=10 模拟业余跳伞刚一跳就迫不及待打开伞 重力加速度为10m/s
1.当b=1时 有接近对数曲线的图像。时间越大拟合的越好。可认为在一定时间后达到了收尾速度。收尾速度为大约10m/s, 人可以承受。

2.当b=0.1 几乎是自由落体,相当于无伞降落,是很危险的

3.当b=5或10 很快收尾 如果降落伞能这样,那么低空跳伞就好玩了。。


感谢观看!!!