In [10]:

```
from math import pi,log
#Input data
ws=250##The amount of steam received by the surface condenser in t/h
tsat=40##The saturated temperature in degree centigrade
m=12##The amount of moisture present in the steam in percentage
tc1=32##The inlet temperature of cooling water in degree centigrade
tc2=38##The outlet temperature of cooling water in degree centigrade
p=0.078##The pressure inside the condenser in bar
V=1.8##velocity of circulating water in m/s
do=0.0254##The outer diameter of the condenser tubes in m
T=0.00125##The thickness of the condenser tubes in m
pi=3.141##Mathematical constant of pi
U=2.6##The overall heat transfer coefficient in kW/m**2K
Cpc=4.187##The specific heat of water in kJ/kgK
R=0.287##Real gas constant in kJ/kgK
P=1000##The density of water in kg/m**3
#Calculations
x2=0.88##The quality of the steam
hfg=2407##The enthalpy of evaporation at 40 degreeC in kJ/kg
h=x2*hfg##The change in enthalpy in kJ/kg
di=do-(2*T)##The inner diameter of the condenser tubes in m
wc=(((ws*1000)/3600)*h)/(Cpc*(tc2-tc1))##Mass flow rate of water in kg/s
psat=0.07375##The saturated pressure at 40 degree centigrade in bar
pair=(p-psat)*100##The pressure of air in kPa
vf=0.001008##Specific volume of saturated liquid in m**3/kg
vfg=19.544##Specific volume of vapour in m**3/kg
v2=vf+(x2*vfg)##Specific volume at 40 degree centigrade in m**3/kg
wair=(pair*((ws*1000)/3600)*v2)/(R*(tsat+273))##Mass flow rate of air in kg/s
t1m=(8-2)/log(8/2)##The mean temperature in degree centigrade
Ao=(((ws*1000)/3600)*h)/(U*t1m)##The area of the tubes in m**2
n=(wc*(4/pi)*(1/di**2)*(1/(P*V)))##The number of tubes
l=Ao/(pi*do*n)##Yhe length of tubes in m
#Output
print " (a) The rate of flow of cooling water = %3.1f kg/s \n (b) The rate of air leakage into the condenser shell = %3.3f kg/s \n (c) The length of tubes = %3.2f m \n (d) The number of tubes = %3.0f "%(wc,wair,l,n)
```

In [6]:

```
#Input data
ws=20##The amount of dry saturated steam received by a surface condencer in t/h
tsh=40##The temperature of dry saturated steam in degree centigrade
wa=(0.35/1000)##The mass flow rate of air per 1000 kg of steam in kg
tc=38##The temperature at which condensate leaves the temperature in degree centigrade
tm=10##The temperature at which makeup water is supplied in degree centigrade
tc1=32##The inlet temperature of cooling water in degree centigrade
tc2=38##The outlet temperature of cooling water in degree centigrade
tas=27##The temperature of air along with steam in degree centigrade
psat=0.07384##The saturated pressure at 40 degree C in bar
vg=19.52##The specific volume at 40 degree C in m**3/kg
R=0.287##Real gas constant in kJ/kgK
Cpc=4.187##The specific heat of water in kJ/kgK
Cp=1.005##The specific heat of air in kJ/kgK
#Calculations
pair=((wa*R*(tsh+273)*1000)/vg)*10**-5##The pressure of air in bar
psat1=0.06624##The saturated pressure at 38 degree C in bar
vg1=21.63##The specific volume at 38 degree C in m**3/kg
pair1=psat-psat1##The pressure of air in bar
wa1=(ws*1000)*wa##Mass of air removed per hour in kg/h
V1=((wa1*R*(273+tc2)*1000))/(pair1*10**5)##Volume of air remove per hour
ws1=V1/vg1##The mass of steam accompanying air in kg/h
psat2=0.03564##The saturated pressure at 27 degree C in bar
vg2=38.81##The specific volume at 27 degree C in m**3/kg
pair2=psat-psat2##The pressure of air in bar
V2=(wa1*R*1000*(tas+273))/(pair2*10**5)##Volume of air removed per hr in m**3/hr
ws2=V2/vg2##The mass of steam accompanying air in kg/h
ws3=ws1-ws2##Saving mass of steam by using seperate extraction in kg/hr
Q3=(ws3*Cpc*(tc-tm))/3600##Saving in heat supply in the boiler in kW
V=((V1-V2)/V1)*100##Percentage reduction in air ejector load in %
hc=159.3##Enthalpy at 38 degree C in kJ/kg
hs1=2574.3##Enthalpy at 40 degree C in kJ/kg
hs2=2550.3##Enthalpy at 27 degree C in kJ/kg
Q2=(((ws*1000)*(hs1-hc))-((wa1*(Cp*(tsh-tas))))-(ws3*hs2))/3600##The amount of heat in kW
wc=Q2/(Cpc*(tc2-tc1))##The mass flow rate of water in kg/s
#Output
print " (a) The rate of saving of condensate and the rate of saving in the heat supply in the boiler due to seperate air extraction pump = %3.3f kW \n (b) The percentage reduction in air ejector load due to this seperate air extraction method = %3.1f percent \n (c) The rate of cooling water flow = %3.0f kg/s "%(Q3,V,wc)
```

