Check conservation.
Compare the field total at 0, 80, and 240 steps. Distinguish a lower peak from a loss of total field.

XLVII / Experiments
Change a condition, inspect what happens, and keep the result. Six experiments connect an equation with a visible outcome, a numerical record, and questions you can pursue.
Diffusion in a closed field
Two concentrated patches spread across a closed grid. At each step, a cell exchanges part of its value with its four nearest neighbors. Follow the decreasing peaks and increasing spread while checking whether the total survives the update.
Sum of all 1440 cell values.
Numerical roundoff under closed boundaries.
Initial peak: 0.9650.
Variance of cell values, in field units squared.
| State | Field total | Peak value | Spatial variance |
|---|---|---|---|
| Initial | 57.905836 | 0.965036 | 1.5473e-2 |
| After 80 steps | 57.905836 | 0.151785 | 1.2109e-3 |
The JSON includes parameters, model assumptions, sources, and full results. The CSV contains all 1,440 cells, including coordinates and initial and current values.
Method
An explicit finite-difference update adds the discrete Laplacian times a coefficient. At the outer edge, a missing neighbor takes the boundary cell’s own value, giving zero outward flux. Every internal exchange has an equal counterpart in its neighboring cell.
u_next = u + q × (u_left + u_right + u_up + u_down − 4u); 0 ≤ q ≤ 1/4.
Compare the field total at 0, 80, and 240 steps. Distinguish a lower peak from a loss of total field.
Hold the step count at 80 and compare coefficients of 0.05 and 0.20. Inspect both the heatmap and the numerical variance.
Switch to the vertical band. Explain why the center-row profile is enough to show its horizontal spreading.
Gilbert Strang introduces finite-difference approximations for diffusion and the heat equation.
Redistribute a concentrated field while accounting for every cell.
Two concentrated patches occupy a 48 by 30 grid. The color scale is fixed to the initial maximum, so fading represents a lower concentration.
A five-point diffusion update transfers material between adjacent cells. The coefficient is 0.2 and boundary cells reflect flux back into the domain.
After 240 steps the peaks are lower and the field is smoother. The total remains conserved to floating-point precision; no material crosses the boundary.
Method. An explicit finite-difference update adds the discrete Laplacian times a coefficient. At the outer edge, a missing neighbor takes the boundary cell’s own value, giving zero outward flux. Every internal exchange has an equal counterpart in its neighboring cell.
These dossiers explain how this experiment relates to a larger question, including the observation or comparison that the model leaves unresolved.