Chapter 9 : Fluid Flow in Pipes

Example 9.1 Page No : 281

In [2]:
import math 

# variables		
d = 6.;	    	#inches
v = 15.;		#fps
l = 100.;		#ft
h_L = 17.5;		#ft

# calculations 
f = round(h_L*(d/(12*l))*(2*32.2/v**2),3);
V_f = v*math.sqrt(f/8.);

# results 
print 'The friction velocity = %.2f fps'%(V_f);

#incorrect answer in textbook
0.025
The friction velocity = 0.84 fps

Example 9.2 Page No : 285

In [3]:
import math 
		
# variables
T = 100.;		# degreeF
d = 3.;		    # inches
Re = 80000.;	# Reynolds number
e = 0.006;		# inches
l = 1000.;		#feet
f1 = 0.021;		#friction factor
nu = 0.729*10**-5;		# sqft/sec

# calculations 
V = Re*nu/0.25;
h_L1 = f1*(l/0.25)*(V**2 /(2*32.2));
f = 0.316/Re**0.25;
h_L = (f/f1)*h_L1;

# results 
print 'Head loss expected = %.1f ft and head loss expected if the pipe were smooth = %.2f ft'%(h_L1,h_L);
Head loss expected = 7.1 ft and head loss expected if the pipe were smooth = 6.35 ft

Example 9.3 Page No : 288

In [4]:
import math 
		
# variables
T = 100.;		#degreeF
d = 3.;		    # inches
Re = 80000.;	# Reynolds number
e = 0.006;		#inches
l = 1000.;		#ft
f = 0.0255;		#friction factor
V = 2.33;		#fps

# calculations 
h_L = f*(l/0.25)*(V**2 /(2*32.2));

# results 
print 'Head loss expected = %.1f ft'%(h_L);
Head loss expected = 8.6 ft

Example 9.4 Page No : 290

In [4]:
import math 
		
# variables
Q = 100.;		#gallons per minute
sg = 0.90;
nu = 0.0012;	# lb-sec/sqft
d = 3.;		    # in
l = 1000.;		#ft
r = 1.;		    #in
V = 4.53;		#fps

# calculations 
Re = V*(d/12)*sg*1.935/nu;
h_L = (64/Re)*(12*l/d)*(V**2 /(2*32.2));
v = 2*V*(1 - (2/d)**2);
tau = 62.4*sg*h_L/(2*l*12);

# results 
print 'v = %.2f fps, h_L = %.1f ft of oil and tau = %.3f psf'%(v,h_L,tau);
v = 5.03 fps, h_L = 49.6 ft of oil and tau = 0.116 psf

Example 9.5 pageno : 293

In [14]:
import math

# variables
# assume
v_vc =  0.80      
V = 8.35          #fps
R = 737000
f = 0.019       # from fig.

# calculations
V_Vc = 1./(1+ 4.07* math.sqrt(f/8))
Q = math.pi * V/4
# results
print "V/Vc = %.3f"%V_Vc
print "Q = %.2f cfs"%Q
V/Vc = 0.834
Q = 6.56 cfs

Example 9.6 Page No : 295

In [7]:
import math 
		
# variables
Q = 90.;		# gallons per minute
T = 68.;		#degreeF
d = 3.;		    # in
l = 3000.;		#ft
r = 1.;		    # in
f = 0.018;

# calculations 
V = Q/(60*7.48*0.25*math.pi*(d/12)**2);
Re = V*(d/12)*1.935/(0.000021);
h_L = f*(l/0.25)*(V**2 /(2*32.2));
tau_0 = f*1.935*V**2 /8;
tau1 = 2*tau_0/d;
v_c = V*(1+4.07*math.sqrt(f/8));
v_ = math.sqrt(tau_0/1.935);
v1 = v_*(5.50+5.75*math.log10(v_*(r/(2*12))/0.00001085));
v1_ = v_c-v_*5.75*math.log10(0.5*d/(r/2));
delta = d*32.8/(Re*math.sqrt(f));

