Chapter No.2 :FLUID STATICS

Example 2.1 Page no.44

In [1]:
sg=0.68                      #specific gravity of gasoline
htg=17                       #ft (height of gasoline)
htw=3                       #ft (height of water)
#pressure p= (gamma*h)+atmp

#calculation
#pressure at water- gasoline interface p1 =sg*g*htg+atmp
p1=sg*62.4*htg         #atmp=0 , p1 is in lb/ft**2
pr1=p1/144               #lb/in**2
#pressure head as feet of water H
H= p1/62.4               #ft
#similarly pressure p2 at tank bottom
p2=62.4*htw+p1          #lb/ft**2
pr2 = p2/144                #lb/in**2
#pressure head as ft of water H1
H1=p2/62.4                  #ft

#Result
print "pressure at interface=",round(p1,1),"lb/ft**2"
print "pressure head at interface in feet of water =",round(H,1),"ft"
print "pressure at bottom=",round(p2,1),"lb/ft**2"
print "pressure head at bottom in feet of water =",round(H1,1),"ft"
pressure at interface= 721.3 lb/ft**2
pressure head at interface in feet of water = 11.6 ft
pressure at bottom= 908.5 lb/ft**2
pressure head at bottom in feet of water = 14.6 ft

Example 2.2 Page no.46

In [1]:
%matplotlib inline
Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].
For more information, type 'help(pylab)'.
In [3]:
h=1250                     #ft , height
T=59                        #degree farenheit, Temprature
p=14.7                     #psi (abs), pressure
sw=0.0765               #lb/ft**3, (specific weight of air at p)

#considering air to be compressible
#calculation
import math
#p1/p2=math. exp(-(g*(z1-z2))/(R*T))
ratp=math.exp(-(32.2*h)/(1716*(59+460)))
print "ratio of pressure at the top to that at the base considering air to be compressible=",round(ratp,3)

#considering air to be incompressible
#p2=p1-(sw*(z2-z1))
ratp1=1-((sw*h)/(p*144))
print "ratio of pressure at the top to that at the base considering air to be incompressible=",round(ratp1,3)

#Plot
z=[0,1250,5000]
p=[1,0.955,0.82]
a=plot(z,p)

z1=[0,1250,5000]
p1=[1,0.956,0.84]
a1=plot(z1,p1)
xlabel("(Z2-Z1)(ft)") 
ylabel("(p2-p1)") 
show(a)
show(a1)
ratio of pressure at the top to that at the base considering air to be compressible= 0.956
ratio of pressure at the top to that at the base considering air to be incompressible= 0.955

Example 2.3 Page no.49

In [2]:
#Given 
T=10                     #degree C, Temprature
dmax=40               #m, maximum diameter
p=598                   #mm Hg, pressure

#Calculate
#pressure in lake at any depth h is given by p=gamma*h + local barometric pressure 'pbar'
#pbar/(gamma Hg)=598 mm= .598 m  (gamma Hg) = 133kN/m**3
pbar=0.598*133         #kN/m**2
#(gamma water)=9.804 kN/m**3 at 10 dergree C
p=(9.804*40)+pbar    #kN/m**2

#Result

print "The absolute pressure at a depth of 40 m in the lake=",round(p,0),"kPa(psi)"
 
The absolute pressure at a depth of 40 m in the lake= 472.0 kPa(psi)

Example 2.4 Page no.52

In [3]:
sg1=0.90            #specific gravity of oil
sg2=13.6            #specific gravity of Hg
#height of column at different section
h1=36.0                  #inches, 
h2=6.0                    #inches
h3=9.0                    #inches

#Calculation
#pressure equation: airp+h1*sg1*(gamma water)+h2*sg1*(gamma water)-h3*sg2*(gamma water)=0
airp=-(sg1*62.4*((h1/12)+(h2/12)))+(sg2*62.4*(h3/12))              #lb/ft**2
#gage pressure = airp
pgage=airp/144

#Result

print "Gage pressure=",pgage,"psi"
Gage pressure= 3.055 psi

Example 2.5 Page no.53

In [4]:
gamma1=9.8                 #kN/m**3, specific wt of gage 
gamma2=15.6               #kN/m**3
h1=1                            #m, height
h2=0.5                         #m
#pA-(gamma1)*h1-h2*(gamma2)+(gamma1)*(h1+h2)=pB
#pA-pB=diffp
diffp=((gamma1)*h1+h2*(gamma2)-(gamma1)*(h1+h2))

#Result
print "The difference in pressures at A and B =",diffp,"kpa"
The difference in pressures at A and B = 2.9 kpa

Example 2.6 Page no.61

In [5]:
dia=4                              #m, diameter
sw=9.8                           #kN/m**3 specific weight of water
hc=10                            #m, height
ang=60                          #degrees, amgle

#Calculation
import math
A=math.pi*(dia**2)/4
fres=sw*hc*A
#for the coordinate system shown xc=xres=0
Ixc=math.pi*((dia/2)**4)/4
yc=hc/(math.sin (ang*math.pi/180))
yres= (Ixc/(yc*A))+yc
ydist=yres-yc

