構造力学 構造工学特論

FORTRANプログラム

そりねじり(曲げねじり)格子桁(剛性マトリックス法)

C     FILE NAME **** "WGRIL.FOR"   
C     GAUSS消去法
C     斜め支承 斜角格子に対応
C     曲げねじり考慮 ある荷重状態の応力と変位の計算
C     このプログラムを直して影響線のプログラムを作った
      IMPLICIT REAL*8(A-H,O-Z)
      COMMON /BL1/X(100),Z(100),QI(120),QJ(120),CM(120)
      COMMON /BL2/KAKOM(120,2)/BL3/SM(8,8)/BL4/TSM(255,255)
      COMMON /BL6/STR(8,8)/BL7/ANGL(18),NONGL(18)/BL8/W(18,4,4)
      DIMENSION F(255),NOKXX(18),NOKZZ(18),INDEX(255),REAC(255),
     &DIS(255),STRE(120,8),NOKY(18),WD(255),NOKW(18)
1000 READ(5,10,END=2000) NODT,NELT,KOY,KOZZ,KOXX,KOW,NANGL,E,G
   10 FORMAT(7I5,2F10.0)
      WRITE(6,110)
  110 FORMAT(1H1,'*** INPUT DATA ***')
      WRITE(6,120) NODT,NELT,KOY,KOZZ,KOXX,KOW,NANGL,E,G
  120 FORMAT(1H ,10X,5H NODT,5H NELT,5H  KOY,5H KOZZ,5H KOXX,5H  KOW
     &5H ANGL,11X,1HE,14X,1HG/11X,7I5,2F15.3)
      WRITE(6,130)
  130 FORMAT(1H0,6HMENBER,3X,10HKAKOM(I,J),7X,2HQI,14X,2HQJ,14X,2HCM)
      DO 20 I=1,NELT
      READ(5,15) (KAKOM(I,J),J=1,2),QI(I),QJ(I),CM(I)
   15 FORMAT(2I5,3F10.0)
   20 WRITE(6,140) I,(KAKOM(I,J),J=1,2),QI(I),QJ(I),CM(I)
  140 FORMAT(1H ,1X,3I5,3F16.5)
      WRITE(6,150)
  150 FORMAT(1H0,5HJOINT,2X,12HX-COORDINATE,2X,12HZ-COORDINATE,7X
     &,7HY-FORCE,6X,8HZ-NEJIRI,6X,8HX-NEJIRI,6X,8HW-NEJIRI)
      DO 30 I=1,NODT
      I1=4*I-3
      I2=4*I-2
      I3=4*I-1
      I4=4*I
      READ(5,25) X(I),Z(I),F(I1),F(I2),F(I3),F(I4)
   25 FORMAT(6F10.0)
   30 WRITE(6,160) I,X(I),Z(I),F(I1),F(I2),F(I3),F(I4)
  160 FORMAT(1H ,I5,6F14.2)
      IF(NANGL.EQ.0) GO TO 800
      READ(5,810) (NONGL(I),ANGL(I),I=1,NANGL)
  810 FORMAT(I5,F10.0)
      WRITE(6,820)
  820 FORMAT(1H0,'KEISHA-SHISHO')
      WRITE(6,830) (NONGL(I),ANGL(I),I=1,NANGL)
  830 FORMAT(1H ,'JOINT',I5,'------',F15.5)
  800 WRITE(6,180)
  180 FORMAT(1H0,'KOUSOKU-JOINT')
      IF(KOY.EQ.0) GO TO 3
      READ(5,11) (NOKY(I),I=1,KOY)
      WRITE(6,190) (NOKY(I),I=1,KOY)
    3 CONTINUE
      IF(KOZZ.EQ.0) GO TO 4
      READ(5,11) (NOKZZ(I),I=1,KOZZ)
      WRITE(6,190) (NOKZZ(I),I=1,KOZZ)
    4 CONTINUE
      IF(KOXX.EQ.0) GO TO 6
      READ(5,11)(NOKXX(I),I=1,KOXX)
      WRITE(6,190) (NOKXX(I),I=1,KOXX)
    6 CONTINUE
      IF(KOW.EQ.0) GO TO 5
      READ(5,11) (NOKW(I),I=1,KOW)
      WRITE(6,190) (NOKW(I),I=1,KOW)
   11 FORMAT(14I5)
  190 FORMAT(1H ,5X,13I5)
    5 NT=NODT*4
      DO 100 I=1,NT
      DO 100 J=1,NT
  100 TSM(I,J)=0.
      DO 105 NE=1,NELT
      CALL WGRITM(E,G,NE,SN,CS)
  105 CALL ASMAT(NE)
      IF(NANGL.EQ.0) GO TO 600
      CALL SLOPE(NANGL,NODT)
  600 DO 50 I=1,NT
      DIS(I)=0.
   50 INDEX(I)=I
      DO 53 I=1,KOY
      N=4*NOKY(I)-3
   53 INDEX(N)=0
      IF(KOZZ.EQ.0) GO TO 504
      DO 55 I=1,KOZZ
      N=4*NOKZZ(I)-2
   55 INDEX(N)=0
  504 CONTINUE
      IF(KOXX.EQ.0) GO TO 505
      DO 60 I=1,KOXX
      N=4*NOKXX(I)-1
   60 INDEX(N)=0
  505 CONTINUE
      IF(KOW.EQ.0) GO TO 506
      DO 65 I=1,KOW
      N=4*NOKW(I)
   65 INDEX(N)=0
  506 CONTINUE
      MM=0
      DO 70 I=1,NT
      IF(INDEX(I).EQ.0) GO TO 70
      MM=MM+1
      INDEX(MM)=INDEX(I)
   70 CONTINUE
      DO 75 I=1,MM
      IA=INDEX(I)
      F(I)=F(IA)
      DO 75 J=1,MM
      JA=INDEX(J)
   75 TSM(I,J)=TSM(IA,JA)
