FD1D
Predator Prey Simulation
by Marcus Garvie


FD1D is an executable FORTRAN77 program, using double precision arithmetic, which solves a predator-prey system in a one dimensional region.

The nondimensional problem has the form

        du/dt =         del u + ( 1 - u ) * u        - v * h(u/alpha)

        dv/dt = delta * del v     - gamma * v + beta * v * h(u/alpha)
      
with initial conditions:
        u(x,0) = u0(x)
        v(x,0) = v0(x)
      
and boundary conditions at the left and right endpoints [A,B]:
        du/dx = 0
        dv/dx = 0
      
The Type II functional response employed here is
        h(eta) = eta / ( 1 + eta )
      
The parameters ALPHA, BETA, GAMMA and DELTA are strictly positive.

The user must input a value H specifying the desired space step to be used in discretizing the space dimension.

A finite difference scheme is employed to integrate the problem from time 0 to a maximum time T. The user must input the value T, as well as an appropriate time step DELT.

Typical data for this problem is:

        ALPHA =   0.3
        BETA  =   2.0
        GAMMA =   0.8
        DELTA =   1.0
        A     =   0.0
        B     = 200.0
        H     =   0.5
        T     =  40.0
        DELT  =   0.0104
        GAUSS =   0        (0 = direct solution, 1 = Jacobi )
      
with the initial values of U and V set, for instance, to:
        u0(1:n) = exp ( - ( x(1:n) - 100.0 )**2 ) / 5.0
        v0(1:n) = 2.0 / 5.0
      

Related Data and Programs:

FD1D is also available in a FORTRAN90 version and a MATLAB version.

FD1D_PLOT is a MATLAB program which displays the solution components computed by FD1D.

FD2D is a similar program for the 2D case.

FEM1D, is an executable FORTRAN90 program which applies the finite element method, with piecewise linear basis functions, to a two point boundary value problem;

Reference:

  1. Marcus Garvie,
    Computational Algorithms for Spatially Extended Predator-Prey Systems with the Holling Type II Functional Response,
    (to appear).

Source Code:

Examples and Tests:

You can go up one level to the FORTRAN77 source codes.


Last revised on 10 March 2008.