summaryrefslogtreecommitdiff
path: root/3705/CH2/EX2.11/Ex2_11.sce
blob: ec18a18c6b07a861311a935d224525e46f8c7883 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

clear//

//Variable Declaration
delta=100 //Increase in the temperature in degreeF
Load=12000 //Load on the beam in lb
//Length in inch
Ls=2*12 //Steel
Lb=3*12 //Bronze
//Area in sq.in
As=0.75 //Steel
Ab=1.5 //Bronze
//Modulus of elasticity in psi
Es=29*10**6 //Steel
Eb=12*10**6 //Bronze
//Coefficient of thermal expansion in /degree C
alpha_s=6.5*10**-6 //Steel
alpha_b=10**-5 //Bronze

//Calculations
//Applying the Hookes Law and equilibrium we get two equations
a=([[Ls*(Es*As)**-1,-Lb*(Eb*Ab)**-1;2,1]])
b=([(alpha_b*delta*Lb-alpha_s*delta*Ls);Load])
y=linsolve(a,b)

//Stresses
sigma_st=-y(1)*As**-1 //Stress in steel in psi (T)
sigma_br=-y(2)*Ab**-1 //Stress in bronze in psi (C)

//Result
printf("\n The Stress in steel and bronze are as follows")
printf("\n %0.3f psi (T) and %0.3f psi(C)",sigma_st,sigma_br)