AJCMAmerican Journal of Computational Mathematics2161-1203Scientific Research Publishing10.4236/ajcm.2017.72017AJCM-77115ArticlesPhysics&Mathematics Two-Dimensional Nonlinear Reaction Diffusion Equation with Time Efficient Scheme ShahidHasnain1*MuhammadSaqib1DaoudSuleiman Mashat1Department of Mathematics, Numerical Analysis, King Abdulaziz University, Jeddah, KSA* E-mail:shahidqa32@gmail.com(SH);08062017070218319431, January 201720, June 2017 23, June 2017© Copyright 2014 by authors and Scientific Research Publishing Inc. 2014This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/

This research paper represents a numerical approximation to non-linear two - dimensional reaction diffusion equation from population genetics. Since various initial and boundary value problems exist in two - dimensional reaction-diffusion , phenomena are studied numerically by different numerical methods, here we use finite difference schemes to approximate the solution. Accuracy is studied in term of L2 , L and relative error norms by random selected grids along time levels for comparison with exact results. The test example demonstrates the accuracy, efficiency and versatility of the proposed schemes. It is shown that the numerical schemes give better solutions. Moreover, the schemes can be easily applied to a wide class of higher dimension nonlinear reaction diffusion equations with a little modification.

Forward in Time and Centre in Space (FTCS) Taylor’s Series Crank Nicolson Alternating Direction Implicit (ADI) Scheme
1. Introduction

Let us consider a population distributed in a linear habitat, such as shore line, which occupies with a uniform quantity of density  . If at any point of the habitat, a mutation occurs, which happens to be in some degree, however, slight, advantageous to survival, in the totality of its effects   . We may expect the mutant gene to increase at the expense of all allelomorph or allelomorphs previously occupying the same set of points   . This process will be first computed in the neighbourhood of the occurrence of the mutation and later, as the advantageous gene is diffused into the surrounding population, in the adjacent portions of its range  . Supposing that this range to be long compared with the distances separately, the sites of offspring from these of their parents, there will be advancing from origin, a wave of increase in the gene frequency  . Let us consider the following possible postulates of above phenomena.

Let p be the frequency of the mutant gene, and q is its parent allelomorph and we suppose, it is only the allelomorph parent   . Let m be the intensity of the selection in favour of the mutant gene, supposing independence of p . Let us suppose that the rate of diffusion per generation across any boundary may be equated to − k ∂ x p at that boundary, x being the coordinate measuring position in the linear habitat  . Then p must satisfy the differential equation,

p t = k p x x + m p q (1)

where t represents time in generation, where constant k is coefficient of diffusion analogous which is used in physics.

2. Governing Equation

Many complicated natural phenomena, such as the spreading of bushfire and epidemics, and the non-linear evolution of a population in a two dimensional habitat     , (in which the balance of reaction and diffusion are concerned) can be modelled by a two dimensional reaction-diffusion equation

u t = β ( u x x + u y y ) + α f ( u ) u t = ∇ ⋅ ( β ∇ u ) + α f ( u ) } (2)

where u is a dimensionless temperature or population density, u t is the rate of increase of u with time t , ∇ is the gradient operator in two dimensional space, β is a constant second order tensor measuring the diffusivity of the media, and f ( u ) is a non-linear function of u representing the effect of reaction or multiplication. Also μ represents reactive constant after diffusion occurs. Assuming β 1 and β 2 are the principal values of β as in Equation (2) and x and y are coordinates along the principle axes, Equation (2) can be written as

u t = β 1 u x x + β 2 u y y + α u ( 1 − u ) (3)

3. Exact Solution

To derive the exact solution of the given system in Equation (3), we assume the exact solution of the two dimensional non-linear reaction diffusion equation is     ,

u ( x , y , t ) = 20 + 80 ( y − e D t sin ( x π 2 ) sin ( y π 2 ) ) Where D = − β π 2 2 } (4)

4. Numerical Methods

