Sie sind auf Seite 1von 24

Japan J. Indust. Appl. Math.

(2010) 27:239262
DOI 10.1007/s13160-010-0004-y
ORIGINAL PAPER

Area 2

A finite difference scheme for an interface problem


Yingying Wu Simon Truscott Masami Okada

Received: 30 July 2008 / Revised: 21 April 2009 / Published online: 14 May 2010
The JJIAM Publishing Committee and Springer 2010

Abstract We propose a new finite difference scheme for an interface problem with
piecewise constant coefficients. We use the Newton polynomial and continuity of flux
to obtain finite difference scheme of second-order accuracy at the interface. We give
several examples which show that the numerical solutions have O(h 2 ) accuracy.
Keywords

FDM Newton polynomial Interface problem

1 Introduction
Interface problems [5] arise from many applied fields including, for example, the study
of two different materials, such as iron and copper, and the same material at different
states, such as water and ice. When ordinary or partial differential equations are used
to model these applications, the parameters in the governing differential equations are
typically discontinuous across the interface. Because of these irregularities, the solutions to the differential equations are typically nonsmooth, or even discontinuous. As a
result, for interface problems many standard numerical methods based on the assumption of smoothness of solutions work poorly or not at all [4]. The goal of our presented
research is to deal with interface problems and obtain high-order accuracy throughout
the entire domain. In this paper, we start with the following one-dimensional boundary

Y. Wu (B) S. Truscott M. Okada


Department of Mathematics and Information Sciences,
Tokyo Metropolitan University, Tokyo 192-0397, Japan
e-mail: yysnow11@hotmail.com
S. Truscott
e-mail: sltruscott@gmail.com
M. Okada
e-mail: moka@tmu.ac.jp

123

240

Y. Wu et al.

value problem


(Bu x )x (x) = f (x), a < x < b,


u(b) = C2 ,
u(a) = C1 ,

(1)

where the function B(x) is piecewise constant with a discontinuity at x = (a <


< b). Reformulating the problem using junction conditions, we obtain

(Bu x )x (x) = f (x) x (a, ) (, b)

[u]
+

x= = u u = 0
+

[Bu x ]x= = B u +

x B ux = 0

u(a) = C1 , u(b) = C2 .

(2)

Remark 1 If f (x) C 2 ((a, ]) C 2 ([, b)), even if f (x) is discontinuous at , then


u(x) C 4 ((a, ]) C 4 ([, b)) and u(x) is Lipschitz continuous.
After generating a Cartesian grid, say xi = i h, i = 0, 1, . . . , N , where h = (ba)/
(N + 1), the point will fall on a single grid point or between two grid points, that
is, x j < x j+1 . The grid points x j and x j+1 (see Fig. 1) are called irregular grid
points. All other grid points are called regular grid points, where the standard 3-point
central finite difference stencil
1
(B 1 (Ui+1 Ui ) Bi 1 (Ui Ui1 )) = f i
2
h 2 i+ 2
is used here, noting that Bi+ 1 = B(xi+ 1 ) and f i = f (xi ). The problem is then
2
2
to find suitable difference equations for the irregular grid points, x j and x j+1 . The
expected second order finite difference equations are determined from the method of
undetermined coefficients,
j2 U j2 + j1 U j1 + j U j + j+1 U j+1 + j+2 U j+2 + j+3 U j+3 = f j ,
j2 U j2 + j1 U j1 + j U j + j+1 U j+1 + j+2 U j+2 + j+3 U j+3 = f j+1 .
The derivation is given in the following sections. It should be noted that f (x) in (2)
is not necessarily only a function of x, for example it could be u t (x, t).

Fig. 1 A one-dimensional grid


with the interface between
grid points x j and x j+1

123

A finite difference scheme for an interface problem

241

2 Numerical schemes for irregular grid points


2.1 The Newton polynomial
To determine the difference equations at the irregular grid points, we firstly introduce Newtons interpolation (extrapolation), see for example [1]. For a given smooth
function v( ), Newtons interpolation is defined by:
p( ) = a0 +

n1

i=1

ai

i1


( j ),

j=0

where a0 = v[0 ] := v(0 ), ai = v[0 , 1 , . . . , i ] (i = 1, . . . , n 1) and the divided


differences for v are given by
v[1 , . . . , n1 ] v[0 , . . . , n2 ]
,
n1 0
v[i ] := v(i ) (i = 1, 2, . . . , n 1).

v[0 , 1 , . . . , n1 ] :=

Applying the above formula with n = 4 to v( ), for , with 0 , 1 , 2 and 3


replaced respectively by j+1 , j+2 , j+3 and j+4 we obtain
p + ( ) = v( j+1 )+v[ j+1 , j+2 ]( j+1 )+v[ j+1 , j+2 , j+3 ]( j+1 )( j+2 )
+ v[ j+1 , j+2 , j+3 , j+4 ]( j+1 )( j+2 )( j+3 )
v( j+2 ) v( j+1 )
( j+1 )
= v( j+1 ) +
h
v( j+3 ) 2v( j+2 ) + v( j+1 )
+
( j+1 )( j+2 )
2h 2
v( j+4 )3v( j+3 )+3v( j+2 )v( j+1 )
+
( j+1 )( j+2 )( j+3 )
6h 3