In [7]:

```
#Input data
tw3=30##The inlet temperature of water in degree centigrade
wc=1.15##Mass flow rate of cooling water in kg per kg air
tdb1=20##The dry bulb temperature of air in degree centigrade
R1=60##Relative humidity of air while entering in percentage
tdb2=28##The dry bulb temperature while leaving in degree centigrade
R2=90##Relative humidity of air while leaving in percentage
tm=20##The temperature of makeup water in degree centigrade
Cpc=4.187##The specific heat of water in kJ/kgK
G=1##Mass flow rate of dry air in kg/s
#Calculations
twb1=15.2## from psychrometric chart The wet bulb temperature while entering in degree centigrade
twb2=26.7## from psychrometric chart The wet bulb temperature while leaving in degree centigrade
h1=43##The enthalpy from chart for dry air in kJ/kg dry air
h2=83.5##The enthalpy from chart in kJ/kg dry air
W1=0.0088##Humidity in kg water vapour/kg dry air
W2=0.0213##Humidity in kg water vapour/kg dry air
hw3=125.8##Enthalpy of water entering the tower in kJ/kg
hw=84##Enthalpy of makeup water in kJ/kg
hwc=((G/wc)*((h2-h1)-(W2-W1)*hw))##The change in enthalpy of water in kJ/kg
tw4=tw3-(hwc/Cpc)##The exit temperature of water in degree centigrade
ta=tw4-twb1##The approach temperature in degree centigrade
tr=tw3-tw4##The range temperature in degree centigrade
x=G*(W2-W1)##Fraction of water evaporated in kg/kg dry air
#Output
print " (a) The temperature of water leaving the tower = %3.1f degree centigrade \n (b) The fraction of water evaporated = %3.4f kg/kg dry air \n (c) The approach of the cooling tower = %3.1f degree centigrade \n The Range of the cooling tower = %3.1f degree centigrade "%(tw4,x,ta,tr)
```

In [9]:

```
#Input data
tw3=45##The temperature of warm water in degree centigrade
wc1=6##The cooling water inflow in kg/s
V=10##volume flow of ID fan in m**3/s
Ws=4.90##Heat absorbed by air in kW
ti=20##The temperature of air entering the tower in degree centigrade
R=60##The relative humidity in percentage
to=26##The temperature of air leaving the tower in degree centigrade
p=1.013##The constant pressure throughout the tower in bar
r=0.287##Real gas constant in kJ/kgK
Cpc=4.187##The specific heat of water in kJ/kgK
Cp=1.005##The specific heat of air in kJ/kgK
#Calculations
ps=0.0234##The pressure at 20 degreec in bar
ps1=(R/100)*ps##The pressure of water vapour in bar
pa1=p-ps1##The pressure of air in bar
G1=(pa1)/(r*10**-3*(ti+273))##The mass flow rate of dry air in kg/s
w1=(ps1*10**5*V)/(0.4619*10**3*(ti+273))##Mass flow rate of vopour in kg/s
W1=w1/G1##Moisture flow in kg vap/kg dry air
ps2=0.0336##The pressure at 26 degree C at exit in bar
pw2=0.0336##The pressure of water vapour at 26 degree C at exit in bar
W2=(0.622)*(pw2/(1-pw2))##oisture flow in kg vap/kg dry air
G2=G1##The mass flow rate of dry air in kg/s
w2=W2*G2##Moisture flow at exit in kg/s
wm=w2-w1##Makeup water required in kg/s
wc2=wc1-wm##The cooling water outflow in kg/s
hw3=Cpc*tw3##The enthalpy of warm water in kJ/kg
hg=2538.1##The enthalpy of gas at 20 degree C in kJ/kg
tsat=12##The saturation temperature in degree centigrade
pw1=0.01404##The pressure at 12 degree C in bar
hw1=hg+(1.88*(ti-tsat))##The enthalpy of warm water in kJ/kg
hw2=2548.4##The enthalpy of evaporation at 26 degree C in kJ/kg
hw4=((G1*((Cp*(to-ti))+W2*hw2-W1*hw1)-Ws)-(wc1*hw3))/-wc2##The enthapy of warm water at point 4 in kJ/kg
E=hw4/Cpc##Exit water temperature in degree centigrade
#Output
print " (a) The final temperature of the water = %3.2f degree centigrade \n (b)The amount of makeup water required per second = %3.4f kg/s "%(E,wm)
```