Chapter 5: The Momentum Equation and its Applications

Example 5.1, Page 119

In [1]:
from __future__ import division
import math

 #Initializing  the  variables  

l  =  60  ;                                                                #Length  of  pipeline
rho  =  1000;                                                          #  Density  of  liquid
a  =  0.02;                                                              #Acceleration  of  fluid

 #Calculations
delP  =  rho*l*a;                                                  #Change  in  pressure
print "Increase of pressure difference required (kN/m2):",delP/1000
Increase of pressure difference required (kN/m2): 1.2

Example 5.2, Page 121

In [1]:
from __future__ import division
import math

 #Initializing  the  variables  
v  =  5;                                 #Velocity  of  jet          
rho  =  1000;                            #density  of  water
d  =  0.025;                             #Diameter  of  fixed  nozzle

 #Calculations
 #--Part(a)  Variation  of  force  exerted  normal  to  the  plate  with  plate  angle--//
header  =  "Theta\t vcos(x)\t pAv\t Force"
unit  =    "deg\t m/s\t kg/s\t N"

A  =  math.pi*d**2/4;
x  =  range(0,91,15);
for c in range(len(x)):
    x[c]=1.0*x[c]
m  =  round(rho*A*v,2);
ma  =  [m,m,m,m,m,m,m];
vcomp=[]
force=[]
for c in x:
    vcomp.append(round(v*math.cos(math.radians(c)),2))
    force.append(round((rho*A*v**2)*math.cos(math.radians(c)),2))

print header
print unit
for c in range(len(x)):
    mm=str(x[c])+' \t '+str(vcomp[c])+' \t'+str(ma[c])+' \t'+str(force[c])
    print mm
##value  = [x,vcomp,ma,force]
##print value,unit, header

 #--Part(b)  Variation  of  force  exerted  normal  to  the  plate  with  plate  velocity--//        
header  ="Theta\t v\t u\t v-u\t pA(v-u)\t Force\t"
unit    ="deg\t m/s\t m/s\t m/s\t kg/s\t N\t"
x  =  [0,0,0,0,0]
v  =  [5,5,5,5,5]
u  =  range(2,-3,-1);
D=[]
Prod=[]
Force=[]
for c in range(5):
    D.append(v[c]-u[c])
    Prod.append(round((rho*A*D[c]),2))
    Force.append(round((rho*A*D[c]**2),2))
    
print '\n',"(b)","\n",header
print unit
for c in range(len(x)):
    mm=str(x[c])+' \t '+str(v[c])+' \t '+str(u[c])+' \t '+str(D[c])+' \t '+str(Prod[c])+' \t '+str(Force[c])
    print mm
    
Theta	 vcos(x)	 pAv	 Force
deg	 m/s	 kg/s	 N
0.0 	 5.0 	2.45 	12.27
15.0 	 4.83 	2.45 	11.85
30.0 	 4.33 	2.45 	10.63
45.0 	 3.54 	2.45 	8.68
60.0 	 2.5 	2.45 	6.14
75.0 	 1.29 	2.45 	3.18
90.0 	 0.0 	2.45 	0.0

(b) 
Theta	 v	 u	 v-u	 pA(v-u)	 Force	
deg	 m/s	 m/s	 m/s	 kg/s	 N	
0 	 5 	 2 	 3 	 1.47 	 4.42
0 	 5 	 1 	 4 	 1.96 	 7.85
0 	 5 	 0 	 5 	 2.45 	 12.27
0 	 5 	 -1 	 6 	 2.95 	 17.67
0 	 5 	 -2 	 7 	 3.44 	 24.05

Example 5.3, Page 123

In [3]:
from __future__ import division
import math

  

 #Initializing  the  variables  
x  =  60;                                                     #Angle  of  deflection theta
rho  =  1000;                                                 #  Density  of  liquid
V1  =  30;                                                    #Acceleration  of  fluid
V2  =  25;
m  =  .8;                                                     #Discharge  through  A

 #Calculations
def  Reaction(Vin , Vout):
    R  =  m*(Vin  -Vout)  ;
    return R
Rx  =  Reaction(V1,V2*math.cos(math.radians(x)));
Ry  =  -Reaction(0,V2*math.sin(math.radians(x)));
print "Reaction in X-direction (N)                              :",Rx
print "Reaction in Y-direction (N)                              :",round(Ry,2)
print "Net Reaction            (N)                              :",round((Rx**2 +Ry**2)**0.5,2)
print "Inclination of Resultant Force with x-direction (Degrees):",round(180/math.pi*math.atan(Ry/Rx),2)
Reaction in X-direction (N)                              : 14.0
Reaction in Y-direction (N)                              : 17.32
Net Reaction            (N)                              : 22.27
Inclination of Resultant Force with x-direction (Degrees): 51.05

Example 5.4, Page 125

In [4]:
from __future__ import division
import math



 #Initializing  the  variables  
v1  =  36  ;                                                              #Exit  velocity
u  =  15;                                                                  #Velocity  of  vane\
x  =  30;                                                                  #  Angle  between  vanes  and  flow
rho  =  1000;                                                          #  Density  of  water
d  =  .1;                                                                  #  Diameter  of  jet

 #Calculations
alp  =  (180/math.pi)*math.atan((v1*math.sin(math.radians(x))/(v1*math.cos(math.radians(x))-u)));
v2  =  0.85*v1*math.sin(math.radians(x));
bta  =    (180/math.pi)*math.acos((u*math.sin(math.radians(alp))/v2));
m  =  (rho*math.pi*v1*d**2)/4;
Vin  =  v1*math.cos(math.radians(x));
Vout  =  v2*math.cos(math.radians(90));
Rx  =  m*(Vin-Vout);


print "Inlet Angle            (Degrees) :", round(alp,2)
print "Outlet Angle           (Degrees) :", round(bta,2)
print "Force exerted by vanes (N)       :", round(Rx) 
    
Inlet Angle            (Degrees) : 48.05
Outlet Angle           (Degrees) : 43.18
Force exerted by vanes (N)       : 8815.0

Example 5.5, Page 127

In [5]:
from __future__ import division
import math



 #Initializing  the  variables  
rho  =  850  ;                                                          #  Density  of  liquid
a  =  0.02                                                                #Acceleration  of  fluid
x  =  45  ;
d1  =  .5  ;
d2  =  .25;
p1  =  40*10**3;
p2  =  23*10**3;
Q  =  .45;
   
 #Calculations
A1  =  (math.pi*d1**2)/4;
A2  =  (math.pi*d2**2)/4;
v1  =  Q/A1;
v2  =  Q/A2;

Rx  =  p1*A1  -  p2*A2*math.cos(math.radians(x))  -  rho*Q*(v2*math.cos(math.radians(x))-v1);
Ry  =  p2*A2*math.sin(math.radians(x))  +  rho*Q*v2*math.sin(math.radians(x));

print "Resultant force on the bend                     (kN)     :",round((Rx**2 +Ry**2)**0.5/1000,3)
print "Inclination of Resultant Force with x-direction (Degrees):",round(math.atan(Ry/Rx)*180/math.pi)
Resultant force on the bend                     (kN)     : 6.362
Inclination of Resultant Force with x-direction (Degrees): 31.0

Example 5.6, Page 129

In [6]:
from __future__ import division
import math



 #Initializing  the  variables  
v  =  4.9;                                                                #Velocity  of  Jet
rho  =  1000;                                                          #  Density  of  water
d  =  0.05;
u  =  1.2                                                                  #  Velocity  of  tank
 #Calculations
Vout  =  v;
Vin  =  0;
m  =  rho*math.pi*d**2*v/4;
R  =  m*(Vout-Vin);
print "Reaction of jet on tank (N) :",round(R,2)
print "Work done per second    (W) :",round(R*u,2)
Reaction of jet on tank (N) : 47.14
Work done per second    (W) : 56.57

Example 5.7, Page 130

In [7]:
from __future__ import division
import math
from scipy import integrate
 
 

 #Initializing  the  variables  
Vj  =  5*10**6;                               # Velocity  of  Jet
Mr  =  150000;                                # Mass  of  Rocket
Mf0  =  300000;                               # Mass  of  initial  fuel
Vr  =  3000;                                  # Velocity  of  jet  relative  to  rocket
g  =  9.81;                                   # Acceleration  due  to  gravity

 #Calculations
m  =  Vj/Vr;                                  #Rate  of  fuel  consumption
T  =  Mf0/m;                                  #  Burning  time

def f(t,m,Vr,Mr,Mf0,g):
    return m*Vr  /(Mr  +  Mf0  -  m*t)  -  g;
 
args = (5000/3,3000,150000,300000,9.81)
Vt = integrate.quad(f, 0.0, 180, args)

def h(t,Vr,g):
    return -g*t - Vr*math.log(1 - t/269.95);
 
args = (3000,9.81)
Z1 = integrate.quad(h, 0.0, 180, args)
Z2 =  Vt[0]**2/(2*g);

print "(a)Burning time (s)                             :",T
print "(b)Speed of rocket when all fuel is burned (m/s):",round(Vt[0],2)
print "(c)Maximum height reached (km)                  :",round((Z2+Z1[0])/1000,1)
(a)Burning time (s)                             : 180.0
(b)Speed of rocket when all fuel is burned (m/s): 1530.04
(c)Maximum height reached (km)                  : 203.8

Example 5.8, Page 134

In [8]:
from __future__ import division
import math


 #Initializing  the  variables  
V  =  200;                                                                #Velocity  in  still  air
Vr  =  700;                                                              #velocity  of  gas  relative  to  engine
mf  =  1.1;                                                              #  Fuel  Consumption
r  =  1/40  ;        
P1  =0;
P2  =  0;

 #Calculations
m1  =    mf/r;
T  =  m1*((1+r)*Vr  -V);
print "(a)Thrust               (kN) :",T/1000

W  =  T*V;
print "(b)Work done per second (kW) :",W/1000

Loss  =  0.5*m1*(1+r)*(Vr-V)**2;
print "(c)Efficiency           (%)  :",round(W/(W+Loss)*100,1) 
(a)Thrust               (kN) : 22.77
(b)Work done per second (kW) : 4554.0
(c)Efficiency           (%)  : 44.7

Example 5.10, Page 140

In [9]:
from __future__ import division
import math

 #Initializing  the  variables  
rho  =  1000;                                                          #  Density  of  water
Q  =  10;                                                                  #Acceleration  of  fluid
r2  =  1.6;
r1  =  1.2;
V1  =  2.3;
V2  =  0.2;
rot  =  240;  

 #Calculations
Tf  =  rho*Q*(V2*r2  -  V1*r1);
T  =  -Tf;
n  =  rot  /  60;
P  =  2*round(math.pi,3)*n*T;

print "Torque exerted by fluid  (N.m):",T
print "Theoretical power output (kW) :",round(P/1000,2)
Torque exerted by fluid  (N.m): 24400.0
Theoretical power output (kW) : 613.32