#A refrigiration plant is to operate with an evaporator saturation temp. is 0 F
#while rempvin 10000 From a cold room. The condenser is to be cooled by water so
#that the saturation temp. can be kept at 76 F. the refrigirant is ammonia
#(a) Assuming the plant works on a cycle like that, find its coefficient of
#performance and ompare this with the one of a carnot engine
#(b) If the volumetric efficiency if the compressor is 70% how much piston
#displacement per min will be needed?
import math
#initialisation of variables
T2 = 0 #F
T1= 76. #F
h1= 611.8 #Btu/lb
h4= 127.4 #Btu/lb
h2= 704.4 #Btu/lb
x= 10000 #Btu/hr
v1= 9.116 #cu ft/lb
n=70.
#CALCULATIONS
CP= (T2+460)/(T1-T2) #Carnot efficiency
CP1= (h1-h4)/(h2-h1) #coefficient of performance
w= (x/60.)/(h1-h4) #Work done
PD=(w*v1)/(n/100.) #Piston displacement
#RESULTS
print '%s %.2f' %('coefficient of performance of carnot = ',CP)
print '%s %.2f' %(' \n coefficient of performance = ',CP1)
print '%s %.2f' %(' \n Piston displacement (cu ft/min) = ',PD)
raw_input('press enter key to exit')