Toys
Reaction Diffusion
Click the canvas to start/pause the simulation.
This simulation is based on the reaction diffusion model given by the following partial differential equation
In this case, the Gray-Scott model is used. This models the following stoichiometry
To create a numerical scheme we first discretize the domain into an \(N\times N\) uniform grid of size \(h\) and employ a 9-point stencil to approximate the diffusion term. Then the time interval is discretized using a regular time step \(\Delta t\), and given \(u^n, v^n \in \mathbb{R}^{N\times N}\) a simple backwards Euler Finite Difference Method is used to compute the next time step. The scheme is complemented with periodic boundary conditions.
Different values for the parameters \((\gamma_u, \gamma_v, f,k)\) are provided in the second drop-down menu and named based on the patterns they produce. Note that the stability of the numerical scheme is stressed in the case of "Coral" since it often leads to all of chemical \(B\) degrading hence the reaction stops completely.
The color shows the value \(|a - b|\).
The patterns created by this kind of model are called Turing Patterns.
Source code: github
Sources: