We proposed a hybrid compact-CIP scheme to solve the Korteweg-de Vries equation. The algorithm is based on classical constrained interpolation profile (CIP) method, which is coupled with high-order compact scheme for the third derivatives in Korteweg-de Vries equation. Several numerical examples are presented to confirm the high resolution of the proposed scheme.
1. Introduction
The Korteweg-de Vries (KdV) equation, developed by Korteweg and de Vries [1] in 1895 to model weakly nonlinear waves, has been used in many different fields to model various physical phenomena of interest. In recent years, a number of numerical methods are proposed for solving KdV equations. In [2], Zabusky and Kruskal proposed a finite difference method for KdV equations. A local discontinuous Galerkin method was developed for solving KdV type equations containing third derivative terms in one and two space dimensions in [3]. Numerical solutions for general KdV equation with Crank Nicolson method and B-spline FEM were compared with those obtained with Adomian decomposition method (ADM) in [4, 5]. Based on the multisymplectic theory, lots of numerical schemes were proposed for KdV equations [6–8]. Ascher and McLachlan developed a simplified 8-point box scheme [9]. By adding an artificial numerical condition to the periodic boundary, Wang et al. derived some new schemes and proved that they were more efficient than the Preissman scheme in [10]. A completely explicit 6-point multisymplectic scheme is derived in [11]. Recently many other numerical methods have been proposed for solving KdV type equations in [12–18].
In recent years, the less diffusive CIP scheme developed by Takewaki et al. [19] for solving hyperbolic equation has become very popular. However, the original CIP method [19–22] utilizing both the point values and its spatial gradients needs auxiliary boundary conditions for the spatial gradient information. Usually, it has to differentiate the equation with spatial variable to get the values of derivation on the node. For the simple case, where the velocity is constant, the procedure is not difficult, but it is not easy for complex equations. In 1992, Lele [23] developed high-order compact (HOC) difference schemes based on implicit interpolations for first and second derivatives. The implicit schemes are very accurate in smooth regions and have spectral-like resolution properties by using the global grid. High-order compact finite difference schemes coupled with high-order low-pass filter are applied to simulate KdV equations in [24].
In this paper, a new numerical scheme based on classical CIP and HOC schemes is proposed to solve KdV type equations. The new scheme is based on CIP scheme; as a new ingredient, the classical high-order compact scheme [23] is employed to obtain the derivatives rather than differentiate the equation with spatial variable to construct CIP scheme. By comparing with classical compact scheme for solving KdV equations, no filter is used to formulate the present scheme.
The paper is organized as follows. In Section 2, we give a brief description of CIP and high-order compact schemes. The numerical arithmetic of the present scheme is also discussed in the last part of this section. The implementation of our present method for KdV type equations is shown in Section 3, and the capability of the method for nonlinear dispersive equations can be observed from the comparison of numerical solutions with exact solutions. A short discussion for the present method is given in Section 4.
2. Descriptions of Methods
In this paper, we consider the following generalized KdV equation [25]:
(1)ut+a(u)ux+εuxxx=0.
The equation can be split into two parts:
(2)ut+a(u)ux=0,(3)ut=-εuxxx,
where ε are real constants. We only consider the advective phase (2) to review CIP method.
2.1. The CIP Method
The CIP method in [21] uses cubic-polynomial interpolation to get the values of a function on nodes. The time evolution of spatial derivation is also required (4). We differentiate the advective phase of (2) with the spatial variable, and then the equation for derivatives of u can be obtained [26]. Consider
(4)∂g∂t+a(u)∂g∂x=-g∂a(u)∂x,
where g=∂u/∂x stands for the spatial derivatives of u. The computational domain [a,b] can be divided into N cells, and the cells are denoted by Ii=[xi,xi+1]. We only consider a uniform grid and the size of the cell by Δx=(b-a)/N. The cubic polynomial and the first-order derivative at the nth step can be written as
(5)Uin(x)=aiX3+biX2+ciX+di,Ui′n(x)=3aiX2+2biX+ci,
where X=x-xi, and coefficients ai, bi, ci, and di will be obtained with the following constrains:
(6)Uin(xi)=uin,Uin(xiup)=uiupn,Ui′n(xi)=gin,Ui′n(xiup)=giupn,
where iup=i-sgn(a(ui)), the sign sgn(a(ui)) stands for the sign of a(ui). Then, the coefficients of the cubic polynomial are given as follows:
(7)ai=gin+giupnΔxi2+2(uin-uiupn)Δxi3,bi=3(uiupn-uin)Δxi2-2gin+giupnΔxi,ci=gin,di=uin,
where Δxi=xiup-xi. Thus, the values of u and g at the (n+1)th step can be obtained as follows:
(8)uin+1=Uin(xi-a(ui)Δt),gin+1=Ui′n(xi-a(ui)Δt).
We define ξi=-a(ui)Δt, and then the formulas are rewritten as
(9)uin+1=aiξi3+biξi2+ginξi+uin,gin+1=3aiξin+2biξin+gin.
It can be seen that only two points are used in CIP schemes to get uin+1. Then, the advantages of this method can be shown while the computational boundary is complex since less boundary points need to be handled. The CIP method uses only two neighboring stencils but maintains third-order accuracy. In this sense, high order accuracy is obtained though less computational stencils are used. More details for advantages of the CIP schemes can be found in [26].
2.2. High-Order Compact Scheme
A series finite difference scheme to evaluate the spatial derivatives is presented in [23]. The finite difference approximation to the derivative of the function is expressed as a linear combination of the given function values, and then the derivatives of the function are obtained by solving a tridiagonal or pentadiagonal system. Formulas for the first-order and the third-order derivatives are reviewed as below. More results for the approximation to derivatives can be found in [23, 27].
2.2.1. The Derivatives at Interior Nodes
In this paper, we consider the KdV equation on a uniform mesh, the spatial variable at the nodes is xi=i×h for 0≤i≤N and the functions and the derivatives are denoted by ui, ui′. The first-order derivatives for interior nodes are derived by writing approximations of the form [23]. Consider
(10)ui′+α(ui-1′+ui+1′)+β(ui-2′+ui+2′)=cui+3-ui-36h+bui+2-ui-24h+aui+1-ui-12h.
If the schemes are restricted to β≥0 and c=0, a one-parameter α-family of fourth-order tridiagonal scheme is obtained. Consider
(11)β=0,c=0,a=23(α+2),b=13(4α-1).
A simple sixth-order tridiagonal scheme for first-order derivatives is given with α=1/3, β=0, c=0, a=14/9, and b=1/9:
(12)ui′+13(ui-1′+ui+1′)=149ui+1-ui-12h+19ui+2-ui-22h.
For the third derivatives at interior nodes, the following formula is given in [23]:
(13)α(ui-1′′′+ui+1′′′)+ui′′′=bui+3-3ui+1+3ui-1-ui-38h3+aui+2-2ui+1+2ui-1-ui-22h3.
The fourth-order tridiagonal schemes can be obtained with the coefficients a=2 and b=2α-1. The compact tridiagonal scheme is given with α=1/2, a=2, and b=0. And the sixth-order tridiagonal scheme is given with α=7/16, a=2, and b=-1/8.
2.2.2. Nonperiodic Boundaries
For those near boundary nodes, approximation formulas for the first-order derivatives of nonperiodic boundary problems are given by one-side formulation as follows [23]:
(14)u1′+αu2′=1h(au1+bu2+cu3+du4),uN′+αuN-1′=-1h(auN+buN-1+cuN-2+duN-3).
The coefficients for schemes of the third and fourth order are given by
(15)Third order:a=-11+2α6,b=6-α2,c=2α-32,d=2-α6,Fourth order:α=3,a=-176,b=32,c=32,d=-16.
The sixth-order scheme also be given, for those near boundary nodes, six order approximation formulas for the first-order derivatives can be written as follows:
(16)u1′+αu2′=1h(a1u1+a2u2+a3u3+a4u4+a5u5+a6u6),
where
(17)α=5,a1=-19760,a2=-125,a3=5,a4=-53,a5=512,a6=-120.
For the second point, the formula is
(18)αu1′+u2′+αu3′=1h(b1u1+b2u2+b3u3+b4u4+b5u5+b6u6),
where
(19)α=211,b1=-2033,b2=-35132,b3=3433,b4=-733,b5=233,b6=-1132.
The dissymmetry condition is used for the Nth and (N-1)th points.
2.3. The Present Compact-Type CIP Method
In this section, a new compact-type CIP scheme is proposed for (1). For simplicity, the following equation is considered to introduce the method. Consider
(20)ut+αuux-δuxxx=0,
where α and δ are constants. We split the solution of equation into two phases:
(21)∂u∂t+αu∂u∂x=0,(22)∂u∂t=δuxxx.
We consider a 1D mesh, consisting of (N+1) points: x0, x1, x2,…, xN-1, xN; the values of u on these nodes at the nth step are denoted by u0n, u1n…, uN-1n, uNn. At first, (21) is considered and CIP method is applied to the equation. The cubic polynomial at the nth time stage is
(23)Uin(X)=ainX3+binX2+cinX+uin,
where X=xi-x and the coefficient ain, bin, and cin are given by (7), where a(u)=αu and ui′n denote the derivative of uin at the ith node. The predictor-corrector scheme is employed to calculate the value u*.
In the present method, the values ui′n, 0≤i≤N are expressed as a linear combination of the given values uin, 0≤i≤N. On the other hand, the HOC method is employed to evaluate the derivatives ui′n, 0≤i≤N. A simple sixth-order tridiagonal scheme for interior points and boundary points is used in this paper.
Temporal discretization for (22) can be solved by using third-order Runge-Kutta method:
(24)u(1)=un+δtuxxx*,u(2)=34un+14u(1)+14δtuxxx(1),un+1=13un+23u(2)+23δtuxxx(2).
The HOC scheme (13) is used to solve the third derivatives uxxx in (24). The sixth-order tridiagonal scheme with the periodic boundary condition is used in this paper.
The essential ingredients of the computational algorithm for (20) are presented below. Suppose we have got the values uin. The values uin+1 are given as follows.
CIP method is used to obtain u*.
The values of the first derivative on the all nodes are obtained by using the HOC scheme (12).
Predictor-corrector CIP scheme is as follows:
predictor step:
(25)ui**=Uin(xi-αuinΔt)=ainξi3+binξi2+cinξi+uin,
where ξi=-αuinΔt. We also get u*** at the (n+1/2)th time stage by using linear interpolation or QUICK scheme based on the value uin;
corrector step (CIP method):
(26)u^i*=Uin(xi-αui⋄Δt)=ainξi3+binξi2+cinξi+uin,
where u⋄=(1/2)(u**+u***);
the predictor and corrector step are employed again to get u*.
HOC scheme and Runge-Kutta method for (22) are as follows.
The HOC scheme (13) is used to obtain third-order derivatives.
Temporal discretization for (22) can be solved by using third-order Runge-Kutta method.
The predictor-corrector scheme is an important step in the present method. Periodic boundary condition is applied to (22).
3. Numerical Results
In this section, some numerical tests for KdV and general KdV equations are carried out. The discrete L2 and L∞ error norms are defined as follows:
(27)∥en∥L∞=max0≤j≤N|uj-u~j|,∥en∥L2=(∑j=0N|uj-u~j|2Δx)1/2,
where u and u~ are exact and numerical solution, respectively. For KdV equations, there are an infinite number of conservation laws [28]. We will focus our analysis on the following three conservation laws:
(28)I1=∫abu(x,t)dx,I2=∫abu(x,t)2dx,I3=∫ab(u(x,t)2-13u(x,t)3)dx,
where I1, I2, and I3 represent mass, momentum, and energy.
The nonperiodic boundary formulation is applied to (21) (HOC approximation formulas for the third-order derivatives are used) and periodic boundary conditions for third-order derivatives are used in the following examples.
Example 1.
In this example, we consider the following classical KdV equation:
(29)ut+6uux+uxxx=0,-15≤x≤15.
The analytical solution for (29) is
(30)u(x,t)=0.5sech2(0.5(x-t)).
The time-steps are set by the relation Δt=C(Δx)3. The L2 and L∞ errors, orders, invariants, and time costs at time T=0.1 are illustrated in Table 2. It can be observed that the proposed scheme is third-order accurate in the spatial dimension. It is well known that high-order TVD Runge-Kutta methods suffer from small time-step restrictions. In this case, we observe that numerical errors are still not dominated by the spatial discretization with the relation Δt=C(Δx)3.
Table 1 indicates L2 and L∞ errors and invariants with N=100 at time T=0.1,0.2,…,0.9. The present method can also be shown to have the conservative property.
Numerical errors and orders of CIP-HOC method for the KdV equation (29).
N
L∞ error
L∞ order
L2 error
L2 order
I1
I2
I3
Cost(s)
20
5.72E-03
9.94E-03
1.9968246
0.6627258
0.5745942
6.25E-05
40
1.32E-03
2.12
1.89E-03
2.39
1.9996543
0.6663460
0.5774709
2.50E-04
80
2.11E-04
2.65
2.85E-04
2.73
1.9999840
0.6666518
0.5777566
2.50E-03
160
2.77E-05
2.93
3.61E-05
2.98
1.9999984
0.6666662
0.5777761
3.13E-02
320
3.49E-06
2.99
4.54E-06
2.99
1.9999988
0.6666667
0.5777776
6.09E-01
Numerical errors and invariants with N=100 at different times.
Time
L∞ error
L2 error
I1
I2
I3
0.10
1.09E-04
1.47E-04
1.9999939
0.6666616
0.5777688
0.20
1.65E-04
2.47E-04
1.9999888
0.6666565
0.5777615
0.30
1.98E-04
3.14E-04
1.9999830
0.6666515
0.5777556
0.40
2.14E-04
3.61E-04
1.9999775
0.6666464
0.5777505
0.50
2.28E-04
3.94E-04
1.9999760
0.6666413
0.5777461
0.60
2.41E-04
4.18E-04
1.9999660
0.6666363
0.5777421
0.70
2.46E-04
4.37E-04
1.9999590
0.6666312
0.5777383
0.80
2.42E-04
4.52E-04
1.9999651
0.6666262
0.5777347
0.90
2.51E-04
4.63E-04
1.9999605
0.6666211
0.5777312
1.00
2.59E-04
4.73E-04
1.9999441
0.6666161
0.5777277
Example 2.
In this example, we consider the following classical KdV equation:
(31)ut+uux+uxxx=0,0≤x≤40,
with initial condition
(32)u(x,0)=12cosh(x-15)2,0≤x≤40.
The numerical solutions are obtained with dx=0.2 and dt=0.0001; numerical and exact solutions at times t=1,3,5 are presented in Figure 1; the figure shows that the numerical dissipation of soliton is very small.
Numerical and analytical solutions for equation ut+uux+uxxx=0 of Example 2 at various time stages.
Example 3.
The general KdV equation is presented by the following equation [29]:
(33)ut+6upux+uxxx=0.
Consider the initial value problem associated with (33) using the initial condition for p=2:
(34)u(x,0)=csech(cx),-10≤x≤12,
where c=4. The numerical solutions for p=2 are obtained with dx=0.1 and dt=0.05×dx3 for p=2. The progress of the numerical and analytical solutions at times t=1,2 and the absolute error at t=1 are shown in Figure 2. The L∞ and L2 error estimates for the case p=2 are given in Table 3.
For the case p=1 with the initial condition [14]
(35)u(x,0)=c2sech2(c2x-7),0≤x≤40,
and the analytical solution is
(36)u(x,t)=c2sech2(c2(x-ct)-7).
The L∞ and L2 error estimates with dx=0.2 are given in Table 4 for t=1,2,3,4,5, from which it is not difficult to see that the present results are comparable with those present in [14]. The numerical and the analytical solutions at times t=1,3,5 and the absolute error for t=3 are shown in Figure 3.
Error norms at different time stages for equation ut+6u2ux+uxxx=0, with u(x,0)=csech(cx),-10≤x≤12,c=0.5. dx=0.01, and dt=0.05×dx3.
T
L∞
L2
0.1
5.354322207020701E-004
4.972071746712235E-004
0.5
6.080056468253936E-004
7.277368149932270E-004
1.0
2.970167786819244E-003
3.320246422392297E-003
Error norms at different time stages for equation ut+6uux+uxxx=0, with u(x,0)=(c/2)sech2((c/2)x-7),c=0.5. dx=0.2, and dt=0.1×dx3.
T
Present
Dehghan and Shokri [14]
L∞
L2
L∞
L2
1.0
1.9363E-005
2.7752E-005
1.8048E-005
6.2366E-005
2.0
2.8040E-005
4.4840E-005
3.0373E-005
1.1264E-005
3.0
3.5184E-005
6.2377E-005
4.0088E-005
1.5537E-005
4.0
4.2136E-005
8.2619E-005
4.8347E-005
1.9400E-005
5.0
5.3128E-005
1.0617E-004
5.6090E-005
2.2943E-004
Numerical and analytical solutions (line) for equation ut+6u2ux+uxxx=0 of Example 3 at various time stages and the absolute error for t=1.
Numerical and analytical solutions for equation ut+6uux+uxxx=0 with initial condition u(x,0)=(c/2)sech2((c/2)x-7),0≤x≤40,c=0.5 of Example 3 at various time stages and the absolute error for t=3.
Example 4.
In this example, another type of general KdV equation is considered:
(37)ut+unux+εuxxx=0,
with the initial value problem [30]
(38)u(x,0)=(c(n+1)(n+2)2)1/nsech2/n(n2cε(x-x0)),
where c=0.3, ε=0.000484. The single soliton solutions for n=1 are computed in x∈[0,2] with space step dx=0.02 and time step dt=0.25×dx2 and are shown in Figure 4. The numerical and analytical solutions for n=2 with dx=0.01 and dt=0.5×dx2 are shown in Figure 4. The L∞ and L2 error estimates for n=1 at times t=0.5,1,1.5,2 are given in Table 5. We can observe that the present results are slightly more accurate than those present in [14]. Table 6 shows the L∞ and L2 error estimates for the case of n=2.
Error norms at different time stages for equation ut+uux+εuxxx=0, with initial condition (38) for n=1, dx=0.02, and dt=0.25×dx2.
T
Present
Dehghan and Shokri [14]
L∞
L2
L∞
L2
0.5
1.7139E-004
5.4536E-005
7.2329E-004
2.5286E-003
1.0
1.6824E-004
5.3897E-005
1.7957E-004
6.2172E-003
1.5
1.9094E-004
6.9749E-005
3.8906E-003
1.3010E-002
2.0
3.8605E-004
1.3214E-004
6.6701E-003
2.2965E-002
Error norms at different time stages for equation ut+u2ux+εuxxx=0, with initial condition (38) for n=2, dx=0.01, and dt=0.5×dx2.
T
L∞
L2
0.5
3.252960639366087E-004
9.332884478549439E-005
1.0
3.962848426597443E-004
1.333167429458641E-004
1.5
1.160144038488964E-003
3.754080717733928E-004
2.0
2.442770975886521E-003
7.776565570880883E-004
Numerical and analytical solutions for equation ut+u2ux+εuxxx=0 and ut+u2ux+εuxxx=0 of Example 4 at various time stages.
ut+uux+εuxxx=0
ut+u2ux+εuxxx=0
Example 5.
We also consider the equation [3]
(39)ut+uux+εuxxx=0,0≤x≤2.
The double soliton collision case has the initial condition
(40)u(x,0)=3c1sech2(k1(x-x1))+3c2sech2(k2(x-x2)),
where c1=0.3, c2=0.1, x1=0.4,x2=0.8, ki=0.5ci/ε, and ε=4.84×10-4. The solution is computed in x∈[0,2] and is shown in Figure 5. We can observe that nonoscillate numerical solutions can be obtained by using the present method.
The triple soliton collision case has the initial condition
(41)u(x,0)=23sech2(x-1108ε),
with ε=10-4 [3]. The numerical solution is computed in x∈[0,3] and is shown in Figure 6. From the figure we can conclude that the numerical algorithm captures the numerical solutions without oscillations.
Double soliton solutions for equation ut+uux+εuxxx=0 of Example 5 at various time stages.
Triple soliton solutions for equation ut+uux+εuxxx=0 of Example 3 at various time stages.
4. Conclusions
In this paper, we have presented a new scheme based on the traditional CIP and HOC scheme. A conclusion can be drawn from the comparison between the numerical and the exact solutions that the present compact-type CIP method provides highly accurate numerical solutions of KdV type equations. The numerical results also show that the present method works well for some nonlinear problems.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
Acknowledgments
The work was partly supported by the Fundamental Research Funds for the Central Universities (2010QNA39, 2012QNB07) and the Natural Science Foundation of Anhui Province (1408085MA14).
KortewegD. J.de VriesG.XLI. On the change of form of long waves advancing in a rectangular canal, and on a new type of long stationary wavesZabuskyN. J.KruskalM. D.Interaction of “solitons” in a collisionless plasma and the recurrence of initial statesYanJ.ShuC.-W.A local discontinuous Galerkin method for KdV type equationsHelalM. A.MehannaM. S.A comparison between two different methods for solving KdV-Burgers equationGeyikliT.KayaD.Comparison of the solutions obtained by B-spline FEM and ADM of KdV equationLvZ.-Q.XueM.WangY.-S.A new multi-symplectic scheme for the KdV equationWangH.-P.WangY.-S.HuY.-Y.An explicit scheme for the KdV equationZhaoP. F.QinM. Z.Multisymplectic geometry and multisymplectic preissmann scheme for the KdV equationAscherU. M.McLachlanR. I.Multisymplectic box schemes and the Korteweg-de Vries equationWangY.WangB.QinM.Numerical implementation of the multisymplectic Preissman scheme and its equivalent schemesWangY.WangB.ChenX.Multisymplectic Euler box scheme for the KdV equationAksanE. N.ÖzdeşA.Numerical solution of Korteweg-de Vries equation by Galerkin B-spline finite element methodDağI.DereliY.Numerical solutions of KdV equation using radial basis functionsDehghanM.ShokriA.A numerical method for KdV equation using collocation and radial basis functionsHaoS.-Y.XieS.-S.YiS.-C.The Galerkin method for the KdV equation using a new basis of smooth piecewise cubic polynomialsLinG.GrinbergL.KarniadakisG. E.Numerical studies of the stochastic Korteweg-de Vries equationLiuR.-X.WuL.-L.Small-stencil Padé schemes to solve nonlinear evolution equationsYuR.-G.WangR.-H.ZhuC.-G.A numerical method for solving KdV equation with multilevel B-spline quasi-interpolationTakewakiH.NishiguchiA.YabeT.Cubic interpolated pseudoparticle method (CIP) for solving hyperbolic-type equationsTakewakiH.YabeT.The cubic-interpolated pseudo particle (CIP) method: application to nonlinear and multi-dimensional hyperbolic equationsYabeT.AokiT.A universal solver for hyperbolic equations by cubic-polynomial interpolation. I. One-dimensional solverIshikawaT.YabeT.WangP. Y.AokiT.IkedaF.A universal solver for hyperbolicequations by cubic-polynomial interpolation. 2. 2-dimensional and 3-dimensional solversLeleS. K.Compact finite difference schemes with spectral-like resolutionLiJ.VisbalM. R.High-order compact schemes for nonlinear dispersive wavesHassanM. M.Exact solitary wave solutions for a generalized KdV-Burgers equationYabeT.TanakaR.NakamuraT.XiaoF.An exactly conservative semi-lagrangian scheme (CIP-CSL) in one dimensionGaitondeD. V.VisbalM. R.High-order schemes for navier-stokes equations: algorithm and implementation into fdl3di1998DTIC DocumentMiuraR. M.GardnerC. S.KruskalM. D.Korteweg-de Vries equation and generalizations: II. Existence of conservation laws and constants of motionHelalM. A.MehannaM. S.A comparative study between two different methods for solving the general Korteweg-de Vries equation (GKdV)IsmailH. N. A.RaslanK. R.SalemG. S. E.Solitary wave solutions for the general KDV equation by Adomian decomposition method