# results 
print 'Head lost = %.1f ft of water \
\nWall shear stress = %.3f psf \
\nthe center velocity = %.2f fps \
\nshearing stress = %.3f psf \
\nv1 = %.2f fps \
\ndelta = %.4f in.'%(h_L,tau_0,v_c,tau1,v1_,delta);
Head lost = 56.0 ft of water 
Wall shear stress = 0.073 psf 
the center velocity = 4.87 fps 
shearing stress = 0.048 psf 
v1 = 4.34 fps 
delta = 0.0078 in.

Example 9.7 Page No : 298

In [5]:
import math 
		
# variables
d = 12.;		# in
v = 10.;		#fps
e = 2.;		    #in
k = 0.002;		#relative roughness
l = 1000.;		#ft

# calculations 
f = (1/(1.14+2*math.log10(1/k)))**2;
v_c = v*(1+4.07*math.sqrt(f/8));
tau_0 = f*1.935*v**2 /8;
v2 = v_c - tau_0*5.75*math.log10(0.5*d/e);
v2_ = 8.48*tau_0 + tau_0*5.75*math.log10(e/(12*k));
h_L = f*(l)*v**2 /(2*32.2); 

# results 
print 'f = %.4f, v_c = %.2f fps, v2 = %.1f fps and h_L = %.1f ft of water'%(f,v_c,v2_,h_L);

#there are small errors in the answer given in textbook
f = 0.0234, v_c = 12.20 fps, v2 = 11.0 fps and h_L = 36.3 ft of water

Example 9.8 Page No : 300

In [6]:
import math 
		
# variables
V = 4.08;		    # fps
Re = 93800.;		#Reynolds number
r = 1.;		#in
m = 1./7;
R = 3.;		#in

# calculations 
f = 0.316/(Re**0.25);
v_c = V/(2/((m+1)*(m+2)));
v1 = v_c*(r/R)**(1./7);
tau_0 = f*1.935*V**2 /8;

# results 
print 'f = %.3f, v_c = %.2f fps, v1 = %.2f fps and wall shear = %.3f ps'%(f,v_c,v1,tau_0);
f = 0.018, v_c = 5.00 fps, v1 = 4.27 fps and wall shear = 0.073 ps

Example 9.9 Page No : 302

In [10]:
import math 
		
# variables
p = 14.7;		#psia
T = 60.;		# degreeF
l = 2000.;		#ft
b = 18.;		#in
h = 12.;		# in
v = 10.;		# fps

# calculations 
R_h = (b*h)/(2*12*(b+h));
Re = v*4*R_h*0.0763/(32.2*0.000000375);
f = 0.019;
h_L = f*(l/(4*R_h))*v**2 /(2*32.2);
del_p = 0.0763*h_L;

# results 
print 'loss of head = %.1f ft of air and the pressure drop = %.2f psf = %.3f psi'%(h_L,del_p,del_p*0.0069);
loss of head = 49.2 ft of air and the pressure drop = 3.75 psf = 0.026 psi

Example 9.10 Page No : 305

In [11]:
import math 

# variables
Q = 90.;		#gpm
d = 3.;		#in
l = 3000.;		#ft

# calculations 
V = Q/(60*7.48*0.25*math.pi*(d/12)**2);
R_h = (d/12)/4;
C_hw = 140;
S = (V/(1.318*140*R_h**0.63))**(1/0.54);
h_L = S*l;

# results 
print 'The loss of head = %.1f ft of water'%(h_L);

		
The loss of head = 65.7 ft of water

Example 9.11 Page No : 307

In [11]:
from sympy import *
import math 

# variables
G = 40.;		# lb/min
d = 3.;		# in
T = 100.;		# degreeF
p = 50.;		# psia
l = 2000.;		#ft

# calculations 
Re = ((G/60)*(d/12))/(0.0491*32.2*4*10**-7);
f = 0.015;
gam1 = p*(144/(53.3*(T+460)));
V1 = (G/60)/(gam1*0.0491);
a = math.sqrt(1.4*32.2*53.3*(T+460));
M1 = V1/a;
M2_limit = math.sqrt(1/1.4);
l = (((1-(M1/M2_limit)**2)/(1.4*M1**2)) - 2*math.log(M2_limit/M1))*(0.25/0.015);
p2 = 38.9;		#psia, from trial and error method 
#p2 = Symbol('p2')
#ans = solve((G/60)**2 * 53.3*560/(32.2 * 0.0491**2) * (2*log(p/p2) + gam1*l/0.25) - (144**2 * (p**2 - p2**2)))

