Assignment

Extra Session: Lorenz Attractor

You now have the full workflow for a first chaos experiment: define the Lorenz vector field, integrate the trajectory numerically, visualize the attractor in three dimensions, and compare nearby initial conditions (Lorenz 1963; Strogatz 2024).

You can follow the guide here:

Lorenz Attractor Sensitivity and Chaos

Summary of Goals

Your submission should show that you can do three things:

  1. Implement and simulate the Lorenz system correctly.
  2. Visualize both the attractor and the divergence of nearby trajectories.
  3. Explain why the system is deterministic but still hard to predict over long times.
Submission

Submit two files:

  1. Code that reproduces your figures.
  2. A short report, 1 to 2 pages, that explains your observations.

Required

  1. Implement lorenz() and simulate_lorenz() using forward Euler time stepping.
  2. Plot one three-dimensional trajectory for the standard parameter choice \(s=10\), \(r=28\), \(b=8/3\).
  3. Run two simulations with slightly different initial conditions and compare them over the same time window.
  4. Plot the pointwise separation between the two trajectories as a function of time.
  5. Compare at least two values of r and describe how the qualitative behavior changes.

Short Discussion

Include a brief paragraph that answers these questions:

  1. For how long do the nearby trajectories remain visually close?
  2. Does the system appear random, periodic, or something in between? Explain.
  3. What role does the parameter r seem to play in the shape or complexity of the trajectory?

Optional Extensions

  • Replace Euler’s method by a higher-order integrator and compare the trajectories.
  • Estimate the growth rate of the separation during the early part of the simulation.
  • Plot only one coordinate, for example \(x(t)\), and compare the two runs in time.
  • Explore other initial conditions on the same attractor.

Tips for Success

  • Start with a small dt, such as 0.01, before you vary parameters.
  • Use the same dt and number of steps when you compare two trajectories.
  • Plot the separation on a logarithmic vertical axis if the early growth is hard to see.
  • Keep the parameter comparison focused. Two or three values are enough if you interpret them well.
Tip

Reference code is available in amlab/extra/lorenz_attractor.py.

Good luck.

References

Lorenz, Edward N. 1963. “Deterministic Nonperiodic Flow.” Journal of the Atmospheric Sciences 20 (2): 130–41. https://doi.org/10.1175/1520-0469(1963)020<0130:DNF>2.0.CO;2.
Strogatz, Steven H. 2024. Nonlinear Dynamics and Chaos: With Applications to Physics, Biology, Chemistry, and Engineering. Chapman; Hall/CRC.