In [1]:

```
import math
## Example 7.1
print('Example 7.1');
print('Page No. 201');
## given
C = 220.*10**3;##Original annual cost of fuel in Pound
O_E = 73.;## Original Efficiency
Fl_i = 20.;## Initial Flue loss
Fl_f = 18.7;## Final Flue loss
N_E = O_E + (Fl_i - Fl_f);## New Efficiency
F_save = C*((N_E-O_E)/N_E);
print'%s %.2f %s '%('Fuel saving is',F_save,' Pound')
##Deviation in answer is due to some wrong calculation the book, instead of new efficiency in the denominator in line 13, the book has taken original efficiency
```

In [14]:

```
import math
## Example 7.2
print('Example 7.2');
print('Page No. 201');
import numpy
##From Example 2.1
## given
C= 35000.;## cost of boiler in Pound
C_grant=.25;## Capital grant available from goverment
E= -(C-(C_grant*C));## Net expenditure
Fs= 15250.;## Fuel Saving
r_i = 0.15;## interest
r_t = 0.55;## tax
a = numpy.array([0, E, Fs, 0, E+Fs, r_i*(E+Fs), 0 ])
bal_1 = (E+Fs)+(r_i*(E+Fs))-0## Total Balance after 1st year
c_all = 0.55;## capital allowance in 2nd year
C_bal= (bal_1+0+Fs+(-(c_all*E)));## Cash Balance after 2nd year
b = ([[bal_1, 0, Fs ,-(c_all*E), C_bal, r_i*C_bal, r_t*(Fs+(r_i*C_bal))]]);
bal_2 = C_bal+ r_i*C_bal- r_t*(Fs+(r_i*C_bal)) ##Total Balance after 2nd year
c = ([[bal_2, 0, Fs, 0, bal_2+Fs, r_i*(bal_2+Fs), r_t*(Fs+(r_i*(bal_2+Fs)))]])
bal_3= (bal_2+Fs)+r_i*(bal_2+Fs)-r_t*(Fs+(r_i*(bal_2+Fs))) ## Total Balance after 3rd year
if(bal_2>0):
print('Pay back period is of two year');
else:
print('Pay back period is of three year');
print'%s %.2f %s '%('Total saving at the end of second year is ',bal_2,' Pound');
print'%s %.2f %s '%('Total saving at the end of third year is ',bal_3,' Pound');
## Deviation in answer due to direct substitution
print('The data in example 2.1 indicated that:- Saving could be made by replacing exising oil-fired burners by new burners requiring considerably less atomising steam. The financial saving are 15.25*10**3 Pound per year for an insulation and capital cost of 35*10**3 Pound.')
```

In [15]:

```
import math
## Example 7.3
print('Example 7.3');
print('Page No. 203');
## given
C = 250.*10**3;##Original annual cost of fuel in Pound
O_E = 71.5;## Original Efficiency
Fl_i = 20.;## Initial Flue loss
Fl_f = 17.5;## Final Flue loss
N_E = O_E + (Fl_i - Fl_f);## New Efficiency
F_save = C*((N_E-O_E)/N_E);## in Pound
print'%s %.2f %s '%('Fuel saving is ',F_save,' Pound per year')
##Deviation in answer is due to some calculation approximation the book
```

In [16]:

```
import math
## Example 7.4
print('Example 7.4\n\n');
print('Page No. 204\n\n');
## This question doesnot contain any calculation part.
##Refer figure 7.3, 7.4, 7.5
T_max = 200.;## Flue gas exit temperature in degree celcius
print(' The company investigate four alternative methods of heat abstraction using the flue gas.\n\n System-1 The efficiency of the furnace without any air preheater is 79.2 per cent.\n System-2 The efficiency of the furnace, with the air preheater only in the system operating as shown in figure 7.3, is increased to 86.6 per cent.\n System-3 By the incorporation of the heat exchanger,the furnace efficiency is increased to 93.3 per cent using the arrangement shown in figure 7.4.\n System-4 Using no preheating,finally achievied an overall thermal efficiency of 93.7 per cent.\n \t The new air preheater scheme is shown in figure 7.5.\n\n The pay-back period in all instances is less than 3.5 years.')
```

In [17]:

```
import math
# Example 7.5
print('Example 7.5\n\n');
print('Page No. 205\n\n');
##The temperature difference is not given the question.
##Refer Table 7.1
T1 = 1000.;## Furnace operating temperature in degree celcius
##T2 is back calculated by the first condition given in table 7.1 and applying Fourier,s law of condition
T2 = 997.9545;## in degree Celcius()
dT = T1 - T2;## in degree celcius
t = 120.;## Continuous cycle time in h
K1 = 44.;## Thermal conductivity (W/m-K)
K2 = 11.;## Thermal conductivity (W/m-K)
K3 = 4.;## Thermal conductivity (W/m-K)
x1 = 250.*10**-3;## mm converted into m
x2 = 50.*10**-3;## mm converted into m
dT = T1 - T2;## in K
##By Fourier,s law of heat conduction- Q = (dT *K)/x in W/sq.m
##For 250 mm firebrick
Q1 = (dT *K1)/x1;## im W/sq.m
print'%s %.2f %s'%('Energy losses by 250 mm firebrick is ',Q1,' W/sq.m \n')
##For 250 mm hot-face insulation
Q2 = (dT *K2)/x1;## im W/sq.m
print'%s %.2f %s'%('Energy losses by 250 mm hot-face insulation is ',Q2,' W/sq.m \n') ##Deviation in answer is due to assumption of T2 as its not mentioned in the question
##For 250 mm hot-face insulation backed by 50 mm insulation
##As the resistances are in series - R = (x1/K1)+ (x2/K2) and Q = dt/R in W/sq.m
R = (x1/K2)+ (x2/K3);## in ohm
Q3 = dT/R;## in W/sq.m
print'%s %.2f %s'%('Energy losses by 250 mm hot-face insulation backed by 50 mm insulation is ',Q3,' W/sq.m \n\n') ##Deviation in answer is due to assumption of T2 as its not mentioned in the question
```

