• No results found

Long time error bounds for the wave equation on second order form

N/A
N/A
Protected

Academic year: 2021

Share "Long time error bounds for the wave equation on second order form"

Copied!
14
0
0

Loading.... (view fulltext now)

Full text

(1)

Department of Mathematics

Long time error bounds for the wave

equation on second order form

Jan Nordstr¨om and Hannes Frenander

LiTH-MAT-R--2017/01--SE

(2)

Department of Mathematics

Link¨

oping University

(3)

Long time error bounds for the wave equation on second

order form

Jan Nordstr¨om, Hannes Frenander

Division of Computational Mathematics, Department of Mathematics, Link¨oping University, SE-58183 Link¨oping. Sweden

Abstract

Temporal error bounds for the wave equation expressed on second order form is investigated. By using the energy method, we show that, with appropriate choices of boundary condition, the time and space derivative of the error is bounded even for long times. No long time bound on the actual error can be obtained, although numerical experiments indicate that such a bound exist. Keywords: Error bounds, second order form, summation-by-parts, finite differences, simultaneous approximation terms, wave equation

1. Introduction

For a stable and consistent numerical scheme, the solution converge as the grid spacing h approaches zero. However, the fact that the solution converges during mesh refinement does not necessarily mean that the error is bounded in time, i.e. that the error remains bounded as t → ∞. Consequently, the classical definition of stability is not sufficient for an accurate solution after long time integration.

Long time error bounds have previously been studied for hyperbolic prob-lems on first order form [1, 10, 5]. However, rewriting the wave equation makes the problem more computationally demanding [6]. In this work, we take the next step and consider the temporal behavior of the error for the wave equation on second order form.

The problem under consideration is discretized using Summation-By-Parts (SBP) operators [4, 9, 13, 8, 11], and the boundary conditions are

im-URL: jan.nordstrom@liu.se, hannes.frenander@liu.se (Jan Nordstr¨om, Hannes Frenander)

(4)

plemented using Simultaneous Approximation Terms (SAT’s) [2, 3]. To min-imize reflections, appropriate non-reflecting boundary conditions are used. We proceed to investigate the scheme, and focus our investigation on the errors after long time.

The rest of this paper will proceed as follows. In Section 2 and 3, we derive error bounds for the continous wave equation on second order form. The equation are discretized using the SBP-SAT technique, and it is shown that the continous analysis carry over to the discrete problem. The theoret-ical findings are verified by numertheoret-ical experiments in Section 4. Finally, we summarize and draw conclusions in Section 5.

2. The wave equation on second order form

The wave equation on second order form augmented with non-reflecting boundary conditions is utt− c2uxx = F (x, t), x ∈ [0, 1], t ≥ 0 ut(0, t) − cux(0, t) = g0(t) ut(1, t) + cux(1, t) = g1(t) u(x, 0) = f (x) ut(x, 0) = h(x), (1)

where c > 0 is a real constant and g0, g1, f, h, F are given functions. For a

detailed discussion on well-posedness for the wave equation, see [12]. 2.1. An error bound for the continous problem

Let ˆu be a solution to (1) with perturbed forcing function F + δF , such that (1) becomes, ˆ utt− c2uˆxx = F + δF, x ∈ [0, 1], t ≥ 0 ˆ ut(0, t) − cˆux(0, t) = g0(t) ˆ ut(1, t) + cˆux(1, t) = g1(t) ˆ u(x, 0) = f (x) ˆ ut(x, 0) = h(x). (2)

(5)

Subtracting (1) from (2) leads to the error equation, ett− c2exx = δF et(0, t) − cex(0, t) = 0 et(1, t) + cex(1, t) = 0 e(x, 0) = 0 et(x, 0) = 0 (3) where e = ˆu − u.

Multiplying (3) with et from the left and integrating over the spatial

domain yields, Z 1 0 etettdx = c2 Z 1 0 etexxdx + Z 1 0 etδF dx. (4)

By using that etett = ∂t∂(e2t)/2 and etexx = (etex)x − (e2x)t/2, (4) can be

