Mathematical Problems in Engineering

Volume 2013 (2013), Article ID 672936, 7 pages

http://dx.doi.org/10.1155/2013/672936

## Numerical Solution of Advection-Diffusion Equation Using a Sixth-Order Compact Finite Difference Method

^{1}Department of Civil Engineering, Faculty of Engineering, Pamukkale University, 20070 Denizli, Turkey^{2}Department of Mathematics, Faculty of Art and Science, Pamukkale University, 20070 Denizli, Turkey

Received 15 February 2013; Accepted 25 March 2013

Academic Editor: Guohe Huang

Copyright © 2013 Gurhan Gurarslan et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

This study aims to produce numerical solutions of one-dimensional advection-diffusion equation using a sixth-order compact difference scheme in space and a fourth-order Runge-Kutta scheme in time. The suggested scheme here has been seen to be very accurate and a relatively flexible solution approach in solving the contaminant transport equation for . For the solution of the present equation, the combined technique has been used instead of conventional solution techniques. The accuracy and validity of the numerical model are verified through the presented results and the literature. The computed results showed that the use of the current method in the simulation is very applicable for the solution of the advection-diffusion equation. The present technique is seen to be a very reliable alternative to existing techniques for these kinds of applications.

#### 1. Introduction

Problems of environmental pollution can always be reduced to the solution of a mathematical model of advection diffusion. The unknown quantity in these cases is the concentration, , a scalar physical quantity, which represents the mass of a pollutant or the salinity or temperature of the water [1]. Advection-diffusion equation (ADE) illustrates many quantities such as mass, heat, energy, velocity, and vorticity [2]. The ADE has been used as a model equation in many engineering problems such as dispersion of tracers in porous media [3], pollutant transport in rivers and streams [4], the dispersion of dissolved material in estuaries and coastal seas [5, 6], contaminant dispersion in shallow lakes [7], long-range transport of pollutants in the atmosphere [8], thermal pollution in river systems [9], and flow in porous media [10]. The advection-diffusion transport equation in one-dimensional case without source terms is as follows: with initial condition and boundary conditions where is time, is space coordinate, is diffusion coefficient, is concentration, is velocity of water flow, and is length of the channel, respectively. Here , , , and are prescribed functions, whilst is the unknown function. Notice that and are considered to be positive constants quantifying the diffusion and advection processes, respectively.

It is known that the use of the standard finite difference and finite element method is not effective and often leads to unreal results. For that reason, several alternative methods are proposed in the literature for solving the ADE with high accuracy [11]. These include method of characteristic with Galerkin method (MOCG) [11], finite difference method [12–14], high-order finite element techniques [15], high-order finite difference methods [16–24], Green-element method [25], cubic B-spline [26], cubic B-spline differential quadrature method (CBSDQM) [27], method of characteristics integrated with splines (MOCS) [28–30], Galerkin method with cubic B-splines (CBSG) [31], Taylor-Collocation (TC) and Taylor-Galerkin (TG) methods [32], B-spline finite element method [33], Least squares finite element method (FEMLSF and FEMQSF) [34], Lattice Boltzmann method [35], Taylor-Galerkin B-spline finite element method [36], and meshless method [37, 38].

Utility of higher-order numerical methods in solving many problems accurately is required. Lately, a noticeable interest in the development and application of CD methods for solving the Navier-Stokes [39–41] and other partial differential equations [42–46] has been renovated. Narrower stencils are required in the CD schemes, and by a comparison to classical difference schemes, they have less truncation error. In the current paper, accurate solutions of the ADE are obtained by using a sixth-order compact difference (CD6) [47], a fourth-order Runge-Kutta (RK4) schemes in space and time, respectively.

#### 2. The Compact Finite Difference Method

CD methods are very popular in the fluid dynamics community because of their high accuracy and advantages associated with stencils [48]. These methods are efficient for higher accuracies without any increase in a stencil, while traditional high-order finite difference methods use larger stencil sizes that make boundary treatment hard. It can also be noted that the CD schemes have been demonstrated to be more precise and computationally economic. Use of smaller stencil sizes in the CD methods is useful when dealing with nonperiodic boundary conditions.

