Frame

  • July 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Frame as PDF for free.

More details

  • Words: 650
  • Pages: 6
J30 $DEBUG $large c program for solution of plane frames by stifness method c spaces to be reserved for various arrays dimension x(100),y(100),aa(150),ai(150),jj(150),jk(150),cx(150),cy 1(150) dimension irl(300),icrl(300),smd(6,6),s(300,300),a(300),aml(150,6) dimension ae(300),ac(300),d(300),ar(300),al(150) character*12 fname1,fname character*100 heading write(*,'(a20)')'feed input file name' read(*,'(a12)')fname1 write(*,'(a21)')'feed output file name' read(*,'(a12)')fname open(3,file=fname1,status='old') open(4,file=fname, status='new') read(3,78901) heading 78901 format(a100) write(4,78901) heading c

writing of heading of structures to be solved write(4,11) 11 format(1x,80('*')) c reading of structure parameters and elastic modulas read(3,*)m,nj,nr,nrj,e c writing of structure data n=3*nj-nr write(4,12) 12 format(/5x,'members degfree joints sup.rest restjnt, elast 1tic mod') write(4,13)m,n,nj,nr,nrj,e 13 format(/5x,i8,i8,i8,i8,i8,8x,f10.2) c reading and writing of joint coordinates write(4,14) write(4,15) do 20 j=1,nj read(3,*)j,x(j),y(j) write(4,16)j,x(j),y(j) 20 continue 14 format(10x,'joints coordinates of the structure') 15 format(/10x,'joint no.',10x,'x-coordinate',10x,'y-coordinate') 16 format(/10x,i8,10x,f12.2,10x,f12.2) c reading and writing of joints restrints write(4,17) 17 format(/10x,'joint restraints') write(4,18) 18 format(/10x,'joint',10x,'hor-rest',10x,'vert-rest',10x,'momrest') do 30 j=1,nrj read(3,*)k,kk1,kk2,kk3 ll1=3*k-2 ll2=3*k-1 ll3=3*k irl(ll1)=kk1 irl(ll2)=kk2 irl(ll3)=kk3 write(4,19)k,kk1,kk2,kk3 30 continue 19 format(/10x,i5,10x,i7,10x,i7,10x,i7) icrl(1)=irl(1) inj=3*nj do 40 k=2,inj icrl(k)=icrl(k-1)+irl(k) 40 continue c reading and writing of member properties and formation of stif c ness matrix write(4,99) 99 format(10x,'member',2x,'mls',2x,'mrs',3x,'area',8x,'momi length 1 dcx dcy') Page 1

21

22 24 25 27 28 31 32 34 35 37 38 c 41

J30 do 50 i=1,m read(3,*)i,mls,mrs,area,amoi xcl=x(mrs)-x(mls) ycl=y(mrs)-y(mls) ali=sqrt(xcl*xcl+ycl*ycl) dcx=xcl/ali dcy=ycl/ali write(4,21)i,mls,mrs,area,amoi,ali,dcx,dcy format(10x,i3,2x,i3,2x,i3,2x,E10.5,E10.5,f10.3,2X,f6.3,4x,f6.3) j1=3*mls-2 j2=3*mls-1 j3=3*mls k1=3*mrs-2 k2=3*mrs-1 k3=3*mrs scm1=e*area/ali scm2=4.0*e*amoi/ali scm3=(1.5*scm2)/ali scm4=(2*scm3)/ali if(irl(j1).eq.0)goto 22 j1=n+icrl(j1) go to 24 j1=j1-icrl(j1) if(irl(j2).eq.0)goto 25 j2=n+icrl(j2) go to 27 j2=j2-icrl(j2) if(irl(j3).eq.0)goto28 j3=n+icrl(j3) go to 31 j3=j3-icrl(j3) if(irl(k1).eq.0)goto32 k1=n+icrl(k1) go to 34 k1=k1-icrl(k1) if(irl(k2).eq.0)goto35 k2=n+icrl(k2) go to 37 k2=k2-icrl(k2) if(irl(k3).eq.0)goto38 k3=n+icrl(k3) go to 41 k3=k3-icrl(k3) formation of upper portion of stiffness matrix smd(1,1)=scm1*dcx*dcx+scm4*dcy*dcy smd(4,1)=-smd(1,1) smd(4,4)=smd(1,1) smd(1,4)=-smd(1,1) smd(1,2)=(scm1-scm4)*dcx*dcy smd(2,1)=smd(1,2) smd(4,5)=smd(1,2) smd(5,4)=smd(1,2) smd(1,5)=-smd(1,2) smd(5,1)=-smd(1,2) smd(2,4)=smd(1,5) smd(4,2)=-smd(1,2) smd(1,3)=(-scm3)*dcy smd(1,6)=smd(1,3) smd(3,4)=-smd(1,3) smd(3,1)=smd(1,3) smd(6,1)=smd(1,3) smd(6,4)=-smd(1,3) smd(4,6)=-smd(1,3) smd(4,3)=-smd(1,3) smd(2,2)=(scm1*dcy*dcy+scm4*dcx*dcx) smd(5,5)=smd(2,2) smd(2,5)=-smd(2,2) smd(5,2)=-smd(2,2) Page 2

