Fundamentals / Numerical mathematics / Numerical partial differential equations

When diffusion destabilises a uniform state

Two scalar signals on a ring respond locally to each other and exchange signal with their neighbours. A single well-mixed cell returns to its reference state after a small disturbance. Can coupled cells amplify a spatial pattern? Derive a condition for this surprising outcome and test how faithfully a finite grid represents its wavelength.

Begin with a stable, spatially uniform experiment

Let \(u\) and \(v\) be small dimensionless departures from a reference operating point. They represent signed deviations, so their components can be negative without implying a negative absolute material quantity. Choose local time evolution \(u_t=u+v,\ v_t=-3u-2v\). A positive \(u\) tends to increase itself immediately; the second channel subsequently feeds back on the first. To determine whether a perturbation persists one must examine both channels together. Looking only at the positive diagonal coefficient in the first equation would give a wrong stability conclusion.

Write the state as a column and call the coefficient matrix \(J\). The characteristic polynomial of a two-by-two matrix is \(\mu^2-\mathrm{tr}(J)\mu+\det J\). Here the trace is minus one and the determinant is one. The two roots are \((-1\pm i\sqrt3)/2\). An isolated cell therefore has damped oscillatory motion for every initial perturbation; no normal mode has a positive growth rate. Some observables can still grow transiently in mixtures of modes. The present experiment asks about exponential growth of a mode over time.

Allow spatial exchange by adding \(D_u u_{xx}\) and \(D_v v_{xx}\) on a periodic ring of dimensionless circumference \(L\). Both diffusion coefficients are positive. Without coupling each field's Fourier component would decay at a rate proportional to the square of its wavenumber. The system changes qualitatively when the two diffusion rates differ because the path that restores local stability involves both fields. A spatially varying signal in one channel can be smoothed before it delivers the same feedback as in a spatially uniform experiment.

Reduce the field equation to one matrix per wavelength

Periodicity imposes \(k_m=2\pi m/L\) for integer \(m\). Write a normal mode as \(w\exp(ik_m x+\mu t)\). Differentiating the spatial factor twice gives \(-k_m^2\). Define \(q=k_m^2\). Substitution shows that \(\mu\) must be an eigenvalue of \(J-qD\), where \(D\) is diagonal with entries \(D_u,D_v\). Distinct modes do not interact in this spatially homogeneous linear model. One may analyse each mode separately and superpose the results.

\[\tau(q)=-1-(D_u+D_v)q,\]
\[\delta(q)=1-(D_v-2D_u)q+D_uD_v q^2.\]

The trace \(\tau\) is negative for every \(q\ge0\). Complex conjugate roots therefore have negative real parts. A positive eigenvalue must be real and accompanied by a negative one, so the determinant must be negative. Conversely, negative determinant ensures real eigenvalues of opposite signs. The instability question has become a test of the sign of a quadratic function on nonnegative arguments. Both at zero and at arbitrarily large \(q\) the determinant is positive. If a growing mode exists, it must occupy an intermediate range.

Put \(b=D_v-2D_u\) and \(c=D_uD_v\). The minimum occurs at \(q=b/(2c)\), which is positive only if \(b>0\). Its value is \(1-b^2/(4c)\). Thus the continuous dispersion curve contains an open interval of growing wavenumbers if \(b>0\) and \(b^2>4c\). At equality one neutral wavenumber appears; a neutral mode neither grows nor establishes instability. The physically allowed mode numbers of the finite ring must still place some squared wavenumber inside the interval. A condition derived for a continuum of wavelengths alone can overpredict what fits in a short apparatus.

\[q_\pm=\frac{b\pm\sqrt{b^2-4c}}{2c},\qquad q_-<k_m^2<q_+.\]

Calculate the unstable band before running a simulation

Choose \(D_u=0.02,D_v=1\). Then

\[b=0.96,\ c=0.02.\]

The two roots of the determinant are about 1.065 and 46.93. On a ring of circumference \(2\pi\), \(k_m=m\), so the continuum equation amplifies modes two through six. The uniform mode still decays. Mode one has \(q=1\), just below the lower edge, while mode seven has \(q=49\), just above the upper edge. Both are valuable tests because a moderate numerical error in the dispersion relation could reverse their classification.

The largest real part of the two eigenvalues is \(\operatorname{Re}[\tau+\sqrt{\tau^2-4\delta}]/2\). Choose the square root with nonnegative real part. Where the discriminant is negative the real part of the square root is zero; treating a negative discriminant as an error and dropping those wavenumbers would omit damped oscillatory physics. At \(q=4\), the determinant is \(-2.52\) and the trace is \(-5.08\). The positive rate is approximately 0.4553. During one dimensionless time unit an initially pure growing eigenmode at that wavenumber is multiplied by about 1.58.

Derive what a particular spatial difference sees

Now discretise the ring with \(N\) equally spaced points of spacing \(h=L/N\). The centred second difference of a discrete Fourier mode multiplies it by \((e^{ikh}-2+e^{-ikh})/h^2\). Using the cosine half-angle identity gives a real, nonpositive factor. Compare it with the exact factor \(-k^2\). They agree to leading order at small \(kh\) but separate substantially near the grid scale.

