# Chapter 4 : Flow of an Incompressible Ideal Fluid¶

## Example 4.1 Page No : 103¶

In [1]:
import math

# variables
d = 4.;		        #feet
theta = 30.;		# degrees
p_C = 5.    		# psi

# calculations
p_A = p_C-(62.4/144)*math.cos(theta*math.pi/180) *2;
p_B = p_C+(62.4/144)*math.cos(theta*math.pi/180) *2;
h = p_C*144/62.4;

# results
print 'The static pressures at A and B are %.2f psi and %.2f psi respectively.'%(p_A,p_B);
print 'The hydraulic grade line is %.2f ft vertically above C'%(h);

The static pressures at A and B are 4.25 psi and 5.75 psi respectively.
The hydraulic grade line is 11.54 ft vertically above C


## Example 4.2 Page No : 105¶

In [2]:
import math

# variables
h = 100.;		#ft
d1 = 5.;		#in
d2 = 8.;		#in
h1 = 60.;		# ft
h2 = 10.;		#ft
h3 = 40.;		#ft
h4 = 102.;		#ft
H = 300.;		#ft
theta = 30.;		#degrees
gam = 0.43;

# calculations
V5 = math.sqrt(h*2*32.2);
Q = V5*0.25*math.pi*(d1/12)**2;
V1 = (d1/12)**4 *h;
V2 = h*(d1/d2)**4;
p1 = (h1-V1)*gam;
p2 = -(h2-V2)*2.04*gam;
p3 = (h3-V1)*gam;
p4 = (h4-V1)*gam;
V6 = V5*math.cos(theta*math.pi/180);
e = H - (V6**2)/(2*32.2);

# results
print 'p1 = %.1f psi, p2 = %.1f in. of Hg vacuum, p3 = %.f psi and p4 = %.1f psi'%(p1,p2,p3,p4);
print 'elevation = %.1f ft'%(e);

p1 = 24.5 psi, p2 = 4.6 in. of Hg vacuum, p3 = 16 psi and p4 = 42.6 psi
elevation = 225.0 ft


## Example 4.3 Page No : 107¶

In [4]:
import math

# variables
p = 14.;		#psia
gam = 62.;		#lb/cuft
l1 = 35.;		# ft
l2 = 10.;		# ft
d = 6.; 		#in

# calculations
p_v = 2.2*gam;
p_B = p*144;
k_c = l1-l2+(p_B/gam)-(p_v/gam);
K6 = l1;
d_c = d*(K6/k_c)**0.25;

# results
print 'd = %.2f in'%(d_c);

d = 5.35 in


## Example 4.4 Page No : 108¶

In [2]:
import math

# variables
rho = 0.00238;		#slug/cuft
h = 6.      		#in

# calculations
V_0 = math.sqrt(2*(h/12)*(62.4 - rho*32.2)/rho);

# results
print 'The velocity of the air stream = %.f fps'%(V_0);

The velocity of the air stream = 162 fps


## Example 4.5 Page No : 110¶

In [6]:
import math

# variables
sg = 0.82;
p1 = 20.;		#psia
p2 = 10.;		#psia
d1 = 6.;		#in
d2 = 12.;		#in
del_z = 4.;		#ft
d = 18.7;		#in

# calculations
h1 = (p1-p2)*144/(sg*62.4) - del_z;
A1 = 0.25*math.pi*(d1/12)**2;
A2 = 0.25*math.pi*(d2/12)**2;
V2 = math.sqrt(-2*h1*32.2/(1-(A2/A1)**2));
V1 = (A2/A1)*V2;
Q = A1*V1;

# results
print 'Flow rate = %.2f cfs'%(Q);

#there is a small error in the answer given in textbook

Flow rate = 8.00 cfs


## Example 4.6 Page No : 112¶

In [3]:
import math

# variables
e1 = 100.;  		#ft
theta = 60.;		#degrees
e2 = 98.5;	    	#ft
V_s2 = 20.;	    	#fps
e3 = 95.;	    	#ft

# calculations
t2 = (e1-e2)/math.cos(theta*math.pi/180);
p2 = 3*62.4*math.cos(theta*math.pi/180);
V_F2 = math.sqrt((e1 + (V_s2**2 /(2*32.2)) - p2/62.4 -e2)*2*32.2);
q = 3*1*V_s2;
y = 11.22;		#ft
y1 = 10.74;		#ft
V1 = math.sqrt((y-y1)*2*32.2);

# results
print 'On spillway: Pressure = %.1f psf , velocity = %d fps' %(p2,V_F2);
print 'In the approach channel: Depth = %.2f ft, V1 = %.1f fps'%(y1,V1);

On spillway: Pressure = 93.6 psf , velocity = 20 fps
In the approach channel: Depth = 10.74 ft, V1 = 5.6 fps


## Example 4.7 Page No : 113¶

In [9]:
import math

# variables
d = 10.;		# in
p = 40.;		#psi
G = 5.;		#cfs
y1 = 92.4;		#ft
k1 = -11.3;		#ft
k2 = 92.4;		#ft
k3 = 3.2;		#ft
k4 = 10.1;		#ft

# calculations
E_p = k4+y1+d-k1-k3;
hp = G*62.4*E_p/550;

# results
print 'Pump horsepower = %.1f hp'%(hp);

Pump horsepower = 68.4 hp


## Example 4.9 Page No : 122¶

In [11]:
import math

# variables
sw = 20.;		# specific weight in lb/cuft
p_B = 6.;		#psi
p_A = 2.;		#psi
L = 17.28;		#ft
l = 10.;		#ft

# calculations
V_A = math.sqrt(2*32.2*((p_B-p_A)*144/50 - l));

# results
print 'The mean velocity = %.2f fps'%(V_A);

The mean velocity = 9.89 fps


## Example 4.11 Page No : 126¶

In [12]:
import math

# variables
D = 6.;		#in
v = 100.;	#fps
p = 0.;		#psi
gam = 0.08;	#specific weight in lb/cuft
R = 6.;		#in
theta = 60.;		#degrees

# calculations
v_r = v*(1-(0.5*D/R)**2)*math.cos(theta*math.pi/180);
v_t = -v*(1+(0.5*D/R)**2)*math.sin(theta*math.pi/180);
V = math.sqrt(v_r**2 + v_t**2);
p = ((v**2 /(2*32.2)) - (V**2 /(2*32.2)) - (math.cos(theta*math.pi/180)*math.sin(theta*math.pi/180)))*gam;

# results
print 'Velocity = %.1f fps Pressure = %.2f psf'%(V,p);

Velocity = 114.6 fps Pressure = -3.92 psf


## Example 4.12 Page No : 127¶

In [4]:
import math

# variables
p_A = 0;
p_B = 0;
p_C = 0;
p_D = 0;
V1 = 15.28;		#fps
V2 = 16.78;		#fps
V3 = 15.50;		#fps
V4 = 16.50;		#fps

# calculations
def f0(h):
return h**(1./2)


V_A = 15.28 fps, V_B = 16.78 fps, V_C = 15.50 fps, V_D = 16.50 fps