diff options
Diffstat (limited to '764/CH7/EX7.2.b/solution7_2.sce')
-rwxr-xr-x | 764/CH7/EX7.2.b/solution7_2.sce | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/764/CH7/EX7.2.b/solution7_2.sce b/764/CH7/EX7.2.b/solution7_2.sce new file mode 100755 index 000000000..7079dc7c8 --- /dev/null +++ b/764/CH7/EX7.2.b/solution7_2.sce @@ -0,0 +1,30 @@ +
+//Function to standardise the given bolt-size
+function[v] = standard(w)
+ v = ceil(w)
+ rem = pmodulo(v,10)
+ if (rem ~= 0) then
+ v = v + (10 - rem)
+ end
+endfunction
+
+//Obtain path of solution file
+path = get_absolute_file_path('solution7_2.sce')
+//Obtain path of data file
+datapath = path + filesep() + 'data7_2.sci'
+//Clear all
+clc
+//Execute the data file
+exec(datapath)
+//Calculate the yield shear strength Ssy (N/mm2)
+Ssy = (50/100)*Syt
+//Calculate the permissible shear stress tau (N/mm2)
+tau = Ssy/fs
+//Shear load acting on one bolt P (kN)
+P = Pt/2
+//Calculate the diameter of the bolt shank d (mm)
+d = ((4 * P * 1000)/(%pi * tau))^(1/2)
+//Standardise the bolt size from Table 7.1
+d = standard(d)
+//Print results
+printf('\nThe standard size of the bolt is M%d\n',d)
|