c

50

7762 7761 c 52

J30 smd(2,3)=scm3*dcx smd(3,2)=smd(2,3) smd(2,6)=smd(2,3) smd(6,2)=smd(2,3) smd(3,5)=-smd(2,3) smd(5,3)=-smd(2,3) smd(5,6)=smd(3,5) smd(6,5)=smd(3,5) smd(3,3)=scm2 smd(6,6)=smd(3,3) smd(3,6)=scm2/2.0 smd(6,3)=smd(3,6) saving the variables for further use jj(i)=mls jk(i)=mrs aa(i)=area ai(i)=amoi al(i)=ali cx(i)=dcx cy(i)=dcy s(j1,j1)=s(j1,j1)+smd(1,1) s(j2,j1)=s(j2,j1)+smd(2,1) s(j3,j1)=s(j3,j1)+smd(3,1) s(k1,j1)=smd(4,1) s(k2,j1)=smd(5,1) s(k3,j1)=smd(6,1) s(j1,j2)=s(j1,j2)+smd(1,2) s(j2,j2)=s(j2,j2)+smd(2,2) s(j3,j2)=s(j3,j2)+smd(3,2) s(k1,j2)=smd(4,2) s(k2,j2)=smd(5,2) s(k3,j2)=smd(6,2) s(j1,j3)=s(j1,j3)+smd(1,3) s(j2,j3)=s(j2,j3)+smd(2,3) s(j3,j3)=s(j3,j3)+smd(3,3) s(k1,j3)=smd(4,3) s(k2,j3)=smd(5,3) s(k3,j3)=smd(6,3) s(j1,k1)=smd(1,4) s(j2,k1)=smd(2,4) s(j3,k1)=smd(3,4) s(k1,k1)=s(k1,k1)+smd(4,4) s(k2,k1)=s(k2,k1)+smd(5,4) s(k3,k1)=s(k3,k1)+smd(6,4) s(j1,k2)=smd(1,5) s(j2,k2)=smd(2,5) s(j3,k2)=smd(3,5) s(k1,k2)=s(k1,k2)+smd(4,5) s(k2,k2)=s(k2,k2)+smd(5,5) s(k3,k2)=s(k3,k2)+smd(6,5) s(j1,k3)=smd(1,6) s(j2,k3)=smd(2,6) s(j3,k3)=smd(3,6) s(k1,k3)=s(k1,k3)+smd(4,6) s(k2,k3)=s(k2,k3)+smd(5,6) s(k3,k3)=s(k3,k3)+smd(6,6) continue do 7761 i = 1,3*nj do 7762 j = 1,3*nj write(4,*)'row =',i,'col=',j,'*',s(i,j) continue continue printing and reading of load data write(4,52) format(/10x,'NUMBR OF LOADED JNTS',10X,'NUMBR OF LOADED MEMBERS') Page 3

J30 read(3,*)nlj,nlm write(4,51)nlj,nlM 51 FORMAT(19X,I3,20X,I3) IF(NLJ.EQ.0)GOTO 55 C READING OF JOINT LOADS WRITE(4,53) 53 FORMAT(/10X,'JOINTS',10X,'HOR LOAD',10X,'VER LOAD',10X,'MOMENT') DO 60 J=1,NLJ READ(3,*)K,a1,a2,a3 WRITE(4,352)K,a1,a2,a3 LL1=3*K-2 LL2=3*K-1 LL3=3*K A(LL1)=a1 A(LL2)=a2 A(LL3)=a3 60 CONTINUE 352 FORMAT(10X,I5,3(4x,F10.2)) 55 IF(NLM.EQ.0)GOTO 65 C READING OF FIXED END MOMENTS AND MEMBER END ACTIONS WRITE(4,56) 56 FORMAT(5X,'MEM HORLOAD',5X,'VERLOAD',5X,'MOMENT',5X,'HORLOAD',5X, 1'VERTLOAD',5X,'MOMENT') DO 70 J=1,NLM READ(3,*)I,AML(I,1),AML(I,2),AML(I,3),AML(I,4),AML(I,5),AML(I,6) WRITE(4,57)I,AML(I,1),AML(I,2),AML(I,3),AML(I,4),AML(I,5),AML(I,6) 57 FORMAT(/5X,I2,6F12.2) 70 CONTINUE DO 80 I=1,M AE(3*JJ(I)-2)=AE(3*JJ(I)-2)-AML(I,1)*CX(I)+AML(I,2)*CY(I) AE(3*JJ(I)-1)=AE(3*JJ(I)-1)-AML(I,1)*CY(I)-AML(I,2)*CX(I) AE(3*JJ(I))=AE(3*JJ(I))-AML(I,3) AE(3*JK(I)-2)=AE(3*JK(I)-2)-AML(I,4)*CX(I)+AML(I,5)*CY(I) AE(3*JK(I)-1)=AE(3*JK(I)-1)-AML(I,4)*CY(I)-AML(I,5)*CX(I) AE(3*JK(I))=AE(3*JK(I))-AML(I,6) 80 CONTINUE 65 DO 90 J=1,INJ IF(IRL(J).EQ.0) GOTO 66 K=N+ICRL(J) GOTO 67 66 K=J-ICRL(J) 67 AC(K)=A(J)+AE(J) 90 continue NSZ=N NBAND=N IA=0 DO 200 I=1,NSZ DO 300 J=1,NBAND IB=IA+J IF(IB.LE.NSZ)GOTO 201 S(I,J)=0 GOTO 300 201 S(I,J)=S(I,IB) 300 CONTINUE IA=IA+1 200 CONTINUE DO 400 IA=1,NSZ I=IA DO 500 IB=2,NBAND I=I+1 B=S(IA,IB) IF(B)401,500,401 401 C=S(IA,IB)/S(IA,1) J=0 DO 550 K=IB,NBAND J=J+1 ZZ=S(IA,K) IF(ZZ)551,550,551 Page 4

