A Finite Difference Scheme for a Inteface Problem

24
Japan J. Indust. Appl. Math. (2010) 27:239–262 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 solu- tions to the differential equations are typically nonsmooth, or even discontinuous. As a result, for interface problems many standard numerical methods based on the assump- tion 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: [email protected] S. Truscott e-mail: [email protected] M. Okada e-mail: [email protected] 123

description

edp

Transcript of A Finite Difference Scheme for a Inteface Problem

  • Japan J. Indust. Appl. Math. (2010) 27:239262DOI 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 withpiecewise constant coefficients. We use the Newton polynomial and continuity of fluxto obtain finite difference scheme of second-order accuracy at the interface. We giveseveral examples which show that the numerical solutions have O(h2) accuracy.

    Keywords FDM Newton polynomial Interface problem

    1 Introduction

    Interface problems [5] arise from many applied fields including, for example, the studyof two different materials, such as iron and copper, and the same material at differentstates, such as water and ice. When ordinary or partial differential equations are usedto model these applications, the parameters in the governing differential equations aretypically discontinuous across the interface. Because of these irregularities, the solu-tions to the differential equations are typically nonsmooth, or even discontinuous. As aresult, for interface problems many standard numerical methods based on the assump-tion of smoothness of solutions work poorly or not at all [4]. The goal of our presentedresearch is to deal with interface problems and obtain high-order accuracy throughoutthe entire domain. In this paper, we start with the following one-dimensional boundary

    Y. Wu (B) S. Truscott M. OkadaDepartment of Mathematics and Information Sciences,Tokyo Metropolitan University, Tokyo 192-0397, Japane-mail: [email protected]

    S. Truscotte-mail: [email protected]

    M. Okadae-mail: [email protected]

    123

  • 240 Y. Wu et al.

    value problem

    {(Bux )x (x) = f (x), a < x < b,u(a) = C1, u(b) = C2, (1)

    where the function B(x) is piecewise constant with a discontinuity at x = (a < < b). Reformulating the problem using junction conditions, we obtain

    (Bux )x (x) = f (x) x (a, ) (, b)[u]x= = u+ u = 0[Bux ]x= = B+u+x Bux = 0u(a) = C1, u(b) = C2.

    (2)

    Remark 1 If f (x) C2((a, ])C2([, b)), even if f (x) is discontinuous at , thenu(x) C4((a, ]) C4([, b)) and u(x) is Lipschitz continuous.

    After generating a Cartesian grid, say xi = ih, i =0, 1, . . . , N , where h = (ba)/(N + 1), the point will fall on a single grid point or between two grid points, thatis, x j < x j+1. The grid points x j and x j+1 (see Fig. 1) are called irregular gridpoints. All other grid points are called regular grid points, where the standard 3-pointcentral finite difference stencil

    1h2

    (Bi+ 12 (Ui+1 Ui ) Bi 12 (Ui Ui1)) = fi

    is used here, noting that Bi+ 12 = B(xi+ 12 ) and fi = f (xi ). The problem is thento find suitable difference equations for the irregular grid points, x j and x j+1. Theexpected second order finite difference equations are determined from the method ofundetermined coefficients,

    j2U j2 + j1U j1 + jU j + j+1U j+1 + j+2U j+2 + j+3U j+3 = f j , j2U j2 + j1U j1 + jU j + j+1U j+1 + j+2U j+2 + j+3U 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 ut (x, t).

    Fig. 1 A one-dimensional gridwith the interface betweengrid 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 intro-duce Newtons interpolation (extrapolation), see for example [1]. For a given smoothfunction v(), Newtons interpolation is defined by:

    p() = a0 +n1i=1

    ai

    i1j=0

    ( j ),

    where a0 = v[0] := v(0), ai = v[0, 1, . . . , i ] (i = 1, . . . , n 1) and the divideddifferences for v are given by

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

    v[i ] := v(i ) (i = 1, 2, . . . , n 1).

    Applying the above formula with n = 4 to v(), for , with 0, 1, 2 and 3replaced 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+1) + v( j+2) v( j+1)h ( j+1)

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

    ( j+1)( j+2)

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

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

    = v( j+1)(

    1 j+1h

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

    ( j+1)( j+2)( j+3)6h3

    )

    + v( j+2)(

    j+1h

    ( j+1)( j+2)h2

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

    )

    + v( j+3)(

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

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

    )

    + v( j+4)(

    ( j+1)( j+2)( j+3)6h3

    ),

    123

  • 242 Y. Wu et al.

    where the superscript + in p+() indicates an expansion on the right hand side, thatis, . This gives a higher order approximation of v(). Similarly, for , weobtain

    p() = v( j ) + v[ j , j1]( j ) + v[ j , j1, j2]( j )( j1)+ v[ j , j1, j2, j3]( j )( j1)( j2)

    = v( j ) + v( j ) v( j1)h ( j )

    + v( j ) 2v( j1) + v( j2)2h2

    ( j )( j1)

    + v( j ) 3v( j1) + 3v( j2) v( j3)6h3

    ( j )( j1)( j2)

    = v( j )(

    1+ jh

    + ( j )( j1)2h2

    + ( j )( j1)( j2)6h3

    )

    + v( j1)( j

    h ( j )( j1)

    h2 ( j )( j1)( j2)

    2h3

    )

    + v( j2)(

    ( j )( j1)2h2

    + ( j )( j1)( j2)2h3

    )

    + v( j3)( ( j )( j1)( j2)

    6h3

    ),

    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

    p+ () =1h

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

    )+ 1

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

    )(2 j+1 j+2)

    + 16h3

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

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

    ), (3)

    p () =1h

    (v( j ) v( j1)

    )+ 1

    2h2(v( j ) 2v( j1) + v( j2)

    )(2 j j1)

    + 16h3

    (v( j ) 3v( j1) + 3v( j2) v( j3)

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

    ), (4)

    123

  • A finite difference scheme for an interface problem 243

    and hence obtain higher order approximations of v (), thanks to the following basicresult 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 interpola-tion of v(). If v() C4(a, b), then there exists an such that

    v() p() = v(4)()

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

    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 C4((, ]) C4([,)), then for = + O(h), we havev() p() = O(h4), where p() = p+() for > , p() = p() for < .

    Similarly, Lemma 1 yields the following estimate for the derivative of v p inview of the Rolles theorem.

    Proposition 2 If v C4((, ]) C4([,)), then for = + O(h), we havev () p () = O(h3), where p () = p+ () for > , p () = p () for < .

    Let us define

    d := x jh

    .

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

    (i)

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

    1 x j+1h

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

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

    )

    + u(x j+2)(

    x j+1h

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

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

    )

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

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

    2h3

    )

    + u(x j+4)(

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

    )+ O(h4)

    = 16(d 2)(d 3)(d 4)u(x j+1) + 12 (d1)(d3)(d4)u(x j+2)

    123

  • 244 Y. Wu et al.

    12(d 1)(d 2)(d 4)u(x j+3)

    + 16(d 1)(d 2)(d 3)u(x j+4) + O(h4),

    (ii)

    u() = u(x j )(

    1 + x jh

    + ( x j )( x j1)2h2

    + ( x j )( x j1)( x j2)6h3

    )

    + u(x j1)( x j

    h ( x j )( x j1)

    h2

    ( x j )( x j1)( x j2)2h3

    )

    + u(x j2)(

    ( x j )( x j1)2h2

    + ( x j )( x j1)( x j2)2h3

    )

    +u(x j3)( ( x j )( x j1)( x j2)

    6h3

    )+ O(h4)

    = 16(d + 1)(d + 2)(d + 3)u(x j ) 12 d(d + 2)(d + 3)u(x j1)

    + 12

    d(d + 1)(d + 3)u(x j2) 16d(d + 1)(d + 2)u(x j3) + O(h4),

    (iii)

    ux (+) = 1

    6h(3d2 18d + 26)u(x j+1) + 12h (3d

    2 16d + 19)u(x j+2)

    12h

    (3d2 14d + 14)u(x j+3)

    + 16h

    (3d2 12d + 11)u(x j+4) + O(h3),

    (iv)

    ux () = 1

    6h(3d2 + 12d + 11)u(x j ) 12h (3d

    2 12d + 11)u(x j1)

    + 12h

    (3d2+8d+3)u(x j2) 16h (3d2 + 6d + 2)u(x j3) + O(h3).

    Substituting u(+), u(), ux (+) and ux () 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 j23d(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+23(d 1)(d 2)(d 4)u j+3 + (d 1)(d 2)(d 3)u j+4 + O(h4), (5)B(3d2 + 6d + 2)u j3 + 3B(3d2 + 8d + 3)u j23B(3d2 + 10d + 6)u j1 + B(3d2 + 12d + 11)u j

    = B+(3d2 18d + 26)u j+1 + 3B+(3d2 16d + 19)u j+23B+(3d2 14d + 14)u j+3 + B+(3d2 12d + 11)u j+4 + O(h4). (6)

    From (5) and (6), we have

    u j+4 = 1Pj+4 (Pj2u j2 + Pj1u j1 + Pj u j+Pj+1u j+1 + Pj+2u j+2 + Pj+3u j+3) + O(h4), (7)

    u j3 = 1Q j3 (Q j2u j2 + Q j1u j1 + Q j u j+Q j+1u j+1 + Q j+2u j+2 + Q j+3u j+3) + O(h4), (8)

    where

    Pj2 = 3Bd2(d + 1)2,Pj1 = 6Bd2(d + 2)2,

    Pj = 3B(d + 1)2(d + 2)2,Pj+1 = B(d 2)(d 3)(d 4)(3d2 + 6d + 2)

    B+d(d + 1)(d + 2)(3d2 18d + 26),Pj+2 = 3(B(d 1)(d 3)(d 4)(3d2 + 6d + 2)

    B+d(d + 1)(d + 2)(3d2 16d + 19)),Pj+3 = 3(B(d 1)(d 2)(d 4)(3d2 + 6d + 2)

    B+d(d + 1)(d + 2)(3d2 14d + 14)),Pj+4 = (B(d 1)(d 2)(d 3)(3d2 + 6d + 2)

    B+d(d + 1)(d + 2)(3d2 12d + 11)),

    and

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

    Q j2 = 3(B+d(d + 1)(d + 3)(3d2 12d + 11)B(d 1)(d 2)(d 3)(3d2 + 8d + 3)),

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

    123

  • 246 Y. Wu et al.

    Q j = B+(d + 1)(d + 2)(d + 3)(3d2 12d + 11)B(d 1)(d 2)(d 3)(3d2 + 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 Pj+4 = Q j3 and |Pj+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) C2((, ]) C2([,)), we have

    B+ux (x j+1) Bux (x j1) = h2 ((d2 1) f j1 (d + 1)2 f j

    (d 1)(d 3) f j+1 + (d 1)2 f j+2) + O(h3),(9)

    B+ux (x j+2) Bux (x j ) = h2 (d2 f j1 d(d + 2) f j

    (d 2)2 f j+1 + d(d 2) f j+2) + O(h3). (10)

    Proof For the irregular point x j , we have

    B+ux (x j+1) Bux (x j1) =x j+1

    x j1

    f (x)dx =

    x j1

    f (x)dx +x j+1

    f (x)dx

    =

    x j1

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

    +x j+1

    ( f [x j+1]+ f [x j+1, x j+2](xx j+1)) dx+O(h3)= ( x j1) f j + f j f j1h

    ( x j )2 h22

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

    2

    2+ O(h3)

    123

  • A finite difference scheme for an interface problem 247

    = h2(d2 1) f j1 + h2 (d + 1)

    2 f j

    +h2(d 1)(d 3) f j+1 h2 (d 1)

    2 f j+2+O(h3).

    Similarly, for x j+1, we have

    B+ux (x j+2) Bux (x j ) =x j+2x j

    f (x)dx =

    x j

    f (x)dx +x j+2

    f (x)dx

    =

    x j

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

    +x j+2

    ( f [x j+1] + f [x j+1, x j+2](x x j+1)) dx + O(h3)= ( x j ) f j + f j f j1h

    ( x j )22

    + (x j+2 ) f j+1

    + f j+2 f j+1h

    h2 ( x j+1)2

    2+ O(h3)

    = h2

    d2 f j1 + h2 d(d + 2) f j +h2(d 2)2 f j+1

    h2

    d(d 2) f j+2 + O(h3).

    Using the approximation (3) for u(x) at x j+1 and x j+2, and (4) for u(x) at x j1and x j , we get

    ux (x j+1) = 16h (11u j+1 + 18u j+2 9u j+3 + 2u j+4) + O(h3),

    ux (x j+2) = 16h (2u j+1 3u j+2 + 6u j+3 u j+4) + O(h3),

    ux (x j1) = 16h (u j3 6u j2 + 3u j1 + 2u j ) + O(h3),

    ux (x j ) = 16h (2u j3 + 9u j2 18u j1 + 11u j ) + O(h3).

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

    B+

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

    6h(u j3 6u j2 + 3u j1 + 2u j )

    = h2(d2 1) f j1 + h2 (d + 1)

    2 f j + h2 (d 1)(d 3) f j+1

    h2(d 1)2 f j+2 + O(h3), (11)

    123

  • 248 Y. Wu et al.

    B+

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

    B

    6h(2u j3+9u j218u j1 + 11u j )

    = h2

    d2 f j1 + h2 d(d + 2) f j +h2(d 2)2 f j+1 h2 d(d 2) f j+2 + O(h

    3).

    (12)

    We replace f j1 and f j+2 in the right hand sides of (11) and (12) by

    f j1 = B u j2 2u j1 + u jh2 + O(h2),

    f j+2 = B+ u j+1 2u j+2 + u j+3h2 + O(h2).

    Therefore, f j and f j+1 can be approximately expressed as linear combinations ofui , i = j 3, . . . , j + 4. The results are

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

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

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

    3(3d2 14d + 14)u j+3 + (3d2 12d + 11)u j+4)

    = 6h2(d2 d + 2) f j + O(h4),B

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

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

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

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

    = 6h2(d2 d + 2) f j+1 + O(h4).

    Substituting (7) and (8) in the above two equations, we obtain

    j2 = B

    h2

    ( Q j2Q j3

    + 4)

    , j1 = B

    h2

    ( Q j1Q j3

    5)

    , j = B

    h2

    ( Q jQ j3

    + 2)

    ,

    j+1 = B

    h2

    ( Q j+1Q j3

    ), j+2 = B

    h2

    ( Q j+2Q j3

    ), j+3 = B

    h2

    ( Q j+3Q j3

    ),

    123

  • A finite difference scheme for an interface problem 249

    and

    j2 = B+

    h2

    (Pj2Pj+4

    ), j1 = B

    +

    h2

    (Pj1Pj+4

    ), j = B

    +

    h2

    (Pj

    Pj+4

    ),

    j+1 = B+

    h2

    (Pj+1Pj+4

    + 2)

    , j+2 = B+

    h2

    (Pj+2Pj+4

    5)

    , j+3 = B+

    h2

    (Pj+3Pj+4

    + 4)

    .

    Remark 4 When is at the mid-point of the interval [a, b], i.e., = a+b2 , takingB = 1 and B+ = 2, we have

    j2 = 171151h2

    , j1 = 118691h2

    , j = 85231h2

    ,

    j+1 = 60231h2

    , j+2 = 40691h2

    , j+3 = 121151h2

    ,

    j2 = 121151h2

    , j1 = 40691h2

    , j = 60231h2

    , j+1 = 110231h2

    ,

    j+2 = 196691h2

    , j+3 = 221151h2

    ,

    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 solu-tion of (1), the following finite differences are respectively equal to (Bux )x (x j ) and(Bux )x (x j+1) up to O(h2).

    j2u j2 + j1u j1 + j u j + j+1u j+1 + j+2u j+2 + j+3u j+3, j2u j2 + j1u j1 + j u j + j+1u j+1 + j+2u j+2 + j+3u 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 replacingu j , u j+1 with U j ,U j+1 and (Bux )x (x j ), (Bux )x (x j+1) with f j , f j+1,

    j2U j2 + j1U j1 + jU j + j+1U j+1 + j+2U j+2 + j+3U j+3 = f j , j2U j2 + j1U j1 + jU j + j+1U j+1 + j+2U j+2 + j+3U j+3 = f j+1.

    Remark 5 Naturally, for the regular grid points xi (i = j, j + 1),

    Bui+1 2ui + ui1

    h2= (Bux )x (xi ) + O(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 bethe only irregular grid point. Further, at x j a 6-point scheme will be used , and at x j+1the scheme is reduced to the usual 3-point central difference scheme since j2, j1and 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) C2(0, 1), and the second is for f (x) C2([0, 0.5]) C2([0.5, 1])\C2([0, 1]).

    Case 1 In this case, we take f (x) = 12x2, u(0) = 0, and u(1) = 1B+ +( 1B 1B+ )4.Here f (x) C2(0, 1) and the natural jump conditions [u] = 0 and [Bux ] = 0 aresatisfied across the interface . The exact solution is given by

    u(x) ={

    x4

    B x < ,x4

    B+ +( 1

    B 1B+)4 x > .

    If we take = 1/2(= (x j + x j+1)/2), B = 1, B+ = 2, and apply Theorem 1 tothis problem, we obtain a linear system of N equations for N unknowns, which canbe written in the form

    AU = F, (13)

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

    A = 1h2

    2 11 2 1

    . . .. . .

    . . .

    1 2 117/115 118/69 85/23 60/23 40/69 12/11512/115 40/69 60/23 110/23 196/69 22/115

    2 4 2. . .

    . . .. . .

    2 4 22 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

    F =

    12x2112x2212x23

    ...

    12x2N112x2N 17/32

    .

    Computing this linear system, we get a numerical solution which is indistinguishablefrom the exact solution, see Fig. 2. Table 1 shows the results of a grid refinementanalysis, where the absolute error is measured using the L and L2 norms,

    EN = maxi

    |u(xi ) Ui |,

    EN L2 =

    1N

    i

    |u(xi ) Ui |2.

    Figure 3 depicts the double logarithmic plots of EN and EN L2 , with N =32, 64, 128, 256 and 512, which shows that the ratio EN /E2N approaches 4as N increases, indicating that our scheme is of second-order.

    0

    0.1

    0.2

    0.3

    0.4

    0.5

    0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

    u(x)

    x

    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+ = 2N 32 64 128 256 512

    EN 1.514 104 4.007 105 1.030 105 2.612 106 6.576 107EN L2 1.117 104 2.926 105 7.487 106 1.894 106 4.762 107

    123

  • 252 Y. Wu et al.

    1e-007

    1e-006

    1e-005

    0.0001

    0.001

    10 100 1000

    Erro

    r(Max

    )

    Grid points

    (a)

    1e-007

    1e-006

    1e-005

    0.0001

    0.001

    10 100 1000

    Erro

    r(L2)

    Grid points

    (b)

    Fig. 3 Double logarithmic plots of (a) EN and (b) EN L2 . 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 schemedoes not work in the case B+ = B. Moreover, we have seen that even in the caseB+ = B = 1, our scheme gives a better numerical solution than the 3-point centraldifference scheme. We observe that for a particular number of grid points N , whenB+/B increases, the relative error which is measured using the L and L2 norms

    RN = maxi |u(xi ) Ui |maxi |u(xi )| ,

    RN L2 =

    i |u(xi ) Ui |2i |u(xi )|2

    ,

    also increases, see Table 2. Hence, increasing the size of the jump gives rise to largererrors. However, let us note that this increase is not significant and the errors are of thesame order of magnitude. We now test our scheme for moved from the mid-point ofthe 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 isthe only irregular grid point and our scheme gives a 6-point scheme for x j while it isreduced to the usual 3-point central difference scheme at x j+1, which is natural sincex j+1 become a regular grid point. Table 3 shows the errors measured by the L andL2 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 minimumat the center of the interval. Figure 5 shows the results of a grid refinement analysisof the IIM and our scheme, with = 1/2, B = 1 and B+ = 2. We observe that theerrors of our scheme are slightly larger than that of the IIM, however they are of thesame order of magnitude.

    Case 2 Let us examine a model problem with discontinuous f . We consider

    f (x) ={

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

    123

  • A finite difference scheme for an interface problem 253

    0

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

    u(x)

    x

    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 L2 norms when B+ = 1, 2, 16 and 128 with = 1/2and N = 32B+ 1 2 16 128

    RN 2.441 104 3.199 104 6.181 104 8.500 104RN L2 5.140 104 6.313 104 6.686 104 6.421 104

    Table 3 Errors measured by the L and L2 norms when is moved from (x j + x j+1)/2 to x j withN = 32 x j (7x j + x j+1)/8 (3x j + x j+1)/4 (x j + x j+1)/2

    EN 1.752 104 1.645 104 1.570 104 1.514 104EN L2 1.278 104 1.207 104 1.157 104 1.117 104

    1e-007

    1e-006

    1e-005

    0.0001

    0.001

    10 100 1000

    Erro

    r(Max

    )

    Grid points

    (a)

    1e-007

    1e-006

    1e-005

    0.0001

    0.001

    10 100 1000

    Erro

    r(L2)

    Grid points

    (b)

    Fig. 5 Double logarithmic plots of (a) EN and (b) EN L2 . 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) C2([0, 0.5])C2([0.5, 1])\C2([0, 1]) andthe natural jump conditions [u] = 0 and [Bux ] = 0 are satisfied across the interface = 0.5. Taking B = 1, and B+ = 2, the exact solution is

    u(x) ={ 1

    6 x3 14 x2 + 3124 x x < 0.5,

    13 x

    3 14 x2 + 712 x + 13 x > 0.5.

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

    F =

    x1 0.5...

    x j 0.51 + 4(x j+1 0.5)

    ...

    1 + 4(xN1 0.5)1 + 4(xN 0.5) 1

    .

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

    0

    0.2

    0.4

    0.6

    0.8

    1

    0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

    u(x)

    x

    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+ = 2N 32 64 128 256 512

    EN 3.442 1015 5.218 1015 5.773 1015 4.130 1014 3.220 1014EN L2 2.242 1015 2.730 1015 2.592 1015 2.221 1014 1.720 1014

    1e-015 1e-014 1e-013 1e-012 1e-011 1e-010 1e-009 1e-008 1e-007 1e-006 1e-005 0.0001 (a) (b)

    10 100 1000

    Erro

    r(Max

    )

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

    10 100 1000

    Erro

    r(L2)

    Grid points

    Fig. 7 Double logarithmic plots of (a) EN and (b) EN L2 . 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:

    ut (x, t) = (Bux )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 theoreticallyobtained 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 functionG(x, y, ) for the boundary problem, where G satisfies

    (BGx )x = G x = y, C\RG(0, y, ) = G(1, y, ) = 0BGx ( 12 0, y, ) = B+Gx ( 12 + 0, y, )G( 12 0, y, ) = G( 12 + 0, y, )BGx (y 0, y, ) B+Gx (y + 0, y, ) = 1

    123

  • 256 Y. Wu et al.

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

    G(

    12, y,

    )

    = 1(B+ + B

    )

    e 12

    B(

    1 e

    B+)(

    e

    B y e

    B y)

    (1 e

    B

    B+)

    +

    B+BB++B

    (e

    B+ e

    B) ,

    which yields the heat kernel Pt( 1

    2 , y)

    represented asymptotically by

    Pt(

    12, y

    )= 2

    B+ + B[

    gt

    (12 y

    B

    )

    gt(

    12 + y

    B

    ) gt

    (12 y

    B+ 1

    B+

    )+ gt

    (12 + y

    B+ 1

    B+

    )

    +gt(

    32 y

    B+ 1

    B+

    ) gt

    (32 + y

    B+ 1

    B+

    )

    gt(

    32 y

    B+ 2

    B+

    )+ gt

    (32 + y

    B+ 2

    B+

    )

    +

    B+ BB+ + B

    (gt

    (32 y

    B

    ) gt

    (32 + y

    B

    )

    gt(

    32 y

    B+ 1

    B+

    )+ gt

    (32 + y

    B+ 1

    B+

    )

    gt(

    12 y

    B+ 1

    B+

    )+ gt

    (12 + y

    B+ 1

    B+

    )

    +gt(

    12 y

    B+ 2

    B+

    )+ gt

    (12 + y

    B+ 2

    B+

    ))+

    ],

    where gt () = 14 t e24t

    . The solution to (14) is given by

    u(x, t) =1

    0

    Pt (12, y) sin ydy.

    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 thisformula to the regular grid points xi (i = j, j + 1), we obtain

    U n+1i U ni

    = B2h2

    (U ni1 2U ni + U ni+1)

    + B2h2

    (U n+1i1 2U n+1i + U n+1i+1 ), 2 i N 2,

    and for the irregular grid points x j and x j+1, taking B = 1 and B+ = 2, we obtainU n+1j U nj

    = 1

    2h2

    ( 17

    115U nj2 +

    11869

    U nj1 8523

    U nj

    + 6023

    U nj+1 4069

    U nj+2 +12115

    U nj+3)

    + 12h2

    ( 17

    115U n+1j2 +

    11869

    U n+1j1 8523

    U n+1j +6023

    U n+1j+1

    4069

    U n+1j+2 +12115

    U n+1j+3)

    ,

    and

    U n+1j+1 U nj+1

    = 12h2

    (12115

    U nj2 4069

    U nj1 +6023

    U nj 11023

    U nj+1

    + 19669

    U nj+2 22115

    U nj+3)

    + 12h2

    (12115

    U n+1j2 4069

    U n+1j1 +6023

    U n+1j 11023

    U n+1j+1

    + 19669

    U n+1j+2 22115

    U n+1j+3)

    .

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

    A = 1h2

    1 + 12 12 1 + 12

    .. .. . .

    . . .

    12 1 + 12 12

    17115 12 11869 1 12 8523 12 6023 12 4069 12 12115

    12 12115 12 4069 12 6023 1 + 12 11023 12 19669 12 22115 1 + 2

    .. .. . .

    . . .

    1 + 2 1 + 2

    ,

    123

  • 258 Y. Wu et al.

    Un+1 =

    Un+11...

    Un+1j1Un+1jUn+1j+1Un+1j+2

    .

    .

    .

    Un+1N1

    ,

    F =

    (1 )Un1 + 12 Un2...

    (1 )Unj1 + 12 (Unj2 + Unj )(1 12 8523

    )Unj + 12

    ( 17115 Unj2 + 11869 Unj1 + 6023 Unj+1 4069 Unj+2 + 12115 Unj+3

    )(

    1 12 32)

    Unj + 12(

    12115 U

    nj2 4069 Unj1 + 6023 Unj+1 + 19669 Unj+2 22115 Unj+3

    )(1 2)Unj+2 + (Unj+1 + Unj+3)

    .

    .

    .

    UnN2 + (1 2)UnN1

    ,

    and here = /h2. 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 timeand 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 interfaceproblem

    (Bux )x (x, y) + (Buy)y(x, y) = f (x, y), (x, y) = + ,

    B ={

    B (x, y) ,B+ (x, y) +, (15)

    with Dirichlet boundary conditions on , see Fig. 9. We use a uniform Cartesingrid consisting of grid points (xi , y j ) where xi = ix and y j = jy, with =[0, 1] [0, 1] and = [0, 0.5) [0, 1], giving + = (0.5, 1] [0, 1]. A sectionof such a grid is shown in Fig. 10.

    123

  • A finite difference scheme for an interface problem 259

    0

    0.2

    0.4

    0.6

    0.8

    1

    0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

    u(x,

    t)

    x

    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.15and 0.20 from top to bottom

    Fig. 9 The region is dividedinto and + by theinterface

    Let Ui j represent the approximation to u(xi , y j ). For simplicity of notation we con-sider the special case where x = y h. Then, for regular grid points, it sufficesto use the 5-point stencil shown in Fig. 10.

    Bh2

    (Ui1, j + Ui+1, j + Ui, j1 + Ui, j+1 4Ui j ) = fi j .

    Again we take B = 1 and B+ = 2 for this example. If the stencil crosses theinterface , we consider it to be an irregular case, see Fig. 11.

    123

  • 260 Y. Wu et al.

    Fig. 10 The 5-point stencil forthe Laplacian about the gridpoint (xi , y j )

    Fig. 11 Two types of irregulargrid points in the xdirectionindicated by cross mark andfilled circle

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

    1h2

    ( 17

    115Ui2, j + 11869 Ui1, j

    8523

    Ui j + 6023Ui+1, j 4069

    Ui+2, j + 12115Ui+3, j)

    + 1h2

    (Ui, j1 2Ui j + Ui, j+1) = fi j ,

    123

  • A finite difference scheme for an interface problem 261

    0 0.1

    0.2 0.3

    0.4 0.5

    0.6 0.7

    0.8 0.9

    1 0 0.1

    0.2 0.3

    0.4 0.5

    0.6 0.7

    0.8 0.9

    1

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

    0

    u(x,y)

    "no interface""with interface"

    x

    y

    u(x,y)

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

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

    1h2

    (12115

    Ui3, j 4069Ui2, j +6023

    Ui1, j 11023 Ui j +19669

    Ui+1, j 22115Ui+2, j)

    + 2h2

    (Ui, j1 2Ui j + Ui, j+1) = fi j .

    Let f (x, y) = 8(x2 + y2) + 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 a32 32 grid was used. We observe that the profile of the solution to the non-interfaceproblem is slightly above the solution to the interface problem, which results fromB+ = 2 > 1 = B.

    The numerical schemes presented here were implemented in the C++ programminglanguage.

    4 Conclusion

    Instead of Taylor expansion, Newton polynomial and continuity of flux wereused, where second-order accuracy at the interface is ensured. The result of aone-dimensional boundary value test problem supports the stated second-order accu-racy of the scheme. It was also shown that the scheme is robust against moving theinterface within the interval between the two irregular grid points, as well as for thesize of the jump. The scheme was then used to solve a time-dependent heat equationproblem 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 relyon Taylor expansions at the interface, providing second order accuracy.

    Acknowledgments We thank Professor Kazufumi Ito for stimulating discussions and for pointing ussome 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 UniversityPress, Princeton (1993)

    3. LeVeque, R.J.: Finite difference methods for ordinary and partial differential equations: steady-stateand time-dependent problems. SIAM (2007)

    4. LeVeque, R.J., Li, Z.: The immersed interface method for elliptic equations with discontinuous coeffi-cients 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 andirregular domains. In: SIAM Frontiers in Applied Mathematics (2006)

    123

    A finite difference scheme for an interface problemAbstract1 Introduction2 Numerical schemes for irregular grid points2.1 The Newton polynomial2.2 Continuity of flux2.3 Main schemes

    3 Numerical results3.1 Two-point boundary value problem3.2 Heat equation3.3 Two dimensional model

    4 ConclusionAcknowledgmentsReferences

    /ColorImageDict > /JPEG2000ColorACSImageDict > /JPEG2000ColorImageDict > /AntiAliasGrayImages false /CropGrayImages true /GrayImageMinResolution 149 /GrayImageMinResolutionPolicy /Warning /DownsampleGrayImages true /GrayImageDownsampleType /Bicubic /GrayImageResolution 150 /GrayImageDepth -1 /GrayImageMinDownsampleDepth 2 /GrayImageDownsampleThreshold 1.50000 /EncodeGrayImages true /GrayImageFilter /DCTEncode /AutoFilterGrayImages true /GrayImageAutoFilterStrategy /JPEG /GrayACSImageDict > /GrayImageDict > /JPEG2000GrayACSImageDict > /JPEG2000GrayImageDict > /AntiAliasMonoImages false /CropMonoImages true /MonoImageMinResolution 599 /MonoImageMinResolutionPolicy /Warning /DownsampleMonoImages true /MonoImageDownsampleType /Bicubic /MonoImageResolution 600 /MonoImageDepth -1 /MonoImageDownsampleThreshold 1.50000 /EncodeMonoImages true /MonoImageFilter /CCITTFaxEncode /MonoImageDict > /AllowPSXObjects false /CheckCompliance [ /None ] /PDFX1aCheck false /PDFX3Check false /PDFXCompliantPDFOnly false /PDFXNoTrimBoxError true /PDFXTrimBoxToMediaBoxOffset [ 0.00000 0.00000 0.00000 0.00000 ] /PDFXSetBleedBoxToMediaBox true /PDFXBleedBoxToTrimBoxOffset [ 0.00000 0.00000 0.00000 0.00000 ] /PDFXOutputIntentProfile (None) /PDFXOutputConditionIdentifier () /PDFXOutputCondition () /PDFXRegistryName () /PDFXTrapped /False

    /CreateJDFFile false /Description > /Namespace [ (Adobe) (Common) (1.0) ] /OtherNamespaces [ > /FormElements false /GenerateStructure false /IncludeBookmarks false /IncludeHyperlinks false /IncludeInteractive false /IncludeLayers false /IncludeProfiles false /MultimediaHandling /UseObjectSettings /Namespace [ (Adobe) (CreativeSuite) (2.0) ] /PDFXOutputIntentProfileSelector /DocumentCMYK /PreserveEditing true /UntaggedCMYKHandling /LeaveUntagged /UntaggedRGBHandling /UseDocumentProfile /UseDocumentBleed false >> ]>> setdistillerparams> setpagedevice