FitzHugh-Nagumo excitable media · 2D tissue · Spiral wave reentry
Click anywhere on tissue to stimulate
Membrane potential v ∈ [−2, 2]
A 2D excitable-media simulation of cardiac tissue using the FitzHugh–Nagumo model. Click to stimulate regions and watch action potential waves, spiral reentry and fibrillation emerge from a simple two-variable ODE.
How excitable cells (cardiomyocytes) generate and propagate electrical impulses. The FitzHugh–Nagumo model captures depolarisation, repolarisation and the refractory period with just two variables — a fast voltage-like variable and a slow recovery variable.
Click anywhere on the tissue grid to deliver a stimulus. Place a second stimulus during the refractory tail to trigger spiral reentry — the mechanism behind cardiac arrhythmias. Adjust diffusion and time constants to control wave speed.
Spiral reentry waves in the heart are a leading cause of ventricular tachycardia and fibrillation. Defibrillation works by simultaneously depolarising all cells, resetting the tissue so the normal pacemaker (SA node) can regain control.
This is a 2D FitzHugh-Nagumo model of cardiac tissue, an idealised excitable medium that reproduces how heart cells fire and recover. Each grid point obeys two coupled ordinary differential equations: a fast voltage-like variable v with a cubic nonlinearity, and a slow recovery variable w. Coupling neighbouring cells through a diffusion term turns isolated firing into travelling waves, and a well-timed second stimulus produces rotating spiral reentry — the abstract analogue of a cardiac arrhythmia.
The reaction-diffusion equations dv/dt = v − v³/3 − w + D·∇²v and dw/dt = ε(v + a − b·w) are integrated on a 120×120 grid by explicit forward Euler (dt = 0.05) with no-flux boundaries. The voltage field v ∈ [−2, 2] is colour-mapped from dark blue (rest) to white (peak depolarisation), and a live trace plots v at the centre cell.
Click or tap the tissue to inject a stimulus of adjustable radius. Use Pause/Reset, or the Spiral Wave and Pulse presets. The sliders set diffusion D (0.1–2.0, wave speed), excitability a (0.05–0.5), recovery rate ε (0.01–0.3, refractory length) and stimulus radius (2–20 px). Stats report active cells, step count, centre voltage and mode.
The FitzHugh-Nagumo model was derived in 1961 as a two-variable simplification of the four-variable Hodgkin-Huxley equations, stripping away ion-channel detail while keeping the threshold, all-or-none spike and refractory period that make tissue excitable.
It is a simplified mathematical model of an excitable cell, describing membrane behaviour with just two variables instead of the many ionic currents in the full Hodgkin-Huxley equations. A fast variable v captures the voltage spike via a cubic term, while a slow variable w provides recovery. Despite its simplicity it reproduces threshold firing, an all-or-none action potential and a refractory period.
Each cell is coupled to its four neighbours through the diffusion term D·∇²v, computed here as a discrete Laplacian. When one region depolarises, diffusion raises the voltage of neighbours above threshold, so they fire in turn and the excitation propagates as a travelling wave. Raising the diffusion slider D increases wave speed.
Diffusion D scales the coupling between cells and therefore conduction velocity. Excitability a shifts the firing threshold of the recovery dynamics. Recovery rate ε sets how quickly w relaxes, which controls the refractory period and wave width. Stim radius sets the size, in pixels, of the circular region affected by each click.
A spiral arises when a wave meets tissue that is still refractory on one side. The Spiral Wave preset sets up exactly this S1-S2 condition by partially recovering one half of the grid, so the wavefront can only curl around the refractory edge. The resulting rotating spiral is the model analogue of reentrant arrhythmias such as tachycardia and fibrillation.
It is qualitatively accurate but not quantitatively realistic. The model deliberately abstracts away ion channels, real cell geometry and tissue anisotropy, and its variables are dimensionless rather than measured in millivolts or milliseconds. It is excellent for teaching the principles of excitability, propagation and reentry, but clinical electrophysiology uses far more detailed ionic models.
This simulation models cardiac excitable tissue using the FitzHugh-Nagumo two-variable reaction-diffusion system, which captures the essential dynamics of how heart muscle cells (cardiomyocytes) generate, sustain and propagate electrical impulses. A fast voltage-like variable v mimics the membrane depolarisation spike through a cubic nonlinearity, while a slow recovery variable w enforces the refractory period; diffusive coupling between grid cells turns local firing into travelling action-potential waves across the 2D tissue sheet.
Understanding cardiac action potentials is the biological foundation of electrocardiography (ECG) and the clinical management of arrhythmias — from the pacemaker rhythms of the sinoatrial node to the life-threatening spiral reentry patterns behind ventricular fibrillation.
A cardiac action potential is the brief, stereotyped voltage signal produced when a heart muscle cell's membrane depolarises from its resting potential of roughly -90 mV to a peak near +20 mV, then slowly repolarises over 200-400 ms. The long plateau phase — unique to cardiac cells compared with neurons — keeps the cell refractory until mechanical contraction is complete, preventing tetanic (sustained) contraction that would be fatal.
Click the "Spiral Wave" preset button to load the S1-S2 initial condition: the bottom half of the grid is fully depolarised while the right half has elevated recovery variable w, creating a partially refractory region. The wavefront can only propagate where tissue is excitable, so it curves around the refractory border and begins rotating. You can also create a spiral manually by clicking the grid to deliver two stimuli at different times — the second click during the refractory tail of the first wave is key.
The colour encodes the dimensionless membrane potential v, which ranges from -2 (resting, shown in dark blue) through intermediate values (cyan, green, orange) to +2 (peak depolarisation, shown in white). In biological terms this range corresponds approximately to the -90 mV resting potential through the +20 mV action-potential peak. The live trace in the lower-left corner plots v at the central grid cell over the last 200 simulation steps.
The model is defined by two coupled ODEs: dv/dt = v - v^3/3 - w + D * Laplacian(v) and dw/dt = epsilon * (v + a - b*w). The cubic term v - v^3/3 gives v a bistable-like character with a sharp threshold — small perturbations decay, while suprathreshold stimuli produce a full spike. The recovery variable w grows during depolarisation and drives v back to rest, creating the refractory period. The diffusion term D * Laplacian(v) couples neighbouring cells so excitation spreads spatially. This was proposed by Richard FitzHugh in 1961 as a topological simplification of the four-variable Hodgkin-Huxley equations.
Spiral reentry occurs when a depolarisation wavefront encounters a region that is still refractory, causing it to curl into a self-sustaining rotating spiral. In real cardiac tissue, a single stable spiral drives ventricular tachycardia (rapid, regular, dangerous); multiple spirals breaking up into chaotic patterns produces ventricular fibrillation, in which coordinated pumping collapses and the heart quivers ineffectively. Without defibrillation or CPR, fibrillation is fatal within minutes, which is why understanding its mechanism is critical to cardiology.
It is partly a misconception. Higher diffusion D does increase conduction velocity, but if D is raised too high in the FitzHugh-Nagumo model the Laplacian smoothing can suppress localised excitation entirely — a stimulus too small relative to the diffusion length will simply be dissipated rather than triggering a wave. In real cardiac tissue the analogous quantity is gap-junction conductance; pathological fibrosis that uncouples cells (reduces effective D) slows conduction and promotes reentry, whereas uniformly high coupling favours stable planar waves.
The ionic basis of excitability was established by Alan Hodgkin and Andrew Huxley in 1952 using voltage-clamp experiments on squid giant axons, work for which they received the 1963 Nobel Prize in Physiology or Medicine. Denis Noble adapted the Hodgkin-Huxley framework to cardiac Purkinje fibres in 1960, producing the first quantitative model of the cardiac action potential's long plateau and slow repolarisation. Richard FitzHugh reduced this complexity to two variables in 1961; Jin-Ichi Nagumo built an electronic circuit implementing the same equations in 1962, giving the model its dual name.
Closely related simulations include the Hodgkin-Huxley neuron model (the full four-variable progenitor), the FitzHugh-Nagumo single-neuron oscillator, and reaction-diffusion pattern formation (Turing patterns use a similar mathematical structure). Blood flow and vessel mechanics simulations address the mechanical downstream consequence of electrical excitation. Drug diffusion and pharmacokinetics simulations are relevant because many antiarrhythmic drugs work by blocking specific ion channels and altering action-potential duration or conduction velocity.
Computational cardiac models derived from the FitzHugh-Nagumo and Hodgkin-Huxley tradition are used in implantable cardioverter-defibrillator (ICD) algorithm design, catheter ablation planning for reentrant arrhythmias, and patient-specific cardiac digital-twin platforms that predict arrhythmia risk from MRI data. The diffusion-coupled PDE framework also underpins electrocardiographic imaging (ECGI), which reconstructs the electrical activation sequence of the heart non-invasively from body-surface potentials.
Active research areas include high-fidelity ionic models with 50-plus state variables fitted to human ventricular cell recordings, GPU-accelerated whole-heart simulations on anatomically realistic meshes derived from clinical MRI, machine-learning surrogates that replace expensive PDE solves for real-time clinical decision support, and optogenetics-based interrogation of reentry circuits in which light-activated ion channels let researchers control action-potential timing with millisecond precision in living tissue.