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.
Richard FitzHugh (1961) and Jin-ichi Nagumo (1962) reduced Hodgkin and Huxley’s four-variable model of the nerve impulse to two variables: a fast activator , which plays the membrane voltage, and a slow inhibitor , which brings the cell back to rest. The result is an excitable medium. A small disturbance dies away, a disturbance above a threshold sets off a full pulse, and after the pulse the tissue is refractory for a while and cannot fire again. The same behavior carries electrical waves through heart muscle, where rotating spiral waves are a known mechanism of dangerous arrhythmias, and it makes the chemical spirals of the Belousov-Zhabotinsky reaction. This simulation uses the kinetics that Dwight Barkley proposed in 1991 because they are cheap to compute and reproduce the spiral waves of excitable media well.
What you see
The color shows the activator : bright cells are excited, dark cells are at rest or still recovering. The grid has 200 by 200 cells, and every frame advances the equations by 8 steps of .
With the default values a plane wave travels about 1.2 cells per frame, 72 cells per second at 60 frames per second, as a bright band 7 to 11 cells wide. Behind it the inhibitor is high, so a wave cannot run back into the region it just left. Two waves that meet both run into refractory tissue and annihilate instead of passing through each other. A wave with a free end does not simply advance: the end curls around and turns the wave into a spiral, which keeps rotating around a small core without any further stimulus.
Governing equation
The rest state is , and for it is stable, so no cell fires on its own. A cell fires when exceeds the threshold , and the inhibitor then follows on a time scale of 1, while changes on the much shorter time scale . Ahead of a wave , and the front is that of the bistable equation, which travels at
For the defaults this predicts 1.43 cells per frame; the simulation reaches 85% of that because the front, about cells wide, is barely resolved on the grid. The equations are integrated with explicit Euler steps and a five-point Laplacian, , which is stable for , so for diffusion coefficients up to 16.7.
Presets
All presets use , and .
Spiral pairs: , , edges that wrap around. The run starts from five excited discs, each with a recovering quarter that blocks part of its wave. Every disc breaks up into a pair of spirals turning in opposite directions, and within 2 seconds the grid is filled with ten spirals that are still turning after 30 seconds.
Single spiral: the same kinetics with solid edges, started from a straight wave across half of the grid. Its free end, in the middle of the grid, winds up into one spiral that turns once every 30 to 33 frames (about 0.53 seconds, or 3.8 time units). Its arms are 32 cells apart, and its tip circles a core about 10 cells across.
Meandering spiral: , , started like the single spiral. The tip no longer circles in place: it runs along small loops, one per rotation, that themselves move around a circle about 50 cells across in roughly 16 seconds, a flower-shaped path. At a fixed point the time between waves therefore swings between 27 and 36 frames as the source moves toward and away from it.
Parameters
Parameter a and Parameter b: they set the excitation threshold . A larger or a smaller makes the medium more excitable, with a lower threshold and faster waves.
Time scale ratio ε: how much faster the activator reacts than the inhibitor. A smaller gives sharper fronts that travel faster, .
Diffusion Dᵤ and Diffusion Dᵥ: the diffusion coefficients in cells² per time unit. The wave speed grows as : 0.82, 1.2 and 1.75 cells per frame at = 4, 8 and 16. The formula above predicts 1.0, 1.43 and 2.0; at the simulated speed falls to 68% of it, because the front becomes too narrow for the grid.
Boundary: periodic edges wrap around, so the grid is a torus. Solid edges are walls through which nothing diffuses; a wave that reaches them disappears.
Resolution: the side length of the grid, 50 to 400 cells. Waves keep their size in cells, so a larger grid holds more of them. Changing it restarts the simulation.
All other controls act immediately on the running simulation.