Path: blob/master/activities/Project02.ipynb
934 views
#Project
This activity represents a proposed project. Each student must provide an ipython notebook with the solution of the proposed problems, along with all the performed procedures and related codes, as well as the obtained results.
Due to: Thursday June 23, noon
Henon-Heiles System
The Henon-Heiles system is a very used non-linear system of equations to illustrate the emergence of Hamiltonian Chaos by the mechanism of unfolding of torus. It was initially conceived by Michael Henon and Carl Heiles when working on the motion of stellar systems around a galactic centre where the motion is confined to a plane. The potential of the system is given by:
The parameter is usually taken as . The Hamiltonian of the system is then given by:
Applying the canonical equations of motions, we obtain the next system:
Instead of giving arbitrary initial conditions to this system, there is a more physical motivated way to do it. For a conservative mechanical system, the total energy of a system equals the Hamiltonian function:
Due to the law of conservation of energy, must remains constant during the movement.
For choosing an appropriate set of initial conditions, we are going to use the next monte carlo technique:
Set an arbitrary set of conditions , , .
Solve the equation of energy for , obtaining:
If the previous value of is negative, try again from step 1. If positive, take this as the initial value .
The obtained set is compatible with the energy and can be used for solving the Henon-Heiles system.
Poincaré Map
A Poincaré map is a type of representation of a dynamical system where just a section of the phase space is studied. This is very useful when handling multidimensional phase spaces.
For the previous problem, suppose you have a solution given by . The Poincaré map associated to and can be constructed storing the points everytime . This can be though then as a plane cut of a four-dimensional phase space.
For the previous figure, the Poincaré map is the set of all the red points corresponding with the trajectory when crosses the plane (i.e. ).
Activities
For this activity, we are going to use a RK4 integrator in order to solve the Henon-Heiles system. After that, we are going to construct Poincaré maps for initial conditions consistent with different energy values. For each energy value, it is possible to see the associated dynamics, seeing the emergence of chaotic regime (hamiltonian chaos or chaos in conservative systems) as we increase the energy.
1. (10%) Runge-Kutta 4
Write a routine called RK4-step(y,t,h)
that, given the vector solutions y
at certain time t
, returns the solution for the next time interval t+h
.
2. (10%) Dynamical Function
Write the dynamical function of the Henon-Heiles system. This is, a routine that given a vector with the variables of the system, it returns the corresponding derivatives for each one.
3. (5%) Parameter of the System
Define the next parameters of the system: , , , .
4. (10%) Henon-Heiles Potential
Plot, using the function contourf
of the matplotlib
library the function . For this you must construct a matrix where rows are associated to coordinates, while columns are to coordinates. You should obtain something like:
tip: you can use a double for cicle for constructing the matrix of the potential. This matrix can be then given as argument to the contourf
function.
5. (35%) Poincaré Map Function
Define a routine called Poincare( energy, Ncond, tmax, h )
that, given a energy value (energy
), the number of initial conditions to be integrated (Ncond
), the maximum integration time (tmax
) and the time step (h
), calculates the Poincaré map of the system.
For this, you have to make first a for cicle over the number of initial conditions. It means something like:
where ys
and pys
are used to store the points of the Poincaré map, i.e., when the solution .
In numeral 3 you have defined two parameters, namely and . Using the monte carlo method exposed before, generate a random value y0
between and , then do the same for py0
between and . Set x0 = 0
and using the provided energy value to the Poincare
routine and the equation for , calculate that value. If , the found set of initial conditions is not compatible with that energy. You must then repeat the process until you find a value . Once there, make px0
.
Using a second for, integrate the system over the time, until tmax
, in time intervals of . Inside that for, for every time, check the condition , i.e.
If that is satisfied, store the respective value of Yi
and Pyi
, that is, the value of the coordinate and the momentum at that time.
You must repeat all of this for all the Ncond
initial conditions. Finally plot, using a scatter diagram, the obtained array ys
against pys
. At this point, you have computed already the Poincaré map for the Henon-Heiles system.
6. (30%) Behaviour of Henon-Heiles System
Using the previous routine, study the behaviour of the Henon-Heiles system for the next energies:
tips: use a time step of , a maxim integration time of and a number of initial conditions . You shoud obtain something like:
In this figures, it can be seen that, as the energy increases, the chaotic motion is more dominant. Oscillatory solutions (contrary to chaotic ones) are represented by circular orbits. In the first figure, for , all the orbits are oscillatory, while for the last figure, for , orbits are chaotic as they do not present regular patrons.