Finite Difference Implicit Schemes to Coupled Two-Dimension Reaction Diffusion System ()
1. Introduction
Reaction diffusion (RD) equations rise up naturally in systems consisting of many interacting factors, such as chemical reactions and are widely used to identify pattern formation phenomena in diverseness of biological and physical systems [1] . The primary ingredients of all these models are in the form of mathematical balance equation [1] which is in two dimensions
(1)
where
is a vector of concentration variables, R(u) describes a local reaction kinetics and the Laplace operator
acts on the vector u component wise, also b denotes a diagonal diffusion coefficient matrix [1] . Noted that we suppose the system to be isotropic and uniform, so b is represented by a scalar matrix, independent on coordinates of the system [1] . Research in this field starts form the classical papers of [1] [2] [3] , incited by population dynamics issues, where researchers made modified diffusion equation:
(2)
with a nonlinear source term
[2] [3] [4] . A typical solution of the Equation (1), a propagating front, separating two non-equilibrium homogeneous states, one of which
is stable and another one
is unstable, such fronts behavior is often said to be propagation into stable state and also other referred to as waves (or fronts) of transition from an unstable state [3] [4] [5] . The interest in these fronts was stimulated in the early 1980s, such as these fronts can be found in various physical, chemical as well as biological systems [5] [6] .
The reaction diffusion Equation (2) represents a model equation for the evolution of a neutron population in a nuclear reactor and also arises in chemical engineering applications, such equation allows for the effects of linear diffusion by means of
and nonlinear local multiplication or reaction through
[7] [8] .
Researchers have studied these model problems such as the stability of symmetric traveling waves in the Cauchy problem for a more general case than Equation (2); also some researchers explained perturbation method and found an approximate solution by expanding the solution in terms of a power series and in terms of some small parameters [8] .
In this paper, we suggest a reaction diffusion system, which agree to several physical phenomena, the most common is the change in space and time of the concentration of one or more chemical substances. Local chemical reactions in which the metamorphosed into each other, and diffusion which causes the substances to spread out over a surface in space. Reaction diffusion systems are naturally applied in chemistry. However, the system can also describe dynamical processes of non-chemical nature. Mathematically, reaction diffusion systems take the form of semilinear parabolic partial differential equations. The general form of our proposed reaction diffusion system in two dimension, is
(3)
(4)
where b is diffusion coefficient and a is a reactive factor, and
is concentration and
is the velocity of the chemical reaction. The aim of this work is to look into the viability of finite difference schemes for the numerical solution of two-dimension coupled reaction diffusion system. The proposed finite difference schemes show good agreement with analytical solution along efficiency in time. Comparison of two finite difference (FD) schemes is also mentioned with CPU efficiency.
The outlook of the paper is in Section 2 analytical solution, Section 3 smoothness and uniqueness, Section 4 numerical methods, Section 5 numerical results and Section 6 discussion.
2. Analytical Solution
To derive the analytical solution of the given system in (3), (4), we assume the solution of the two dimension coupled reaction diffusion system, in the following form
(5)
(6)
3. Smoothness and Uniqueness of the Reaction Diffusion System
In order to guarantee the smoothness and uniqueness of a positive solution and to obtain upper and lower bounds of the solution, it is necessary to impose some general assumptions on the various physical parameters and the reaction function [9] [10] . Throughout this paper, we always assume that the diffusion coefficient b is positive in domain W also at
the initial values
are non-negative, where the smoothness hypothesis is used only for the existence problem of the corresponding linear system, and the non-negative hypothesis on the data is to obtain non-negative solutions [9] [10] . Let us consider the system,
(7)
motivated by the nonlinear reaction functions given by Equation (7), we make the following basic assumption on functions f and g [9] [10] .
3.1. Assumption or Hypothesis (H)
exists and is bounded subsets of domain W and there exists a function with
, such that
for
[9] [10] . This definition implies that the function f is monotone non-decreasing in v and is uniform bounded for
[9] [10] . Clearly this condition is satisfied by both functions f and g, thus this property leads to
(8)
where above Equation (8) represents
are quasi monotone non-increasing and quasi monotone non-decreasing functions in W respectively [9] [10] . According to classification of the reaction functions,
are typed III functions [9] [10] , which leads to the following definition of the solutions.
3.2. Definition
A smooth pair of two vector functions
,
defined in
are called upper and lower solutions respectively, if they satisfy the following inequalities
(9)
In the above definitions the smoothness of
,
is in the sense that these functions are continuously differentiable to the order appeared in Equations (7) and (8) respectively [9] [10] . Hypothesis and above definition leads to the following theorem.
3.3. Theorem
Let f and g satisfy above hypothesis (H). If there exist upper and lower solutions
,
of system 7, such that
and
in
, then the sequence
,
converges monotonically from above and below, respectively, to a unique solution (u, v) of system (7) [9] [10] . Moreover
(10)
The usefulness of the above theorem is that through suitable construction of upper and lower solutions, not only can the existence problem be ensured, but the stability and the asymptotic behavior of the time dependent solution can also be established from the behavior of the upper and lower solutions [9] [10] . Thus, the definition of stability of a steady state solution is in the usual sense of Lyapunov function [9] [10] . Unlike scalar systems or coupled systems with quasi-monotone increasing function, the upper and lower solutions for the present system are interconnected and to be determined simultaneously from relations in Equation (9). This makes the determination of these functions more delicate, especially in relation to the stability property of non-homogeneous systems [9] [10] . Nevertheless, for the global existence problem or the stability problem with homogeneous boundary conditions the construction of those functions is not very difficult [10] .
4. Numerical Methods
We consider the numerical solution of the nonlinear system in (5), (6) and (7) in a finite domain
, where the first step is to choose integers n and m to define step sizes
and
[11] [12] . Partition the interval [a, b] into n equal parts of width h and the interval [c, d] into m equal parts of width k and place a grid on the rectangle R by drawing vertical and horizontal lines through the points with coordinates
, where
for each
and
for each
also the lines
and
are grid lines, and their intersections are the mesh points of the grid [12] [13] [14] [15] [16] . For each mesh point in the interior of the grid,
, for
and
, also we assume
where t is the time grid step size [16] . We denote the analytical and numerical solutions at the grid point
by
and
respectively.
4.1. Second Order Implicit Scheme
The Crank Nicolson scheme for the system in (3) and (4) can be displayed as follows:
(11)
where
[17] [18] . The scheme in Equation (11) is a nonlinear implicit
scheme with block linear penta diagonal structure [17] [18] . The Newton's iterative method is used to solve this linear system, such scheme is of second order accuracy in both directions, space and time respectively [17] [18] . The scheme is unconditionally stable using the von Neumann stability analysis [18] .
4.2. Computationally Efficient Implicit Scheme
In search of a time efficient alternate, we analyzed the naive version of the Crank Nicolson scheme for the two dimensional equation, and find out that that scheme is not time efficient such that to get time efficiency, the common name of Alternating Direction Implicit (ADI) method can be used [19] [20] . In ADI scheme, the two steps are as follows:
(12)
The trick used in constructing of ADI scheme, is to split time step into two sweeps 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, such that the resulting linear system is block tridiagonal [20] [21] [22] . The scheme in Equation (12) is a nonlinear implicit scheme of second order accuracy in space and time. According to Von Neumann stability analysis, such scheme is also unconditionally stable [22] [23] [24] [25] .
4.3. Algorithm
The nonlinear system of Equation (12), can be written in the form:
(13)
where
,
and
are the nonlinear equations obtained from the system in Equation (12). The system of Equations in (12) is solved by Newton's iterative method using the following steps:
1) Specify
as an initial approximation.
2) For
until convergence achieve.
- Solve the linear system
- Specify
,
where
is
Jacobian matrix, which is computed analytically and
is the correction vector [26] [27] . In the iteration method solution at the previous time step is taken as the initial guess. Iteration at each time step is
stopped when
with Tol is a very small prescribed value. The
linear system obtained from Newton's iterative method, is solved by Gauss elimination method with partial pivoting also convergence done with iterations along less CPU time [28] [29] [30] .
4.4. Norms
The accuracy and consistency of the schemes is measured in terms of error norms specially
and
which are defined as:
(14)
Two more interesting error are listed below,
(15)
5. Numerical Results
Numerical computations have been performed using the uniform grid, for the test problem, the approximated and analytical solutions such as
and
have been given in Table 1, Table 2 at different grids with some fixed parameters such as
,
and
and
using implicit Crank Nicolson scheme. Graphically, Figures 1-2 explain Crank Nicolson scheme with different parameters while Figures 3-4 indicate ADI scheme with error profile in Figures 5-6. Also in Tables 3-8, we analyzed some more feathers using ADI scheme at different grids along the same parameters as we mentioned above. We discussed some interesting feathers regarding computer system using ADI scheme in Table 9, Table 10, along Self time which is the time spent in a function excluding the time spent in its child functions [29] [30] [31] [32] . Self time, includes overhead resulting from the process of profiling, such as Child functions are involved in coding of such problems [29] [30] [31] [32] . Thus later scheme works very fine for half spacing as we improve accuracy, which is lead by Richardon extrapolation method, see from Table 10.
Table 1. Error comparison by crank nicolson scheme at different grid sizes, at t = 1 and time step = k = 0.0001.
Table 2. Rate of convergence comparison by crank nicolson scheme at different grid sizes at t = 1 and time step = k = 0.0001.
Table 3. Solution by ADI scheme at different locations at t = 1, time step = k = 0.0001 and grid size = 25 ´ 25.
Table 4. Error comparison by ADI scheme at different grid sizes, at t = 1 and time step = k = 0.0001.
Table 5. Error comparison by ADI scheme at different time with time steps = k = 0.0001.
Table 6. Error comparison by ADI scheme at different time steps.
Table 7. Rate of Convergence Comparison by ADI scheme at different grid sizes.
Table 8. Error Comparison by ADI scheme at different space step sizes.
Table 9. Interesting feathers of ADI scheme at different grid sizes.
Table 10. Interesting feathers of ADI scheme at different grid sizes.
6. Discussion
In this research article, Crank Nicolson scheme has been successfully applied to find the solutions of two-dimension nonlinear reaction diffusion system. The accuracy and stability of the scheme demonstrated by test problem with data tables and figures. According to T Lakoba [32] , implicit CN scheme is not efficient in term of computational time, as we see, the linear algebraic system from Jacobean matrix which is Penta block diagonal [32] [33] [34] , with two block diagonals adjacent and two are unpaired at the distance of L from main diagonal [33] [34] [35] . During simulation, unpaired block diagonals increase
Figure 1. Shows results using Crank Nicolson scheme with t = 0.1 and Grid = 25 × 25.
Figure 2. Shows results using Crank Nicolson scheme t = 0.3 and Grid = 53 × 53.
computational time and increase memory capacity [34] [35] [36] . Solving such a linear system is not practical due to extremely high time complexity of solving a linear system by the means of Gaussian Elimination method or residual technique [34] [35] [36] . Hence an Alternating Direction Implicit (ADI) scheme can be implemented to solve the numerical PDE whereby one dimension is treated implicitly and other dimension explicitly for half of the assigned time step and vice versa for the remainder half of the time step [35] [36] . The benefit of this strategy
Figure 3. Shows results using ADI scheme with t = 0.1 and Grid = 53 × 53.
Figure 4. Shows results using ADI scheme with
and
with log scaling in xy plane of
and only y log scaling in
.
is that the implicit solver only requires a tridiagonal matrix algorithm to be solved, so that the difference between the true Crank Nicolson solution and ADI approximated solution has an order of accuracy of
and hence can be ignored with a sufficiently small time-step [32] - [37] . The ADI method is a predictor corrector scheme where part of the difference operator is implicit in the initial (prediction) step and another part is implicit in the final (correction) step, whereas in ADI scheme two diagonals are paired with main diagonal and no other diagonals as in Crank Nicolson, thus these schemes reduce the computational time and increase efficiency [32] - [37] . The following diagrams indicate the
Figure 5. Shows results using CN scheme at
and
with log scaling in xy plane for
and
by Crank Nicolson.
Figure 6. Shows results at different grids, for simple error in the concentration of the diffusion reaction system, with step up in grid sizes, make significant change in error but incremental in time, increase error as we see from Figure 6.
Figure 7. Shows simulations with capacity of the system along CPU usage and performance. Also processor calls and threads, by Crank Nicolson. Specification of the system is mentioned in computer applications header.
performance of the CPU for two different schemes. The derivation of our ADI scheme for a nonlinear PDE system relies on a few key observations. Most importantly, using the solution at time levels previous to
, the algorithm converts the nonlinear spatial operator into an implicit but linear operator with variable coefficients. The resulting approximately-factored equation is solved in sweeps along each of the Cartesian directions, including, as is common in ADI approaches, an intermediate
step, so that all of the proposed algorithms are embodied in the two steps formula that every iteration updated the block tridiagonal linear algebraic system [32] - [39] .
Computer Applications
Since last two decades, there is a challenging hasting among vendors and software development communities to bring improvement in performance for
Figure 8. Shows simulations with ADI. CPU usage increase from 9% to 13% with efficiency.
High performance computing system, by halting the traditional development to increase the clock rate, number of cores that are being increased in the system, however, many cores architecture based different powerful devices such GPU (Graphics Processing Unit) and GPGPU (General Purpose Graphics Processing Unit) by NIVIDA, MIC (Many Integrated Core) by Intel and FPGA (Field programmable Gate Array) have been introduced recently that outperform the conventional CPU processing by thousand folds [29] [38] [39] . In order to utilize these powerful devices, new software stacks, algorithms and frameworks have been introduced, ehereas the modern computing system provides massive parallelism through inter node and intra node computation where inter node processing is performed by MPI (Message Passing Interface), most popular programming model and intra node by OpenMP directive programing model [29] [38] [39] .
Keeping in view, the advantages of this emerging technology, we have introduced Crank Nicolson and ADI schemes with the help of this application by using FUJITSU Primergy RX 350 S7 HPC computer having Intel Xeon E5-2667 processor of 2.80 GHz processing power which contained 16 physical cores and 32 logical cores, main memory size of 32 GB and HDD 4 TB inside it [29] [38] [39] , see from Figures 7-9. Moreover, we used 2 Tesla k-80 accelerated NVIDA devices that are capable to deliver not only graphical processing purpose but also for general purpose processing [29] [38] [39] . However, our application structure is designed for MATLAB based on hybrid of tri-hierarchy level tightly coupled programming model containing CUDA (Compute Uniform Device Architecture) for accelerated computation [29] [38] [39] .
Acknowledgements
The authors are gratefully acknowledged Dr. Muhammad Faheem Afzaal, Department of Chemical Engineering, Imperial College London, UK and Muhammad Usman Ashraf, Department of Computer Science, King Abdulaziz University, Saudi Arabia.
Conflict of Interest
The authors do not have any conflict of interest in this research paper.