@Guozhongzhi
2016-11-13T16:37:25.000000Z
字数 1565
阅读 628
计算物理
郭忠智2014301020087
【摘要】 本次作业完成了课本中3.18题的画图,为了寻找单摆的混沌现象的产生机制,我们将驱动力的大小列入考虑范围之内,观察随着驱动力的变化,单摆的运动会随之发生的变化,采用vpython画出了单摆的摆动的三维图形,以及画出的关系图,这样,我们能很清楚地看到,随着驱动力的大小变化,会出现多个值,而这多个值,对应着摆的运动周期变为驱动力周期的n倍,这是混沌现象的一种形成方式。
Problem3.18
Caculate Poincare sections for the pendulum as it undergoes the period_-doubling route to chaos.Do this for ,using the other parameters as given in connection with Figure3.10.
(一)选择参数,这里我们选择的参数和第七次作业中给出的参数一致,仅让变化,观察随之变化。
(二)程序模拟
用python和vpython编写代码,运行,结果如下:
from visual import*
from math import *
#设置参数值
L = 9.8
r = 1
t = 0
dt = 0.04
g = 9.8
omiga = 0
q = 0.5
F_D = 1.4 #1.44,1.465
theta = 0.2
#画图所需元件的规格设定
scene.height, scene.width, scene.center = 1000, 1000, (0, -10, 0)
bracket = box(pos = (0,0.6*(-L-r),-2.5), length = 1, width = 0.5,
height = 15,\
material = materials.wood, color = color.yellow)
seat = box(pos = bracket.pos - (0,bracket.height / 2.0, 0), \
length = 12, width = 6, height = 1, \
material = materials.marble, color = (200,256,256))
cylinder(pos = (0,0,0.5), axis = (0,0,-3), radius = 0.3)
f = frame()
ball = sphere(frame = f, pos = (L*sin(theta), -L*cos(theta),0), \
radius = r, material = materials.earth, color = color.white)
rope = cylinder(frame = f, pos = (0,0,0), axis = ball.pos, \
radius = 0.2, material = materials.rough, \
color = (0.5, 0.0, 0.5))
while True:
rate(25)
theta = theta + omiga * dt
f.rotate(origin = (0,0,0),axis = (0,0,1),angle = omiga * dt)
t = t + dt
omiga = omiga - (math.sin(theta) + q * omiga - F_D * \
math.sin(2.0/3 * t)) * dt
(1)
(2)
(3)
(三)Poincare sections
(1)
(2)
(3)
当继续增大,会得到更多的分散点,表明通过周期加倍,发生混沌
从以上计算和展示,我们可以看到单摆从简谐运动走向混沌的过程,其方式可以归纳为:周期加倍,即随着驱动力的变化运动的周期会变成驱动力的倍,这是混沌现象的形成方式之一。
十分感谢杨宗蒙同学的耐心指导,和他的代码参考。