diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /764/CH7/EX7.3.b/solution7_3.sce | |
download | Scilab-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.3.b/solution7_3.sce')
-rwxr-xr-x | 764/CH7/EX7.3.b/solution7_3.sce | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/764/CH7/EX7.3.b/solution7_3.sce b/764/CH7/EX7.3.b/solution7_3.sce new file mode 100755 index 000000000..ac216e404 --- /dev/null +++ b/764/CH7/EX7.3.b/solution7_3.sce @@ -0,0 +1,47 @@ +
+//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_3.sce')
+//Obtain path of data file
+datapath = path + filesep() + 'data7_3.sci'
+//Clear all
+clc
+//Execute the data file
+exec(datapath)
+//Calculate the permissible shear stress tau (N/mm2)
+tau = ((50/100)*Syt)/fs
+//Calculate the distance between bolt1 and C.G. of all bolts res (mm)
+res = (((dist1/2)^2) + ((dist2/2)^2))^(1/2)
+//Calculate the primary shear force at bolt1 Pshear (N)
+Pshear = (P * 1000)/N
+//Calculate the secondary shear force at bolt1 Sshear (N)
+Sshear = (P * 1000 * e)/(N * res)
+//Calculate angle theta (degree)
+theta = atand(dist2/dist1)
+//Calculate the resultant force on bolt1 P1 (N)
+P1 = (((Sshear * cosd(theta) - Pshear)^2) + ((Sshear * sind(theta))^2))^(1/2)
+//Calculate the resultant force on bolt2 P2 (N)
+P2 = (((Sshear * cosd(theta) + Pshear)^2) + ((Sshear * sind(theta))^2))^(1/2)
+//Obtain the bolt subjected to maximum shear force Pmax (N)
+if (P1 > P2) then
+ Pmax = P1
+else
+ Pmax = P2
+end
+//Calculate the core diameter of the bolt dc (mm)
+dc = ((4 * Pmax)/(tau * %pi))^(1/2)
+//Calculate the nominal diameter of the bolt d (mm)
+d = dc/0.8
+//Standardise the bolt size
+d = standard(d)
+//Print results
+printf('\nStandard size of the bolts is M%d\n',d)
|