C CHECK
      WRITE(6,6022)
6022 FORMAT(1H0,'SHITENSHORI')
      DO 6023 I=1,MM
6023 WRITE(6,6024) (TSM(I,J),J=1,MM)
6024 FORMAT(1H0,8E14.4)
C
      CALL MATI(MM)
      DO 80 I=1,MM
      REAC(I)=0.
      DO 80 K=1,MM
   80 REAC(I)=REAC(I)+TSM(I,K)*F(K)
      DO 85 I=1,MM
      IA=INDEX(I)
   85 DIS(IA)=REAC(I)
      IF(NANGL.EQ.0) GO TO 610
      DO 900 N=1,NANGL
      NI=NONGL(N)
      DO 920 I=1,4
      WD(I)=0.0
      DO 920 K=1,4
      KA=(NI-1)*4+K
  920 WD(I)=WD(I)+W(N,I,K)*DIS(KA)
      DO 900 I=1,4
      IA=(NI-1)*4+I
  900 DIS(IA)=WD(I)
  610 DO 81 I=1,NT
      DO 81 J=1,NT
   81 TSM(I,J)=0.
      DO 90 NE=1,NELT
      CALL WGRITM(E,G,NE,SN,CS)
   90 CALL ASMAT(NE)
      DO 95 I=1,NT
      REAC(I)=0.
      DO 95 K=1,NT
   95 REAC(I)=REAC(I)+TSM(I,K)*DIS(K)
      IF(NANGL.EQ.0) GO TO 620
      DO 700 N=1,NANGL
      NI=NONGL(N)
      DO 720 I=1,4
      WD(I)=0.0
      DO 720 K=1,4
      KA=(NI-1)*4+K
  720 WD(I)=WD(I)+W(N,K,I)*REAC(KA)
      DO 700 I=1,4
      IA=(NI-1)*4+I
  700 REAC(IA)=WD(I)
  620 WRITE(6,300)
  300 FORMAT(1H0,1X,46H********* DISPLACEMENT AND REACTION ********* )
      WRITE(6,305)
  305 FORMAT(1H0,2X,8HNODE NO.,9X,1HV,13X,2HZZ,13X,2HXX,14X,1HW,13X,2HRY
     &,13X,3HRZZ,13X,3HRXX,14X,2HRW)
      DO 310 I=1,NODT
  310 WRITE(6,315)I,DIS(4*I-3),DIS(4*I-2),DIS(4*I-1),DIS(4*I),REAC(4*I-3),
     &REAC(4*I-2),REAC(4*I-1),REAC(4*I)
  315 FORMAT(1H0,I5,5X,8E15.4)
      WRITE(6,320)
  320 FORMAT(/)
      WRITE(6,325)
  325 FORMAT(1H0,1X,36H ********** NORMAL STRSS ********** // 3X,
     &8HNELT NO.,9X,2HSI,13X,2HMI,13X,2HTI,13X,2HWI,13X,2HSJ,13X,2HMJ,13X,
     &2HTJ,13X,2HWJ)
      DO 330 NE=1,NELT
      CALL STRESS(E,G,NE,SN,CS)
      DO 400 I=1,2
      IA=KAKOM(NE,I)
      WD(4*I-3)=DIS(4*IA-3)
      WD(4*I-2)=DIS(4*IA-2)
      WD(4*I-1)=DIS(4*IA-1)
  400 WD(4*I)=DIS(4*IA)
      DO 328 I=1,8
      STRE(NE,I)=0.0
      DO 328 K=1,8
      STRE(NE,I)=STRE(NE,I)+STR(I,K)*WD(K)
  328 CONTINUE
  330 WRITE(6,335)NE,(STRE(NE,I),I=1,8)
  335 FORMAT(1H0,I5,5X,8E15.4)
      GO TO 1000
