Chapter 7 : Conservation Law for Mass

Example 7.1 Page no. 64

In [1]:
from __future__ import division
print "example no. 7.1 page no. 64\n\n"
#applying coservation of mass
# rate of mass in-rate of mass out+rate of mass generated=rate of mass accumlated
#according to conditions in this example
#rate of mass in = rate of mass out
Rf=4000#rate of feed of gaseous waste into an incinerator
Ra=8000#rate of air feed
Rm=550#rate of methane added for combustion
Rin=Rf+Ra+Rm#total rate of mass in
Rout=Rin#Rout is rate of mass out
print "\n Rf=%0.3f kg/hr\n Ra=%0.3f kg/hr\n Rm=%0.3f kg/hr\n Rin=%0.3f kg/hr\n Rout=%0.3f kg/hr"%(Rf,Ra,Rm,Rin,Rout)#
example no. 7.1 page no. 64

 Rf=4000.000 kg/hr
 Ra=8000.000 kg/hr
 Rm=550.000 kg/hr
 Rin=12550.000 kg/hr
 Rout=12550.000 kg/hr

Example 7.2 Page no. 65

In [2]:
from __future__ import division
from math import pi
print "Example 7.2 page no. 65\n\n"
#water flowing through a converging circular pipe fig 7.3
#we have to determine mass and volumatric flow rates, mass flux of water 
D1=.14# diameter of pipe at section 1
D2=.07#diameter of pipe at section2
v1=2#velocity at section
S1=pi*(D1**2)/4#surface area at section 1
rho=1000#density of water
print "\n diameter D1=%0.3f m\n diameter D2=%0.3f m\n v1=%0.3f m/s\n Surface area S1=%0.3f m**2\n density of water rho=%0.3f  kg/m**3 "%(D1,D2,v1,S1,rho)# 
q1= S1*v1#volumatric flow rate at section 1
m1=rho*q1#mass flow rate at section 1
G=m1/S1#mass flux at section 1
print "\n volumatric flow rate q1=%0.3f m**3/s\n mass flow ratem1=%0.3f kg/s\n mass flux G=%0.3f kg/m**2*s"%(q1,m1,G)#
q2=q1#q2 volumatric flow rate at section 2,due to steady flow q1=q2
print "\n surface areaS1=%0.3f m**2\n volumatric flow rate q2=%0.3f m**3/s"%(S1,q1)
v2=(v1*S1)/S2#v2 velocity at section 2
print "\n velocity v2=%0.3f m/s"%(v2)
#conclusion :decrease cross section area results in an increase in flow velocity for an incompressible fluid. 
Example 7.2 page no. 65

 diameter D1=0.140 m
 diameter D2=0.070 m
 v1=2.000 m/s
 Surface area S1=0.015 m**2
 density of water rho=1000.000  kg/m**3 

 volumatric flow rate q1=0.031 m**3/s
 mass flow ratem1=30.788 kg/s
 mass flux G=2000.000 kg/m**2*s

 surface areaS1=0.015 m**2
 volumatric flow rate q2=0.031 m**3/s

 velocity v2=8.000 m/s

Example 7.3 Page no 66