\[q_h(k)=\frac{4}{h^2}\sin^2(kh/2)=k^2-\frac{h^2k^4}{12}+O(h^4k^6).\]

For each sampled mode the finite grid uses \(J-q_hD\). The same algebraic determinant test applies, with a different argument. On the 32-point default grid, mode seven has \(q_h\) about 41.8 rather than 49. Its grid growth rate is positive even though its continuum rate is negative. This discrepancy survives any refinement of the time integrator on that fixed grid. The early growth has a reproducible numerical explanation and can be diagnosed without waiting for a long transient simulation.

Growth-rate curve and finite-grid mode samples, beside spatial profiles of the first field evolved from identical small modal seeds.Open full-size diagram
The points sample the discrete operator. A point above zero whose continuum counterpart is below zero is a spatial-discretisation error even when the time evolution of the grid is calculated exactly.

A meaningful refinement experiment must follow a fixed physical mode as \(N\) increases. Following the highest mode of each grid instead changes its physical wavelength. Similarly, changing circumference while keeping the mode number fixed changes the wavelength and therefore the physical growth rate. The notebook exposes both controls so the two experiments can be distinguished. Large-scale modes can appear converged while the classification at the upper band edge remains sensitive to cell count.

Relate an eigenvalue to a picture of a pattern

Construct a numerical experiment in which the expected time dependence is actually known. For each of several low spatial modes, use the leading eigenvector of the two-channel finite-grid matrix and multiply by a small, controlled initial amplitude. Evolve its coefficient by its complex exponential, then take real parts to obtain real sensor signals. The resulting trace has no time-stepping error. An independently assembled full block matrix, including the periodic connection between the first and last cells, supplies another way to recover the largest growth rate. The optional OneSimulation eigensolver applies to this complete matrix directly.

A visible crest in a total field is not a single Fourier coefficient. It can move or change height through interference even when each included mode is decaying. To measure a rate compare the amplitude of one spatial Fourier component at two times. If the initial field contains both eigenvectors at that same wavenumber, the coefficient may not yet show one pure exponential. Preparing a known eigenvector or observing later, while the state remains within the linear range, makes the inference interpretable.

There is also an upper limit to what this calculation predicts. A linear mode with positive rate grows exponentially without saturation. Once its amplitude is comparable to the scale used to linearise the original response, nonlinear terms could shift the wavelength selection, mix modes or produce a bounded state. The notebook chooses small initial amplitudes and finite observation times precisely to isolate onset. It cannot infer the final pattern simply by extending the linear growth curve indefinitely.

Set a resolution requirement from the measured quantity

Near the upper band edge the question can be posed in terms of a tolerance on \(q\). A finite-grid prediction of a positive rate changes sign precisely when its effective \(q_h\) crosses the edge. If the target mode has \(q\) barely above that edge, estimate whether the leading truncation bias \(h^2q^2/12\) exceeds the distance to it. This supplies an inexpensive grid-design calculation before allocating a time integrator. Because the expansion assumes \(kh\) is small, verify the final decision with the exact sine symbol.

Away from an edge the sign can already be reliable while the predicted doubling time is inaccurate. A positive growth rate corresponds to a doubling time of \(\ln2/\mu\); relative errors are strongly amplified near neutral stability if measured against a very small rate. Record both the sign and an absolute uncertainty on the rate when comparing computations near onset. A single label such as stable or unstable does not communicate that sensitivity.

Tutorial on modes and finite domains

1. Give a short proof that equal positive diffusion coefficients cannot create an instability in this model.

Work through the solution

If \(D_u=D_v=d\), the spatial block is \(J-dqI\). Its eigenvectors remain those of the stable local system, and every eigenvalue shifts left by \(dq\). All real parts are at most minus one half. This argument works for any locally stable constant matrix with identical scalar diffusion in every channel.

2. Keep the two default diffusion coefficients but change the ring circumference to \(\pi\). Which positive continuum mode numbers grow?

Work through the solution

The allowed wavenumbers are \(k_m=2m\). The inequality becomes \(1.065<4m^2<46.93\). It admits \(m=1,2,3\), corresponding to wavenumbers 2, 4 and 6. Comparing mode numbers alone between the two rings would hide this wavelength correspondence.

3. A Fourier amplitude rises from \(2\cdot10^{-4}\) to \(8\cdot10^{-4}\) in four time units. Estimate the growth rate and describe an additional measurement needed before identifying a physical instability.

Work through the solution

A pure mode gives \(\mu=\log(4)/4\simeq0.3466\) per time unit. Confirm that the same physical wavenumber grows on refined grids and that its rate approaches the continuum dispersion calculation. A positive finite-grid rate by itself cannot distinguish a real band from the extra mode admitted by a coarse Laplacian.

Further reading · Duke University, linear stability analysis of two coupled reaction–diffusion equations

Change parameters · When diffusion destabilises a uniform state

Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.