rewritten as, ∂ ∂t(||et|| 2) + c2 ∂ ∂t(||ex|| 2) = c2(e t(1, t)ex(1, t) − et(0, t)ex(0, t)) + 2 Z 1 0 etδF dx, (5) where the norm is defined as ||e||2 =R1

0 e

2dx. Letting ||¯e||2 =R1

0(e 2

t+c2e2x)dx,

using that ∂t∂(||¯e||2) = 2||¯e||||¯e||

t and dividing (5) by 2||¯e|| results in,

∂t(||¯e||) ≤ −c

e2t(1, t) + e2t(0, t)

2||¯e||2 ||¯e|| + ||δF || = −η(t)||¯e|| + ||δF ||. (6)

In (6), the boundary conditions have been imposed and η(t) = c(e2

t(1, t) +

e2

t(0, t))/2||¯e||2.

Solving (6) for ||¯e|| and assuming that there are constants η0and ||δF ||max

such that η(t) ≥ η0 > 0 and ||δF || ≤ ||δF ||max results in,

||¯e|| ≤ 1 − exp(−η0t) η0

||δF ||max, (7)

after using the homogeneous initial conditions. Since η0 > 0, one can clearly

see that ||¯e|| is bounded, i.e. it approach a finite value as t → ∞. Since ||¯e||2 = ||e

t||2 + c2||ex||2, (7) implies that both et and ex are bounded.

(6)

Remark 1. The assumption η(t) ≥ η0 > 0 is crucial for the result in (7).

This is in fact a simplification of a more general condition. It is shown in [10] that the precise requirement is that R0tη(τ )dτ is monotonically increasing.

The previous analysis does not imply that the error is bounded, but rather that the growth of it is limited. To clarify, we make a similar argument as in [14], and observe that,

d dt(||e|| 2 ) = 2 Z 1 0 eetdx ≤ 2||e||||et||.

Using the fact that dtd(||e||2) = 2||e||||e||

t, we get,

||e||t≤ ||et|| ≤

1 − exp(−η0t)

η0

||δF ||max. (8)

Integrating (8) in time and using the initial conditions yields, ||e|| ≤ η0t − 1 + exp(−η0t)

η2 0

||δF ||max (9)

For large t, the term t/η0 in (9) will dominate, and the error grows linearly

in time.

We summarize the results so far in the following proposition.

Proposition 1. In problem (3), both et and ex are bounded for long times,

and the error e grows at most linearly in time.

Remark 2. The estimate (9) is an upper estimate of ||e||. Consequently, (9) does not necessarily mean that the error is unbounded for long times. 2.2. The semi-discrete scheme

Next, we discretize (1) using the SBP-SAT technique, ¯ vtt = c2D¯vx− cP−1E0(¯vt− c¯vx− ¯g0) − cP−1EN(¯vt+ c¯vx− ¯g1) + ¯F ¯ v(0) = ¯f ¯ vt(0) = ¯h (10)

where D = P−1Q is the SBP finite difference operator that approximates the spatial derivative and ¯vx = D¯v. The matrix P = PT > 0, Q satisfy the

(7)

SBP property Q + QT = diag(−1, 0, ..., 0, 1), E

0 = diag(1, 0, ..., 0) and EN =

diag(0, ..., 0, 1). In (10), ¯f , ¯g0, ¯g1, ¯h, ¯F are grid functions of f, g0, g1, h, F ,

i.e. the function values are injected at the appropriate grid points. The terms on the right-hand side of (10) are SAT’s that implements the boundary conditions. It can be shown that (10) is a stable scheme and that the solution converges to the solution of (1). For a proof, the reader is referred to [12]. 2.2.1. An error bound for the semi-discrete problem

Let ¯u be the solution to (1) injected at the grid. Inserting ¯u into (10) and subtracting (10) with the numerical solution ¯v results in the discrete error equation, ¯ ett = c2D¯ex+ cP−1E0(¯et− c¯ex) − cP−1EN(¯et+ c¯ex) + T e, ¯ e(0) = 0, ¯ et(0) = 0 (11)

where ¯e = ¯u − ¯v, ¯ex = D¯e and T e the truncation error.

Multiplying (11) with ¯eT

tP from the left, adding the transpose of the

