Abstract

This paper introduces a cubic trigonometric B-spline method (CuTBM) based on the Hermite formula for numerically handling the convection-diffusion equation (CDE). The method utilizes a merger of the CuTBM and the Hermite formula for the approximation of a space derivative, while the time derivative is discretized using a finite difference scheme. This combination has greatly enhanced the accuracy of the scheme. A stability analysis of the scheme is also presented to confirm that the errors do not magnify. The main advantage of the scheme is that the approximate solution is obtained as a smooth piecewise continuous function empowering us to approximate a solution at any location in the domain of interest with high accuracy. Numerical tests are performed, and the outcomes are compared with the ones presented previously to show the superiority of the presented scheme.

1. Introduction

The CDE describes physical phenomena in which particles, energy, and other physical quantities are transferred within a physical system due to diffusion and convection. The CDE is given aswhere is the coefficient of viscosity and is the phase velocity, respectively, and both are considered positive. Equation (1) is subject to the following initial condition:and the boundary conditions

Here, , , and are known functions of sufficient smoothness.

In the literature, various numerical techniques have been developed for the one-dimensional CDE with specified initial and boundary conditions such as finite differences, finite elements, spectral methods, method of lines, and many more. Mohebbi and Dehghan [1] presented a high-order compact solution of the one-dimensional heat and advection-diffusion equation. Salkuyeh [2] used finite difference approximation to solve the CDE. Karahan [3, 4] worked on unconditional stable explicit and implicit finite difference techniques for the advection-diffusion equation using spreadsheets. Restrictive Taylor approximation was used by Ismail et al. [5] to solve the CDE. Cao et al. [6] developed a fourth-order compact finite difference scheme for solving the CDE. The generalized trapezoidal formula was used by Chawla and Al-Zanaidi [7] to solve the CDE. Dehghan [8] used weighted finite difference techniques for the one-dimensional advection-diffusion equation. Furthermore, Dehghan [9] developed a technique for the numerical solution of the three-dimensional advection-diffusion equation. A second-order space and time nodal method for the CDE was conducted by Rizwan [10]. Kara and Zhang [11] introduced an ADI method for an unsteady CDE. Feng and Tian [12] presented an alternating group explicit method for the CDE. Mittal and Jain [13] redefined the cubic B-spline collocation method for solving the CDE. Kadalbajoo and Arora [14] presented the Taylor–Galerkin B-spline finite element method for the one-dimensional advection-diffusion equation. Sari et al. [15] used a high-order finite difference scheme for solving the advection-diffusion equation. Tsai et al. [16] used a characteristics method with cubic interpolation for the advection-diffusion equation. Daig et al. [17] presented a least-squares finite element method for the advection-diffusion equation. Chawla et al. [18] presented extended one-step time-integration schemes for the CDE. Ding and Zhang [19] presented a highly accurate difference scheme for CDE. Nazir et al. [20] obtained numerical solutions of the CDE CuTBS approach. Aminikhah and Alvi [21] solved the CDE using cubic B-spline quasi-interpolation. A new Rabotnov fractional-exponential function based fractional derivative for the diffusion equation under external force was presented by Kumar et al. [22]. A modified analytical approach with existence and uniqueness was presented by Kumar et al. [23] for fractional Cauchy reaction-diffusion equations. A numerical study of modeling and analysis of fractal and fractal-fractional differential equations was initiated in [24, 25].

Motivated by the boom of the spline approach in finding the numerical solutions of the partial differential equations, we have utilized a blend of the Hermite formula and the cubic B-spline for the discretization of the space derivative. This merger has significantly augmented the accuracy of the scheme. Another favorable advantage is that approximate solutions come up as a smooth piecewise continuous function permitting one to obtain approximation at any desired location in the domain. The approach used by von Neumann is utilized to confirm that the presented scheme is unconditionally stable. The scheme is applied to various test problems, and the outcomes are contrasted with those reported in [1921].

The remaining portion of the paper is organized in the following sequence. Section 2 presents the proposed scheme that is derived out for the numerical treatment of the CDE. The stability analysis of the scheme is discussed in Section 3. The comparison of the numerical results is provided in Section 4. The outcomes of this study are presented in Section 5.

2. Derivation of the Scheme

For positive integers and , let and be the time and the space step sizes, respectively. The time domain is discretized as . The spatial domain is partitioned as , where . The procedure for finding the approximate solution of (1) involves determination of the approximate solution to the exact solution as follows [26]:where are time-dependent quantities to be determined and are cubic trigonometric basis functions given in [26] as follows:where

By applying the local support property of , it is observed that only , and are survived. Consequently, the approximation at becomes

Now, and its necessary derivatives are approximated by applying the collocation conditions on . The obtained approximations are given bywhere

Consider the Hermite formula at the knot [27] given by

Substituting (8) in (10), we obtainwhere

Note that (11) provides new approximation of the second derivative. Now, applying the -weighted scheme to (1), we obtainwhere . Using the difference scheme in (13), we obtain

For the Crank–Nicolson approach, we choose so that (14) reduces to

Inserting (8) in (15) and replacing with , we obtain

