I did some work with the Brusselator some time ago. This is the reaction-diffusion equations which generate Turing patterns. There are some things you need to know:
(1) The non-linear PDEs have periodic boundary conditions. That means when you solve the system over a grid and you get to the end on the right side, the next point is on the left side. Same for the top and bottom. This is equivalent to solving the system over a torus.
(2) There was at the time some problems solving the system using NDSolve. Perhaps that has been resolved.
(3) The Laplacian in the system is sensitive to step size and is due to what I recall is von Neumann stability. Therefore, the step size is usually taken to be unity.
Below is a simple example not using NDSolve for these reasons and computing the Laplacian manually. And here is a reference for some of the work:
Link to PF about Brusselator
n = 64;
a = 4.5;
b = 7.5;
du = 2;
dv = 16;
dt = 0.01;
totaliter = 10000;
u = a + 0.3 RandomReal[{-0.5, 0.5}, {n, n}];
v = b/a + 0.3 RandomReal[{-0.5, 0.5}, {n, n}];
cf = Compile[{{uIn, _Real, 2}, {vIn, _Real,
2}, {aIn, _Real}, {bIn, _Real}, {duIn, _Real},
{dvIn, _Real},{dtIn, _Real}, {iterationsIn,
_Integer}},
Block[{u = uIn, v = vIn, lap, dt = dtIn, k = bIn +
1,kern = N[{{0, 1, 0}, {1, -4, 1}, {0, 1, 0}}], du =
duIn,
dv = dvIn},
Do[lap =
RotateLeft[u, {1, 0}] + RotateLeft[u, {0, 1}] +
RotateRight[u, {1, 0}] + RotateRight[u, {0, 1}] -
4*u;
u = u + dt (du lap + a - u (k - v u));
lap =
RotateLeft[v, {1, 0}] + RotateLeft[v, {0, 1}] +
RotateRight[v, {1, 0}] + RotateRight[v, {0, 1}] -
4*v;
v = v + dt (dv lap + u (b - v u));
, {iterationsIn}];
{u, v}]];
Timing[c1 = cf[u, v, a, b, du, dv, dt,
totaliter];]
ListDensityPlot[c1[[1]]]
Update: Wanted to update the recommendation below by Halirutan regarding global variables. Doing this reduced the execution time by 1/2. And also wanted to be more thorough and post the classical Turing patterns of stripes (b=7.5) and spots (b=7.0):
cf2 = With[{a = a, b = b},
Compile[{{uIn, _Real, 2}, {vIn, _Real,
2}, {aIn, _Real}, {bIn, _Real}, {duIn, _Real}, {dvIn, _Real}, \
{dtIn, _Real}, {iterationsIn, _Integer}},
Block[{u = uIn, v = vIn, lap, dt = dtIn, k = bIn + 1,
kern = N[{{0, 1, 0}, {1, -4, 1}, {0, 1, 0}}], du = duIn,
dv = dvIn},
Do[lap =
RotateLeft[u, {1, 0}] + RotateLeft[u, {0, 1}] +
RotateRight[u, {1, 0}] + RotateRight[u, {0, 1}] - 4*u;
u = u + dt (du lap + a - u (k - v u));
lap =
RotateLeft[v, {1, 0}] + RotateLeft[v, {0, 1}] +
RotateRight[v, {1, 0}] + RotateRight[v, {0, 1}] - 4*v;
v = v + dt (dv lap + u (b - v u));, {iterationsIn}];
{u, v}]]];