( j+1 )( j+2 )
j+1
+
= v( j+1 ) 1
h
2h 2

( j+1 )( j+2 )( j+3 )

6h 3

( j+1 )( j+2 )
j+1

+ v( j+2 )
h
h2

( j+1 )( j+2 )( j+3 )


+
2h 3


( j+1 )( j+2 ) ( j+1 )( j+2 )( j+3 )
+ v( j+3 )

2h 2
2h 3


( j+1 )( j+2 )( j+3 )
,
+ v( j+4 )
6h 3

123

242

Y. Wu et al.

where the superscript + in p + ( ) indicates an expansion on the right hand side, that
is, . This gives a higher order approximation of v(). Similarly, for , we
obtain
p ( ) = v( j ) + v[ j , j1 ]( j ) + v[ j , j1 , j2 ]( j )( j1 )
+ v[ j , j1 , j2 , j3 ]( j )( j1 )( j2 )
v( j ) v( j1 )
( j )
= v( j ) +
h
v( j ) 2v( j1 ) + v( j2 )
+
( j )( j1 )
2h 2
v( j ) 3v( j1 ) + 3v( j2 ) v( j3 )
+
( j )( j1 )( j2 )
6h 3


( j )( j1 ) ( j )( j1 )( j2 )
j
+
= v( j ) 1+
+
h
2h 2
6h 3


( j )( j1 ) ( j )( j1 )( j2 )
j

+ v( j1 )

h
h2
2h 3


( j )( j1 ) ( j )( j1 )( j2 )
+ v( j2 )
+
2h 2
2h 3


( j )( j1 )( j2 )
,
+ v( j3 )
6h 3
where the superscript in p ( ) indicates an expansion on the left hand side, that is,
. This again gives a higher order approximation of v().
Differentiating both p + ( ) ( ) and p ( ) ( ) with respect to , we have

1
v( j+2 ) v( j+1 )
h

1
+ 2 v( j+3 ) 2v( j+2 ) + v( j+1 ) (2 j+1 j+2 )
2h

1
+ 3 v( j+4 ) 3v( j+3 ) + 3v( j+2 ) v( j+1 )
6h

( j+2 )( j+3 ) + ( j+1 )

( j+3 ) + ( j+1 )( j+2 ) ,

1
v( j ) v( j1 )
p ( ) =
h

1
+ 2 v( j ) 2v( j1 ) + v( j2 ) (2 j j1 )
2h

1
+ 3 v( j ) 3v( j1 ) + 3v( j2 ) v( j3 )
6h
( j1 )( j2 ) + ( j )

( j2 ) + ( j )( j1 ) ,

p+ ( ) =

123

(3)

(4)

A finite difference scheme for an interface problem

243

and hence obtain higher order approximations of v (), thanks to the following basic
result on the polynomial interpolation (e.g. [1] p. 56 Theorem 3.1.1).
Lemma 1 For i (0 i 3) (a, b), let p( ) be the third-order Newton interpolation of v( ). If v( ) C 4 (a, b), then there exists an such that
v( ) p( ) =

v (4) ()
( 0 )( 1 )( 2 )( 3 ),
4!

where min(, 0 , 1 , 2 , 3 ) < < max(, 0 , 1 , 2 , 3 ).


Note that from this lemma we can derive immediately the following proposition.
Proposition 1 If v C 4 ((, ]) C 4 ([, )), then for = + O(h), we have
v( ) p( ) = O(h 4 ), where p( ) = p + ( ) for > , p( ) = p ( ) for < .
Similarly, Lemma 1 yields the following estimate for the derivative of v p in
view of the Rolles theorem.
Proposition 2 If v C 4 ((, ]) C 4 ([, )), then for = + O(h), we have
v ( ) p ( ) = O(h 3 ), where p ( ) = p+ ( ) for > , p ( ) = p ( ) for < .
Let us define
d :=

xj
.
h

Remark 2 0 d < 1.
Corollary 1 Assume that f (x) C 2 ((, ]) C 2 ([, )) and let u(x) be the
solution of (2). Then we have
(i)

( x j+1 )( x j+2 )
x j+1
+
u( + ) = u(x j+1 ) 1
h
2h 2

( x j+1 )( x j+2 )( x j+3 )

6h 3

( x j+1 )( x j+2 )
x j+1

+ u(x j+2 )
h
h2

( x j+1 )( x j+2 )( x j+3 )


+
2h 3


(x j+1 )(x j+2 ) (x j+1 )(x j+2 )(x j+3 )
+ u(x j+3 )

2h 2
2h 3


( x j+1 )( x j+2 )( x j+3 )
+ O(h 4 )
+ u(x j+4 )
6h 3
1
1
= (d 2)(d 3)(d 4)u(x j+1 ) + (d 1)(d 3)(d 4)u(x j+2 )
6
2

123

244

Y. Wu et al.

1
(d 1)(d 2)(d 4)u(x j+3 )
2
1
+ (d 1)(d 2)(d 3)u(x j+4 ) + O(h 4 ),
6
(ii)

xj
( x j )( x j1 )
u( ) = u(x j ) 1 +
+
h
2h 2

( x j )( x j1 )( x j2 )
+
6h 3

( x j )( x j1 )
xj

+ u(x j1 )
h
h2

