blob: 72db152541c945fb6767284effe8ea1be256e19d (
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
|
//Obtain path of solution file
path = get_absolute_file_path('solution4_8.sce')
//Obtain path of data file
datapath = path + filesep() + 'data4_8.sci'
//Clear all
clc
//Execute the data file
exec(datapath)
//Calculate the permissible tensile stress for the link sigmat (N/mm2)
sigmat = Sut/fs
//Assume the value of t to be 1mm
t = 1
//Calculate the direct tensile stress D (N/mm2)
D = (P * 1000)/(t * (ratio * t))
//Calculate the value of y (mm)
y = t
//Calculate the second moment of area I (mm4)
I = (t * ((ratio * t)^3))/12
//Calculate the dimensions of cross-section t
a = (-1 * D) + ((-1 * P * 1000)/I)
b = (-1 * P * 1000 * e)/I
p = [sigmat 0 a b]
r = roots(p)
real_part = real(r)
for i = 1:1:3
if(real_part(i)>0)
t = real_part(i)
break
end
end
//Print results
printf('\nValue of t = %f mm\n',t)
printf('\nArea of cross-section = (%f x %f) mm2\n',t,(ratio * t))
|