[关闭]
@zy-0815 2016-11-20T11:18:43.000000Z 字数 7991 阅读 1587

张梓桐计算物理第九次作业

1 Problem

3.30

2 Abstract

As the previous dicusssion of two kinds of situation in the chaos,we will consider one more chaotice model in this paper.Here we consider the problem of a ball moving without friction on a horizontal table.Apart from that,we are also going to consider the so-called Stadium shape,which can be described as in books.We will dicsuss the phase plot,the trajectory plot ant the divergence plot with the stadium ball.

3 Background

3.1 The moving part

Except for the collisions with the walls,the motion fo the billiard is quite simple.Between collisions the velocity is constant so we have:


where and change only through collisions with the walls.These equation can be solved using our usual Euler alogrithm.

3.2 The collision part

As for the collision part,we have a solution.
After each step we must check to see if there has been a collision with one of the walls,that is,if the newly calculated position puts the billiard off the table.When this happens the program must backtrack to locate the position where the collision occurred.There are several ways to do this.One way is to back the billiar up to the position at the previous time step and then use a much smaller time step,so as to move the billiard in much smaller steps.When the billiard then goes off the table again,we take the location after that iteration to be the point of collision.



After we have the components of we can relect the billiard:


Here are photos that indicate those equations explicitly.
Deflection.png-10.2kB

What if there are many balls? When shall learn next chapter.
Translational_motion.gif-398kB

3.3 Chaos Theory

Chaos theory is the field of study in mathematics that studies the behavior of dynamical systems that are highly sensitive to initial conditions—a response popularly referred to as the butterfly effect. Small differences in initial conditions (such as those due to rounding errors in numerical computation) yield widely diverging outcomes for such dynamical systems, rendering long-term prediction impossible in general. This happens even though these systems are deterministic, meaning that their future behavior is fully determined by their initial conditions, with no random elements involved. In other words, the deterministic nature of these systems does not make them predictable. This behavior is known as deterministic chaos, or simply chaos. The theory was summarized by Edward Lorenz as:

Chaos: When the present determines the future, but the approximate present does not approximately determine the future.

Logistic Tops Mixing:
LogisticTopMixing1-6.gif-1272.5kB
Six iterations of a set of states passed through the logistic map. (a) the blue plot (legend 1) shows the first iterate (initial condition), which essentially forms a circle. Animation shows the first to the sixth iteration of the circular initial conditions. It can be seen that mixing occurs as we progress in iterations. The sixth iteration shows that the points are almost completely scattered in the phase space. Had we progressed further in iterations, the mixing would have been homogeneous and irreversible. The logistic map has equation . To expand the state-space of the logistic map into two dimensions, a second state, , was created as , if and otherwise.

3.4 Lorentz Attractor

Having been aware of them,we can safely say that it will not be hard for us to draw all the plot we needed.One points need to be mentioed.A hall mark of a chaotic system is an extreme sensitivity to intial conditions.This property is also found in the Lorentz attractor:
A_Trajectory_Through_Phase_Space_in_a_Lorenz_Attractor.gif-1660.1kB

It look just like a butterfly.The Lorenz system is a system of ordinary differential equations (the Lorenz equations, note it is not Lorentz) first studied by Edward Lorenz. It is notable for having chaotic solutions for certain parameter values and initial conditions. In particular, the Lorenz attractor is a set of chaotic solutions of the Lorenz system which, when plotted, resemble a butterfly or figure eight.

Lorenz_system_r28_s10_b2-6666.png-854.9kB

Here is a photo of actual turrbulance!You may not want this.It is an airplane vortex.
Airplane_vortex_edit.jpg-995.3kB

4 Main body

Source Code 1 for stadium
Source Code 2 for Lyapunov exponent

5 Results

5.1 Perfect Circle

5.1.1 Trajectory plots

Before rendering the stadium ball,we first check the situation in the perfect sphere.As you can see,it's perfect after hundreds of collisions.Additionally,there are some ponits in the plot can never be reached no matter how many collisions occurred.
0.png-268.4kB

With the previous notation of the backwarf trace.Here we would like to investigate the precesion of the time step that may make a influence on the accuracy of the plot.Here we use the precesion , , , the previous time step.But we see no obvious differnece after the precesion reaches and later.
1.png-285.1kB

Here we use the precesion , , , the previous time step.Now we can see evidently the progessively accurate plots.
2.png-266.1kB