( x j )( x j1 )( x j2 )

2h 3


( x j )( x j1 ) ( x j )( x j1 )( x j2 )
+ u(x j2 )
+
2h 2
2h 3


( x j )( x j1 )( x j2 )
+ O(h 4 )
+u(x j3 )
6h 3
1
1
= (d + 1)(d + 2)(d + 3)u(x j ) d(d + 2)(d + 3)u(x j1 )
6
2
1
1
+ d(d + 1)(d + 3)u(x j2 ) d(d + 1)(d + 2)u(x j3 ) + O(h 4 ),
2
6
(iii)
1
1
(3d 2 18d + 26)u(x j+1 ) +
(3d 2 16d + 19)u(x j+2 )
6h
2h
1
(3d 2 14d + 14)u(x j+3 )
2h
1
+ (3d 2 12d + 11)u(x j+4 ) + O(h 3 ),
6h

u x ( + ) =

(iv)
u x ( ) =

1
1
(3d 2 + 12d + 11)u(x j )
(3d 2 12d + 11)u(x j1 )
6h
2h
1
1
+ (3d 2 +8d +3)u(x j2 ) (3d 2 + 6d + 2)u(x j3 ) + O(h 3 ).
2h
6h

Substituting u( + ), u( ), u x ( + ) and u x ( ) for the junction conditions in (2),


and letting u j = u(x j ), we obtain
d(d + 1)(d + 2)u j3 + 3d(d + 1)(d + 2)u j2
3d(d + 2)(d + 3)u j1 + (d + 1)(d + 2)(d + 3)u j

123

A finite difference scheme for an interface problem

245

= (d 2)(d 3)(d 4)u j+1 + 3(d 1)(d 3)(d 4)u j+2


3(d 1)(d 2)(d 4)u j+3 + (d 1)(d 2)(d 3)u j+4 + O(h 4 ),

(5)

B (3d 2 + 6d + 2)u j3 + 3B (3d 2 + 8d + 3)u j2


3B (3d 2 + 10d + 6)u j1 + B (3d 2 + 12d + 11)u j
= B + (3d 2 18d + 26)u j+1 + 3B + (3d 2 16d + 19)u j+2
3B + (3d 2 14d + 14)u j+3 + B + (3d 2 12d + 11)u j+4 + O(h 4 ).

(6)

From (5) and (6), we have


u j+4 =

u j3

1
(P j2 u j2 + P j1 u j1 + P j u j
P j+4

+P j+1 u j+1 + P j+2 u j+2 + P j+3 u j+3 ) + O(h 4 ),


1
=
(Q j2 u j2 + Q j1 u j1 + Q j u j
Q j3
+Q j+1 u j+1 + Q j+2 u j+2 + Q j+3 u j+3 ) + O(h 4 ),

(7)

(8)

where
P j2 = 3B d 2 (d + 1)2 ,
P j1 = 6B d 2 (d + 2)2 ,
P j = 3B (d + 1)2 (d + 2)2 ,
P j+1 = B (d 2)(d 3)(d 4)(3d 2 + 6d + 2)
B + d(d + 1)(d + 2)(3d 2 18d + 26),
P j+2 = 3(B (d 1)(d 3)(d 4)(3d 2 + 6d + 2)
B + d(d + 1)(d + 2)(3d 2 16d + 19)),
P j+3 = 3(B (d 1)(d 2)(d 4)(3d 2 + 6d + 2)
P j+4

B + d(d + 1)(d + 2)(3d 2 14d + 14)),


= (B (d 1)(d 2)(d 3)(3d 2 + 6d + 2)
B + d(d + 1)(d + 2)(3d 2 12d + 11)),

and
Q j3 = (B + d(d + 1)(d + 2)(3d 2 12d + 11)
Q j2

B (d 1)(d 2)(d 3)(3d 2 + 6d + 2)),


= 3(B + d(d + 1)(d + 3)(3d 2 12d + 11)

Q j1

B (d 1)(d 2)(d 3)(3d 2 + 8d + 3)),


= 3(B + d(d + 2)(d + 3)(3d 2 12d + 11)
B (d 1)(d 2)(d 3)(3d 2 + 10d + 6)),

123

246

Y. Wu et al.

Q j = B + (d + 1)(d + 2)(d + 3)(3d 2 12d + 11)


B (d 1)(d 2)(d 3)(3d 2 + 12d + 11),
Q j+1 = 3B + (d 2)2 (d 3)2 ,
Q j+2 = 6B + (d 1)2 (d 3)2 ,
Q j+3 = 3B + (d 1)2 (d 2)2 .
Remark 3 P j+4 = Q j3 and |P j+4 | is bounded above 0 uniformly for 0 d < 1.
2.2 Continuity of flux
Let us consider the general case where f (x) is assumed to be smooth in (, ] and
[, ).
Lemma 2 If f (x) C 2 ((, ]) C 2 ([, )), we have
h
B + u x (x j+1 ) B u x (x j1 ) = ((d 2 1) f j1 (d + 1)2 f j
2
(d 1)(d 3) f j+1 + (d 1)2 f j+2 ) + O(h 3 ),
(9)
h
B + u x (x j+2 ) B u x (x j ) = (d 2 f j1 d(d + 2) f j
2
(d 2)2 f j+1 + d(d 2) f j+2 ) + O(h 3 ). (10)
Proof For the irregular point x j , we have

