summaryrefslogtreecommitdiff
path: root/764/CH4/EX4.3.b/solution4_3.sce
blob: 5f3fd332a555cf67bebd971252136f57dc12bef8 (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

//Obtain path of solution file
path = get_absolute_file_path('solution4_3.sce')
//Obtain path of data file
datapath = path + filesep() + 'data4_3.sci'
//Clear all
clc
//Execute the data file
exec(datapath)
//Calculate permissible stresses for cotter (N/mm2)
//Tensile stress sigma
sigma = Syt/fs
//Yield strength in shear for cotter Ssy (N/mm2)
Ssy = (50/100)*Syt
//Shear stress tau
tau = Ssy/fs
//Shear failure criterion
//Calculate thickness of cotter t (mm)
t = sqrt((P * 1000)/(2 * 5 * tau))
//Calculate width of cotter b (mm)
b = 5 * t
//Bending failure criterion
//Calculate thickness of cotter t1 (mm)
t1 = ((((P * 1000)/2)*((d2/4) + ((d4 - d2)/6))*(5/2))/((100 * (5^3))/12))^(1/3)
//Round up t1
t1 = ceil(t1)
//Calculate width of cotter b1 (mm)
b1 = 5 * t1
//Print results
printf('\nShear failure criterion\n')
printf('\nThickness of cotter(t) = %f mm\n',t)
printf('\nWidth of cotter(b) = %f mm\n',b)
printf('\nBending failure criterion\n')
printf('\nThickness of cotter(t1) = %f mm\n',t1)
printf('\nWidth of cotter(b1) = %f mm\n',b1)