Chapter 1 : Hydrostatics

Example 1.1 Page No : 6

In [1]:
		
#initialisation of variables
Ar = 50 		#area of ram in**2
Ap = 1./8 		#area of plunger in**2
Wp = 5. 		#force lbs
		
#CALCULATIONS
Pp = Wp/Ap
F = Pp*Ar
		
#RESULTS
print  'weight supported by ram  = %.f lbs'%(F)
weight supported by ram  = 2000 lbs

Example 1.2 Page No : 6

In [2]:
import math 
		
#initialisation of variables
Dp = 1. 		#diameter of punger - in
Dr = 10. 		#diameter of ram - in
R = 12.         #leverage of handle
W = 15. 		#wieght of body - tons
		
#CALCULATIONS
Ar = math.pi*Dr**2/4
Ap = math.pi*Dp**2/4
P = W*2240/((Ar/Ap)*R)
		
#RESULTS
print  'power applied to lever  = %.f lbs'%(P)
power applied to lever  = 28 lbs

Example 1.3 Page No : 7

In [3]:
import math 
		
#initialisation of variables
Dj = 1. 		#diameter of plunger - in
Dr = 2. 		#in
W = 40. 		#lbs
W1 = 1. 		#ton
rl = 20.
		
#CALCULATIONS
Ap = math.pi*Dj**2/4
Ar = math.pi*Dr**2/4
Vrj = rl*Ar/Ap
e = W1*2240*100/(W*Vrj)
		
#RESULTS
print  'efficiency of machine at this load  = %.f percent'%(e)
efficiency of machine at this load  = 70 percent

Example 1.4 Page No : 7

In [4]:
		
#initialisation of variables
Dj = 1. 		#in
Dr = 2. 		#in
ns = 3. 		#strokes
h = 2.   		#ft
		
#CALCULATIONS
Ap = math.pi*Dj**2/4
Ar = math.pi*Dr**2/4
Vrj = Ar/Ap
ns1 = h*12*Vrj/ns
		
#RESULTS
print  ' working strokes  = %.f strokes'%(ns1)
 working strokes  = 32 strokes

Example 1.5 Page No : 9

In [5]:
		
#initialisation of variables
T = 40. 		#F
w = 62.4 		#lbs/ft**3
h = 50 		#ft
		
#CALCULATIONS
p = w*h/(12**2)
		
#RESULTS
print  ' pressure at a depth of 50 ft  = %.2f lbs per in'%(p)
 pressure at a depth of 50 ft  = 21.67 lbs per in

Example 1.6 Page No : 13

In [6]:
		
#initialisation of variables
W = 64. 		#lbs/ft**3
h1 = 27. 		#ft
h2 = 9. 		#ft
w = 40. 		#ft
		
#CALCULATIONS
Pr = w*W*h1*h1/2
Pl = w*W*h2*h2/2
y1 = h1/3
y2 = h2/3
y = (Pr*y1-Pl*y2)/(Pr-Pl)
		
#RESULTS
print  ' point of application  = %.2f ft'%(y)
 point of application  = 9.75 ft

Example 1.7 Page No : 14

In [10]:
import math 
		
#initialisation of variables
d = 5.  		#ft
x = 3. 	    	#ft
w = 62.4 		#lb/ft**3
a = 90. 		#degrees
		
#CALCULATIONS
A = math.pi/4*d**2
b = w*A*x
Ig = round(math.pi*d**4/64,2)
Io = Ig + A*x**2 * 1
h = Io/(A*x)

#RESULTS
print  'depth of the pressure = %.2f ft'%(h)
depth of the pressure = 3.52 ft

Example 1.8 Page No : 15

In [8]:
import math 
		
#initialisation of variables
w = 3.   		#ft
h = 4. 	    	#ft
ht = 30 		#ft
W = 62.4 		#ft**3
		
#CALCULATIONS
Ap = w*h
X = ht+(h/2)
P = Ap*X*W
I0 = (w*h**3/12)+Ap*X**2
H = I0/(Ap*X)
		
#RESULTS
print  ' total pressure on the gate  = %.2f ft'%(H)
 total pressure on the gate  = 32.04 ft

Example 1.9 Page No : 15

In [1]:
import math 
		
#initialisation of variables
w = 3. 		#ft
h = 4. 		#ft
ht = 30. 		#ft
W = 62.4 		#ft**3
x = 2.22 		#in
x1 = 4.5 		#in
		
#CALCULATIONS
Ap = w*h
X = ht+(h/2)
P = Ap*X*W
T = P*x/x1
T1 = P-T
		
#RESULTS
print  ' tension devoloped in the top bolt  = %.f lbs'%(T)
print  '  tension devoloped in the bottom bolt  = %d lbs'%(T1)
 tension devoloped in the top bolt  = 11821 lbs
  tension devoloped in the bottom bolt  = 12140 lbs

Example 1.10 Page No : 16

In [10]:
import math 
		
#initialisation of variables
w = 3.   		#ft
h = 15. 		#ft
d = 140. 		#lbs/ft**3
x = 6. 	    	#in
W = 62.4 		#lbs/ft**3
		
#CALCULATIONS
W1 = h*w*d
h = (W1*x*6/(W*12))**(1./3)
		
#RESULTS
print  ' height of water rise  = %.2f ft'%(h)
 height of water rise  = 6.72 ft

Example 1.11 Page No : 17

In [11]:
import math 
		
#initialisation of variables
h = 5. 		#ft
d = 6. 		#ft
a = 30. 		#degrees
w = 62.4 		#lbs/ft**3
		
#CALCULATIONS
A = math.pi*d**2/4
X = h+(d/2)*math.sin(math.radians(a))
P = w*A*X
Ic = math.pi*d**4/64
I0 = Ic+A*X**2/(math.sin(math.radians(a)))**2
h = I0*(math.sin(math.radians(a)))**2/(A*X)
		
#CALCULATIONS
print  'depth of the centre os pressure = %.2f ft '%(h)
depth of the centre os pressure = 6.59 ft 

Example 1.12 Page No : 18

In [11]:
import math 
		
#initialisation of variables
w = 4. 	    	#ft
l = 4. 		    #ft
X = 10. 		#ft
a = 45. 		#degrees
W = 100. 		#lbs
a1 = 60. 		#degrees
w1 = 62.4 		#lbs/ft**3
		
#CALCULATIONS
A = w*l
X1 = round(X+(w/2)*math.sin(math.radians(a)),2)
Ig = round(w*l**3/12,2)
I0 = Ig+(A*X1**2/(math.sin(math.radians(a)))**2)
h = I0*(math.sin(math.radians(a)))**2/(A*X1)
P = round(w1*A*X1,-2)
h1 = round(h-X,2)
h2 = round(h1/math.sin(math.radians(a)),2)
T = (W*(l/2)*math.sin(math.radians(a))+P*h2)/(w*math.sin(math.radians(a1)))



#RESULTS
print  'Pull in the chain = %d lbs '%(T)
Pull in the chain = 6885 lbs 

Example 1.13 Page No : 20

In [12]:
import math 
		
#initialisation of variables
w = 4. 		#ft
l = 4. 		#ft
X = 10. 		#ft
a  = 45. 		#degrees
W = 62.4 		#lbs/ft**3
u = 0.25
		
#CALCULATIONS
A = w*l
X1 = X+(w/2)*math.sin(math.radians(a))
P = W*A*X1
T = u*P
		
#RESULTS
print  'magnitude of the lifting force = %.f lbs '%(round(T,-1)) 
magnitude of the lifting force = 2850 lbs 

Example 1.14 Page No : 21

In [14]:
		
#initialisation of variables
w = 62.4 		#lbs/ft**3
sg = 1.6
h = 10. 		#ft
h1 = 4. 		#ft
		
#CALCULATIONS
D = w*sg
W = w*(h+h1)**2/2
P = w*h
P1 = D*h1
P2 = (P*h/2)+P*h1+(h1*P1/2)
y = ((P*h*(h1+(h/3))/2)+P*h1*(h1/2)+P1*h1**2/6)/P2
		
#RESULTS
print  'Position where P acts = %.1f ft above the base'%(y) 
Position where P acts = 4.5 ft above the base

Example 1.15 Page No : 22

In [15]:
		
#initialisation of variables
pa = 10.     	#lbs/in**2
h = 8. 		    #ft
h1 = 6. 		#ft
w = 62.4 		#lbs/ft**3
pg = 10. 		#lbs/in**2
		
#CALCULATIONS
Pa = pa*144
Pa1 = w*h1
Pt = (Pa*h+Pa1*(h1/2))
y = (Pa*h*(h/2)+(Pa1*h1*(h-h1)/2))/Pt
		
#RESULTS
print  'Depth of the centre of pressure = %.2f ft from the base'%(y) 
Depth of the centre of pressure = 3.82 ft from the base

Example 1.16 Page No : 23