B + u x (x j+1 ) B u x (x j1 ) =

x j+1


f (x)d x =

x j1

f (x)d x +
x j1

x j+1

f (x)d x


f [x j ] + f [x j , x j1 ](x x j ) d x

x j1
x j+1


f [x j+1 ]+ f [x j+1 , x j+2 ](x x j+1 ) d x + O(h 3 )

f j f j1 ( x j )2 h 2

h
2
f j+2 f j+1
+(x j+1 ) f j+1
h
( x j+1 )2
+ O(h 3 )

= ( x j1 ) f j +

123

A finite difference scheme for an interface problem

247

h
h
= (d 2 1) f j1 + (d + 1)2 f j
2
2
h
h
+ (d 1)(d 3) f j+1 (d 1)2 f j+2 + O(h 3 ).
2
2
Similarly, for x j+1 , we have
+

x j+2

B u x (x j+2 ) B u x (x j ) =


f (x)d x =

xj

x j+2

f (x)d x +
xj

f (x)d x


f [x j ] + f [x j , x j1 ](x x j ) d x

xj
x j+2


f [x j+1 ] + f [x j+1 , x j+2 ](x x j+1 ) d x + O(h 3 )

f j f j1 ( x j )2

+ (x j+2 ) f j+1
h
2
f j+2 f j+1 h 2 ( x j+1 )2
+

+ O(h 3 )
h
2
h
h
h
= d 2 f j1 + d(d + 2) f j + (d 2)2 f j+1
2
2
2
h
d(d 2) f j+2 + O(h 3 ).
2
= ( x j ) f j +

Using the approximation (3) for u(x) at x j+1 and x j+2 , and (4) for u(x) at x j1
and x j , we get
1
(11u j+1 + 18u j+2 9u j+3 + 2u j+4 ) + O(h 3 ),
6h
1
(2u j+1 3u j+2 + 6u j+3 u j+4 ) + O(h 3 ),
u x (x j+2 ) =
6h
1
(u j3 6u j2 + 3u j1 + 2u j ) + O(h 3 ),
u x (x j1 ) =
6h
1
(2u j3 + 9u j2 18u j1 + 11u j ) + O(h 3 ).
u x (x j ) =
6h
u x (x j+1 ) =

Substituting the above four equations in (9) and (10), we obtain


B+
B
(11u j+1 +18u j+2 9u j+3 + 2u j+4 )
(u j3 6u j2 + 3u j1 + 2u j )
6h
6h
h
h
h
= (d 2 1) f j1 + (d + 1)2 f j + (d 1)(d 3) f j+1
2
2
2
h
2
3
(d 1) f j+2 + O(h ),
(11)
2

123

248

Y. Wu et al.

B+
(2u j+1 3u j+2 + 6u j+3 u j+4 )
6h
B

(2u j3 +9u j2 18u j1 + 11u j )


6h
h
h
h
h
= d 2 f j1 + d(d + 2) f j + (d 2)2 f j+1 d(d 2) f j+2 + O(h 3 ).
2
2
2
2
(12)
We replace f j1 and f j+2 in the right hand sides of (11) and (12) by
u j2 2u j1 + u j
+ O(h 2 ),
h2
u j+1 2u j+2 + u j+3
= B+
+ O(h 2 ).
h2

f j1 = B
f j+2

Therefore, f j and f j+1 can be approximately expressed as linear combinations of


u i , i = j 3, . . . , j + 4. The results are

B (3d 2 12d + 10)u j3 + 3(5d 2 16d + 13)u j2

3(7d 2 20d + 14)u j1 + (9d 2 24d + 13)u j

+B + (3d 2 18d + 26)u j+1 + 3(3d 2 16d + 19)u j+2

3(3d 2 14d + 14)u j+3 + (3d 2 12d + 11)u j+4
= 6h 2 (d 2 d + 2) f j + O(h 4 ),

B (3d 2 + 6d + 2)u j3 + 3(3d 2 + 8d + 3)u j2


3(3d 2 + 10d + 6)u j1 + (3d 2 + 12d + 11)u j

+B + (9d 2 + 6d 2)u j+1 + 3(7d 2 + 6d + 1)u j+2

3(5d 2 + 6d + 2)u j+3 + (3d 2 + 6d + 1)u j+4

= 6h 2 (d 2 d + 2) f j+1 + O(h 4 ).
Substituting (7) and (8) in the above two equations, we obtain

Q j2
Qj
B Q j1
B
+ 4 , j1 = 2
5 , j = 2
+2 ,
Q j3
h
Q j3
h
Q j3

B Q j+1
B Q j+2
B Q j+3
= 2
, j+2 = 2
, j+3 = 2
,
h
Q j3
h
Q j3
h
Q j3

j2 =
j+1

B
h2

123

A finite difference scheme for an interface problem

249

and
j2 =

B+
h2

j+1 =

B+
h2

P j2
P j+4

, j1 =

P j1
Pj
B+
, j = 2
,
P j+4
h
P j+4

B + P j+2
B + P j+3
= 2
5 , j+3 = 2
+4 .
h
P j+4
h
P j+4

B+
h2

