Chapter 2 : Equilibrium of Floating Bodies

Example 2.1 Page No : 26

In [2]:
#initialisation of variables
d= 40.   	#lb/ft**2 density of wood
w= 4     	#ft  wide
h= 6     	#ft  deep
l= 12    	#ft  long 

#CALCULATIONS
W= w*h*d*l
V= W/64
D= V/(w*l)

#RESULTS
print  'Volume of water print laced = %.f ft**3'%(V)
print  ' Depth of immersion = %.2f ft'%(D)
print  ' Centre of buoyancy = %.2f ft from base'%(D)
Volume of water print laced = 180 ft**3
 Depth of immersion = 3.75 ft
 Centre of buoyancy = 3.75 ft from base

Example 2.3 Page No : 28

In [3]:
from sympy import Symbol,solve
import math 

#initialisation of variables
d= 4.    	#ft diameter
h= 7.    	#ft high
W= 2500. 	#lb weighing 
OG= 3.5
OB= 1.55 	#ft

#CALCULATIONS
V= W/d**3
D= V/(math.pi*(d/2)**2)
I= math.pi*d**4/64
BM= I/V
BG= OG-OB
T = Symbol("T")
ans = solve( (2500 + T)**2 -(512*math.pi *(8750 - 804)) - 1)
T = ans[1]

#RESULTS
print  'Minimum tension in chain = %d lb'%(T)
Minimum tension in chain = 1075 lb

Example 2.4 Page No : 31

In [4]:
import math 

#initialisation of variables
W1= 1000. 	#lb weighing
W2= 100. 	#lb load
h= 4. 	#ft height
d= 5. 	#ft  diameter

#CALCULATIONS
V= (W1+W2)/h**3
D= V*h/(d**2*math.pi)
I= d**4*math.pi/h**3
BM= I/V
x= (BM+(D/2)-(W1*(h/2)/(W1+W2)))/(W2/(W1+W2))-0.02
C= x-h

#RESULTS
print  'centre of gravity = %.2f ft'%(x)
print  ' Hence the gravity of the weight must not be more than above the top of buoy = %.2f ft'%(C)
centre of gravity = 4.43 ft
 Hence the gravity of the weight must not be more than above the top of buoy = 0.43 ft

Example 2.5 Page No : 32

In [5]:
import math 

#initialisation of variables
b= 12. 	#ft  breadth
h1= 3. 	#ft  draught
h2= 1.5 	#ft
h3= 5+(2./3) 	#ft

#CALCULATIONS
I= b**3/12
V= b*h1
bm= I/V
BG= bm+(h1*2/(3*b))
O= math.degrees(math.tan(math.sqrt((h3*2-h1-bm*2)/(bm*2+bm))))


#RESULTS
print  ' Volume of body immersed = %.f ft**3'%(V)
print  ' BM = %.f ft'%(bm)
print  ' BG = %.2f ft'%(BG)
print  ' angle of heel = %.2f degrees'%(O)

#The answer is a bit different due to rounding off error in textbook
 Volume of body immersed = 36 ft**3
 BM = 4 ft
 BG = 4.17 ft
 angle of heel = 9.64 degrees
In [ ]: