print "Part a";
# Variables
Q1 = 500. #kJ #Heat transfer from reservoir at t1
Q2 = 187.5 #kJ #Heat transfer from reservoir at t2
# Calculations and Results
nr = 1-(Q2/Q1) #Efficiency
W = nr*Q1 #kJ #Work output of the engine
print "Work output of the engine = %.1f kJ"%(W);
#Part(b)
print "Part b";
# Variables
Q1 = 500. #kJ #Heat transfer from reservoir at t1
# Calculations and Results
COP_hp = 1/nr
W = Q1/COP_hp #kJ #Work input to heat pump
Q2 = Q1-W #kJ #heat ineraction with reservoir at t2
print "Heat ineraction with reservoir at t2 = %.1f kJ"%(Q2);
print "Work input to the heat pump = %.1f kJ"%(W);
# Variables
nr = 0.7 #maximum efficiency
W = 80. #kJ #Work
Q1 = 100. #kJ #heat transfered
# Calculations and Results
nx = W/Q1 #claimed efficiency
if nx>nr :
print "Engine X is not a viable proposition because the claimed efficiency %.2f is greater than maximum efficiency %.2f"%(nx,nr)
else:
print "Engine X is a viable proposition because the claimed efficiency %.2f is less than maximum efficiency %.2f"%(nx,nr)
# Variables
T1 = (527.+273) #K
T2 = (27.+273) #K
# calculations and results
#Part (a)
print "Part a";
nr = 1 - (T2/T1) #reversible efficiency
print "Reversible efficiency = %.3f "%(nr);
#Part(b)
print "Part b";
print "As the values of at least any two from among Q1,Q2 and W \
are not given the efficiency of the engine cannot be evaluated.However\
according to Carnots statement, the efficiency will be less than %.3f"%(nr)
# Variables
T1 = 273. + 37 #K
T2 = 273. - 13 #K
#Part(a)
print "Part a";
COP_ref = T2/(T1-T2) #COP of reversible heat engine as refrigerator.
print "COP of reversible heat engine as refrigerator = %.1f"%(COP_ref)
#Part(b)
print "Part b";
COP_hp = T1/(T1-T2) #COP of reversible heat engine as heat pump.
print "COP of reversible heat engine as heat pump = %.1f"%(COP_hp)