Chapter 8 : Conservation Law of Energy

Example 8.1 Page no 75

In [1]:
from __future__ import division
print "Example 8.1 page no 75\n\n"
# heat is transferred from a gas 
Cp=1090#average heat capacity of gas
M_dot=9#mass flow rate 
T1=650#gas inlet temperature
#kinetic and potential enargy effects are neglected,there is no shaft work
Q=5.5e+6#heat transferred
delta_H=Q#since there are no kinetic,potential,and shaft work effects
print "\n heat capacity Cp=%0.3f J/kg.deg c\n mass flow rate M_dot=%0.3f kg/s\n gas inlet temperature T1=%0.3f deg c\n heat transferred Q=%0.3f W"%(Cp,M_dot,T1,Q)#
T2=round(-Q/(M_dot*Cp)) + T1
print "\n  temperature T2=%0.f deg c "%(T2)#
Example 8.1 page no 75



 heat capacity Cp=1090.000 J/kg.deg c
 mass flow rate M_dot=9.000 kg/s
 gas inlet temperature T1=650.000 deg c
 heat transferred Q=5500000.000 W

  temperature T2=89 deg c 

Example 8.2 Page no 77

In [2]:
from __future__ import division
print "Example 8.2 page no 77  fig 8.2 \n\n\n"
#fluid flow in a device
#fluid flow with in the control volume is steady
q1=8#flow rate at section 1,direction in
q2=6#flow rate at section 2, direction in
q3=14#flow rate at section 3,direction out
h1=250#enthalpy at section 1
h2=150#enthalpy at section 2
h3=200#enthalpy at section 3
rho=800#density of fluid
print "\n flow rate q1=%0.3f m**3/s\n flow rate q2=%0.3f m**3/s\n flow rate q3=%0.3f m**3/s\n enthalpy h1=%0.3f j/kg\n enthalpy h2=%0.3f j/kg\n enthalpy h3=%0.3f j/kg\n density of fluid rho=%0.3f kg/m**3"%(q1,q2,q3,h1,h2,h3,rho)#
#applying total energy balance
hp=746#1 hp=746 kw
H=rho*(q1*h1+q2*h2-q3*h3)/hp
print "\n enthalpy H=%0.3f hp"%(H)#
#for adiabatic steady operation, Q_dot=0
W_dot=H#W_dot is work 
print "\n work W_dot=%0.3f hp"%(W_dot)#
#since work is positive ,the surroundings must be doing work on the system through some device
Example 8.2 page no 77  fig 8.2 




 flow rate q1=8.000 m**3/s
 flow rate q2=6.000 m**3/s
 flow rate q3=14.000 m**3/s
 enthalpy h1=250.000 j/kg
 enthalpy h2=150.000 j/kg
 enthalpy h3=200.000 j/kg
 density of fluid rho=800.000 kg/m**3

 enthalpy H=107.239 hp

 work W_dot=107.239 hp

Example 8.5 Page no 81

In [3]:
from __future__ import division
from math import sqrt
print " Example 8.5 page no 81 fig 8.3\n\n\n"
#a cylindrical tank filled with water
#applying bernoulli equation
z1=9#elevation head at section 1
h2=1#height at section 2
D1=3#diameter of cylindrical tank 
D2=.3#diameter of outlet hole of tank
g=9.807#gravitational acceleration
print "\n elevation head at section 1 z1=%0.3f m\n height at section h2=%0.3f m\n diameter of cylindrical tank D1=%0.3f m\n diameter of outlet hole of tank D2=%0.3f m\n gravitational acc. g=%0.3f m/s**2"%(z1,h2,D1,D2,g)#
t=2*((sqrt(z1)-sqrt(h2))/((sqrt(2*g))*(D2/D1)**2))
print "\n time t=%0.3f sec"%(t)#
x=-(D2/D1)**2#ratio of a/g
print "\n  x=%0.3f"%(x)#
#for this example the maximum acceleration is 1% of g,therefore saftey use Bernoulli equation  
 Example 8.5 page no 81 fig 8.3




 elevation head at section 1 z1=9.000 m
 height at section h2=1.000 m
 diameter of cylindrical tank D1=3.000 m
 diameter of outlet hole of tank D2=0.300 m
 gravitational acc. g=9.807 m/s**2

 time t=90.319 sec

  x=-0.010