Inserting (8) and (11) in (15), we obtain

Note that equations (16) and (17) together produce an inconsistent system of equations in unknowns. To obtain a consistent system, we need two additional equations which can be obtained using the given boundary conditions. Consequently, a consistent system of dimension is obtained which can be solved using any Gaussian elimination-based numerical algorithm.

2.1. Initial State

The initial condition and the derivatives of initial condition are used to find initial vector as follows:

System (18) produces an matrix system of the following form:where

3. Stability Analysis

The von Neumann stability technique is applied in this section to explore the stability of the given scheme. Consider the growth of error in a single Fourier mode, , where is the mode number, is the step size, and . Inserting the Fourier mode into equation (15) yieldswhere

Dividing equation (21) by and rearranging the equation, we obtain

Using and in equation (23) and simplifying, we obtainwhere

Note that . Without loss of generality, we can assume that so that equation (24) takes the following form:which proves that the present computational scheme is unconditionally stable.

4. Numerical Experiments and Discussion

In this section, some numerical calculations are performed to test the accuracy of the offered scheme. In all examples, we use the following error norms:

Example 1. Consider the CDEwith the initial conditionand the boundary conditionsThe analytic solution of the given problem is . The numerical results are obtained by utilizing the presented scheme. In Table 1, the absolute errors are compared with those obtained in [19] at various time stages. Figure 1 illustrates the comparison between the exact and numerical solutions at various time stages. Figure 2 shows the 2D and 3D error profiles at . A 3D comparison between the exact and numerical solutions is presented to exhibit the exactness of the scheme in Figure 3. The approximate solution when , and is given by

Example 2. Consider the CDEwith the initial conditionand the boundary conditionsThe analytic solution of the given problem is . By utilizing the proposed scheme, the numerical results are acquired. An excellent comparison between absolute errors computed by our scheme and the scheme in [19] is presented in Table 2. A close comparison between the exact and numerical solutions at different time stages is depicted in Figure 4. Figure 5 plots 2D and 3D absolute errors at . Figure 6 deals with the 3D comparison that occurs between the exact and numerical solutions. The approximate solution when , and is given as

Example 3. Consider the CDEwith the initial conditionand the boundary conditionsThe analytic solution of the given problem is . The numerical outcomes are obtained utilizing the proposed scheme. An excellent comparison between absolute errors computed by our scheme and the scheme in [19] is discussed in Table 3. Figure 7 deals with the behavior of exact and approximate solutions at various time stages. Figure 8 plots 2D and 3D absolute errors at . In Figure 9, a tremendous 3D contrast between the exact and numerical solutions is shown. The approximate solution when , and is given as

Example 4. Consider the CDEwith the initial conditionand the boundary conditionsThe analytic solution is . In Table 4, the comparative analysis of absolute errors with those in [20] is provided. Figure 10 illustrates the behavior of numerical solutions at various stages of time. Figure 11 depicts the 2D and 3D graphs of absolute errors. Figure 12 shows the rattling accuracy that exists between the exact and numerical solutions. The approximate solution when , and is given as

Example 5. Consider the CDEwith the initial conditionand the boundary conditionsThe analytic solution is . The numerical outcomes are acquired by using the introduced scheme. The error norms are computed and compared with those obtained in [21] in Tables 5 and 6. Figure 13 shows the behavior of exact and numerical solutions at various stages of time. Figure 14 depicts the 2D and 3D absolute error profiles at . In Figure 15, a 3D contrast between the exact and numerical solutions is presented and all the graphs are in good agreement. The approximate solution when , and is given as

5. Concluding Remarks

In this study, a cubic trigonometric B-spline collocation method based on the Hermite formula is developed for the convection-diffusion equation. The smooth piecewise cubic B-spline has been used to approximate derivatives in space, whereas a standard finite difference has been used to discretize the time derivative. A combination of the Hermite formula and the cubic trigonometric B-splines for approximating the space derivative has considerably augmented the accuracy of the scheme. The solution comes up as a smooth piecewise continuous function so that one can find an approximate solution at any wanted location in the domain of interest. A special attention is devoted to the stability analysis of the scheme to confirm that the errors do not amplify. The numerical results are contrasted with some current numerical techniques. It is inferred that the presented scheme is more precise and provides better accuracy. It is also worthwhile to mention that the offered scheme is applicable to a variety of problems of applied nature in science and engineering.

Data Availability

The experimental data used to support the findings of this study are available within this paper.

Conflicts of Interest

The authors declare that they have no known conflicts of interest or personal relationships that could have appeared to influence the work reported in this paper.

Authors’ Contributions

A. Y. and M. Y. wrote the original draft. M. A. and T. A. were involved in writing the review and editing. Visualization was performed by A. Y., M. Y., and M. A. T. A. was responsible for the resources. M. Y., M. A., and T. A. were involved in the conceptualization and methodology. All authors read and approved the final manuscript.

Acknowledgments

The second author would like to thank Prince Sultan University for funding this work through the research group Nonlinear Analysis Methods in Applied Mathematics (NAMAM), group no. RG-DES-2017-01-17.