delay framerate:fps
Use your fingers or mouse to control the model (hold shift key or use mouse wheel to zoom it). Canvas is matched to your browser window.
WebGL2 based 3D Barkley's model on a 128x128x128 grid (see 2D Barkley's model). 3D textures are used for simulations on GPU.

# Barkley's model of an excitable medium

Consider two-variable system of reaction - diffusion equations [1]
∂u/∂t = (1/ε) u(1 - u)(u - uth ) + Δu ,
∂v/∂t = u - v ,     uth = (v - b)/a .

The local dynamics (in the absence of diffusion) is illustrated in Fig.1. u = v = 0 is the stable fixed point. For u > uth the variable u (the red curve) switches quickly to 1. Due to the small parameter ε it is fast in comparison to the recovery variable v (the green curve) which grows exponentially. When uth = (v + b)/a exceeds u the excitation is quenched to 0 and v decays exponentially. In order to take large time steps a semi-implicit integration scheme is used [1,2].

The u values are displayed by the red color and the v values by the green one. Only highly excited points are shown to see vortex structure. Diffusion propagates excitation through the plane and we get nonlinear waves.

[1] Dwight Barkley "A model for fast computer simulation of waves in excitable media" Physica D 49 (1991) 61-70
[2] M.Dowle, R.M.Mantel and D.Barkley "Fast simulations of waves in three-dimensional excitable media" Int. Journal of Bifurcation and Chaos, Vol. 7, No. 11 (1997) 2529-2545

Simulations on GPU     updated 28 Jan 2019