You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance 1D and 2D PDE modules with detailed explanations on reaction-diffusion systems, boundary conditions, and stability analysis. Update Gierer-Meinhardt and Gray-Scott models to clarify numerical methods and implementation steps.
Copy file name to clipboardExpand all lines: modules/pde-1d/index.qmd
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ subtitle: "Gierer-Meinhardt and Turing Instability"
4
4
format: html
5
5
---
6
6
7
-
This session introduces reaction-diffusion PDEs on a line. We will discretize space with finite differences, advance in time with explicit Euler, and use Turing instability to predict when spatial patterns should appear [@turing1952chemical; @gierer1972theory].
7
+
This session introduces reaction-diffusion PDEs on a line. We will discretize space with vectorized finite differences, advance in time with explicit Euler, and use Turing instability, steady states, Jacobians, and spatial modes to predict when spatial patterns should appear [@turing1952chemical; @gierer1972theory].
8
8
9
9
## From Networks to PDEs
10
10
@@ -28,7 +28,7 @@ First, we start with the **Gierer-Meinhardt model in 1D**. This is the cleanest
Then we ask the theoretical question: **when should patterns appear at all?** That is where Turing instability enters.
31
+
Then we ask the theoretical question: **when should patterns appear at all?** That is where Turing instability enters, through steady states, Jacobians, spatial modes, and the mode matrices that define Turing space.
\partial_t w = D\,\Delta w + R(w), \qquad D = \operatorname{diag}(d_1, d_2),
45
+
$$
46
+
47
+
start from a homogeneous steady state $w_*$ with $R(w_*) = 0$. Write $w = w_* + \eta$ and keep only linear terms:
48
+
49
+
$$
50
+
\partial_t \eta = D\,\Delta \eta + J\eta,
51
+
$$
52
+
53
+
where
42
54
43
55
$$
44
56
J =
@@ -48,11 +60,95 @@ g_u & g_v
48
60
\end{pmatrix}
49
61
$$ {#eq-pde-turing-jacobian}
50
62
51
-
be the Jacobian of the reaction terms at the homogeneous steady state. For the Gierer-Meinhardt model, the fixed point is known analytically, so you can hard-code the partial derivatives.
63
+
is the Jacobian of the reaction terms at the steady state.
64
+
65
+
Now expand the perturbation in Laplacian eigenmodes,
Diffusion makes the trace more negative, so the Turing mechanism is detected through the determinant. The flat state is stable when $\operatorname{tr}(J) < 0$ and $\det(J) > 0$. A Turing instability appears when some nonzero mode makes $\det(A_n) < 0$.
109
+
110
+
## Compute the Gierer-Meinhardt Equilibrium
111
+
112
+
For the Gierer-Meinhardt model,
113
+
114
+
$$
115
+
f(u, v) = a - b u + \frac{u^2}{v}, \qquad g(u, v) = u^2 - v.
116
+
$$
117
+
118
+
The homogeneous steady state solves $f(u_*, v_*) = 0$ and $g(u_*, v_*) = 0$. From $g(u_*, v_*) = 0$ we get $v_* = u_*^2$. Substituting into $f = 0$ gives
A common set of conditions for Turing instability is
170
+
From $\operatorname{tr}(J) < 0$, $\det(J) > 0$, and the requirement that $\det(A_n)$ becomes negative for some nonzero mode, we recover the standard three conditions
75
171
76
172
$$
77
173
\begin{aligned}
@@ -81,6 +177,8 @@ $$
81
177
\end{aligned}
82
178
$$ {#eq-pde-turing-conditions}
83
179
180
+
The last inequality is exactly the statement that the quadratic $\det(A_n)$ dips below zero for some $k_n^2 > 0$.
181
+
84
182
Translate these three inequalities into Python.
85
183
86
184
```python
@@ -138,33 +236,36 @@ plt.show()
138
236
139
237
Mark the point $(a, d) = (0.40, 20)$ on your plot. Is it inside the instability region?
140
238
141
-
## Scan Spatial Modes in 1D
239
+
This is the same Turing-space diagram that appears in the left panel of the interactive Gierer-Meinhardt code, so the algebra and the simulation refer to the same parameter plane.
240
+
241
+
## Compute $F_n$ and the Unstable Mode List in 1D
142
242
143
-
The Turing conditions say that some spatial mode should grow, but they do not tell you which one. For Neumann boundary conditions on $[0, L]$, the admissible wavenumbers are
243
+
The Turing conditions say that some spatial mode should grow, but they do not tell you which one. For Neumann boundary conditions on $[0, L]$, the Laplacian eigenvalues are
144
244
145
245
$$
146
-
k_n = \frac{n\pi}{L}, \qquad n = 0, 1, 2, \dots
246
+
\lambda_n = -\left(\frac{n\pi}{L}\right)^2, \qquad n = 0, 1, 2, \dots
For periodic boundaries, the same loop works after replacing each factor of $\pi / L$ by $2\pi / L$.
356
+
357
+
## Apply the Same Workflow to Gray-Scott
358
+
359
+
The theory on this page does not depend on the specific reaction law. Gray-Scott uses the same equilibrium to Jacobian to mode-matrix pipeline [@gray1984autocatalytic; @pearson1993complex].
The Gray-Scott Jacobian at a homogeneous equilibrium is
382
+
383
+
$$
384
+
J_{\mathrm{GS}} =
385
+
\begin{pmatrix}
386
+
-v_*^2 - f & -2u_*v_*\\
387
+
v_*^2 & 2u_*v_* - (f+k)
388
+
\end{pmatrix}.
389
+
$$ {#eq-pde-turing-gs-jacobian}
390
+
391
+
At the trivial state $(1, 0)$, this Jacobian is diagonal and every linear mode decays. So the classical Turing test is only interesting at a nontrivial homogeneous equilibrium when one exists.
That is the whole bridge from Gierer-Meinhardt to Gray-Scott. Keep the eigenvalue scan, replace the Jacobian, replace the boundary spectrum, then sort the unstable modes and read off the dominant one.
0 commit comments