You are on page 1of 3

NUMERICAL METHODS for PARTIAL

46 DIFFERENTIAL EQUATIONS

Finite-Difference Method for Poisson Equation


The following is the Poisson equation in a domain (a, b) (c, d):

2 2
46.1. 2u = f , 2 = 2 +
x y 2
Boundary condition:

46.2. u ( x , y) = g ( x , y) for x = a, b or y = c, d

Computation grid:

46.3. xi = a + ix for i = 0, 1, , n

y j = c + jy for j = 0, 1, , m

where x = (b a)/n and y = (d c)/m are grid sizes for x and y variables, respectively.

Second-order difference approximation

46.4. ( Dx2 + Dy2 )u( xi , y j ) = f ( xi , y j )

where
u( xi +1 , y j ) 2u( xi , y j ) + u( xi 1 , y j )
Dx2 u( xi , y j ) =
x 2
u( xi , y j +1 ) 2u( xi , y j ) + u( xi , y j 1 )
Dy2 u( xi , y j ) =
y 2

Computational boundary condition

46.5. u( x 0 , y j ) = g(a, y j ), u( x n , y j ) = g(b, y j ) for j = 1, 2, , m

u( xi , y0 ) = g( xi , c), u( xi , ym ) = g( xi , d ) for i = 1, 2, , n

Finite-Difference Method for Heat Equation


The following is the heat equation in a domain (a, b) (c, d ) (0, T ) :

u
46.6. = 2u
t

237
238 NUMERICAL METHODS FOR PARTIAL DIFFERENTIAL EQUATIONS

Boundary condition:

46.7. u ( x , y , t ) = g ( x , y) for x = a, b or y = c, d
Initial condition:

46.8. u( x , y, 0) = u0 ( x , y)

Computational grid:
46.9. xi = a + ix for i = 0,1, , n

y j = c + jy for j = 0,1, , m

t k = kt for k = 0,1, ,

where x = (b a)/n, y = (d c)/m, and t are grid sizes for x, y and t variables, respectively.

Computational boundary condition


46.10. u( x 0 , y j ) = g(a, y j ), u( x n , y j ) = g(b, y j ) for j = 1, 2, , m

u( xi , y0 ) = g( xi , c), u( xi , ym ) = g( xi , d ) for i = 1, 2, , n

Computational initial condition

46.11. u( xi , y j , 0) = u0 ( xi , y j ) for i = 1, 2, , n; j = 0, 1, , m

Forward Euler method with stability condition

46.12. u( xi , y j , t k +1 ) = u( xi , y j , t k ) + t ( Dx2 + Dy2 )u( xi , y j , t k )

2t 2t
46.13. + 1
x 2 y 2

Backward Euler method (unconditional stable)

46.14. u( xi , y j , t k +1 ) = u( xi , y j , t k ) + t ( Dx2 + Dy2 )u( xi , y j , t k +1 )

Crank-Nicholson method (unconditional stable)

46.15. u( xi , y j , t k +1 ) = u( xi , y j , t k ) + t ( Dx2 + Dy2 ){u( xi , y j , t k ) + u( xi , y j , t k +1 )}/2

Finite-Difference Method for Wave Equation


The following is a wave equation in a domain (a, b) (c, d ) (0, T ):

2u
46.16. = A2 2 u
t 2
where A is a constant representing the speed of the wave.
NUMERICAL METHODS FOR PARTIAL DIFFERENTIAL EQUATIONS 239

Boundary condition:

46.17. u ( x , y, t ) = g ( x , y) for x = a, b or y = c, d

Initial condition:

u
46.18. u( x , y, 0) = u0 ( x , y), u( x , y, 0) = u1 ( x , y)
t
Computational grids:

46.19. xi = a + ix for i = 0, 1, , n
y j = c + jy for j = 0, 1, , m
t k = kt for k = 1, 0, 1,

where x = (b a)/n, y = (d c)/m, and t are the grid sizes for x, y, and t variables, respectively.

A second-order finite-difference approximation

46.20. u( xi , y j , t k +1 ) = 2u( xi , y j , t k ) u( xi , y j , t k 1 ) + t 2 A2 ( Dx2 + Dy2 )u( xi , y j , t k )

Computational boundary condition

46.21. u( x 0 , y j ) = g(a, y j ), u( x n , y j ) = g(b, y j ) for j = 1, 2, , m

u( xi , y0 ) = g( xi , c), u( xi , ym ) = g( xi , d ) for i = 1, 2, , n

Computational initial condition

46.22. u( xi , y j , t0 ) = u0 ( xi , y j ) for i = 1, 2, , n; j = 0, 1, , m

u( xi , y j , t 1 ) = u0 ( xi , y j ) + t 2 u1 ( xi , y j ) for i = 1, 2, , n; j = 0, 1, , m

Stability condition

46.23. t  A min(x , x )

You might also like