spiral_pde


spiral_pde, a Python code which solves a pair of reaction-diffusion partial differential equations (PDE), in two spatial dimensions and time, over a rectangular domain with periodic boundary condition, whose solution is known to evolve into a pair of spirals.

A simple Forward Euler ODE approach is used to solve the differential equations.

The PDE has the form:

        du/dt =         del u + u * ( 1 - u ) * ( u - ( v + beta ) / alpha ) ) / epsilon
        dv/dt = delta * del v + u - v
      

The domain is the square 0 <= x <= 80, 0 <= y <= 80, with zero Neumann boundary conditions.

The initial conditions are

        u = 0       for x < 40
            1       for     40 < x
        v = 0       for y < 40
            alpha/2 for     40 < y
      

The parameters are

        alpha   = 0.25
        beta    = 0.001
        delta   = 0.0
        epsilon = 0.002
      

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

spiral_pde is available in a MATLAB version and an Octave version and a Python version.

Related Data and Programs:

allen_cahn_pde, a Python code which sets up and solves the Allen-Cahn reaction-diffusion system of partial differential equations (PDE) in 1 space dimension and time.

diffusion_pde, a Python code which solves the diffusion partial differential equation (PDE) dudt - mu * d2udx2 = 0 in one spatial dimension, with a constant diffusion coefficient mu, and periodic boundary conditions, using FTCS, the forward time difference, centered space difference method.

gray_scott_pde, a Python code which solves the partial differential equation (PDE) known as the Gray-Scott reaction diffusion equation, displaying a sequence of solutions as time progresses.

wave_pde, a Python code which uses the finite difference method (FDM) in space, and the method of lines in time, to set up and solve the partial differential equations (PDE) known as the wave equations, utt = c uxx, in one spatial dimension and time.

Reference:

Source Code:

Plots were made every 500 steps.


Last revised on 22 September 2024.