A uniform one-dimensional mesh is considered, consisting of points: with the mesh size . The first-order derivatives of the unknown function can be given at interior nodes as follows [47]: leading to an -family of fourth-order tridiagonal schemes with A sixth-order tridiagonal scheme is obtained by , Approximation formulae for the derivatives of nonperiodic problems can be derived with the consideration of one-sided schemes for the boundary nodes. Interested readers are referred to the work of Lele [47] for details of the derivations for the first- and second-order derivatives.

The third-order formula at boundary point 1 is as follows: The fourth-order formula at boundary points 2 and is as follows: The third-order formula at boundary point is as follows: Use of the above formulae leads to following matrix equation: where . Consideration of the first-order operator twice will give us the second-order derivative terms; that is, The RK4 scheme is considered to obtain the temporal integration in the present study. Utility of the CD6 technique to (1) gives rise to the following differential equation in time: where indicates a spatial linear differential operator. The spatial and temporal terms are approximated by the CD6 and the RK4 schemes, respectively. The semidiscrete equation (12) is solved using the RK4 scheme, through the following operations: To obtain the approximate solution of (1) with the boundary and initial conditions using the CD6-RK4, the domain is first discretized such that where is the number of grid points.

#### 3. Numerical Illustrations

Let us consider the advection-diffusion equation with the initial and boundary conditions. The numerical results are compared with the exact solutions. The differences between the computed solutions and the exact solutions are shown in Tables 1–5. Three examples for which the exact solutions are known are used to test the method described for solving the advection-diffusion equation. The technique is applied to solve the ADE with , , , and prescribed. To test the performance of the proposed method, and error norms are used as follows:

*Example 1. *Here, pure advection equation is considered in an infinitely long channel of constant cross-section and bottom slope, and velocity is taken to be m/s. Concentration is accepted to be the Gaussian distribution of m, and initial peak location is m. The initial distribution is transported downstream in a long channel without change in shape by the time s. Exact solution of this problem is as follows [11]:
At the boundaries the following conditions are used:
Initial conditions can be taken from exact solution. The initial Gaussian pulse at , the concentration distribution obtained using the CD6 solution, and concentration distribution obtained using exact solution at s are compared in Figure 1. Both quantitative and qualitative agreements between the exact and the CD6 solutions are excellent (see Tables 1 and 2, Figure 1).

As seen from Table 1, the CD6 method has given the closest result to the exact peak concentration value. Note that, since an explicit time integration scheme RK4 is used in this study, the CD6 scheme cannot produce any result for . To show the accuracy of the obtained results, and error norms have been calculated using the CD6 scheme and exhibited in Table 2. As seen in the corresponding table, the CD6 solution is better than its rivals.

*Example 2. *Flow velocity and diffusion coefficient are taken to be m/s and m^{2}/s in this experiment. Let the length of the channel be m and be divided into 100 uniform elements. The number is accepted to be 5. The numbers are selected as 0.01, 0.1, and 0.6 for the present work. Exact solution of the current problem is [11]
At the boundaries the following conditions are used:
Initial conditions can be taken from exact solution. Comparison between numerical solutions and the exact solution is given in Table 3. In the calculation of the exact results given by Szymkiewicz [11], there has erroneously been a mistake. Therefore the exact results have been recalculated in MATLAB. As seen in Table 3, the solutions produced by other researchers [11, 28, 31, 32, 34] for do not converge enough. This case proves that the selected time step ( s) is greater than it needs to be. Note also that the CD6 scheme gives stable results for , and the computed results are nearly as good as in FEMQSF [34]. Since this problem cannot be solved accurate enough for s, the calculations have been repeated for the cases s () and s (), and the corresponding results have been given in Table 3. The results produced by the CD6 scheme for s are the same as with the exact solution, while the results of the CD6 scheme for s are seen to be acceptable level. Comparison of the exact solution and the numerical solution obtained with CD6 scheme for m and s is shown in Figure 2. As can be seen in Figure 2, there is an excellent agreement between CD6 and exact solutions.

*Example 3. *Consider the quantities m/s and m^{2}/s in (1). The following exact solution for this example can be found in [49]:
At the boundaries the following conditions are used:
Initial conditions can be taken from exact solution. The distribution of the Gaussian pulse at s is computed using the exact solution and compared with the concentration distribution obtained using the CD6 solution as shown in Figure 3. As can be seen in Table 4, the CD6 results in Example 3 are far more accurate comparison to Crank-Nicolson (CN) scheme [12] and third-order finite difference (FD3) scheme [17]. In Table 5, a comparison of analytical and CD6 solutions is carried out for various values of with , , , and .

