Compact Difference Schemes Combined with Runge-Kutta Methods for Solving Unsteady Convection-Diffusion
Abstract
The convection-diffusion equation is of primary importance in understanding transport phenomena within a physical system. However, the currently available methods for solving unsteady convection-diffusion problems are generally not able to offer excellent accuracy in both time and space variables. A procedure was given in detail to solve the one-dimensional unsteady convection-diffusion equation through a combination of Runge-Kutta methods and compact difference schemes. The combination method has fourth-order accuracy in both time and space variables. Numerical experiments were conducted and the results were compared with those obtained by the Crank-Nicolson method in order to check the accuracy of the combination method. The analysis results indicated that the combination method is numerically stable at low wave numbers and small CFL numbers. The combination method has higher accuracy than the Crank-Nicolson method.
1. Introduction
The convection-diffusion equation is a combination of the diffusion convection and diffusion equations, and describes physical phenomena where particles, energy, or other physical quantities are transferred inside a physical system due to convection and diffusion processes [1, 2]. This equation is of primary importance in understanding transport phenomena within a physical system [3, 4].
For a transport variable u, the one-dimensional unsteady advection-diffusion equation is usually written as
with the initial condition
and the boundary conditions
in which c is an arbitrary constant indicating the intensity of the convection, the diffusion coefficient α is positive constant, and g0 and g1 are assumed in this study to be smooth functions.
A variety of finite difference schemes have been presented to solve unsteady convection-diffusion problems approximately [5]. These schemes usually have first-order or second-order accurate in space variables, but have fallen short of expectations for convection-dominated flows if the mesh is not sufficiently refined [5]. Discretization with a higher order in space variables is usually associated with large stencils, thereby increasing the band-width of the resulting matrix [5, 6]. A class of compact finite difference approximations have been recently developed to solve convection-diffusion problems [7, 8, 9]. These compact finite difference schemes have fourth-order accuracy in space variables, but fail when accuracy in time variables is most needed [10, 11]. Additionally, most of these schemes have to compute the inverse of the block matrix [10, 11]. It is therefore entirely necessary to develop an effective numerical scheme in order to obtain satisfactory results with a higher order accuracy in time variables and reasonable computational cost.
The primary focus of this study is on developing an effective method to achieve higher accuracy in time variables by a combination of Runge-Kutta methods and high-order compact finite difference discretization schemes. This combination method is then used to solve the one-dimensional unsteady convection-diffusion equation and has fourth-order accuracy in both time and space variables. The Runge-Kutta methods are introduced briefly in Section 2. A fourth-order compact finite difference approximation scheme is presented in Section 3 for the unsteady convection-diffusion equation. A stability analysis is performed on the fully discretized equation in Section 4 to check the stability of the combination method. Some numerical examples are presented in Section 5 and concluding remarks are finally given in Section 6.
2. Runge-Kutta methods
In numerical analysis, Runge-Kutta methods are a family of implicit and explicit iterative methods [12]. When Runge-Kutta methods are used to solve the convection-diffusion equation, time is treated as an independent variable in an ordinary differential equation, for example,
in which Q is an unknown function of time, and R denotes the numerical approximation to the spatial derivatives. The Runge-Kutta method used in this study is given in the following form
in which Δt is the time increment. The increment function is subdivided into N steps on the interval
in which the superscript n, 1, 2, ..., and n + 1 denote the time steps on the time interval , and αij is the weighting factor for the step i and term j.
A four-step algorithm is given by
This algorithm is convenient to program and no intermediate solution needs to be stored [13].
3. A fourth-order compact finite difference scheme
The differential equation considered here takes the form
with the boundary conditions
A compact difference scheme with fourth-order accuracy can be obtained for Equation (14) as follows [14]: the interval 0 ≤ x ≤ 1 is subdivided into n equal subintervals by the grid points , in which . The mesh function u(ih) is written as ui at grid point xi. The second-order central difference schemes for second and first derivatives of u can be written as and , respectively. The following relation can be derived for Equation (14) at point xi:
in which
The fourth and third derivatives of u in the above equation should be approximated in order to obtain a compact difference scheme with fourth-order accuracy.
Equation (14) gives:
From Equation (14) and Equation (18), it follows that
By substituting Equations (18) and (19) for the corresponding terms used in Equation (17), the solution is given by
A fourth-order compact finite difference scheme for Equation (14) can be obtained by substituting Equation (20) in Equation (16). This gives
Here, two difference operators are defined as follows:
Equation (21) can be formulated symbolically as
The above compact finite difference scheme is combined with the Runge-Kutta method described earlier to solve the one-dimensional advection-diffusion equation.
4. Stability analysis
A von Neumann linear stability analysis is performed to check the stability of the combination method. Let to be the value of at xi , in which , bn is the amplitude at time level n, and k is the wave number. The amplification factor is defined as
The amplification factor of Equation (13) discretized by the Runge-Kutta method can be obtained as follows [13]:
The variable Z represents the spatial discretization applied to the convection-diffusion terms. The explicit, discretized form is given by
in which F is the CFL number and is defined as
In Equation (26), Pe is the Péclet number and is defined as
When the Péclet number is high, the convection term dominates [15, 16]. When the Péclet number is low the diffusion term dominates [15, 16].
The amplification factor, as defined above, is rather complex. For stability, the amplification factor has to satisfy the relation . When , the combination method for solving the advection-diffusion equation is numerically unstable. Contours of the absolute value of the amplification factor are plotted in the k-F plane in Figures 1-4, respectively, with various Péclet numbers such as 1, 10, 100, and 1000. The results indicate that the combination method for solving the advection-diffusion equation is numerically stable at low wave numbers and small CFL numbers.
5. Numerical experiments
In numerical analysis, the Crank-Nicolson method is a finite difference method used for numerically solving the heat equation and similar partial differential equations [17, 18]. Some numerical results are presented in examples 5.1-5.3 to compare the present method, denoted by P.M, with the Crank-Nicolson method, denoted by C-N.M. It is assumed that all exact solutions of the convection-diffusion equations given below are known.
Example 5.1. Given a convection-diffusion equation
the exact solution of the above equation is given by
The initial and boundary conditions are defined so that the results are agreed well with the exact solution of the problem. The accuracy of the present method is compared with that of the Crank-Nicolson method. The results are presented in Table 1 for various values of t. Table 1 gives the absolute error along the x direction of the domain, where h is 0.005 and Δt is 0.001.
Example 5.2. Given a convection-diffusion equation
the exact solution is given by
The initial and boundary conditions of the problem are defined so that the results are agreed well with the exact solution of the problem. The accuracy of the present method is compared with that of the Crank-Nicolson method. The results are presented in Table 2 for various values of t. Table 2 gives the absolute error along the x direction of the domain, where h is 0.01 and Δt is 0.5h2.
Example 5.3. Given a convection-diffusion equation
the exact solution is given by
The initial and boundary conditions are defined so that the results are agreed well with the exact solution of the problem. The accuracy of the present method is compared with that of the Crank-Nicolson method. The results are presented in Table 3 for various values of t. Table 3 gives the absolute error along the x direction of the domain, where h is 0.01 and Δt is h2.
The comparison results presented in Table 1, Table 2 and Table 3 indicate that the present method has higher accuracy than the Crank-Nicolson method.
6. Conclusions
The primary focus of this study is on developing an effective method to solve the one-dimensional unsteady convection-diffusion equation by a combination of Runge-Kutta methods and high-order compact finite difference discretization schemes. A high-order compact finite difference scheme is used to approximate the spatial derivatives, and Runge-Kutta methods are used to approximate the time derivative. This combination method has fourth-order accuracy in both time and space variables. The numerical results obtained by the combination method have been found to be in good agreement with the exact solutions. Additionally, the combination method has higher accuracy than the Crank-Nicolson method. The combination method has superiority over most of the other high-order compact finite difference schemes in terms of computational cost, and is highly efficient as there is no need to compute the inverse of the block matrix.
Acknowledgement
This work was supported by the National Natural Science Foundation of China (No. 51506048).
References
- G. Peng, Z. Gao, and X. Feng. An extremum-preserving finite volume scheme for convection-diffusion equation on general meshes. Applied Mathematics and Computation, Volume 380, 2020, Article Number: 125301.[CrossRef]
- L. Wang, X. Yang, H. Wang, Z. Chai, and Z. Wei. A modified regularized lattice Boltzmann model for convection-diffusion equation with a source term. Applied Mathematics Letters, Volume 112, 2021, Article Number: 106766.[CrossRef]
- J.N. Reddy and M. Martinez. A dual mesh finite domain method for steady-state convection-diffusion problems. Computers & Fluids, Volume 214, 2021, Article Number: 104760.[CrossRef]
- Y. Liu, Y. Feng, and R. Zhang. A high order conservative flux optimization finite element method for steady convection-diffusion equations. Journal of Computational Physics, Volume 425, 2021, Article Number: 109895.[CrossRef]
- S. Karaa and J. Zhang. High order ADI method for solving unsteady convection-diffusion problems. Journal of Computational Physics, Volume 198, Issue 1, 2004, Pages 1-9.[CrossRef]
- A. Mohebbi and M. Dehghan. High-order compact solution of the one-dimensional heat and advection-diffusion equations. Applied Mathematical Modelling, Volume 34, Issue 10, 2010, Pages 3071-3084.[CrossRef]
- Y.-M. Wang and X. Wen. A compact exponential difference method for multi-term time-fractional convection-reaction-diffusion problems with non-smooth solutions. Applied Mathematics and Computation, Volume 381, 2020, Article Number: 125316.[CrossRef]
- F. Zhang, X. Gao, and Z. Xie. Difference numerical solutions for time-space fractional advection diffusion equation. Boundary Value Problems, Volume 2019, Issue 1, 2019, Article Number: 14.[CrossRef]
- R. Zhang, Z. Wang, J. Liu, and L. Liu. A compact finite difference method for reaction-diffusion problems using compact integration factor methods in high spatial dimensions. Advances in Difference Equations, Volume 2018, Issue 1, 2018, Article Number: 274.[CrossRef]
- Y. Zhang and Y. Zhang. A new difference scheme with high accuracy and absolute stability for solving convection-diffusion equations. Journal of Computational and Applied Mathematics, Volume 230, Issue 2, 2009, Pages 600-606.[CrossRef]
- M. Dehghan. Weighted finite difference techniques for the one-dimensional advection-diffusion equation. Applied Mathematics and Computation, Volume 147, Issue 2, 2004, Pages 307-319.[CrossRef]
- I. Fried. Numerical Solution of Differential Equations. Academic Press, Inc., London, United Kingdom, 1979, ISBN: 978-0-12-267780-9.[CrossRef]
- S.-T. Yu, K.-C. Hsieh, and Y.-L.P. Tsai. Simulating waves in flows by Runge-Kutta and compact difference schemes. AIAA Journal, Volume 33, Number 3, 1995, Pages 421-429.[CrossRef]
- A.L. Pardhanani, W.F. Spotz, and G.F. Carey. A stable multigrid strategy for convection-diffusion using high order compact discretization. Electronic Transactions on Numerical Analysis, Volume 6, 1997, Pages 211-223.
- T. Han, J.A.C. Humphrey, and B.E. Launder. A comparison of hybrid and quadratic-upstream differencing in high Reynolds number elliptic flows. Computer Methods in Applied Mechanics and Engineering, Volume 29, Issue 1, 1981, Pages 81-95.[CrossRef]
- P.P. Chinchapatnam, K. Djidjeli, and P.B. Nair. Unsymmetric and symmetric meshless schemes for the unsteady convection-diffusion equation. Computer Methods in Applied Mechanics and Engineering, Volume 195, Issues 19-22, 2006, Pages 2432-2453.[CrossRef]
- H. Fu, Y. Sun, H. Wang, and X. Zheng. Stability and convergence of a Crank-Nicolson finite volume method for space fractional diffusion equations. Applied Numerical Mathematics, Volume 139, 2019, Pages 38-51.[CrossRef]
- P. Wang and P. Huang. Convergence of the Crank-Nicolson extrapolation scheme for the Korteweg-de Vries equation. Applied Numerical Mathematics, Volume 143, 2019, Pages 88-96.[CrossRef]
Copyright
© 2025 by authors and Scientific Publications. This is an open access article and the related PDF distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Article Metrics
If you find this article cited by other articles, please click the button to add a citation.