P j+1
+ 2 , j+2
P j+4

Remark 4 When is at the mid-point of the interval [a, b], i.e., =


B = 1 and B + = 2, we have

a+b
2 ,

taking

17 1
118 1
85 1
, j1 =
, j =
,
2
2
115 h
69 h
23 h 2
60 1
40 1
12 1
j+1 =
, j+2 =
, j+3 =
,
2
2
23 h
69 h
115 h 2
12 1
40 1
60 1
110 1
=
, j1 =
, j =
, j+1 =
,
2
2
2
115 h
69 h
23 h
23 h 2
196 1
22 1
j+2 =
, j+3 =
,
69 h 2
115 h 2

j2 =

j2

which will be used later in our numerical examples (see Sects. 3.1 and 3.2).
2.3 Main schemes
Finally we arrive at the following theorem.
Theorem 1 Let f satisfy the same assumption as in Lemma 1. Then, if u is the solution of (1), the following finite differences are respectively equal to (Bu x )x (x j ) and
(Bu x )x (x j+1 ) up to O(h 2 ).
j2 u j2 + j1 u j1 + j u j + j+1 u j+1 + j+2 u j+2 + j+3 u j+3 ,
j2 u j2 + j1 u j1 + j u j + j+1 u j+1 + j+2 u j+2 + j+3 u j+3 ,
where i and i (i = j 2, . . . , j + 3) are given above.
Corollary 2 The expected finite difference schemes can be obtained by replacing
u j , u j+1 with U j , U j+1 and (Bu x )x (x j ), (Bu x )x (x j+1 ) with f j , f j+1 ,
j2 U j2 + j1 U j1 + j U j + j+1 U j+1 + j+2 U j+2 + j+3 U j+3 = f j ,
j2 U j2 + j1 U j1 + j U j + j+1 U j+1 + j+2 U j+2 + j+3 U j+3 = f j+1 .
Remark 5 Naturally, for the regular grid points xi (i = j, j + 1),
B

u i+1 2u i + u i1
= (Bu x )x (xi ) + O(h 2 ).
h2

123

250

Y. Wu et al.

Remark 6 When the point falls on a single grid point, for example, on x j , x j will be
the only irregular grid point. Further, at x j a 6-point scheme will be used , and at x j+1
the scheme is reduced to the usual 3-point central difference scheme since j2 , j1
and j+3 vanish.

3 Numerical results
3.1 Two-point boundary value problem
Let us compute numerical solutions in two cases, namely the first is for f (x)
C 2 (0, 1), and the second is for f (x) C 2 ([0, 0.5]) C 2 ([0.5, 1])\C 2 ([0, 1]).
Case 1 In this case, we take f (x) = 12x 2 , u(0) = 0, and u(1) = B1+ +( B1 B1+ ) 4 .
Here f (x) C 2 (0, 1) and the natural jump conditions [u] = 0 and [Bu x ] = 0 are
satisfied across the interface . The exact solution is given by

u(x) =

x4
B
x4
B+

1
B

1
B+

x < ,
4

x > .

If we take = 1/2(= (x j + x j+1 )/2), B = 1, B + = 2, and apply Theorem 1 to


this problem, we obtain a linear system of N equations for N unknowns, which can
be written in the form
AU = F,

(13)

where U is the vector of unknowns, U = [U1 , U2 , , U N ]T ,

2 1

1 2
1

..
..
..

.
.
.

1
2
1

1
17/115
118/69
85/23
60/23
40/69
12/115
,

A= 2

12/115 40/69 60/23 110/23 196/69 22/115


h

2
4
2

.
.
.
..
..
..

2
4 2
2 4

123

A finite difference scheme for an interface problem

251

noting that the values of and were given in Remark 3 in Sect. 2.2, and

12x12

12x22

12x
3

F =
.
.
..

12x N2 1

12x N2 17/32
Computing this linear system, we get a numerical solution which is indistinguishable
from the exact solution, see Fig. 2. Table 1 shows the results of a grid refinement
analysis, where the absolute error is measured using the L and L 2 norms,
E N = max |u(xi ) Ui |,
i

1 
|u(xi ) Ui |2 .
E N L 2 =
N
i

Figure 3 depicts the double logarithmic plots of E N and E N L 2 , with N =


32, 64, 128, 256 and 512, which shows that the ratio E N / E 2N approaches 4
as N increases, indicating that our scheme is of second-order.
0.5

0.4

u(x)

0.3

0.2

0.1

0
0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Fig. 2 Comparison of the computed solution (circles) and exact solution (solid line)
Table 1 Grid refinement analysis with = 1/2, B = 1 and B + = 2
N

32

64

128

256

512

E N
E N L 2

1.514 104
1.117 104

4.007 105
2.926 105

1.030 105
7.487 106

2.612 106
1.894 106

6.576 107
4.762 107

123

252

Y. Wu et al.
0.001

0.001

(a)

(b)
0.0001

Error(L2)

Error(Max)

0.0001

1e-005

1e-006

1e-007
10

1e-005

1e-006

100

1000

1e-007
10

Grid points

100

1000

Grid points

Fig. 3 Double logarithmic plots of (a) E N and (b) E N L 2 . The four lines correspond to B + =
1, 2, 16 and 128 from top to bottom