2000 STOP
      END
      SUBROUTINE WGRITM(E,G,NE,SN,CS)
      IMPLICIT REAL*8(A-H,O-Z)
      COMMON /BL1/X(100),Z(100),QI(120),QJ(120),CM(120)
      COMMON /BL2/KAKOM(120,2)/BL3/SM(8,8)
      II=KAKOM(NE,1)
      JJ=KAKOM(NE,2)
      XI=X(II)
      XJ=X(JJ)
      ZI=Z(II)
      ZJ=Z(JJ)
      AL=SQRT((XJ-XI)**2+(ZJ-ZI)**2)
      RA=SQRT(G*QJ(NE)/(E*CM(NE)))
      RL=RA*AL
      DD=RL*SINH(RL)-2*COSH(RL)+2
      DE=E*CM(NE)/DD
      SN=(ZJ-ZI)/AL
      CS=(XJ-XI)/AL
      C1=12.0*E*QI(NE)/AL**3
      C2=6.0*E*QI(NE)/AL**2
      C3=4.0*E*QI(NE)/AL
      C4=2.0*E*QI(NE)/AL
      C5=DE*RA**3*SINH(RL)
      C6=DE*RA**2*(COSH(RL)-1)
      C7=DE*RA*(RL*COSH(RL)-SINH(RL))
      C8=DE*RA*(RL-SINH(RL))
      SM(1,1)=C1
      SM(1,2)=CS*C2
      SM(1,3)=-SN*C2
      SM(1,4)=0.0
      SM(1,5)=-C1
      SM(1,6)=CS*C2
      SM(1,7)=-SN*C2
      SM(1,8)=0.0
      SM(2,2)=CS*CS*C3+SN*SN*C5
      SM(2,3)=-CS*SN*C3+CS*SN*C5
      SM(2,4)=SN*C6
      SM(2,5)=-CS*C2
      SM(2,6)=CS*CS*C4-SN*SN*C5
      SM(2,7)=-CS*SN*C4-CS*SN*C5
      SM(2,8)=SN*C6
      SM(3,3)=SN*SN*C3+CS*CS*C5
      SM(3,4)=CS*C6
      SM(3,5)=SN*C2
      SM(3,6)=-CS*SN*C4-CS*SN*C5
      SM(3,7)=SN*SN*C4-CS*CS*C5
      SM(3,8)=CS*C6
      SM(4,4)=C7
      SM(4,5)=0.0
      SM(4,6)=-SN*C6
      SM(4,7)=-CS*C6
      SM(4,8)=-C8
      SM(5,5)=C1
      SM(5,6)=-CS*C2
      SM(5,7)=SN*C2
      SM(5,8)=0.0
      SM(6,6)=CS*CS*C3+SN*SN*C5
      SM(6,7)=CS*SN*(-C3+C5)
      SM(6,8)=-SN*C6
      SM(7,7)=SN*SN*C3+CS*CS*C5
      SM(7,8)=-CS*C6
      SM(8,8)=C7
      DO 10 I=2,8
      I1=I-1
      DO 10 J=1,I1
   10 SM(I,J)=SM(J,I)
C CHECK
      WRITE(6,6022) NE
6022 FORMAT(1H0,'NE=',I3)
      DO 6023 I=1,8
