@zhongwei1234
2017-10-27T09:49:15.000000Z
字数 1958
阅读 43
一. 课题
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π。


""""""Created on Wed Oct 25 22:01:32 2017@author: 钟伟"""import mathimport matplotlib.pyplot as pltq=0.5l=g=9.8Ω_d=2/3Δt=0.04w_list=[]θ_list=[]t_list=[]t=0.0w=0θ=0.2F=1.2while t<500:w=w-((g/l)*math.sin(θ)+q*w-F*math.sin(Ω_d*t))*Δtθ=θ+w*Δtif θ>=math.pi:θ=θ-2*math.pielif θ<-math.pi:θ=θ+2*math.pit=t+Δtw_list.append(w)θ_list.append(θ)t_list.append(t)plt.figure(figsize=(12,12))plt.title('w-t')plt.xlabel('t/s')plt.ylabel('w(rad/s)')plt.plot(t_list[:2500],w_list[:2500],ls='-',color='black')plt.show()plt.figure(figsize=(12,12))plt.title('θ-t')plt.xlabel('t/s')plt.ylabel('θ(rad)')plt.plot(t_list[:2500],θ_list[:2500],ls='-',color='black')plt.show()plt.figure(figsize=(12,12))plt.title('phace-space')plt.xlabel('θ(rad)')plt.ylabel('w(rad/s)')plt.plot(θ_list,w_list,'.',color='black')plt.show()
2.写出庞家来截面
主要的一点是在循环体内加一个条件判断 由于t的列表是离散的,所以我们让t约等于某个周期值,这通过绝对值判断实现
0.04 (我的Δt设的0.04)
具体运行时起初500s明显不够画出美丽的图,所以我加到了5000s

while t<5000:w=w-((g/l)*math.sin(θ)+q*w-F*math.sin(Ω_d*t))*Δtθ=θ+w*Δtif θ>=math.pi:θ=θ-2*math.pielif θ<-math.pi:θ=θ+2*math.pit=t+Δtfor n in range(2122):if abs(t-math.pi*n/2*Ω_d)<0.02:w_list.append(w)θ_list.append(θ)t_list.append(t)
这张图是题目和书上的t=2πn/的
明显的,上下两个庞加莱截面图最大的区别是取点周期,一个是2π周期,一个是
如果我们想想一个圆周运动,在2π周期频闪拍照,我们会得到一个点;又用四分之一周期去拍会得到包括第一次拍照的那个点的中心对称的四个点。观察两个庞加莱图,很像是t=的截面图旋转中心对称得到了t=的相空间图。
我们有理由相信,这就是用相空间研究混沌的原因所在,比起在时间空间中的杂乱方便