Figure 4 gives the solutions to the test problem for increasing values of B + , B + =
1, 2, 16 and 128. It goes without saying that the usual 3-point central difference scheme
does not work in the case B + = B . Moreover, we have seen that even in the case
B + = B = 1, our scheme gives a better numerical solution than the 3-point central
difference scheme. We observe that for a particular number of grid points N , when
B + /B increases, the relative error which is measured using the L and L 2 norms
maxi |u(xi ) Ui |
,
maxi |u(xi )|

2
i |u(x i ) Ui |

=
,
2
i |u(x i )|

R N =
R N L 2

also increases, see Table 2. Hence, increasing the size of the jump gives rise to larger
errors. However, let us note that this increase is not significant and the errors are of the
same order of magnitude. We now test our scheme for moved from the mid-point of
the interval [x j , x j+1 ] towards x j . Four points are considered, = (x j +x j+1 )/2, =
(3x j + x j+1 )/4, = (7x j + x j+1 )/8 and x j . Note that when falls on x j , then x j is
the only irregular grid point and our scheme gives a 6-point scheme for x j while it is
reduced to the usual 3-point central difference scheme at x j+1 , which is natural since
x j+1 become a regular grid point. Table 3 shows the errors measured by the L and
L 2 norms with N = 32, where it is observed that as is moved within the interval,
the error values are almost the same. Although note that the error is at its minimum
at the center of the interval. Figure 5 shows the results of a grid refinement analysis
of the IIM and our scheme, with = 1/2, B = 1 and B + = 2. We observe that the
errors of our scheme are slightly larger than that of the IIM, however they are of the
same order of magnitude.
Case 2 Let us examine a model problem with discontinuous f . We consider

f (x) =

123

x 0.5,
x < 0.5,
1 + 4(x 0.5), x > 0.5,

A finite difference scheme for an interface problem

253

0.9
0.8
0.7

u(x)

0.6
0.5
0.4
0.3
0.2
0.1
0
0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Fig. 4 Solutions for case 1 for different values of B + . The four lines correspond to B + = 1, 2, 16 and 128

Table 2 Relative errors measured by the L and L 2 norms when B + = 1, 2, 16 and 128 with = 1/2
and N = 32
B+

16

128

R N
R N L 2

2.441 104
5.140 104

3.199 104
6.313 104

6.181 104
6.686 104

8.500 104
6.421 104

Table 3 Errors measured by the L and L 2 norms when is moved from (x j + x j+1 )/2 to x j with
N = 32

xj

(7x j + x j+1 )/8

(3x j + x j+1 )/4

(x j + x j+1 )/2

E N
E N L 2

1.752 104
1.278 104

1.645 104
1.207 104

1.570 104
1.157 104

1.514 104
1.117 104

0.001

0.001

(a)

0.0001

Error(L2)

Error(Max)

0.0001

1e-005

1e-006

1e-007
10

(b)

1e-005

1e-006

100

Grid points

1000

1e-007
10

100

1000

Grid points

Fig. 5 Double logarithmic plots of (a) E N and (b) E N L 2 . Upper ones are the errors of our scheme,
and lower ones are the errors of the IIM

123

254

Y. Wu et al.

with u(0) = 0 and u(1) = 1. Here f (x) C 2 ([0, 0.5]) C 2 ([0.5, 1])\C 2 ([0, 1]) and
the natural jump conditions [u] = 0 and [Bu x ] = 0 are satisfied across the interface
= 0.5. Taking B = 1, and B + = 2, the exact solution is
1
u(x) =

3
6x
1 3
3x

41 x 2 +
41 x 2 +

31
24 x
7
12 x

x < 0.5,
+

1
3

x > 0.5.

Applying Theorem 1 to this problem, we obtain a linear system (see (13)) with the
same A and U , but with a different F given by

x1 0.5
..
.

0.5
x
j

