To cite this code, please use:
This repo contains simple implementations of the FitzHugh-Nagumo model of cellular excitability on a 2D lattice.
The code is available in Python and Julia.
Ref.: FitzHugh, R., Impulses and physiological states in theoretical models of nerve membrane. Biophys J 1:445-466, 1961.
Rendered page: https://frederic-vw.github.io/fitzhugh-nagumo-2d/
Python Requirements:
pip install package-name
)
Julia Requirements:
julia > using Pkg; Pkg.add("Package Name")
)
The FHN model is a two-variable system for the abstract representation of action potential as those found in neurons or cardiac myocytes. The voltage-like variable $v$ and the recovery variable $w$ implement depolarization current ($I$) induced spiking and a post-spike refractory behaviour.
Spatial coupling is introduced via diffusion of the voltage-like variable:
Noise is added via Itô-integration:
The main function call running the simulation is: fhn2d(N, T, t0, a, b, c, I, s, D, dt, stim, blocks)
:
N
: lattice size (N,N)
T
: number of simulation time stepst0
: number of ‘warm-up’ iterationsdt
: integration time steps
: noise intensity (σ)D
: diffusion constanta,b,c
: FHN model parameters, I
: stimulation current amplitudestim
: stimulation current parameters, array of time-, x-, and y-interval bordersblocks
: conduction blocks, array of x- and y-interval bordersOutputs: (T,N,N)
array as NumPy .npy format and as .mp4 movie.
Examples 1, 2 use
stim = [ [[25,50], [1,N], [3,8]], [[130,150], [n_2-2,n_2+2], [10,25]] ]
blocks = [ [[2*n_4,3*n_4], [15,20]], [[2*n_4+10,3*n_4+10], [40,45]] ]
where n_2
is the (rounded) integer N/2
, n_4
is the (rounded) integer N/4
.Stimulation near the left border generates a travelling wave which breaks at and merges after the conduction blocks.
After-depolarization does not change the qualitative behaviour of a travelling wave.
Parameters:
N = 128, T = 1000, t0 = 0, dt = 0.1, s = 0.02, D = 1.0, a = 0.5, b = 0.7, c = 0.3, I = 0.5
Increasing the stimulation current while maintaining all other variables constant generates functional re-entry (spiral waves) originating where the 2nd stimulus hits repolarizing tissue.
Parameters:
N = 128, T = 1000, t0 = 0, dt = 0.1, s = 0.02, D = 1.0, a = 0.5, b = 0.7, c = 0.3, I = 1.0
Without a stimulus current (stim = []
), a large background noise can generate re-entry patterns.
Parameters on the left:
N = 128, T = 1000, t0 = 0, dt = 0.1, sd = 0.10, D = 1.0, a = 0.5, b = 0.7, c = 0.3, I = 0.5
On the right, with reduced diffusion constant D=0.25
, other parameters identical.
The FHN lattice can produce: