Sie sind auf Seite 1von 3

TPE 2 :

RESOUDRE NUMERIQUEMENT LE PROBLEME


SUIVANT PAR LA METHODE
TP2 : DES DIFFERENCES FINIES

= ()
{ O = [0, 1[ ]0 , 1[
= 0 =
Discrtisation
1
Soit NN* et h =

Xi = ih ; i = 0 , 1,2 ..N
(xi , yi)1 I , j N- 1 dans
Yi = jh j = 0, 1,2 ..N

Dans = s U E U N U 0 on a:

0 = 0 s
= , 0
( xi , yj) {
0 , =
= 0, 0 0
2 2
En utilisant les diffrences centres pour approche 2 et 2 au point (xi , yi) 0 i N ; 0 j N
on a :

2 (xi ,yi 2 (xi ,yi)


+ = - f(xi , yi)
2 2

U(1 ,y )+ 2U( ,y )+U(+1 ,y ) U( ,y1 )+ 2U( ,y )+U( ,y+1 )


+ = - f (xi , yi)
2 2

UI +1 , j 2Ui,j +Ui-1 ,j + Ui, j+1 + 2Ui,j + Ui,j-1 = h2 f I,j

Avec UI +1 , j = U(1 , y )

Ui,j = U( , y )

Ui, j+1 = U(+1 , y )

Ui-1, j = U(1 , y )

Ui,j-1 = U( , y1 )
Ui,j+1 = U( , y+1 )

fi,j = f (xi , yi)

1i,j N-1 dans

UI -1 , j 4Ui,j +Ui+1 ,j + Ui, j+1 + Ui,j-1 =- h2 f I,j dans

On a: = U( , y ) = 0 0 ; j=0 i=N; 0jN 0i N; j=N i=0; 0 j


N

Ainsi, si les nuds intrieurs sont ordonns de la gauche vers la droite et du haut vers le bas.

(i , j + 1)

(i j , j) (, ) (i + j , j)

(i , j 1)

Cas pratique N=3

(i = j = 1 ) U0,1 4U1,1 +U2 ,1 + U1,2 + U1,0 =- h2 f 1,1

(i = 2, j = 1 ) U1,1 4U2,1 +U3 ,1 + U1,2 + U2,0 =- h2 f 2,1

(i = 1, j = 2 ) U0,2 4U1,2 +U2,2 + U1,3 + U1,1 =- h2 f 1,2

(i = 2, j = 2 ) U1,2 4U2,2 +U3,2 + U2,3 + U2,1 =- h2 f 1,2

En choisissant lordre suivant ,( U1,2 , U2,1 , U1 ,2 , U2,2 ) le systme devient :

4 U1,1 +U2,1 +U1 ,2 + 0U2,2 =- h2 f 1,1

4 U1,1 +U2,2 +U1 ,2 + 0U2,2 =- h2 f 2,1

U1,1 +0U2,1 -4U1 ,2 + U2,2 =- h2 f 1,2

0 U1,1 +U2,1 +U1 ,2 -4U2,2 =- h2 f 2,2

2 1,1
4 1 1 0 1,1
2
[1 4 1 0 ] 2,1 = 2,1
1 0 4 1 1,2 2 1,2
0 1 1 4 [2,2 ] 2
[ ] 2,2
Gnralisation

Pour N quelconque N* nous aurons un systme matriciel, avec une matrice carre
dordre N 1

AU = B

NB : pour rsoudre lquation par la mthode matricielle, il faut la valeur de N.

Nous allons donc rsoudre lquation de Laplace discrtise par la mthode de Gauss
Siedel (mthode explicit) alors 3 devient :
UI 1 ,jI 1 ,j 4Ui,j +Ui+1 ,j + Ui,j+1 + Ui,j1 = h2 f I,j
Ui,j = 4

Programme Matlab permettant de rsoudre lquation 4. Le domaine est un carre de


cot 1

Das könnte Ihnen auch gefallen