Double pendulum
This simulation needs WebAssembly, and it could not start in this browser.
The image is a frame from a real run. Check that JavaScript is on, or try another browser.
Hang a second pendulum from the bob of the first and you have one of the simplest mechanical systems that is chaotic. At small amplitudes it behaves like two coupled oscillators and can be solved on paper. At large amplitudes the lower arm starts to flip over the top, and two runs that begin a fraction of a degree apart soon look nothing alike.
What you see
Two rods with point masses at their ends swing from a fixed pivot, and the lower bob leaves a fading trail. With Number of pendula above 1, several copies start together, each with its upper angle shifted by a further ε, drawn in the colors of the chosen Color theme. For a while they move as one, then they fan out. The λ₁ (Lyapunov) readout estimates the largest Lyapunov exponent with Benettin’s method: a positive value means nearby trajectories separate exponentially. It takes about 10 seconds to settle.
chaotic (large angle): the rods start at rest at 120° and −70° from the vertical. The lower rod soon makes full turns, and the motion never repeats.
small-angle (linear): both rods start at 10°. The motion stays close to a sum of the two normal modes and remains regular.
in-phase normal mode: the upper rod starts at 8° and the lower at about 11.3°, √2 times as far, both to the same side. For equal masses and lengths the slow normal mode has both rods swinging together at .
out-of-phase normal mode: the upper rod starts at 5° and the lower at about 7.1° to the other side. The fast mode, with the rods bending against each other, has .
Governing equation
With both angles measured from the vertical and , Lagrange’s equations for two point masses give
The simulation adds a damping term to each and, if switched on, a periodic drive on the upper arm. It integrates the four first-order equations for with fourth-order Runge-Kutta by default, in four substeps per step.
Parameters
Mass m₁ (kg), Mass m₂ (kg): the upper and lower bob, 0.1 to 5 kg. Unequal masses shift the normal-mode frequencies.
Length l₁ (m), Length l₂ (m): the rod lengths, 0.1 to 3 m. The frequencies scale as .
Gravity g (m/s²): gravitational acceleration, 0.1 to 25.
Damping γ (s⁻¹): linear damping of both angular velocities.
drive amp, drive freq: amplitude and angular frequency of the driving torque. An amplitude of 0 turns it off.
Number of pendula, Initial separation ε: up to 20 pendula, the -th starting with its upper angle raised by , with ε between and 0.1 rad. The smaller ε, the longer the copies stay together before the exponential growth shows.