资源描述:
《固支梁有限元课程设计》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、一.题目如图所示固支梁,高3米,长15m,承受均布载荷q=10kN/,E=20GPa,u=0.167,厚度t=1m,忽略自重,按平面应力问题分析。用有限元方法计算梁的变形及应力分布,要求用矩形单元。q=10kN/要求:1.单元数目不得少于20个。2.采用矩形单元计算求解。3.计算结果并给出变形图、应力分布图、单元划分图。二、力学分析1.题目可以看做是平面应力问题故有LXM=02.单元划分图三.程序框图及程序程序框图:开始插入基本参数插入其他参数形成整体刚度矩阵形成荷载列阵引入支承条件解方程输出位移求应力输出应力结束子程序单元刚度矩阵(ASK=3)计算单元
2、刚度矩阵(ASK=1)计算单元面积(ASK=2)计算S矩阵四.源程序#include#include#defineNE30//单元数#defineNJ44//节点数#defineNZ16//支承数#defineNPJ11//节点载荷作用数#defineDD26//半带宽#defineNJ288//节点位移数intLXM=0;doubleE0=2e7;doubleMU=0.167;doubleLOU=0.0;doubleTE=1;doubleAJZ[NJ+1][3]={{0,0,0},{0,0,3},{0,1.5,3},{
3、0,3,3},{0,4.5,3},{0,6,3},{0,7.5,3},{0,9,3},{0,10.5,3},{0,12,3},{0,13.5,3},{0,15,3},{0,0,2},{0,1.5,2},{0,3,2},{0,4.5,2},{0,6,2},{0,7.5,2},{0,9,2},{0,10.5,2},{0,12,2},{0,13.5,2},{0,15,2},{0,0,1},{0,1.5,1},{0,3,1},{0,4.5,1},{0,6,1},{0,7.5,1},{0,9,1},{0,10.5,1},{0,12,1},{0,13.5,1},{0
4、,15,1},{0,0,0},{0,1.5,0},{0,3,0},{0,4.5,0},{0,6,0},{0,7.5,0},{0,9,0},{0,10.5,0},{0,12,0},{0,13.5,0},{0,15,0}};//节点坐标intJM[NE+1][5]={{0,0,0,0,0},{0,10,11,22,21},{0,9,10,21,20},{0,8,9,20,19},{0,7,8,19,18},{0,6,7,18,17},{0,5,6,17,16},{0,4,5,16,15},{0,3,4,15,14},{0,2,3,14,13},{0,1,2,
5、13,12},{0,21,22,33,32},{0,20,21,32,31},{0,19,20,31,30},{0,18,19,30,29},{0,17,18,29,28},{0,16,17,28,27},{0,15,16,27,26},{0,14,15,26,25},{0,13,14,25,24},{0,12,13,24,23},{0,32,33,44,43},{0,31,32,43,42},{0,30,31,42,41},{0,29,30,41,40},{0,28,29,40,39},{0,27,28,39,38},{0,26,27,38,37},{
6、0,25,26,37,36},{0,24,25,36,35},{0,23,24,35,34}};intNZC[NZ+1]={0,1,2,21,22,23,24,43,44,45,46,65,66,67,68,87,88};//支撑数组doublePJ[NPJ+1][2+1]={{0,0,0},{0,-7500,68},{0,-15000,70},{0,-15000,72},{0,-15000,74},{0,-15000,76},{0,-15000,78},{0,-15000,80},{0,-15000,82},{0,-15000,84},{0,-1500
7、0,86},{0,-7500,88}};//节点载荷数组//节点载荷数组doubleAE,KZ[NJ2+1][DD+1],P[NJ2+1],S[3+1][8+1],KE[8+1][8+1],SZ[3+1][5*8+1];doubleJDYL[NJ][6];//节点应力矩阵doubleDYYL[4][NE][4];//单元应力矩阵intIE,JE,ME,PE;voidDUGD(int,int);FILE*fp1,*fp2,*ab;voidmain(){intNJ1,k,IN,IM,jn,m,i,j,z,JO,ii,jj,h,dh,E,l,zl,dl,r,n
8、,o,f;doubleF,c,SIG1,SIG2,SIG3,PYL,RYL,MA