summaryrefslogtreecommitdiff
path: root/764/CH7/EX7.1.b/solution7_1.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /764/CH7/EX7.1.b/solution7_1.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '764/CH7/EX7.1.b/solution7_1.sce')
-rwxr-xr-x764/CH7/EX7.1.b/solution7_1.sce29
1 files changed, 29 insertions, 0 deletions
diff --git a/764/CH7/EX7.1.b/solution7_1.sce b/764/CH7/EX7.1.b/solution7_1.sce
new file mode 100755
index 000000000..aedd4a6b7
--- /dev/null
+++ b/764/CH7/EX7.1.b/solution7_1.sce
@@ -0,0 +1,29 @@
+
+//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_1.sce')
+//Obtain path of data file
+datapath = path + filesep() + 'data7_1.sci'
+//Clear all
+clc
+//Execute the data file
+exec(datapath)
+//Calculate permissible tensile stress sigmat (N/mm2)
+sigmat = Syt/fs
+//Calculate the core diameter of the eye-bolt dc (mm)
+dc = ((4 * P * 1000)/(%pi * sigmat))^(1/2)
+//use equation 7.4
+//Calculate the nominal diameter d (mm)
+d = dc/0.8
+//Standardise the bolt size from Table 7.1
+d = standard(d)
+//Print results
+printf('\nStandard size of the bolt is M%d\n',d)