Computational Physics Lab 3

Chaotic Dynamic Systems


The goal of this lab is to explore the behavior of two dynamic systems known to be chaotic at certain parameter settings: the logistic map and the driven physical pendulum with dissipation. You should familiarize yourself with sections 3.1 through 3.5 in Giordano and Nakanishi before starting your work.

Part 1. The Logistic Map

The logistic map is a very simple nonlinear system with only one parameter. Nevertheless, it can exhibit rich chaotic behavior. The goal of this part of the lab is to explore logistic map properties.

1) Write code which produces the logistic map sequence. Plot the value of xn vs. n for mu values of
0.5 -- population goes extinct (and any other mu < 1)
2.8 -- period-one cycle
3.3 -- period-two cycle
3.5 -- period-four cycle
3.8 -- chaotic
3.828427 -- period-three "window" in a chaotic regime

2) Build the bifurcation diagram for the system. To build this diagram, you can do the following:

Part 2. Driven Physical Pendulum with Dissipation

The driven physical pendulum with dissipation is a significantly more complicated system than the logistic map. It has four parameters:

Natural oscillation frequency (determined for small oscillation amplitudes and without dissipation)
Amplitude of the driving force
Frequency of the driving force
The dissipation coefficient

Please download the following files:

cpode.py -- ODE solver class.
physical_pendulum.py -- Generalized force model for the pendulum.
pendulum_simulation.py -- Code which illustrates plotting of the phase space diagrams, etc.
You will also need modules cpforces.py and v3.py from previous classes.

Make the "pendulum_simulation.py" file executable and run it. Change the F_D parameter to the following values: 0.5, 1.2, 1.35, 1.44, 1.5. For which values of F_D the system exhibits chaotic behavior?

Build the bifurcation diagram for F_D values between 0.5 and 2.5. Note that this diagram should include pendulum angle values in phase with the driving force: that is, at times separated by the driving force period (for more details see section 3.4 in G&N). Use the "interpolate" function of the ODE solver class to obtain the angle values at these exact times. Convert these values to the standard range between −π and π using the "standard_angle" function.

Buliding this bifurcation diagram will be a time-consuming process: if, let say, you skip 200 initial periods and then run for 200 more periods while using 100 different starting points for the initial angle, processing a single value of F_D can take several minutes -- Python is rather slow for this kind of heavy number crunching. Because of this, you should plan your calculations carefully: check that your code works fine with just a few F_D points, estimate the time needed per point, pick the number of F_D points so that your calculation will be finished in a day or so, and then run with the full set of points in such a way that your program continues running when you log out (so that you can visualize the results later). The latter can be achieved with the help of UNIX "nohup" command. If, let say, your script name is "my_bifurcation_diagram.py" and you made it executable, you can run it unattended as follows:

nohup ./my_bifurcation_diagram.py >& my_bifurcation_diagram.out &

In this case both the standard output and the standard error printouts from your scripts will be redirected into the file named "my_bifurcation_diagram.out".


Submit your lab report by email before 2 pm 02/05/2008. In your report, include just the bifurcation diagrams from the two parts of the lab and your conclusions -- e.g., about interesting parameter values (when the period doubling starts, when the system transitions into chaotic regime, etc.). Do not include the code.