Курсовая работа: Расчет жесткого стержня
30 IF L2 > c2 THEN GOTO 60 ELSE GOTO 40
40 PRINT "Ошибка ввода": GOTO 50
60 F = q4 * c2
DIM A (N, N), R (N), B (N)
A (1,1) = - (L1 - C1): A (1,2) = 0: A (1,3) = 0
A (2,1) = 0: A (2,2) = L1 - C1: A (2,3) = L2
A (3,1) = - (L1 - C1): A (3,2) = 0: A (3,3) = L2
B (1) = P1 * (L1 - C1) - M1 - F * (C1/2) - M2 - P2 * c2
B (2) = F * (L2 - c2/2) - M1 + P2 * (L2 - c2) - M2
B (3) = - P1 * (L1 - C1) - M1 + F * (L2 - c2/2) - M2 + P2 * (L2 - c2)
FOR I = 1 TO N - 1
FOR J = I + 1 TO N
A (J, I) = - A (J, I) / A (I, I)
FOR K = I + 1 TO N
A (J, K) = A (J, K) + A (J, I) * A (I, K): NEXT K
B (J) = B (J) + A (J, I) * B (I): NEXT J
NEXT I
R (N) = B (N) / A (N, N)
FOR I = N - 1 TO 1 STEP - 1: H = B (I)
FOR J = I + 1 TO N: H = H - R (J) * A (I, J): NEXT J
R (I) = H / A (I, I)
NEXT I
R1 = R (1): R2 = R (2): R3 = R (3)
X = R1 - P1 + R2
Y = R3 - P2 - F
PRINT " Результаты "
PRINT "Опорная реакция в точке 1 R1="; R (1); "kН"
PRINT "Опорная реакция в точке 2 R2="; R (2); "kН"
PRINT "Опорная реакция в точке 3 R3="; R (3); "kН"