In [2]:

```
#Variable declaration:
LR = 7.5/12.0 #Thickness of refractory (ft)
LI = 3.0/12.0 #Thickness of insulation (ft)
LS = 0.25/12.0 #Thickness of steel (ft)
kR = 0.75 #Thermal conductivity of refractory
kI = 0.08 #Thermal conductivity of insulation
kS = 26.0 #Thermal conductivity of steel
TR = 2000.0 #Average surface temperature of the inner face of the refractory (°F)
TS = 220.0 #Average surface temperature of the outer face of the steel (°F)
#Calculation:
DT = TR-TS #Temperature difference (°F)
Q = DT/(LR/kR+LI/kI+LS/kS) #Heat loss (Btu/h.ft^2)(here representing Qdot/A)
#Result:
print "The heat loss is :",round(Q)," Btu/h.ft^2 ."
```

In [3]:

```
#Variable declaration:
LR = 7.5/12.0 #Thickness of refractory (ft)
kR = 0.75 #Thermal conductivity of refractory
TR = 2000.0 #Average surface temperature of the inner face of the refractory (°F)
Q = 450.0 #Heat loss (Btu/h.ft^2)
#Calculation:
TI = TR - Q*(LR/kR) #Temperature of the boundary where the refractory meets the insulation (°F)
#Result:
print "The temperature of the boundary where the refractory meets the insulation is :",round(TI)," °F ."
```

In [4]:

```
#Variable declaration:
QbyA = 70000.0 #Total heat loss (Btu/h)
Q = 450.0 #Heat loss (Btu/h.ft^2)
#Calculation:
A = QbyA/Q #Area available for heat transfer (ft^2)
#Result:
print "The area available for heat transfer is :",round(A,1)," ft^2 ."
```

In [10]:

```
#Variable declaration:
h_out = 390.0 #Enthalpy of the fluid that exits from the evaporator (kJ/kg)
h_in = 230.0 #Enthalpy of the fluid that enters the unit (kJ/kg)
#Calculation:
QC = h_out - h_in #Heat absorbed by the evaporator (kJ/kg)
#Result:
print "The heat absorbed by the evaporator is :",round(QC)," kJ/kg ."
```

In [11]:

```
#Variable declaration:
#From example 13.9:
TS = -10.0+273.0 #Fluid’s saturation temperature expressed in Kelvin (K)
QC = 160.0 #Heat absorbed by the evaporator (kJ/kg)
#Calcuation:
DS = QC/TS #Fluid’s change in entropy(kJ/kg.K)
#Result:
print "The fluid's change in entropy across the evaporator is :",round(DS,2)," kJ/kg.K ."
```

In [12]:

```
#Variable declaration:
#From figure 13.2:
h1 = 390.0 #Fluid enthalpy on entering the compressor (kJ/kg)
h2 = 430.0 #Fluid enthalpy on leaving the compressor (kJ/kg)
h3 = 230.0 #Fluid enthalpy on leaving the condenser (kJ/kg)
#Calculation:
QH = h2 - h3 #Heat rejected from the condenser (kJ/kg)
W_in = h2 - h1 #Change in enthalpy across the compressor (kJ/kg)
QC = QH - W_in #Heat absorbed by the evaporator (kJ/kg)
#Result:
print "The heat absorbed by the evaporator of the refrigerator is :",round(QC)," kJ/kg ."
```

In [13]:

```
#Variable declaration:
#From example 13.11:
W_in = 40.0 #Change in enthalpy across the compressor (kJ/kg)
QC = 160.0 #Heat absorbed by the evaporator (kJ/kg)
#Calculation:
COP = QC/W_in #Refrigerator’s C.O.P.
#Result:
print "the refrigerator's C.O.P. is :",round(COP)," ."
```

In [14]:

```
#Variable declaration:
h1 = 548.0 #Steam enthalpy at the entry and exit to the boiler (kJ/kg)
h2 = 3989.0 #Steam enthalpy at the entry and exit to the turbine (kJ/kg)
h3 = 2491.0 #Steam enthalpy at the entry and exit to the pump (kJ/kg)
QH = 2043.0 #Heat rejected by the condenser (kJ/kg)
#Calculation:
h4 = h3 - QH #Steam enthalpy at the entry and exit to the condenser (kJ/kg)
Qb = h2 - h1 #Enthalpy change across the boiler (kJ/kg)
#Result:
print "The enthalpy change across the boiler is :",round(Qb)," kJ/kg ."
```

In [15]:

```
#Variable declaration:
#From example 13.4:
h1 = 548.0 #Steam enthalpy at the entry and exit to the boiler (kJ/kg)
h2 = 3989.0 #Steam enthalpy at the entry and exit to the turbine (kJ/kg)
h3 = 2491.0 #Steam enthalpy at the entry and exit to the pump (kJ/kg)
h4 = 448.0 #Steam enthalpy at the entry and exit to the condenser (kJ/kg)
Qb = 3441.0 #Enthalpy change across the boiler (kJ/kg)
#Calculation:
Wt = h2 - h3 #Work produced by the turbine (kJ/kg)
Wp = h1 - h4 #Work used by the pump (kJ/kg)
W_net = Wt - Wp #Net work by subtracting the pump work from the turbine work (kJ/kg)
n_th = W_net/Qb #Thermal efficiency
#Result:
print "The thermal efficiency is :",round(n_th*100,1)," % ."
```

In [16]:

```
#Variable declaration:
#From table 13.4:
x3 = 0.9575 #Mass fraction vapour at point 3
h3 = 2491.0 #Steam enthalpy at the entry and exit to the pump (kJ/kg)
s3 = 7.7630 #Entropy at the entry and exit to the pump (kJ/kg.K)
s4 = 1.4410 #Entropy at the entry and exit to the condenser (kJ/kg.K)
#From example13.14:
h4 = 448.0 #Steam enthalpy at the entry and exit to the condenser (kJ/kg)
#Calculation:
Q_out = h3 - h4 #Heat rejected (kJ/kg)
DS = s3 - s4 #Process change in entropy (kJ/kg)
T3 = Q_out/DS #Temperature at point 3 (K)
#Result:
print "The temperature at point 3 is :",round(T3)," K ."
print "Or, the temperature at point 3 is :",round(T3-273)," °C ."
```