@zy-0815
2016-12-04T17:24:55.000000Z
字数 2363
阅读 1640
上次作业我们研究了太阳系中行星的运动轨迹,并且验证了开普勒第三定律,而此次作业我们将重点放在研究土星第七卫星Hyperion的混沌状态上。

Hyperion就是土卫七,围绕着土星运转,1848年9月16日发现,而其形状如同一个哑铃,因此我们便可以将其模拟为一个质量分布在两端中间由无质量轻杆连接的哑铃模型,重力对其中一端质点m1的作用为:
1.由背景可得,主体程序为:
import pylab as plimport matplotlib.pyplot as pltimport mathclass Hyperion :def __init__(self,i=0,total_time=10, time_step=0.001, radius=1,e=0,a=1):self.x=[a*(1+e)]self.y=[0]self.vx=[0]self.vy=[2*math.pi]self.r=[radius]self.time=total_timeself.dt=time_stepself.beta=2self.alpha=0self.t=[0]self.theta=[0]self.w=[0]def run(self):_time=0GM=4*(math.pi**2)r=1while(_time<self.time):self.r.append(math.sqrt(pow(self.x[-1],2)+pow(self.y[-1],2)))self.vx.append(self.vx[-1]-4*pow(math.pi,2)*(1+self.alpha/pow(self.r[-1],2))*self.x[-1]/pow(self.r[-1],1+self.beta)*self.dt)self.x.append(self.x[-1]+self.vx[-1]*self.dt)self.vy.append(self.vy[-1]-4*pow(math.pi,2)*(1+self.alpha/pow(self.r[-1],2))*self.y[-1]/pow(self.r[-1],1+self.beta)*self.dt)self.y.append(self.y[-1]+self.vy[-1]*self.dt)self.w.append(self.w[-1]-3*GM/(r**5)*(self.x[-1]*math.sin(self.theta[-1])-self.y[-1]*math.cos(self.theta[-1]))*\(self.x[-1]*math.cos(self.theta[-1])+self.y[-1]*math.sin(self.theta[-1]))*self.dt)self.theta.append(self.dt*self.w[-1]+self.theta[-1])while self.theta[-1]>=1*math.pi:self.theta[-1]=self.theta[-1]-2*math.piwhile self.theta[-1]<=-1*math.pi:self.theta[-1]=self.theta[-1]+2*math.piself.t.append(_time)_time += self.dtdef show_results(self):#pl.plot(self.x,self.y)plt.plot(self.t,self.w)plt.xlabel('x(AU)')plt.ylabel('y(AU)')plt.legend()plt.title('Hyperion $\\theta$ versus time')plt.show()a = Hyperion()a.run()a.show_results()
运行程序可得:
上运行结果为圆轨道时所示结果改变代码为可得:
由此看出运动比较规则,同时改变离心率可得椭圆轨道图像为:
此时图像已经不再规则。
2.改变初始速度可得到运行图像为:
由此看出当初始速度为2π时轨道是规则的。
3.改变的值可得:

对于Hyperion来说,离心率变化时,当转动轨道为圆时,均有周期,但是当运行轨道变为椭圆,便会出现混沌现象。
由于个人电脑上Spyder被自己摸索崩溃,于是借用了宗玥同学的电脑,感谢宗玥同学的帮助。