Assignment
PDEs in 2D: Reaction-Diffusion
Complete a 2D reaction-diffusion simulation and report your findings.
Required
- Implement the 2D Gierer-Meinhardt PDE with a 5-point stencil.
- Use \(L_1=20\), \(L_2=50\), \(dx=1\), \(dt=0.001\), \(a=0.40\), \(b=1.00\), \(d=20\), \(\gamma=1\).
- Plot a snapshot of \(v(x,y)\) after a long integration.
- Create an animation that updates \(v(x,y)\) in real time.
Turing Instability
- Implement
find_unstable_spatial_modes()and report the leading mode for \(d=20\) and \(d=30\). - State whether each case exhibits Turing instability.
Gray-Scott (Optional)
- Implement the Gray-Scott model and reproduce one of the parameter sets (A-E).
- Add interaction: draw perturbations and pause/resume the simulation.
Tips for Success
- Start small: use a smaller grid to debug the update function.
- Check dt: if the simulation explodes, reduce \(dt\) or increase \(dx\).
- Validate: compare your pattern to ?@fig-gm-2d in the module notes.
Good luck and enjoy your coding!