Chapter 5 : First Law of Thermodynamics for Control Volumes

Example 5.1 Page No : 119

In [1]:
# Variables
Q = -24.; 			#KJ/kg

p1 = 5e5; 			#N/m**2
t1 = 227.; 			#°C
V1 = 50.; 			#m/s
v1 = 0.78; 			#m**3/kg

p2 = 1e5; 			#N/m**2
t2 = 57.; 			#°C
V2 = 100.; 			#m/s
v2 = 0.97; 			#m**3/kg

g = 9.81; 			#m/s**2 			#acceleration due to gravity

delta_z = -5; 			#m 
Cv = 0.7; 			#KJ/kg 
delta_u = Cv*(t2 - t1); 			#KJ/kg 			#change in internal energy 			#u2-u1

			
# Calculations and Results
delta_h = delta_u + (p2*v2 - p1*v1)*.001; 			#KJ/kg 			#change in enthalpy 			#h2-h1

W_x = Q - (delta_h + (V2**2 - V1**2)/2*.001 + g*delta_z*.001); 			#kJ/kg 			#Work Output

print "Work output = %.1f KJ/kg"%(W_x);
Work output = 384.3 KJ/kg

Example 5.2 Page No : 120

In [3]:
			
# Variables
m = 5000./3600 			# kg/s 			# flow rate
W_x = 550.   			# KJ/s 			#power developed by turbine
Q = 0.   	    		#Heat loss is negligible

			
# Calculations and Results
#Part (a)
print "Parta"
V1 = 0. 			# m/s 			#inlet velocity
V2 = 360. 			# m/s 			#exit velocity
g = 9.81 			# m/s**2
delta_z = 0. 			#m 			#z2-z1

delta_h = ((Q-W_x)/m)-g*delta_z*.001-((V2**2-V1**2)/2000) 			#KJ/Kg 			#change in enthalpy
print "Change in enthalpy = %.2f KJ/kg"%(delta_h)

#Part (a)
print "Partb"
V1 = 60. 			# m/s 			#inlet velocity
V2 = 360. 			# m/s 			#exit velocity
g = 9.81 			# m/s**2
delta_z = 0. 			#m 			#z2-z1

delta_h = ((Q-W_x)/m)-g*delta_z*.001-((V2**2-V1**2)/2000) 			#KJ/Kg 			#change in enthalpy
print "Change in enthalpy = %.2f KJ/kg"%(delta_h)

# note : rounding off error
Parta
Change in enthalpy = -460.80 KJ/kg
Partb
Change in enthalpy = -459.00 KJ/kg

Example 5.3 Page No : 122

In [2]:
			
# Variables
mA = 0.8 			# kg/s 			#flow rate of stream A
pA = 15e5 			# N/m**2 			#Pressure of stream A
tA = 250. 			#°C 			#temperature of stream A

mB = 0.5 			# kg/s 			#flow rate of stream B
pB = 15e5 			# N/m**2 			#Pressure of stream B
tB = 200. 			#°C 			#temperature of stream B

Q = 0. 			#No heat loss

p1 = 10e5 			# N/m**2 			#pressure supply of chamber
t2 = 30. 			#°C 			#exhaust air temperature from turbine

Cv = 0.718 			# KJ/kgK 			#heat capacity at constant volume
Cp = 1. 			# KJ/kgK 			#heat capacity at constant pressure

			
# Calculations and Results
#Part(a)
print "Part a"
t1 = ((mA*Cp*tA)+(mB*Cp*tB))/((mA*Cp)+(mB*Cp)) 			# °C 			#the temperature of air at inlet to the turbine
print "The temperature of air at inlet to the turbine = %.2f °C"%(t1);

#Part(b)
print "Part b"
WT = -1*(mA+mB)*Cp*(t2-t1) 			# °kW 			#power developed by turbine
print "Power developed by turbine = %.0f kW"%(WT);
Part a
The temperature of air at inlet to the turbine = 230.77 °C
Part b
Power developed by turbine = 261 kW

Example 5.4 Page No : 123

In [5]:
import math

# Variables
d1 = 0.15 			#m 			#inlet diameter
m = 4000./3600 			# kg/s 			#flow rate
v1 = 0.285 			#m**3/kg 			#specific volume at entry
d2 = 0.25 			#m 			#exit diameter
v2 = 15. 			# m**3/kg 			#specific volume at exit

			
# Calculations and Results

A1 = math.pi*d1**2/4 			#m**2 			#inlet cross sectional area
A2 = math.pi*d2**2/4 			# m**2 			# exit cross sectional area
print "Inlet cross sectional area A1)= %.5f m**2"%(A1);
print "Exit cross sectional area A2)= %.4f m**2"%(A2);

V1 = m*v1/A1 			#m/s 			#inlet velocity
V2 = m*v2/A2 			#m/s 			#exit velocity

