Higher Order Difference Schemes for Heat Equation Jianzhong Wang

advertisement
Available at
http://pvamu.edu/aam
Appl. Appl. Math.
ISSN: 1932-9466
Applications and Applied
Mathematics:
An International Journal
(AAM)
Vol. 4, Issue 2 (December 2009), pp. 263 – 272
(Previously, Vol. 4, No. 2)
Higher Order Difference Schemes for Heat Equation
Jianzhong Wang
Department of Mathematics and Statistics
Sam Houston State University
Huntsville, TX 77341 USA
mth_jxw@shsu.edu
Received: July 10, 2009; Accepted: October 15, 2009
Abstract
In this paper, we construct the explicit difference schemes for the heat equation with arbitrary
high orders. We also show the validity of the new schemes by numerical simulations.
Keywords: Heat equation; explicit difference schemes; numerical solutions; high-order
schemes
MSC (2000) No.: 65M06 65D25 35K05
1.
Introduction
In this paper we study the construction of the explicit difference schemes for the 1 -D heat
equation
Dt u  cDx2u
(1)
where u  u ( x t ) is temperature, c  0 is the heat conductivity, Dt  t  and Dx2  x2  The
2
operator form of (1) is
Dt  cDx2 
(2)
For a temperature function u ( x t ) let Eh ( h  R ) denote the spatial translation opera
Ehu( t )  u(  h t ) We have Ekh  Ehk  k  Z  A Laurent polynomial of Eh 
263
264
Jianzhong Wang
n
aE
Ahn m 
k  m
k
kh
is called a difference scheme of order s  N if
Ahnm  x k   0 k  01  s  1
A difference scheme of order 2 approximates Dx2  Since the differential operator Dx2 is
self-conjugate, we are only interested in the symmetric difference scheme of order 2 :
n
Ahn   ak ( Ekh  E kh ) with Ahn (1)  0 and Ahn ( x )  0
(3)
k 0
For a temperature function u we define the temporal difference operator t (t  0) by
t u( x)  u( x t  )  u( x) Thus, an explicit difference scheme for the heat equation (1) is
t
c
u  2 Ahn u
t
h
Let  
ct
h2
(4)
 0 be the constant multiple of the ratio of the time-step to the square of the
space-step (TSR). Then, t  ch ( O(h2 )) A difference scheme (4) is said to have order s  N
if
2
R(u ) 
t
c
u  2 Ahnu  O(h s ) h  0
t
h
Write
 h2  Eh  E h  2 I 
(5)
where I is the identity operator. The simplest difference scheme for (1) is
t
c
u  2  h2u
t
h
(6)
which has order 2 and its stability condition is   12 [Gerald Wheatley (1999), Richtmyer
and Morton (1967)]. People are also interested in higher order difference schemes. In Qian et
al. (2000), the authors proposed the following difference scheme of order 4 

t
c
6  1 2 
u  2  h2  I 
 h  u


t
h
12


(7)
and showed that when   23 the scheme is stable. In this paper, we shall give a general formula
for the construction of difference schemes for (1) with arbitrary orders and show the validity of
AAM: Intern. J., Vol. 4, Issue 2 (December 2009) [Previously, Vol. 4, No. 2]
265
the formula by numerical simulations.
2.
Construction of Difference Schemes
We start our construction from the exponential expansion of t 

t  
n 1
t n Dtn
.
n
Applying the heat equation (2) and recalling  

t  
 n h 2 n Dx2 n
n
n 1
ct
h2
 we have

To illustrate our method, we first construct the difference schemes for (1) with order 2 and 4,
respectively. The Taylor expansion of  h2 in (5) is


 h2  2  
 n 1
h 2 n Dx2 n 

(2n) 
(8)
which yields

  n 1
t  c  2
2  2 n 1 2 n
  2   h  c 

Dx
h
(2n) 
t h 
n 1  n
 
 2 n 2( n 1)
2
n
 c 


h Dx

(2n  2) 
n 1  ( n  1)
i.e.,
t  c  2
 1 
  2   h  c    h 2 Dx4  O  h 4  
t h 
 2 12 
(9)
The formula (9) shows that the simplest scheme (6) has order 2 and it achieves order 4 when
  16 
To derive the difference scheme of order 4 we, replacing h in (8) by 2h , derive the identity

 22h  
n 1
22 n 1 h2 n Dx2 n
(2n)
and set the scheme to
266
Jianzhong Wang
t
c
 2 ( a h2  b 22h )
t
h
(10)
where a and b are two real numbers to be determined. We have

  k 1

t c
2
 2 (a h2  b 22h )  c 

(a  4k b)  h 2( k 1) Dx2 k 
t h
(2k )
k 1  k

Let
1
 a  4b 

2
a  4 b  6.
(11)
Then,

  k 1

t c
2
 2 (a h2  b 22h )  c  

(a  4k b)  h 2( k 1) Dx2 k
t h
(2k )
k 3  k

 2

1
c 
(a  64b) h4 Dx6 O h 6 
 6 360





The solution of (11) is
4
a 
3  2

1
1
b   12  2 .
Therefore, setting a  43  2 and b   121  12  we have
 2 1
t c
1 
 2 (a h2  b 22h )  c      h 4 Dx6  O  h6  
t h
90 
 6 12
i.e., the difference scheme
t
c 4
c  1 1 

 2   2   h2  2       22h
t
h 3
h  12 2 

has order 4 By  22h   h2 h2  4 h2 , we have
c 4
c  1 1 

 2   h2  2       22h
2 
h 3
h  12 2 

c 4
  1 1 
 1 1 
 2 [  2   4     ] h2       ( h2 ) 2
h 3
  12 2 
 12 2 
(12)
AAM: Intern. J., Vol. 4, Issue 2 (December 2009) [Previously, Vol. 4, No. 2]
267
c 2 
6  1 2 
I


h  

h

h 2 
12


which shows that the scheme (12) is the same as the scheme (7) obtained in Qian, et al. (2000).
To obtain the stability condition for the scheme (12), we denote E t  I   t and rewrite the
scheme (12) to the form of
2
4

 1 1 
 1 1 
E t  I     2   h2         22h  I   h2          h2  
3

 12 2 
 12 2 
(13)
Let A( ) be representation of E t in the Fourier domain. Then, by (13),
2
 1 1 
A( )  1  2  cos h  1  4       cos h  1
12
2


h
4
h

 1  4 sin 2
   8   sin 4
2
3
2

The stability condition of the scheme (12) is maxR A( )  1 which leads the stability
condition   23 
We now develop the difference scheme for (1) with an arbitrary order. Assume that the
difference scheme of order 2m has the form
t
c
 2
t
h
m
a 
j
j 1
2
jh

(14)
where the coefficient vector a  [ a1   am ]T is to be determined. Recall that
t c

t h2
m
a 
k
k 1
2
kh
 

 k 1
k 1 
k
 c  

2 m 2 k  2( k 1) 2 k
 j a j  h Dx 
(2k ) j 1

In order to obtain a scheme of order 2m the real numbers a1 am have to satisfy
m
j
2k
j 1
aj 
(2k ) k 1
  k  1 m
2k
Write
Vm 



















2m 


m2
m4
1 4
1 42
9 
92 
 
1 4m



m
9  m
(15)
268
Jianzhong Wang
T
and b  1 6   (22mm)  m 1   The matrix form of Equation (15) is
Vma  b
Since the Vandermonde matrix Vm is invertible, Equation (15) has the unique solution
a  V m b
1
(16)
which yields
t c

t h2


m
m

m

2
j 2 m  2 a j  h 2 m Dx2 m  2  O(h 2 m  2 )

(2m  2) j 1
  m  1 



 ak kh2  c 
k 1

i.e., the difference scheme (14) with a in (16) has order 2m
The scheme (14) can be rewritten to
m
E t  I    ak  kh2 
(17)
k 1
Let A( ) be representation of E t in the Fourier domain. Then,
m
A    1  2  ak 1  cos kh 
k 1
and the stability condition of the scheme (14) is maxR A( )  1 Therefore, a sufficient
condition for the stability can be obtained by ak  0 k  1 m and 1  2 k 1 ak  0
m
As examples, we use (16) to derive the difference schemes of order 6 and 8, respectively.
Example 1.
Let
3 13
5 2

 a1  2  4   2  