In [18]:

```
import math
## Example 7.6
print('Example 7.6\n\n');
print('Page No. 209\n\n');
## given
P = 150*10*83;## Power of compressor in W
F_load = .78;## full load percentage of the time
Re = .7;## Heat Recovery
T = 2200.;##Compressor operating time in h/year
C = 20.*10**-6;## Energy cost in Pound/Wh
H_Re = P*F_load*Re;## in W
print'%s %.2f %s'%('Heat recovered is ',H_Re,' W \n')
E_save = H_Re*T*C;## in Pound/year
print'%s %.2f %s'%('Economic Saving is ',E_save,' Pound per year')
##Deviation in answer is due to some calculation approximation the book
```

In [19]:

```
import math
## Example 7.7
print('Example 7.7\n\n');
print('Page No. 212\n\n');
## given
C_S = 1./10**3;## Cost of steam production in p/Wh
P = 75.*10**3;## Power required in W
T = 4.*10**3;## Production time in h/year
C_T = 7.*10**3;## Cost of turbine in Pound
R_T = 4.*10**3;## Annual running cost of turbine in W
C_M = 1.5*10**3;## Cost of electric motor in Pound
R_M = 14.*10**3;## Running cost of electric motor in Pound
C_M_A = 3.5/10**3;## Auunal running cost of electic motor in p/Wh
Save_R = R_M - R_T;## in Pound per year
print'%s %.e %s'%('The saving in running costs would be ',Save_R,' Pound per year')
```

In [20]:

```
import math
## Example 7.8
print('Example 7.8\n\n');
print('Page No. 214\n\n');
## given
m_s = 5.3;## Factory requirement of process steam in kg/s
Pr_s_1 = 2.5;## Pressure of process steam at bar absolute
E_load_1 = 1.10*10**3;## Electrical load requirement in W
E_load_2 = 1.5*10**3;## Electrical load requirement in W
m_e = 6.0;## Mass flow rate of generated electricity in kg/s
Pr_e = 14.;## Pressure of generated electricity at bar absolute
T_heat = 2.790*10**6;## Total heat content in J/kg
##The 14 bar absolute steam would undergo an adiabatic heat drop and the steam will be expanded
h_drop = 306*10**3;## Adiabatic heat drop in J/kg
Pr_2 = 2.5;## Expanded pressure at bar absolute
Ex_stm = 0.11;## Exhaust steam percent
Ef_T = 0.65;## Tubine efficiency
R_h_drop = h_drop * Ef_T;## Real heat drop in J/kg
P_T = m_e * R_h_drop;## Power generated by turbine in W
Ef_G = 0.94;## Generator efficiency
P_G = 1.13*10**6;## Output of generator in W
##(a) Combined heat and power system
Eq_Eva = 8;## Equivalent evaporation of steam per kg coal in kg
C_req = m_e/Eq_Eva;## in kg/s
print'%s %.2f %s'%('Coal Required is ',C_req,' kg/s\n')
print('If the plant operates on a 140-h week for 50 weeks per annum the coal consumption is 18.9*0^6 kg per year.\nAt an average price of, for example, 35 Pound per tonne, the aanual cost is 660*10^3 Pound.\n\n')
##(b) Coal required for process steam
## for low pressure steam
Eq_Eva_2 = 8.25;## Equivalent evaporation of steam per kg coal in kg
Coal_req = m_s/Eq_Eva_2;## in kg/s
print'%s %.2f %s'%('Coal Required is ',Coal_req,' kg/s\n\n')
print('Assuming similar operating conditions for the plant the total coal consumption is 16.2*10^6 kg per year,\nand the annual cost is 556*10^6 Pound.\n')
##(c)Electrical Power
print('The cost of 1.15*10^6 W of electricity for the same period of time is,assuming a cost of 23 Pound per 10^6 Wh,177*10^3Pound.\nThe coal equivalent to generate 1.15*10^6 W of power for the grid would be about 5.0*10^6 kg per year.\n\nThe C.H.P. unit saves a coal equivalent of 2.3*10^6kg per year,\nover the system generating process steam and utilizing grid electricty.\nThe economic savings are 83*1063 Pound per year illustrating the benefits of a C.H.P. syatem in this case.')
```