# Elliptic PDE by zulhelmi7

VIEWS: 31 PAGES: 9

• pg 1
```									Elliptic PDE (PKS eliptik) Commonly encountered elliptic PDE are Poisson equation

 2U  2U   f 2x 2 y
Laplace equation  2U  2U  0 2x 2 y
x and y are spatial independent variable. Equations of this type study various timeindependent (steady-state) physical problems such as the steady-state distribution of heat in a region. Only consider Diritchlet BC, that is the temperature in the region is determined by the temperature distibution on the boundary of the region.

The method uses the finite difference method as before. y

b

m+1 m m-1 2 1 j=0 k=0 1 2
Uo

U k , j ???

Ua

y x x x

Ub

n-1 n a

n+1

x

The first step is determined the sizes of steps. a x  n 1 b y  m 1 For Laplace equation, the difference equation written in central difference form is at point k,j

U k 1, j  2U k , j U k 1, j

x 

2



U k , j 1  2U k , j U k , j 1

y 2

0

For x  y  h
1 U k 1, j  2U k , j U k 1, jU k , j 1  2U k , j U k , j 1  0 h2 1 U k 1, j U k 1, jU k , j 1 U k , j 14U k , j  0 h2

 



X



The equation can be written for each interior point and thus we have mn simultaneous equations. example Determine the steady-state heat distribution in a thin square metal plate with dimensions 10 cm by 10 cm. One of the edges is held at 100 C, 50 C, 75 C and at 0 C. Soln: To find U ( x, t ) such that

 2U  2U  0 2x 2 y
with BC
U ( x ,0 )  0 U ( x,10)  50 U (0, y )  75 U (10, y )  50

100 10 cm 75 75 2.5 cm 75 0

100

100

100

100 50 50 50

0 2.5 cm

0

0

0 10 cm

By applying the finite difference equation to the first inner node we can find U 1,1 ; k 1 j 1

1 U k 1, j U k 1, jU k , j 1 U k , j 14U k , j  0 h 1 U 2,1  U 0,1  U1,2  U1,0  4U1,1   0 h 1 U 2,1  75  U1,2  0  4U1,1   0 h  4U1,1  U 2,1  U1,2   75
The second inner node U 2 ,1 ; k  2 j 1 1 U 3,1  U 1,1  U 2,2  U 2,0  4U 2,1   0 h 1 U 3,1  U 1,1  U 2,2  0  4U 2,1   0 h U 1,1  4U 2,1  U 3,1  U 2,2   0 The third node U 3,1 ; k  3 j  1





1 U 4,1  U 2,1  U 3,2  U 3,0  4U 3,1   0 h 1 50  U 2,1  U 3,2  0  4U 3,1   0 h U 2,1  4U 3,1  U 3,2   50
The fourth node U 1, 2 ; k  1 j  2

1 U 2,2  U 0,2  U 1,3  U 1,1  4U 1,2   0 h 1 U 2,2  75  U 1,3  U 1,1  4U 1,2   0 h U 1,1  4U 1,2  U 1,3  U 2,2   75
The fifth node U 2 , 2 ; k  2 j  2

1 U 3,2  U 1,2  U 2,3  U 2,1  4U 2,2   0 h U 1,2  U 2,1  4U 2,2  U 2,3  U 3,2   0

The sixth node U 3, 2 ; k  3 j  2

1 U 4,2  U 2,2  U 3,3  U 3,1  4U 3,2   0 h 1 50  U 2,2  U 3,3  U 3,1  4U 3,2   0 h U 2,2  U 3,3  U 3,1  4U 3,2   50
The seventh node U 1, 3 ; k  1 j  3

1 U 2,3  U 0,3  U 1,4  U 1,2  4U 1,3   0 h 1 U 2,3  75  100  U 1,2  4U 1,3   0 h U 2,3  U 1,2  4U 1,3   175

The eighth node U 2 , 3 ; k  2 j  3

1 U 3,3  U1,3  U 2,4  U 2,2  4U 2,3   0 h 1 U 3,3  U1,3  100  U 2,2  4U 2,3   0 h U 2,2  U1,3  U 3,3  4U 2,3   100
The ninth node U 3, 3 ; k  3 j  3

1 U 4,3  U 2,3  U 3,4  U 3,2  4U 3,3   0 h 1 50  U 2,3  100  U 3,2  4U 3,3   0 h U 2,3  U 3,2  4U 3,3   150

The result is a set of 9 simultanous equations with nine unknowns. In matrix form

0 1 0 0 0 0 0   U 1,1    75   4 1   1 0 0 4 1 0 1 0 0  U 1, 2   0      0 0 0 1 0 0 4 1 0  U 1,3    50       0 1 0 0 0 0  U 2,1    75   1 4 1 0 1 0 1 4 1 0 1 0  U 2, 2    0       0 0 0 1 0 1  4 1  U 2,3    50  0 0 1 4 0 0 1 0 0 0  U 3,1    175      0 1 0 1 4 0 0 1  U 3, 2   100 0 0 0 0 0 0 1 0 1  4 U 3,3   150     

susun dan selesaikan dengan Gauss-Siedel. Gauss elimination prone to round-off error for large matrix and usually not employed. Also elimination method waste computer memory storing those zeros. perlu susun supaya unsur pepenjuru terbesar dalam baris. Masukkan matriks di bawah ke dalam GSIEDEL.CPP.

0 1 0 0 0 0 0   U 1,1    75   4 1    1 4 1 0 1 0 0 0 0  U 1, 2    75      0 1 4 0 0 1 0 0 0  U 1,3   175      0 0 4 1 0 1 0 0  U 2,1   0  1 0 1 0 1 4 1 0 1 0  U 2, 2    0       0 1 0 1 4 0 0 1  U 2,3   100 0 0 0 0 1 0 0 4 1 0  U 3,1    50       0 0 0 1 0 1  4 1  U 3, 2    50  0 0 0 0 0 0 1 0 1  4 U 3,3   150     

Aturcara GSIEDEL.CPP menyelesaikan secara lelaran untuk k  1 to n and j  1 to m iaitu melaksanakan for k=1 to n for j=1 to m U U k 1, jU k , j 1 U k , j 1 U k , j  k 1, j 4 aturcara GSIEDEL.CPP guna pembolehubah x[1], x[2],..... [n] mewakili x U 1,1 , U 1, 2 , U 1,3 .......... ..U n ,n .

contoh: bandingkan dengan hasil GSIEDEL.CPP lelaran pertama dengan nilai awal semua nod di dalam sebagai sifar. (i) untuk nod baris pertama
U 2,1 U 0,1U 1, 2 U 1, 0 4 U 3,1 U 1,1U 2, 2 U 2, 0 4 U 4,1 U 2,1U 3, 2 U 3,0 4 0  75  0  0  18 .75 4 0  18 .75  0  0  4.68 4 50  4.68  0  0  13 .67 4

U 1,1 



U 2,1 



U 3,1 



(ii) untuk nod baris ke dua
U 1, 2  U 2, 2  U 3, 2 

(iii) untuk nod baris ke tiga

U 1,3  U 2,3  U 3, 3 

lelaran ke dua (i) untuk nod baris pertama U 1,1 
U 2,1  U 3,1 

(ii) untuk nod baris ke dua U 1, 2 
U 2, 2  U 3, 2 

(iii) untuk nod baris ke tiga U 1,3 
U 2,3  U 3, 3 

lelaran ke tiga dan seterusnya. jawapan

U 1,1  43.00061 U 1, 2  63.21152 U 1,3  78.58718

U 2,1  33.29755 U 2, 2  56.11238 U 2,3  76.06402

U 3,1  33.88506 U 3, 2  52.33999 U 3,3  69.71050

Project 1. Student will use overrealaxation to accelerate the rate of convergence. example: Use Gauss-Siedel method with overrelaxation with a weighing factor of 1.5. Solution: Overrelaxation is often employed to to accelerate the rate of convergence by applying U k( nj1) new  U k( nj1)  1   U kn, j , , The quantity U k( nj1) is the value of the unknown obtained on the current iteration using ,
( Gauss-Siedel. U k( nj) is the value on previous iteration. U k nj1) new is the extrapolated value , , of current iteration.

 is a weighing factor set between 1 and 2 for overrealaxation. The current value is the extrapolated value. If  is between 0 and 1 is termed underrelaxation. If   2 the process diverges. If   1 the extrapolated value is the same as the current iteration without extrapolation.

Assume all U k , j have. initial values of zero For U 1,1 ; k  1 j  1
U k, j  U 1,1  U k 1, j U k 1, j U k , j 1 U k , j 1 4 U 2,1 U 0,1U 1, 2 U 1, 0 4  0  75  0  0  18 .75 4

applying overrelaxation

U1new  1.5(18.75)  1  1.50  28.125 ,1
For U 2 ,1 ; k  2 j  1

U 2,1 

U 3,1 U 1,1U 2, 2 U 2,0 4



0  28 .125  0  0  7.03125 4

applying overrelaxation
new U 2,1  1.5(7.03125)  1  1.50  10.546875

For U 3,1 ; k  3 j  1
U 3,1  U 4,1 U 2,1U 3, 2 U 3, 0  50  10 .546875  0  0  15 .13671875 4

4 Applying overrelaxation new U 3,1  1.5(15.13671875)  1  1.50  22.70508

Repeat for the next row.

2. The above example only considers a heated plate with fixed temperature BC(fixed BC or Dirichlet BC). In project we will elaborate on more realistic problems, that is, when the edge is insulated. In this case the BC is in terms of the heat-flux. (Neumann BC). Also when there is a heat lost at the edge of the plate by conduction and radiation.

Poissons equation. Consider conditions
 2U  2U   xe y ; for 0  x  2 and x 2 y 2

0 y2

with boundary

U (0, y)  0, U ( x,0)  x,

U (2, y)  2e y U ( x,1)  ex

0  y 1 0 x2

```
To top