# Computer programs for general instability

## Computer programs for general instability

Appendix IV Computer programs for general instability Kendrick Part I: KENDRIC1.EXE This program calculates the general instability buckling pressure...

Appendix IV Computer programs for general instability

Kendrick Part I: KENDRIC1.EXE This program calculates the general instability buckling pressure for a circular cylinder, stiffened by equal-strength ring frames, spaced at equal intervals and subjected to uniform external pressure. The program is based on Kendrick’s Part I theory, which assumes that the vessel is simply supported at its ends, and fails elastically. The program is interactive, and the data should be fed in as follows: N = number of rings LF = frame spacing LB = bulkhead spacing H = shell thickness A = mean shell radius AF = sectional area of a typical frame IX = second moment of area of a typical frame about its x–x axis EC = eccentricity of frame centroid (e positive inwards) E = Young’s modulus of elasticity NU = Poisson’s ratio NMAX = maximum number of lobes into which the vessel is likely to buckle. (It should be ensured that NMAX is sufficiently large to obtain a minimum value of Pcr.)

Kendrick Part III: KENDPT3.EXE A, H, N, LF, AF, IX, EC, NMAX, E, NU

Bryant: BRYANT.EXE LF, LB, A, H, Ieff, E, NU where Ieff is the effective second moment of area of ring/shell combination.160 448 © Carl T. F. Ross, 2011

Appendix IV

449

A listing for KENDRIC1.BAS is given below: 100 CLS 110 PRINT : PRINT “GENERAL INSTABILITY OF RINGREINFORCED CYLINDERS-KENDRICK PART 1” PRINT “Program by Dr. C.T.F. Ross” 120 INPUT “NUMBER OF RINGS=”; N 130 INPUT “FRAME SPACING=”; LF 140 INPUT “BULKHEAD SPACING=”; LB 150 INPUT “SHELL THICKNESS=”; H 160 INPUT “MEAN RADIUS=”; A 170 INPUT “FRAME AREA=”; AF 180 INPUT “2ND MOA ABOUT HORIZONTAL AXIS=”; IX 190 INPUT “ECCENTRICITY OF FRAME (e +VE INWARDS)=”; EC 200 INPUT “ELASTIC MODULUS=”; E 210 INPUT “POISSON’S RATIO=”; NU 260 K0 = -H * LF / (AF + H * LF) 270 K1 = -AF * LF / (AF + H * LF) 300 W0 = (N + 1) / 2 310 W10 = .5: W11 = .5: W12 = .5: W13 = .5: W14 = .5 320 PI = 3.1415926536# 330 INPUT “MAXIMUM NUMBER OF LOBES=”; NMAX 400 FOR LO = 2 TO NMAX 410 N21 = (LO ^ 2 - 1) 420 N2 = LO ^ 2 430 A10 = (PI * E * W0 / A) * (N21 ^ 2 * IX / A ^ 2 + AF * (N21 ^ 2 * EC ^ 2 / A ^ 2 + 1 + 2 * EC / A - 2 * N2 * EC / A)) 440 A10 = A10 + (E * H ^ 3 / (12 * A * (1 - NU ^ 2))) * (PI ^ 5 * A ^ 2 * W14 / LB ^ 3 + (2 * PI ^ 3 * W12 / LB) * (NU * N21 + N2 * (1 - NU)) + PI * LB * W11 * (12 / H ^ 2 + N21 ^ 2 / A ^ 2)) 450 A11 = PI * LB * W11 * (1 + N2 * K0) - .5 * PI ^ 3 * A ^ 2 * W12 / LB + PI * N2 * K1 * W0 460 A12 = PI * LO * E * AF * W0 * (N2 * EC / A ^ 2 - EC / A ^ 2 - 1 / A) - (PI * LO * E * H / (A * (1 - NU ^ 2))) * (PI ^ 2 * H ^ 2 * (1 - NU) * W12 / (12 * LB) + LB * W11) 470 A13 = -PI * LO * (K1 * W0 + LB * W11 * (1 + K0)) 480 A14 = (PI ^ 2 * E * H / (1 - NU ^ 2)) * (-H ^ 2 * N2 * (1 - NU) * W13 / (12 * A ^ 2) + NU * W10) 490 A15 = PI ^ 2 * A * W10

© Carl T. F. Ross, 2011

450

Pressure vessels

500 A16 = (PI ^ 2 * E * H / (1 - NU ^ 2)) * (.5 * LO * (1 - NU) * W13 * (H ^ 2 / (12 * A ^ 2) - 1) NU * LO * W10) 510 A17 = -.5 * PI ^ 2 * A * LO * W10 520 A18 = PI * N2 * E * AF * W0 / A + (PI * E * H / (1 - NU ^ 2)) * (PI ^ 2 * A * (1 - NU) * W12 * (H ^ 2 / (24 * A ^ 2) + .5) / LB + N2 * LB * W11 / A) 530 A19 = -.5 * PI ^ 3 * A ^ 2 * W12 / LB 540 A20 = (PI * E * H / (1 - NU ^ 2)) * (.25 * N2 * (1 - NU) * LB * (H ^ 2 / (12 * A ^ 2) + 1) / A + .5 * PI ^ 2 * A / LB) 550 A21 = .5 * PI * N2 * (K1 * (N - 1) + LB * K0) 560 A23 = -A16 ^ 2 + A18 * A20 570 A24 = -2 * A16 * A17 + A18 * A21 + A19 * A20 580 A25 = -A17 ^ 2 + A19 * A21 590 A26 = -A12 * A20 + A14 * A16 600 A27 = -A12 * A21 + A13 * A20 + A14 * A17 + A15 * A16 610 A28 = -A13 * A21 + A15 * A17 620 A29 = A12 * A16 - A14 * A18 630 A30 = A12 * A17 + A13 * A16 + A14 * A19 - A15 * A18 640 A31 = A13 * A17 - A15 * A19 650 A32 = A11 * A25 + A13 * A28 + A15 * A31 660 A33 = A10 * A25 + A11 * A24 + A12 * A28 + A13 * A27 + A14 * A31 + A15 * A30 670 A34 = A10 * A24 + A11 * A23 + A12 * A27 + A13 * A26 + A14 * A30 + A15 * A29 680 A35 = A10 * A23 + A12 * A26 + A14 * A29 700 PRESS = 0: PR = 0 710 FOR II = 1 TO 100 720 FUNCT = A32 * PRESS ^ 3 + A33 * PRESS ^ 2 + A34 * PRESS + A35 730 DFUNCTION = 3 * A32 * PRESS ^ 2 + 2 * A33 * PRESS + A34 740 PRESS = PRESS - FUNCT / DFUNCTION 750 IF ABS(PR - PRESS) < .000001 THEN GOTO 900 760 PR = PRESS 770 NEXT II 900 PRINT “LOBES=”; LO, : PRINT “BUCKLING PRESSURE=”; PRESS 910 NEXT LO

© Carl T. F. Ross, 2011

Appendix IV

451

912 PRINT “Do you want to analyse another problem ? Type Y or N”: INPUT A\$ IF A\$ = “y” THEN A\$ = “Y” IF A\$ = “n” THEN A\$ = “N” IF A\$ = “Y” THEN GOTO 100 IF A\$ = “N” THEN GOTO 920 GOTO 912 920 END A listing for KENDRIC3.BAS is given below: 90 CLS 100 REM GENERAL INSTABILITY (KENDRICK-PT.3) 110 PRINT : PRINT “GENERAL INSTABILITY OF RINGREINFORCED CYLINDERS UNDER EXTERNAL PRESSURE (KENDRICK PT.3)” 120 PRINT : PRINT “PROGRAM BY DR.C.T.F.ROSS” 130 PRINT DIM A(5, 5), XX(5, 6), VC(5, 5), AM(5), X(5), Z(5), IG(5), VE(5) 140 INPUT “TYPE IN SHELL RADIUS ”; RS 150 INPUT “TYPE IN WALL THICKNESS ”; TH 160 INPUT “TYPE IN THE NUMBER OF FRAMES BETWEEN BULKHEADS ”; FRAMES 170 INPUT “TYPE IN FRAME SPACING ”; LF 180 LB = (FRAMES + 1) * LF 190 INPUT “TYPE IN CROSS-SECTIONAL AREA OF A TYPICAL FRAME ”; AF 200 INPUT “TYPE IN THE 2ND MOMENT OF AREA OF A TYPICAL FRAME ABOUT THE X0 AXIS ”; IX0 210 INPUT “TYPE IN THE ECCENTRICITY OF A TYPICAL FRAME FROM THE MID-SURFACE OF THE SHELL (-VE IF THE FRAMES ARE EXTERNAL) ”; EC 220 INPUT “TYPE IN THE MAXIMUM NUMBER OF LOBES ”; LOBES 225 IF LOBES < 2 THEN PRINT : PRINT “INCORRECT DATA”: GOTO 220 230 INPUT “TYPE IN ELASTIC MODULUS ”; E 235 INPUT “TYPE IN POISSON’S RATIO ”; NU 330 GOSUB 4000 350 GOTO 6020 380 PRINT “THE EIGENVALUES ARE BEING DETERMINED”: PRINT

© Carl T. F. Ross, 2011

452

Pressure vessels

390 GOSUB 510 410 FOR I = 1 TO M1 420 LPRINT “EIGENVALUE=”; AM(I) 425 PCR = 1 / AM(I): PCRIT = PCR * E * TH / (RS * (1 - NU ^ 2)) 430 LPRINT : LPRINT “BUCKLING PRESSURE=”; PCRIT 440 LPRINT : LPRINT “EIGENVECTOR IS” 450 LPRINT 460 FOR J = 1 TO N 470 LPRINT VC(J, I); “ ”; 480 LPRINT : NEXT J 490 LPRINT : NEXT I 495 RETURN 500 GOTO 25000 510 MN = N 520 NN = N 530 GOSUB 1390 540 M = 1 550 FOR I = 1 TO NN 560 VC(I, M) = X(I) 570 XX(I, M) = VC(I, M) 580 NEXT I 590 AM(M) = XM 600 IF M1 < 2 THEN RETURN 610 FOR M = 2 TO M1 620 FOR I = 1 TO NN 630 K4 = ABS(XX(I, M - 1) - 1) 640 IF K4 < .00001 THEN IR = I 650 NEXT I 660 IG(M - 1) = IR 670 FOR I = 1 TO NN 680 XX(MN - I + 1, MN - M + 3) = A(IR, I) 690 NEXT I 700 FOR I = 1 TO NN 710 FOR J = 1 TO NN 720 Z1 = MN - J + 1 730 Z2 = MN - M + 3 740 A(I, J) = A(I, J) - XX(I, M - 1) * XX(Z1, Z2) 750 NEXT J 760 NEXT I 770 FOR I = 1 TO NN 780 IF I = IR THEN GOTO 870 790 IF I > IR THEN K1 = I - 1

© Carl T. F. Ross, 2011

Appendix IV 800 IF I < IR THEN K1 = I 810 FOR J = 1 TO NN 820 IF J = IR THEN GOTO 860 830 IF J > IR THEN K2 = J - 1 840 IF J < IR THEN K2 = J 850 A(K1, K2) = A(I, J) 860 NEXT J 870 NEXT I 880 NN = NN - 1 890 M3 = NN 900 IF M <> MN THEN GOTO 940 910 XM = A(1, 1) 920 X(1) = 1 930 GOTO 950 940 GOSUB 1390 950 FOR I = 1 TO NN 960 XX(I, M) = X(I) 970 NEXT I 980 AM(M) = XM 990 M4 = M - 1 1000 M5 = 1000 - M4 1010 FOR M8 = M5 TO 999 1020 M6 = M3 + 1 1030 M2 = 1000 - M8 1040 M7 = IG(M2) + 1 1050 IF M6 < M7 THEN GOTO 1120 1060 N9 = 1000 - M7 1070 N8 = 1000 - M6 1080 FOR I3 = N8 TO N9 1090 I = 1000 - I3 1100 X(I) = X(I - 1) 1110 NEXT I3 1120 J = IG(M2) 1130 X(J) = 0 1140 SUM = 0 1150 FOR I = 1 TO M6 1160 Z3 = MN - I + 1 1170 Z4 = MN - M2 + 2 1180 SUM = SUM + XX(Z3, Z4) * X(I) 1190 NEXT I 1200 XK = (AM(M2) - XM) / SUM 1210 FOR I = 1 TO M6 1220 X(I) = XX(I, M2) - XK * X(I)

© Carl T. F. Ross, 2011

453

454 1230 1240 1250 1260 1270 1280 1290 1300 1310 1320 1330 1340 1350 1360 1370 1380 1390 1400 1410 1420 1430 1440 1450 1460 1470 1480 1490 1500 1510 1520 1530 1540 1550 1560 1570 1580 1590 1600 1610 1620 1630 1640 1650

