Finite Element: Mid Term Part III: Develope The Element Matrix of Single Element'
Finite Element: Mid Term Part III: Develope The Element Matrix of Single Element'
> with(linalg):
Warning, new definition for norm
Warning, new definition for trace
0
0
8
0.7518796994 10
Stress matrix:
> sigma:=multiply(DD,epsilon):
> U:=scalarmul(multiply(transpose(epsilon),sigma),1/2*t*A):
Element stiffness matrix:
> k:=matrix(6,6,[]):
> for i from 1 to 6 do
746280.
7
-0.11222 10
-375950.
-375950.
-370330.
746280.
0.14981 107
-370330.
-375950.
-375950.
-0.11222 107
-0.11222 107
-370330.
0.11222 107
0
0
370330.
-375950.
-375950.
0
375950.
375950.
0
v4
-375950.
-370330.
-375950. -0.11222 107
0
370330.
375950.
0
375950.
0
7
0
0.11222 10
v6
0.149815 107
746270.
-0.112221 107 -375939. -375939.
-370330.
7
746270.
-370330.
-375939. -375939. -0.112221 107
0.149815 10
7
-370330.
0.112221 107
0
0
370330.
-0.112221 10
-375939.
-375939.
0
375939. 375939.
0
-375939.
-375939.
0
375939. 375939.
0
7
7
370330.
0
0
0.112221 10
-370330.
-0.112221 10
Element matrix of element no3 (node 5 6 4)
> k3:=matrix(6,6,[]):
> for i from 1 to 6 do
> for j from 1 to 6 do
> x1:=0.03:x2:=0.03:x3:=0:y1:=0:y2:=0.03:y3:=.03:
> k3[i,j]:=evalf(k[i,j],5)
> od:
> od:
>
> print(k3): u5
v5
u6
v6
u4
v4
375950.
0
-375950.
-375950.
0
7
7
-370330.
-0.11222 10
370330.
0
0.11222 10
7
-375950.
-370330.
0.14981 10
746280.
-0.11222 107
-370330.
0.11222 107
0
370330.
-0.11222 10
375950.
0
-375950.
-375950.
0
Element matrix of element no4 (node: 2 3 6)
> k4:=matrix(6,6,[]):
> for i from 1 to 6 do
> for j from 1 to 6 do
> x1:=0.06:x2:=0.06:x3:=0.03:y1:=0:y2:=0.03:y3:=.03:
> k4[i,j]:=evalf(k[i,j],5)
> od:
> od:
> print(k4): u2
v2
u3
v3
u6
375950.
-375950.
-375950.
375950.
0
-375950.
-375950.
0
375950.
7
7
0
0.11222 10
-370330.
-0.11222 10
370330.
7
-375950.
-370330.
0.14981 10
746280.
-0.11222 107
0
370330.
-0.11222 10
-370330.
0.11222 107
375950.
0
-375950.
-375950.
0
K1:=matrix(12,12,0):
K2:=matrix(12,12,0):
K3:=matrix(12,12,0):
K4:=matrix(12,12,0):
K1:=copyinto(submatrix(k1,1..2,1..2),K1,1,1):
K1:=copyinto(submatrix(k1,1..2,3..4),K1,1,9):
K1:=copyinto(submatrix(k1,1..2,5..6),K1,1,7):
375950.
-375950.
-375950.
375950.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
K1:=copyinto(submatrix(k1,3..4,1..2),K1,9,1):
K1:=copyinto(submatrix(k1,3..4,3..4),K1,9,9):
K1:=copyinto(submatrix(k1,3..4,5..6),K1,9,7):
K1:=copyinto(submatrix(k1,5..6,1..2),K1,7,1):
K1:=copyinto(submatrix(k1,5..6,3..4),K1,7,9):
K1:=copyinto(submatrix(k1,5..6,5..6),K1,7,7):
K2:=copyinto(submatrix(k2,1..2,1..2),K2,9,9):
K2:=copyinto(submatrix(k2,1..2,3..4),K2,9,3):
K2:=copyinto(submatrix(k2,1..2,5..6),K2,9,11):
K2:=copyinto(submatrix(k2,3..4,1..2),K2,3,9):
K2:=copyinto(submatrix(k2,3..4,3..4),K2,3,3):
K2:=copyinto(submatrix(k2,3..4,5..6),K2,3,11):
v6
> K2:=copyinto(submatrix(k2,5..6,1..2),K2,11,9):
> K2:=copyinto(submatrix(k2,5..6,3..4),K2,11,3):
> K2:=copyinto(submatrix(k2,5..6,5..6),K2,11,11):
>
> K3:=copyinto(submatrix(k3,1..4,1..4),K3,9,9):
> K3:=copyinto(submatrix(k3,1..4,5..6),K3,9,7):
>
> K3:=copyinto(submatrix(k3,5..6,1..4),K3,7,9):
> K3:=copyinto(submatrix(k3,5..6,5..6),K3,7,7):
>
> K4:=copyinto(submatrix(k4,1..4,1..4),K4,3,3):
> K4:=copyinto(submatrix(k4,1..4,5..6),K4,3,11):
>
> K4:=copyinto(submatrix(k4,5..6,1..4),K4,11,3):
> K4:=copyinto(submatrix(k4,5..6,5..6),K4,11,11):
> F:=matrix(12,1,0):
> F[6,1]:=-10:
Structure stifness after restraint
> K:=evalf(evalm(K1+K2+K3+K4),4):
> K:=delcols(K,7..8):
> K:=delcols(K,1..2):
> K:=delrows(K,7..8):
> K:=delrows(K,1..2):
> print(K):(u2 v2
u3
v3
u5
v5
u6
v6)
7
7
-376000. , -370300. , 0.1498 10 , 746300. , 0 , 0 , -0.1122 10 , -376000.
7
7
-370300. , -375900. , 0 , 0 , 746300. , 0.2996 10 , -746200. , -0.2244 10
> R:=evalf(multiply(inverse(K),F),6);
-0.0000131019
-0.0000593955
0.0000171675
-0.0000665956
R :=
-0.0000102188
-0.0000226491
0.0000110644
-0.0000252053
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>###
Calculate element stresses and principal stresses:
> restart:
> with(linalg):
Warning, new definition for norm
Warning, new definition for trace
>
>
>
>
>
>
>
E:=200e6:kN/m^
nu:=0.33:
t:=0.01:m
A:=0.00045:(area of each element)
Dd:=matrix([[1,nu,0],[nu,1,0],[0,0,(1-nu)/2]]):
mu:=E/(1-nu^2):
DD:=scalarmul(Dd,mu);(D matrix)
0.2244417013 109 0.7406576143 108
0
0
8
0.7518796994 10
>
> DD:=scalarmul(DD,1/(2*A));Matrix D divided by (2area)
0.2493796681 1012 0.8229529047 1011
11
12
DD := 0.8229529047 10
0.2493796681 10
0
0
0
0.8354218881 1011
0.03 0.03
0
0
0
0.03
0.03
0.03
0.03
0.03
0.03
0
0
-0.0000102 -0.0000226
0
0
0
0
-0.03 0.03
0
0
0.03 -0.03
0.03 -0.03
0
Gamma values of each element:
> print(Gamma);(Each row are gamma1, gamma2 and gamma3 of each element, 1..4
respectively)
-0.03
-0.03
-0.03
-0.03
0
0
0.03
0.03
0.03
0.03
BB1 := 0
-0.03
0
-0.03
-0.03
0.03
0
0
0
0
0.03
0
0
0.03
0.03
>
B matrix of element no 2x 2Area
> BB2:=stackmatrix(submatrix(B1,2..2,1..6),submatrix(B2,2..2,1..6)
,submatrix(B3,2..2,1..6));
-0.03
BB2 := 0
-0.03
0
-0.03
-0.03
0.03
0
0
0
0
0.03
0
0
0.03
0.03
>
B matrix of element no 3x 2Area
> BB3:=stackmatrix(submatrix(B1,3..3,1..6),submatrix(B2,3..3,1..6)
,submatrix(B3,3..3,1..6));
0
0
BB3 := 0
-0.03
0
-0.03
0.03
0
-0.03
0
0.03
0
0.03 0.03
0
-0.03
>
B matrix of element no 4 x 2Area
> BB4:=stackmatrix(submatrix(B1,4..4,1..6),submatrix(B2,4..4,1..6)
,submatrix(B3,4..4,1..6));
0
0.03
0
-0.03
0
0
-0.03
0
0.03
0
0
BB4 := 0
0
0.03 0.03
0
-0.03
-0.03
Element stress of element no1
> sigma(1):=evalf(evalm(DD&*BB1&*transpose(submatrix(d,1..1,1..6))
),6);
-76310.3
( 1 ) := -25182.4
-56641.7
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>###
Principal stress 1 and 2 of element no 1
> principal_stress_1:=evalf((sigma(1)[1,1]+sigma(1)[2,1])/2+((sigm
a(1)[1,1]-sigma(1)[2,1])^2/4+(sigma(1)[3,1])^2)^0.5,6);
principal_stress_1 := 11397.0
> principal_stress_2=evalf((sigma(1)[1,1]+sigma(1)[2,1])/2-((sigma
(1)[1,1]-sigma(1)[2,1])^2/4+(sigma(1)[3,1])^2)^0.5,6);
principal_stress_2 = -112890.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>###
Principal stress direction of element no1 (in degree)
> theta:=evalf(180/(Pi)*1/2*arctan(2*sigma(1)[3,1]/(sigma(1)[1,1]sigma(1)[2,1])),3);
:= 33.1
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>###
Element stress of element no2
> sigma(2):=evalf(evalm(DD&*BB2&*transpose(submatrix(d,2..2,1..6))
),6);
-28114.6
( 2 ) := -26611.
-38846.7
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>###
Principal stress 1 and 2 of element no 2
> principal_stress_1:=evalf((sigma(2)[1,1]+sigma(2)[2,1])/2+((sigm
a(2)[1,1]-sigma(2)[2,1])^2/4+(sigma(2)[3,1])^2)^0.5,6);
principal_stress_1 := 11491.3
> principal_stress_2=evalf((sigma(2)[1,1]+sigma(2)[2,1])/2-((sigma
(2)[1,1]-sigma(2)[2,1])^2/4+(sigma(2)[3,1])^2)^0.5,6);
principal_stress_2 = -66216.9
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>###
Principal stress direction of element no2 (in degree)
> theta:=evalf(180/(Pi)*1/2*arctan(2*sigma(2)[3,1]/(sigma(2)[1,1]sigma(2)[2,1])),3);
:= 44.5
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>###
Element stress of element no3
> sigma(3):=evalf(evalm(DD&*BB3&*transpose(submatrix(d,3..3,1..6))
),6);
76624.7
( 3 ) := 7953.
-9774.4
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>###
Principal stress 1 and 2 of element no 3
> principal_stress_1:=evalf((sigma(3)[1,1]+sigma(3)[2,1])/2+((sigm
a(3)[1,1]-sigma(3)[2,1])^2/4+(sigma(3)[3,1])^2)^0.5,6);
>
principal_stress_1 := 77988.9
> principal_stress_2=evalf((sigma(3)[1,1]+sigma(3)[2,1])/2-((sigma
(3)[1,1]-sigma(3)[2,1])^2/4+(sigma(3)[3,1])^2)^0.5,6);
principal_stress_2 = 6588.9
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>###
Principal stress direction of element no3 (in degree)
> theta:=evalf(180/(Pi)*1/2*arctan(2*sigma(3)[3,1]/(sigma(3)[1,1]sigma(3)[2,1])),3);
:= -7.92
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>##
Element stress of element no4
> sigma(4):=evalf(evalm(DD&*BB4&*transpose(submatrix(d,4..4,1..6))
),6);
27860.5
( 4 ) := -38806.3
-27820.1
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>###
Principal stress 1 and 2 of element no 4
> principal_stress_1:=evalf((sigma(4)[1,1]+sigma(4)[2,1])/2+((sigm
a(4)[1,1]-sigma(4)[2,1])^2/4+(sigma(4)[3,1])^2)^0.5,6);
principal_stress_1 := 37944.6
> principal_stress_2=evalf((sigma(4)[1,1]+sigma(4)[2,1])/2-((sigma
(4)[1,1]-sigma(4)[2,1])^2/4+(sigma(4)[3,1])^2)^0.5,6);
principal_stress_2 = -48890.4
<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>###
Principal stress direction of element no4 (in degree)
> theta:=evalf(180/(Pi)*1/2*arctan(2*sigma(4)[3,1]/(sigma(4)[1,1]sigma(4)[2,1])),3);
:= -19.9
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>##
Note: Small load 10 kN creats high stresses in each element due to small area and high value of E.