Chapter 1 : Hydrostatics

Example 1.2 Page No : 5

In [1]:
#initialisation of variables
w= 62.4     #lb/ft**3
A= 18.       #ft**2
x= 6.        # height ft
kg= 6.
y= 2.        #ft hinges
y1= 5.       #ft

#CALCULATIONS
F= w*A*x
F1= F/2
Ft= (F*y-F1*(y1/2))/y1
Fb= F1-Ft

#RESULTS
print  'Force exerted on the bolt = %.f lb'%(F1)
print  ' Force exerted on the hinge = %.f lb'%(Ft)
print  ' Force exerted on the bolt = %.f lb'%(Fb)
Force exerted on the bolt = 3370 lb
 Force exerted on the hinge = 1011 lb
 Force exerted on the bolt = 2359 lb

Example 1.3 Page No : 6

In [2]:
#initialisation of variables
h1= 11.54 	#ft
h2= 16.33 	#ft
w= 62.4 	#lb/ft**3
x1= 7.69 	#ft
x2= 14.09 	#ft
x3= 18.23 	#ft

#CALCULATIONS
Ft= round(w*h1**2/2)

#RESULTS
print  'h1 = %.2f ft'%(h1)
print  ' h2 = %.2f ft'%(h2)
print  ' h1+ = %.2f ft'%(x1)
print  ' h2+ = %.2f ft'%(x2)
print  ' h3+ = %.2f ft'%(x3)
print  ' Thrust force = %.f lb/ft run'%(round(Ft,-1))
h1 = 11.54 ft
 h2 = 16.33 ft
 h1+ = 7.69 ft
 h2+ = 14.09 ft
 h3+ = 18.23 ft
 Thrust force = 4160 lb/ft run

Example 1.4 Page No : 8

In [2]:
#initialisation of variables
spo= 0.9    # gravity
h= 3.    	#ft depth
d= 2. 	    #ft depth of water
w= 62.4 	#lb/ft**3
H= 0.71 	#ft

#CALCULATIONS
do= spo*w
de= w*d
bc= do*h
Pt= (bc*(h/2)+bc*d+de*(d/2))*(h+d)
y= (bc*(h/2)+bc*d+de*(d/2)*(d/3))*(h+d)/Pt+H

#RESULTS
print "Total pressure = %d lb"%(Pt)
print  ' position of centre of pressure above the base = %.2f ft position of centre of pressure above the axis '%(y)

# rounding off error
Total pressure = 3572 lb
 position of centre of pressure above the base = 1.65 ft position of centre of pressure above the axis 

Example 1.5 Page No : 9

In [3]:
import math

#initialisation of variables
a= 30. 	#degrees
b= 30. 	#degrees
h= 20. 	#ft width of lock
h1= 10. 	#ft   water level
h2= 15. 	#ft   water level
h3= 16. 	#ft   high
w= 62.4 	#lb/ft**3
h4= 10./3 	#ft

#CALCULATIONS
Rt= (1./h3)*((w*(h*h2**2*(h2/3)/(2*math.sqrt(3))))-(w*(h*h1**2*h4/(2*math.sqrt(3)))))
R= ((w*(h*h2**2/(2*math.sqrt(3))))-(w*(h*h1**2/(2*math.sqrt(3)))))
Rb= R-Rt

#RESULTS
print  'Force at the hinge = %.f lb '%(Rt)
print  ' Force at the hinge = %.f lb '%(Rb)

# Note : Round off error in textbook
Force at the hinge = 17826 lb 
 Force at the hinge = 27208 lb 

Example 1.6 Page No : 10

In [29]:
import math 


#initialisation of variables
x= 32. 	    #ft
h= 60.  	#ft   depth
w= 62.4 	#lb/ft**3
AE= 20. 	#ft

#CALCULATIONS
Vabc= 2*x*h/3
vc= Vabc*w
Tab= w*h**2/2
Rt= math.sqrt(vc**2+Tab**2)/2240
A= math.degrees(math.atan(vc/Tab))
AD= x-AE+AE*(1/(math.tan(math.radians(A))))


#RESULTS
print "resulmath.tant thrust = %.1f tons"%(Rt)
print " Angle = %.2f degrees"%(A)
print  ' AD = %.1f ft '%(AD)
resulmath.tant thrust = 61.5 tons
 Angle = 35.42 degrees
 AD = 40.1 ft 

Example 1.7 Page No : 12

In [22]:
import math 

#initialisation of variables
wdc= 3*math.sqrt(3) 	#ft
wdo= math.sqrt(3)
ac= 30.  	#degrees
ao= 60. 	#degrees
hob= 3. 	#ft
haf= 2.6 	#ft
hfc= 3. 	#ft
w= 62.4 	#lb/ft**3
V= 5.63 	#ft**3
h= 4.3   	#ft
y= 3.6 	    #ft

#CALCULATIONS
W1= int(wdc*hfc*w/2)
Hbc= round(w*hob*(hob/2))
W2= int(V*w)
W3= int(w*haf*h)
Vt= W1+W2
Vht= Hbc+W3
Rt= int(math.sqrt(Vt**2+Vht**2))
A= math.degrees(math.atan(Vht/Vt))
x= (W1*(wdo-(hob/2))+Hbc*y)/Rt
OP= x/math.sin(math.radians(A))
AP= hob+OP

#RESULTS
print "Resultant thrust = %d lb"%(Rt)
print " Angle = %.2f degrees "%(A)
print  ' Distance from A till horizontal thrust = %.3f ft '%(AP)


# rounding off error
Resultant thrust = 1287 lb
 Angle = 49.44 degrees 
 Distance from A till horizontal thrust = 4.150 ft 

Example 1.8 Page No : 14

In [31]:
import math 

#initialisation of variables
r= 96.      # T air
T= 10.5 	#C
K1= 288. 	#C temperature gound level
K2= 0.0015 	#C**-1  temperature gradient
h= 3000. 	#ft height
P1= 14.69

#CALCULATIONS
P2= P1*10**(((1/(r*K2))*math.log10((K1-K2*h)/K1)))
w= P2*144/(r*(273+T))

#RESULTS
print  'Density = %.4f lb/ft**3 '%(w)
Density = 0.0697 lb/ft**3 

Example 1.9 Page No : 15

In [32]:
import math 

#initialisation of variables
Hb= 20. 	#in ratio
Ha= 1.   	#in ratio
a= 20. 	    #degrees

#CALCULATIONS
hb= Hb*math.sin(math.radians(a))
dh= hb+Ha
dP= dh/(12*2.309)

#RESULTS
print  'Pressure difference between tapping points = %.3f lb/in**2 '%(dP)
Pressure difference between tapping points = 0.283 lb/in**2 

Example 1.10 Page No : 16

In [4]:
import math 

#initialisation of variables
P= 180. 	#ln/in**2  pressure
r= 53.      #T air
T= 60.   	#F temperature of air
w= 62.4 	#lb/ft**3
h= 12. 	    #in water level

#CALCULATIONS
R= P*144/(r*(460+T))
dP= 12*(1-(R/w))
Pab= dP/(12*2.309)

#RESULTS
print  'Difference in water level = %.2f in of water '%(dP)
print " Pressure difference = %.3f lb/in**2"%(Pab)
Difference in water level = 11.82 in of water 
 Pressure difference = 0.427 lb/in**2
In [ ]: