summaryrefslogtreecommitdiff
path: root/2744/CH6/EX6.8/Ex6_8.sce
blob: 8016c65caa9be7ab4df1b064b4f45c38fbb9d1e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
clear;
clc;
d = 12;// inches
h = 5;// inches
l = 20;// feet
E = 13000; //tons/in^2
I_xx = 220;// in^4
W = 4;// tons
W1 = 3;// tons
a = 15;// feet
b = l-a;// feet
a1 = 16;// feet 
b1 = l-a1;// feet
K1 = (-2*W1*b1*l)/(W1*b1-W*b);
K2 = (W*b*a^2 + 2*a*W*b^2 + 2*W1*b1*l^2 - W1*b1*a1^2 -2*W1*a1*b1^2 +W1*b1*l^2)/(3*(W1*b1 - W*b));
x = -0.5*K1 + sqrt(-K2 + 0.25*K1^2);// feet
x1 = l-x;// feet
y_max = W*b*x*1728*(a^2 +2*a*b -x^2)/(6*E*I_xx*l) + W1*b1*x1*1728*(a1^2 +2*a1*b1 -x1^2)/(6*E*I_xx*l);// inches
printf('The position of the maximum deflection is, x = %.2f feet.',x);
printf('\n And the maximum deflection is, y_max = %.4f inches.',y_max);