Algorithmically generated implicit di erence schemes for KdV

Algorithmically generated implicit dierence schemes
for KdV equation and their numerical behaviour
Yu. A. Blinkov, V. P. Gerdt and K. V. Marinov
• Introduction • In this paper we consider the Korteveg-de Vries (KdV) equation
in the following form (cf. [1], Eq. 1.18)
∂t u + αu ∂x u + β ∂x3 u = 0
(1)
where u := u(x, t) and α, β ∈ R. Numerical solving of Eq. (1) by the nite dierence
method was intensively studied in the literature (see book [1] and its bibliography).
In so doing, a number of explicit and implicit dierence schemes were derived and
used for numerical construction of various solutions to (1).
In our talk we consider the Cartesian grid with spacings τ := tn+1 − tn and
h := xj+1 − xj and present two new implicit schemes for Eq. (1) with O(τ 2 , h2 )
and O(τ 2 , h2 ) approximations. The schemes were generated by our algorithmic
approach [2] which is based on combination of the methods of nite volumes, numerical integration and dierence elimination by means of Gr
obner bases. Then we
compare, on the exact soliton solution, numerical behavior of these schemes with
that of some classical schemes of same order of approximation used in the literature
and show that our schemes provide substantially better numerical accuracy.
• Classical schemes with O(τ 2 , h2 ) approximation • The explicit scheme [1],
Eq.1.80
un+1
=un−1
−
i
i
βτ
ατ n n
u u
− uni−1 − 3 uni+2 − 2uni+1 + 2uni−1 − uni−2 .
h i i+1
h
(2)
where the standard notation unj := u(tn , xj ) for the grid function is used. This
scheme is stable for
2h3 ∼
h3
τ≤ √
= 0.384 .
β
3 3β
The work was partially supported by the grant No.16-01-00080 from the Russian Foundation for
Basic Research.
2
Yu. A. Blinkov, V. P. Gerdt and K. V. Marinov
The implicit scheme [1], Eq.1.96
un+1
− unj
α n n+1
j
n+1
+
uj uj+1 − un+1
unj+1 − unj−1 +
j−1 + uj
τ
4h
β
n+1
n+1
n+1
+ 3 un+1
j+2 − 2uj+1 + 2uj−1 − uj−2 +
4h
+ unj+2 − 2un+1
+ 2unj−1 − unj−2 = 0 .
j
• Classical
Eq.1.82)
(3)
schemes with O(τ 2 , h4 ) approximation • The explicit scheme ( [1],
un+1
=un−1
−
i
i
−
ατ n n
u u
− 8uni+1 + 8uni−1 − uni−2
6h i i+2
(4)
βτ
uni+3 − 8uni+2 + 13uni+1 − 13uni−1 + 8uni−2 − uni−3
3
4h
whose stability condition is given by
τ≤
108h3
h3
∼
p √
= 0.216 .
β
(43 + 7 73) 10 73 − 62β
√
The implicit scheme [1], Eq.1.84
un+1
− unj
α n n+1
j
n+1
n+1
=
uj uj+2 − 8un+1
j+1 + 8uj−1 − uj−2 +
τ
4h
+ un+1
unj+2 − 8unj+1 + 8unj−1 − unj−2 +
j
β
+ 3
4h
un+1
j+3
unj+3
−
−
8un+1
j+2
8unj+2
+
+
13un+1
j+1
13unj+1
−
−
13un+1
j−1
13unj−1
+
+
(5)
8un+1
j−2
8unj−2
−
−
un+1
j−3
unj−3
+
.
• A new scheme with O(τ 2 , h2 ) approximation • It is obtained by the straightforward extension of the approach of paper [3] to equation (1). First, we convert (1)
into the integral form
I α
− u2 − βuxx dt + u dx = 0
(6)
2
Γ
valid for any simply connected integration contour Γ. Second, we chose the rectangular integration contour shown in Fig. stencil as a "control volume". Then we
n+1
n
j
Figure 1.
j+1
j+2
First integration contour for Eq. (6).
Algebraically generated schemes for KdV
add to (6) the integral relations
Z xj+1
Z
ux dx = u(t, xj+1 ) − u(t, xj ),
xj
3
xj+2
xj
uxx dx = ux (t, xj+2 ) − ux (t, xj ). (7)
To approximate the contour integral, we apply the trapezoidal rule. For numerical approximations of the integral relations we apply the trapezoidal rule for
the integration of ux and the midpoint rule for the integration of uxx . Thereby,
Eqs. (6) and (7) take the form
h α n
n+1
n
n+1
u2 j + u2 j − u2 j+2 − u2 j+2 −
−
2
τ n+1
− β uxx nj + uxx n+1
− uxx nj+2 − uxx n+1
· + uj+1 − unj+1 · 2h = 0, (8)
j
j+2
2
n
h
n
n
n
n
ux j+1 + ux j · = uj+1 − uj , uxx j+1 · 2h = ux nj+2 − ux nj .
2
To use linear dierence elimination of ux and uxx from system (8), and hence the
Maple package LDA (Linear Dierence Algebra) [4], we introduce the new function
α
F := u2 and chose an elimination ranking such that u F ux uxx . Then
2
computation of a dierenceGr
obner basis of the ideal generated by the left-hand
sides of dierence polynomials in (8) and extraction from the basis an equation
that does not contains ux and uxx yields the following dierence scheme
n
i
un+1
− unj
α h 2 n+1
n+1
n
j
+
u j+1 − u2 j−1 + u2 j+1 − u2 j−1 +
τ
8h
β n+1
(9)
n+1
n+1
+ 3 uj+2 − 2un+1
j+1 + 2uj−1 − uj−2 +
4h
+ unj+2 − 2un+1
+ 2unj−1 − unj−2 = 0.
j
This scheme is an analog of the famous Crank-Nicolson scheme for the heat equation.
• A new scheme with O(τ 2 , h2 ) approximation • Choose now the integration
contour Γ in (6) shown in Fig. 2 with the indentation h/4 along to the x−direction.
n+1
n
j
Figure 2.
j+1
j+2
j+3
j+4
Second integration contour for Eq. (6).
Using at a fractional point relations
fj+2 − fj 1
fj+5/4 ≈ fj+1 +
·
= (fj+2 + 8fj+1 − fj )/8,
2h
4h
fj+4 − fj+2 1
fj+11/4 ≈ fj+3 −
·
= (−fj+4 + 8fj+3 + fj+2 )/8.
2h
4h
(10)
4
Yu. A. Blinkov, V. P. Gerdt and K. V. Marinov
we rewrite (6), (7) in the following form
h α
n
n
n
n+1
n+1
n+1
(−u2 j + 8u2 j+1 + u2 j+2 )/8 + (−u2 j + 8u2 j+1 + u2 j+2 )/8 −
−
2
n
n
n
n+1
n+1
n+1
− (u2 j+2 + 8u2 j+3 − u2 j+4 )/8 − (u2 j+2 + 8u2 j+3 − u2 j+4 )/8 −
n+1
− β (−uxx nj + 8uxx nj+1 + uxx nj+2 )/8 + (−uxx n+1
+ 8uxx n+1
j
j+1 + uxx j+2 )/8 −
τ
n+1
n+1
− (uxx nj+2 + 8uxx nj+3 − uxx nj+4 )/8 − (uxx n+1
· +
j+2 + 8uxx j+3 − uxx j+4 )/8
2
n+1
3h
n
+ uj+1 − uj+2 ·
= 0.
n
h
2
ux j+1 + ux nj · = unj+1 − unj , uxx nj+1 · 2h = ux nj+2 − ux nj .
(11)
2
Elimination the grid functions ux and uxx from (11) gives the dierence scheme
ujn+1 − unj
α h 2 n+1
n+1
n+1
n+1
u j+2 − 8u2 j+1 + 8u2 j−1 − u2 j−2 +
−
τ
i
48hn
n
n
n
+ u2 j+2 − 8u2 j+1 + 8u2 j−1 − u2 j−2 +
(12)
β n+1
n+1
n+1
n+1
n+1
−
uj+3 − 8un+1
j+2 + 13uj+1 − 13uj−1 + 8uj−2 − uj−3 +
16h3
unj+3 − 8unj+2 + 13unj+1 − 13unj−1 + 8unj−2 − unj−3 = 0
Numerical results
Our numerical analysis of schemes (2)(5), (9) and (12) was done with the Python
package SciPy (http:\\scipy.org). as a benchmark, we used the exact one-soliton
solution to (1)
2k12
u(x, t) =
cosh(k1 (x − 4k12 t))2
with α = 6, β = 1 and k1 = 0.4. In so doing, we xed h = 0.25 and considered
the solution in interval −50 ≤ x ≤ 50 with periodic boundary conditions (cf. [1],
p.49). The numerical inaccuracy was estimated by the Frobenius norm (kAkF ).
For the implicit schemes (9) and (12) we applied linearization
2
2
vk+1
= vk+1
− vk2 + vk2 = (vk+1 − vk )(vk+1 + vk ) + vk2 ≈ vk+1 · 2vk − vk2 .
References
[1] V. Yu. Belashov and S. V. Vladimirov: Solitary Waves in Dispersive Complex Media:
Theory, Simulation, Applications. Springer Series in Solid-State Sciences, Vol. 149,
Springer-Verlag, Berlin (2005).
[2] V. P. Gerdt, Yu. A. Blinkov and V. V. Mozzhilkin: Grobner Bases and Generation
of Dierence Schemes for Partial Dierential Equations. Symmetry, Integrability and
Geometry: Methods and Applications, 2:26, 2006. arXiv:math.RA/0605334
Algebraically generated schemes for KdV
5
101
(1.80) p.42 explicit O(h2 )
(1.82) p.43 explicit O(h4 )
(1.84) p.44 implicit O(h4 )
(1.96) p.47 implicit O(h2 )
100
наша implicit O(h2 )
наша implicit O(h4 )
10−1
10−2
10−3
10−4
10−5
0
20
40
Figure 3.
60
80
100
120
140
160
Dynamics of numerical error
[3] V. P. Gerdt, Yu. A. Blinkov and K. B. Marinov: Computer Algebra Based Discretization
of Quaslinear Evolution Equations. Programming and Computer Software, to appear.
[4] V. P. Gerdt and D. Robertz: Computation of Dierence Grobner Bases. Computer Science
Journal of Moldova, 20(2), (2012), 203226. arXiv:cs.SC/1206.3463
Yu. A. Blinkov
Mechanics and Mathematics Department
Saratov State University, Saratov, Russia
e-mail: [email protected]
V. P. Gerdt
Laboratory of Information Technologies
Joint Institute for Nuclear Research, Dubna, Russia
and
Peoples' Friendship University of Russia, Moscow, Russia
e-mail: [email protected]
K. V. Marinov
University "Dubna", Dubna, Russia
e-mail: [email protected]