有限元分析.docx
- 文档编号:10692272
- 上传时间:2023-05-27
- 格式:DOCX
- 页数:25
- 大小:28.71KB
有限元分析.docx
《有限元分析.docx》由会员分享,可在线阅读,更多相关《有限元分析.docx(25页珍藏版)》请在冰点文库上搜索。
有限元分析
利用matlab和有限元分析方法解决如下问题
空间桁架单元用到5个Matlab函数,分别是:
SpaceTrussElementLength(x1,y1,z1,x2,y2,z2)——该函数根据给出的第一个节点坐标和第二个节点坐标计算返回单元长度。
SpaceTrussElementStiffness(E,A,L,thetax,thetay,thetaz)——该函数根据每个空间单元桁架弹性模量、截面面积、长度以及角度计算单元刚度矩阵,返回6*6单元刚度矩阵K。
functiony=SpaceTrussAssemble(K,k,i,j)——该函数连接节点i与节点j空间桁架单元的单元刚度矩阵k,集合到整体刚度矩阵K。
每集成一个单元,返回3n*3n的刚度矩阵K。
SpaceTrussElementForce(E,A,L,thetax,thetay,thetaz,u)——该函数根据弹性模量横截面积,长度、角度以及单元位移矢量u,计算单元节点力。
该函数以标量形式返回单元节点力。
SpaceTrussElementStress(E,L,thetax,thetay,thetaz,u)——该函数根据弹性模量横截面积,长度、角度以及单元位移矢量u,计算单元应力。
该函数以标量形式返回单元应力。
functiony=SpaceTrussElementLength(x1,y1,z1,x2,y2,z2)
%SpaceTrussElementLengthThisfunctionreturnsthelengthofthe
%spacetrusselementwhosefirstnodehas
%coordinates(x1,y1,z1)andsecondnodehas
%coordinates(x2,y2,z2).
y=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)+(z2-z1)*(z2-z1));
functiony=SpaceTrussElementStiffness(E,A,L,thetax,thetay,thetaz)
%SpaceTrussElementStiffnessThisfunctionreturnstheelement
%stiffnessmatrixforaspacetruss
%elementwithmodulusofelasticityE,
%cross-sectionalareaA,lengthL,and
%anglesthetax,thetay,thetaz
%(indegrees).Thesizeoftheelement
%stiffnessmatrixis6x6.
x=thetax*pi/180;
u=thetay*pi/180;
v=thetaz*pi/180;
Cx=cos(x);
Cy=cos(u);
Cz=cos(v);
w=[Cx*CxCx*CyCx*Cz;Cy*CxCy*CyCy*Cz;Cz*CxCz*CyCz*Cz];
y=E*A/L*[w-w;-ww];
functiony=SpaceTrussAssemble(K,k,i,j)
%SpaceTrussAssembleThisfunctionassemblestheelementstiffness
%matrixkofthespacetrusselementwithnodes
%iandjintotheglobalstiffnessmatrixK.
%Thisfunctionreturnstheglobalstiffness
%matrixKaftertheelementstiffnessmatrix
%kisassembled.
K(3*i-2,3*i-2)=K(3*i-2,3*i-2)+k(1,1);
K(3*i-2,3*i-1)=K(3*i-2,3*i-1)+k(1,2);
K(3*i-2,3*i)=K(3*i-2,3*i)+k(1,3);
K(3*i-2,3*j-2)=K(3*i-2,3*j-2)+k(1,4);
K(3*i-2,3*j-1)=K(3*i-2,3*j-1)+k(1,5);
K(3*i-2,3*j)=K(3*i-2,3*j)+k(1,6);
K(3*i-1,3*i-2)=K(3*i-1,3*i-2)+k(2,1);
K(3*i-1,3*i-1)=K(3*i-1,3*i-1)+k(2,2);
K(3*i-1,3*i)=K(3*i-1,3*i)+k(2,3);
K(3*i-1,3*j-2)=K(3*i-1,3*j-2)+k(2,4);
K(3*i-1,3*j-1)=K(3*i-1,3*j-1)+k(2,5);
K(3*i-1,3*j)=K(3*i-1,3*j)+k(2,6);
K(3*i,3*i-2)=K(3*i,3*i-2)+k(3,1);
K(3*i,3*i-1)=K(3*i,3*i-1)+k(3,2);
K(3*i,3*i)=K(3*i,3*i)+k(3,3);
K(3*i,3*j-2)=K(3*i,3*j-2)+k(3,4);
K(3*i,3*j-1)=K(3*i,3*j-1)+k(3,5);
K(3*i,3*j)=K(3*i,3*j)+k(3,6);
K(3*j-2,3*i-2)=K(3*j-2,3*i-2)+k(4,1);
K(3*j-2,3*i-1)=K(3*j-2,3*i-1)+k(4,2);
K(3*j-2,3*i)=K(3*j-2,3*i)+k(4,3);
K(3*j-2,3*j-2)=K(3*j-2,3*j-2)+k(4,4);
K(3*j-2,3*j-1)=K(3*j-2,3*j-1)+k(4,5);
K(3*j-2,3*j)=K(3*j-2,3*j)+k(4,6);
K(3*j-1,3*i-2)=K(3*j-1,3*i-2)+k(5,1);
K(3*j-1,3*i-1)=K(3*j-1,3*i-1)+k(5,2);
K(3*j-1,3*i)=K(3*j-1,3*i)+k(5,3);
K(3*j-1,3*j-2)=K(3*j-1,3*j-2)+k(5,4);
K(3*j-1,3*j-1)=K(3*j-1,3*j-1)+k(5,5);
K(3*j-1,3*j)=K(3*j-1,3*j)+k(5,6);
K(3*j,3*i-2)=K(3*j,3*i-2)+k(6,1);
K(3*j,3*i-1)=K(3*j,3*i-1)+k(6,2);
K(3*j,3*i)=K(3*j,3*i)+k(6,3);
K(3*j,3*j-2)=K(3*j,3*j-2)+k(6,4);
K(3*j,3*j-1)=K(3*j,3*j-1)+k(6,5);
K(3*j,3*j)=K(3*j,3*j)+k(6,6);
y=K;
functiony=SpaceTrussElementForce(E,A,L,thetax,thetay,thetaz,u)
%SpaceTrussElementForceThisfunctionreturnstheelementforce
%giventhemodulusofelasticityE,the
%cross-sectionalareaA,thelengthL,
%theanglesthetax,thetay,thetaz
%(indegrees),andtheelementnodal
%displacementvectoru.
x=thetax*pi/180;
w=thetay*pi/180;
v=thetaz*pi/180;
Cx=cos(x);
Cy=cos(w);
Cz=cos(v);
y=E*A/L*[-Cx-Cy-CzCxCyCz]*u;
functiony=SpaceTrussElementStress(E,L,thetax,thetay,thetaz,u)
%SpaceTrussElementStressThisfunctionreturnstheelementstress
%giventhemodulusofelasticityE,the
%lengthL,theanglesthetax,thetay,
%thetaz(indegrees),andtheelement
%nodaldisplacementvectoru.
x=thetax*pi/180;
w=thetay*pi/180;
v=thetaz*pi/180;
Cx=cos(x);
Cy=cos(w);
Cz=cos(v);
y=E/L*[-Cx-Cy-CzCxCyCz]*u;
»E=210e6
E=
210000000
»A=0.005
A=
0.0050
»L1=PlaneTrussElementLength(0,0,5,7)
L1=
8.6023
»L5=PlaneTrussElementLength(0,0,5,-7)
L5=
8.6023
»L9=PlaneTrussElementLength(0,0,5,-7)
L9=
8.6023
»theta1=atan(7/5)*180/pi
theta1=
54.4623
»theta2=0
theta2=
0
»theta3=270
theta3=
270
»theta4=0
theta4=
0
»theta5=360-theta1
theta5=
305.5377
»theta6=0
theta6=
0
»theta7=270
theta7=
270
»theta8=0
theta8=
0
»theta9=theta5
theta9=
305.5377
»k1=PlaneTrussElementStiffness(E,A,L1,theta1)
k1=
1.0e+004*
4.12365.7731-4.1236-5.7731
5.77318.0824-5.7731-8.0824
-4.1236-5.77314.12365.7731
-5.7731-8.08245.77318.0824
»k2=PlaneTrussElementStiffness(E,A,5,theta2)
k2=
2100000-2100000
0000
-21000002100000
0000
»k3=PlaneTrussElementStiffness(E,A,7,theta3)
k3=
1.0e+005*
0.00000.0000-0.0000-0.0000
0.00001.5000-0.0000-1.5000
-0.0000-0.00000.00000.0000
-0.0000-1.50000.00001.5000
»k4=PlaneTrussElementStiffness(E,A,5,theta4)
k4=
2100000-2100000
0000
-21000002100000
0000
»k5=PlaneTrussElementStiffness(E,A,L5,theta5)
k5=
1.0e+004*
4.1236-5.7731-4.12365.7731
-5.77318.08245.7731-8.0824
-4.12365.77314.1236-5.7731
5.7731-8.0824-5.77318.0824
»k6=PlaneTrussElementStiffness(E,A,5,theta6)
k6=
2100000-2100000
0000
-21000002100000
0000
»k7=PlaneTrussElementStiffness(E,A,7,theta7)
k7=
1.0e+005*
0.00000.0000-0.0000-0.0000
0.00001.5000-0.0000-1.5000
-0.0000-0.00000.00000.0000
-0.0000-1.50000.00001.5000
»k8=PlaneTrussElementStiffness(E,A,5,theta8)
k8=
2100000-2100000
0000
-21000002100000
0000
»k9=PlaneTrussElementStiffness(E,A,L9,theta9)
k9=
1.0e+004*
4.1236-5.7731-4.12365.7731
-5.77318.08245.7731-8.0824
-4.12365.77314.1236-5.7731
5.7731-8.0824-5.77318.0824
»K=zeros(12,12)
K=
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
000000000000
»K=PlaneTrussAssemble(K,k1,1,2)
K=
1.0e+004*
Columns1through7
4.12365.7731-4.1236-5.7731000
5.77318.0824-5.7731-8.0824000
-4.1236-5.77314.12365.7731000
-5.7731-8.08245.77318.0824000
0000000
0000000
0000000
0000000
0000000
0000000
0000000
0000000
Columns8through12
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
»K=PlaneTrussAssemble(K,k2,1,3)
K=
1.0e+005*
Columns1through7
2.51240.5773-0.4124-0.5773-2.100000
0.57730.8082-0.5773-0.8082000
-0.4124-0.57730.41240.5773000
-0.5773-0.80820.57730.8082000
-2.10000002.100000
0000000
0000000
0000000
0000000
0000000
0000000
0000000
Columns8through12
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
»K=PlaneTrussAssemble(K,k3,2,3)
K=
1.0e+005*
Columns1through7
2.51240.5773-0.4124-0.5773-2.100000
0.57730.8082-0.5773-0.8082000
-0.4124-0.57730.41240.5773-0.0000-0.00000
-0.5773-0.80820.57732.3082-0.0000-1.50000
-2.10000-0.0000-0.00002.10000.00000
00-0.0000-1.50000.00001.50000
0000000
0000000
0000000
0000000
0000000
0000000
Columns8through12
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
00000
»K=PlaneTrussAssemble(K,k4,3,5)
K=
1.0e+005*
Columns1through7
2.51240.5773-0.4124-0.5773-2.100000
0.57730.8082-0.5773-0.8082000
-0.4124-0.57730.41240.5773-0.0000-0.00000
-0.5773-0.80820.57732.3082-0.0000-1.50000
-2.10000-0.0000-0.00004.20000.00000
00-0.0000-1.50000.00001.50000
0000000
0000000
0000-2.100000
0000000
0000000
0000000
Columns8through12
00000
00000
00000
00000
0-2.1000000
00000
00000
00000
02.1000000
00000
00000
00000
»K=PlaneTrussAssemble(K,k5,2,5)
K=
1.0e+005*
Columns1through7
2.51240.5773-0.4124-0.5773-2.100000
0.57730.8082-0.5773-0.8082000
-0.4124-0.57730.82470.0000-0.0000-0.00000
-0.5773-0.80820.00003.1165-0.0000-1.50000
-2.10000-0.0000-0.00004.20000.00000
00-0.0000-1.50000.00001.50000
0000000
0000000
00-0.41240.5773-2.100000
000.5773-0.8082000
0000000
0000000
Columns8through12
00000
00000
0-0.41240.577300
00.5773-0.808200
0-2.1000000
00000
00000
00000
02.5124-0.577300
0-0.57730.808200
00000
00000
»K=PlaneTrussAssemble(K,k6,2,4)
K=
1.0e+005*
Columns1through7
2.51240.5773-0.4124-0.5773-2.100000
0.57730.8082-0.5773-0.8082000
-0.4124-0.57732.92470.0000-0.0000-0.0000-2.1000
-0.5773-0.80820.00003.1165-0.0000-1.50000
-2.10000-0.0000-0.00004.20000.00000
00-0.0000-1.50000.00001.50000
00-2.10000002.1000
0000000
00-0.41240.5773-2.100000
000.5773-0.8082000
0000000
0000000
Columns8through12
00000
00000
0-0.41240.577300
00.5773-0.808200
0-2.1000000
00000
00000
00000
02.5124-0.577300
0
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 有限元分析