blob: c7437d2da1537e985dc81410fd72e3fc9ebde08b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// A Textbook of Fluid Mecahnics and Hydraulic Machines - By R K Bansal
// Chapter 4-Buoyancy and Floatation
// Problem 4.1
//Given Data Set in the Problem
w=2.5
d=1.5
l=6
dens=650
g=9.81
//calculations
V=w*d*l
W_water=dens*V*g
W_dens=1000*g
V_disp=W_water/W_dens //weight of wter displaced/weight density of water
mprintf("The Volume of water displaced is %f m^3\n",V_disp)
//Position of Centre of Buoyancy
h=V_disp/(w*l)
mprintf("The Centre of Buoyancy is at %f m from the base\n",h/2)
|