In [16]:
		
#initialisation of variables
d = 4. 		#ft
h = 6. 		#in
		
#CALCULATIONS
A = math.pi*d**2/4
X = (h-d)
I0 = (math.pi*d**4/64)+4*math.pi*(X)**2
h1 = I0/(A*X)
h2 = d-h1
		
#RESULTS
print  'Depth of the axis be placed in order = %.1f ft '%(h2) 
Depth of the axis be placed in order = 1.5 ft 

Example 1.17 Page No : 24

In [17]:
import math 
		
#initialisation of variables
h = 10 		#ft
		
#CALCULATIONS
x = math.sqrt(h**2/2)
		
#RESULTS
print  'Depth of the axis be placed in order = %.2f ft '%(x) 
Depth of the axis be placed in order = 7.07 ft 

Example 1.18 Page No : 26

In [18]:
import math 
		
#initialisation of variables
h = 8. 		#ft
h1 = 10. 		#ft
		
#CALCULATIONS
A = h
X = (h1/2)
Ig = h**3/12
I0 = Ig+A*X**2
h2 = I0/(A*X)
		
#RESULTS
print  'depth at which the hinge of the shutter = %.2f ft '%(h2)
depth at which the hinge of the shutter = 6.07 ft 

Example 1.19 Page No : 27

In [1]:
import math 
from numpy import *
		
#initialisation of variables
k1 = 1. 		#ft
k2 = 35.98 		#ft
k3 = 66.83 		#ft
		
#CALCULATIONS

vec =roots([k1,0,-k2,k3])

X = vec[1]
		
#RESULTS
print  'depth of the water = %.2f ft'%(X)
depth of the water = 4.65 ft

Example 1.22 Page No : 31

In [13]:
import math 
		
#initialisation of variables
d = 8.   		#ft
d1 = 2.     		#ft
h = 4. 		    #ft
h1 = 2 		    #ft
w = 62.4 		#lbs/ft**3
		
#CALCULATIONS
A1 = math.pi*d**2/4
A2 = math.pi*d1**2/4
A = A1-A2
x = (A1*d-A2*(d+h-h1))/A
P = w*A*x
Ig = ((math.pi*d**4/64)+(A1*(d-x)**2))-((math.pi*d1**4/64)+(A2*(h1+d-x)**2))
h2 = (Ig/(A*x))+x
		
#RESULTS
print  'depth of the centre of the pressure = %.1f ft '%(h2)

# rounding off error
depth of the centre of the pressure = 8.4 ft 

Example 1.25 Page No : 34

In [7]:
import math 
		
#initialisation of variables
W = 62.4 		#lbs/ft**3
a = 140. 		#degrees
h = 20. 		#ft
w = 6. 		    #ft
h1 = 17. 		#ft
h2 = 5. 		#ft
		
#CALCULATIONS
P1 = int(W*h1**2*w/2)
P2 = W*h2**2*w/2
P = P1-P2
y = (P1*(h1/3)-P2*(h2/3))/P
R = P/(2*math.sin(math.radians((180-a)/2)))
Rt = y*R/h
Rb = R-Rt

#RESULTS
print  'Rt = %.f lbs '%(Rt)
print  ' Rb = %.f lbs '%(Rb)

# note : incorrect answer for R in the textbook. Hence, the difference in answers
Rt = 21838 lbs 
 Rb = 50409 lbs 

Example 1.26 Page No : 36

In [9]:
import math 
		
#initialisation of variables
w = 64. 		#lbs/ft**3
h = 12. 		#ft
l = 9. 		#ft
a = 45. 		#degrees
		
#CALCULATIONS
P = w*h**2/2
h1 = h/3
Rb = P*h1/l
Ra = P-Rb
Wh = Rb*h1
T = Wh/math.sin(math.radians(a))


#RESULTS
print  'Load on the strut = %d lbs '%(T)

# note : incorrect answer for T in the textbook
Load on the strut = 11585 lbs 

Example 1.27 Page No : 38

In [23]:
		
#initialisation of variables
w = 62.4 		#lbs/ft**3
h = 9. 		#ft
l = 10. 		#ft
		
#CALCULATIONS
P = w*h**2/2
h1 = h/3
Ra = P/2
x = (w*4*h**2/9)/Ra
x1 = x+(h/3)
hb = h1-x
W = Ra*l
		
#RESULTS
print  'magnitude od total in each beam = %d lbs '%(W)

# note : rounding off error
magnitude od total in each beam = 12636 lbs