In [ ]:
from __future__ import division
print "Example 7.3 page no 66,fig 7.4\n\n\n"
#fluid device has four openings as shoen in figure
#we have to calculate magnitude and direction of velocity,mass flow rate at section 4
rho=800#density of fluid 
v1=5#velocity at section 1
S1=0.2#surface area at section 1
v2=7#velocity at section 2
S2=0.3#surface area at section 2
v3=12#velocity at section 3
S3=0.25#surface area at section 3
S4=0.15#surface area at section 4
print "\n velocity v1=%0.3f m/s \n surface area S1=%0.3f m**2/s\n velocity v2=%0.3f m/s\n surface area S2=%0.3f m**2/s\n velocity v3=%0.3f m/s\n surface area S3=%0.3f m**2/s\n surface area S4=%0.3f m**2/s"%(v1,S1,v2,S2,v3,S3,S4)#
q1=v1*S1#volumatric flow rate at section 1
q2=v2*S2#volumatric flow rate at section 2
q3=v3*S3#volumatric flow rate at section 3
print "\n volumatric flow rate q1=%0.3f m**3/s\n volumatric flow rate q2=%0.3f  m**3/s\n volumatrisc flow rate q3=%0.3f m**3/s"%(q1,q2,q3)#
#applying continuity equation
q4=q1+q2-q3#volumatric flow rate at section 4
v4=q4/S4#velocity at section 4
print "\n volumatric flow rate q4=%0.3f m**3/s\n velocity v4=%0.3f m/s "%(q4,v4)#
m=rho*q4#mass flow rate at section 4
print "\n mass flow rate m=%0.3f kg/s"%(m)#
Example 7.3 page no 66,fig 7.4

 velocity v1=5.000 m/s 
 surface area S1=0.200 m**2/s
 velocity v2=7.000 m/s
 surface area S2=0.300 m**2/s
 velocity v3=12.000 m/s
 surface area S3=0.250 m**2/s
 surface area S4=0.150 m**2/s

 volumatric flow rate q1=1.000 m**3/s
 volumatric flow rate q2=2.100  m**3/s
 volumatrisc flow rate q3=3.000 m**3/s

 volumatric flow rate q4=0.100 m**3/s
 velocity v4=0.667 m/s 

 mass flow rate m=80.000 kg/s

Example 7.4 Page no 67

In [ ]:
from __future__ import division
from sympy import symbols, solve
print "Example 7.4 page no,fig 7.5\n\n"
#Given pollutant in ppm in liquid stream ,some pollutant in discharge volume 
#calculate what fraction of liquid bypass
#liquid stream having 600 ppm pollutant
#pollutant in the discharge stream is 50 ppm
#if B =factio of liquid bypassed,then 1-B= fraction of liquid treated
#performing a pollutant mass balance around point2 in fig. 7.5
print "\n\n calculation:\n  calculation  of liquid  bypassed B=%.4f "%N[0]
Example 7.4 page no,fig 7.5

  calculation  of liquid  bypassed B=0.0833 

Example 7.5 Page no 67

In [ ]:
from __future__ import division
from math import pi
print "Example 7.5 page no 67\n\n"
#water flow in tank inletand outlet pipes
#applying continuity principle to the control volume
#since generation rate =0
d1=0.09#diameter of inlet pipe
q_in=(pi*d1**2)*v_in/4#volumatric flow rate at inlet 
d2=0.04#diameter of outlet pipe
print "\n diameter at inlet d1=%0.3f m\n volumatric flow rate at inlet q_in=%0.3f m**3/s\n diameter d2=%0.3f m\n volumatric flow rate at outlet q_out=%0.3f m**3/s"%(d1,q_in,d2,q_out)#
q=q_in-q_out#for an incmpressible fluid of volume v, q=(dv/dt)=q_in-q_out
D=1.4#diameter of tank
print "\n volumatric flow in tank=%0.3f m**3/s\n diameter of tank D=%0.3f m\n surface area of tank S=%0.3f m**2"%( q,D,S)#
#z=fluid height
R_z=(q_in-q_out)/S#R_z rate of water level rise
print "\n rate of water level rise R_z=%0.3f m/s"%(R_z)#
#R_z is positive ,the water level is rising in the tank from it's initial height of 1.5 m
Example 7.5 page no 67

 diameter at inlet d1=0.090 m
 volumatric flow rate at inlet q_in=0.025 m**3/s
 diameter d2=0.040 m
 volumatric flow rate at outlet q_out=0.004 m**3/s

 volumatric flow in tank=0.022 m**3/s
 diameter of tank D=1.400 m
 surface area of tank S=1.539 m**2

 rate of water level rise R_z=0.014 m/s