Coding Example: Reaction-Diffusion
This lesson covers another case study called "Reaction-Diffusion" based on the Gary Scott model.
We'll cover the following
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 u
and v
and diffusion rates Du
and Dv
.
V
is converted into P
with a rate of conversion k
. f
represents the rate of the process that feeds U
and drains U
, V
and P
. This can be written as:
Chemical reaction | Equations |
---|---|
Based on the Game of Life example, we will try to implement such reaction-diffusion system. Here is a set of interesting parameters to test:
Name | Du | Dv | f | k |
---|---|---|---|---|
Bacteria 1 | 0.16 | 0.08 | 0.035 | 0.065 |
Bacteria 2 | 0.14 | 0.06 | 0.035 | 0.065 |
Coral | 0.16 | 0.08 | 0.060 | 0.062 |
Fingerprint | 0.19 | 0.05 | 0.060 | 0.062 |
Spirals | 0.10 | 0.10 | 0.018 | 0.050 |
Spirals Dense | 0.12 | 0.08 | 0.020 | 0.050 |
Spirals Fast | 0.10 | 0.16 | 0.020 | 0.050 |
Unstable | 0.16 | 0.08 | 0.020 | 0.055 |
Worms 1 | 0.16 | 0.08 | 0.050 | 0.065 |
Worms 2 | 0.16 | 0.08 | 0.054 | 0.063 |
Zebrafish | 0.16 | 0.08 | 0.035 | 0.060 |
Get hands-on with 1400+ tech skills courses.