A numerical algorithm for solving one-dimensional parabolic convection-diffusion equation

A numerical method for solving one-dimensional (1D) parabolic convection–diffusion equation is provided. We consider the finite difference formulas with five points to obtain a numerical method. The proposed method converts the given equation, domain, and time interval into a discrete form. The numerical values of the solution are approximated by solving algebraic equations containing finite differences and values at these discrete points. The consistency, stability and convergence are investigated. On the other hand, some numerical examples illustrate the validity and applicability of the method. Finally, the numerical results are compared with the finite difference scheme’s three points.


Introduction
The convection-diffusion-reaction has three phases [1].In the first phase, convection and materials move from one region to another.In the second phase, diffusion and materials flow from a high-concentration region to a low-concentration region.The last phase is a reaction and in this phase occurs the decay, absorption, and reaction of substances with other components.
One-dimensional parabolic convection-diffusion equation is a partial differential equation that is challenging to model in many scientific areas problems such as biology, physics and engineering [2][3][4][5][6][7][8].Therefore, some researchers have embarked on obtaining the numerical solutions to those problems using different numerical methods: In [4], Gürbüz proposed a Laguerre collocation method to solve the 1D parabolic convection equation.In this scheme, the given equation and conditions transform a matrix-vector equation.Then, using collocation points, the solution of this matrix-vector equation produces the Laguerre coefficients.
In [9], a finite difference method was presented for linear and nonlinear convection-diffusion-reaction models to obtain numerical results by Lima et al.The authors focus on analyzing the convergence, utilizing errors and the accuracy of the method.
In [10], the authors introduced an optimal q-homo topy analysis method to arise the approximate solution of the convection-diffusion equation.This study uses the homotopy perturbation method and optimal q-homotopy analysis.
We consider the 1D parabolic convection-diffusion equation as follows: with the initial conditions and the boundary conditions where 0 ≤ x ≤ l, 0 ≤ t ≤ T and 0 ≤ t ≤ l ≤ T. In this paper, we seek the numerical solutions of Equation ( 1) with the initial or boundary conditions Eqs.( 2)-( 4) by finite difference method.The finite difference method approximates the derivative of a known function.The forward and central difference approximation is basic difference equation with two points.Moreover, we have a finite difference equation with four points [18].Those equations are obtained by using the Taylor series.By using the Taylor series, we have [18] f for a known function f with four points.The finite difference method (FDM) is a suitable solver for ordinary and partial differential equations.It has been applied to many more problems in applied sciences, such as the Poisson equation [19], sixth-order boundary value problems [20], bi-harmonic interface problems [21], blending denoising models [22], fractional boundary value problems [23], quasilinear parabolic partial differential equation [24], some special problems [25].This article is systematized: the basic finite-difference formulation of Equation (1) and the numerical scheme are presented in a discrete form with the uniform mesh points in Section 2. The consistency, stability, and convergence are investigated in Section 3. In Section 4, the presented method is performed in several examples to show the practicality and proficiency of the process.Finally, a conclusion is added in Section 5.

Solution method
This section introduces the basic ideas for the numerical solution of the time-fractional diffusion equation Equation (1) by implicit finite differences and methods.The domain [0, l] × [0, T] is divided into on N × M mesh with h = l M and Δt = T M , respectively x i = ih for i = 1, 2, . . ., N is the i th node.The uniform step size Δt is used; thus, t j = jΔt is the time level for the j th step.The quantity u(x i , t j ) represents the exact solution at (x i , t j ) while u j i represents the numerical solution at (x i , t j ).The finite difference approximation for the derivative can be stated as follows respectively Substituting ( 6), (7), and ( 8) into (1) for (j + 1)th step, we obtain Equation ( 9) requires, at each time step, solving a triangular system of linear equations where the right-hand side utilizes the computed solution's history up to that time.

Convergence analysis for numerical scheme
In this section, we shall give the convergence of the given numerical scheme.For this purpose, the Neumann stability analysis and consistency analysis are investigated.Finally, at the end of this section, the convergence is hold by Lax Equivalence Theorem.

Neumann stability analysis
Let's assume that u j i = u q p .Then, we apply the von Neumann stability analysis to find the stability region.Also, we take that the solution is of the form u q p := G q e iβph .Substitution of the above expression into Equation ( 9) yields After simplifying equation Equation (10), we have From the above equation, we have So for all t 12h 2 > 0, we have |G| ≤ 1.Then the given numerical method for Equation (1) is unconditionally stable for all t 12h 2 > 0.

Consistency analysis
Consistency requires that the original equation can recover from the algebraic equations [20].We expand every term of Equation ( 9) using Taylors series expansion: Substituting Eqs.( 11)-( 15) into implicit scheme Equation ( 9), simplifying and collecting like terms together Dividing Equation ( 16) by Δt and reordering, we get It is noticed that the first four terms in Equation ( 17) are for the recovered partial differential equation, that is parabolic convection diffusion equation, and the other terms are the truncation error since the parabolic convection-diffusion equation has been recovered from the algebraic equation of the implicit scheme developed and so, we conclude that the method is "consistent".

Convergence analysis
We obtain the stability and consistency analysis of the proposed method in this section.In Sections 3.1 and 3.2, we proved the consistency and stability of the proposed method.Moreover, the following theorem assures the convergence of the method.

Theorem 3.1: (Lax Equivalence Theorem)
The finite difference scheme, which is consistent and stable, is equivalent to convergence.

Algorithm
1. Input the time step t and space step (h).

Compute u 0
i for all mesh points by Equation ( 9). 4. Compute the right-hand side of Equation ( 9) for all mesh points.For each fixed i = 0, . . ., N and j = 0, . . ., T compute u j i and u j−1 i by using Equation (9).For each fixed i = 0, . . ., N and j = 0, . . ., T compute f j i .

Examples
In this section, we give some examples to confirm the method.All numerical values are obtained by using codes by Maple.To confirm the versatility and accuracy  of the proposed method, we perform the error sources L 2 and L ∞ , where    where (x, t) ∈ [0, 1] × [0, T].The exact solution to this problem is u(x, t) = e x+t ε .The initial and boundary conditions are calculated using the exact solution.We takeε = 0.2.Our numerical results are tabulated in Tables 1 and 2 for different values h at different time steps.A comparison of the error values between the 3 and 5 points difference scheme of Equation ( 18) is presented in Table 1.Those results are compared in Figures 1-3.Moreover, errors are shown in the counter form in Figure 3.Our numerical results are observed to be better than the classical FDM.Our results are the same surface with the exact solution.

Conclusion
The FDM scheme is the prime, essential, and most applied numerical method to solve ODEs and PDEs.The central difference and forward difference schemes with three points in literature are usually developed.This paper presented an efficient numerical scheme using the finite difference method with five points for solving the 1D parabolic convection-diffusion equation.First, the proposed method reduced the main problem into a discrete equation form.Then, the equation was converted to a triangular system of linear equations to find desired numerical values.Neumann stability analysis for the regular domain and convergence of the method was investigated.We examined several examples to compare the absolute errors and existing method results.Our results and comparisons are tabulated and plotted.Our numerical results are better than three points scheme from Tables 1 and 3.Moreover, our errors are O(h 4 ), while the three-point scheme has O(h 2 ).
In the proposed method, to warrant the required accuracy, the calculations are mainly run by a sufficiently high precision calculation, but the size of the digit number is naturally limited.All computations are performed in Maple software.