Chapter 3 : The Measurement of Fluid Pressure

Example 3.1.1 page no : 52

In [1]:
#initialisation of variables

p= 14.7 		#lbf/in**2
p1= 5. 			#lbf/in**2
w= 62.3 		#lbf/ft**3
h= 30. 			#ft
			
#CALCULATIONS
hmax= (p-p1)*144/w
hmin= h-hmax
			
#RESULTS
print  ' Minimum depth of the water= %.1f ft'%(hmin)
 Minimum depth of the water= 7.6 ft

Example 3.2.1 page no : 56

In [1]:
#initialisation of variables
import math 
T= 20. 			#C
h= 1. 			#cm
dw= 1. 			#gf/cm**3
dm= 13.6 			#gf/cm**3
g= 981. 			#dyne
Tw= 74. 			#dyne/cm
Tm= 465. 			#dyne/cm
			
#CALCULATIONS
hw= (4*Tw)/(dw*g*(h/10))
hm= (4*Tm*math.cos(math.radians(130)))/(dm*g*(h/10))
			
#RESULTS
print  'capillary rise of water= %.1f cm'%(hw)
print  'capillary rise of mercury= %.2f cm'%(hm)
print 'In a tube 1 cm bore, which is about the size used in gauges in mant engineering \n \
recorders, the figures would be %.0f mm and %.2f mm'%(hw,hm)
# answers may vary because of rounding error and inbuilt function.
capillary rise of water= 3.0 cm
capillary rise of mercury= -0.90 cm
In a tube 1 cm bore, which is about the size used in gauges in mant engineering 
 recorders, the figures would be 3 mm and -0.90 mm

Example 3.4.1 page no : 62

In [5]:
#initialisation of variables

w1= 0.81
w2= 0.80
r= 40.
			
#CALCULATIONS
l1 = 2*w1/(w1-w2)
a1= (2*w1)/(w1-w2+(1/r)*(w1+w2))
			
#RESULTS
print  'limiting ratio= %.1f '%(l1)
print 'Actual ratio = %.1f'%a1
limiting ratio= 162.0 
Actual ratio = 32.2

Example 3.4.2 page no : 62

In [2]:
#initialisation of variables

dh= 1. 			#in
a= 1/40.        # area
A = 1           # in.
s= 0.9          # gravity
w= 62.3 		#lb/ft**3
#A = 1728
			
#CALCULATIONS
sensitivity = (A/(w*((A+a)-s*(A-a))))*1728
dpbyw= dh*((1+a)-s*(1-a))
dp= w*dpbyw/1728.
			
#RESULTS
print "Sensitivity = %.2f in/lbf"%sensitivity
print  'pressure difference = %.2e lbf/in**2 '%(dp)


#Answer in the textbook is wrong
Sensitivity = 188.05 in/lbf
pressure difference = 5.32e-03 lbf/in**2 

Example 3.5.1 pageno : 65

In [11]:
#initialisation of variables

x= 1. 			#in
y= 10. 			#in
r= 40.
			
#CALCULATIONS
dbyh= 1/((x/y)+(1/r))

#RESULTS
print  'magnification factor= %.f '%(dbyh)
magnification factor= 8 

Example 3.5.2 page no : 65

In [24]:
%matplotlib inline

from matplotlib.pyplot import *

#initialisation of variables

p= 0.005 			#lbf/in**2
w= 62.4 			#lbf/ft**3
h= 1. 			#in
pressure = [0,9.04,19.08,27.16,36.16,45.20,54.24]
scale = [1.2,3.1,5.1,6.3,8.6,10.9,13.1]

#CALCULATIONS
p= w*h/1728.
plot(scale,pressure)
plot(scale,pressure,'go-')
xlabel("Scale reading")
ylabel("Additional pressure")
suptitle("Calibration of micromanometer")
axis([0,20,0,60])
			
#RESULTS
print  ' pressure difference = %.4f lbf/in**2 '%(p)
Populating the interactive namespace from numpy and matplotlib
 pressure difference = 0.0361 lbf/in**2 
WARNING: pylab import has clobbered these variables: ['draw_if_interactive']
`%pylab --no-import-all` prevents importing * from pylab and numpy