結(jié)構(gòu)程序設(shè)計基礎(chǔ)作業(yè)_第1頁
結(jié)構(gòu)程序設(shè)計基礎(chǔ)作業(yè)_第2頁
結(jié)構(gòu)程序設(shè)計基礎(chǔ)作業(yè)_第3頁
結(jié)構(gòu)程序設(shè)計基礎(chǔ)作業(yè)_第4頁
結(jié)構(gòu)程序設(shè)計基礎(chǔ)作業(yè)_第5頁
已閱讀5頁,還剩9頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、3、結(jié)構(gòu)分析程序設(shè)計實(shí)踐題:上機(jī)調(diào)試教材中的TRUS訓(xùn)序,并要求給出具體算例解答: C CC TRUSS.FORC*SPACIAL TRUSS STRUCTURE ANAL YSIS*PROGRAM TRUSSIMPLICIT REAL*8 (A-H,O-Z)IMPLICIT INTEGER*4 (I-N)CHARACTER NAME*40COMMON /AT/A(18000000)COMMON /IAT/IA(2000000)A=0;IA=0WRITE(*,*)'INPUT FILE NAME?'READ(*,*)NAME;CALL OPENF(NAME)CALL DATAI

2、N(NP,NE,NF,ND,NDF,NPF,NM,NR,NCF,& IME,INAE,IIT,ILMT,IMAXA,& IX,IY ,IZ,IRR,IAE,IPF,ICKK)CALL FLMT(NP,NE,NN,NN1,NR,A(IRR+1),ND,NF,NDF,& IA(IME+1),IA(IIT+1),IA(ILMT+1)CALL FMAXA(NN1,NE,IA(ILMT+1),IA(IMAXA+1),NWK,NPF,NDF,& ICKK,IDIST,IFTOOL,IFF,IPP,ISG,ISM)CALL CONKB(NP,NE,NM,NWK,IA(IME+

3、1),A(IX+1),&A(IY+1),A(IZ+1),A(IAE+1),IA(INAE+1),& IA(ILMT+1),IA(IMAXA+1),A(ICKK+1),NN1)CALL MKFORCE(NP,NF,NPF,NCF,NN,& IA(IIT+1),A(IPF+1),A(IPP+1),A(IFTOOL+1)CALL LDLT(A(ICKK+1),IA(IMAXA+1),NN,1,3,NWK,NN1)CALL RESOLVE(A(ICKK+1),A(IFTOOL+1),IA(IMAXA+1),NN,NWK,NN1)CALL DISPLS(NP,NE,NF,NPF,

4、NM,NN,IA(IIT+1),A(IFTOOL+1),& A(IDIST+1),A(IAE+1),IA(IME+1),IA(INAE+1),A(IX+1),A(IY+1),& A(IZ+1), A(IPP+1),A(IFF+1),A(ISG+1),A(ISM+1)CALL DATAOUT(NP,NE,NPF,A(IDIST+1),A(IFF+1),A(ISG+1),A(ISM+1)CALLCLOSEF ENDCSUBROUTINE OPENF(NAME)CHARACTER NAME*40NUM=0 DO I=1,40IF(NAME(I:I).NE.' ')NU

5、M=NUM+1 ENDDOOPEN(1,FILE=NAME(1:NUM), STATUS='UNKNOWN')OPEN(2,FILE=NAME(1:NUM)/'.RES',STATUS='UNKNOWN')OPEN(3,FILE=NAME(1:NUM)/'.ERO',STATUS='UNKNOWN') RETURN ENDC CSUBROUTINE CLOSEFCLOSE(1)CLOSE(2)CLOSE(3) RETURN ENDCSUBROUTINE DATAIN(NP,NE,NF,ND,NDF,NPF,NM,N

6、R,NCF,& IME,INAE,IIT,ILMT,IMAXA,& IX,IY ,IZ,IRR,IAE,IPF,ICKK)IMPLICIT REAL*8 (A-H,O-Z)IMPLICIT INTEGER*4 (I-N)COMMON /AT/A(18000000)COMMON /IAT/IA(2000000)READ(1,*)NP,NE,NM,NR,NCFWRITE(2,701)NP,NE,NM,NR,NCF701 FORMA T(/1X,'#OUTPUT OF ORIGINAL INPUT INFORMA TION#' & 5X,'Number

7、 of jointsJOINTS=',I5& /5X,'Number of elementsELEMENTS=',I5& /5X,'Number of material property groups PROPERTY TYPES=',I5& /5X,'Number of restrained jointsRESTRAINTS=',I5& /5X,'Number of concentrative forced jointsNCF=',I5)CFORM POINTERNF=3ND=2 NDF=

8、ND*NF NPF=NP*NF IME=0INAE=IME+2*NEIIT=INAE+NEILMT=IIT+NF*NPIMAXA=ILMT+NDF*NEIX=0 IY=IX+NP IZ=IY+NP IRR=IZ+NP IAE=IRR+2*NR IPF=IAE+2*NM ICKK=IPF+4*NCFREAD(1,*)(A(IX+I),A(IY+I),A(IZ+I),I=1,NP)WRITE(2,714)(I,A(IX+I),A(IY+I),A(IZ+I),I=1,NP)714 FORMA T(/5X,'GENERA TED JOINT COORDINATES DATA'&

9、/1X,' JOINT ',15X,'X',13X,'Y',13X,'Z'& /(4X,I5,3X,3(2X,E12.6)READ(1,*)(A(IAE+2*(I-1)+1),A(IAE+2*(I-1)+2),I=1,NM)READ(1,*)(IA(IME+2*(I-1)+1),IA(IME+2*(I-1)+2),IA(INAE+I),I=1,NE)WRITE(2,606)(I,A(IAE+2*(I-1)+1),A(IAE+2*(I-1)+2),I=1,NM)WRITE(2,607)(I,IA(IME+2*(I-1)+1)

10、,IA(IME+2*(I-1)+2),& IA(INAE+I),I=1,NE)606 FORMA T(/5X,'ELEMENT MA TERAIL PROPERTIES DA TA'&/2X,'NO.',10X,'巳10X,'Ax'&/(2X,I3,2(1X,E11.5)607 FORMA T(/5X,'TRUSS ELEMENT DEFINITION DA TA'&/2X,'NO.',10X,'JOINT_1',10X,'JOINT_2',1

11、0X,'NAE'&/(2X,I3,3(10X,I5)READ(1,*)(A(IRR+2*(I-1)+1), A(IRR+2*(I-1)+2),I=1,NR)WRITE(2,608)(A(IRR+2*(I-1)+1), A(IRR+2*(I-1)+2),I=1,NR) 608 FORMA T(/5X,'JOINT RESTRAINTS DA TA' &/2X,' JOINT',10X,'RESTRAINT',&/(2X,F7.0,10X,F9.3)READ(1,*)(A(IPF+4*(I-1)+J),J=1,

12、4),I=1,NCF)WRITE(2,609)(A(IPF+4*(I-1)+J),J=1,4),I=1,NCF)609 FORMA T(/5X,'CONCENTRA TIVE FORCED JOINTS DATA'&/2X,' JOINT',10X,'Fx', 10X,'Fy',10X,'Fz'&/(2X,F7.0,3(1X,E12.6)RETURN ENDCSUBROUTINE MKFORCE(NP,NF,NPF,NCF,NN,IT,PF,PP,FTOOL)IMPLICIT REAL*8 (A-H

13、,O-Z)IMPLICIT INTEGER*4 (I-N)DIMENSION IT(NF,NP),PF(4,NCF),PP(NPF), FTOOL(NPF)PP=0;FTOOL=0DO I=1,NCFNOD=PF(1,I)DO J=1,NFPP(NF*(NOD-1)+J)=PF(J+1,I)ENDDO ENDDO DO I=1,NPDO J=1,NFLAB=IT(J,I)IF(LAB.GT.0.AND.LAB.LE.NN) THENFTOOL(LAB)=PP(NF*(I-1)+J)ENDIFENDDOENDDORETURNENDCCSUBROUTINE DATAOUT(NP,NE,NPF,DI

14、ST,FF,SG,SM)IMPLICIT REAL*8 (A-H,O-Z)IMPLICIT INTEGER*4 (I-N)DIMENSION DIST(NPF),FF(NPF),SG(NE),SM(NE)WRITE(2,715)(I,(DIST(3*(I-1)+J),J=1,3),I=1,NP)715 FORMA T(/5X,'SOLVED JOINT DISPLACEMENTS DATA'&/1X,' JOINT ',3X,8X,'Dx',12X,'Dy',12X,'Dz'& /(4X,I5,3X

15、,3(2X,E12.6)WRITE(2,716)(IE,SG(IE),SM(IE),IE=1,NE)716 FORMA T(/5X,'SOLVED ELEMENT INTERNAL FORCE DATA'&/1X,' ELEMENT ',3X,8X,'Nx',8X,'STRESS'& /(4X,I5,3X,2(2X,F12.6)WRITE(2,717)(I,(FF(3*(I-1)+J),J=1,3),I=1,NP)717 FORMA T(/5X,'SOLVED JOINT REACTION DA TA

16、9;&/1X,' JOINT ',3X,8X,'Rx',12X,'Ry',12X,'Rz'& /(4X,I5,3X,3(2X,f12.4)RETURNENDCCSUBROUTINE FLMT(NP,NE,NN,NN1,NR,RR,ND,NF,NDF,ME,IT,LMT)IMPLICIT REAL*8(A-H,O-Z)IMPLICIT INTEGER*4(I-N)C This program forms the joint&element numbering matrix IT&LMTDIMENSIO

17、N IT(NF,NP),LMT(NDF,NE),ME(ND,NE),RR(2,NR)NN=0;NN1=0;IT=0;LMT=0N=0DO I=1,NPC=0DO K=1,NRKR=RR(1,K)IF(KR.EQ.I) C=RR(2,K)ENDDONC=CC=C-NCDO J=1,NFC=C*10.0L=C+0.1C=C-LIF(L.EQ.0)THENN=N+1IT(J,I)=NELSEIT(J,I)=0ENDIFENDDOENDDONN=NNN1=NN+1DO IE=1,NEDO I=1,NDNI=ME(I,IE)DO J=1,NFLMT(I-1)*NF+J,IE)=IT(J,NI)ENDDO

18、ENDDOENDDORETURNENDCSUBROUTINE FMAXA(NN1,NE,LMT,MAXA,NWK,NPF,NDF,& ICKK,IDIST,IFTOOL,IFF,IPP,ISG,ISM)C This program forms the MDE address matrix MAXA of KIMPLICIT REAL*8 (A-H,O-Z)IMPLICIT INTEGER*4 (I-N)DIMENSION MAXA(NPF),LMT(NDF,NE)MAXA=0;NWK=0MAXA(1)=1DO I=2,NN1IP=I-1IG=IPDO IE=1,NEDO J=1,NDF

19、IF(LMT(J,IE).EQ.IP) THENDO K=1,NDFIF(LMT(K,IE).GT.0.AND.LMT(K,IE).LE.IG) IG=LMT(K,IE)ENDDOEND IFENDDOENDDOMAXA(I)=MAXA(I-1)+IP-IG+1ENDDONWK=MAXA(NN1)-1IDIST=ICKK+NWKIFTOOL=IDIST+NPFIFF=IFTOOL+NPFIPP=IFF+NPFISG=IPP+NPFISM=ISG+NERETURNENDCSUBROUTINE CONKB(NP,NE,NM,NWK,ME,X,丫,Z,AE,NAE,&LMT,MAXA,CKK

20、,NN1)IMPLICIT REAL*8 (A-H,O-Z)IMPLICIT INTEGER*4 (I-N)DIMENSION CKK(NWK),X(NP),Y(NP),Z(NP),AE(2,NM),& NAE(NE),LMT(6,NE),ME(2,NE),MAXA(NN1),& AKE(2,2),T(2,6),TT(6,2),AK(6,2),TAK(6,6)CKK=0DO 10 IE=1,NETAK=0CALL FKE(NP,NE,NM,IE,X,Y ,Z,ME,NAE,AE,AKE)CALL FT(IE,NP,NE,X,Y ,Z,ME,T)CALL MAT(2,6,T,TT

21、)AK=MA TMUL(TT,AKE)TAK=MA TMUL(AK,T)DO 220 I=1,6DO 220 J=1,6NI=LMT(I,IE)NJ=LMT(J,IE)IF(NJ-NI).GE.0.AND.NI*NJ.GT.0) THENIJ=MAXA(NJ)+NJ-NICKK(IJ)=CKK(IJ)+TAK(I,J)ENDIF220 CONTINUE10 CONTINUERETURNENDCSUBROUTINE LDLT(A,MAXA,NN,ISH,IOUT,NWK,NNM)IMPLICIT REAL*8(A-H,O-Z)IMPLICIT INTEGER*4 (I-N)DIMENSION A

22、(NWK),MAXA(NNM)IF(NN.EQ.1) RETURNDO 200 N=1,NNKN=MAXA(N)KL=KN+121027028026024029030030431032020020002010KU=MAXA(N+1)-1KH=KU-KLIF(KH)304,240,210K=N-KHIC=0KLT=KUDO 260 J=1,KHKLT=KLT-1IC=IC+1KI=MAXA(K)ND=MAXA(K+1)-KI-1IF(ND) 260,260,270KK=MIN0(IC,ND)C=0.0DO 280 L=1,KKC=C+A(KI+L)*A(KLT+L)A(KLT)=A(KLT)-C

23、K=K+1K=NB=0.0DO 300 KK=KL,KUK=K-1KI=MAXA(K)C=A(KK)/A(KI)IF(ABS(C).LT.1.0E+07) GOTO 290WRITE(IOUT,2010) N,CSTOPB=B+C*A(KK)A(KK)=CA(KN)=A(KN)-BIF(A(KN) 310,310,200IF(ISH.EQ.0) GOTO 320IF(A(KN).EQ.0.0) A(KN)=-1.0E-16GOTO 200WRITE(IOUT,2000) N,A(KN)STOPCONTINUERETURNFORMA T(/' Stop-stiffness matrix

24、not positive+ definite',/,'nonpositive pivot for equation',+ I4,/,' pivot =',E20.10)FORMAT(/,' Stop-sturm sequence check failed+ because of multiplier growth for column+ number',I4,/, ' Multiplier = ',E20.8)ENDCCSUBROUTINE RESOLVE(A,V ,MAXA,NN,NWK,NNM)IMPLICIT REA

25、L*8(A-H,O-Z)IMPLICIT INTEGER*4 (I-N)DIMENSION A(NWK),V(NN,1),MAXA(NNM)NIP=1DO IP=1,NIPDO 400 N=1,NNKL=MAXA(N)+1KU=MAXA(N+1)-1IF(KU-KL) 400,410,410410 K=NC=0.0DO 420 KK=KL,KUK=K-1420C=C+A(KK)*V(K,IP)V(N,IP尸V(N,IP)-C400CONTINUEDO 480 N=1,NNK=MAXA(N)480V(N,IP尸V(N,IP)/A(K)IF(NN.EQ.1)RETURNN=NNDO 500 L=2

26、,NNKL=MAXA(N)+1KU=MAXA(N+1)-1IF(KU-KL) 500,510,510510 K=NDO 520 KK=KL,KUK=K-1520V(K,IP)=V(K,IP)-A(KK)*V(N,IP)500N=N-1ENDDORETURNENDCCccSUBROUTINE DISPLS(NP,NE,NF,NPF,NM,NN,IT,FTOOL,& DIST,AE,ME,NAE,X,Y,Z,PP,FF,SG,SM)IMPLICIT REAL*8 (A-H,O-Z)IMPLICIT INTEGER*4 (I-N)DIMENSION IT(NF,NP),DIST(NPF),F

27、TOOL(NPF),T(2,6),& TT(6,2),AE(2,NM),ME(2,NE),NAE(NE),UE(6),U(2),& AKE(2,2),FE1(2),FE(6),FF(NPF),X(NP),丫(NP),Z(NP),& PP(NPF),SG(NE),SM(NE)SG=0;SM=0;FF=0DO I=1,NPDO J=1,NFLAB=IT(J,I)IF(LAB.EQ.0) THENDIST(NF*(I-1)+J)=0.0ELSEIF(LAB.GT.0.AND.LAB.LE.NN) THENDIST(NF*(I-1)+J)=FTOOL(LAB)ENDIFENDD

28、OENDDODO IE=1,NEN1=ME(1,IE);N2=ME(2,IE)UE=0DO J=1,NFUE(J)=DIST(NF*(N1-1)+J)UE(NF+J)=DIST(NF*(N2-1)+J)ENDDOCALL FT(IE,NP,NE,X,丫 ,Z,ME,T)CALL FKE(NP,NE,NM,IE,X,Y ,Z,ME,NAE,AE,AKE)U=MA TMUL(T,UE)FE1=MATMUL(AKE,U)CALL MAT(2,6,T,TT)FE=MA TMUL(TT,FE1)DO J=1,NFFF(NF*(N1-1)+J)=FF(NF*(N1-1)+J)+FE(J)FF(NF*(N2

29、-1)+J)=FF(NF*(N2-1)+J)+FE(NF+J)ENDDOISW=NAE(IE)AO=AE(2,ISW)SG(IE)=FE1(2)SM(IE)=FE1(2)/AOENDDODO I=1,NPFFF(I)=FF(I)-PP(I)ENDDORETURNENDCSUBROUTINE FKE(NP,NE,NM,IE,X,Y ,Z,ME,NAE,AE,AKE)IMPLICIT REAL*8(A-H,O-Z)IMPLICIT INTEGER*4(I-N)DIMENSION X(NP),Y(NP),Z(NP),ME(2,NE),NAE(NE),AE(2,NM),AKE(2,2)N1=ME(1,

30、IE)N2=ME(2,IE)X1=X(N1);Y1=Y(N1);Z1=Z(N1)X2=X(N2);Y2=Y(N2);Z2=Z(N2)BL=SQRT(X2-X1)*2+(Y2-Y1)*2+(Z2-Z1)*2)NMI=NAE(IE)E0=AE(1,NMI);A0=AE(2,NMI)C=E0*A0/BLAKE(1,1)=CAKE(1,2)=-CAKE(2,1)=-CAKE(2,2)=CRETURNENDCSUBROUTINE FT(IE,NP,NE,X,Y ,Z,ME,T)IMPLICIT REAL*8(A-H,O-Z)IMPLICIT INTEGER*4(I-N)DIMENSION X(NP),Y

31、(NP),Z(NP),ME(2,NE),T(2,6)T=0N1=ME(1,IE);N2=ME(2,IE)X1=X(N1);Y1=Y(N1);Z1=Z(N1)X2=X(N2);Y2=Y(N2);Z2=Z(N2)BL=SQRT(X2-X1)*2+(Y2-Y1)*2+(Z2-Z1)*2)CX=(X2-X1)/BLCY=(Y2-Y1)/BLCZ=(Z2-Z1)/BLT(1,1)=CX;T(2,4)=CXT(1,2)=CY;T(2,5)=CYT(1,3)=CZ;T(2,6)=CZRETURNENDCSUBROUTINE MAT(M,N,A,B)IMPLICIT REAL*8(A-H,O-Z)IMPLICIT INTEGER*4(I-N)DIMENSION A(M,N),B(N,M)DO I=1,MDO J=1,N B(J,I)=A(I,J)END DOEND DORETU

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論