Fisher–KPP Reaction–Diffusion Simulator
Watch a travelling wave front form and spread: an interactive finite-difference solution of ∂u/∂t = D ∂²u/∂x² + r u(1 − u).
How it works — Fisher–KPP Reaction–Diffusion Simulator
Inputs
- D
- Diffusion coefficient D
- r
- Reaction rate r
- Δt
- Time step Δt
- Δx
- Grid spacing Δx
Formula
- ∂u/∂t = D ∂²u/∂x² + r u(1 − u)
- c* = 2√(rD)
- λ = DΔt/Δx² ≤ ½
Results
- u
- Population density u(x, t)
- c
- Measured speed
- λ
- Stability
Population density u(x, t)
The solution diverged (numerical instability). Reduce Δt or increase Δx, then press Reset.
- Time t
- 0.00
- Front position (u = 0.5)
- —
- Measured speed c
- —
- Theory c* = 2√(rD)
- —
- Grid points
- —
- Domain
- 0 ≤ x ≤ 100
About the model
The equation
Fisher–KPP couples diffusion (spreading, coefficient D) with logistic growth (rate r). Starting from a colonised region on the left, the solution settles into a travelling wave of fixed shape whose speed tends to c* = 2√(rD).
Numerical method
uᵢⁿ⁺¹ = uᵢⁿ + λ(uᵢ₊₁ⁿ − 2uᵢⁿ + uᵢ₋₁ⁿ) + Δt·r·uᵢⁿ(1 − uᵢⁿ)
Explicit finite differences (forward Euler in time, central differences in space) with zero-flux boundaries, computed live in your browser.
Why the front starts slower
Fronts of this kind approach c* from below: the measured speed lags by about 3/(2λ*t) with λ* = √(r/D), so it keeps creeping up as the simulation runs. Coarse grids also slow the front slightly.
Assumptions
- One-dimensional, non-dimensional domain with zero-flux (Neumann) boundaries.
- Explicit forward-time, centred-space scheme, stable when DΔt/Δx² ≤ ½.
References
- R. A. Fisher (1937), The wave of advance of advantageous genes, Ann. Eugenics 7
- A. Kolmogorov, I. Petrovsky, N. Piskunov (1937), Bull. Moscow Univ. Math. Mech. 1
- J. D. Murray, Mathematical Biology I, ch. 13