资源描述:
《有限元实验报告》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、第一个区域剖分实验及处理结果如下:(1)节点总数ND=15(2)单元总数NE=16(3)单元节点编号[数组I3(3,NE)];单元序号12345678910111213141516ijm142524532563547578586896117108711811128129101314111014111415111512(4)节点坐标[数组XY(2,ND)]节点序号123456789101112131415Xy00010210.511.2122121.52230.731.33240.541.242(5)第一类边界节点数ND1=12(6)第一类边界节点号[数组NB1(ND1
2、)]和场值[数组U1(ND1)]第一类边界节点序号123456789101112第一类边界节点号场值112.53.334.466.379.2310.141213.0814.1115.12.25.17给出有限元法程序框图及区域剖分图(如下):xy1234012345698710111212151413(1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(13)(14)(15)(16)(12)源程序如下:PROGRAMyouxianyuan01character*20filename1PARAMETER(ND=15,NE=16,ND1=12)DIMENS
3、IONI3(3,16),XY(2,15),U1(12),NB1(12),SK(15,15),U(15)OPEN(11,FILE='NE.txt',STATUS='old')DO100J=1,NE100READ(11,*)(I3(I,J),I=1,3)READ(11,*)(U1(i),i=1,ND1)DO2J=1,ND200READ(11,*)(XY(I,J),I=1,2)READ(11,*)(NB1(I),I=1,ND1)CLOSE(11)CALLMBW(NE,I3,IW)CALLUK1(ND,NE,IW,I3,XY,SK)CALLUB1(ND1,NB1,U1,ND,
4、IW,SK,U)CALLLDLT(SK,ND,IW,U,IE)write(*,*)'请输入数据文件名:'read(*,*)filename1open(6,file='hebin.txt',status='unknown')write(6,510)Uclose(6)510format(/3e15.6)ENDSUBROUTINEMBW(NE,I3,IW)DIMENSIONI3(3,NE)IW=0DO10I=1,NEM=MAX(IABS(I3(1,I)-I3(2,I)),IABS(I3(2,I)-I3(3,I)),&&IABS(I3(3,I)-I3(1,I)))IF(M+1
5、.GT.IW)IW=M+110CONTINUERETURNENDSUBROUTINEUK1(ND,NE,IW,I3,XY,SK)DIMENSIONI3(3,NE),XY(2,ND),SK(ND,IW)DIMENSIONX(3),Y(3)REALKE(3,3)DO10I=1,NDDO10J=1,IW10SK(I,J)=0.DO20L=1,NEDO30J=1,3I=I3(J,L)X(J)=XY(1,I)30Y(J)=XY(2,I)CALLUKE1(X,Y,KE)DO40J=1,3NJ=I3(J,L)DO40K=1,JNK=I3(K,L)IF(NJ.LT.NK)GOTO50
6、NK=NK-NJ+IWSK(NJ,NK)=SK(NJ,NK)+KE(J,K)GOTO4050NJ=NJ-NK+IWSK(NK,NJ)=SK(NK,NJ)+KE(J,K)NJ=NJ+NK-IW40CONTINUE20CONTINUERETURNENDSUBROUTINEUKE1(X,Y,KE)DIMENSIONX(3),Y(3),A(3),B(3)REALKE(3,3)A(1)=Y(2)-Y(3)A(2)=Y(3)-Y(1)A(3)=Y(1)-Y(2)B(1)=X(3)-X(2)B(2)=X(1)-X(3)B(3)=X(2)-X(1)S=2.*(A(1)*B(2)-A(
7、2)*B(1))DO10I=1,3DO10J=1,I10KE(I,J)=(A(I)*A(J)+B(I)*B(J))/SRETURNENDSUBROUTINEUB1(ND1,NB1,U1,ND,IW,SK,U)DIMENSIONNB1(ND1),U1(ND1),SK(ND,IW),U(ND)DO10I=1,ND10U(I)=0.DO20I=1,ND1J=NB1(I)SK(J,IW)=SK(J,IW)*1.E1020U(J)=SK(J,IW)*U1(I)RETURNENDSUBROUTINELDLT(A,N,IW,P,IE)DIMENSIONA(N,IW