Pressure vessels NEXT I SUM = 0 FOR I = 1 TO M6 IF ABS(SUM) < ABS(X(I)) THEN SUM NEXT I FOR I = 1 TO M6 X(I) = X(I) / SUM NEXT I M3 = M3 + 1 IF M2 <> 1 THEN GOTO 1360 FOR I = 1 TO M3 VC(I, M) = X(I) NEXT I NEXT M8 NEXT M RETURN Y1 = 100000! FOR I = 1 TO NN X(I) = 1 NEXT I XM = -100000! FOR I = 1 TO NN SG = 0 FOR J = 1 TO NN SG = SG + A(I, J) * X(J) NEXT J Z(I) = SG NEXT I XM = 0 FOR I = 1 TO NN IF ABS(XM) < ABS(Z(I)) THEN XM = NEXT I FOR I = 1 TO NN X(I) = Z(I) / XM NEXT I IF ABS((Y1 - XM) / XM) > D THEN GOTO 1620 Y1 = XM GOTO 1440 X3 = 0 FOR I = 1 TO NN IF ABS(X3) < ABS(X(I)) THEN X3 = NEXT I

© Carl T. F. Ross, 2011

= X(I)

Z(I)

GOTO 1600

X(I)

Appendix IV

455

1660 FOR I = 1 TO NN 1670 X(I) = X(I) / X3 1680 NEXT I 1690 RETURN 1700 N9 = N - 1 1710 FOR NX = 1 TO N 1720 DI = A(NX, 1) 1730 IF DI = 0 THEN PRINT “MATRIX IS SINGULAR” 1740 FOR NY = 1 TO N9 1750 Y9 = NY + 1 1760 A(NX, NY) = A(NX, Y9) / DI 1770 NEXT NY 1780 A(NX, N) = 1 / DI 1790 FOR NZ = 1 TO N 1800 IF NZ = NX THEN GOTO 1870 1810 O = A(NZ, 1) 1820 FOR NY = 1 TO N9 1830 Y9 = NY + 1 1840 A(NZ, NY) = A(NZ, Y9) - A(NX, NY) * O 1850 NEXT NY 1860 A(NZ, N) = -A(NX, N) * O 1870 NEXT NZ 1880 NEXT NX 1890 RETURN 4000 REM OUTPUT OF INPUT 4020 LPRINT : LPRINT 4030 LPRINT “GENERAL INSTABILITY OF RING-REINFORCED CYLINDERS UNDER UNIFORM EXTERNAL PRESSURE (KENDRICKTRANSACTIONS R.I.N.A.,pp.139-156,1965)” 4040 LPRINT “PROGRAM BY DR.C.T.F.ROSS”: LPRINT 4050 LPRINT “MEAN SHELL RADIUS=”; RS 4060 LPRINT “WALL THICKNESS=”; TH 4070 LPRINT “NUMBER OF FRAMES BETWEEN BULKHEADS=”; FRAMES 4080 LPRINT “FRAME SPACING=”; LF 4090 LPRINT “BULKHEAD SPACING=”; LB 4100 LPRINT “CROSS-SECTIONAL AREA OF A TYPICAL FRAME=”; AF 4110 LPRINT “2nd MOMENT OF AREA OF A TYPICAL RINGSTIFFENER ABOUT THE X0 AXIS=”; IX0 4120 LPRINT “ECCENTRICITY OF THE CENTROID OF A TYPICAL RING-STIFFENER FROM THE MID-SURFACE OF THE SHELL (-ve IF EXTERNAL)=”; EC

© Carl T. F. Ross, 2011

456

Pressure vessels