0.5)
1
+
4(x
F =
j+1

.
..

1 + 4(x N 1 0.5)
1 + 4(x N 0.5) 1
As before, we get the numerical solution which is indistinguishable from the exact
solution, see Fig. 6. The results of a grid refinement analysis of our scheme are given
in Table 4. Figure 7 shows the double logarithmic plots of E N and E N L 2 ,
for N = 32, 64, 128, 256 and 512. Although E N / E 2N of our scheme does
not approach 4, the errors for all grid sizes are very small. Hence it is seen that our
scheme is able to give an accurate solution to this problem without any correction
terms. For comparison, note that the IIM requires two correction terms, C j and C j+1
in [5] p. 28.
1

0.8

u(x)

0.6

0.4

0.2

0
0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Fig. 6 Comparison of the computed solution (circles) and exact solution (solid line)

123

A finite difference scheme for an interface problem

255

Table 4 Grid refinement analysis of our scheme with = 1/2, B = 1 and B + = 2


32

64

128

256

512

E N
E N L 2

3.442 1015
2.242 1015

5.218 1015
2.730 1015

5.773 1015
2.592 1015

4.130 1014
2.221 1014

3.220 1014
1.720 1014

0.0001
1e-005
1e-006
1e-007
1e-008
1e-009
1e-010
1e-011
1e-012
1e-013
1e-014
1e-015

(a)
Error(L2)

Error(Max)

10

100

1000

1e-005
1e-006
1e-007
1e-008
1e-009
1e-010
1e-011
1e-012
1e-013
1e-014
1e-015

(b)

10

100

Grid points

1000

Grid points

Fig. 7 Double logarithmic plots of (a) E N and (b) E N L 2 . Upper ones are the errors of the IIM,
and lower ones are the errors of our scheme

3.2 Heat equation


We now apply Theorem 1 to the following heat equation:

u t (x, t) = (Bu x )x (x, t), 0 < x < 1, t > 0,

B=

B x <
,
B+ x >

(14)

with the initial condition


u(x, 0) = sin( x).
Again we take = 1/2 for this example. The analytic solution can be theoretically
obtained by means of the Green function method which is explained as follows (see
[2] for further details). Letting y [0, 1], y = , we compute the Green function
G(x, y, ) for the boundary problem, where G satisfies

(BG x )x = G x = y, C\R

G(0, y, ) = G(1, y, ) = 0
B G x ( 21 0, y, ) = B + G x ( 21 + 0, y, )

G( 21 0, y, ) = G( 21 + 0, y, )

B G (y 0, y, ) B + G (y + 0, y, ) = 1
x
x

123

256

Y. Wu et al.

Following the method in [2, pp. 368370],



G

1
, y,
2





y
y
1 e B+
e B e B
1



= 

,


+
B + B
1 e B B + + B + B e B + e B
+

21

B + B

which yields the heat kernel Pt



Pt

1
,y
2

2,


y
gt
=

B+ + B
B






1
1
1
1
1
2 +y
2 y
2 +y
+
+
gt
gt
+ gt
B
B
B+
B
B+




3
3
1
1
2 y
2 +y
+
+
+gt
gt

B
B
B
B+




3
3
2
2
2 y
2 +y
+
+
gt
+ gt
B
B+
B
B+
 




3
3
B+ B
2 y
2 +y
+
gt
gt

B+ + B
B
B




3
3
1
1
2 y
2 +y
+
+
gt
+ gt
B
B+
B
B+




1
1
1
1
2 y
2 +y
+
+
gt
+ gt
B
B+
B
B+





1
1
2
2
2 y
2 +y
+
+
+gt
+ gt
+ ,
B
B+
B
B+

where gt ( ) =

1 e 4t
4 t


y represented asymptotically by


1
2

. The solution to (14) is given by


1
u(x, t) =

1
Pt ( , y) sin ydy.
2

Unfortunately, the computation of the asymptotic expansion of Pt is not practical,


which is the reason why a numerical technique is used, as follows.

123

A finite difference scheme for an interface problem

257

For the time discretization the CrankNicolson formula is used. Applying this
formula to the regular grid points xi (i = j, j + 1), we obtain
Uin+1 Uin
B
n
n
2Uin + Ui+1
)
= 2 (Ui1

2h
B
n+1
n+1
+ 2 (Ui1
2Uin+1 + Ui+1
), 2 i N 2,
2h
and for the irregular grid points x j and x j+1 , taking B = 1 and B + = 2, we obtain
U n+1
U nj
j


17 n
1
118 n
85
= 2
U
U
+
Un
2h
115 j2
69 j1 23 j

60 n
40 n
12 n
+ U j+1 U j+2 +
U
23
69
115 j+3

17 n+1 118 n+1 85 n+1 60 n+1
1
U
U
+ 2
+
U j + U j+1
2h
115 j2
69 j1
23
23

40
12 n+1
,
U
U n+1
+
69 j+2
115 j+3

and
n
U n+1
j+1 U j+1


12 n
1
40
60
110 n
U
U
Un + Un
2h 2 115 j2 69 j1 23 j
23 j+1

196 n
22 n
U j+2
U j+3
+
69
115

12 n+1 40 n+1 60 n+1 110 n+1
1
U
U
+ 2
U j1 + U j
2h
115 j2
69
23
23 j+1

196 n+1
22 n+1
U j+2
U j+3 .
+
69
115

We then have the linear system AU n+1 = F, where

1 + 21

1 + 1

2
2

..
..
..

.
.
.

1
1

1+
2
2

1
17
1
118
1
85
1
60
40
1
12
1

1
2 115
2 69
2 23
2 23
2 69
2 115
,
A= 2

1
1
12
40
1
60
1
110
1
196
22
1
h

2 115 2 69
2 23 1 + 2 23 2 69 2 115

1
+
2

.
.
.
.
.
.

.
.
.

1 + 2

1 + 2

123

258

Y. Wu et al.

U1n+1

.
.
.

n+1
U j1

n+1
Uj

U n+1 =
U n+1 ,
j+1

n+1
U

j+2

..
.

n+1
U N 1

(1 )U1n + 21 U2n

(1 )U nj1 + 21 (U nj2 + U nj )





1
85
1
17
118
60
40
12
n
n
n
n
n
n
1

+
U
+
U
+
U

U
+
U
U

2 23
2
69 j1
23 j+1
69 j+2
j

115 j2
115 j+3
F = 
,




12 U n
22 U n
1 21 23 U nj + 21 115

40
U nj1 + 60
U nj+1 + 196
U nj+2 115
69
23
69
j2
j+3

(1 2)U nj+2 + (U nj+1 + U nj+3 )

..

n
n
U N
2 + (1 2)U N 1

and here = / h 2 . By solving the above linear system with N = 80 and = 1/600,
we obtain the solution, shown in Fig. 8. We observe that the solution diffuses in time
and that there are bumps in the solution near the interface.

3.3 Two dimensional model


Here we apply our scheme to solve the following two-dimensional elliptic interface
problem
(Bu x )x (x, y) + (Bu y ) y (x, y) = f (x, y), (x, y)
=
+
,

B (x, y)
,
B=
B + (x, y)
+ ,

(15)

with Dirichlet boundary conditions on


, see Fig. 9. We use a uniform Cartesin
grid consisting of grid points (xi , y j ) where xi = i x and y j = j y, with
=
[0, 1] [0, 1] and
= [0, 0.5) [0, 1], giving
+ = (0.5, 1] [0, 1]. A section
of such a grid is shown in Fig. 10.

123

A finite difference scheme for an interface problem

259

0.8

u(x,t)

0.6

0.4

0.2

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Fig. 8 Solution for the heat equation. The eight lines correspond to t = 0, 0.01, 0.02, 0.03, 0.05, 0.10, 0.15
and 0.20 from top to bottom

Fig. 9 The region


is divided
into
and
+ by the
interface

Let Ui j represent the approximation to u(xi , y j ). For simplicity of notation we consider the special case where x = y h. Then, for regular grid points, it suffices
to use the 5-point stencil shown in Fig. 10.
B
(Ui1, j + Ui+1, j + Ui, j1 + Ui, j+1 4Ui j ) = f i j .
h2
Again we take B = 1 and B + = 2 for this example. If the stencil crosses the
interface , we consider it to be an irregular case, see Fig. 11.

123

260

Y. Wu et al.

Fig. 10 The 5-point stencil for


the Laplacian about the grid
point (xi , y j )

Fig. 11 Two types of irregular


grid points in the xdirection
indicated by cross mark and
filled circle

By applying our difference scheme to this interface problem, we get the following
difference equations for the irregular grid points. For the left side of the interface
( in Fig. 11)

1
h2

17
118
85
60
40
12

Ui2, j +
Ui1, j Ui j + Ui+1, j Ui+2, j +
Ui+3, j
115
69
23
23
69
115
1
+ 2 (Ui, j1 2Ui j + Ui, j+1 ) = f i j ,
h

123

A finite difference scheme for an interface problem

261
"no interface"
"with interface"

u(x,y)

0
-0.1
-0.2
-0.3
-0.4
-0.5
-0.6
-0.7

0.1 0.2
0.3 0.4
0.5 0.6
x
0.7 0.8
0.9

1 0

0.9
0.8
0.7
0.6
0.5
y
0.4
0.3
0.2
0.1

Fig. 12 Comparison of the solutions for the Poisson equation without an interface (lower solution) and
with an interface (upper solution)

and for the right side of the interface ( in Fig. 11)


1
h2

12
40
60
110
196
22
Ui3, j Ui2, j + Ui1, j
Ui j +
Ui+1, j
Ui+2, j
115
69
23
23
69
115
2
+ 2 (Ui, j1 2Ui j + Ui, j+1 ) = f i j .
h

Let f (x, y) = 8(x 2 + y 2 ) + 4 and u(0, x) = u(0, y) = u(1, x) = u(1, y) = 0,


computing the resulting linear system gives the results shown in Fig. 12, where a
32 32 grid was used. We observe that the profile of the solution to the non-interface
problem is slightly above the solution to the interface problem, which results from
B+ = 2 > 1 = B.
The numerical schemes presented here were implemented in the C++ programming
language.
4 Conclusion
Instead of Taylor expansion, Newton polynomial and continuity of flux were
used, where second-order accuracy at the interface is ensured. The result of a
one-dimensional boundary value test problem supports the stated second-order accuracy of the scheme. It was also shown that the scheme is robust against moving the
interface within the interval between the two irregular grid points, as well as for the
size of the jump. The scheme was then used to solve a time-dependent heat equation
problem and a restricted form of a two-dimensional elliptic equation. The resulting

123

262

Y. Wu et al.

numerical method is then a flexible and an easy-to-follow scheme that does not rely
on Taylor expansions at the interface, providing second order accuracy.
Acknowledgments We thank Professor Kazufumi Ito for stimulating discussions and for pointing us
some early references.

References
1. Davis, P.J.: Interpolation and Approximation. Dover Publications, Mineola (1975)
2. Gaveau, B., Okada, M., Okada, T.: Explicit heat kernels on graphs and spectral analysis. Several complex
variables (Stockholm, 1987/1988). In: Mathematical Notes, vol. 38, pp. 364388. Princeton University
Press, Princeton (1993)
3. LeVeque, R.J.: Finite difference methods for ordinary and partial differential equations: steady-state
and time-dependent problems. SIAM (2007)
4. LeVeque, R.J., Li, Z.: The immersed interface method for elliptic equations with discontinuous coefficients and singular sources. SIAM J. Numer. Anal. 31(4), 10191044 (1994)
5. Li, Z., Ito, K.: The immersed interface methodnumerical solutions of PDEs involving interface and
irregular domains. In: SIAM Frontiers in Applied Mathematics (2006)

123

Das könnte Ihnen auch gefallen