Search⌘ K
AI Features

Coding Example: Reaction-Diffusion

Explore how to implement the Gray-Scott reaction-diffusion system simulating chemical species patterns using NumPy vectorization. This lesson helps you understand modeling differential equations efficiently and supports experimenting with parameters to observe dynamic pattern formation.

Problem Description

Reaction and diffusion of chemical species can produce a variety of patterns, reminiscent of those often seen in nature. The Gray-Scott equations model such a reaction. For more information on this chemical system see the article Complex Patterns in a Simple System (John E. Pearson, Science, Volume 261, 1993).

Let’s consider two chemical species U and V with respective concentrations ...