The one-dimensional explicit diffusion scheme is stable when
PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Computational Physics · Research software practice, verification and validation
Scientific Computing for Physicists, Ch A repository others can build on: collaboration, history and workflows
Problem
The one-dimensional explicit diffusion scheme is stable when α=DΔt/Δx2≤21. The main branch runs at D=1cm2s−1, Δx=1cm, Δt=0.1s, giving α=0.1, and passes its known-answer test. Branch A triples the time step to Δt=0.3s (all else unchanged) and reruns the same test: α=0.3≤21, test passes. Branch B halves the grid spacing to Δx=0.5cm (all else unchanged) and reruns the same test: α=1×0.1/0.52=0.4≤21, test passes. The two branches edit different lines (one sets Δt, the other sets Δx), so a reviewer merges them without a textual conflict and writes: "Both branches individually pass the known-answer test at α≤21, so the merge is safe."
((a)) Compute the diffusion number α that the merged code actually runs at, and say whether it is stable.
((b)) Find the error in the reviewer's argument: name the property of α that the argument overlooks.
((c)) State a test, run after every merge, that would have caught this before release.