Skip to content

Application description

The code solves a reaction diffusion equation known as Fischer’s Equation: image

It is used to simulate travelling waves and simple population dynamics

  • The species s diffuses
  • And the population grows to a maximum of s=1

The domain is rectangular, with fixed value of s=0 on each boundary, and a circular region of s=0.1 in the lower left corner initially. image

The rectangular domain is discretized with a grid of dimension nx*ny points. A finite volume discretization and method of lines gives the follow ordinary differential equation for each grid point: image

Which we can express as the following nonlinear problem:
image

One nonlinear equation for each grid point forms a system of N=nx*ny equations solved with Newton's method. Each iteration of Newton's method has to solve a linear system using matrix-free Conjugate Gradient solver. The nonlinear system is solved for each time step.

The nonlinear equation is calculated for all interior and boundary grid points in the following manner: image

image

Running the solution until t=0.01 is usually long enough for something interesting to happen and also clearly show if there is a problem.

image