Академический Документы
Профессиональный Документы
Культура Документы
+
(1)
donde u
(k-1)M+r
son los valores de las ordenadas en los nodos del elemento.
Llevando esta aproximacin a la ecuacin diferencial se llega a :
[ ] + + + +
+
+
+ + +
) X x ( g ) x ( N u ) x X ( q ' ' y ) x X ( p
1 M ) 1 k (
1 M
1 r
k
r r M ) 1 k ( 1 M ) 1 k ( 1 M ) 1 k (
) u ,..., x ( R
1 k M +
donde R(x, ..., u
Mk+1
) es el residuo, al no verificar (1) la ecuacin diferencial.
Aplicando el mtodo de Galerkin, en el que
1 M ..., , 1 s 0 dx ) x ( N ) u ,..., x ( R
k
h
o
k
s 1 k M
+
+
esta integral conduce a las siguientes integrales cuya suma ha de ser nula:
i) Integrando por partes la integral correspondiente al primer sumando del primer miembro de la ecuacin
diferencial
[ ] [ ] + + +
+ +
k
h
0
k
s 1 M ) 1 k (
k
h
0
k
s 1 M ) 1 k (
) x ( N ' y ) x X ( p dx ) x ( N ' ' y ) x X ( p
dx
dx
) x ( dN
'. y ) x X ( p
k
h
0
k
s
1 M ) 1 k (
+ +
+
ii) El segundo trmino conduce a la integral
dx ) x ( N ) x ( N u ) x X ( q
k
s
k
h
0
1 M
1 r
k
r r M ) 1 k ( 1 M ) 1 k (
+
+
+ +
iii) El tercer trmino, que se le llamar -f
s
, donde, como es sabido s toma los valores 1, , M+1:
s
k
s
k
h
0
1 M ) 1 k (
f dx ) x ( N ) x X ( g +
+
reuniendo los tres resultados e imponiendo que s suma sea cero se llega a
+
+
+ +
+
) h ( N ) X ( ' y ) X ( p ) 0 ( N ) X ( ' y ) X ( p
k
k
s 1 M k
1 M k
k
s
1 M ) 1 k (
1 M ) 1 k (
+ + +
+
dx
dx
) x ( dN
'. y ) x X ( p
k
h
0
k
s
1 M ) 1 k (
2/4
r
k
s
k
h
0
1 M
1 r
k
r r M ) 1 k ( 1 M ) 1 k (
f dx ) x ( N ) x ( N u ) x X ( q +
+ +
Sustituyendo en la integral primera y' por su valor en funcin de las derivadas de las funciones de interpolacin, de
acuerdo con la expresin (1), se obtiene
+
+
+ +
+
) h ( N ) X ( ' y ) X ( p ) 0 ( N ) X ( ' y ) X ( p
k
k
s 1 M k
1 M k
k
s
1 M ) 1 k (
1 M ) 1 k (
,
_
+ + + +
+ +
+
+
dx ) x ( N ) x ( N ) x X ( q
dx
) x ( dN
dx
) x ( dN
) x X ( p u
k
h
0
k
s
k
r 1 M ) 1 k (
k
s
k
r
1 M ) 1 k (
1 M
1 r
r M ) 1 k (
s
f
llamando
dx ) x ( N ) x ( N ) x X ( q
dx
) x ( dN
dx
) x ( dN
) x X ( p K
k
h
0
k
s
k
r 1 M ) 1 k (
k
s
k
r
1 M ) 1 k (
k
sr
,
_
+ + +
+ +
se llega a las siguientes expresiones
1 1 M k
k
1 M , 1 1 M ) 1 k (
k
11 1 M ) 1 k ( 1 M ) 1 k (
f u K .... u K ) X ( ' y ) X ( p + + +
+ + + + +
.
.
1 M s y 1 s para f u K .... u K u K
s 1 M k
k
1 M , s 2 M ) 1 k (
k
2 s 1 M ) 1 k (
k
1 s
+ + + +
+ + + +
.
.
1 M 1 M k
k
1 M , 1 M 1 M ) 1 k (
k
1 , 1 M 1 kM 1 kM
f u K .... u K ) X ( ' y ) X ( p
+ + + + + + + +
+ + +
Si se define la matriz simtrica
1
1
1
1
1
1
1
]
1
+ + +
+
+
k
1 M , 1 M
k
1 , 1 M
k
1 M , M
k
21
k
1 M 1
k
12
k
11
k
el
K K
K
K
K K K
K
y los vectores
,
_
+ +
+ +
) X ( ' y ) X ( p
0
0
) X ( ' y ) X ( p
1 M k 1 M k
1 M ) 1 k ( 1 M ) 1 k (
k
C
,
_
+
+
+
1 M k
2 M ) 1 k (
1 M ) 1 k (
k
u
u
u
u
y
,
_
+1 M
1
k
f
f
f
3/4
las ecuaciones anteriores adoptan la forma:
k k k
el
f u K C +
Caso 2.- Ecuacin de la forma p(X)y'' + q(X)y' + r(x)y(X) = g(X).
Haciendo las mismas consideraciones que en el caso anterior en cuanto a funciones de interpolacin y al clculo
del residuo, aplicando Galerkin, se llega a las siguientes integrales:
i) Integrando por partes la integral correspondiente al primer sumando del primer miembro de la ecuacin
diferencial
[ ] + + +
+ +
k
h
0
k
s 1 M ) 1 k (
k
h
0
k
s 1 M ) 1 k (
) x ( N ' y ) x X ( p dx ) x ( N " y ) x X ( p
dx
dx
) x X ( dp
'. y ) x ( N dx
dx
) x ( dN
'. y ) x X ( p
k
h
0
1 M ) 1 k (
k
s
k
h
0
k
s
1 M ) 1 k (
+
+ + +
+
+
ii) El segundo sumando define la integral
dx ) x ( N
dx
) x ( dN
u ) x X ( q
k
s
k
h
0
1 M
1 r
k
r
r M ) 1 k ( 1 M ) 1 k (
+
+
+ +
iii) El tercer trmino conduce a la integral
dx ) x ( N ) x ( N u ) x X ( r
k
s
k
h
0
1 M
1 r
k
r r M ) 1 k ( 1 M ) 1 k (
+
+
+ +
iv) El cuarto trmino se llamar -f
s
, al igual que en el caso anterior:
s
k
s
k
h
0
1 M ) 1 k (
f dx ) x ( N ) x X ( g +
+
Llamando
+
,
_
+
+
+
+
dx
dx
) x ( dN
dx
) x X ( dp
) x ( N
dx
) x ( dN
dx
) x ( dN
) x X ( p K
k
h
0
k
s
1 M ) 1 k (
k
s
k
s
k
r
1 M ) 1 k (
k
sr
dx ) x ( N ) x ( N ) x X ( r ) x ( N
dx
) x ( dN
) x X ( q
k
h
0
k
s
k
r 1 M ) 1 k (
k
s
k
r
1 M ) 1 k (
,
_
+ + + +
+ +
Se llega, de modo parecido al caso anterior, a la ecuacin matricial
k k k
el
f u K C +
donde u
k
y f
k
coinciden con las expresiones anteriores y la matriz, ahora no simtrica,
1
1
1
1
1
1
1
]
1
+ + +
+
+
k
1 M , 1 M
k
1 , 1 M
k
1 M , M
k
21
k
1 M 1
k
12
k
11
k
el
K K
K
K
K K K
K
y el vector
,
_
+ +
+ +
) X ( ' y ) X ( p
0
0
) X ( ' y ) X ( p
1 M k 1 M k
1 M ) 1 k ( 1 M ) 1 k (
k
C
Cdigo en Maple
Caso 1.-
Funciones de la ecuacin diferencial, en la forma -(p(x)y')' + q(x)y - g(x) = 0:
> p:=x->;
4/4
> q:=x->;
> g:=x->;
Definicin de las funciones de interpolacin: es usual que los nodos estn igualmente espaciados dentro de un
elemento, espacio h_k/M, siendo h_k la longitud del elemento y M el grado del polinomio de interpolacin; r es el
nmero de la funcin de interpolacin (vara entre 1 y M+1).
> N:=proc(r,x,h_k) local s,k,t; global M; for k from 1 to M+1 do t[k]:=(k-1)*h_k/M od ; if r>M+1 then `Error` elif r=1
then mul(x-t[s],s = 2 .. M+1)/mul(t[1] -t[s],s = 2 .. M+1) elif r=M+1 then mul(x-t[s],s = 1 .. M)/mul(t[r] -t[s],s = 1 .. M)
else mul(x-t[s],s = 1 .. r-1)*mul(x-t[s],s = r+1 .. M+1)/(mul(t[r] -t[s],s = 1 .. r-1)*mul(t[r]-t[s],s = r+1 .. M+1)) fi end;
Derivada respecto a x de las funciones de interpolacin
> DN:=proc(r,x,h_k);
> diff(N(r,x,h_k),x);
> end;
Integracin de los trminos de la matriz de rigidez de un elemento genrico
> for j from 1 to M+1 do for r from 1 to M+1 do
>K_el[j,r]:=int(N(j,x,h_k)*N(r,x,h_k)*q(X_k+x)+DN(j,x,h_k)*DN(r,x,h_k)*p(X_k+x),x=0..h_k)od od:
Vector del segundo miembro
> for j from 1 to M+1 do fel[j]:=int(g(x+X_k)*N(j,x,h_k),x=0..h_k) od:
> for j from 1 to L do f_e[j]:=matrix(M+1,1,0):
> for k from 1 to M+1 do f_e[j][k,1]:=evalf(subs(X_k=X[j],h_k=H[j],fel[k])) od:
Caso 2.-
Funciones de la ecuacin diferencial de la forma p(x)y'' + q(x)y' +r(x)y = g(x) :
> p:=x->;
> q:=x->;
> r:=x->;
> g:=x->;
> Dp:=D(p);
Definicin de las funciones de interpolacin: r es el nmero de la funcin de interpolacin (vara entre 1 y M+1);
h_k es la longitud del elemento.
> N:=proc(r,x,h_k)
> local s,k,t; global M;
> for k from 1 to M+1 do t[k]:=(k-1)*h_k/M od ;
> if r>M+1 then `Error`
> elif r=1 then mul(x-t[s],s = 2 .. M+1)/mul(t[1] -t[s],s = 2 .. M+1)
> elif r=M+1 then mul(x-t[s],s = 1 .. M)/mul(t[r] -t[s],s = 1 .. M)
> else mul(x-t[s],s = 1 .. r-1)*mul(x-t[s],s = r+1 .. M+1)/(mul(t[r] -t[s],s = 1 .. r-1)*mul(t[r]-t[s],s = r+1 .. M+1)) fi end;
Derivada respecto a x de las funciones de interpolacin
> DN:=proc(r,x,h_k);
> diff(N(r,x,h_k),x);
> end;
Integracin de los trminos de la matriz de rigidez de un elemento genrico
> for j from 1 to M+1 do
> for s from 1 to M+1 do
> K_el[s,j]:=int(-DN(j,x,h_k)*N(s,x,h_k)*Dp(X_k+x)-
DN(j,x,h_k)*DN(s,x,h_k)*p(X_k+x)+DN(j,x,h_k)*N(s,x,h_k)*q(X_k+x)+N(j,x,h_k)*N(s,x,h_k)*r(X_k+x),x=0..h_k)od
od:
Vector del segundo miembro
> for j from 1 to M+1 do fel[j]:=int(g(x+X_k)*N(j,x,h_k),x=0..h_k) od:
> for j from 1 to L do f_e[j]:=matrix(M+1,1,0):
> for k from 1 to M+1 do f_e[j][k,1]:=evalf(subs(X_k=X[j],h_k=H[j],fel[k])) od: