summaryrefslogtreecommitdiff
path: root/3764/CH1/EX1.3/Ex1_3.sce
blob: 07e1d44da3ae3916dbb1865653a3deeefe425237 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
clc
//

//Variable declaration
Su = 600    //ultimate normal stress(MPa)   
FS = 3.3    //Factor of safety with respect to failure
tU=350      //Ultimate shearing stress(MPa)
Cx=40       //X Component of reaction at C(kN)
Cy=65       //Y Component of reaction at C(kN)
Smax=300    //Allowable bearing stress of the steel 

//Calculation
C=sqrt(((40**2))+((65**2)))

//Case(a)
P=(15*0.6 + 50*0.3)/(0.6)  //Allowable bearing stress of the steel(MPa)
Sall=(Su/FS)               //Allowable Stress(MPa)
Sall=(Sall)         //Rounding Allowable stress to 1 decimal place(MPa)

Areqa=(P/(Sall*(1000)))    //Cross Sectional area(m^2)
Areqa=(Areqa)       //Rounding cross sectional area to 5 decimal places(m^2)

dAB=sqrt(((Areqa)*(4))/(22/7)) //Diameter of AB(m)
dAB=dAB*1000                        //Diameter of AB(mm)
dAB=(dAB)                    //Rounding Diameter of AB(mm)


//Case(b)
tALL=tU/FS                          //Stress(MPa)
tALL=(tALL)                  //Rounding of Stress

AreqC=((C/2)/tALL)                  //Cross sectional area(m^2)
AreqC=AreqC*1000                    
AreqC=(AreqC)                //Rounding the cross sectional area

dC=sqrt((4*AreqC)/(22/7))      //Diameter at point C
dC=((dC+1))                  //Rounding of the diameter at C


//Case(c)

Areq=((C/2)/Smax)                   
Areq=Areq*1000                      //Cross sectional area(mm^2)
t=(Areq/22)                         //Thickness of the bracket
t=(t)


//Result
printf("\n Case(a): Diameter of the bolt = % f mm' ,dAB)
printf("\n Case(a): Dimension b at Each End of the Bar = % f mm' ,dC)
printf("\n Case(a): Dimension h of the Bar = % f mm' ,t)