We consider the numerical solution of the non-linear Equation (3) in a finite domain Ω = { ( x , y ) |     a < x < b ,     c < y < d } . The first step is to choose integers n and m to define step sizes h = ( b − a ) / n and k = ( d − c ) / m in x and y di- rections respectively. Partition the interval [a, b] into n equal parts of width h and the interval [c, d] into m equal parts of width k. Place a grid on the rectangle R by drawing vertical and horizontal lines through the points with coordinates ( x i , y j ) , where x i = a + i h for each i = 0 , 1 , 2 , ⋯ n and y j = c + j k for each j = 0 , 1 , 2 , ⋯ m also the lines x = x i and y = y j are grid lines, and their intersections are the mesh points of the grid. For each mesh point in the interior of the grid, ( x i , y j ) , for i = 1 , 2 , ⋯ , n − 1 and j = 1 , 2 , ⋯ , m − 1 , we apply dif- ferent algorithms to approximate the numerical solution to the problem in Equation (3) also we assume t N = N t , N = 0 , 1 , ⋯ , where t is the time.

4.1. Second Order Implicit Scheme

We apply Crank Nicolson implicit finite difference scheme to Equation (3),

δ x 2 u ^ = u ^ l + 1 , m − 2 u ^ l , m + u ^ l − 1 , m h 2 δ y 2 u ^ = u ^ l , m + 1 − 2 u ^ l , m + u ^ l , m − 1 h 2 δ x 2 v ^ = v ^ l + 1 , m − 2 v ^ l , m + v ^ l − 1 , m h 2 δ y 2 v ^ = v ^ l , m + 1 − 2 v ^ l , m + v ^ l , m − 1 h 2 }

u i , j n + 1 = u i , j n + k β 1 2 h x 2 δ x 2 ( u i , j n + 1 + u i , j n ) + k β 2 2 h y 2 δ y 2 ( u i , j n + 1 + u i , j n ) + k μ 2 ( u i , j n + 1 + u i , j n ) ( 1 − 1 2 ( u i , j n + 1 + u i , j n ) ) Where R 1 = k β 1 2 h x 2 , R 2 = k β 2 2 h y 2 and Q 1 = k μ 2 u i , j n + 1 = u i , j n + R 1 δ x 2 ( u i , j n + 1 + u i , j n ) + R 2 δ y 2 ( u i , j n + 1 + u i , j n ) + Q 1 ( u i , j n + 1 + u i , j n ) ( 1 − 1 2 ( u i , j n + 1 + u i , j n ) ) } (5)

4.2. Computationally Efficient Implicit Scheme

In search of a time efficient alternate, we analysed the naive version of the Crank-Nicolson scheme for the two dimensional equation, and find out that scheme is not time efficient      . To get high time efficiency, the common name of Alternating Direction Implicit (ADI) method, can be used. The derivation to ADI scheme, we have following steps;

Introduce an FTCS scheme for the first time step ⋆ = n + 1 2 , of the form

u i , j ⋆ − u i , j n Δ t / 2 − β 1 h x 2 ( u i − 1 , j ⋆ − 2 u i , j ⋆ + u i + 1 , j ⋆ ) − β 2 h y 2 ( u i , j − 1 n − 2 u i , j n + u i , j + 1 n ) = μ f ( u i , j n ) inthecompactform,aboveequationcanbeseenas: u i , j ⋆ − u i , j n Δ t / 2 − S 1 L x x u i , j ⋆ − S 2 L y y u i , j n = μ f ( u i , j n ) aboveequationcanbewrittenasinalgorithm form,for i = 1 , 2 , 3 , ⋯ , n − 1 } − 1 2 R 1 u i − 1, j ⋆ + ( 1 + R 1 ) u i , j ⋆ − 1 2 R 1 u i + 1, j ⋆ = 1 2 R 2 u i , j − 1 n + ( 1 − R 2 ) u i , j n + 1 2 R 2 u i , j + 1 n + μ Δ t 2 f ( u i , j n ) abovealgorithmvalidatesitsresultsfor i = 1 , 2 , 3 , ⋯ , n − 1 } } (6)

Now let us consider the second time step,

