diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3819/CH4/EX4.11/Ex4_11.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '3819/CH4/EX4.11/Ex4_11.sce')
-rw-r--r-- | 3819/CH4/EX4.11/Ex4_11.sce | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/3819/CH4/EX4.11/Ex4_11.sce b/3819/CH4/EX4.11/Ex4_11.sce new file mode 100644 index 000000000..9f65f8893 --- /dev/null +++ b/3819/CH4/EX4.11/Ex4_11.sce @@ -0,0 +1,34 @@ +// A Textbook of Fluid Mecahnics and Hydraulic Machines - By R K Bansal
+// Chapter 4-Buoyancy and Floatation
+//// Problem 4.11
+
+//Given Data Set in the Problem
+dens=1000
+g=9.81
+D=3
+d=1.8
+V_disp=0.6
+CB1=1.95
+CG=1.2
+W_tot=3.9*1000*g
+//For meta centric height
+//Weight of water displaced=weight density of water*Volume of water displaced
+x=poly(0,"x")
+function [f]=F(x) //solves for x=height of body above water surface
+ f=W_tot-(dens*g*(%pi/4*D^2*(1.8-x)+V_disp))
+endfunction
+x=10
+x=fsolve(x,F)
+//Let B2 is the centre of buoyancy of the cylindrical part and B of the whole body
+//for COB of the cylindrical part
+CB2=x+0.5*(1.8-x)
+//COB of the whole body is
+V_cyl=%pi*(D/2)^2*(1.8-x)
+CB=((V_disp*CB1)+(V_cyl*CB2))/(V_disp+V_cyl)
+//For meta centric height
+BG=CB-CG
+I_yy=%pi/64*D^4
+V_sub=V_disp+V_cyl
+GM=I_yy/V_sub-BG
+mprintf("The Meta centric height is at %f m\n",GM)
+
|