#Result
print "The resultant force acting on the gate of the reservoir =",round(fres*10**-3,2,),"kN"
print "The resultant force acts through a point along the diameter of the gate at a distance of ",round(ydist,2),"m"
y=[2,5,10,30]
hc=[0.44,0.18,0.0886,0.04]
a1=plot(y,hc)
xlabel("(hc) m") 
ylabel("(Yr-Ym) m") 
show(a1)
The resultant force acting on the gate of the reservoir = 1.23 kN
The resultant force acts through a point along the diameter of the gate at a distance of  0.09 m

Example 2.7 Page no.62

In [6]:
sw=64                   #lb/ft**3 specific weight of water
h=10                     #ft, depth
a=3                       #ft, distance from horizontal axis
b=3                      #ft    distance from vertical axis

#Calculation
#shape is triangular, hence hc=h-(a/3)
hc=h-(a/3)
A=(0.5*a*b)         #ft**3 area of the right angled triangle
fres=sw*hc*A       #lb
Ixc=b*(a**3)/36
Ixyc=b*(a**2)*(b)/72
#according to the coordinate system taken yc=hc and xc=0
yres=(Ixc/(hc*A))+hc
xres=(Ixyc/(hc*A))
ydist=yres-hc

#Result
print "The resultant force on the area shown is=",round(fres,3),"lb"
print "yR=",round(yres,1),"ft"
print "xR=",round(xres,3),"ft"
The resultant force on the area shown is= 2592.0 lb
yR= 9.0 ft
xR= 0.025 ft

Example 2.8 Page no.66

In [7]:
sg=0.9                 # specific gravity of oil
a=0.6                  #m, length of square
pgage=50               #kPa, gage pressure
h1=2                   #m; height 1
h2=2.6                 #m  height 2

#the force on the trapezoid is the sum of the force on the rectangle f1 and force on triangle f2
f1=((pgage*1000)+(sg*1000*9.81*h1))*(a**2)    #N
f2=sg*1000*9.81*(h2-h1)*(a**2)/2              #N
fres=f1+f2                                                          #N
#to find vertical location of fres fres*yres=(f1*(a/2))+(f2*(h1-h2))
yres=((f1*(a/2))+(f2*(a/3)))/fres                          #m

#Result
print "The resultant force on the plate is=",round((fres/1000),3),"kN"
print "The force acts at a distance of ",round(yres,3), "m " "\n above the bottom plate alond the vertical line of symmetry"
The resultant force on the plate is= 25.31 kN
The force acts at a distance of  0.296 m 
 above the bottom plate alond the vertical line of symmetry

Example 2.9 Page no.68

In [8]:
#Given
dia=6.0                     #ft, diameter
l=1                         #ft, length
#horizontal force f1=sw*hc*A
hc=dia/4                    #ft
sw=62.4                     #lb/ft**3, specific wt
A=(dia/2.0)*l               #ft**2, area
f1=sw*hc*A                  #lb

#Calculation
#this force f1 acts at a height of radius/3 ft above the bottom
ht=(dia/2)/3          #ft
#weight w = sw*volume
import math
w=sw*((dia/2)**2)*math.pi/4*l    #lb
#this force acts through centre of gravity which is 4*radius/(3*%pi) right of the centre of conduit
dist=(4*dia/2)/(3*math.pi)                #ft
#horizontal force that tank exerts on fluid = f1
#vertical force that tank exerts on fluid = w
#resultant force fres =((f1)**2+(w)**2)**0.5
fres =((f1)**2+(w)**2)**0.5          #lb

#Result
print "The resultant force exerted by the tank on the fluid=",round(fres,1),"lb"
print "The force acts at a distance of",round(dist,3),"ft" 
The resultant force exerted by the tank on the fluid= 522.9 lb
The force acts at a distance of 1.273 ft

Example 2.10 Page no.71

In [9]:
dia=1.5           #m
wt=8.5            #kN
#tension in cable T=bouyant force(Fb)-wt
#fluid is water
import math
sw=10.1                #kN/m**3

#Calculaton
vol=math.pi*dia**3/6   #m**3
Fb=sw*vol              #kN
T=Fb-wt                #kN

#Result
print "The tension in the cable =",round(T,2),"kN"
The tension in the cable = 9.35 kN

Example 2.11 Page no.75

In [10]:
sg=0.65             #specific gravity of fuel
l1=0.75              #ft, horizontal distance
l2=0.5               #ft  verticle distance
#0.5 ft =z1(max)
#0.5=0.75*(ay(max)/g)
aymax=(0.5*32.2)/0.75            #ft/s**2

#Result
print "The max acceleration that can occur before the fuel level drops \n below the transducer=",round(aymax,1),"ft/s**2"
The max acceleration that can occur before the fuel level drops 
 below the transducer= 21.5 ft/s**2