summaryrefslogtreecommitdiff
path: root/3863/CH1/EX1.20/Ex1_20.sce
blob: 30b18e069ebe98dfb4b05d4bdbd6597ef55488c3 (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
33
clear
//

//Given
//Variable declaration
Di_s=140     //Internal diameter of steel tube in mm
De_s=160     //External diameter of steel tube in mm
Di_b=160     //Internal diameter of brass tube in mm
De_b=180     //External diameter of brass tube in mm
P=900e3      //Axial load in N
L=140        //Length of each tube in mm
Es=2e5       //Youngs modulus for steel in N/sq.mm
Eb=1e5       //Youngs modulus for brass in N/sq.mm

//Calculation
As=(%pi/4*(De_s**2-Di_s**2))     //Area of steel tube in sq.mm

Ab=(%pi/4*(De_b**2-Di_b**2))     //Area of brass tube in sq.mm

sigmab=(P/(2*As+Ab))                 //Stress in steel in N/sq.mm

sigmas=2*sigmab                             //Stress in brass in N/sq.mm
Pb=int(sigmab*Ab)*1e-3                      //Load carried by brass tube in kN
Ps=(P*1e-3)-(Pb)                            //Load carried by steel tube in kN
dL=(sigmab/Eb*(L))                   //Decrease in length in mm


//Result
printf("\n Stress in brass = %0.3f  N/mm^2",sigmab)
printf("\n Stress in steel = %0.3f  N/mm^2",sigmas)
printf("\n Load carried by brass tube = %0.3f  kN",Pb)
printf("\n Load carried by stress tube = %0.3f  kN",Ps)
printf("\n Decrease in the length of the compound tube= %0.3f  mm",dL)