4130 LPRINT “MAXIMUM NUMBER OF LOBES=”; LOBES 4140 LPRINT “ELASTIC MODULUS=”; E 4150 LPRINT “POISSON’S RATIO=”; NU 4170 RETURN 6020 REM START OF THE MAIN PART OF THE PROGRAM 6030 PI = 3.1415926536#: LAM1 = PI * RS / LB 6040 LAM2 = PI * RS / LF 6050 CON = TH ^ 2 / (12 * RS ^ 2) 6060 AC = TH * LF / (AF + TH * LF) 6070 MU1 = 2 / PI 6080 GAM1 = 1 / ((2 * FRAMES + 3) * PI) 6090 GAM2 = 1 / ((2 * FRAMES + 1) * PI) 6100 BETA = (AC - NU / 2) / (1 - NU ^ 2) 6110 M1 = 1: N = 5 6120 REM DIM A(5, 5), XX(5, 6), VC(N, M1), AM(M1), X(5), Z(5), IG(5), VE(5) 6130 FOR LO = 2 TO LOBES 6140 PRINT : PRINT “NUMBER OF CIRCUMFERENTIAL WAVES=”; LO 6150 RB = (1 - NU ^ 2) * AF * LO ^ 2 / (TH * LF) 6160 RC = (1 - NU ^ 2) * IX0 * (LO ^ 2 - 1) ^ 2 / (TH * RS ^ 2 * LF) + ((1 - NU ^ 2) * AF / (TH * LF)) * (1 - (EC / RS) * (LO ^ 2 - 1)) ^ 2 6170 RBC = -((1 - NU ^ 2) * AF * LO / (TH * LF)) * (1 - (EC / RS) * (LO ^ 2 - 1)) 6180 A(1, 1) = LAM1 ^ 2 + LO ^ 2 * (1 + CON) * (1 - NU) / 2 6190 A(1, 2) = -(LO * LAM1 / 2) * (1 + NU - CON * (1 - NU)) 6200 A(1, 3) = LAM1 * NU - LAM1 * CON * (1 - NU) * LO ^ 2 6210 A(1, 4) = -2 * NU * LAM1 * LO * (MU1 - GAM1 + GAM2) - 2 * LAM2 * LO * (1 - NU) * (GAM1 + GAM2) * (1 - CON) 6220 A(1, 5) = 2 * NU * LAM1 * (MU1 - GAM1 + GAM2) - 4 * CON * LO ^ 2 * LAM2 * (1 - NU) * (GAM1 + GAM2) 6230 A(2, 2) = LO ^ 2 + LAM1 ^ 2 * (1 + CON) * (1 - NU) / 2 + RB 6240 A(2, 3) = -LO * (1 + LAM1 ^ 2 * CON * (1 NU)) + RBC 6250 A(2, 4) = 2 * LO ^ 2 * (MU1 - GAM1 + GAM2) + 2 * LAM1 * LAM2 * (1 - NU) * (GAM1 + GAM2) * (1 + CON)

© Carl T. F. Ross, 2011

Appendix IV

457

6260 A(2, 5) = -2 * LO * (MU1 - GAM1 + GAM2) - 4 * CON * LO * LAM1 * LAM2 * (GAM1 + GAM2) * (1 - NU) 6270 A(3, 3) = 1 + CON * (LAM1 ^ 4 + 2 * LAM1 ^ 2 * (LO ^ 2 - NU) + (LO ^ 2 - 1) ^ 2) + RC 6280 A(3, 4) = -2 * LO * (MU1 - GAM1 + GAM2) - 4 * CON * LO * LAM1 * LAM2 * (GAM1 + GAM2) * (1 - NU) 6290 A(3, 5) = 2 * (MU1 - GAM1 + GAM2) 6300 A(3, 5) = A(3, 5) + CON * (-8 * LAM1 ^ 2 * LAM2 ^ 2 * (GAM1 + GAM2) + 2 * (1 - LO ^ 2) ^ 2 * (MU1 - GAM1 + GAM2) + 8 * NU * LAM2 ^ 2 * (1 - LO ^ 2) * (GAM1 - GAM2)) 6310 A(3, 5) = A(3, 5) + CON * (-2 * NU * LAM1 ^ 2 * (1 - LO ^ 2) * (MU1 - GAM1 + GAM2) + 8 * LO ^ 2 * LAM1 * LAM2 * (GAM1 + GAM2) * (1 - NU)) 6320 A(4, 4) = 3 * LO ^ 2 + 2 * LAM2 ^ 2 * (1 NU) * (1 + CON) 6330 A(4, 5) = -3 * LO - 4 * CON * LAM2 ^ 2 * LO * (1 - NU) 6340 A(5, 5) = 3 + CON * (16 * LAM2 ^ 4 + 3 * (1 LO ^ 2) ^ 2 + 8 * LAM2 ^ 2 * (LO ^ 2 - NU)) 6350 XX(1, 1) = LO ^ 2 - 2 * LO ^ 2 * (1 - AC) / (FRAMES + 1) 6360 XX(1, 2) = LO * LAM1 / 2 - LO * LAM1 * NU * BETA 6370 XX(1, 3) = -LAM1 6380 XX(1, 4) = LO * LAM1 * (MU1 - GAM1 + GAM2) * (1 - 2 * NU * BETA) 6390 XX(1, 5) = -2 * LAM1 * (MU1 - GAM1 + GAM2) 6400 XX(2, 2) = LAM1 ^ 2 / 2 + 2 * LO ^ 2 * (1 + BETA - AC) 6410 XX(2, 3) = -LO * BETA - LO * (1 - AC) * (1 (LO ^ 2 - 1) * (EC / RS)) 6420 XX(2, 4) = 2 * LAM1 * LAM2 * (GAM1 + GAM2) + 4 * LO ^ 2 * BETA * (MU1 - GAM1 + GAM2) 6430 XX(2, 5) = -2 * LO * (MU1 - GAM1 + GAM2) * (AC + BETA - 1) 6440 XX(3, 3) = LO ^ 2 + LAM1 ^ 2 / 2 - 1 6450 XX(3, 4) = -2 * LO * (MU1 - GAM1 + GAM2) * (AC + BETA - 1) 6460 XX(3, 5) = -2 * (MU1 - GAM1 + GAM2) * (1 - LO ^ 2 * AC) + 2 * LAM1 * LAM2 * (GAM1 + GAM2) 6470 XX(4, 4) = 2 * LAM2 ^ 2 + 6 * LO ^ 2 * BETA 6480 XX(4, 5) = -3 * LO * (AC + BETA - 1)

