Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
para
Ecuaciones en Derivadas Parciales
Introduccin
Diferencias finitas
Convergencia y estabilidad
Introduccin
de Ondas
utt - c2uxx = 0
Ecuacin
del Calor
ut - cuxx = 0,
Ecuacin
de Laplace
uxx + uyy = 0
c>0
Diferencias finitas
Discretizacin:
Mtodos explcitos
Sencillos
Inestables
Mtodos implcitos
Ms
complejos
Estables
EDP
EDF
h
yj+1
yj
u i,j
yj - 1
x i-1
x i x i+1
Diferencias primeras
Hacia adelante
u x ( xi , y j )
u i +1, j - u i , j
h
Error
u x ( xi , y j )
u( x i + h, y j ) - u( x i , y j )
u i +1, j - u i , j
h
h
- u xx ( x i + h, y j ),
2
0 1
Hacia atrs
u x ( xi , y j )
u( x i , y j ) - u( x i - h, y j )
h
u i , j - u i -1, j
h
Diferencias simtricas
u x ( xi , y j )
u( x i + h, y j ) - u( x i - h , y j )
2h
u i +1, j - u i -1, j
2h
Error
u( x + h, y) - u( x - h, y) h 2
u x ( x, y)
u xxx (, y),
2h
6
]x - h, x + h[
Diferencias segundas
Diferencias simtricas
u xx ( x i , y j )
u x ( x i + h, y j ) - u x ( x i , y j )
h
u i +1, j - 2 u i , j + u i -1, j
h2
Error
u( x - h, y) - 2 u( x, y) + u( x + h, y) h
u xx ( x, y)
- u xxxx (, y)
2
k
12
]x - h, x + h[
2
Convergencia y estabilidad
~
u ( x, y)
EDP
F(x,y,u)=0
Solucin:
EDF
Convergencia
u h ,k ( x i , y j )
h
0
,k
G i , j ( h, k , ~
u)
Consistencia
Estabilidad:
Consistencia + Estabilidad
u( x i , y j )
h
0
,k
Ecuaciones hiperblicas
Ecuacin de
Ondas
Condiciones
iniciales
u(x, 0) = f(x)
ut(x, 0) = g(x)
Condiciones
de contorno
u(0,t) = l(t)
u(L,t) = r(t)
Condiciones iniciales
ui,0 = fi
Paso 1
Pasos siguientes
ui,j+1 = a2(ui+1,j + ui-1,j) +2(1 - a2)ui,j - ui,j-1
Convergencia
a1
nx=4, nt=8,
ut(x, 0) = 0
u(0,t) = 0
u(L,t) = 0
Condicin de convergencia : a ck
h
Instante t = 0:
1 0 .5 1
1
1
2
Instante t=1:
ui,1 = a2(ui-1,0+ui+1,0)/2 + (1 - a2)ui,0 + kg(xi)
Procediendo anlogamente
t=0
t = 0.5
t=1
t = 1.5
t=2
t = 2.5
t=3
t = 3.5
t=4
x=0
0
0
0
0
0
0
0
0
0
x=1
x=2
1.0000
2.0000
1.0000 1.7500
0.9375
1.1250
0.6875
0.4063
0.1953 -0.1719
-0.4375 -0.5664
-0.9932 -0.8965
-1.2764 -1.2749
-1.2401 -1.6541
x=3
1.0000
1.0000
0.9375
0.6875
0.1953
-0.4375
-0.9932
-1.2764
-1.2401
x=4
0
0
0
0
0
0
0
0
0
Pasos
Convergencia
para todo a
Sistema
tridiagonal
Factorizacin LU
Aw = v,
v = (u1,j,u2,j,...,unx-1,j)'
ui,j+1 = wi - ui,j-1
Lz = v
Uw = z
Mtodo implcito.
Sustitucin
58
-116
0
-1
16
5
-1
16
0 x1 1
7
-1
16 x1 4
1
5 x
8 1
3, 2 1 3, 0
Factorizacin LU
0.625
L - 0.0625
0
0.61875
- 0.0625
0
0.6186
0
0
1 - 0 .1
U 0
1
- 0.10
0
0
1
t=0
t = 0.5
t=1
t = 1.5
t=2
t = 2.5
t=3
t = 3.5
t=4
x=0
0
0
0
0
0
0
0
0
0
x=1
1.0000
1.0000
0.9184
0.6926
0.2912
-0.2449
-0.7996
-1.2231
-1.3966
x=2
2.0000
1.7500
1.1837
0.4824
-0.1699
-0.6647
-0.9953
-1.2214
-1.3981
x=3
1.0000
1.0000
0.9184
0.6926
0.2912
-0.2449
-0.7996
-1.2231
-1.3966
x=4
0
0
0
0
0
0
0
0
0
Ecuaciones parablicas
Ecuacin
ut = cuxx, 0 < x < L, t > 0
del Calor
Condicin
u(x, 0) = f(x)
inicial
Condiciones
u(0, t) =T0 u(L, t) = TL
de contorno
Ecuacin en diferencias
ui , j+1 - ui , j
ui +1, j - 2ui , j + ui -1, j
c
k
h2
Condicin inicial
ui,0 = f(xi)
Condiciones de contorno
u0,j = T0
unx,t = TL
para j>0
Pasos siguientes
ui,j+1 = a(ui+1,j+ui-1,j) +(1-2a)ui,j
Convergencia
a 1/2
ptimo a = 1/6
ck 0 . 1 0 . 1 1 1
a 2
h
0.04
4 2
Instante t = 0.2 :
u1,2 = 75
u3,2 = 98.125
u2,2 = 97.5
u4,2 = 81.25
Instante t = 0.3:
u1,3 = 66.875
u3,3 = 93.75
u2,3 = 92.0313
u4,3 = 75.1563
Pasos
(1+2a)ui,j - a(ui-1,j + ui+1,j) = ui,j-1
Convergencia
para todo a
u2, 0
- 14 3 2 - 14
u2,1
3
1
1
u
u
- 4
3, 0
2
4
3,1
t = 0.1
t = 0.2
t = 0.3
x = 0.2
86.2237
76.3776
69.0598
x = 0. 4 x = 0.6
97.3423 97.8301
93.3707 94.4771
88.8487 90.5494
x = 0.8
89.6384
82.1718
76.5394
Mtodo de Crank-Nicholson
Pasos
2(1+a)ui,j+1 - a(ui+1,j+1 + ui-1,j+1) =
2(1-a)ui,j + a(ui+1,j + ui-1,j)
Convergencia
para todo a
5
1
1
- 4
- 4
- 14 5 2 - 14
5
1
4
2
100
100 + 70
t = 0.1
t = 0.2
t = 0.3
x = 0.2
x = 0.4
87.8683 98.6826
76.0999 95.1069
68.2003 90.2963
x = 0.6
x = 0.8
98.9578 90.8958
96.0470 82.0380
91.9748 76.0250
Ecuaciones elpticas
Ecuacin de Laplace
uxx + uyy = 0,
0 < y <b
Condiciones de contorno
u(x,0),
0 < x < a,
u(x,b),
u(0,y),
u(a,y)
Discretizacin
u i+1, j - 2 u i , j + u i-1, j
h
u i , j+1 - 2 u i , j + u i , j-1
k
Ecuacin de Laplace
Matriz del
sistema:
grande ,
dispersa
Caso h = k :
Mtodo de Jacobi
2 + 2a 2
Mtodo de Gauss-Seidel
2 + 2a 2
Criterio de parada
max u
i, j
(k)
i, j
-u
( k -1)
i, j
Mtodo de Sobrerrelajacin
Idea:
ponderar el desplazamiento de Gauss-Seidel
Pasos
2 + 2a 2
Ecuacin de Laplace.
Ejemplo
n=4
u(x, 0) = 0
0<x<1
0 < y < 1,
m=4,
u (x, 1) = 100x
u(0, y) = 0
u(1, y) = 100y
uxx+ uyy=0,
= 0.01
i 1,...,m-1
j 1,...,n-1
Mtodo de Jacobi.
Iteraciones: 8
Operaciones en coma flotante: 1142
x = 0.25
x = 0.5
x = 0.75
y = 0.25 y = 0. 5 y = 0.75
6.2561 12.5031 18.7500
12.5031 25.0000 37.4969
18.7500 37.4969 56.2439
Mtodo de Gauss-Seidel.
Iteraciones: 11
Operaciones en coma flotante: 1378
x = 0.25
x = 0.5
x = 0.75
y = 0.25 y = 0. 5 y = 0.75
6.2447 12.4947 18.7473
12.4947 24.9947 37.4973
18.7473 37.4973 56.2487
Mtodo de Sobrerrelajacin.
Factor de relajacin: w = 1.2
Iteraciones: 8
Operaciones en coma flotante: 1802
x = 0.25
x = 0.5
x = 0.75
y = 0.25 y = 0. 5 y = 0.75
6.2514 12.5008 18.7502
12.5008 25.0003 37.5002
18.7502 37.5002 56.2500
i 1, 2, ..., n
x = 0.25
x = 0.5
x = 0.75
y = 0.25 y = 0. 5 y = 0.75
6.2490 12.4991 18.7497
12.4989 24.9990 37.4996
18.7495 37.4995 56.2498
Errores mximos.
Solucin:
u(x,y) = xy
Mtodo
Jacobi
Gauss-Seidel
Sobrerrelajacin w = 1.2
Direcciones alternadas
y = 0.25
6.2500
x = 0.25
12.5000
x = 0.5
x = 0.75 18.7500
Iteraciones
8
12
8
5
y = 0. 5
12.5000
25.0000
37.5000
Operaciones
1142
1378
1802
1468
y = 0.75
18.7500
37.5000
56.2500
Error mximo
0.0061
0.0053
0.0014
0.0011
FIN