#### 4. Conclusions

This paper deals with the advection-diffusion equation using the CD6 scheme in space and the RK4 in time. The combined method worked very well to give very reliable and accurate solutions to these processes. The CD6 scheme provides an efficient and alternative way for modeling the advection-diffusion processes. The performance of the method for the considered problems was tested by computing and error norms. The method gives convergent approximations for the advection-diffusion problems for . Note that numerical solution cannot obtained while and . To overcome these disadvantages, upwind compact schemes and implicit time integration need to be used. For further research, special attention can be paid on the use of compact difference schemes in computational hydraulic problems such as sediment transport in stream and lakes, contaminant transport in groundwater, and flood routing in river and modeling of shallow water waves.

#### References

- C. G. Koutitas,
*Elements of Computational Hydraulics*, Pentech Press, London, UK, 1983. View at MathSciNet - B. J. Noye,
*Numerical Solution of Partial Differential Equations*, Lecture Notes, 1990. View at Zentralblatt MATH - Q. N. Fattah and J. A. Hoopes, “Dispersion in anisotropic homogeneous, porous media,”
*Journal of Hydraulic Engineering*, vol. 111, no. 5, pp. 810–827, 1985. View at Publisher · View at Google Scholar · View at Scopus - P. C. Chatwin and C. M. Allen, “Mathematical models of dispersion in rivers and estuaries,”
*Annual Review of Fluid Mechanics*, vol. 17, pp. 119–149, 1985. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - F. M. Holly and J. M. Usseglio-Polatera, “Dispersion simulation in two-dimensional tidal flow,”
*Journal of Hydraulic Engineering*, vol. 110, no. 7, pp. 905–926, 1984. View at Publisher · View at Google Scholar · View at Scopus - J. R. Salmon, J. A. Liggett, and R. H. Gallagher, “Dispersion analysis in homogeneous lakes,”
*International Journal for Numerical Methods in Engineering*, vol. 15, no. 11, pp. 1627–1642, 1980. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - H. Karahan, “An iterative method for the solution of dispersion equation in shallow water,” in
*Water Pollution VI: Modelling, Measuring and Prediction*, C. A. Brebbia, Ed., pp. 445–453, Wessex Institute of Technology, Southampton, UK, 2001. View at Google Scholar - Z. Zlatev, R. Berkowicz, and L. P. Prahm, “Implementation of a variable stepsize variable formula method in the time-integration part of a code for treatment of long-range transport of air pollutants,”
*Journal of Computational Physics*, vol. 55, no. 2, pp. 278–301, 1984. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - M. H. Chaudhry, D. E. Cass, and J. E. Edinger, “Modeling of unsteady-flow water temperatures,”
*Journal of Hydraulic Engineering*, vol. 109, no. 5, pp. 657–669, 1983. View at Publisher · View at Google Scholar · View at Scopus - N. Kumar, “Unsteady flow against dispersion in finite porous media,”
*Journal of Hydrology*, vol. 63, no. 3-4, pp. 345–358, 1983. View at Publisher · View at Google Scholar · View at Scopus - R. Szymkiewicz, “Solution of the advection-diffusion equation using the spline function and finite elements,”
*Communications in Numerical Methods in Engineering*, vol. 9, no. 3, pp. 197–206, 1993. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - H. Karahan, “Implicit finite difference techniques for the advection-diffusion equation using spreadsheets,”
*Advances in Engineering Software*, vol. 37, no. 9, pp. 601–608, 2006. View at Publisher · View at Google Scholar · View at Scopus - H. Karahan, “Unconditional stable explicit finite difference technique for the advection-diffusion equation using spreadsheets,”
*Advances in Engineering Software*, vol. 38, no. 2, pp. 80–86, 2007. View at Publisher · View at Google Scholar · View at Scopus - H. Karahan, “Solution of weighted finite difference techniques with the advection-diffusion equation using spreadsheets,”
*Computer Applications in Engineering Education*, vol. 16, no. 2, pp. 147–156, 2008. View at Publisher · View at Google Scholar · View at Scopus - H. S. Price, J. C. Cavendish, and R. S. Varga, “Numerical methods of higher-order accuracy for diffusion-convection equations,”
*Society of Petroleum Engineers*, vol. 8, no. 3, pp. 293–303, 1968. View at Google Scholar - K. W. Morton, “Stability of finite difference approximations to a diffusion-convection equation,”
*International Journal for Numerical Methods in Engineering*, vol. 15, no. 5, pp. 677–683, 1980. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - H. Karahan, “A third-order upwind scheme for the advection-diffusion equation using spreadsheets,”
*Advances in Engineering Software*, vol. 38, no. 10, pp. 688–697, 2007. View at Publisher · View at Google Scholar · View at Scopus - Y. Chen and R. A. Falconer, “Advection-diffusion modelling using the modified QUICK scheme,”
*International Journal for Numerical Methods in Fluids*, vol. 15, no. 10, pp. 1171–1196, 1992. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - M. Dehghan, “Weighted finite difference techniques for the one-dimensional advection-diffusion equation,”
*Applied Mathematics and Computation*, vol. 147, no. 2, pp. 307–319, 2004. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - C. Man and C. W. Tsai, “A higher-order predictor-corrector scheme for two-dimensional advection-diffusion equation,”
*International Journal for Numerical Methods in Fluids*, vol. 56, no. 4, pp. 401–418, 2008. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - M. Dehghan and A. Mohebbi, “High-order compact boundary value method for the solution of unsteady convection-diffusion problems,”
*Mathematics and Computers in Simulation*, vol. 79, no. 3, pp. 683–699, 2008. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - G. Gurarslan and H. Karahan, “Numerical solution of advection-diffusion equation using a high-order MacCormack scheme,” in
*Proceedings of the 6th National Hydrology Congress*, Denizli, Turkey, September 2011. View at Publisher · View at Google Scholar - M. Sari, G. Gürarslan, and A. Zeytinoǧlu, “High-order finite difference schemes for solving the advection-diffusion equation,”
*Mathematical and Computational Applications*, vol. 15, no. 3, pp. 449–460, 2010. View at Google Scholar · View at Zentralblatt MATH · View at Scopus - A. Mohebbi and M. Dehghan, “High-order compact solution of the one-dimensional heat and advection-diffusion equations,”
*Applied Mathematical Modelling*, vol. 34, no. 10, pp. 3071–3084, 2010. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - A. E. Taigbenu and O. O. Onyejekwe, “Transient 1D transport equation simulated by a mixed green element formulation,”
*International Journal for Numerical Methods in Fluids*, vol. 25, no. 4, pp. 437–454, 1997. View at Google Scholar · View at Zentralblatt MATH · View at Scopus - R. C. Mittal and R. K. Jain, “Numerical solution of convection-diffusion equation using cubic B-splines collocation methods with Neumann's boundary conditions,”
*International Journal of Applied Mathematics and Computation*, vol. 4, no. 2, pp. 115–127, 2012. View at Google Scholar - A. Korkmaz and I. Dag, “Cubic B-spline differential quadrature methods for the advection-diffusion equation,”
*International Journal of Numerical Methods for Heat & Fluid Flow*, vol. 22, no. 8, pp. 1021–1036, 2012. View at Publisher · View at Google Scholar - F. M. Holly and A. Preissmann, “Accurate calculation of transport in two dimensions,”
*Journal of Hydraulic Division*, vol. 103, no. 11, pp. 1259–1277, 1977. View at Google Scholar · View at Scopus - T. L. Tsai, J. C. Yang, and L. H. Huang, “Characteristics method using cubic-spline interpolation for advection-diffusion equation,”
*Journal of Hydraulic Engineering*, vol. 130, no. 6, pp. 580–585, 2004. View at Publisher · View at Google Scholar · View at Scopus - T. L. Tsai, S. W. Chiang, and J. C. Yang, “Examination of characteristics method with cubic interpolation for advection-diffusion equation,”
*Computers and Fluids*, vol. 35, no. 10, pp. 1217–1227, 2006. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - L. R. T. Gardner and I. Dag, “A numerical solution of the advection-diffusion equation using B-spline finite element,” in
*Proceedings International AMSE Conference, ‘Systems Analysis, Control & Design‘*, pp. 109–116, Lyon, France, July 1994. - I. Daǧ, A. Canivar, and A. Şahin, “Taylor-Galerkin method for advection-diffusion equation,”
*Kybernetes*, vol. 40, no. 5-6, pp. 762–777, 2011. View at Publisher · View at Google Scholar · View at Scopus - S. Dhawan, S. Kapoor, and S. Kumar, “Numerical method for advection diffusion equation using FEM and B-splines,”
*Journal of Computational Science*, vol. 3, pp. 429–437, 2012. View at Publisher · View at Google Scholar - I. Daǧ, D. Irk, and M. Tombul, “Least-squares finite element method for the advection-diffusion equation,”
*Applied Mathematics and Computation*, vol. 173, no. 1, pp. 554–565, 2006. View at Publisher · View at Google Scholar · View at Scopus - B. Servan-Camas and F. T. C. Tsai, “Lattice Boltzmann method with two relaxation times for advection-diffusion equation: third order analysis and stability analysis,”
*Advances in Water Resources*, vol. 31, no. 8, pp. 1113–1126, 2008. View at Publisher · View at Google Scholar · View at Scopus - M. K. Kadalbajoo and P. Arora, “Taylor-Galerkin B-spline finite element method for the one-dimensional advection-diffusion equation,”
*Numerical Methods for Partial Differential Equations*, vol. 26, no. 5, pp. 1206–1223, 2010. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - M. Zerroukat, K. Djidjeli, and A. Charafi, “Explicit and implicit meshless methods for linear advection-diffusion-type partial differential equations,”
*International Journal for Numerical Methods in Engineering*, vol. 48, no. 1, pp. 19–35, 2000. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - J. Li, Y. Chen, and D. Pepper, “Radial basis function method for 1-D and 2-D groundwater contaminant transport modeling,”
*Computational Mechanics*, vol. 32, no. 1-2, pp. 10–15, 2003. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - Y. V. S. S. Sanyasiraju and V. Manjula, “Higher order semi compact scheme to solve transient incompressible Navier-Stokes equations,”
*Computational Mechanics*, vol. 35, no. 6, pp. 441–448, 2005. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - Z. Tian and Y. Ge, “A fourth-order compact finite difference scheme for the steady stream function-vorticity formulation of the Navier-Stokes/Boussinesq equations,”
*International Journal for Numerical Methods in Fluids*, vol. 41, no. 5, pp. 495–518, 2003. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - Z. Tian, X. Liang, and P. Yu, “A higher order compact finite difference algorithm for solving the incompressible Navier-Stokes equations,”
*International Journal for Numerical Methods in Engineering*, vol. 88, no. 6, pp. 511–532, 2011. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - M. Sari and G. Gürarslan, “A sixth-order compact finite difference scheme to the numerical solutions of Burgers' equation,”
*Applied Mathematics and Computation*, vol. 208, no. 2, pp. 475–483, 2009. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - M. Sari, G. Gürarslan, and I. Daǧ, “A compact finite difference method for the solution of the generalized burgers-fisher equation,”
*Numerical Methods for Partial Differential Equations*, vol. 26, no. 1, pp. 125–134, 2010. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - M. Sari and G. Gürarslan, “A sixth-order compact finite difference method for the one-dimensional sine-Gordon equation,”
*International Journal for Numerical Methods in Biomedical Engineering*, vol. 27, no. 7, pp. 1126–1138, 2011. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - G. Gürarslan, “Numerical modelling of linear and nonlinear diffusion equations by compact finite difference method,”
*Applied Mathematics and Computation*, vol. 216, no. 8, pp. 2472–2478, 2010. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - M. Sari, “Solution of the porous media equation by a compact finite difference method,”
*Mathematical Problems in Engineering*, vol. 2009, Article ID 912541, 13 pages, 2009. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - S. K. Lele, “Compact finite difference schemes with spectral-like resolution,”
*Journal of Computational Physics*, vol. 103, no. 1, pp. 16–42, 1992. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - J. C. Kalita and A. K. Dass, “High-order compact simulation of double-diffusive natural convection in a vertical porous annulus,”
*Engineering Applications of Computational Fluid Dynamics*, vol. 5, no. 3, pp. 357–371, 2011. View at Google Scholar - S. Sankaranarayanan, N. J. Shankar, and H. F. Cheong, “Three-dimensional finite difference model for transport of conservative pollutants,”
*Ocean Engineering*, vol. 25, no. 6, pp. 425–442, 1998. View at Publisher · View at Google Scholar · View at Scopus