You are on page 1of 4

The alternating directions implicit (ADI) method and operator splitting methods The stability condition for the

FTCS scheme applied to the 2D heat equation uj,l


(m+1)

uj,l

(m)

k (m) (m) (m) (m) (m) u + uj1,l + uj,l+1 + uj,l1 4uj,l (x)2 j+1,l

(1)

kt is s = (x)2 1 and may impose a severe restriction on the maximal time step that may be used with the 4 FTCS method. For example, with x = 0.01 and k = 0.25 the maximal time step size is t = 104 .

Implicit methods that are unconditionally stable and thus have no restrictions on the time step may provide an ecient alternative. A direct application of the two-dimensional Crank-Nicolson scheme involves a linear system with a broadly banded matrix. Q: Write the Crank-Nicolson nite dierence equations for the 2D heat equation u =k t 2u 2u + 2 x2 y (2)

We would like to have an unconditionally stable scheme that only involves linear systems with a tridiagonal matrix. In other words, we would like the implementation for the 2D problem to preserve the computational features of the 1D problem. The alternating directions implicit (ADI) method In a general formulation, we consider an ODEs system dU = (A1 + A2 )U dt U (0) = U 0

(3) (4)

where U (t) is an N-dimensional vector. The operator A1 may represent for example, the discretization in x-direction, whereas A2 may represent the discretization in y-direction. The implicit trapezoidal method applied to (3) is written U m+1 = U m + or equivalently, I so the matrix I
t 2 (A1

t (A1 + A2 )U m+1 + (A1 + A2 )U m 2

(5)

t t (A1 + A2 ) U m+1 = I + (A1 + A2 ) U m 2 2

(6)

+ A2 ) needs to be factorized (LU).

The main idea of the ADI method is to proceed in two stages, treating only one operator implicitly at each stage. First a half-step is taken implicitly in the direction A1 and explicitly in the direction A2 followed by a half-step is taken implicitly in the direction A2 and explicitly in the direction A1 . When applied to the general problem (3) the equations for the ADI method are written t A1 U m+1/2 + A2 U m 2 t = U m+1/2 + A1 U m+1/2 + A2 U m+1 2 = Um + 1

U m+1/2 U m+1

which are equivalent to I t A1 U m+1/2 2 t I A2 U m+1 2 = = t A2 U m 2 t I+ A1 U m+1/2 2 I+ (7) (8)

Q: Show that the ADI equations (7-8) are equivalent to I t A1 2 I t A2 U m+1 = 2 I+ t A1 2 I+ t A2 U m 2 (9)

Q: From (9) and (6) deduce that the ADI scheme is second order accurate in time: error of order O(t)2 .

Case study: 2D heat equation Corresponding to the space discretization of the 2D heat equation using central dierences formula, (A1 U )j,l = (A2 U )j,l = 1 [Uj1,l 2Uj,l + Uj+1,l ] (x)2 1 [Uj,l1 2Uj,l + Uj,l+1 ] (x)2

The rst stage of the ADI method, given by equation (7) is written
m+1/2

(1 + 2s)Uj,l where

sUj1,l sUj+1,l

m+1/2

m+1/2

m m m = (1 2s)Uj,l + sUj,l1 + sUj,l+1 ,

j = 1, . . . , N x; l = 1, . . . , N y (10)

s=

t 2(x)2

and N x, N y are the number of interior grid points in the x and y directions, respectively. Notice that in equations (10) only the x-index varies in the left side, that is the equatons are implicit in the x-direction only. For a xed index l, the vector U m+1/2 (:, l) may be found by solving the tridiagonal system AU m+1/2 (:, l) = b where the matrix A is tridiagonal, 1 + 2s s 0 0 0 0 0 s 1 + 2s s 0 0 0 0 0 s 1 + 2s s 0 0 0 . . . . . . . . . . . . . . . . . . . . . A= 0 0 ... ... ... 0 0 0 0 0 s 1 + 2s s 0 0 0 0 0 s 1 + 2s s 0 0 0 0 0 s 1 + 2s and b is an N x-dimensional vector with components
m m m b(j) = (1 2s)Uj,l + sUj,l1 + sUj,l+1 ,

(11)

(12)

j = 1 : Nx

Stage 1 of the ADI method is then implemented in a loop over the y-direction:

for l = 1 : N y for j = 1 : N x b(j) = (1 2s)Uj,l + sUj,l1 + sUj,l+1 end solve AU new (:, l) = b end So in this stage a tridiagonal system of dimension N x is solved N y times. By analogy, Stage 2 of the ADI method is implemented in a loop over the x-direction:

for j = 1 : N x for l = 1 : N y new new new b(l) = (1 2s)Uj,l + sUj1,l + sUj+1,l end solve AU (j, :) = b end So in this stage a tridiagonal system of dimension N y is solved N x times. Execution of Stage 1 followed by Stage 2 advances the solution with a t step in time, overwritting U . U new is an intermediate stage.

Operator Splitting Methods

Operator splitting methods take a more dramatic approach: to advance the solution in time a sequence of stages is solved, each stage involving only one operator. A rst order operator splitting scheme for the system (3) with time step t is written Stage 1: d m+1/2 U = A1 U m+1/2 dt U m+1/2 (tm ) = U m Stage 2: d m+1 U = A2 U m+1 dt U m+1 (tm ) = U m+1/2 (tm+1 )

(13) (14)

(15) (16)

Then U m+1 (tm+1 ) provides an approximation of the solution U (tm+1 ). The procedure introduces an error O(t) on top of any additional errors in the time integration. This is the operator splitting error. If the operators A1 and A2 commute A1 A2 = A2 A1 the splitting error can be shown to be O(t)2 .

with boundary conditions I


ux =0 y

u(x, 0, t) ux (0, y, t) u(x, 1, t) u(0.5, y, t) u(x, 0.5, t) ux (1, y, t)


u=1

1/2

t A1 U m+1/2 2 t I A2 U m+1 2

ut = (uxx + uyy ),

= = = = = =

u=0

0, 0, 1, y, 0.5, 0,

u=y

Mathematically, the problem is formulated as the PDE

Remark: Notice that is the implicit trapezoidal is applied to (13) and (15) then we get

Q: Show that if A1 and A2 commute A1 A2 = A2 A1 then the equations above are equivalent to (9). Deduce that in this case the operator splitting method is equivalent to the ADI method.

Application: 2D heat ow problem in an L-shaped domain D as indicated in the gure below.

u=1/2

I+

(x, y) D,

ux = 0

t>0

0 x 1, t > 0 0 < y < 1, t > 0 0 x 0.5, t > 0 0.5 y 1, t > 0 0.5 x 1, t > 0 0 < y < 0.5, t > 0
1/2 x

t A1 U m 2 t I+ A2 U m+1/2 2 (18) (17)

(19)

(20) (21) (22) (23) (24) (25)

You might also like