线弹性小变形空间刚架静力有限元计算程序

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

元计算有限元自动生成系统所开发源代码系列线弹性小变形空间刚架静力有限元计算程序1.简介元计算()公司所开发的并行有限元程序自动生成系统(pFEPG)可根据用户需要开发出各种有限元计算程序源代码。该源代码系列即为pFEPG所开发出来的求解各学科典型问题的有限元计算程序。该组程序为线弹性小变形空间刚架静力有限元计算程序。2.starta.for,对位移场的数据进行初始化;implicitreal*8(a-h,o-z)character*12fname,filename(20)common/aa/ia(250000000)common/bb/ib(125000000)c....opendisp0filetogetthenumbersofnodesanddegreeoffreedomc....knode....numberofnodes,kdgof....numberofd.o.f.open(1,file='',form='unformatted')read(1)knode,kdgofclose(1)kvar=knode*kdgofwrite(*,*)'knode,kdgof,kvar='write(*,'(1x,4i7)')knode,kdgof,kvarkvar1=kvar+1kcoor=3kelem=31250000knb1=kdgof*knode*1if(knb1/2*2.lt.knb1)knb1=knb1+1kna4=kcoor*knode*2kna1=kdgof*knode*2kna2=kdgof*knode*2kna3=kdgof*knode*2kna5=knode*1if(kna5/2*2.lt.kna5)kna5=kna5+1knb4=kelem*1if(knb4/2*2.lt.knb4)knb4=knb4+1knb2=kvar1*1if(knb2/2*2.lt.knb2)knb2=knb2+1knb3=kvar1*1if(knb3/2*2.lt.knb3)knb3=knb3+1kna0=1kna1=kna1+kna0kna2=kna2+kna1kna3=kna3+kna2kna4=kna4+kna3kna5=kna5+kna4if(kna5-1.gt.250000000)thenwrite(*,*)'exceedmemoryofarrayia'write(*,*)'memoryofia=250000000'write(*,*)'memoryneeded=',kna5,'inprgramstart'stop55555endifknb0=1knb1=knb1+knb0knb2=knb2+knb1knb3=knb3+knb2knb4=knb4+knb3if(knb4-1.gt.125000000)thenwrite(*,*)'exceedmemoryofarrayib'write(*,*)'memoryofib=125000000'write(*,*)'memoryneeded=',knb4,'inprgramstart'stop55555endifcallstart(knode,kdgof,kcoor,kvar,*kelem,maxt,kvar1,ia(kna0),ia(kna1),ia(kna2),*ia(kna3),ia(kna4),ib(knb0),ib(knb1),ib(knb2),*ib(knb3),*filename)endsubroutinestart(knode,kdgof,kcoor,kvar,*kelem,maxt,kvar1,u0,u1,u2,*coor,inodvar,nodvar,numcol,lm,node,*filename)implicitreal*8(a-h,o-z)character*12filename(20)DIMENSIONNODVAR(KDGOF,KNODE),COOR(KCOOR,KNODE),R(3),*U0(KDGOF,KNODE),U1(KDGOF,KNODE),U2(KDGOF,KNODE),*INODVAR(KNODE),node(kelem)DIMENSIONNUMCOL(KVAR1),LM(KVAR1)CHARACTER*1MATERIALlogicalfilflgC.................................................................C.....KDGOFNUMBEROFD.O.FC.....KNODENUMBEROFNODESC.....INODVARIDDATAC.....NODVARDENOTETHEEQUATIONNUMBERCORRESPONDINGTHED.O.FC.....U0U1U2INITIALVALUEC.....COORCOORDINATESC.....NODEELEMENTNODALCONNECTIONC.................................................................6FORMAT(1X,15I4)7FORMAT(1X,8F9.3)C.......OPENIDfileOPEN(1,FILE='',FORM='UNFORMATTED',STATUS='OLD')READ(1)NUMNOD,NODDOF,((NODVAR(I,J),I=1,NODDOF),J=1,NUMNOD)CLOSE(1)callchms(kdgof,knode,NODVAR)cWRITE(*,*)'NUMNOD=',NUMNOD,'NODDOF=',NODDOFcWRITE(*,*)'ID='cWRITE(*,6)((NODVAR(I,J),I=1,NODDOF),J=1,NUMNOD)C.....GETTHENATURALNODALORDERDO12N=1,KNODEINODVAR(N)=N12CONTINUEC.....OPENORDER.NODFILEANDREADTHENODALORDERIFTHEFILEEXISTinquire(file='ORDER.NOD',exist=filflg)if(filflg)thenOPEN(1,FILE='ORDER.NOD',FORM='UNFORMATTED',STATUS='OLD')READ(1)(INODVAR(I),I=1,NUMNOD)CLOSE(1)WRITE(*,*)'NODORDER='WRITE(*,6)(INODVAR(I),I=1,NUMNOD)endifC.....GETNVBYIDNEQ=0DO20JNOD=1,NUMNODJ=INODVAR(JNOD)DO18I=1,NODDOFIF(NODVAR(I,J).NE.1)GOTO18NEQ=NEQ+1NODVAR(I,J)=NEQ18CONTINUE20CONTINUEDO30JNOD=1,NUMNODJ=INODVAR(JNOD)DO28I=1,NODDOFIF(NODVAR(I,J).GE.-1)GOTO28N=-NODVAR(I,J)-1NODVAR(I,J)=NODVAR(I,N)28CONTINUE30CONTINUEC.....OPENANDWRITETHENVFILEOPEN(8,STATUS='unknown',FILE='',FORM='UNFORMATTED')WRITE(8)((NODVAR(I,J),I=1,NODDOF),J=1,NUMNOD)CLOSE(8)cWRITE(*,*)'NUMNOD=',NUMNOD,'NODDOF=',NODDOFcWRITE(*,6)((NODVAR(I,J),I=1,NODDOF),J=1,NUMNOD)C....WRITETHEBOUNDAYCONDITIONFILEBFDACCORDINGTOTHEDISP0FILEC....OPENDISP0FILEOPEN(1,FILE='',FORM='UNFORMATTED',STATUS='OLD')READ(1)NUMNOD,NODDOF,((U0(I,J),I=1,NODDOF),J=1,NUMNOD)CLOSE(1)C....OPENBFDFILEOPEN(1,FILE='',FORM='UNFORMATTED',STATUS='unknown')WRITE(1)((U0(I,J),I=1,NODDOF),J=1,NUMNOD)CLOSE(1)C......GETTHEINITIALTIMEFROMTIME0FILEC.......OPENTIME0FileOPEN(1,FILE='',FORM='FORMATTED')READ(1,*)T0,TMAX,DTTIME=T0IT=0WRITE(*,*)'TMAX,DT,TIME,IT=',TMAX,DT,TIME,ITCLOSE(1)C.......OPENTIMEFileOPEN(1,FILE='',FORM='UNFORMATTED',STATUS='unknown')WRITE(1)TMAX,DT,TIME,ITCLOSE(1)C.......OPENCOORfileOPEN(1,FILE='',FORM='UNFORMATTED',STATUS='OLD')READ(1)NUMNOD,NCOOR,((COOR(I,J),I=1,NCOOR),J=1,NUMNOD)CLOSE(1)cWRITE(*,*)'COOR='cWRITE(*,7)((COOR(I,J),I=1,NCOOR),J=1,NUMNOD)C......GETTHEINITIALVALUEFROMTHEDATAFILESBYPREPROCESSORinquire(file='disp1',exist=filflg)if(filflg)thenopen(16,file='disp1',form='unformatted',status='old')read(16)numnod,noddof,((U0(J,N),J=1,NODDOF),N=1,NUMNOD)close(16)endifinquire(file='disp2',exist=filflg)if(filflg)thenopen(16,file='disp2',form='unformatted',status='old')read(16)numnod,noddof,((U1(J,N),J=1,NODDOF),N=1,NUMNOD)close(16)endifinquire(file='disp3',exist=filflg)if(filflg)thenopen(16,file='disp3',form='unformatted',status='old')read(16)numnod,noddof,((U2(J,N),J=1,NODDOF),N=1,NUMNOD)close(16)endifcWRITE(*,*)'U0='cWRITE(*,'(6F13.3)')((U0(J,N),J=1,NODDOF),N=1,NUMNOD)CWRITE(*,*)'U1='CWRITE(*,'(6F13.3)')((U1(J,N),J=1,NODDOF),N=1,NUMNOD)C......COMPUTETHEINITIALVALUEBYBOUND.FORzo=0.0d0cDO321N=1,NUMNODcDO100J=1,NCOORc100R(J)=COOR(J,N)cDO200J=1,NODDOFcU0(J,N)=BOUND(R,zo,J)cU1(J,N)=BOUND1(R,zo,J)cU2(J,N)=BOUND2(R,zo,J)c200CONTINUEc321CONTINUEC.......OPENANDWRITETHEINITIALVALUEFILEUNODOPEN(1,FILE='',FORM

1 / 47
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功