outcome and using the SBP property of Q results in, ∂

∂t(||˜e||

2

P) = −c(e2N t+ e20t) + 2¯eTP T e, (12)

where ||˜e||2

P = ¯eTtP ¯et+c2¯eTxP ¯ex and e0,N denotes the error at the first and last

grid point, respectively. Following the path of the continous analysis above and defining c(e2

N t+ e20t)/(2||˜e||2) = ¯η ≥ ¯η0 > 0, we arrive at the estimate,

||˜e||P ≤

1 − exp(−¯η0t)

¯ η0

||T e||max. (13)

By using that (||¯e||P)t ≤ ||¯et||P ≤ ||˜e||P, (13) leads to,

(||¯e||P)t≤

1 − exp(−¯η0t)

¯ η0

||T e||max. (14)

Integrating (14) in time and using homogeneous initial conditions results in, ||¯e||P ≤ ¯ η0t − 1 + exp(−¯η0t) ¯ η2 0 ||T e||max, (15)

which is analogous to the continous estimate (9).

Equation (13) states that the ¯et and ¯ex remains bounded as t → ∞. As

in the continous problem, no bound for the actual error ¯e as time grows is obtained. On the contrary, (15) indicate that the error grows linearly in time.

(8)

N SBP(2,1) Rate SBP(4,2) Rate SBP(6,3) Rate 10 4.1 · 10−2 − 8.6 · 10−2 − 7.2 · 10−2 − 20 1.1 · 10−2 1.9 1.1 · 10−2 3.0 2.2 · 10−3 5.0 40 2.9 · 10−3 1.9 1.2 · 10−3 3.2 1.6 · 10−4 3.8 80 7.3 · 10−4 1.9 1.4 · 10−4 3.1 9.8 · 10−6 4.0 160 2.92 · 10−4 2.0 1.6 · 10−5 3.1 5.4 · 10−7 4.2

Table 1: The error for different mesh-sizes when using a second (SBP(2,1)), third (SBP(4,2)) and fourth (SBP(6,3)) order SBP scheme when solving (1).

Remark 3. The same situation holds for the semi-discrete case as in the continous case. The precise requirement for en error bound is that R0tη(τ )dτ¯ is monotonically increasing.

We summarize the results so far in the following proposition.

Proposition 2. In problem (11), both ¯et and ¯ex are bounded for long times,

and the error ¯e grows at most linearly in time.

The results obtained for the second order form holds also for the wave equation rewritten on first order form. See Appendix A for details.

3. Numerical results

Consider problem (1) a with c = 1. The problem is discretized in both time and space using the SBP-SAT technique as described above; see [12] for a detailed description of this procedure. The results are approximately the same when solving the wave equation on first and second order form, and therefore only results for the second order form are discussed.

First, we confirm that the solution converges with the correct rate during mesh refinement. We choose the exact solution to (1) to be u = sin(2π(t − x)) and choose the boundary and initial data accordingly. The problem is integrated up to T = 1 and the norm of the error at the final time step is given by ||e||2P = eT(T )P e(T ). The result is summarized in Table 1, and the rate of convergence is as expected.

Next, the system is integrated up to T = 100 with N = 20, 40, 80 grid points in space and Nt = 10N grid points in time. Again, the boundary and

initial data are chosen such that the exact solution is u = sin(2π(t − x)). A third order SBP scheme is used in both space and time.

(9)

0 20 40 60 80 100 ||e|| P 10-4 10-2 100 0 20 40 60 80 100 ||e x || P 10-4 10-2 100 Time 0 20 40 60 80 100 ||e t || P 10-4 10-2 100

Figure 1: The P-norm of e (upper figure), ex (middle figure) and et (lower figure) for

different mesh sizes. Blue line: N = 20, red line: N = 40 and green line: N = 80. The exact solution is u = sin(2π(x − t)), and the problem is expressed on second order form.

In Figure 1, the P-norm of et and ex together with the error itself is

displayed as a function of time when solving the wave equation on second order form. As predicted in Section 2.2.1, ||et||P and ||ex||P does not grow.

One can also see that the actual error is bounded as well.

