構造力学 構造工学特論

BASICプログラム

単純ねじり(剛性マトリックス法)

10 REM SAVE "TORSION",A
15 REM 1994.6.22
20 DIM KAKOM(30,2),X(20),Y(20),AJ(30),SM(2,2),TSM(40,40),F(40)
30 DIM NOKT(18),INDEX(40),REAC(40),DIS(40),STRE(30,2),WD(2)
35 REM GRADUATE LECTURE EXAMPLE NO.1
40 DATA 3,2,2
50 DATA 1,2,1
60 DATA 2,3,1
70 DATA 0,0,0
80 DATA 4,0,1
90 DATA 10,0,0
100 DATA 1
110 DATA 1,3
120 READ NODT,NELT,KOT
130 FOR I=1 TO NELT
140 FOR J=1 TO 2
150 READ KAKOM(I,J):NEXT J:READ AJ(I)
160 NEXT I
170 FOR I=1 TO NODT
180 READ X(I),Y(I),F(I)
190 NEXT I
200 READ G
210 FOR I=1 TO KOT
220 READ NOKT(I)
230 NEXT I
240 NT=NODT
250 FOR I=1 TO NT
260 FOR J=1 TO NT
270 TSM(I,J)=0 :NEXT J,I
280 FOR NE=1 TO NELT
290 GOSUB *TORM
300 LPRINT "  NE=";NE;SPC(5) "I=";KAKOM(NE,1);SPC(5) "J=";KAKOM(NE,2)
310 FOR I=1 TO 2
320 FOR J=1 TO 2
330 LPRINT TAB(15*(J-1));USING "##.####^^^^";SM(I,J);
340 NEXT J:LPRINT
350 NEXT I
360 GOSUB *ASMAT
370 NEXT NE
380 LPRINT :LPRINT :LPRINT
390 FOR I=1 TO NT
400 FOR J=1 TO NT
410 AA=13*(J-1):AA=AA-78*INT(AA/78)
420 LPRINT TAB(AA);USING "##.####^^^^";TSM(I,J);
430 NEXT J:LPRINT
440 NEXT I
450 FOR I=1 TO NT
460 DIS(I)=0
470 INDEX(I)=I:NEXT I
480 FOR I=1 TO KOT
490 N=NOKT(I)
500 INDEX(N)=0 :NEXT I
510 MM=0
520 FOR I=1 TO NT
530 IF INDEX(I)=0 THEN 560
540 MM=MM+1
550 INDEX(MM)=INDEX(I)
560 NEXT I
570 FOR I=1 TO MM
580 IA=INDEX(I)
590 F(I)=F(IA)
600 FOR J=1 TO MM
610 JA=INDEX(J)
620 TSM(I,J)=TSM(IA,JA) :NEXT J,I
630 LPRINT :LPRINT :LPRINT "***** SHITENSHORI *****"
640 FOR I=1 TO MM
650 FOR K=1 TO MM
660 AA=13*(K-1):AA=AA-78*INT(AA/78)
670 LPRINT TAB(AA);USING "##.####^^^^";TSM(I,K);
680 NEXT K:LPRINT
690 NEXT I
700 GOSUB *MATI
710 LPRINT :LPRINT :LPRINT "********** GYAKU **********"
720 FOR K=1 TO MM
730 FOR J=1 TO MM
740 AA=13*(J-1):AA=AA-78*INT(AA/78)
750 LPRINT TAB(AA);USING "##.####^^^^";TSM(K,J);
760 NEXT J:LPRINT
770 NEXT K
780 FOR I=1 TO MM
790  REAC(I)=0
800   FOR K=1 TO MM
810    REAC(I)=REAC(I)+TSM(I,K)*F(K)
820   NEXT K,I
830 FOR I=1 TO MM
840  IA=INDEX(I)
850  DIS(IA)=REAC(I) :NEXT I
860 FOR I=1 TO NT
870  FOR J=1 TO NT
880   TSM(I,J)=0 :NEXT J,I
890 FOR NE=1 TO NELT
900  GOSUB *TORM
910  GOSUB *ASMAT
920 NEXT NE
930 FOR I=1 TO NT
940  REAC(I)=0
950   FOR K=1 TO NT
960    REAC(I)=REAC(I)+TSM(I,K)*DIS(K)
970   NEXT K,I
980 LPRINT :LPRINT :LPRINT
990 LPRINT "          ********** TORSIONAL ANGLE AND TORSIONAL MOMENT   **********"
1000 LPRINT "   NODE No.             K&HH             T                  "
1010 FOR I=1 TO NODT
1020 LPRINT TAB(5);I;
1030 LPRINT TAB(20);USING "##.####^^^^";DIS(I);
1040 LPRINT TAB(35);USING "##.####^^^^";REAC(I);
1050 NEXT I
1060 LPRINT :LPRINT
1070 LPRINT "             ********** TORSIONAL MOMENTS **********"
1080 LPRINT "   NELT No.             TI              TJ"
1090 FOR NE=1 TO NELT
1100  GOSUB *TORM
1110   FOR I=1 TO 2
1120    IA=KAKOM(NE,I)
1130    WD(I)=DIS(IA)
1140   NEXT I
1150   FOR I=1 TO 2
1160    STRE(NE,I)=0
1170    FOR K=1 TO 2
1180     STRE(NE,I)=STRE(NE,I)+SM(I,K)*WD(K)
1190    NEXT K,I
1200  LPRINT TAB(5);NE;SPC(7);
1210 FOR I=1 TO 2
1220  LPRINT SPC(4);USING "##.####^^^^";STRE(NE,I);
1230 NEXT I,NE
1240 END
1250 *TORM
1260 II=KAKOM(NE,1)
1270 JJ=KAKOM(NE,2)
1280 XI=X(II) :XJ=X(JJ)
1290 YI=Y(II) :YJ=YJ(JJ)
1300 AL=SQR((XJ-XI)^2+(YJ-YI)^2)
1310 C1=G*AJ(NE)/AL
1320 SM(1,1)=C1
1330 SM(1,2)=-C1
1340 SM(2,1)=-C1
1350 SM(2,2)=C1
1360 RETURN
1370 *ASMAT
1380 FOR I=1 TO 2
1390  FOR J=1 TO 2
1400   KI=(KAKOM(NE,I)-1)
1410   KJ=(KAKOM(NE,J)-1)
1420   IS=(I-1)
1430   JS=(J-1)
1440   FOR K=1 TO 1
1450    FOR L=1 TO 1
1460     KIK=KI+K
1470     KJL=KJ+L
1480     ISK=IS+K
1490     JSL=JS+L
1500     TSM(KIK,KJL)=TSM(KIK,KJL)+SM(ISK,JSL)
1510    NEXT L,K
1520  NEXT J,I
1530 RETURN
1540 *MATI
1550 DIM IND(40)
1560 FOR KO=1 TO MM
1570  IND(KO)=KO:NEXT
1580 FOR KO=1 TO MM
1590 W=0
1600  FOR IO=KO TO MM
1610  IF ABS(TSM(IO,1))=IND(IO) THEN 1910
1890   IR=IO
1900   GOTO 1920
1910  NEXT IO
1920  FOR JO=1 TO MM
1930  W=TSM(JO,KO)
1940  TSM(JO,KO)=TSM(JO,IR)
1950  TSM(JO,IR)=W:NEXT
1960  IND(IR)=IND(KO):IND(KO)=KO
1970 NEXT KO
1980 RETURN