from __future__ import division
import math
# Initialization of Variable
W = 410 #kJ
Qin = 1000 #kJ
Th = 500 #K
Tc = 300 #K
#calculations:
#cycle thermal efficiency
n = W/Qin
#maximum thermal efficiency
nmax = 1 - Tc/Th
#Results
print "cycle thermal efficiency is", n*100,"% and maximum thermal efficiency is",nmax*100,"%"
if (n >nmax):
print "Since the thermal efficiency of the actual cycle exceeds the maximum theoretical value, the claim cannot be valid"
else:
print "Since the thermal efficiency of the actual cycle is less than the maximum theoretical value, the claim is valid"
from __future__ import division
import math
# Initialization of Variable
Qcdot = 8000 #kJ/h
Tc = -5 #degC
Th = 22 #degC
Wdotcycle = 3200 #kJ/h
#calculations:
#coefficient of performance of the refrigerator
beta = Qcdot/Wdotcycle
#coefficient of performance of a reversible refrigeration cycle
betamax = (Tc+273)/(Th-Tc)
#Results
print "coefficient of performance of the refrigerator is", beta
print "coefficient of performance of a reversible refrigeration cycle", round(betamax,1)
from __future__ import division
import math
# Initialization of Variable
Qh = 6E5 #Btu/day
Th = 70 #degF
Tc = 32 #degF
cost = 8 #cents/kW
#calculations:
#temps in Rankine
Thr = ((Th - 32)*5/9 +273)*1.8
Tcr = ((Tc - 32)*5/9 +273)*1.8
#Work
Wcycle = (1 - Tcr/Thr)*Qh
#costperday
cpd = (Wcycle/3413)*cost/100 #$/day
#Results
print "minimum theoretical work input is", round(Wcycle,1),"Btu/day"
print "minimum theoretical cost per day is", round(cpd,2),"$/day"