構造力学 構造工学特論

BASICプログラム

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


10 REM SAVE "WARPING",A
15 REM 1994.6.22
20 REM WARPING TORSION MATRIX
30 '
40 DIM KAKOM(30,2),X(20),Y(20),CM(30),SM(4,4),TSM(40,40),F(40)
50 DIM NOKT(18),NOKMW(18),INDEX(40),REAC(40),DIS(40),STRE(30,4)
60 DIM WD(4),JT(30),GJT(30)
65 REM GRADUATE LECTURE EXAMPLE NO.1
70 DATA 7,6,4,0
80 DATA 1,2,1.75913E-2,0.31744E-5
90 DATA 2,3,1.75913E-2,0.31744E-5
100 DATA 3,4,2.89504E-2,1.41824E-5
110 DATA 4,5,2.89504E-2,1.41824E-5
120 DATA 5,6,1.75913E-2,0.31744E-5
130 DATA 6,7,1.75913E-2,0.31744E-5
140 DATA 0,0,0,0
150 DATA 10,0,0,0
160 DATA 20,0,0,0
170 DATA 35,0,1,0
180 DATA 50,0,0,0
190 DATA 60,0,0,0
200 DATA 70,0,0,0
210 DATA 2.1E+7,8.07692E+06
220 DATA 1,3,5,7
230 READ NODT,NELT,KOT,KOMW
240 '
250 FOR I=1 TO NELT
260 READ KAKOM(I,1),KAKOM(I,2),CM(I),JT(I)
270 PRINT KAKOM(I,1),KAKOM(I,2),CM(I),JT(I)
280 NEXT I
290 FOR I=1 TO NODT
300 I1=2*I-1
310 I2=2*I
320 READ X(I),Y(I),F(I1),F(I2)
330 PRINT X(I),Y(I),F(I1),F(I2)
340 NEXT I
350 READ E,G
360 PRINT E,G
370 FOR I=1 TO NELT
380 GJT(I)=G*JT(I): NEXT I
390 FOR I=1 TO KOT
400 READ NOKT(I)
410 NEXT I
420 IF KOMW=0 THEN 470
430 FOR I=1 TO KOMW
440 READ NOKMW(I)
450 NEXT I
460 '
470 NT=NODT*2
480 FOR I=1 TO NT
490 FOR J=1 TO NT
500 TSM(I,J)=0 :NEXT J,I
510 '
520 FOR NE=1 TO NELT
530 GOSUB *WTORM
540 LPRINT "  NE=";NE;SPC(5) "I=";KAKOM(NE,1);SPC(5) "J=";KAKOM(NE,2)
550 FOR I=1 TO 4
560 FOR J=1 TO 4
570 LPRINT TAB(15*(J-1));USING "##.####^^^^";SM(I,J);
580 NEXT J:LPRINT
590 NEXT I
600 '
610 GOSUB *ASMAT
620 NEXT NE
630 LPRINT :LPRINT :LPRINT
640 '
650 FOR I=1 TO NT
660 FOR J=1 TO NT
670 AA=13*(J-1):AA=AA-78*INT(AA/78)
680 LPRINT TAB(AA);USING "##.####^^^^";TSM(I,J);
690 NEXT J:LPRINT
700 NEXT I
710 '
720 FOR I=1 TO NT
730 DIS(I)=0
740 INDEX(I)=I:NEXT I
750 FOR I=1 TO KOT
760 N=2*NOKT(I)-1
770 INDEX(N)=0 :NEXT I
780 IF KOMW=0 THEN 830
790 FOR I=1 TO KOMW
800 N=2*NOKMW(I)
810 INDEX(N)=0
820 NEXT I
830 MM=0
840 FOR I=1 TO NT
850 IF INDEX(I)=0 THEN 880
860 MM=MM+1
870 INDEX(MM)=INDEX(I)
880 NEXT I
890 FOR I=1 TO MM
900 IA=INDEX(I)
910 F(I)=F(IA)
920 FOR J=1 TO MM
930 JA=INDEX(J)
940 TSM(I,J)=TSM(IA,JA)
950 NEXT J
960 NEXT I
970 LPRINT :LPRINT :LPRINT "***** SHITENSHORI *****"
980 FOR I=1 TO MM
990 FOR K=1 TO MM
1000 AA=13*(K-1):AA=AA-78*INT(AA/78)
1010 LPRINT TAB(AA);USING "##.####^^^^";TSM(I,K);
1020 NEXT K:LPRINT
1030 NEXT I
1040 '
1050 GOSUB *MATI
1060 '
1070 LPRINT :LPRINT :LPRINT "********** GYAKU **********"
1080 FOR K=1 TO MM
1090 FOR J=1 TO MM
1100 AA=13*(J-1):AA=AA-78*INT(AA/78)
1110 LPRINT TAB(AA);USING "##.####^^^^";TSM(K,J);
1120 NEXT J:LPRINT
1130 NEXT K
1140 '
1150 FOR I=1 TO MM
1160 REAC(I)=0
1170 FOR K=1 TO MM
1180 REAC(I)=REAC(I)+TSM(I,K)*F(K)
1190 NEXT K
1200 NEXT I
1210 FOR I=1 TO MM
1220 IA=INDEX(I)
1230 DIS(IA)=REAC(I)
1240 NEXT I
1250 FOR I=1 TO NT
1260 FOR J=1 TO NT
1270 TSM(I,J)=0
1280 NEXT J
1290 NEXT I
1300 FOR NE=1 TO NELT
1310 GOSUB *WTORM
1320 GOSUB *ASMAT
1330 NEXT NE
1340 FOR I=1 TO NT
1350 REAC(I)=0
1360 FOR K=1 TO NT
1370 REAC(I)=REAC(I)+TSM(I,K)*DIS(K)
1380 NEXT K
1390 NEXT I
1400 '
1410 LPRINT :LPRINT :LPRINT
1420 LPRINT "          ********** DISPLACEMENT AND REACTION **********"
1430 LPRINT "   NODE No.             K&HH             K&HH'             T  ";
1440 LPRINT "           MW"
1450 FOR I=1 TO NODT
1460 LPRINT TAB(5);I;
1470 LPRINT TAB(20);USING "##.####^^^^";DIS(2*I-1);
1480 LPRINT TAB(35);USING "##.####^^^^";DIS(2*I);
1490 LPRINT TAB(50);USING "##.####^^^^";REAC(2*I-1);
1500 LPRINT TAB(65);USING "##.####^^^^";REAC(2*I);
1510 NEXT I
1520 LPRINT :LPRINT
1530 LPRINT "      ********** TORSIONAL MOMENTS AND WARPING TORSIONS ********"
1540 LPRINT "   NELT No.             TI             MWI            TJ             MWJ"
1550 FOR NE=1 TO NELT
1560 GOSUB *WTORM
1570 FOR I=1 TO 2
1580 IA=KAKOM(NE,I)
1590 WD(2*I-1)=DIS(2*IA-1)
1600 WD(2*I)=DIS(2*IA)
1610 NEXT I
1620 FOR I=1 TO 4
1630 STRE(NE,I)=0
1640 FOR K=1 TO 4
1650 STRE(NE,I)=STRE(NE,I)+SM(I,K)*WD(K)
1660 NEXT K
1670 NEXT I
1680 LPRINT TAB(5);NE;SPC(7);
1690 FOR I=1 TO 4
1700 LPRINT SPC(4);USING "##.####^^^^";STRE(NE,I);
1710 NEXT I
1720 NEXT NE
1730 LPRINT :LPRINT
1740 LPRINT "             ********** MTP     AND   MTS  **********"
1750 LPRINT "   NELT No.           MTPI            MTSI          MTPJ            MTSJ"
1760 FOR NE=1 TO NELT
1770 GOSUB *TORSM
1780 FOR I=1 TO 2
1790 IA=KAKOM(NE,I)
1800 WD(2*I-1)=DIS(2*IA-1)
1810 WD(2*I)=DIS(2*IA)
1820 NEXT I
1830 FOR I=1 TO 4
1840 STRE(NE,I)=0
1850 NK=4*NE+I-4
1860 FOR K=1 TO 4
1870 STRE(NE,I)=STRE(NE,I)+SM(I,K)*WD(K)
1880 NEXT K: NEXT I
1890 LPRINT TAB(5);NE;SPC(7);
1900 FOR I=1 TO 4
1910 LPRINT SPC(4);USING "##.####^^^^";STRE(NE,I);
1920 NEXT I
1930 NEXT NE
1940 END
1950 '
1960 '
1970 *WTORM
1980 DEF FNSINH#(X)=(EXP(X)-EXP(-X))/2
1990 DEF FNCOSH#(X)=(EXP(X)+EXP(-X))/2
2000 II=KAKOM(NE,1)
2010 JJ=KAKOM(NE,2)
2020 XI=X(II)
2030 XJ=X(JJ)
2040 YI=Y(II)
2050 YJ=Y(JJ)
2060 AL=SQR((XJ-XI)^2+(YJ-YI)^2)
2070 MU#=SQR(GJT(NE)/(E*CM(NE)))
2080 ML#=MU#*AL
2090 DD#=2-2*FNCOSH#(ML#)+ML#*FNSINH#(ML#)
2100 C1=MU#^3*FNSINH#(ML#)/DD#*E*CM(NE)
2110 C2=MU#^2*(1-FNCOSH#(ML#))/DD#*E*CM(NE)
2120 C3=MU#*(ML#*FNCOSH#(ML#)-FNSINH#(ML#))/DD#*E*CM(NE)
2130 C4=MU#*(FNSINH#(ML#)-ML#)/DD#*E*CM(NE)
2140 SM(1,1)=C1
2150 SM(1,2)=-C2
2160 SM(1,3)=-C1
2170 SM(1,4)=-C2
2180 SM(2,1)=SM(1,2)
2190 SM(2,2)=C3
2200 SM(2,3)=-SM(1,4)
2210 SM(2,4)=C4
2220 SM(3,1)=SM(1,3)
2230 SM(3,2)=SM(2,3)
2240 SM(3,3)=SM(1,1)
2250 SM(3,4)=-SM(1,2)
2260 SM(4,1)=SM(1,4)
2270 SM(4,2)=SM(2,4)
2280 SM(4,3)=-SM(1,2)
2290 SM(4,4)=SM(2,2)
2300 RETURN
2310 '
2320 *ASMAT
2330 FOR I=1 TO 2
2340 FOR J=1 TO 2
2350 KI=(KAKOM(NE,I)-1)*2
2360 KJ=(KAKOM(NE,J)-1)*2
2370 IS=(I-1)*2
2380 JS=(J-1)*2
2390 FOR K=1 TO 2
2400 FOR L=1 TO 2
2410 KIK=KI+K
2420 KJL=KJ+L
2430 ISK=IS+K
2440 JSL=JS+L
2450 TSM(KIK,KJL)=TSM(KIK,KJL)+SM(ISK,JSL)
2460 NEXT L,K
2470 NEXT J,I
2480 RETURN
2490 '
2500 '
2510 *MATI
2520 DIM IND(40)
2530 FOR KO=1 TO MM
2540 IND(KO)=KO:NEXT
2550 FOR KO=1 TO MM
2560 W=0
2570 FOR IO=KO TO MM
2580 IF ABS(TSM(IO,1))=IND(IO) THEN 2880
2860 IR=IO
2870 GOTO 2890
2880 NEXT IO
2890 FOR JO=1 TO MM
2900 W=TSM(JO,KO)
2910 TSM(JO,KO)=TSM(JO,IR)
2920 TSM(JO,IR)=W:NEXT
2930 IND(IR)=IND(KO):IND(KO)=KO
2940 NEXT KO
2950 RETURN
2960 *TORSM
2970 DEF FNSINH#(X)=(EXP(X)-EXP(-X))/2
2980 DEF FNCOSH#(X)=(EXP(X)+EXP(-X))/2
2990 II=KAKOM(NE,1)
3000 JJ=KAKOM(NE,2)
3010 XI=X(II)
3020 XJ=X(JJ)
3030 YI=Y(II)
3040 YJ=Y(JJ)
3050 AL=SQR((XJ-XI)^2+(YJ-YI)^2)
3060 MU#=SQR(GJT(NE)/(E*CM(NE)))
3070 ML#=MU#*AL
3080 DD#=2-2*FNCOSH#(ML#)+ML#*FNSINH#(ML#)
3090 C1=MU#^3*FNSINH#(ML#)/DD#*E*CM(NE)
3100 C2=MU#^2*(1-FNCOSH#(ML#))/DD#*E*CM(NE)
3110 C3=MU#*(ML#*FNCOSH#(ML#)-FNSINH#(ML#))/DD#*E*CM(NE)
3120 C4=MU#*(FNSINH#(ML#)-ML#)/DD#*E*CM(NE)
3130 C5=GJT(NE)
3140 SM(1,1)=0
3150 SM(1,2)=-C5
3160 SM(1,3)=0
3170 SM(1,4)=0
3180 SM(2,1)=C1
3190 SM(2,2)=-C2+C5
3200 SM(2,3)=-C1
3210 SM(2,4)=-C2
3220 SM(3,1)=0
3230 SM(3,2)=0
3240 SM(3,3)=0
3250 SM(3,4)=C5
3260 SM(4,1)=-C1
3270 SM(4,2)=C2
3280 SM(4,3)=C1
3290 SM(4,4)=C2-C5
3360 RETURN