Question: Making a change to my original work

Hi, below is what I have. I am trying to change elenum:=Array([2,4,6,8,16])

Then I changed my E0:=evalf((map(c->c*((map(int,((B^%T).(B1).J),eta=0..1))),L))

I also changed my E2:=evalf(map(c->c*map(int,((B2^%T).(B2).J),eta=0..1)),(1/(2*L))))

My E0M:=Matrix(nodes), which I am not sure if it is correct.

Then I tried to use the for do statements, it would not allow me to do so. What i'm trying to get is the first one to be a 5x5 matrix, followed by a 9x9Matrix, followed by a 13x13 Matrix, followed by a 17x17 Matrix and also 33x33 Matrix.

Later do a E0E2.

Please help. Thanks

restart

NULLNULL

with(LinearAlgebra):``NULL

elenum := 16:

nodes := 2*elenum+1:

kx := 1:

ky := 1:

k := sqrt(kx^2+ky^2):

a := 1:

ka := k*a:

g := 9.81:

A := 1:

h := 10:

z := 0:

t := 0:NULL

interface(rtablesize = 33):

omega := g*k*tanh(k*h):

NULLNULL

NULL

`xη` := a*cos(eta/a):NULL``

`yη` := a*sin(eta/a):

L := evalf(Pi/(2*elenum)):
NULL

NULL

J0 := (diff(`yη`, eta))*`xη`-`yη`*(diff(`xη`, eta)):

J := abs(J0):NULL

b1 := Matrix([[diff(`yη`, eta)], [-(diff(`xη`, eta))]])/J: 

b2 := Matrix([[-`yη`], [`xη`]])/J:

N0 := Matrix([[-(2*(1-eta))*(eta-1/2), 4*eta*(1-eta), 2*eta*(eta-1/2)]]):

B1 := Typesetting:-delayDotProduct(b1, N0):NULL

B2 := b2.map(diff, N0, eta)

E0 := evalf(map(int, 2.*Typesetting:-delayDotProduct(B1^%T, B1)*J*L, eta = 0 .. 1))

Matrix([[0.2617993879e-1, 0.1308996939e-1, -0.6544984697e-2], [0.1308996939e-1, .1047197551, 0.1308996939e-1], [-0.6544984697e-2, 0.1308996939e-1, 0.2617993879e-1]])

(1)

``

E2 := evalf(map(int, Typesetting:-delayDotProduct(B2^%T, B2)*J/(2*L), eta = 0 .. 1))

Matrix([[11.88356909, -13.58122181, 1.697652727], [-13.58122181, 27.16244363, -13.58122181], [1.697652727, -13.58122181, 11.88356909]])

(2)

``

``

E0M := Matrix(33):

for i to elenum do nod := 2*(i-1)+1; E0M[nod .. nod+2, nod .. nod+2] := E0M[nod .. nod+2, nod .. nod+2]+E0 end do:
`` 

E0M:

E2M := Matrix(33): 

for i to elenum do nod := 2*(i-1)+1; E2M[nod .. nod+2, nod .. nod+2] := E2M[nod .. nod+2, nod .. nod+2]+E2 end do:

E2M:NULL

E0E2 := evalf(Typesetting:-delayDotProduct(1/E0M, E2M)):

`λj`, Tj := Eigenvectors(E0E2):NULL   NULL 

rj := map(sqrt, Re(`λj`)):``

``



Download 17th_Fe.mw

Please Wait...