numerical experiments in billiards - diva...

18
Numerical Experiments in Billiards Michael Turaev 1 Abstract In this work we first talk about several physical motivations behind billiards and the rea- son why studying billiards is useful in certain areas of physics. From these, we deduce a mathematical model and talk about several methods for performing numerical compu- tations that allow us to construct and analyse the dynamics of closed smooth boundary billiards in a simulation. Finally, we will analyse how the dynamics of the elliptical billiard changes with the introduction of a perturbation. Contents 1 Abstract 1 2 Introduction 2 3 Physical motivation 2 3.1 Geodesic flow .................................. 2 3.2 Fermat’s principle ................................ 2 3.3 Hamiltonian ................................... 2 4 Mathematical model 3 4.1 The circle .................................... 4 4.2 The ellipse .................................... 5 4.3 The boundary .................................. 7 5 Numerical methods 7 6 Results 8 6.1 The circle .................................... 8 6.2 The ellipse .................................... 9 7 Pertubation 11 8 Conclusion 14 A Python code 15 1

Upload: others

Post on 16-Sep-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

Numerical Experiments in Billiards

Michael Turaev

1 Abstract

In this work we first talk about several physical motivations behind billiards and the rea-son why studying billiards is useful in certain areas of physics. From these, we deducea mathematical model and talk about several methods for performing numerical compu-tations that allow us to construct and analyse the dynamics of closed smooth boundarybilliards in a simulation. Finally, we will analyse how the dynamics of the elliptical billiardchanges with the introduction of a perturbation.

Contents

1 Abstract 1

2 Introduction 2

3 Physical motivation 23.1 Geodesic flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.2 Fermat’s principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.3 Hamiltonian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

4 Mathematical model 34.1 The circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44.2 The ellipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54.3 The boundary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

5 Numerical methods 7

6 Results 86.1 The circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86.2 The ellipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

7 Pertubation 11

8 Conclusion 14

A Python code 15

1

Page 2: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

2 Introduction

A billiard is a model in which a particle moves freely within a confined region and bouncesoff the walls elastically. Physically this can be interpreted in several different ways.

The goal of this work is to analyse whether billiards is an appropriate model for kineticgas theory. In this report we will be focusing on two dimensional smooth closed convexbilliard and we will check whether they follow the ergodic hypothesis, which is assumedfor kinetic gas theory and for thermodynamics. The ergodic hypothesis states that in asystem of fixed energy all possible states will be achieved over a long period of time.

The billiards that will be considered are the circle and the ellipse. These can be fullyexplained using trigonometry, the results of which will be shown. A mathematical modelof the billiards will be constructed and using numerical methods will be simulated. Then aperturbation on the elliptical billiard will be considered and how the perturbation changesthe dynamics of a billiard will be discussed.

3 Physical motivation

A billiard can be interpreted in different ways, each way will result in allowing us to studya different area of physics in more detail.

3.1 Geodesic flow

Consider a particle confined to geodesic flow on the surface of a volume. The billiard canbe seen as the limit of flattening the volume until a 2 dimensional plate is formed. Inthe limit when the particle hits the boundary it will go over it and resume the trajectoryfrom underneath the surface, but when viewed from the top the trajectory looks identicalto a billiard. For example take the volume to be a sphere, in the limit we will obtainthe circular billiard. As the particle moves along the geodesics it satisfies the principle ofleast action, so the particle can also be considered a light ray travelling inside a boundarywith total internal reflection.

3.2 Fermat’s principle

Consider a light ray travelling with total internal reflection inside a boundary movingfrom point A to point B with exactly 1 bounce. Due to the total internal reflection thelight ray does not lose energy to the surrounding and energy is conserved. If we let thesystem evolve we obtain a picture that looks exactly like a billiard.

3.3 Hamiltonian

Consider a particle which travels freely inside a boundary B that has the following Hamil-tonian

H(x, y) =1

2(p2x + p2y) + V (x, y), (1)

where

V (x, y) =

{0 if x, y ∈ B,∞ otherwise.

(2)

2

Page 3: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

The boundary can be described by a function. For example the circular billiard isconstructed by the B satisfying the following zero level set

f(x, y) = x2 + y2 − 1. (3)

As the collisions are elastic the kinetic energy of the particle has to be conserved.This is achieved by keeping the p2i term constant, where i = x, y. This can be achievedby changing pi into −pi, this corresponds to changing the direction. This is equivalent tothe laws of reflection.

4 Mathematical model

Now that the physical motivations have been discussed a mathematical model can builtto satisfy the conditions we need.

Firstly we discuss the coordinates of billiards. We define them in 2 different ways.The first way is done by assigning normal Cartesian coordinates to the particle. Thesewill mainly be used in the program and to draw the trajectories.

The second way is done by the parametrisation of the arclength i.e. we only use onecoordinate s ∈ [0, 1). These will mainly be used for the phase map which plots the currentpoint si on the horizontal axis and the landing position si+1 on the vertical axis.

Secondly we discuss the initial conditions. They are given as the initial position of theparticle s0 and the angle θ that the trajectory makes to the boundary. This is equivalentto knowing the initial position and the position of the first collision with the boundarys1, as each angle will give a unique position of the landing point. By the laws of reflectionif the first two initial points on the boundary are known, then the third point will beunique. For a specific billiard to fully construct the trajectory all we need to know arethe numeric values of s0 and s1.

The circular [1] and the elliptical [2] billiards can be fully explained using trigonometry.

3

Page 4: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

4.1 The circle

The following are the possible trajectories in the case of the circular billiard.If the initial point is at s0 = 0 and the landing point is halfway across of the boundary

s1 = 0.5, then it will bounce back to the initial point.

Figure 1: Trajectory of a circular billiard with initial conditions at s0 = 0 and s1 = 0.5.

If the landing point s1 is a rational number of the arclength the trajectory is periodicand the particle will always return to the initial starting point.

Figure 2: Periodic trajectory of a circular billiard with initial conditions at s0 = 0 ands1 = 0.7.

4

Page 5: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

If the landing point s1 is an irrational number, the trajectory is quasi periodic andthe particle will not return to the initial position, but it will get arbitrarily close to theinitial starting point.

Figure 3: Trajectory of a circular billiard with initial conditions at s0 = 0 and s1 = 2.45/π.

All trajectories are tangent to a circle inside the circular boundary, this is called acaustic [1].

4.2 The ellipse

The following are the possible trajectories in the case of the elliptical billiard.If the initial point is at s0 = 0 and the landing point is halfway the boundary at

s1 = 0.5 then the particle will bounce back to the initial position, same as in the circle.

Figure 4: Trajectory of an elliptical billiard with initial conditions at s0 = 0 and s1 = 0.5.

5

Page 6: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

If the first trajectory crosses a focus point of the ellipse, it will hit the second focusand converge to the line between the two foci.

Figure 5: Trajectory of an elliptical billiard with initial conditions at s0 = 0.9825 ands1 = 0.4686.

We observe two different trajectories depending on whether the initial trajectorycrosses the line that connects the two foci in between or outside the two foci. If itcrosses in between the two foci then all the reflections will do the same.

Figure 6: Trajectory of an elliptical billiard with initial conditions at s0 = 0.1 and s1 = 0.8.

6

Page 7: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

If the initial trajectory crosses outside of the two foci then all the reflections will alsodo the same.

Figure 7: Trajectory of an elliptical billiard with initial conditions at s0 = 0.1 and s1 = 0.4.

All these trajectories are tangent to cofocal conics. In the first case it is a hyperbolicconic, and in the second case it is an elliptical conic.

4.3 The boundary

The boundary is modelled as a zero level set of a function f(x, y). In the case of the circlethe function is given by

f(x, y) = x2 + y2 − 1. (4)

In the case of the ellipse the function is given by

f(x, y) =(xa

)2+(yb

)2− 1 (5)

5 Numerical methods

The billiard model will be simulated using python (see Appendix). Therefore the modelneeds to be constructed using numerical methods.We start with two points in Cartesian coordinates which will correspond to the initialconditions of the billiard. Define M to be the vector pointing from the first point to thesecond point. It is obtained from the equation of the line joining the two points. Thenwe follow the vector incrementally in small steps. As we go in steps we will jump overthe boundary when we get close to it. This is checked by plugging in the values for thecoordinates of the initial position of the particle into the equation of the boundary, thisgives us a value v1. Then we subtract the obtained value from the value we would havereceived if we used the initial position, v0. If the answer is negative we are still within theboundary, and if the answer is positive we have jumped over the boundary. When thisoccurs we refine the position of the particle using the Newton method on the equation ofthe boundary and the equation of the line until the difference of v1− v0 is of order 10−12.This is the landing point (which was given in the initial conditions), now the trajectory is

7

Page 8: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

reflected along the tangent of boundary and then the process is repeated to find the nextlanding point.The boundary is plotted by turning the equation of the boundary into two coupled dif-ferential equations. We consider the following initial value problem(

xy

)=

(∇f(x, y)

||∇f(x, y)||

)n

,

x(0) = 1,

y(0) = 0,

(6)

where (v, w)n = (w,−v).This is computed using the Runge-Kutta 4 method numerically. This is also used

to find the arclength coordinate of the particle, which is done by integrating up to thelanding point and recording the arclength.

6 Results

These are the results obtained from the simulations.

6.1 The circle

Figure 8: The trajectory of a circular billiard obtained from 100 reflections with s0 = 0and s1 = 2.45/π.

The circle has only caustic solutions which shows that it is a completely non ergodicbilliard.

8

Page 9: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

6.2 The ellipse

The following plot corresponds to the trajectory and phase map when the initial trajectorycrosses inside of the two foci.

(a) Plot of the trajectory in Cartesian space. (b) Plot of the trajectory in a phase map.

Figure 9: The trajectory (a) and the phase map (b) of an elliptical billiard obtained from100 reflections with s0 = 0.1 and s1 = 0.8.

The following plot corresponds to the trajectory and phase map when the initialtrajectory crosses outside of the two foci.

(a) Plot of the trajectory in Cartesian space. (b) Plot of the trajectory in a phase map.

Figure 10: The trajectory (a) and the phase map (b) of an elliptical billiard obtainedfrom 100 reflections with s0 = 0.1 and s1 = 0.4.

The phase map shows that the caustic solutions have points that lie on a line, thisline would be continuous if the number of reflections was increased.

9

Page 10: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

Now we will plot many initial conditions on one phase map, so that many initialconditions can be analysed at the same time.

Figure 11: The phase map of an elliptical billiard obtained with 90 different initial con-ditions and 100 reflections each.

We can see that the ellipse also only has caustic solutions and is therefore completelynon ergodic.

These results agree completely with the trigonometric analysis of these billiards.

10

Page 11: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

7 Pertubation

We will now introduce a perturbation on to the elliptical billiard in the following way

f(x, y) =(xa

)2+ y2 − 1 + ε sin(x), (7)

where ε is small.First we will look at how the perturbation affects the single trajectory.

(a) ε = 0 (b) ε = 0.1

(c) ε = 0.2 (d) ε = 0.3

Figure 12: How the trajectory of an elliptical billiard changes when a perturbation isapplied with initial conditions s0 = 0.05 and s1 = 0.45 with ε increasing in steps of 0.1

We can see that the caustic solution breaks and when the perturbation is increasedeven further it becomes chaotic, this satisfies the ergodic hypothesis.

11

Page 12: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

Now we look at the same trajectory as above, but plotted in a phase map.

(a) ε = 0 (b) ε = 0.1

(c) ε = 0.2 (d) ε = 0.3

Figure 13: How the phase map of an elliptical billiard changes when a perturbation isapplied with initial conditions s0 = 0.05 and s1 = 0.45 with ε increasing in steps of 0.1

We see that firstly the caustic breaks up into islands, which in turn spread out intothe chaotic region. Lastly we will look at how the perturbation affects the phase mapwith many initial conditions.

(a) ε = 0 (b) ε = 0.1

12

Page 13: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

(c) ε = 0.2 (d) ε = 0.3

Figure 15: How the phase map of an elliptical billiard changes when a perturbation isapplied with 90 different initial conditions, 100 reflections each.

As we can see more caustics break down and become chaotic as we increase the per-turbation, but there always remain some caustic solutions even when the system is highlyperturbed.

An example trajectory that shows this, is a trajectory that has initial points that arevery close to each other. This is portrayed below

(a) Plot of the trajectory in Cartesian space. (b) Plot of the trajectory in a phase map.

Figure 16: The trajectory (a) and the phase map (b) of a highly perturbed ellipticalbilliard with ε = 0.5 obtained from 100 reflections with s0 = 0 and s1 = 0.05.

13

Page 14: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

We will now look at a more detailed phase map with each trajectory having its owncolour.

Figure 17: The phase map of an elliptical billiard obtained with 210 different initialconditions and 1000 reflections each with ε = 0.5.

We can see that the caustic solutions are a singular colour, and the chaotic regionhave a lot of colour in them.

Near the hyperbolic caustics we can see that there are regions of single colour chaos.Which corresponds to a hyperbolic caustic breaking.

Near the elliptical caustics we can see a lot of chaos, and small islands forming nearthem.

8 Conclusion

We have seen that there are billiards which show no ergodicity at all, and there are billiardsthat partially show ergodicity. This shows that the billiard model is an incomplete model,so we need to consider adding more hypotheses to develop the model further so that it willsatisfy the kinetic gas theory. As in a gas there are many particles confined in a volume,collisions could be a factor in the dynamics of the particles. This should be considered ina further model that will expand on this one. Non convex billiards should also be studiedfurther, as they will provide more results on the dynamics of billiards.

References

[1] Boris Hasselblatt and Anatole Katok, A First Course in Dynamics with a Panoramaof Recent Developments, p. 180-181.

[2] Mark Levi and Serge Tabachnikov, The Poncelet Grid and Billiards in Ellipses, THEMATHEMATICAL ASSOCIATION OF AMERICA, December 2007.

14

Page 15: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

A Python functions

import numpy as npimport timeimport sys

#cons tan t s f o r the e l l i p s e and pe r t u r ba t i onf a =2.0fb =1.0eps =0.5

#equat ion o f the boundarydef H(x , y ) :

return ( x/ fa )∗∗2+(y/ fb )∗∗2+ eps∗np . s i n ( x )

#the equat ion o f the g rad i en tdef gradH (x , y ) :

v=np . z e r o s ( ( 2 ) )v [0 ]=2∗x/ fa∗∗2+eps∗np . cos ( x )v [1 ]=2∗y/ fb ∗∗2return v

#bu i l d s the ODEdef F( t , y , gradH ) :

#a=4.0#b=2.0F=np . z e r o s ( ( 2 ) )v=np . z e r o s ( ( 2 ) )v=gradH ( y [ 0 ] , y [ 1 ] )norm=np . s q r t ( v [0]∗∗2+ v [ 1 ] ∗ ∗ 2 )F[0 ]= v [ 1 ] / normF[1]=−v [ 0 ] / normreturn F

#Runge−Kutta 4 methoddef run kut4 (F , t , y , h ) :

K0 = h∗F( t , y , gradH )K1 = h∗F( t + h /2 .0 , y + K0/2 .0 , gradH )K2 = h∗F( t + h /2 .0 , y + K1/2 .0 , gradH )K3 = h∗F( t + h , y + K2, gradH )return (K0 + 2.0∗K1 + 2.0∗K2 + K3)/6 . 0

#loops the Runge−Kutta 4 i n t e g r a t o rdef i n t e g r a t e (F , t , y , tStop , h ) :

X = [ ]Y = [ ]X. append ( t )Y. append ( y )

15

Page 16: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

while t < tStop :h = min(h , tStop − t )y = y + run kut4 (F , t , y , h )t = t + hX. append ( t )Y. append ( y )

return np . array (X) , np . array (Y)

#func t i on t ha t conver t s a r c l en g t h to ca r t e s i andef intT ( t0 , t f , y ) :

h=( t f−t0 )while h>10∗∗(−4):

h=h /2 .0t=t0tStop=t fwhile t<tStop :

y = y + run kut4 (F , t , y , h )t = t + h

return y

#func t i on t ha t conver t s c a r t e s i an to a r c l en g t hdef a r c l eng th ( t0 , tStop , i n i t ) :

t = t0tStop = tStopy = i n i tyaux=yh = 0.001f l a g=0while t<tStop :

y = y + run kut4 (F , t , y , h )t = t + hi f y [1 ] >0 :

f l a g=1i f ( f l a g==1 and y [1 ] <0 ) :

break

while abs (h)>10∗∗(−12):yaux=F( t , y , gradH )h=−y [ 1 ] / yaux [ 1 ]y = y + run kut4 (F , t , y , h )t = t + h

return t

#checks whether a ca r t e s i an coord ina te i s i n s i d e or ou t s i d e the boundarydef check (x , y ,H, H0 ) :

a=H(x , y)−H0i f a>=0:

16

Page 17: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

return Truei f a<0:

return False

#r e f l e c t i o ndef s tep ( b0 , b1 ) :

H0=H( b0 [ 0 ] , b0 [ 1 ] )i f abs ( b1 [0]−b0 [ 0 ] ) >0 . 1 :

a=(b1 [1]−b0 [ 1 ] ) / ( b1 [0]−b0 [ 0 ] )b=1.0

else :a=1.0b=(b1 [0]−b0 [ 0 ] ) / ( b1 [1]−b0 [ 1 ] )

M=[b , a ]N=gradH ( b0 [ 0 ] , b0 [ 1 ] )i f np . vdot (M,N)<0:

p=1else :

p=−1l 1=p∗np . array (M)n=gradH ( b1 [ 0 ] , b1 [ 1 ] )norm=np . s q r t (n [0]∗∗2+n [ 1 ] ∗ ∗ 2 )n=n/norml 2=l1−2∗np . vdot ( l1 , n)∗nh=0.1t =0.01d i f f =1i=0while abs ( t )<10∗∗(4) :

L=b1+t∗ l 2i f check (L [ 0 ] , L [ 1 ] ,H, H0 ) :

while abs ( d i f f )>10∗∗(−12):g1=H(L [ 0 ] , L[1 ])−H0A=l 2 [ 1 ]B=−l 2 [ 0 ]C=l 2 [ 0 ] ∗ b1 [1]− l 2 [ 1 ] ∗ b1 [ 0 ]g2=(B∗L[1 ]+A∗L[0 ]+C)[ J11 , J12 ]=gradH (L [ 0 ] , L [ 1 ] )det=B∗J11 − A∗J12vec =[ (B∗g1 − J12∗g2 )/ det , (−A∗g1 + J11∗g2 )/ det ]d i f f=H(L [ 0 ] , L[1 ])−H0Lcorr=L−[ vec [ 0 ] , vec [ 1 ] ]d i f f=H( Lcorr [ 0 ] , Lcorr [1 ])−H0L=Lcorri=i+1i f i ==30:

print”not working ”break

17

Page 18: Numerical Experiments in Billiards - DiVA portaluu.diva-portal.org/smash/get/diva2:908119/FULLTEXT01.pdfNumerical Experiments in Billiards Michael Turaev 1 Abstract In this work we

breakelse :

t=t+hreturn L

#loops the s t ep func t i on f o r g i ven number o f r e f l e c t i o n sdef mapping ( s0 , s1 , s teps , t , time0 ) :

b0=intT (0 , s0 , [ 1 . 0 , 0 . 0 ] )b1=intT (0 , s1 , [ 1 . 0 , 0 . 0 ] )i=0Spo ints=np . z e r o s ( ( s t ep s +2 ,1))Cpoints=np . z e r o s ( ( s t ep s +2 ,2))Spo ints [0 ]= s0 / tCpoints [0 ]= b0Spo ints [1 ]= s1 / tCpoints [1 ]= b1while i<s t ep s :

b2=step ( b0 , b1 )Spo ints [ i +2]=(t−a r c l eng th (0 , t , b2 ) )/ tCpoints [ i +2]=b2b0=b1b1=b2i=i+1time1=time . time ( )i f time1−time0 >= 5 :

perc =100∗ f loat ( i )/ s t ep ssys . s tdout . wr i t e ( ”\n” + ”\ r%d%%” %perc )sys . s tdout . f l u s h ( )time0=time1

return np . t ranspose ( Spo ints ) , Cpoints

18