In [6]:

```
#initialization
capacity = 5.0 #tons
hp = 10.0 #hp
#calculation
beta = (778*3.33*capacity)/(hp*550)
#result
print "Coefficient of performance = ", round(beta, 2)
```

In [13]:

```
#initialization
P1 = 30.0 #lb/in^2
P2 = 200.0 #lb/in^2
capacity = 3.0 #tons
#calculation
#From the pressure enthalpy chart
Tt1 = -1 #F
st1 = 1.34
ht1 = 612.0
ht2 = 733.0
ht3 = 141.0
ht4 = 141.0
WbyJ = ht2-ht1
Q = ht1-ht3
beta = Q/WbyJ
Qdot = capacity*3.33
wdot = Qdot/Q
Power = wdot*778*WbyJ
Power = Power/550.0
#result
print "Coefficient of performance = ", round(beta, 2)
print "Evarator temperature = %d F" %Tt1
print "Power required = %.2f hp" %Power
```

In [24]:

```
#initialization
P1 = 14.0 #lb/in^2
P2 = 60.0 #lb/in^2
Tt1 = 80+460.0 #R
Tt4 = -20+460.0 #R
m = 30.0 #lbm/sec
cp = 0.24
#calculation
Tt2 = round(Tt1*(P2/P1)**(0.286))
Tt3 = round(Tt4*(P2/P1)**(0.286))
WbyJ1 = cp*(Tt2-Tt1)
WbyJ2 = cp*(Tt3-Tt4)
Q = cp*(Tt1-Tt4)
beta = Q/(WbyJ1-WbyJ2)
Power = (m*778)*(WbyJ1-WbyJ2)
Wdot = Power/550.0
#result
print "Coefficient of performance = %.3f" %beta
print "Net power = %d hp" %Wdot
#difference in answer due to rounding of in Python
```