from __future__ import division
print "Example: 8.1 - Page: 297\n\n"
# Solution
#*****Data******#
Tl = 273 - 4## [K]
Th = 273 + 30## [K]
Ql = 30## [kW]
#*************
# Solution (a)
COP = Tl/(Th - Tl)#
print "The coeffecient of performance of the cycle is %.2f\n"%(COP)
# Solution (b)
Wnet = Ql/COP## [kW]
print "The power required is %.2f kW\n"%(Wnet)
# Solution (c)
Qh = Wnet + Ql## [kW]
print "The rate of heat rejection in the room is %.2f kW"%(Qh)#
from __future__ import division
print "Example: 8.2 - Page: 298\n\n"
# Solution
#*****Data******#
Tl = -10 + 273## [K]
Th = 45 + 273## [K]
Ql = 1## [ton]
#*************
# Solution (a)
COP = Tl/(Th - Tl)#
Wnet = Ql*3.516/COP## [kW]
print "The power consumption is %.3f kW\n"%(Wnet)
# Solution (b)
Tl = -20 + 273## [K]
Th = 45 + 273## [K]
COP = Tl/(Th - Tl)#
Ql = Wnet*COP## [kW]
print "Cooling Effect produced is %.3f kW\n"%(Ql)#
from __future__ import division
print "Example: 8.3 - Page: 298\n\n"
# Solution
# From Example 8.2:
# For refrigerated space:
# Wnet = Ql/4.78 = 0.209*Ql
# For freezer box.
# Wnet = Ql/3.89 = 0.257*Ql
percent = ((0.257 - 0.209)/0.209)*100#
print "Increase in percentage of work output is %.2f %%"%(percent)#
from __future__ import division
print "Example: 8.4 - Page: 299\n\n"
# Solution
#*****Data******#
Th = 273 + 24## [K]
Tl = 0 + 273## [K]
Qh = 25## [kW]
#*************
COP = Th/(Th - Tl)#
Wnet = Qh/COP## [kW]
print "Coeffecient of performance of Carnot Heat Pump is %.2f\n"%(COP)#
print "Power input can be estimated as %.2f kW\n"%(Wnet)#
from __future__ import division
print "Example: 8.5 - Page: 299\n\n"
# Solution
#*****Data******#
Tl = -2 + 273## [K]
Th = 20 + 273## [K]
Qh = 80000## [kJ/h]
#*************
Ql = Qh*Tl/Th## [kJ/h]
Wnet = Qh - Ql## [kJ/h]
print "Minimum Power input required is %.3f kW\n"%(Wnet/3600)#
from __future__ import division
print "Example: 8.6 - Page: 303\n\n"
# Solution
#*****Data******#
Tl = 273## [K]
Th = 313## [K]
H1 = 187## [Enthalpy of saturated vapour at 273 K, kJ/kg]
H3 = 74## [Enthalpy of saturated liquid at 313 K,kJ/kg]
H4 = H3## [kJ/kg]
H2 = 204## [Enthalpy of Supersaturated Vapour at 273 K, kJ/kg]
#****************
# Solution (i)
# COP = Ql/Wnet#
COP = ((H1 - H4)/(H2 - H1))#
print "Enthalpy of saturated vapour is %.2f\n"%(COP)
# Solution (ii)
Ref_Effect = H1 - H4## [kJ/kg]
print "Refrigerating Effect is %d kJ/kg\n"%(Ref_Effect)
# Solution (iii)
COP = Tl/(Th - Tl)#
print "The COP of an ideal Carnot refrigerator is %.2f\n"%(COP)
# Solution (iv)
W = H2 - H1## [kJ/kg]
print "Work done by the compression is %.2f kJ/kg\n"%(W)#
from __future__ import division
print "Example: 8.7 - Page: 304\n\n"
# Solution
#*****Data******#
P1 = 0.18## [MPa]
T1 = -10 + 273## [K]
mdot = 0.06## [kg/s]
P2 = 1## [MPa]
T2 = 45 + 273## [K]
T = 273 + 29## [K]
P = 0.75## [MPa]
H1 = 245.16## [Enthalpy of superheated vapour at -10 OC & 0.18 MPa, kJ/kg]
H2 = 277.2## [Enthalpy of superheated vapour at 45 OC & 1 MPa, kJ/kg]
H3 = 92.22## [Enthalpy of saturated liquid at 29 OC & 0.75 MPa, kJ/kg]
H4 = H3## [kJ/kg]
#*************
# Solution (a)
Ql = mdot*(H1 - H4)## [kW]
print "Amount of heat removed from cold space is %.2f kW\n"%(Ql)
# Solution (b)
Wnet = mdot*(H2 - H1)## [kW]
print "THe power input required is %.2f kW\n"%(Wnet)
# Solution (c)
COP = Ql/Wnet#
print "COP of refrigeration of cycle is %.2f\n"%(COP)#
from __future__ import division
print "Example: 8.8 - Page: 305\n\n"
# Solution
#*****Data******#
Ql = 5## [tons]
Tl = -10 + 273## [K]
Th = 35 + 273## [K]
eta = 0.85#
H1 = 183.2## [Enthalpy of saturated vapour at 263 K, kJ/kg]
H2 = 208.3## [Enthalpy of superheated vapour, kJ/kg]
H3 = 69.5## [Enthalpy of saturated vapour at 308 K, kJ/kg]
H4 = H3## [kJ/kg]
#***************
# Solution (a)
# Mass flow rate:
Ql = Ql*3.516## [kW]
mdot = Ql/(H1 - H4)## [kW]
print "Mass flow rate of the refrigerant is %.4f kg/s\n"%(mdot)
# Solution (b)
W = H2 - H1## [kJ/kg]
Wnet = W*mdot/eta## [kW]
print "Power consumption in the compression is %.2f kW\n"%(Wnet)
# Solution (c)
Qh = Ql + Wnet## [kW]
print "The amount of heat rejected in the condenser is %.2f kW\n"%(Qh)
# Solution (d)
COP_VapourCompression = (H1 - H4)/(H2 - H1)#
COP_Carnot = Tl/(Th - Tl)#
COP_relative = COP_VapourCompression/COP_Carnot#
print "Relative COP is %.2f\n"%(COP_relative)#
from __future__ import division
print "Example: 8.9 - Page: 308\n\n"
# Solution
#*****Data******#
Th = 273 + 125## [K]
Tl = 273 - 5## [K]
Ts = 273 + 28## [K]
COP = 2#
#*************
COP_absorption = (Tl/(Ts - Tl))*((Th - Ts)/Th)#
if ((COP - 0.1) < COP_absorption) or ((COP + 0.1) > COP_absorption):
print "Claim is Valid and reasonable"
else:
print "Claim is not Valid"
from __future__ import division
print "Example: 8.10 - Page: 313\n\n"
# Solution
#*****Data******#
Q = 5## [tons]
T1 = 253## [Temperature of the working fluid leaving the evaporator, K]
T2 = 303## [Temperature of the working fluid leaving the evaporator, K]
T3 = 303## [K]
Pressure_Ratio = 4#
C = 1.008## [kJ/kg]
gama = 1.4#
#**************
# Solution (a)
T2 = T1*((Pressure_Ratio)**((gama - 1)/gama))## [K]
T2 = T1*(Pressure_Ratio)**((gama - 1)/gama)## [K]
T4 = T3/((Pressure_Ratio)**((gama - 1)/gama))## [K]
COP = T1/(T2 - T1)#
print "COP of Air Refrigeration System is %.2f\n"%(COP)
# Solution (b)
mdot = Q*12660/(C*(T1 - T4))## [kg/h]
print "Mass flow rate of the refrigerant is %.2f kg/h\n"%(mdot)
# Solution (c)
Wcompression = mdot*C*(T2 - T3)## [kJ/h]
print "The work of Compression is %.2f kW\n"%(Wcompression/3600)
# Solution (d)
Wexpansion = mdot*C*(T1 - T4)## [kJ/h]
print "The work of expansion is %.2f kW\n"%(Wexpansion/3600)
# Solution (e)
Wnet = Wcompression - Wexpansion## [kJ/h]
print "Net work of the system is %.2f kW\n"%(Wnet/3600)#