summaryrefslogtreecommitdiff
path: root/797/CH3/EX3.9.s/3_09_solution.sce
diff options
context:
space:
mode:
Diffstat (limited to '797/CH3/EX3.9.s/3_09_solution.sce')
-rw-r--r--797/CH3/EX3.9.s/3_09_solution.sce18
1 files changed, 18 insertions, 0 deletions
diff --git a/797/CH3/EX3.9.s/3_09_solution.sce b/797/CH3/EX3.9.s/3_09_solution.sce
new file mode 100644
index 000000000..256158edd
--- /dev/null
+++ b/797/CH3/EX3.9.s/3_09_solution.sce
@@ -0,0 +1,18 @@
+//Solution 3-09
+WD=get_absolute_file_path('3_09_solution.sce');
+datafile=WD+filesep()+'3_09_example.sci';
+clc;
+exec(datafile)
+//(a)
+s = h_bottom - R; //distance of cylinder top from water surface
+F_h = rho * g * (s + R / 2) * R; //horizontal force acting on vericle surface of cylinder
+F_y= rho * g * h_bottom * R; //vericle for acting on cylinder
+W = rho * g * R**2 * (1 - %pi / 4); //weight of fluid block per m width
+F_v = F_y - W; //net upward force
+F_R = sqrt(F_v**2 + F_h**2); //magnitude of resultant force
+theta = atan(F_v / F_h) * 180 / %pi; //angle made by resultant with horizontal
+printf("Resultant hydrostatic force acting on cylinder is %1.2f kN", F_R/1000);
+printf("\nAngle made by hydrostatic force with horizontal is %1.2f degrees", theta);
+//(b)
+W_cyl = F_R * sin(theta * %pi / 180); //equating moment at hinge to zero
+printf("\nWeight of cylinder per m length is %1.2f kN", W_cyl/1000); \ No newline at end of file