Sie sind auf Seite 1von 7

Universidad del Bo-Bo

Facultad de Ciencias
Departamento de Matematica

Tarea computacional 2 (Fecha de entrega: 19 de Enero de 2017)

Considere el PVC:
u + u = f en = (1, 1) (1, 1),

u = 0 en :=

con div = 0, para el cual el problema debil queda dado por: Hallar u H01 (), tal que

a(u, v) = F (v) v H01 (), (1)

con
a(u, v) := (u v + ( u)v) y F (v) = f v.

Considere los subespacios

Hh : vh |T P1 (T ), T Th },
:= {vh C()

Hh,0 := Hh H01 (),

donde Th es una triangulacion de . Entonces el esquema de Galerkin de (1) se define


por: Hallar uh Hh,0 , tal que

a(uh , vh ) = F (vh ) v Hh,0 . (2)



i) Calcule explcitamente la matriz local asociada al termino ( u)v.

SOLUCION
T T
Calculando la matriz local A = Ai,j = 2|T | (i )j , con i, j = 1, 3
T
Donde T Th es el triangulo de referencia cuyos vertices son

x1 = (0, 0),

x2 = (1, 0),


x = (0, 1) y las funciones bases del triangulo son = 1 x y, = x, = y
3 1 2 3
1 1x
t
a11 = 2 |T | (BK 1 )1 dydx
0 1 0 1x
= 2 |T | (1 , 2 ) (c1 c2 , c3 c4 )(1 x y) dydx
0 0
1 1x
= 2 |T | C1 1 x y dydx
0 0
1 1x
y 2
= 2 |T | C1 y xy dx
0 2 0
1
1 x2
= 2 |T | C1 x+ dx
0 2 2
1 !
x x2 x3
= 2 |T | C1 +
2 2 6 0
1
= 2 |T | C1
6
|T | C1
=
3

1 1x
t
a12 = 2 |T | (BK 1 )2 dydx
0 1 0 1x
= 2 |T | (1 , 2 ) (c1 c2 , c3 c4 )x dydx
0 0
1 1x
= 2 |T | C1 x dydx
0 0
1
= 2 |T | C1 xy|01x dx
0 1
= 2 |T | C1 x x2 dx
0
1 !
x2 x3
= 2 |T | C1
2 3 0
1
= 2 |T | C1
6
|T | C1
=
3
1 1x
t
a13 = 2 |T | (BK 1 )3 dydx
0 0
1 1x
= 2 |T | (1 , 2 ) (c1 c2 , c3 c4 )y dydx
0 0
1 1x
= 2 |T | C1 y dydx
0 0
1 2 1x

y
= 2 |T | C1 dx
0 2 0
1
1 x2
= 2 |T | C1 x+ dx
0 2 2
1 !
x x2 x3
= 2 |T | C1 +
2 2 6 0
1
= 2 |T | C1
6
|T | C1
=
3

1 1x
t
a21 = 2 |T | (BK 2 )1 dydx
0 1 0 1x
= 2 |T | (1 , 2 ) (c1 , c3 )(1 x y) dydx
0 0
1 1x
= 2 |T | C2 1 x y dydx
0 0
1 1x
y 2
= 2 |T | C2 y xy dx
0 2 0
1
1 x2
= 2 |T | C2 x+ dx
0 2 2
1 !
x x2 x3
= 2 |T | C2 +
2 2 6 0
1
= 2 |T | C2
6
|T | C2
=
3
1 1x
t
a22 = 2 |T | (BK 2 )2 dydx
0 1 0 1x
= 2 |T | (1 , 2 ) (c1 , c3 )x dydx
0 0
1 1x
= 2 |T | C2 x dydx
0 0
1
= 2 |T | C2 xy|1x
0 dx
0 1
= 2 |T | C2 x x2 dx
0
1 !
x2 x3
= 2 |T | C2
2 3 0
1
= 2 |T | C2
6
|T | C2
=
3

1 1x
t
a23 = 2 |T | (BK 2 )2 dydx
0 1 0 1x
= 2 |T | (1 , 2 ) (c1 , c3 )y dydx
0 0
1 1x
= 2 |T | C2 y dydx
0 0
1 2 1x

y
= 2 |T | C2 dx
0 2 0
1
1 x2
= 2 |T | C2 x+ dx
0 2 2
1 !
x x2 x3
= 2 |T | C2 +
2 2 6 0
1
= 2 |T | C2
6
|T | C2
=
3
1 1x
t
a31 = 2 |T | (BK 3 )1 dydx
0 1 0 1x
= 2 |T | (1 , 2 ) (c2 , c4 )(1 x y) dydx
0 0
1 1x
= 2 |T | C3 1 x y dydx
0 0
1 1x
y 2
= 2 |T | C3 y xy dx
0 2 0
1
1 x2
= 2 |T | C3 x+ dx
0 2 2
1 !
x x2 x3
= 2 |T | C3 +
2 2 6 0
1
= 2 |T | C3
6
|T | C3
=
3

1 1x
t
a32 = 2 |T | (BK 3 )2 dydx
0 1 0 1x
= 2 |T | (1 , 2 ) (c2 , c4 )x dydx
0 0
1 1x
= 2 |T | C3 x dydx
0 0
1
= 2 |T | C3 xy|1x
0 dx
0 1
= 2 |T | C3 x x2 dx
0
1 !
x2 x3
= 2 |T | C3
2 3 0
1
= 2 |T | C3
6
|T | C3
=
3
1 1x
t
a33 = 2 |T | (BK 3 )3 dydx
0 1 0 1x
= 2 |T | (1 , 2 ) (c2 , c4 )y dydx
0 0
1 1x
= 2 |T | C3 y dydx
0 0
1 2 1x

y
= 2 |T | C3 dx
0 2 0
1
1 x2
= 2 |T | C3 x+ dx
0 2 2
1 !
x x2 x3
= 2 |T | C3 +
2 2 6 0
1
= 2 |T | C3
6
|T | C3
=
3

Donde:
   
c c2 1
C1 = t
(BK 1 ) = (1 , 2 ) 1 = (1 , 2 ) (c1 c2 , c3 c4 )
c3 c4 1
   
c c2 1
C2 = (BK 2 ) = (1 , 2 ) 1
t
= (1 , 2 ) (c1 , c3 )
c3 c4 0
   
c c2 0
t
C3 = (BK 3 ) = (1 , 2 ) 1 = (1 , 2 ) (c2 , c4 )
c3 c4 1

Finalmente la matriz AT queda:



C1 C1 C1
|T |
C2 C2 C2
3
C3 C3 C3
ii) Modifique el programa escrito en MATLAB que se adjunta para aproximar la solu-
cion de (1). Corrobore el buen funcionamiento del programa obtenido con la solucion
exacta u(x, y) = sin(x)(y 2 1) y el vector = (1, 1)t . Para esto grafique la solucion
exacta y comparela con la solucion aproximada.

iii) Con los valores obtenidos con el subprograma erroru complete la siguiente tabla

ku uh k0, ku uh k1,

ROV 18 de enero de 2017

Das könnte Ihnen auch gefallen