0% found this document useful (0 votes)
71 views

Finite Difference Representation: X y X U X X y X U X y X U y X X U

The document discusses the finite difference method for solving partial differential equations (PDEs). The key steps are to discretize the continuous domain, replace derivatives with finite difference approximations, and solve the resulting difference equations. First-order and second-order derivatives are approximated using forward, backward, and central difference formulas with truncation errors of order h and h^2 respectively. As an example, an explicit finite difference scheme is derived for the heat equation PDE.

Uploaded by

Qasim
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

Finite Difference Representation: X y X U X X y X U X y X U y X X U

The document discusses the finite difference method for solving partial differential equations (PDEs). The key steps are to discretize the continuous domain, replace derivatives with finite difference approximations, and solve the resulting difference equations. First-order and second-order derivatives are approximated using forward, backward, and central difference formulas with truncation errors of order h and h^2 respectively. As an example, an explicit finite difference scheme is derived for the heat equation PDE.

Uploaded by

Qasim
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Finite Difference Representation

The ultimate goal for the solution of a PDE over a continuous domain is to reduce it to
discrete model which are suitable for high speed computers. One of the standard approach is
using Finite Difference Methods which are applicable to all type of second order PDE.The main
steps in this approach are as follows:

1. Discretization
2. Replacing the derivatives by FD representation
3. Solving the corresponding Difference equations to get the numerical values of ‘u’ at the
discretized nodes

The first and third point will be discussed later. Let us discuss the approximation of the partial
derivatives by corresponding Finite Differences.

Let u(x, y) be the dependent variable .The Taylor’s series expansion can be written as:

u ( x, y ) ( x ) 2  2u ( x, y )
u ( x  x, y )  u ( x, y )  x   (2.1) 
x 2 x 2
Retaining terms upto first order,we have,

u u ( x  x, y )  u ( x, y )
  O(x) (2.2)
x x

u
This is called as first order forward difference approximation for
x .

u u ( x, y  y )  u ( x, y )
Similarly,   O(y )
y y

If (x,y) are represented by dummy variables i,j such that xi = i∆x and yj = j∆y.

Then (xi, yj) = ( i∆x, j∆y) = (ih, jk).Here h=∆x and k=∆y. Thus ui,j = u(xi, yj).Hence

 u  1
 
   ui 1, j  ui , j  o( h) (2.3)
 x  i , j h
This formula (2.3) has a truncation error of order h i.e. o(h).
Similarly one can use Backward Difference Formula by using the expansion of u(x-∆x, y) and
write
 u 
1

   ui , j  ui 1, j  o(h). ( 2 .4 )
 x  i , j h

For obtaining higher order formula,one can use

u (x) 3  3u
u( x  x, y)  u( x  x, y)  2x  
x 3 x 3

u u ( x  x, y )  u ( x  x, y )
  o ( x ) 2
x 2 x
 
 u 
  
1
 
ui 1, j  ui 1, j  o( h) 2 (2.5)
 x  i , j 2h

This formula is called as Central Difference Formula.

To obtain finite difference approximation for second order derivatives,we can use

 2u
u ( x  x, y )  2u ( x, y )  u ( x  x, y )  (x) 2  o(x) 4
x 2

  2u  u ( x  x, y )  2u ( x, y )  u ( x  x, y )
 2    o(x) 2
 x  x , y (x) 2

 
  2u  u  2ui , j  ui 1, j
 2   i 1, j  o( h 2 ) (2.6)
 x i , j h 2

This is the best formula for second order derivative,known as Central difference formula.
 2u  2u
,
Similarly, one can have formula for  x  y  y etc.
2

 
 

The above formulae can also be represented in the form of computational molecule as follows:

u 1 +o(h2)
                                                                                           ‐‐‐ 
‐ 0 1
x 2h  
u i‐1, j  u i, j  u i+1, j 
 
                                                        
  1  
u i, j+1 

u
 (1 / 2k ) +o(k2)
y   0 u i , j   
 

 
‐ u i ,j‐1 
 

     

 2u 1 ‐ +o(h2) 
 2 1  1  
x 2
h     
                                                                                          
1 u i‐1, j
             u i , j  u i+1, j   
 
 

 
‐ 0  1
 2u 1  
 2 +o(h2)
xy 4h
1 0  ‐
 
u i, j 
 
1  0  ‐
 

The above approximations, when substituted in the PDE reduces it to the set of difference
equation which can be solved iteratively.However due to truncation error ,care has to be taken
for convergence and stability of the solution.

Example: Obtain the equivalent finite difference formulation of the given PDE

u u  2 u
a 
t x x 2

Write the truncation error also.

Solution:

Using formula (2.3),we have

ui , j 1  ui , j ui 1, j  ui , j ui 1, j  2ui , j  ui 1, j


a 
t x (x) 2

 r   2r   r 
u i , j 1  u i 1, j  ar    u i , j 1  ar    u i 1, j  
 x   x   x 

The truncation error is o(∆t) + o(∆x).

              

                                             

 
 

You might also like