Beruflich Dokumente
Kultur Dokumente
DIFERENCIALES PARCIALES
δδxk∂u∂x+δδyk∂u∂y+δδzk∂u∂z=cpδuδt
δδx∂u∂x+δδy∂u∂y+δδz∂u∂z=cpkδuδt
2u(x,y) 2u(x,y)
u(x,y) =
2
+ = f(x,y) ; en (x,y) R y
x 2 y 2
R = (x,y)
a < x < b, c < y < d
donde
ym = d
. . .
.
.
.
.
. . .
. . .
y2
. . .
y1
. . .
y0 = c
x 0= a x1 x2 x3 x4 x n= b
Donde .
i ( y i - 1, y i +1 )
Simplificando mas
ÉÉÉÉ.. (ecuacion
h2
h
2
comun)
Para toda i = 1, 2, É , n-1 y j = 1, 2, É, m-1 y las condiciones de frontera
como:
Entonces nuestro problema seria encontrar los valores de u en los puntos de red interiors a
la region S.
La ecuación común contiene aproximaciones a en los puntos:
u(x,y)
yj + 1 X
yj X X
X
yj -1 X
a xi - 1 xi xi + 1
b
Si utilizamos la información de las condiciones de frontera siempre
que sea conveniente en el sistema dado, es decir, en todos los puntos
adyacentes al punto de red de la frontera, tendremos un sistema
(xi , y j )
Pl = (xi , y j ) y Wl = w i,j,
de 2n-1.
y5
P1 P2 P3
y4
P4 P5 P6
y3
y2 P7 P8 P9
y0
xo x1 x2 x3 x4
MÉTODO DE GAUSS-SEIDEL
limk→∞xk=x*
x11=b1-(a12x20+a13x30+…+a1nxn0)a11
x11=xi1, i=2,…,n
xi2=xi1, i=1,3,…;n.
N: El numero de iteraciones
abs(w(n-1,m-1)-z)>norm
F abs(w(n-1,j-1)-z)>norm
F
V
V
norm=abs(w(n-1,m-1)-z);
w(n-1,m-1)=z; norm=abs(w(n-1,j-1)-z);
w(n-1,j-1)=z;
for j=m-1:-1:3
NEXT (j)
z=(-h^2*F(2,j)+Y(j)+la*w(1,j)+la*w(1,j-2)+w(2,j-1))/mu
z=(-h^2*F(2,2)+G(1,2)+la*G(2,1)+la*w(1,2)+w(2,1))/mu;
abs(w(1,j-1)-z)>norm
F
abs(w(1,1)-z)>norm
F
V
V
norm=abs(w(1,j-1)-z);
w(1,j-1)=z; norm=abs(w(1,1)-z);
w(1,1)=z;
FOR i=3:n-1
FOR i=3:n-1
z=(-h^2*F(i,j)+w(i-2,j-1)+la*w(i-1,j)+w(i,j-1)+la*w(i-1,j-2))/mu
z=(-h^2*F(i,2)+la*X(i)+w(i-2,1)+la*w(i-1,2)+w(i,1))/mu;
abs(w(i-1,j-1)-z)>norm
abs(w(i-1,1)-z)>norm
F
F
V
V
norm=abs(w(i-1,j-1)-z);
w(i-1,j-1)=z; norm=abs(w(i-1,1)-z);
w(i-1,1)=z;
CODIFICACION EN MATLAB
ojo
De la línea 104 -172,se encarga de crear la maya en x,y,y los valores de
w(i,j) para asi graficar la solución de la ecuación diferencial es decir una
superficie aproximada a U(xi,yj), cuyo titulo tiene ‘solucion numerica’
OBSERVACIONES
EJEMPLO
2u(x,y) 2u(x,y)
+ =0
x 2 y 2
R = u(x,y)
0 < x < 0.5, 0 < y < 0.5
condiciones de frontera:
son:
Pi
P1 P2 P3
P4 P5 P6
u( 0 , y ) = 0 u( 0.5 , y ) = 200y
P7 P8 P9
u( x , 0 ) = 0 0.5
4 -1 0 -1 0 0 0 0 0 W1 25
-1 4 -1 0 -1 0 0 0 0 W2 50
0 -1 4 0 0 -1 0 0 0 W 150
3
-1 0 0 4 -1 0 -1 0 0 W4 0
0 -1 0 -1 4 -1 0 -1 0 W = 0
5
0 0 -1 0 -1 4 0 0 -1 W6 50
0
0 0 -1 0 -1 4 -1 0 W7
0
0 0 0 0 -1 0 -1 4 -1 W 0
8
0 0 0 0 0 -1 0 -1 4 W 25
9
U( x , y ) = 400xy
PROGRAMAS EN EJECUCION.
EJEMPLO 1
>> eqdipael
X =
Y =
v =
t =
F =
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
w =
z1 =
0 0 0 0 0 0
0 0.3090 0.4181 0.5045 0.5000 0.2000
0 0.4181 0.4590 0.4999 0.4954 0.4000
0 0.5044 0.4999 0.5408 0.5818 0.6000
0 0.4999 0.4954 0.5817 0.6909 0.8000
0 0.2000 0.4000 0.6000 0.8000 1.0000
>> eqdipael
Ingrese f(x,y):0
Ingrese g(a,y):0
Ingrese g(b,y):200*y
Ingrese g(x,c):0
Ingrese g(x,d):200*x
Ingrese la tolerancia:0.000001
X =
Y =
v =
0 25 50 75 100
t =
0 25 50 75 100
F =
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
w =
z1 =
0 0 0 0 0
>>
GRÁFICO.
EJEMPLO1
>> eqdipael
Ingrese f(x,y):(x^2+y^2)*exp(x*y)
Ingrese g(a,y):1
Ingrese g(b,y):exp(2*y)
Ingrese g(x,c):1
Ingrese g(x,d):exp(x)
Ingrese la tolerancia:0.0000001
Columns 1 through 9
Columns 10 through 11
1.8000 2.0000
Y =
Columns 1 through 9
Columns 10 through 11
0.9000 1.0000
v =
Columns 1 through 9
Columns 10 through 11
6.0496 7.3891
t =
Columns 1 through 9
Columns 10 through 11
6.0496 7.3891
F =
Columns 1 through 9
Columns 10 through 11
0.8100 1.0000
1.0176 1.2703
1.3903 1.7305
2.0077 2.4781
2.9789 3.6499
4.4519 5.4366
6.6255 8.1011
9.7654 12.0034
14.2237 17.6328
20.4650 25.6505
29.0988 36.9453
w =
z1 =
Columns 1 through 9
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000
Columns 10 through 11
1.0000 1.0000
1.0305 1.2214
1.2265 1.4918
1.4863 1.8221
1.8152 2.2255
2.2229 2.7183
2.7216 3.3201
3.3205 4.0552
4.0543 4.9530
4.9462 6.0496
6.0496 7.3891