Académique Documents
Professionnel Documents
Culture Documents
MA261 Cours2 Col
MA261 Cours2 Col
Discrtisation
par diffrences finies
du laplacien
u(x + h) u(x)
u (x) = + O(h) ordre 1, dcentr avant
h
u(x) u(x h)
u (x) = + O(h) ordre 1, dcentr arrire
h
u(x + h) u(x h)
u (x) = + O(h2 )
2h
ordre 2, centr
1
u(x+h)u(x)
h
u(x+h)u(x)
h
u (x)
u (x)
x x+h x x+h
u(x + h) u(x) h
u (x) = + u (x ) x [x, x + h]
h 2
bonne approximation si h petit et sup u () petit
[x,x+h]
2
Eq. de Laplace 1D
u (x) = f (x) x ]0, 1[ (f = 1 u(x) = x(x 1))
u(0) = u(1) = 0
si u est C 4
2
2u(x) u(x + h) u(x h) h (4)
u (x) = 2
+ u (x + h) ]1, 1[
h 12
(dms : developpement de Taylor-MacLaurin + th. des valeurs intermediaires)
2 4 (4)
Rmq : si f est C alors la solution u est C avec u = f et
(4)
u (x + h) sup f (x)
x[0,1]
3
Discrtisation de lquation
1
decoupage de lintervalle [0, 1] (xi )i=1,N +1 avec xi = ih et h = N+1
xi = ih
x0 = 0 xN +1 = 1
2ui ui+1 ui1
2
= fi pour i = 1, N
h
u0 = uN +1 = 0
4
Forme matricielle
1
(2u1 u2 ) = f1 i=1
h2
1
(2u2 u1 u3 ) = f2 i=2
h2 elimination de
... u0 et uN +1
1
(2ui ui+1 ui1 ) = fi i
h2
...
1
(2uN 1 uN uN 2 ) = fN 1 i=N 1
h2
1
(2uN uN 1 ) = fN = i=N
h2
systeme lineaire dordre N
AU = F
2 1
.. u1 f1
1 2 . u2 f2
1 .. .. ..
..
..
A= 2 . . .
U = . F = .
h
.. uN 1 fN 1
. 2 1 uN fN
1 2
tridiagonale symtrique 5
Proprit fondamentale
dms :
N
2 2
h AV , V =h vi A V
i=1 i
i=N
1
= v1 (2v1 v2 ) + vi (2vi vi+1 vi1 ) + vN (2vN vN 1 )
i=2
i=N1
v12 + vN
2
+ (vi vi1 )2 0
i=2
A V , V = 0 v1 = vN = 0 et vi vi1 = 0 vi = 0 i = 1, N
elements propres de A
ik k
Wk = sin k = 2 1 cos >0 k = 1, N
N + 1 i=1,N N +1
(2 sin ikh sin(i + 1)kh sin(i 1)kh = 2 sin ikh (1 cos kh))
Wk base orthogonale.
k=1,N
6
Estimation derreur
erreur ei = ui u(xi )
Theeor`eeme : si f C 2 alors
h2
E = sup |ei | sup |f (x)|
i=1,N 96 x[O,1]
u=0
u=0
u = f dans u = f
u=0 sur
0 u=0 1
Approximation a
`a lordre 2 du laplacien (u C 4 ())
8
Discrtisation du problme de Laplace
grille de discretisation de pas h (identique dans les 2 directions)
xi = ih i = 0, n + 1
yj = jh j = 0, n + 1 Mij
yj = jh
Mij = (xi , yj )i,j=1,n+1
xi = ih
uij approximation de u(xi , yj )
1
2
(4uij ui+1,j ui1,j ui,j+1 ui,j1 ) = fij 1 i, j n
h
uij = 0 i = 0 ou i = n + 1 ou j = 0 ou j = n + 1
fij = f (xi , yj )
i, j + 1
i, j
schema a 5 points i 1, j i + 1, j
i, j 1 9
Forme matricielle On elimine les termes de bord !
u1j f1j
Uj = ... Fj = .. vecteurs de dimension n
.
unj fnj
U1 F1
. .. vecteurs de dimension n2
U = .. F = .
Un Fn
2
Systeme lineaire dordre N = n : AU = F
B I 4 1
.. ..
I B . 1 4 .
1 .. .. .. .. .. ..
A= 2 . . .
B =
. . .
h
.. ..
. B I . 4 1
I B 1 4
h2 A =
4 -1 -1
-1 4 -1
-1
-1 4 0 -1
-1 0 4 -1
-1 -1 4
-1
-1 -1 4
dms :
2 2
h2 A V , V = V1 + Vn + Vj Vj+1 2
j=1,n1
2
+h (BVj , Vj )
j=1,n
Si u C 4 () on a lestimation derreur :
sup |uij u(xi , yj )| C0 h2 (C0 cte ind. de u)
i,j
dms complexe
moins bonne convergence si u est moins regulier
12
Extensions
autre scheema
j+1
4u(x, y)
1
u(x) = 2
u(x + h, y + h) u(x + h, y h) j
2h
u(x h, y + h) u(x h, y h)
+O(h2 ) j1
i1 i i+1
schema a 5 points en croix
j+2
en 1D u (x) = f (x) x ]0, 1[
u(0) = g0 u(1) = g1
2u2 u2 u0 2u2 u2 g0
equation i = 1 : 2
= f1 2
= f1 + 2
h h h
2un un1 un+1 2un un1 g1
equation i = n : = fn = f1 + 2
h2 h2 h
u (x) + u(x) = f (x) x ]0, 1[ = 0 probleme mal pose !
en 1D
u (0) = u (1) = 0
u1 = u0 + 12 h2 (u0 f0 )
uN = uN+1 + 12 h2 (uN +1 fN +1 )
15
en dimension 2
n = y
Eq. de Laplace sur le carre = ]0, 1[ ]0, 1[ 1
u + u = f dans n = x
n = x
n u = 0 sur
n normale sortante
0 1
n u = u, n
n = y
condition de Neumann en y = 0
1 2 2 3
u(h, y) = u(0, y) + hx u(0,
y) + 2 h x u(0, y)
+ O(h ) (x u(0, y) = 0)
2 2 3
= u(0, y) + 12 h u f y u(0, y) + O(h ) (en utilisant leq.)
donne des systmes linaires sym. def. pos. creux sur les pbs elliptiques
convergence quadratique si les solutions sont rgulires
permet de traiter la plupart des conditions limites
mais limite des gomtries rectangulaires !
17