[关闭]
@zhongwei1234 2017-10-27T09:49:15.000000Z 字数 1958 阅读 43

计算物理第六次作业 钟伟 2015301020164

《计算物理》第三章第三节T3.12


一. 课题
In constructing the poincare section in figure 3.9 we plotted points only at times that were in phase with the drive force; that is, at times t2πn/, where n is an integer. At these values of t the driving force pass though the zero. However, we could just as easily have chosen to make the plot at times corresponding to a maximum of the drive force, or at times π/4 out-of -phase with this force,etc.

画出庞加莱截面,比如设定驱动力在最大值或其他值的时候


二.实验分析

1.此题目难度不大,但在数学混沌体系庞加莱截面有很广的应用。所以为加大工作量,本人先按照书画出不截面的图,即相空间的图。在算法上,我采用欧拉-克拉默方法
解:
运动微分方程有

可以写掩代码,不过注意把θ保持在-2π到2π。

phase space.png

thate t.png
w t.png

  1. """
  2. """
  3. Created on Wed Oct 25 22:01:32 2017
  4. @author: 钟伟
  5. """
  6. import math
  7. import matplotlib.pyplot as plt
  8. q=0.5
  9. l=g=9.8
  10. Ω_d=2/3
  11. Δt=0.04
  12. w_list=[]
  13. θ_list=[]
  14. t_list=[]
  15. t=0.0
  16. w=0
  17. θ=0.2
  18. F=1.2
  19. while t<500:
  20. w=w-((g/l)*math.sin(θ)+q*w-F*math.sin(Ω_d*t))*Δt
  21. θ=θ+w*Δt
  22. if θ>=math.pi:
  23. θ=θ-2*math.pi
  24. elif θ<-math.pi:
  25. θ=θ+2*math.pi
  26. t=t+Δt
  27. w_list.append(w)
  28. θ_list.append(θ)
  29. t_list.append(t)
  30. plt.figure(figsize=(12,12))
  31. plt.title('w-t')
  32. plt.xlabel('t/s')
  33. plt.ylabel('w(rad/s)')
  34. plt.plot(t_list[:2500],w_list[:2500],ls='-',color='black')
  35. plt.show()
  36. plt.figure(figsize=(12,12))
  37. plt.title('θ-t')
  38. plt.xlabel('t/s')
  39. plt.ylabel('θ(rad)')
  40. plt.plot(t_list[:2500],θ_list[:2500],ls='-',color='black')
  41. plt.show()
  42. plt.figure(figsize=(12,12))
  43. plt.title('phace-space')
  44. plt.xlabel('θ(rad)')
  45. plt.ylabel('w(rad/s)')
  46. plt.plot(θ_list,w_list,'.',color='black')
  47. plt.show()

2.写出庞家来截面
主要的一点是在循环体内加一个条件判断 由于t的列表是离散的,所以我们让t约等于某个周期值,这通过绝对值判断实现
0.04 (我的Δt设的0.04)
具体运行时起初500s明显不够画出美丽的图,所以我加到了5000s
tu.png

  1. while t<5000:
  2. w=w-((g/l)*math.sin(θ)+q*w-F*math.sin_d*t))*Δt
  3. θ=θ+wt
  4. if θ>=math.pi:
  5. θ=θ-2*math.pi
  6. elif θ<-math.pi:
  7. θ=θ+2*math.pi
  8. t=tt
  9. for n in range(2122):
  10. if abs(t-math.pi*n/2_d)<0.02:
  11. w_list.append(w)
  12. θ_list.append(θ)
  13. t_list.append(t)

sss.png
这张图是题目和书上的t=2πn/


三.结果分析

明显的,上下两个庞加莱截面图最大的区别是取点周期,一个是2π周期,一个是
如果我们想想一个圆周运动,在2π周期频闪拍照,我们会得到一个点;又用四分之一周期去拍会得到包括第一次拍照的那个点的中心对称的四个点。观察两个庞加莱图,很像是t=的截面图旋转中心对称得到了t=的相空间图。
我们有理由相信,这就是用相空间研究混沌的原因所在,比起在时间空间中的杂乱方便

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