© Carl T. F. Ross, 2011

458

Pressure vessels

6490 XX(5, 5) = -3 * (1 - LO ^ 2 * AC) + 2 * LAM2 ^ 2 6500 FOR II = 1 TO 5 6510 FOR JJ = 1 TO II 6520 A(II, JJ) = A(JJ, II) 6530 XX(II, JJ) = XX(JJ, II) 6540 NEXT JJ 6550 NEXT II 6560 REM THE MATRIX WILL NOW BE INVERTED 6570 PRINT : PRINT “THE MATRIX IS BEING INVERTED”: PRINT 6580 GOSUB 1700 6590 REM (XX)/(A) 6600 FOR II = 1 TO 5 6610 FOR JJ = 1 TO 5 6620 VE(JJ) = 0 6630 FOR KK = 1 TO 5 6640 VE(JJ) = VE(JJ) + A(II, KK) * XX(KK, JJ) 6650 NEXT KK 6660 NEXT JJ 6670 FOR JJ = 1 TO 5 6680 A(II, JJ) = VE(JJ) 6690 NEXT JJ 6700 NEXT II 6710 D = .001 6715 LPRINT : LPRINT “NUMBER OF LOBES=”; LO 6720 GOSUB 380 6730 NEXT LO 6740 END 25000 REM END A listing for BRYANT.BAS is given below: 100 CLS : PRINT “BRYANT’S FORMULA FOR GENERAL INSTABILITY” PRINT “Program by Dr. C.T.F. Ross” INPUT “TYPE IN FRAME SPACING ”, LS INPUT “TYPE IN BULKHEAD SPACING ”, LB INPUT “TYPE IN MEAN RADIUS ”, R INPUT “TYPE IN SHELL THICKNESS ”, T INPUT “2ND M.O.A OF A RING STIFFENER +EFF. BREADTH OF PLATING=”, IC INPUT “TYPE IN YOUNG’S MODULUS ”, E INPUT “TYPE IN POISSON’S RATIO ”, NU

© Carl T. F. Ross, 2011

Appendix IV

459

LAMBDA = 3.14159265# * R / LB KN1 = E * T / R KN2 = LAMBDA ^ 4 PCR = 1E+12 FOR N = 2 TO 100 KN3 = (N ^ 2 - 1 + LAMBDA ^ 2 / 2) * (N ^ 2 + LAMBDA ^ 2) ^ 2 KN4 = (N ^ 2 - 1) * E * IC / (R ^ 3 * LS) PCR2 = KN1 * KN2 / KN3 + KN4 IF PCR < PCR2 THEN GOTO 200 PCR = PCR2 NEXT N 200 PRINT “BUCKLING PRESSURE=”; PCR; “(”; N - 1; “)” IF N = 100 THEN PRINT “ERROR” 210 INPUT “Do you want to do another calculation ? Type Y or N ”, A\$ IF A\$ = “y” THEN A\$ = “Y” ELSE IF A\$ = “n” THEN A\$ = “N” IF A\$ = “Y” THEN GOTO 100 ELSE IF A\$ = “N” THEN GOTO 220 GOTO 210 220 END

© Carl T. F. Ross, 2011