3

2
 a2       
20

1 1
1 2

a3  90  12   6  

AAM: Intern. J., Vol. 4, Issue 2 (December 2009) [Previously, Vol. 4, No. 2]
269
which is the solution of the linear system
a1  4a2  9a3  1
a1  42 a2  92 a3  6 
a1  43 a2  93 a3  60 2 
Then, the difference scheme
t
c
 2 ( a1 h2  a2 22h  a3 32h )
t
h
has order 6 We select  in the following range
1 1
1 1
0184 
10    
100816
2 10
2 10
so that a1 a2  a3  and [1  2 (a1  a2  a3 )] are nonnegative, that ensures the stability of the
scheme.
Example 2.
Let
8 61
29
7

a1      2   3 

5 15
6
3

 a   1  169   13  2  7  3 
 2
5 120
6
6

8
1
1
1
 a 
    2   3
3

315 5
2
3

1
7
1
1
 a4  

   2   3
560 480
24
24

which is the solution of the linear system
a1  4a2  9a3  16a4  1
a1  4 2 a2  9 2 a3  16 2 a4  6 
a1  43 a2  93 a3  163 a4  60 2 
a1  4 4 a2  9 4 a3  16 4 a4  840 3 
Then, the difference scheme
t
c
 2 ( a1 h2  a2 22h  a3 32h  a4 42h )
t
h
270
Jianzhong Wang
has order 8 . To ensure the stability of the scheme, we select  in the range [0194 0955]
3. Numerical simulations
To validate our theoretical results, we show a numerical example in this section. For
comparison, we set the same initial condition as in Qian, et al. (2000) for the heat equation (1):
u ( x 0)  sin(2k x)
and seek for the unit-periodic (with respect to x ) solution of (1). The exact solution is
2 2
u ( x t )  e4ck  t sin(2k x)
To apply our schemes to the equation, we let h  0 be the space-step and   0 be the
time-step, where h is chosen such that N  1  h is an integer. The relation of  and h is given
2
by   ch  where  is chosen from the range of the stability. Let uˆ m be the numerical
solution obtained by the difference scheme of order 2m We measure the global error of the
scheme at t  n by
Em (t ) 
1
N
N
  uˆ
m
(ih t )  u (ih t ) 
2
i 0
and show the pointwise error by the discrete function
Erm ( x t )  uˆ m( x t )  u( x t ) x  0 h 2h Nh
As pointed out in Qian, et al. (2000), the maximal global error Em (t ) is obtained at t0 
which is independent of schemes. Let n0  0  where  
t
 h2
c
1
4ck 2 2

 which yields
1


n0  round 

2 2 2 
 4 k  h 
Then, the maximal error is obtained after n0 iterations of the schemes. In our numerical
simulations, we set
k  1 c  0001   05 h  001
Then, the global maximal error is obtained after 500 iterations. The following table presents
the maximal global errors for all schemes of order 2 4 6 and 8
Order of scheme
Maximal global error
2
1.7042e-004
4
6
4.4859e-008 4.7456e-012
8
1.4156e-16
AAM: Intern. J., Vol. 4, Issue 2 (December 2009) [Previously, Vol. 4, No. 2]
271
Remark: The maximal global error of the scheme of order 8 already comes up to the
machine epsilon 2 64  22204e  16
The table shows that the numerical results match the theoretical results very well. The
following figures show the pointwise errors of difference schemes of order 2 4 and 6
respectively.
272
Jianzhong Wang
Acknowledgement
The author would like to thank the editor and, especially, the reviewers for their valuable
comments. The research is supported by NSF Grant of the United States, DMS-07-12925.
REFERENCES
Gerald, C. F. and Wheatley, P. Q. (1999). Applied Numerical Analysis, 6th ed., Addison
Wesley.
Qian, Y., Chen, H., Zhang, R., and Chen, S. (2000). A new fourth order finite difference
scheme for the heat equation. Communications in Nonlinear Science and Numerical
Simulation 5, 151–157.
Richtmyer, R. D. and Morton, K. W. (1967). Difference Methods for Initial-Value Problems,
2nd ed., Wiley, New York.
Download