J30 551 550 500 400 560 553

556 555 552 180

S(I,J)=S(I,J)-C*S(IA,K) CONTINUE S(IA,IB)=C AC(I)=AC(I)-(C*AC(IA)) CONTINUE AC(IA)=AC(IA)/S(IA,1) CONTINUE IA=NSZ ia=ia-1 IF(IA)552,552,553 IB=IA DO 555 K=2,NBAND IB=IB+1 QQ=S(IA,K) IF(QQ)556,555,556 AC(IA)=AC(IA)-(S(IA,K)*AC(IB)) CONTINUE GOTO 560 do 180 j=1,n d(j)=ac(j) continue

n1=n+1 do 190 k=n1,inj ar(k)=-ac(k) do 190 j=1,n ar(k)=ar(k)+s(k,j)*d(j) 190 continue

111 110

121 120

j=n1 do 110 je=inj,1,-1 if(irl(je).eq.0)goto111 d(je)=0 goto110 j=j-1 d(je)=d(j) continue k=n do 120 ke=1,inj if(irl(ke).eq.1) goto121 ar(ke)=0 goto120 k=k+1 ar(ke)=ar(k) continue

WRITE(4,150) WRITE(4,151) 151 FORMAT(/6X,'JNTN',6X,'HDEF',6X,'VDEF',6X,'ROTA',6X,'HREA',6X,'VERA 1',6X,'MOMR') WRITE(4,150) do 130 je=3,inj,3 write(4,131)je/3,d(je-2),d(je-1),d(je),ar(je-2),ar(je-1),ar(je) 131 format(5x,i2,3f10.5,3f10.3) 130 continue C CALCULATION OF MEMBER END ACTIONS WRITE(4,150) WRITE(4,141) 141 FORMAT(/2X,'MEMB',6X,'LAFO',6X,'LSFO',6X,'LMOM',6X,'RAFO',6X,'RSF 1O',6X,'RMOM') WRITE(4,150) DO 140 I=1,M J1=3*JJ(I)-2 J2=3*JJ(I)-1 Page 5

J30 J3=3*JJ(I) K1=3*JK(I)-2 K2=3*JK(I)-1 K3=3*JK(I) WRITE(*,*)E,AA(I),AL(I) SCM1=E*AA(I)/AL(I) SCM2=4.0*AI(I)*E/AL(I) SCM3=1.5*SCM2/AL(I) SCM4=2.0*SCM3/AL(I) AML(I,1)=AML(I,1)+SCM1*((D(J1)-D(K1))*CX(I)+(D(J2)-D(K2))*CY(I)) AML(I,2)=AML(I,2)+SCM4*(-(D(J1)-D(K1))*CY(I)+(D(J2)-D(K2))*CX(I)) 1+SCM3*(D(J3)+D(K3)) AML(I,3)=AML(I,3)+SCM3*(-(D(J1)-D(K1))*CY(I)+(D(J2)-D(K2))*CX(I)) 1+SCM2*(D(J3)+D(K3)/2.0) AML(I,4)=AML(I,4)+SCM1*(-(D(J1)-D(K1))*CX(I)-(D(J2)-D(K2))*CY(I)) AML(I,5)=AML(I,5)+SCM4*((D(J1)-D(K1))*CY(I)-(D(J2)-D(K2))*CX(I))1SCM3*(D(J3)+D(K3)) AML(I,6)=AML(I,6)+SCM3*(-(D(J1)-D(K1))*CY(I)+(D(J2)-D(K2))*CX(I))+ 1SCM2*(D(J3)/2.0+D(K3)) WRITE(4,142)I,AML(I,1),AML(I,2),AML(I,3),AML(I,4),AML(I,5),AML(I, 16) 142 FORMAT(/2X,I3,3X,6F10.2) 140 CONTINUE 150 FORMAT(/5X,70('*')) STOP END

Page 6

Related Documents

Frame
November 2019 45
Frame
July 2020 29
Frame Relay
November 2019 26
Ribbon Frame
April 2020 16
Frame-0247
December 2019 19