print "Inlet velocity = %.1f m/s"%(V1);
print "Exit velocity = %.1f m/s"%(int(V2));
Inlet cross sectional area A1)= 0.01767 m**2
Exit cross sectional area A2)= 0.0491 m**2
Inlet velocity = 17.9 m/s
Exit velocity = 339.0 m/s

Example 5.5 Page No : 125

In [6]:
			
# Variables
p1 = 10.			#bar 			#inlet pressure
t1 = 300. 			#°C 			#inlet temperature

p2 = 0.1 			#bar 			#exit pressure
Cp = 1. 			#kJ/kgK 			# heat capacity at constant pressure
			
# Calculations and Results
#Adiabatic process
delta_h = 0 			#change in enthalpy
t2 = delta_h/Cp + t1
print "Temperature of air after throttling = %.0f °C"%(t1)
Temperature of air after throttling = 300 °C

Example 5.6 Page No : 126

In [7]:
			
# Variables
p1 = 1e5 			# N/m**2 			#inlet pressure
v1 = 0.08 			#m**3/kg 			# specific volume at inlet
p2 = 7e5 			# N/m**2 			#exit pressure
v2 = 0.016 			# m**3/kg 			#specific volume at exit
u1 = 48. 			# kJ/kg 			# internal energy at inlet
u2 = 200. 			# kJ/kg 			# internal energy at exit
Q = -120. 			# kJ/kg 			# heat loss
			
# Calculations and Results
Wc = ((u2 - u1) + (p2*v2 - p1*v1)*.001 - Q)*-1 			# kJ/kg 			# work input to compressor
print "Work input to compressor Wc) = %.1f kJ/kg"%(Wc)
Work input to compressor Wc) = -275.2 kJ/kg

Example 5.7 Page No : 128

In [8]:
# variables
mh = 9.45 			# kg/s 			# flow rate of steam
h_h2 = 140. 			# kJ/kg 			# enthalpy of condensate
h_h1 = 2570. 			# kJ/kg 			# inlet enthalpy of steam
t1 = 25. 			# °C 			#inlet temperature of cooling water
t2 = 36. 			# °C 			#exit temperature of cooling water
c = 4.189 			# kJ/kg deg 			# specific heat of water
			
# Calculations and Results
mc = -1*(mh*(h_h2-h_h1))/(c*(t2-t1)) 			# kg/s 			#mass flow rate of cooling water
print "Mass flow rate of cooling water = %.2f kg/s"%(mc)
Mass flow rate of cooling water = 498.35 kg/s

Example 5.8 Page No : 129

In [9]:
# variables
mh = 9.45 			# kg/s 			# flow rate of steam
h_h2 = 140. 			# kJ/kg 			# enthalpy of condensate
h_h1 = 2570. 			# kJ/kg 			# inlet enthalpy of steam
t1 = 25. 			# °C 			#inlet temperature of cooling water
t2 = 36. 			# °C 			#exit temperature of cooling water
c = 4.189 			# kJ/kg deg 			# specific heat of water
fractionalheatloss = 0.1 			# fractional heat loss
			
# Calculations and Results
mc = -1*((1-fractionalheatloss)*mh*(h_h2-h_h1))/(c*(t2-t1)) 			# kg/s 			#mass flow rate of cooling water
print "Mass flow rate of cooling water = %.1f kg/s"%(mc)
Mass flow rate of cooling water = 448.5 kg/s

Example 5.9 Page No : 130

In [10]:
# variables
V1 = 300 			#m/s 			#inlet air velocity
t2 = 100 			#°C 			#exit air temperature
V2 = 15 			#m/s 			#exit air velocity
			
# Calculations and Results
t1 = t2 + .001*(V2**2 - V1**2)/2 			# °C 			#inlet air temperature
print "Inlet air temperature = %.1f °C"%(t1)
Inlet air temperature = 55.1 °C

Example 5.10 Page No : 131

In [7]:
			
# Variables
m1 = 0.8 			#kg 			#initial mass of air
p1 = 150. 			#kPa 			#initial pressure of air
T1 = 300. 			#K 			#initial temperature of air
p_p = 600. 			#kPa 			#pressure of air in pipe
T_p = 330. 			#K 			# temperature of air in pipe

			
# Calculations and Results
m2T2 = (p_p/p1)*T1*m1
m2 = ((0.718*(m2T2/m1-T1))/(331.65)*m1)+m1 			#kg 			#final mass of air
print "Mass of air entering in vessel = %.4f kg"%(m2-m1)
T2 = m2T2/m2 			#K 			#Temperature of air in vessel
print "Temperature of air in vessel = %.0f K"%(T2)
Mass of air entering in vessel = 1.5588 kg
Temperature of air in vessel = 407 K