Applied Mathematics and Computation 208 (2009) 475–483
Contents lists available at ScienceDirect
Applied Mathematics and Computation journal homepage: www.elsevier.com/locate/amc
A sixth-order compact finite difference scheme to the numerical solutions of Burgers’ equation Murat Sari a,*, Gürhan Gürarslan b a b
Department of Mathematics, Faculty of Science and Art, Pamukkale University, Denizli 20070, Turkey Department of Civil Engineering, Faculty of Engineering, Pamukkale University, Denizli 20070, Turkey
a r t i c l e
i n f o
Keywords: Compact schemes Finite difference method Burgers’ equation Low-storage Runge–Kutta scheme
a b s t r a c t A numerical solution of the one-dimensional Burgers’ equation is obtained using a sixthorder compact finite difference method. To achieve this, a tridiagonal sixth-order compact finite difference scheme in space and a low-storage third-order total variation diminishing Runge–Kutta scheme in time have been combined. The scheme is implemented to solve two test problems with known exact solutions. Comparisons of the computed results with exact solutions showed that the method is capable of achieving high accuracy and efficiency with minimal computational effort. The present results are also seen to be more accurate than some available results given in the literature. Ó 2008 Elsevier Inc. All rights reserved.
1. Introduction Burgers’ equation has attracted much attention in studying evolution equations describing wave propagation, investigating the shallow water waves [1,2] and in examining the chemical reaction–diffusion model of Brusselator [3]. Not only has Burgers’ equation been found to describe various phenomena such as a mathematical model of turbulence [4], it is also a very important fluid dynamical model both for the conceptual understanding of physical flow and testing various new solution approaches. Moreover, simulation of Burgers’ equation is a natural first step towards developing methods for computations of complex flows. The existence and uniqueness of classical solutions to the generalized Burgers equation have been proved with certain conditions [5,6]. In recent years, computing the solution of Burgers’ equation has attracted a lot of attention. As exact solutions in terms of infinite series fail for small values of viscosity [7], v < 0:01, many authors [8–13] have used various numerical techniques based on finite difference, finite element, cubic spline function, pseudo-spectral and boundary elements in attempting to solve the equation. Throughout the last two decades, second-order numerical schemes were considered to be sufficient for most flow problems. In particular, the central and upwind schemes have proved the most popular because of their ease of application in applied fields of science. Although most problems often give quite good results on reasonable meshes, the solution may be of poor quality for convection dominated flows if the mesh is not sufficiently refined. In the meantime, higher order discretization is generally associated with non-compact stencils which increase the bandwidth of the resultant coefficient matrix. Both mesh refinement and increased matrix bandwidth always lead to a large number of arithmetic operations. Thus, neither lower order accurate schemes on a fine mesh nor higher order accurate schemes on a non-compact stencil seem to be computationally cost-effective. This is why compact finite difference methods are important. The higher order accuracy combined with the compactness of the difference stencils gives highly accurate numerical solutions on relatively coarser grids
* Corresponding author. E-mail addresses:
[email protected] (M. Sari),
[email protected] (G. Gürarslan). 0096-3003/$ - see front matter Ó 2008 Elsevier Inc. All rights reserved. doi:10.1016/j.amc.2008.12.012
476
M. Sari, G. Gürarslan / Applied Mathematics and Computation 208 (2009) 475–483
with greater computational efficiency [14]. Various versions of the compact schemes have been analyzed and implemented successfully by some researchers [15–28]. Hassanien et al. [29] proposed a two-level three-point finite difference method of order 2 in time and 4 in space by computing the local truncation error. They solved the problem very successfully with the use of a second-order implicit time integration scheme. To compute the solutions of the problem, the present work attempts to combine a low-storage third-order total variation diminishing Runge–Kutta (TVD-RK3) scheme [30] in time and a sixth-order compact finite difference (CFD6) scheme in space. The combined scheme needs relatively less storage space and is more accurate than the literature [9,11,29,31–34]. Unlike some previous works, there is no need linearization of the nonlinear terms. Here a numerical solution of the one-dimensional Burgers’ equation is obtained using the CFD6 method. To the best of the authors’ knowledge, this combination has not previously been implemented for the Burgers’ equation. Numerical computations show that the present method offers better accuracy in comparison with previous work. Furthermore, the current method here is more general and can therefore be used for solving nonlinear partial differential equations arising in various areas. Behaviour of many physical systems encountered in models of traffic and fluid flow leads to Burgers’ equation. The following one-dimensional Burgers’ equation problem arising in various fields of science is considered,
ut þ uux tuxx ¼ 0;
a < x < b; t > 0;
ð1Þ
with the boundary conditions
uða; tÞ ¼ f1 ðtÞ;
t > 0;
uðb; tÞ ¼ f2 ðtÞ;
t > 0;
ð2Þ
and the initial condition
uðx; 0Þ ¼ gðxÞ;
a < x < b;
ð3Þ
where uðx; tÞ indicates the velocity for space x and time t, t > 0 is the kinematic viscosity parameter, f1 ; f2 and g are known functions of their arguments, a > 0 and b > 0 are real constants. In Eqs. (1)–(3), x and t denote derivatives with respect to space and time, respectively, when they are used as subscripts. This paper proposes a numerical scheme to solve the considered Burgers’ Eq. (1) with a set of boundary and initial conditions given by Eqs. (2) and (3). The current work aims to demonstrate that the scheme is capable of achieving high accuracy for the problem under consideration. The organization of this paper is as follows. The scheme is summarized and applied to Burgers’ equation in Section 2. The accuracy and efficiency of the method is investigated with some numerical illustrations in Section 3. Section 4 consists of some concluding remarks. 2. The CFD6 scheme The compact finite difference schemes can be categorized in two essential groups: explicit compact and implicit compact approaches. Whilst the first category computes the numerical derivatives directly at each grid by using large stencils, the second ones obtain all the numerical derivatives along a grid line using smaller stencils and solving a linear system of equations. Due to the reasons given in the introduction, the present work uses the second approach. In order to obtain the solution of the Burgers’ equation, spatial and time discretization are needed. 2.1. Spatial discretization Spatial derivatives are evaluated by the compact finite difference scheme [35]. For any scalar pointwise value u, the derivatives of u is obtained by solving a tridiagonal matrix system using the Thomas algorithm. Much work has been done in deriving such formulae [35,36]. Below we just summarize those used in this paper, more details can be found in [35,36]. For simplicity, a uniform 1D mesh is considered, consisting of N points: x1 ; x2 ; . . . ; xi1 ; xi ; xiþ1 ; . . . ; xN . The mesh size is denoted by h ¼ xiþ1 xi . The first derivatives can be given at internal nodes as follows [35,36]:
au0i1 þ u0i þ au0iþ1 ¼ b
uiþ2 ui2 uiþ1 ui1 þa ; 4h 2h
ð4Þ
which gives rise to a a-family of fourth-order tridiagonal schemes with
a¼
2 ða þ 2Þ; 3
b¼
1 ð4a 1Þ; 3
where a ¼ 0 leads to the explicit fourth-order scheme for the first derivative. A sixth-order tridiagonal scheme is obtained by a ¼ 1=3
1 0 1 1 uiþ2 ui2 14 uiþ1 ui1 u þ u0i þ u0iþ1 ¼ þ : 3 i1 3 9 9 4h 2h
M. Sari, G. Gürarslan / Applied Mathematics and Computation 208 (2009) 475–483
477
For the nodes near the boundary, approximation formulae for the derivatives of non-periodic problems can be derived from one-sided schemes. More details on the derivations for the first and second-order derivatives can be found in [35,36]. The derived formulae at boundary points 1, 2, N 1 and N, respectively, are:
1 197 5 5 5 1 ui uiþ1 þ 5uiþ2 uiþ3 þ uiþ4 uiþ5 ; h 60 12 3 12 20 2 0 2 0 1 20 35 34 7 2 1 ui1 þ u0i þ uiþ1 ¼ ui1 ui þ uiþ1 uiþ2 þ uiþ3 uiþ4 ; 11 11 h 33 132 33 33 33 132 2 0 2 0 1 20 35 34 7 2 1 ui1 þ u0i þ uiþ1 ¼ uiþ1 þ ui ui1 þ ui2 ui3 þ ui4 ; 11 11 h 33 132 33 33 33 132 1 197 5 5 5 1 ui þ ui1 5ui2 þ ui3 ui4 þ ui5 : 5u0i1 þ u0i ¼ h 60 12 3 12 20
u0i þ 5u0iþ1 ¼
To present the formulae in above, the procedure of Gaitonde and Visbal [36] was followed. The formulae can be written into matrix form
BU 0 ¼ AU; where U ¼ ðu1 ; . . . ; un ÞT . The second-order derivative terms are obtained by applying the first order operator twice, i.e.,
BU 00 ¼ AU 0 : 2.2. Temporal discretization In the current work, the equations are integrated in time with consideration of the low-storage third-order TVD-RK3 scheme [30]. Assume that the governing equation is
@u ¼ Lu; @t where Lu denotes a non-linear spatial operator. The TVD-RK3 integrates from time t0 (step kÞ to t0 þ Dt (step k þ 1Þ through the operations
uð1Þ ¼ uk þ DtLuk ; 3 k 1 ð1Þ 1 u þ u þ DtLuð1Þ ; 4 4 4 1 k 2 ð2Þ 2 ¼ u þ u þ DtLuð2Þ : 3 3 3
uð2Þ ¼ ukþ1
2.3. Applications to the Burgers’ equation For the approximate solution of the boundary value problem (1) with the boundary conditions given by Eq. (2) using the three-point sixth-order compact finite difference method, first the interval ½0; 1 is discretized such that 0 ¼ x1 < x2 < < xN ¼ 1 where N is the number of grid points. Application of the compact finite difference technique to Eq. (1) leads to
@u ¼ ðLuÞi : @t i
ð5Þ
First and second-order spatial derivatives in Eq. (1) are obtained with the use of the CFD6 schemes and then substituted in Eq. (5). Thus, the corresponding semi-discrete equation can be solved with the TVD-RK3 scheme. 3. Numerical illustrations In this work, numerical solutions of the Burgers’ equation are found for two standard problems to validate the current numerical scheme. Since the exact solution is known for these test cases, we can demonstrate the method’s effectiveness and measure its accuracy. The results are also compared to other methods found in the literature. The numerical computations were performed using uniform grids. All computations were carried out using some codes produced in Visual Basic 6.0. All computations were performed using double-length arithmetic. Example 1. The initial condition for this problem is
uðx; 0Þ ¼ gðxÞ ¼ sin px;
0<x