6023 WRITE(6,6024) (SM(I,J),J=1,8)
6024 FORMAT(1H0,8E14.4)
C
      RETURN
      END
      SUBROUTINE ASMAT(NE)
      IMPLICIT REAL*8(A-H,O-Z)
      COMMON /BL2/KAKOM(120,2)/BL3/SM(8,8)/BL4/TSM(255,255)
      DO 40 I=1,2
      DO 40 J=1,2
      KI=(KAKOM(NE,I)-1)*4
      KJ=(KAKOM(NE,J)-1)*4
      IS=(I-1)*4
      JS=(J-1)*4
      DO 40 K=1,4
      DO 40 L=1,4
      KIK=KI+K
      KJL=KJ+L
      ISK=IS+K
      JSL=JS+L
   40 TSM(KIK,KJL)=TSM(KIK,KJL)+SM(ISK,JSL)
      RETURN
      END
      SUBROUTINE MATI(NN)
      IMPLICIT REAL*8(A-H,O-Z)
      COMMON /BL4/BI(255,255)
      DIMENSION IND(255)
      DO 102 KO=1,NN
  102 IND(KO)=KO
      DO 103 KO=1,NN
      W=0.0
      DO 104 IO=KO,NN
      IF(ABS(BI(IO,1)).LE.W) GO TO 104
      W=ABS(BI(IO,1))
      IR=IO
  104 CONTINUE
      IF(IR.EQ.KO) GO TO 106
      DO 107 JO=1,NN
      W=BI(KO,JO)
      BI(KO,JO)=BI(IR,JO)
  107 BI(IR,JO)=W
      M=IND(KO)
      IND(KO)=IND(IR)
      IND(IR)=M
  106 W=BI(KO,1)
      NNA=NN-1
      DO 108 JO=1,NNA
  108 BI(KO,JO)=BI(KO,JO+1)/W
      BI(KO,NN)=1./W
      DO 109 IO=1,NN
      IF(IO.EQ.KO) GO TO 109
      W=BI(IO,1)
      DO 110 JO=1,NNA
  110 BI(IO,JO)=BI(IO,JO+1)-W*BI(KO,JO)
      BI(IO,NN)=-W*BI(KO,NN)
  109 CONTINUE
  103 CONTINUE
      DO 111 KO=1,NNA
      IF(KO.EQ.IND(KO)) GO TO 111
      KA=KO+1
      DO 112 IO=KA,NN
      IF(KO.NE.IND(IO)) GO TO 112
      IR=IO
      GO TO 114
  112 CONTINUE
  114 DO 115 JO=1,NN
      W=BI(JO,KO)
      BI(JO,KO)=BI(JO,IR)
  115 BI(JO,IR)=W
      IND(IR)=IND(KO)
      IND(KO)=KO
  111 CONTINUE
      RETURN
      END
      SUBROUTINE STRESS(E,G,NE,SN,CS)
      IMPLICIT REAL*8(A-H,O-Z)
      COMMON /BL1/X(100),Z(100),QI(120),QJ(120),CM(120)
      COMMON /BL2/KAKOM(120,2)/BL6/STR(8,8)
      II=KAKOM(NE,1)
      JJ=KAKOM(NE,2)
      XI=X(II)
      XJ=X(JJ)
      ZI=Z(II)
      ZJ=Z(JJ)
      AL=SQRT((XJ-XI)**2+(ZJ-ZI)**2)
      RA=SQRT(G*QJ(NE)/(E*CM(NE)))
      RL=RA*AL
      DD=RL*SINH(RL)-2*COSH(RL)+2
      DE=E*CM(NE)/DD
      SN=(ZJ-ZI)/AL
      CS=(XJ-XI)/AL
      C1=12.0*E*QI(NE)/AL**3
      C2=6.0*E*QI(NE)/AL**2
      C3=4.0*E*QI(NE)/AL
      C4=2.0*E*QI(NE)/AL
      C5=DE*RA**3*SINH(RL)
      C6=DE*RA**2*(COSH(RL)-1)
      C7=DE*RA*(RL*COSH(RL)-SINH(RL))
      C8=DE*RA*(RL-SINH(RL))
      STR(1,1)=C1
      STR(1,2)=CS*C2
      STR(1,3)=-SN*C2
      STR(1,4)=0.0
      STR(1,5)=-C1
      STR(1,6)=CS*C2
      STR(1,7)=-SN*C2
      STR(1,8)=0.0
      STR(2,1)=C2
      STR(2,2)=CS*C3
      STR(2,3)=-SN*C3
      STR(2,4)=0.0
      STR(2,5)=-C2
      STR(2,6)=CS*C4
      STR(2,7)=-SN*C4
      STR(2,8)=0.0
      STR(3,1)=0.0
      STR(3,2)=SN*C5
      STR(3,3)=CS*C5
      STR(3,4)=C6
      STR(3,5)=0.0
      STR(3,6)=-SN*C5
      STR(3,7)=-CS*C5
      STR(3,8)=C6
      STR(4,1)=0.0
      STR(4,2)=SN*C6
      STR(4,3)=CS*C6
      STR(4,4)=C7
      STR(4,5)=0.0
      STR(4,6)=-SN*C6
      STR(4,7)=-CS*C6
      STR(4,8)=-C8
      STR(5,1)=-C1
      STR(5,2)=-CS*C2
      STR(5,3)=SN*C2
      STR(5,4)=0.0
      STR(5,5)=C1
      STR(5,6)=-CS*C2
      STR(5,7)=SN*C2
      STR(5,8)=0.0
      STR(6,1)=C2
      STR(6,2)=CS*C4
      STR(6,3)=-SN*C4
      STR(6,4)=0.0
      STR(6,5)=-C2
      STR(6,6)=CS*C3
      STR(6,7)=-SN*C3
      STR(6,8)=0.0
      STR(7,1)=0.0
      STR(7,2)=-SN*C5
      STR(7,3)=-CS*C5
      STR(7,4)=-C6
      STR(7,5)=0.0
      STR(7,6)=SN*C5
      STR(7,7)=CS*C5
      STR(7,8)=-C6
      STR(8,1)=0.0
      STR(8,2)=SN*C6
      STR(8,3)=CS*C6
      STR(8,4)=-C8
      STR(8,5)=0.0
      STR(8,6)=-SN*C6
      STR(8,7)=-CS*C6
      STR(8,8)=C7
