summaryrefslogtreecommitdiff
path: root/764/CH4/EX4.20.b/solution4_20.sce
diff options
context:
space:
mode:
Diffstat (limited to '764/CH4/EX4.20.b/solution4_20.sce')
-rwxr-xr-x764/CH4/EX4.20.b/solution4_20.sce31
1 files changed, 31 insertions, 0 deletions
diff --git a/764/CH4/EX4.20.b/solution4_20.sce b/764/CH4/EX4.20.b/solution4_20.sce
new file mode 100755
index 000000000..ddfa0d549
--- /dev/null
+++ b/764/CH4/EX4.20.b/solution4_20.sce
@@ -0,0 +1,31 @@
+
+//Obtain path of solution file
+path = get_absolute_file_path('solution4_20.sce')
+//Obtain path of data file
+datapath = path + filesep() + 'data4_20.sci'
+//Clear all
+clc
+//Execute the data file
+exec(datapath)
+//Calculate the permissible stresses for steel parts sigmat (N/mm2)
+sigmat = Syt/fs
+//Assume the diameter of the link to be 1mm D
+D = 1
+R = 4 * D
+Ri = (4 * D)-(0.5 * D)
+Ro = (4 * D)+(0.5 * D)
+Rn = ((sqrt(Ro) + sqrt(Ri))^2)/4
+//Calculate the eccentricity e (mm)
+e = R - Rn
+hi = Rn - Ri
+A = (%pi/4)*(D^2)
+//Calculate the bending moment Mb (N-mm)
+Mb = (P * 1000)*(4 * D)
+//Calculate the bending stress B (N/mm2)
+B = (Mb * hi)/(A * e * Ri)
+//Calculate the direct tensile stress T (N/mm2)
+T = (P * 1000)/A
+//Calculate the true diameter of the link D (mm)
+D = ((B + T)/sigmat)^(1/2)
+//Print results
+printf('\nThe diameter of the link(D) = %f mm\n',D)