Reaction-diffusion equations are partial differential equations of the form
\[ \frac{\partial u}{\partial t} = f(u) + D \frac{\partial^2 u}{\partial x^2} \]The solution $u(t,x)$ depends both on time $t$ and space $x$. The term $f(u)$ is the reaction term and the term $D \frac{\partial^2 u}{\partial x^2}$ is the diffusion term. The second derivative is called Laplacian. The Laplacian is written for a one dimensional space. For 2 and 3 dimensions, the Laplacian reads \[ \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} \] and \[ \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} + \frac{\partial^2 u}{\partial z^2}. \] The notation $\Delta$ or $\nabla^2$ are often used to denote the Laplacian (in any dimension): \[ \Delta u = \nabla^2 u = \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} + \frac{\partial^2 u}{\partial z^2}. \]
The following script implement the 1D FitzHugh-Nagumo reaction-diffusion equation. This equation can used to simulate the progression of an action potential along an axon.
As an example, we take the reaction-diffusion equation known as the Fisher-KPP or FKPP equation (Fisher-Kolmogorov-Petrovski-Piskunov) \[ \frac{\partial u}{\partial t} = r u ( 1 - u ) + D \frac{\partial^2 u}{\partial t^2} \]
You can find below several numerical schemes to solve the FKPP equation in one and two dimensional spaces
The explicit finite difference scheme for the FKPP equation is found below
The Crank-Nicolson implicit finite difference scheme for the FKPP equation is found below
As an example, we take the reaction-diffusion equation known as the Fisher-KPP or FKPP equation (Fisher-Kolmogorov-Petrovski-Piskunov) \[ \frac{\partial u}{\partial t} = r u ( 1 - u ) + D \frac{\partial^2 u}{\partial t^2} \]
You can find below two different individual-based modelling approaches for solving the FKPP equation in one dimensional spaces