構造力学 構造工学特論

BASICプログラム

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

10 REM SAVE "WGRILL",A
1000 REM "GRILLWARP"
1010 REM GRILLAGE GIRDER
1020 REM WARPING TORSION  , DD: DOUBLE PRECISION
1030 REM 1984.3.2
1040    DIM KAKOM(30,2),X(20),Y(20),SM(8,8),TSM(40,40),F(40),NOKW(18)
1050    DIM NOKXX(18),NOKYY(18),NOKZ(18),INDEX(40),REAC(40),DIS(40)
1060    DIM STRE#(30,8),SST(40,40),QI(30),QJ(30),STR(8,8),WD(40),CM(30)
1070    DIM NONGL(18),ANGL(18),W(4,4),SSM(8,8)
1080    CLS
1090    DATA  9, 8, 6, 0, 6, 0, 6, 2.1E+7, 8.1E+6
1100    DATA  1, 2, 1.167E-3, 2.048E-6, 2.185E-5
1110    DATA  2, 3, 1.167E-3, 2.048E-6, 2.185E-5
1120    DATA  4, 5, 1.167E-3, 2.048E-6, 2.185E-5
1130    DATA  5, 6, 1.167E-3, 2.048E-6, 2.185E-5
1140    DATA  7, 8, 1.167E-3, 2.048E-6, 2.185E-5
1150    DATA  8, 9, 1.167E-3, 2.048E-6, 2.185E-5
1160    DATA  2, 5, 1.167E-3, 2.048E-6, 2.185E-5
1170    DATA  5, 8, 1.167E-3, 2.048E-6, 2.185E-5
1180    DATA       0.0,  2.58819,  0.0,  0.0,  0.0,  0.0
1190    DATA   9.65926,      0.0,  1.0,  0.0,  0.0,  0.0
1200    DATA  19.31852,  2.58819,  0.0,  0.0,  0.0,  0.0
1210    DATA   0.96593,  5.32937,  0.0,  0.0,  0.0,  0.0
1220    DATA   9.65926,      3.0,  0.0,  0.0,  0.0,  0.0
1230    DATA  18.35259,  5.32937,  0.0,  0.0,  0.0,  0.0
1240    DATA   1.93185,  8.07055,  0.0,  0.0,  0.0,  0.0
1250    DATA   9.65926,      6.0,  0.0,  0.0,  0.0,  0.0
1260    DATA  17.38667,  8.07055,  0.0,  0.0,  0.0,  0.0
1270    DATA  1, -15.0000
1280    DATA  3,  15.0000
1290    DATA  4, -15.0000
1300    DATA  6,  15.0000
1310    DATA  7, -15.0000
1320    DATA  9,  15.0000
1330    DATA  1, 3, 4, 6, 7, 9
1340    DATA  1, 3, 4, 6, 7, 9
1350    READ NODT,NELT,KOZ,KOYY,KOXX,KOW,NANGL,E,G
1360    FOR I=1 TO NELT
1370      FOR J=1 TO 2
1380      READ KAKOM(I,J):NEXT J:READ QI(I),QJ(I),CM(I)
1390    NEXT I
1400    FOR I=1 TO NODT
1410      I1=4*I-3
1420      I2=4*I-2
1430      I3=4*I-1
1440      I4=4*I
1450      READ X(I),Y(I),F(I1),F(I2),F(I3),F(I4)
1460    NEXT I
1470    IF NANGL=0  THEN 1510
1480    FOR I=1 TO NANGL
1490      READ NONGL(I),ANGL(I)
1500    NEXT I
1510    FOR I=1 TO KOZ
1520      READ NOKZ(I)
1530    NEXT I
1540    IF KOYY=0 THEN 1580
1550    FOR I=1 TO KOYY
1560      READ NOKYY(I)
1570    NEXT I
1580    IF KOXX=0 THEN 1620
1590    FOR I=1 TO KOXX
1600      READ NOKXX(I)
1610    NEXT I
1620    IF KOW=0 THEN 1660
1630    FOR I=1 TO KOW
1640      READ NOKW(I)
1650    NEXT I
1660    NT=NODT*4
1670    FOR I=1 TO NT
1680      FOR J=1 TO NT
1690    TSM(I,J)=0 :NEXT J,I
1700    PRINT:PRINT "剛性マトリックスの計算中"
1710    FOR NE=1 TO NELT
1720      GOSUB *GRILL
1730      IF NANGL=0 THEN 1820
1740      FOR NNN=1 TO NANGL
1750        IF NONGL(NNN)=II  THEN 1770
1760      NEXT NNN : GOTO 1780
1770      GOSUB *SLOPE
1780      FOR NNN=1 TO NANGL
1790        IF NONGL(NNN)=JJ THEN 1810
1800      NEXT NNN : GOTO 1820
1810      GOSUB *SLOPE
1820      PRINT "  NE=";NE;SPC(5) "I=";KAKOM(NE,1);SPC(5) "J=";KAKOM(NE,2)
1830 '    LPRINT " NE=";NE;SPC(5) "I=";KAKOM(NE,1);SPC(5) "J=";KAKOM(NE,2)
1840 '    FOR I=1 TO 8
1850 '      FOR J=1 TO 8
1860 '        AA=13*(J-1):AA=AA-104*INT(AA/104)
1870 '        LPRINT TAB(AA);USING "##.####^^^^";SM(I,J);
1880 '      NEXT J:LPRINT
1890 '    NEXT I
1900      GOSUB *ASMAT
1910    NEXT NE
1920    PRINT:PRINT "支点処理の作業中"
1930    FOR I=1 TO NT
1940      DIS(I)=0
1950    INDEX(I)=I:NEXT I
1960    FOR I=1 TO KOZ
1970      N=4*NOKZ(I)-3
1980    INDEX(N)=0 :NEXT I
1990    IF KOYY=0 THEN 2040
2000    FOR I=1 TO KOYY
2010      N=4*NOKYY(I)-2
2020      INDEX(N)=0
2030    NEXT I
2040    IF KOXX=0 THEN 2080
2050    FOR I=1 TO KOXX
2060      N=4*NOKXX(I)-1
2070    INDEX(N)=0: NEXT I
2080    IF KOW=0 THEN 2120
2090    FOR I=1 TO KOW
2100      N=4*NOKW(I)
2110    INDEX(N)=0: NEXT I
2120    MM=0
2130    FOR I=1 TO NT
2140      IF INDEX(I)=0 THEN 2170
2150      MM=MM+1
2160      INDEX(MM)=INDEX(I)
2170    NEXT I
2180    FOR I=1 TO MM
2190      IA=INDEX(I)
2200      F(I)=F(IA)
2210      FOR J=1 TO MM
2220        JA=INDEX(J)
2230        TSM(I,J)=TSM(IA,JA)
2240      NEXT J
2250    NEXT I
2260    FOR I=1 TO MM
2270      FOR J=1 TO MM
2280        SST(I,J)=TSM(I,J)
2290      NEXT J
2300    NEXT I
2310    PRINT:PRINT "逆マトリックスの計算中"
2320    GOSUB *MATI
2330 '  PRINT :LPRINT :LPRINT "***** SHITENSHORI *****"
2340 '  FOR I=1 TO MM
2350 '    FOR K=1 TO MM
2360 '      AA=13*(K-1):AA=AA-130*INT(AA/130)
2370 '      LPRINT TAB(AA);USING "##.####^^^^";SST(I,K);
2380 '    NEXT K:LPRINT
2390 '  NEXT I
2400 '  LPRINT :LPRINT "********** GYAKU **********"
2410 '  FOR K=1 TO MM
2420 '    FOR J=1 TO MM
2430 '      AA=13*(J-1):AA=AA-130*INT(AA/130)
2440 '      LPRINT TAB(AA);USING "##.####^^^^";TSM(K,J);
2450 '    NEXT J:LPRINT
2460 '  NEXT K
2470    FOR I=1 TO MM
2480      REAC(I)=0
2490      FOR K=1 TO MM
2500        REAC(I)=REAC(I)+TSM(I,K)*F(K)
2510      NEXT K
2520    NEXT I
2530    FOR I=1 TO MM
2540      IA=INDEX(I)
2550      DIS(IA)=REAC(I)
2560    NEXT
2570    FOR I=1 TO NT
2580      FOR J=1 TO NT
2590        TSM(I,J)=0
2600      NEXT J
2610    NEXT I
2620    PRINT:PRINT "剛性マトリックスの再計算中"
2630    FOR NE=1 TO NELT
2640      GOSUB *GRILL
2650      IF NANGL=0 THEN 2740
2660      FOR NNN=1 TO NANGL
2670        IF NONGL(NNN)=II  THEN 2690
2680      NEXT NNN : GOTO 2700
2690      GOSUB *SLOPE
2700      FOR NNN=1 TO NANGL
2710        IF NONGL(NNN)=JJ  THEN 2730
2720      NEXT NNN : GOTO 2740
2730      GOSUB *SLOPE
2740      GOSUB *ASMAT
2750    NEXT NE
2760    FOR I=1 TO NT
2770      REAC(I)=0
2780      FOR K=1 TO NT
2790        REAC(I)=REAC(I)+TSM(I,K)*DIS(K)
2800      NEXT K
2810    NEXT I
2820 '  LPRINT
2830 '  LPRINT "          ********** DISPLACEMENT AND REACTION **********"
2840 '  LPRINT "NODE No.      V           YY          XX          XY          RZ        RYY         RXX         RXY"
2850 '  FOR I=1 TO NODT
2860 '    LPRINT TAB(3);I;
2870 '    LPRINT TAB(8);USING "##.####^^^^";DIS(4*I-3);
2880 '    LPRINT TAB(20);USING "##.####^^^^";DIS(4*I-2);
2890 '    LPRINT TAB(32);USING "##.####^^^^";DIS(4*I-1);
2900 '    LPRINT TAB(44);USING "##.####^^^^";DIS(4*I);
2910 '    LPRINT TAB(56);USING "##.####^^^^";REAC(4*I-3);
2920 '    LPRINT TAB(68);USING "##.####^^^^";REAC(4*I-2);
2930 '    LPRINT TAB(80);USING "##.####^^^^";REAC(4*I-1);
2940 '    LPRINT TAB(92);USING "##.####^^^^";REAC(4*I);
2950 '  NEXT
2960    LPRINT:LPRINT
2970    LPRINT "             ********** MOMENTS AND SHEARS **********"
2980    LPRINT "NELT No.     SI          MI         TI        MWI         SJ         MJ         TJ        MWJ"
2990    PRINT "応力マトリックスの計算中"
3000    FOR NE=1 TO NELT
3010      PRINT "  NE=";NE;SPC(5) "I=";KAKOM(NE,1);SPC(5) "J=";KAKOM(NE,2)
3020      GOSUB *STRESS
3030      IF NANGL=0  THEN 3120
3040      FOR NNN=1 TO NANGL
3050        IF NONGL(NNN)=II THEN 3070
3060      NEXT NNN : GOTO 3080
3070      GOSUB *SLOPEX
3080      FOR NNN=1 TO NANGL
3090        IF NONGL(NNN)=JJ  THEN 3110
3100      NEXT NNN : GOTO 3111
3110      GOSUB *SLOPEX
3111    FOR I=1 TO 8
3112      FOR J=1 TO 8
3113        AA=13*(J-1):AA=AA-104*INT(AA/104)
3114        LPRINT TAB(AA);USING "##.####^^^^";STR(I,J);
3115      NEXT J:LPRINT
3116    NEXT I
3120      FOR I=1 TO 2
3130        IA=KAKOM(NE,I)
3140        WD(4*I-3)=DIS(4*IA-3)
3150        WD(4*I-2)=DIS(4*IA-2)
3160        WD(4*I-1)=DIS(4*IA-1)
3170        WD(4*I)=DIS(4*IA)
3180      NEXT I
3190      FOR I=1 TO 8
3200        STRE#(NE,I)=0
3210        FOR K=1 TO 8
3220          STRE#(NE,I)=STRE#(NE,I)+STR(I,K)*WD(K)
3230        NEXT K
3240      NEXT I
3250      LPRINT TAB(2);NE;SPC(1);
3260      FOR I=1 TO 8
3270        LPRINT SPC(1);USING "##.####^^^^";STRE#(NE,I);
3280      NEXT I
3290    NEXT NE
3300    END
3310 *GRILL
3320    DEF FNSINH#(X)=(EXP(X)-EXP(-X))/2
3330    DEF FNCOSH#(X)=(EXP(X)+EXP(-X))/2
3340    DEF FNTANH#(X)=(1-EXP(-2*X))/(1+EXP(-2*X))
3350    II=KAKOM(NE,1)
3360    JJ=KAKOM(NE,2)
3370    XI=X(II)
3380    XJ=X(JJ)
3390    YI=Y(II)
3400    YJ=Y(JJ)
3410    AL=SQR((XJ-XI)^2+(YJ-YI)^2)
3420    RA=SQR(G*QJ(NE)/(E*CM(NE)))
3430    RL=RA*AL
3440    DD#=RL*FNSINH#(RL)-2*FNCOSH#(RL)+2
3450    SN=(YJ-YI)/AL
3460    CS=(XJ-XI)/AL
3470 'PRINT "RL";RL;"EXP(RL)";EXP(RL);"FNSINH";FNSINH#(RL);"FNCOSH";FNCOSH#(RL);"FNTANH";FNTANH#(RL);"DD";DD#
3480    C1=12*E*QI(NE)/AL^3
3490    C2=6*E*QI(NE)/AL^2
3500    C3=4*E*QI(NE)/AL
3510    C4=2*E*QI(NE)/AL
3520    C5=E*CM(NE)/DD#*RA^3*FNSINH#(RL)
3530    C6=E*CM(NE)/DD#*RA^2*(FNCOSH#(RL)-1)
3540    C7=E*CM(NE)/DD#*RA*(RL*FNCOSH#(RL)-FNSINH#(RL))
3550    C8=E*CM(NE)/DD#*RA*(RL-FNSINH#(RL))
3560 'PRINT "DD";DD#;"C5";C5;"C6";C6;"C7";C7;"C8";C8
3570    SM(1,1)=C1
3580    SM(1,2)=CS*C2
3590    SM(1,3)=-SN*C2
3600    SM(1,4)=0
3610    SM(1,5)=-C1
3620    SM(1,6)=CS*C2
3630    SM(1,7)=-SN*C2
3640    SM(1,8)=0
3650    SM(2,2)=CS*CS*C3+SN*SN*C5
3660    SM(2,3)=-CS*SN*C3+CS*SN*C5
3670    SM(2,4)=SN*C6
3680    SM(2,5)=-CS*C2
3690    SM(2,6)=CS*CS*C4-SN*SN*C5
3700    SM(2,7)=-CS*SN*C4-CS*SN*C5
3710    SM(2,8)=SN*C6
3720    SM(3,3)=SN*SN*C3+CS*CS*C5
3730    SM(3,4)=CS*C6
3740    SM(3,5)=SN*C2
3750    SM(3,6)=-CS*SN*C4-CS*SN*C5
3760    SM(3,7)=SN*SN*C4-CS*CS*C5
3770    SM(3,8)=CS*C6
3780    SM(4,4)=C7
3790    SM(4,5)=0
3800    SM(4,6)=-SN*C6
3810    SM(4,7)=-CS*C6
3820    SM(4,8)=-C8
3830    SM(5,5)=C1
3840    SM(5,6)=-CS*C2
3850    SM(5,7)=SN*C2
3860    SM(5,8)=0
3870    SM(6,6)=CS^2*C3+SN^2*C5
3880    SM(6,7)=CS*SN*(-C3+C5)
3890    SM(6,8)=-SN*C6
3900    SM(7,7)=SN^2*C3+CS^2*C5
3910    SM(7,8)=-CS*C6
3920    SM(8,8)=C7
3930    FOR I=2 TO 8
3940      I1=I-1
3950      FOR J=1 TO I1
3960        SM(I,J)=SM(J,I)
3970    NEXT J,I
3980    RETURN
3990 *ASMAT
4000    FOR I=1 TO 2
4010      FOR J=1 TO 2
4020        KI=(KAKOM(NE,I)-1)*4
4030        KJ=(KAKOM(NE,J)-1)*4
4040        IS=(I-1)*4
4050        JS=(J-1)*4
4060        FOR K=1 TO 4
4070          FOR L=1 TO 4
4080            KIK=KI+K
4090            KJL=KJ+L
4100            ISK=IS+K
4110            JSL=JS+L
4120            TSM(KIK,KJL)=TSM(KIK,KJL)+SM(ISK,JSL)
4130        NEXT L,K
4140    NEXT J,I
4150    RETURN
4160 *MATI
4170    DIM IND(40)
4180    FOR KO=1 TO MM
4190    IND(KO)=KO:NEXT
4200    FOR KO=1 TO MM
4210      W=0
4220      FOR IO=KO TO MM
4230        IF ABS(TSM(IO,1))=IND(IO) THEN 4530
4510        IR=IO
4520        GOTO 4540
4530      NEXT IO
4540      FOR JO=1 TO MM
4550        W=TSM(JO,KO)
4560        TSM(JO,KO)=TSM(JO,IR)
4570      TSM(JO,IR)=W:NEXT
4580      IND(IR)=IND(KO):IND(KO)=KO
4590    NEXT KO
4600    RETURN
4610 *STRESS
4620    DEF FNSINH#(X)=(EXP(X)-EXP(-X))/2
4630    DEF FNCOSH#(X)=(EXP(X)+EXP(-X))/2
4640    II=KAKOM(NE,1)
4650    JJ=KAKOM(NE,2)
4660    XI=X(II)
4670    XJ=X(JJ)
4680    YI=Y(II)
4690    YJ=Y(JJ)
4700    AL=SQR((XJ-XI)^2+(YJ-YI)^2)
4710    RA=SQR(G*QJ(NE)/(E*CM(NE)))
4720    RL=RA*AL
4730    DD#=RL*FNSINH#(RL)-2*FNCOSH#(RL)+2
4740    SN=(YJ-YI)/AL
4750    CS=(XJ-XI)/AL
4760    C1=12*E*QI(NE)/AL^3
4770    C2=6*E*QI(NE)/AL^2
4780    C3=4*E*QI(NE)/AL
4790    C4=2*E*QI(NE)/AL
4800    C5=E*CM(NE)/DD#*RA^3*FNSINH#(RL)
4810    C6=E*CM(NE)/DD#*RA^2*(FNCOSH#(RL)-1)
4820    C7=E*CM(NE)/DD#*RA*(RL*FNCOSH#(RL)-FNSINH#(RL))
4830    C8=E*CM(NE)/DD#*RA*(RL-FNSINH#(RL))
4840    STR(1,1)=C1
4850    STR(1,2)=CS*C2
4860    STR(1,3)=-SN*C2
4870    STR(1,4)=0
4880    STR(1,5)=-C1
4890    STR(1,6)=CS*C2
4900    STR(1,7)=-SN*C2
4910    STR(1,8)=0
4920    STR(2,1)=C2
4930    STR(2,2)=CS*C3
4940    STR(2,3)=-SN*C3
4950    STR(2,4)=0
4960    STR(2,5)=-C2
4970    STR(2,6)=CS*C4
4980    STR(2,7)=-SN*C4
4990    STR(2,8)=0
5000    STR(3,1)=0
5010    STR(3,2)=SN*C5
5020    STR(3,3)=CS*C5
5030    STR(3,4)=C6
5040    STR(3,5)=0
5050    STR(3,6)=-SN*C5
5060    STR(3,7)=-CS*C5
5070    STR(3,8)=C6
5080    STR(4,1)=0
5090    STR(4,2)=SN*C6
5100    STR(4,3)=CS*C6
5110    STR(4,4)=C7
5120    STR(4,5)=0
5130    STR(4,6)=-SN*C6
5140    STR(4,7)=-CS*C6
5150    STR(4,8)=-C8
5160    STR(5,1)=-C1
5170    STR(5,2)=-CS*C2
5180    STR(5,3)=SN*C2
5190    STR(5,4)=0
5200    STR(5,5)=C1
5210    STR(5,6)=-CS*C2
5220    STR(5,7)=SN*C2
5230    STR(5,8)=0
5240    STR(6,1)=C2
5250    STR(6,2)=CS*C4
5260    STR(6,3)=-SN*C4
5270    STR(6,4)=0
5280    STR(6,5)=-C2
5290    STR(6,6)=CS*C3
5300    STR(6,7)=-SN*C3
5310    STR(6,8)=0
5320    STR(7,1)=0
5330    STR(7,2)=-SN*C5
5340    STR(7,3)=-CS*C5
5350    STR(7,4)=-C6
5360    STR(7,5)=0
5370    STR(7,6)=SN*C5
5380    STR(7,7)=CS*C5
5390    STR(7,8)=-C6
5400    STR(8,1)=0
5410    STR(8,2)=SN*C6
5420    STR(8,3)=CS*C6
5430    STR(8,4)=-C8
5440    STR(8,5)=0
5450    STR(8,6)=-SN*C6
5460    STR(8,7)=-CS*C6
5470    STR(8,8)=C7
5540    RETURN
5550 '
5560 *SLOPE
5570    ANGLR=ANGL(NNN)*3.1416/180!
5580    FOR I=1 TO 4
5590      FOR J=1 TO 4
5600        W(I,J)=0!
5610    NEXT J,I
5620    W(1,1)=1!
5630    W(2,2)=COS(ANGLR)
5640    W(2,3)=SIN(ANGLR)
5650    W(3,2)=-SIN(ANGLR)
5660    W(3,3)=COS(ANGLR)
5670    W(4,4)=1!
5680    NI=1
5690    IF NONGL(NNN)=JJ THEN NI=2
5700    FOR NJ=1 TO 2
5710      FOR I=1 TO 4
5720        FOR J=1 TO 4
5730          JA=(NJ-1)*4+J
5740          SSM(I,J)=0!
5750          FOR K=1 TO 4
5760            KA=(NI-1)*4+K
5770            SSM(I,J)=SSM(I,J)+W(K,I)*SM(KA,JA)
5780      NEXT K,J,I
5790      FOR I=1 TO 4
5800        IA=(NI-1)*4+I
5810        FOR J=1 TO 4
5820          JA=(NJ-1)*4+J
5830          SM(IA,JA)=SSM(I,J)
5840    NEXT J,I,NJ
5850    NJ=1
5860    IF NONGL(NNN)=JJ THEN NJ=2
5870    FOR NI=1 TO 2
5880      FOR I=1 TO 4
5890        IA=(NI-1)*4+I
5900        FOR J=1 TO 4
5910          SSM(I,J)=0!
5920          FOR K=1 TO 4
5930            KA=(NJ-1)*4+K
5940            SSM(I,J)=SSM(I,J)+SM(IA,KA)*W(K,J)
5950      NEXT K,J,I
5960      FOR I=1 TO 4
5970        IA=(NI-1)*4+I
5980        FOR J=1 TO 4
5990          JA=(NJ-1)*4+J
6000          SM(IA,JA)=SSM(I,J)
6010    NEXT J,I,NI
6020    RETURN
6030 '
6040 *SLOPEX
6050    ANGLR=ANGL(NNN)*3.1416/180!
6060    FOR I=1 TO 4
6070      FOR J=1 TO 4
6080        W(I,J)=0!
6090    NEXT J,I
6100    W(1,1)=1!
6110    W(2,2)=COS(ANGLR)
6120    W(2,3)=SIN(ANGLR)
6130    W(3,2)=-SIN(ANGLR)
6140    W(3,3)=COS(ANGLR)
6150    W(4,4)=1!
6160    NJ=1
6170    IF NONGL(NNN)=JJ  THEN NJ=2
6180    FOR NI=1 TO 2
6190      FOR I=1 TO 4
6200        IA=(NI-1)*4+I
6210        FOR J=1 TO 4
6220          SSM(I,J)=0!
6230          FOR K=1 TO 4
6240            KA=(NJ-1)*4+K
6250            SSM(I,J)=SSM(I,J)+STR(IA,KA)*W(K,J)
6260      NEXT K,J,I
6270      FOR I=1 TO 4
6280        IA=(NI-1)*4+I
6290        FOR  J=1 TO 4
6300          JA=(NJ-1)*4+J
6310          STR(IA,JA)=SSM(I,J)
6320    NEXT J,I,NI
6330    RETURN