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 L_{2} , 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.
Let us consider a population distributed in a linear habitat, such as shore line, which occupies with a uniform quantity of density [
Let p be the frequency of the mutant gene, and q is its parent allelomorph and we suppose, it is only the allelomorph parent [
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.
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 [
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)
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)
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.
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)
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 [
ADI formulation: Peaceman-Rachford algorithm:
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 [
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.
The accuracy and consistency of the schemes is measured in terms of error norms specially L 2 and L ∞ [
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)
Numerical computations have been performed using the uniform grid.
Time = t | x | ||||||
1 | 21 × 21 | 0.0639 | 0.0109 | 0.0099 | 0.0531 | 0.0109 | 0.0097 |
51 × 51 | 0.0313 | 0.0059 | 0.0043 | 0.0213 | 0.0051 | 0.0031 | |
101 × 101 | 0.0112 | 0.0017 | 0.0009 | 0.0115 | 0.0021 | 0.00099 |
Grid | t | ||||||
61 × 61 | 0.2 | 0.0791 | 0.0692 | 0.0543 | 0.0789 | 0.0670 | 0.0512 |
0.4 | 0.0998 | 0.0891 | 0.0753 | 0.0990 | 0.0881 | 0.0615 | |
0.6 | 0.1386 | 0.0993 | 0.0991 | 0.1189 | 0.0987 | 0.0899 |
Time = t | x | ||||||
1 | 21 × 21 | 0.0304 | 0.0211 | 0.0069 | 0.0344 | 0.0209 | 0.0063 |
51 × 51 | 0.0110 | 0.0073 | 0.0037 | 0.0210 | 0.0079 | 0.0033 | |
101 × 101 | 0.0099 | 0.0051 | 0.00099 | 0.0100 | 0.0062 | 0.000891 |
Crank Scheme | ADI Scheme | ||||||
---|---|---|---|---|---|---|---|
Grid | t | ||||||
61 × 61 | 0.2 | 0.0263 | 0.0231 | 0.0181 | 0.0263 | 0.0223 | 0.0171 |
0.4 | 0.0332 | 0.0297 | 0.0251 | 0.0331 | 0.0294 | 0.0205 | |
0.6 | 0.0462 | 0.0331 | 0.0330 | 0.0396 | 0.03167 | 0.0890 |
Grid | Step Size | ||||||
61 × 61 | h | 0.0197 | 0.0117 | 0.00585 | 0.0205 | 0.01897 | 0.00889 |
h/2 | 0.0027 | 0.0021 | 0.000675 | 0.0089 | 0.0051 | 0.000989 | |
h/8 | 0.0012 | 0.00096 | 0.00015 | 0.0021 | 0.00099 | 0.00049 |
scheme at very small step spacing to understand the importance of reducing steps. Rate of convergence can be seen from
CN Scheme | ADI Scheme | ||||||
---|---|---|---|---|---|---|---|
Time t = 1 | Grid | Rate | Rate | Rate | Rate | Rate | Rate |
1 | 41 × 41 | 2.9385 | - | - | - | - | - |
101 × 101 | 2.9187 | 1.6739 | 1.001 | 2.1131 | 1.0843 | 0.0471 | |
201 × 201 | 1.231 | 1.1129 | 1.0009 | 1.0938 | 1.0627 | 0.0710 |
time level [
Hasnain, S., Saqib, M. and Mashat, D.S. (2017) Two-Dimen- sional Nonlinear Reaction Diffusion Equation with Time Efficient Scheme. American Journal of Computational Mathematics, 7, 183-194. https://doi.org/10.4236/ajcm.2017.72017