# results 
print 'p2 = %.1f psia'%(p2);
p2 = 38.9 psia

Example 9.12 Page No : 312

In [13]:
import math 
		
# variables
d = 12.;		# in
D = 24.;		#in
theta = 20.;		#degrees
G = 10.;		#cfs
p = 20.;		#psi

# calculations 
V12 = G/(0.25*math.pi);
V24 = V12/4;
K_L = 0.43;
p24 = ((p*144/62.4) + (V12**2 /(2*32.2)) - ((V24**2)/(2*32.2)) - K_L*(V12-V24)**2 /(2*32.2))/2.314;

# results 
print 'Pressure in the larger pipe = %.1f psi'%(p24);
Pressure in the larger pipe = 20.7 psi

Example 9.13 Page No : 322

In [14]:
import math 

# variables
d = 12.;		# in
l = 1000.;		#ft
h1 = 200.;		#elevation
h2 = 250.;		#elevation
T = 50.;		#degreeF
f1 = 0.030;

# calculations 
V1 = math.sqrt((h2-h1)*2*32.2/(0.5+f1*l +1));
R1 = V1/0.00000141;
f2 = 0.019;
V2 = math.sqrt((h2-h1)*2*32.2/(0.5+f2*l +1));
R2 = V1/0.00000141;
Q = 0.25*math.pi*(d/12)**2 *V2; 

# results 
print 'Velocity = %.1f fps \
\nflow rate = %.1f cfs'%(V2,Q);

		#there is a minute error in the answer given in textbook
Velocity = 12.5 fps 
flow rate = 9.8 cfs

Example 9.14 Page No : 322

In [16]:
import math 
		
# variables
l = 200.;		#ft
Q = 0.1;		#cfs
del_h = 5.;		#ft
T = 50.;		#degreeF
d = 0.187;		#ft

# calculations 
V = Q/(0.25*math.pi*d**2);
R = V*d/0.0000141;
f = (del_h*2*32.2/V**2 -(1+0.5))*(d/l);

# results 
print 'Required diameter of the pipe = %.2f in.'%(d*12);
Required diameter of the pipe = 2.24 in.

Example 9.15 Page No : 324

In [18]:
import math 
		
# variables
Q = 2.5;		#cfs
T = 50.;		#degreeF
d1 = 8.;		#in
d2 = 6.;		#in
l1 = 1000.;		#ft
l2 = 2000.;		#ft

# calculations 
V8 = Q/(0.25*math.pi*(d1/12)**2);
V6 = Q/(0.25*math.pi*(d2/12)**2);
R8 = V8*0.667/0.0000141;
f8 = 0.020;
R6 = V6*0.5/0.0000141;
f6 = 0.019;
h_L8 = f8*(l1/0.667)*(V8**2 /(2*32.2));
h_L6 = f6*(l2/0.5)*(V6**2 /(2*32.2));
Ep = 100+h_L8+h_L6;
n = Q*62.4*(Ep)/550;
V8 = math.sqrt((30/f8)*2*32.2/(l1/0.667));
Q_max = V8*0.25*math.pi*(d1/12)**2;

# results 
print 'Maximum reliable flow that can be pumped = %.1f cfs'%(Q_max);
Maximum reliable flow that can be pumped = 2.8 cfs

Example 9.16 Page No : 327

In [19]:
import math 
		
# variables
Q = 5.;		#cfs
d = 12.;		#in
l = 5000.;		#ft
h = 70.;		#ft
L = 2000.;		#ft

# calculations 
K = (h/Q**1.85);
a = (L/l)*K;
b = ((l-L)/l)*K;
Q_ = (h/((b+a*(0.5**(1.85)))))**(1/1.85);
Q_A = Q_/2;
Q_B = Q_/2;
del1 = Q_-Q;		#gain capcaity
percent = (del1/Q)*100;		#gain percentage

# results 
print 'The gain of capacity by looping the pipe is %.1f cfs or %d percentage'%(del1,percent);
The gain of capacity by looping the pipe is 1.0 cfs or 20 percentage