u i , j n + 1 − u i , j ⋆ Δ t / 2 − β 1 h x 2 ( u i − 1, j ⋆ − 2 u i , j ⋆ + u i + 1, j ⋆ ) − β 2 h y 2 ( u i , j − 1 n + 1 − 2 u i , j n + 1 + u i , j + 1 n + 1 ) = μ f ( u i , j ⋆ ) inthecompactform,aboveequationcanbeseenas: u i , j n + 1 − u i , j ⋆ Δ t / 2 − S 1 L x x u i , j ⋆ − S 2 L y y u i , j n + 1 = μ f ( u i , j ⋆ ) aboveequationcanbewrittenasin algorithmform,for j = 1 , 2 , 3 , ⋯ , m − 1 } − 1 2 R 2 u i − 1, j n + 1 + ( 1 + R 2 ) u i , j n + 1 − 1 2 R 2 u i + 1, j n + 1 = 1 2 R 1 u i − 1, j ⋆ + ( 1 − R 1 ) u i , j ⋆ + 1 2 R 1 u i + 1, j ⋆ + μ Δ t 2 f ( u i , j ⋆ ) abovealgorithmvalidatesitsresultsfor j = 1 , 2 , 3 , ⋯ , m − 1 } } (7)

The trick used in constructing the ADI scheme is to split time step into two, and apply two different stencils in each half time step, therefore to increment time by one time step in grid point , we first compute both of these stencils are chosen such that the resulting linear system is block tridiagonal     . To obtain the numerical solution, we need to solve a block non-linear tridiagonal system at each time step. We have done this by using Newton’s iterative method.

Algorithm 1:

The non-linear system in Equations (6) and (7), can be written in the form:

R ( W ) = 0 (8)

where R = ( r 1 , r 2 , r 3 , ⋯ , r 2 n ) t ,   W = ( u 1 n + 1 , v 1 n + 1 , u 2 n + 1 , v 2 n + 1 , ⋯ , u m n + 1 , v m n + 1 ) and r 1 , r 2 , r 3 , ⋯ , r 2 n are the non-linear equations obtained from the system (6 and 7). The system of equations, is solved by Newton’s iterative method using the following steps

1) Specify W ( 0 ) as an initial approximation.

2) For k = 0 , 1 , 2 , ⋯ . until convergence achieve.

・ Solve the linear system A ( W ( k ) ) Δ W ( k ) = − R ( W ( k ) ) ,

・ Specify W ( k + 1 ) = W ( k ) + Δ W ( k ) ,

where A ( W ( k ) ) is ( m × m ) Jacobian matrix, which is computed analytically and Δ W ( k ) is the correction vector. In the iteration method solution at the previous time step is taken as the initial guess. Iteration at each time step is stopped when ‖ R ( W ( k ) ) ‖ ∞ ≤ T o l with Tol is a very small prescribed value. The linear system obtained from Newton’s iterative method, is solved by Crout’s method. Convergence done with iterations along less CPU time  .

Algorithm 2:

Clearly, the system is tridiagonal and can be solved with Thomas algorithm. The dimension of J is n × m . In general a tridiagonal system can be written as,

a i x i − 1 + b i x i + c i x i + 1 = S i ,         with     a 1 = c n = 0

above system can be written as in a matrix-vector form,

J u = S

where J is a coefficient matrix (Jacobean Matrix), which is known, comes from Newton’s iterative method. Right hand side is column vector which is known. Our main goal is to find the resultant vector u . Now we have

J = [ b 1 c 1 0 0 0 ⋯ 0 a 2 b 2 c 2 0 0 ⋯ 0 ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ a n − 1 b n − 1 c n − 1 ⋯ ⋯ ⋯ ⋯ a n b n ]

u _ = [ u 1 , u 2 , u 3 , ⋯ , u n ] t

S _ = [ s 1 , s 2 , s 3 , ⋯ , s n ] t

technique is explained in the following steps,

J = L U

where

L = [ μ 1 0 0 0 0 ...0 β 2 μ 2 0 0 0 ...0 α 3 β 3 μ 3 0 0 ...0 ... ... ... ... ... ...0 ... ... α n − 1 β n − 1 μ n − 1 0 ... ... ... α n β n μ n ]

And

U = [ 1 δ 1 λ 1 0 0 ...0 0 1 δ 2 λ 2 0 ...0 0 0 1 δ 3 λ 3 ...0 ... ... ... ... ... ...0 ... ... 0 1 δ n − 2 λ 2 ... ... 0 0 1 δ n − 1 ... ... ... 0 0 1 ]

By equating both sides of the J u = S , we get the elements of the matrices L and U . The computational tricks for the implementation of Thomas algorithm are shown in results, taken from a specific examples.

5. Error Norms

The accuracy and consistency of the schemes is measured in terms of error norms specially L 2 and L ∞     which are defined as:

L ∞ = ‖ u ecact − u Approximation ‖ ∞ = max 1 ≤ i ≤ m   ∑ j = 1 m | u j ecact − u j Approximation | L 2 = ‖ u ecact − u Approximation ‖ 2 = ∑ j = 1 m | u j ecact − u j Approximation | Error relative = ∑ i ∑ j | u i , j ecact − u i , j Approximation | 2 ∑ j | u i , j exact | 2 Rate = log ( Error h / Error h / 2 ) log ( h / ( h / 2 ) ) } (9)

6. Results

Numerical computations have been performed using the uniform grid. Table 1 & Table 2 represent results at different grids and time level using Crank Nicolson implicit scheme. We fixed some parameters such as time step k = 0.0001 , β 1 = β 2 = 1 and β 1 = β 2 = 1 / 4 . Scheme convergence viewed through L 2 , L ∞ , relative error norms     . Table 3 & Table 4 represent results at different grids and time level using ADI implicit scheme, keeping fixed parameters as we did before. In Table 5, we get results using ADI

Estimates of results using Crank Nicolson with some fixed parameters such as k = 0.0001 , t = 1 at different grids and [ a , b ] = [ − 10     10 ] . Error magnifies through L 2 , L ∞ and Error relative
Time = tx
121 × 210.06390.01090.00990.05310.01090.0097
51 × 510.03130.00590.00430.02130.00510.0031
101 × 1010.01120.00170.00090.01150.00210.00099
Estimates of results using Crank Nicolson with some fixed parameters such as k = 0.0001 , grid = 61 × 61 at different time level and [ a , b ] = [ − 10     10 ] . Error magnifies through L 2 , L ∞ and Error relative
Gridt
61 × 610.20.07910.06920.05430.07890.06700.0512
0.40.09980.08910.07530.09900.08810.0615
0.60.13860.09930.09910.11890.09870.0899
Estimates of results using ADI scheme, such as k = 0.0001 , t = 1 at different grids and [ a , b ] = [ − 10     10 ] . Error magnifies through L 2 , L ∞ and Error relative
Time = tx
121 × 210.03040.02110.00690.03440.02090.0063
51 × 510.01100.00730.00370.02100.00790.0033
101 × 1010.00990.00510.000990.01000.00620.000891
Estimates of results using ADI scheme with some fixed parameters such as k = 0.0001 , grid = 61 × 61 at different time level and [ a , b ] = [ − 10     10 ] . Error magnifies through L 2 , L ∞ and Error relative
Gridt
61 × 610.20.02630.02310.01810.02630.02230.0171
0.40.03320.02970.02510.03310.02940.0205
0.60.04620.03310.03300.03960.031670.0890
Estimates of results using ADI and Crank Nicolson schemes, with reducing step size
GridStep Size
61 × 61h0.01970.01170.005850.02050.018970.00889
h/20.00270.00210.0006750.00890.00510.000989
h/80.00120.000960.000150.00210.000990.00049

scheme at very small step spacing to understand the importance of reducing steps. Rate of convergence can be seen from Table 6, which explains two implicit schemes. Figure 1 & Figure 2 show results for CN for different times and grids respectively. Figure 3 & Figure 4 show results for ADI for different times and grids respectively. Figure 5 gives comparison of two implicit schemes for reducing step spacing in x and y directions respectively. Last Figure 6 shows interesting results for different times. Sharp edges remove during increasing

Presents results using ADI and CN schemes, with rate of convergence