Visualizations
098 / 500

098 · Physics

FPUT Recurrence

The 1955 computer experiment where a chain of masses refused to thermalize.

Thirty-two masses between two walls are joined by springs whose force is d plus alpha d squared, and all the energy starts in the lowest normal mode. Fermi, Pasta, Ulam and Tsingou expected the nonlinearity to share it out evenly among all 32 modes; instead it flows into modes 2 to 5 and, about 157 periods later, returns almost entirely to mode 1. The chain is integrated with Yoshida's fourth order symplectic method, hundreds of steps a frame, so the energy error (shown live) stays near 1e-7 on the classic run and around 1e-5 even on the hot ones, and the recurrence is the physics, not the integrator. Mode energies come from a discrete sine transform each frame, shown as a live log-scale spectrum and a history plot that marks each return, while the chain is drawn stroboscopically with its recent envelope and its springs tinted by stretch.

Try it. Drag across the chain to sketch any starting shape, click it to pluck, or click a bar to start in that pure mode. Up and down (or the - and + buttons) change the nonlinearity, left and right change the speed, B switches between the alpha and beta models, 1 to 4 (or Next preset) load presets including a strongly nonlinear and a hot chain that thermalize, R restarts and space pauses.

  • Symplectic integration
  • Normal modes
  • Discrete sine transform
  • Hamiltonian chaos

View the source · one module, plus a small shared runtime for sizing, the animation loop and input

Build your own

Paste this into Claude Code, Codex or any coding agent to get a simple version running, then take it wherever you like.

Recreate the 1955 Fermi-Pasta-Ulam-Tsingou experiment with JavaScript and the HTML canvas element. Put everything in a single index.html file with no libraries or build step, so I can open it directly in a browser.

Start simple:
- Make a canvas that fills the window, stays sharp on high-DPI screens (scale by devicePixelRatio), and resizes with the window. Use a dark background.
- Simulate 32 masses on a line between two fixed walls. The force from a spring stretched by d is d + alpha * d * d with alpha = 0.25.
- Start them in the lowest normal mode: displacement x_n = sin(n * pi / 33), at rest.
- Integrate with velocity Verlet (leapfrog) at a time step of about 0.1, running a few hundred steps per frame so the slow energy exchange is visible within seconds.
- Draw the chain as dots joined by lines, with the displacement exaggerated vertically.

Once that works, make it tell the story:
- Each frame, compute the normal mode amplitudes with a discrete sine transform, Q_k = sqrt(2/33) * sum of x_n sin(n k pi / 33), and the mode energies E_k = (P_k^2 + omega_k^2 Q_k^2) / 2 with omega_k = 2 sin(k pi / 66).
- Show a bar chart of the 32 mode energies on a log scale, and a plot over time of the share held by modes 1 to 5. Mode 1 should drain into the others and then come back almost completely after about 157 of its periods.
- Print the total energy error so you can see the integrator is trustworthy, and color the springs by stretch.

Explain the key ideas in short code comments. When you're done, tell me how to open it and suggest three directions I could take it next, such as a fourth order symplectic integrator, keys to raise alpha until the recurrence breaks into thermalization, or the cubic beta model where only odd modes ever wake up.
PreviousGalaxy CollisionTwo spiral galaxies collide and fling out long tidal tails. NextProtein FoldingAn HP lattice protein folds a hydrophobic core under replica-exchange Monte Carlo.

Related visualizations

  • Three-Body BalletPhysics Twenty-two periodic three-body orbits, inked like calligraphy until a nudge breaks them.
  • Tumbling T-HandlePhysics A spinning T-handle in zero g flips end over end, again and again.
  • Double PendulumPhysics Pendulums that start almost identical and end up worlds apart.
  • Quantum BilliardsPhysics A quantum wave packet bounces around chaotic billiards and leaves scars.
  • Laser ModesPhysics Hermite-Gauss grids, donuts and spinning vortex beams from a two-mirror laser.
  • Orbital ResonanceAstronomy A seven-planet resonant chain that chimes on every transit and weaves its own spirograph.
  • Dynamical BilliardsPhysics A fan of 1,000 balls in reshapable tables, linked live to the Birkhoff phase map.
  • Fourier EpicyclesMath A chain of spinning circles traces any drawing you give it.
  • Bubble ChamberPhysics Archival film of particle tracks: tightening spirals, V decays and pairs.

Use ← and → to move between demos. While the canvas has focus, keys go to the demo instead.

← More from Emergent Mind Labs