How about we check the details of the collide points for further observation.It is eviednt that the higher the precesion,the closer the reflection points near the boundary.
3.png-91.6kB

In this plots,we specify a particular plots.With the difference in density of points,we know the bcakward program is actually working well!
4.png-30.7kB

From this plot,we acquire a better understanding of the actually process of the collision.The collision points are not actually lies in the boundary,but span a distance that is too small too be found.In that sense,we regared this process as reflection.
5.png-38kB

5.1.2 Phase Plots

The phase plots:
6.png-18.7kB

For further description,we draw the phase plot.That is plots.We see the points gradually becomes more with the increment of collision times.
7.png-38kB

5.1.3 Stange things 0.0

Interestingly,here are some plots with different intial position of x,you may see in the plots, the area that can not be reached is changing(the radius of blank area) via the changing of intial position.
9.png-300.3kB

5.2 Stadium Ball

5.2.1 Trajectory Plots

To see an exgarrate = 0.5.It look just like a stadium
21.png-313.8kB
t01f575da354cb7c00f.jpg-72kB
Having discussed the perfect balls,let us look at the stadium ball.Here we change the to , , , . It's obviously that the higher the ,the more chaotic the trajectory is,which means the area that may never be reached before shall be reached now.But as the is becoming smaller,it behaves like the perfect circle boundary.With the limit ,it will finally becomes a circle boundary.
10.png-310kB

Worth mentioning,the more precise the backward program,the more chaotic the trajectory may be.Here we use the precesion , , , the previous time step.
11.png-308kB

The conclusion also hold that the higher the precesion,the closer the reflection points near the boundary.
12.png-81.2kB

Some details of the refelction points:
13.png-19.4kB

A comparision of different precesion.It is clear that as the precesion becomes higher,the closer the dense points near the boundry.
15.png-51.3kB

5.2.2 Phase Plots

Now it's time to make the phase plots.We choose to be , , , in order to see the variation of the plots.We can see with the increase of the value of ,the plots is becoming more alike the perfect circular one.But with low value of , it seems that all the points may be reached throughout the space.
16.png-59.1kB

5.2.3 Lyapunov exponent

Now we consider the Lorentz attractod effect of two nearly seperated balls.We plot the distance between two billiards as a function of time.The billiards were on a chaotic table (=0.01) and were given the same intial velocities,but were seperated with a small distance.Here are plots with differnet seperation of , , .Here you can see the varies a lot when the time is big enough.
17.png-82kB

The billiards seperation shows a very sharp dip after about every unit of time.These dips occur when the billiards collide with the walls,as this causes their trajectories to cross.The overall seperation is seen to increase very rapidly with time.
19.png-47.8kB
Plots wit differnet .We set to be , , .
18.png-70.6kB

6 VPython display

  1. from visual import *
  2. side = 4.0
  3. thk = 0.3
  4. s2 = 2*side - thk
  5. s3 = 2*side + thk
  6. wallR = box (pos=( side, 0, 0), size=(thk, s2, s3), color = color.green)
  7. wallL = box (pos=(-side, 0, 0), size=(thk, s2, s3), color = color.green)
  8. wallB = box (pos=(0, -side, 0), size=(s3, thk, s3), color = color.green)
  9. wallT = box (pos=(0, side, 0), size=(s3, thk, s3), color = color.green)
  10. wallG = box (pos=(0,0,-2*side),size=(s3,s3,s3),color=color.green)
  11. ball = sphere(pos=(0.2,0,0), color=color.white, radius = 0.5, make_trail=True, retain=200)
  12. ball.trail_object.radius = 0.07
  13. ball.v = vector(0.5,0.3,0.4)
  14. side = side - thk*0.5 - ball.radius
  15. dt = 0.5
  16. t=0.0
  17. while True:
  18. rate(100)
  19. t = t + dt
  20. ball.pos = ball.pos + ball.v*dt
  21. if not (side > ball.x > -side):
  22. ball.v.x = -ball.v.x
  23. if not (side > ball.y > -side):
  24. ball.v.y = -ball.v.y
  25. if not (side>ball.z>-side):
  26. ball.v.z=-ball.v.z

We obtain the plot in 2-Dimension.11111.gif-720.7kB

Also, there is 3-Dimension.!2016-11-19 22_28_50.gif-842.8kB30

7 Acknowledgement

1.Thanks to Wikipedia.
2.Thanks to Yu Kang,since we discuss the details of the program.
3.Zong Yue for his VPython program.

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