To proceed, we consider another test case. In Figure 2, the data is chosen such that the exact solution is u = exp(x − t), and the error as a function of time is shown. As one can see, the error is bounded also for this test case.

Next, we use the method of manufactured solutions [7] (adding an ap-propriate forcing function to the right hand side of (10)) such that the exact solution becomes u = x4+ exp(x − t). The results are displayed in Figure 3, and one can see that the error is bounded also in this case.

Finally, a case where no error bound exist is considered. By applying periodic boundary conditions to (1), both ||et||P and ||ex||P are expected to

grow linearly in time, since η(t) becomes zero in (6). The errors when using N = 20, 40, 80 spatial grid points and Nt = 10N temporal grid points are

displayed in Figure 4, and one can see that ||et||P and ||ex||P as well as ||e||P

grows at a linear rate. The exact solution is chosen to u = sin(2π(t − x)). For brevity, we have restricted the numerical experiments to the cases

(10)

0 20 40 60 80 100 ||e|| P 10-7 10-5 10-3 0 20 40 60 80 100 ||e x ||P 10-6 10-4 10-2 Time 0 20 40 60 80 100 ||e t ||P 10-6 10-4 10-2

Figure 2: The P-norm of e (upper figure), ex (middle figure) and et (lower figure) for

different mesh sizes. Blue line: N = 20, red line: N = 40 and green line: N = 80. The exact solution is u = exp(x − t), and the problem is expressed on second order form.

0 20 40 60 80 100 ||e|| P 10-6 10-4 10-2 0 20 40 60 80 100 ||e x ||P 10-6 10-4 10-2 Time 0 20 40 60 80 100 ||e t ||P 10-6 10-4 10-2

Figure 3: The P-norm of e (upper figure), ex (middle figure) and et (lower figure) for

different mesh sizes. Blue line: N = 20, red line: N = 40 and green line: N = 80. The exact solution is u = x4+ exp(x − t), and the problem is expressed on second order form.

(11)

0 20 40 60 80 100 ||e|| P 10-8 10-5 10-2 101 0 20 40 60 80 100 ||e x || P 10-5 10-3 10-1 101 Time 0 20 40 60 80 100 ||e t || P 10-5 10-3 10-1 101

Figure 4: The P-norm of e (upper figure), ex (middle figure) and et (lower figure) for

different mesh sizes. Blue line: N = 20, red line: N = 40 and green line: N = 80. The dashed line indicate a linear growth, and periodic boundary conditions are used.

above, but the general result (i.e. that the error is bounded) is valid for other test cases as well. In fact, we have not been able to find a single relevant test case in which the error grows.

4. Summary and conclusions

Long time error development for the wave equation expressed on second order form has been investigated. By using the energy method, we have theoretically shown that both the spatial and temporal derivatives of the error are bounded; that is, they approach a constant value as the simulation time T → ∞. It is also shown that the actual error grows linearly and hence is not bounded for long times.

The numerical experiments confirm that both the time and space deriva-tives of the error are bounded. However, it is found that the actual error is bounded as well, which indicates that the error estimate (9) is too pessimistic.

(12)

Appendix A. The wave equation on first order form

For comparison, we also consider the wave equation on first order form. By introducing the variables v1 = ut and v2 = cux, the problem (1) can be

written as, ¯ vt− C ¯vx = ˜F (x, t), x ∈ [0, 1], t ≥ 0 v1(0, t) − cv2(0, t) = g0(t) v1(1, t) + cv2(1, t) = g1(t) v2(x, 0) = cfx(x) v1(x, 0) = h(x), (A.1) where ¯v = [v1, v2], ˜F = [F, 0]T and, C = 0 c c 0  .

In [10], it was shown that the error in (A.1) is bounded in time as ||ˆe|| ≤ 1 − exp(−η0t)

η0

||δ ˜F ||max, (A.2)

where ||δ ˜F ||max is an upper estimate of the disturbance in ˜F and,

cˆe

2

1(0, t) + ˆe21(1, t)

2||ˆe||2 = η(t) ≥ η0 > 0. (A.3)

The variables ˆe1, ˆe2 denotes the error in the components v1 and v2,

