[关闭]
@rfhongyi 2016-12-11T03:28:47.000000Z 字数 8339 阅读 1443

Exercise_11 : Chaotic Tumbling of Hyperion

阿萨德.jpg

Problem 4.19 & 4.20

冉峰 弘毅班 2014301020064


666.jpg

Abstract


Background

The Basic Information of Hyperion:

Rotation of Hyperion:

Analysis of The Motion of Hyperion:


The Main Body


Code

  1. @author: RanFeng
  2. import math
  3. import matplotlib.pyplot as plt
  4. GM=4*(math.pi**2)
  5. class precession:
  6. def __init__(self,e=0.5,time=9,dt=0.0001,vcoefficient=1,beta=2,alpha=0,intial_w=0,intial_sita=0):
  7. self.intial_sita=intial_sita
  8. self.alpha=alpha
  9. self.beta=beta
  10. self.vcoefficient=vcoefficient
  11. self.e=e
  12. self.a=1/(1+e)
  13. self.x0=self.a*(1+e)
  14. self.y0=0
  15. self.vx0=0
  16. self.vy0=self.vcoefficient*math.sqrt((GM*(1-e))/(self.a*(1+e)))
  17. self.X=[self.x0]
  18. self.Y=[self.y0]
  19. self.Vx=[self.vx0]
  20. self.Vy=[self.vy0]
  21. self.w=[intial_w]
  22. self.sita=[intial_sita]
  23. self.T=[0]
  24. self.dt=dt
  25. self.time=time
  26. self.ThetaPrecession=[]
  27. self.TimePrecession=[]
  28. def calculate_reset(self):
  29. while self.T[-1]<self.time:
  30. r=math.sqrt(self.X[-1]**2+self.Y[-1]**2)
  31. newVx=self.Vx[-1]-(GM*(1+self.alpha/r**2)*self.X[-1]/r**(1+self.beta))*self.dt
  32. newX=self.X[-1]+newVx*self.dt
  33. newVy=self.Vy[-1]-(GM*(1+self.alpha/r**2)*self.Y[-1]/r**(1+self.beta))*self.dt
  34. newY=self.Y[-1]+newVy*self.dt
  35. newW=self.w[-1]-3*GM/(r**5)*(self.X[-1]*math.sin(self.sita[-1])-self.Y[-1]*math.cos(self.sita[-1]))*(self.X[-1]*math.cos(self.sita[-1])+self.Y[-1]*math.sin(self.sita[-1]))*self.dt
  36. newSita=self.dt*self.w[-1]+self.sita[-1]
  37. self.Vx.append(newVx)
  38. self.Vy.append(newVy)
  39. self.X.append(newX)
  40. self.Y.append(newY)
  41. self.w.append(newW)
  42. self.sita.append(newSita)
  43. self.T.append(self.T[-1]+self.dt)
  44. while self.sita[-1]>=1*math.pi:
  45. self.sita[-1]=self.sita[-1]-2*math.pi
  46. while self.sita[-1]<=-1*math.pi:
  47. self.sita[-1]=self.sita[-1]+2*math.pi
  48. def plot(self,slogan=''):
  49. plt.scatter(self.sita,self.w,label=slogan,s=0.1)
  50. plt.legend(loc='upper right',frameon=False,fontsize='small')
  51. plt.grid(True)
  52. plt.title('Hyperion(Elliptical orbit) $\\omega$ versus $\\theta$')
  53. plt.ylabel('$\\omega(radians/yr)$')
  54. plt.xlabel('$\\theta(radians)$')

Result

First we study the modle with the restricted.

Then we study the modle without the restricted.


Conclusion


Thanks For

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