C
      WRITE(6,6022)
6022 FORMAT(1H0,'OURYOKU MATRIX')
      DO 6023 I=1,8
6023 WRITE(6,6024) (STR(I,J),J=1,8)
6024 FORMAT(1H0,8E14.4)
C
      RETURN
      END
      SUBROUTINE SLOPE(NANGL,NODT)
      IMPLICIT REAL*8(A-H,O-Z)
      COMMON/BL4/TSM(255,255)/BL7/ANGL(18),NONGL(18)/BL8/W(18,4,4)
      DIMENSION SSM(4,4)
      DO 500 N=1,NANGL
      ANGL(N)=ANGL(N)*3.1416/180.
      W(N,1,1)=1.0
      W(N,1,2)=0.0
      W(N,1,3)=0.0
      W(N,1,4)=0.0
      W(N,2,1)=0.0
      W(N,2,2)=COS(ANGL(N))
      W(N,2,3)=SIN(ANGL(N))
      W(N,2,4)=0.0
      W(N,3,1)=0.0
      W(N,3,2)=-SIN(ANGL(N))
      W(N,3,3)=COS(ANGL(N))
      W(N,3,4)=0.0
      W(N,4,1)=0.0
      W(N,4,2)=0.0
      W(N,4,3)=0.0
      W(N,4,4)=1.0
      NI=NONGL(N)
      DO 500 NJ=1,NODT
      DO 520 I=1,4
      DO 520 J=1,4
      JA=(NJ-1)*4+J
      SSM(I,J)=0.0
      DO 520 K=1,4
      KA=(NI-1)*4+K
  520 SSM(I,J)=SSM(I,J)+W(N,K,I)*TSM(KA,JA)
      DO 500 I=1,4
      IA=(NI-1)*4+I
      DO 500 J=1,4
      JA=(NJ-1)*4+J
  500 TSM(IA,JA)=SSM(I,J)
      DO 530 N=1,NANGL
      NJ=NONGL(N)
      DO 530 NI=1,NODT
      DO 540 I=1,4
      IA=(NI-1)*4+I
      DO 540 J=1,4
      SSM(I,J)=0.0
      DO 540 K=1,4
      KA=(NJ-1)*4+K
  540 SSM(I,J)=SSM(I,J)+TSM(IA,KA)*W(N,K,J)
      DO 530 I=1,4
      IA=(NI-1)*4+I
      DO 530 J=1,4
      JA=(NJ-1)*4+J
  530 TSM(IA,JA)=SSM(I,J)
      RETURN
      END