respec-tively, and ˆe = [ˆe1, ˆe2]T. Clearly, the estimate (A.2) leads to the same

con-clusions as in the second order case, discussed in Section 2.1. References

[1] S. Abarbanel, A. Ditkowski, and B. Gustafsson. On error bounds of finite difference approximations to partial differential equations –temporal be-havior and rate of convergence. Journal of Scientific Computing, 15:79– 116, 2000.

[2] M. Carpenter, D. Gottlieb, and S. Abarbanel. Time-stable bound-ary conditions for finite-difference schemes solving hyperbolic systems: methodology and application to high-order compact schemes. Journal of Computational Physics, 111:220–236, 1994.

(13)

[3] M. Carpenter, J. Nordstr¨om, and D. Gottlieb. A stable and conservative interface treatment of arbitrary spatial accuracy. Journal of Computa-tional Physics, 148:341–365, 1999.

[4] B. Gustafsson, H.O. Kreiss, and A. Sundstr¨om. Stability theory of dif-ference approximations for mixed initial boundary value problems II. Mathematics of Computation, 26:649–686, 1972.

[5] D. Kopriva, J. Nordstr¨om, and G. Gassner. Error boundedness of discon-tinous galerkin spectral element approximations of hyperbolic problems. Accepted in Journal of Scientific Computing, 2016.

[6] H.O. Kriess, N.A. Petersson, and J. Ystr¨om. Difference approximations for the second order wave equation. SIAM Journal of Numerical Anal-ysis, 40:1940–1967, 2002.

[7] J. Lindstr¨om and J. Nordstr¨om. A stable and high-order accurate conju-gate heat transfer problem. Journal of Computational Physics, 229:5440, 2010.

[8] T. Lundquist and J. Nordstr¨om. The SBP-SAT technique for initial value problems. Journal of Computational Physics, 270:86–104, 2014. [9] K. Mattsson and J. Nordstr¨om. Summation by parts for finite difference

approximations of second derivatives. Journal of Computational Physics, 199:503–540, 2004.

[10] J. Nordstr¨om. Error bounded schemes for time-dependent hyperbolic problems. SIAM Journal of Scientific Computing, 30:46–59, 2007. [11] J. Nordstr¨om and T. Lundquist. Summation-by-parts in time. Journal

of Computational Physics, 251:487–499, 2013.

[12] J. Nordstr¨om and T. Lundquist. Summation-by-parts in time: the second derivative. SIAM Journal of Scientific Computing, 38:A1561– A1586, 2016.

[13] B. Strand. Summation by parts for finite difference approximations for

d

dx. Journal of Computational Physics, 110:47–67, 1994.

(14)

[14] S. Wang and G. Kriess. Convergence of summation-by-parts finite dif-ference methods for the wave equation. Accepted in Journal of Scientific Computing, 2016.

References

Related documents

The weak resemblance to the corresponding deterministic problem suggests an appropriate way to specify boundary conditions for the solution mean, but gives no concrete information

Marken överfors sedan med de olika kombinationerna av hjul och band, med och utan belastning bild 9: A Band, belastad B Dubbelhjul, belastad C Enkelhjul, belastad D Band, obelastad

Evaluation of the new apparatus for test method 2 of ENV 1187 New definition of damaged area Confirmation of consistence of test results at SP Confirmation of the turbulence of

Intervjupersonernas resonemang om relationen mellan maskulinitet och psykisk ohälsa tydliggör stigmatiseringen och att unga män inte söker vård för sin psykiska ohälsa till följd

The results are in accordance with corresponding results for the continuous Boltzmann equation obtained in the non-degenerate case, with boundary conditions of Dirichlet type [48]..

Syftet med denna uppsats var att studera hur Sveriges reala fastighetspriser påverkas av det dynamiska förhållandet mellan makroekonomiska faktorer, som inkluderar hushållens reala

Nevertheless, despite the multiple sensor approach, much of the work concerned the investigation of the Time-of-Flight camera as it is a quite new type of 3D imaging sen- sors and

It was found that sampling with around 2000 points was typically sufficient to see convergence with Monte Carlo sampling to an accuracy comparable to the accuracy of the