Chapter 5 : Energy Balances

Example 5.1 Page 186

In [1]:
# solution 

# Variables 
# basis pumping of 1 l/s of water
Hadd = 52.                      # kW
Hlost = 21.                     # kW

# Calculation 
fi = Hadd - Hlost               # kW
p1 = 101325.                    # Pa
p2 = p1
Z1 = -50                        # m
Z2 = 10                         # m
g = 9.80665                     # m/s sq
gc = 1                          # kg.m/(N.s sq)
row = 1                         #   kg/l
W = 1.5*.55                     # kW
# energy balance b/w A and B
# dE = E2-E1 = W + Q + (Z1-Z2)*(g/gc)*qm
dE = 31.237                     # kW

# Result
print "Increase in internal energy between the storage tank and the bottom of the well = ",dE," kW."
Increase in internal energy between the storage tank and the bottom of the well =  31.237  kW.

Example 5.2 Page 197

In [2]:
# solution 

# Variables 
# using table 5.1
# basis 1 kmol of methane
T1 = 303.15             # K
T2 = 523.15             # K

# Calculation 
# using eq 5.17
H = 19.2494*(T2-T1) + 52.1135*10**-3*(T2**2-T1**2)/2 + \
11.973*10**-6*(T2**3-T1**3)/3 - 11.3173*(T2**4-T1**4)*10**-9/4      # kJ

# Result
print " Heat added = ",H," kJ/kmol methane."
 Heat added =  9243.82741713  kJ/kmol methane.

Example 5.3 Page 198

In [2]:
# solution 

# Variables 
# basis 1 kmol methane at 25 bar
Pc = 46.04              # bar
Tc = 190.5              # K
Pr = 25/Pc

# Calculation 
# H-Ho = intgr(from303.15 to 523.15){CmpR dT}
# solving it by simpson's rule
HE = 255.2              # kJ/kmol
H = 9175.1 + HE

# Result
print " Heat added = ",H," kJ/kmol of methane."
 Heat added =  9430.3  kJ/kmol of methane.

Example 5.4 Page 206

In [4]:
# solution 

# Variables 
# using table 5.3
# .25 kg/s toulene heated from 290.15K to 350.15K
qm = .25/92             # kmol/s

# Calculation 
# reference 7
fi = 2.717*10**-3*(1.8083*(350.15-290.15) + 812.223*10**-3*(350.15**2-290.15**2)/2 \
 - 1512.67*10**-6*(350.15**3-290.15**3)/3 + 1630.01*10**-9*(350.15**4-290.15**4)/4)
 
# Result
print " Heat required to be added to toulene = ",fi," kW."
 Heat required to be added to toulene =  26.1324337975  kW.

Example 5.5 Page 206

In [5]:
# solution 

# Variables 
# basis 1kg of 20% NaOH sol
# referring to fig 5.4
C11 = 3.56                      # kJ/kg.K   at 280.15K
C12 = 3.71                      # kJ/kg.K   at 360.15K

# Calculation 
C1m = (C11+C12)/2
H = 1*C1m*(360.15-280.15)       # kJ

# Result
print " Heat required to be added = ",H,"kJ."
 Heat required to be added =  290.8 kJ.

Example 5.6 Page 207

In [6]:
# solution 

# Variables 
# basis 1kg Diphyl A-30
Q = .7511*(553.15-313.15) + 1.465*10**-3*(553.15**2-313.15**2)/2    # kJ/kg
fi = Q*4000                                 # kJ/h    for mass flowrate 4000 kg/h

# Calculation 
Clm = (1.1807+1.5198)/2
fi1 = Clm*(553.15-313.15)*4000/3600.        # kJ/h
err = (fi1-Q)*100/Q

# Result
print " Heat to be supplied = ",fi1," kW  Percent error = ",err,"."
 Heat to be supplied =  360.066666667  kW  Percent error =  8.27133892074 .

Example 5.7 Page 208

In [7]:
# solution 

# Variables 
T1 = 298.15                 # K
T2 = 775.15                 #K

# Calculation 
# using eq 5.17
Q = 28.839*(T2-T1)+2.0395*10**-3*(T2**2-T1**2)/2 + \
6.9907*10**-6*(T2**3-T1**3)/3 - 3.2304*10**-9*(T2**4-T1**4)/4       # kJ/kmol

# Result
print " Heat content of 1 kmol of gas mixture at 298K = ",Q," kJ/kmol."
 Heat content of 1 kmol of gas mixture at 298K =  15016.6500785  kJ/kmol.

Example 5.8 Page 210

In [8]:
# solution 

# Variables 
# basis 8000 kg/h mixture is to be cooled
qn1m = .118*8000                    # kg/h
qn1 = qn1m/93.1242                  # kmol/h
qn2m = 8000-qn1m                    # kg/h
qn2 = qn2m/18                       # kmol/h
T1 = 373.15                         #K
T2 = 313.15                         #K

# Calculation 
fi = qn1*(206.27*(T1-T2)-211.5065*10**-3*(T1**2-T2**2)/2+564.2902*10**-6*(T1**3-T2**3)/3) \
 + qn2*(50.845*(T1-T2)+213.08*10**-3*(T1**2-T2**2)/2-631.398*10**-6*(T1**3-T2**3)/3 \
 +648.746*10**-9*(T1**4-T2**4)/4)   # kJ/h
 
# Result 
print " Heat removal rate of subcooling zone of the condenser = ",fi," kJ/h."
 Heat removal rate of subcooling zone of the condenser =  1905578.44431  kJ/h.

Example 5.9 Page 220

In [9]:
# solution 

# Variables 
# (a)
T = 305.15                                      #K

# Calculation 
Pv1 = 10**(4.0026-(1171.530/(305.15-48.784)))   # bar
# (b)
T = 395.15 
Pv2 = 10**(3.559-(643.748/(395.15-198.043)))     # bar

# Result
print " a   V.P. of n-hexane at 305.15K = ",Pv1,\
" bar.    \nb   V.P. of water at 395.15K = ",Pv2," bar."
 a   V.P. of n-hexane at 305.15K =  0.270921991993  bar.    
b   V.P. of water at 395.15K =  1.96343968214  bar.

Example 5.10 Page 225

In [10]:
import math
# solution 

# Variables 
# (a)
Pc = 3732.              # kPa
Tc = 630.3              # K
Tb = 417.6              # K
TBr = Tb/Tc

# Calculation 
lambdav = 8.314472*417.6*(1.092*(math.log(3732)-5.6182)/(.930-.6625))
# (b)
T1 = 298.15  #K
lambdav1 = 36240*((630.3-298.15)/(630.3-417.6))**.38

# Result
print " a   Latent heat of vaporization at Tb using Riedel eq is ",lambdav,\
" kJ/kmol.    \nb   Latent heat of vaporizaation at 298.15 K using Watson eq is ",\
lambdav1," kJ/kmol."
 a   Latent heat of vaporization at Tb using Riedel eq is  36944.6599382  kJ/kmol.    
b   Latent heat of vaporizaation at 298.15 K using Watson eq is  42928.2871556  kJ/kmol.

Example 5.11 Page 225

In [11]:
import math
# solution 

# Variables 
# (a)
Pc = 61.37                  # bar
Tc = 514.                   #K
Tb = 351.4
P = 1                       # atm
TBr = Tb/Tc

# Calculation 
# Riedel eq
lambdav1 = 8.314472*Tb*1.092*(math.log(6137)-5.6182)/(.930-TBr)

# NIST eq
lambdav2 = 50430*math.exp(-(-.4475*TBr))*(1-TBr)**.4989

# (b)
T1 = 298.15
TBr1 = T1/Tc

# Watson eq
lambdav21 = 38563*((514-298.15)/(514-351.4))**.38

# NIST eq
lambdav22 = 50430*math.exp(-(-.4475*TBr1))*(1-TBr1)**.4969

# Result
print " a   \nLatent heat of vaporization at Tb using  Riedel eq is ",lambdav1,\
" kJ/kmol  \nNIST eq is ",lambdav2,\
" kJ/kmol    \nb   Latent heat of vaporization at 298.15 K using  Watson eq is ",lambdav21,\
" kJ/kmol  \nNIST eq is ",lambdav22," kJ/kmol"
 a   
Latent heat of vaporization at Tb using  Riedel eq is  40200.030668  kJ/kmol  
NIST eq is  38564.1849773  kJ/kmol    
b   Latent heat of vaporization at 298.15 K using  Watson eq is  42946.0066334  kJ/kmol  
NIST eq is  42479.9527916  kJ/kmol

Example 5.12 Page 227

In [12]:
import math

# solution 
# Variables 
# using Appendix IV.2
Ps1 = 75.
Ps2 = 80.
T1 = 563.65
T2 = 568.12
T = 565.15 

# Calculation 
Ps = 75*math.exp((T2*(T-T1)*math.log(80./75)/(T*(T2-T1))))

# Result
print " Saturation Pressure of steam at 565.15K is ",Ps," bar."
 Saturation Pressure of steam at 565.15K is  76.6507315525  bar.

Example 5.13 Page 236

In [13]:
# solution 

# Variables 
# basis  1 kmol equimolar mix
npent = .5                  # kmol
nhex = .5                   # kmol
P = 101.325                 # kPa
x1 = .5
x2 = x1
Ts1 = 309.2                 # K
Ts2 = 341.9                 # K

# Calculation 
T1 = (Ts1+Ts2)/2.

# using these data, we get table 5.10 and 5.11
Tbb = 321.6                 # K
Tdp = 329.9                 # K

# Result
print " Bubble point = ",Tbb,\
" K and  Dew point = ",Tdp," K."
 Bubble point =  321.6  K and  Dew point =  329.9  K.

Example 5.14 Page 237

In [14]:
from numpy import poly1d,roots
# solution 

# Variables 
# basis 1000 kg/h of condensate at the saturation temperature corresponding to 8 bar a
# using Appendix IV.2
H = 720.94                  # kJ/kg
Hm = 419.06                 # kJ/kg

# Calculation 
x = poly1d(0,'x')
condensate = 1000-x
Hcondensate1 = 1000*H
Hcondensate2 = condensate*419.06
Ht = x*2676.
p = Hcondensate2+Ht-Hcondensate1

# Result
print " The quantity of flash steam produced = ",roots(p)[0]," kg/h."
 The quantity of flash steam produced =  133.756324936  kg/h.

Example 5.15 Page 238

In [15]:
# solution 
from numpy import poly1d, roots

# Variables 
qv1 = 50.                           # l/s
qm = qv1*1.08                       # kg/s
fi = qm*3.08*(263.15-258.15)        # kW
lv = 384.19-168.7                   # kJ/kg

# Calculation 
qm2 = fi/lv
H = 256.35                          # kJ/kg
x = poly1d(0,'x')
p = H*(qm2+x) - 168.7*qm2-x*384.19
a = qm2+roots(p)[0]

# Result
print " Flow of vapor from he chiller = ",a," kg/s."
 Flow of vapor from he chiller =  6.50500625782  kg/s.

Example 5.16 Page 238

In [16]:
# solution 

# Variables 
# basis liquifaction capacity = 0.116 kg/s
p1 = 101.                   # kPa
Ts1 = 239.15
lv1 = 288.13                # kJ/kg
p2 = 530.                   # kPa
Ts2 = 290.75                # K
lv2 = 252.93                # kJ/kg

# Calculation 
# referring to table 5.3 and using eq 5.21
H1 = -39.246*(Ts2-Ts1)+1401.223*10**-3*(Ts2**2-Ts1**2)/2-6047.226* \
10**-6*(Ts2**3-Ts1**3)/3+8591.4*10**-9*(Ts2**4-Ts1**4)/4        # kJ/kmol
T3 = 313.15
H2 = (28.5463*(T3-Ts1)+23.8795*10**-3*(T3**2-Ts1**2)/2-21.3631* \
10**-6*(T3**3-Ts1**3)/3+6.4726*10**-9*(T3**4-Ts1**4)/4)/70.903  # kJ/kg
fi2 = .116*H2
Cl2evp = fi2/lv1            # kg/s
Cl2recy = Cl2evp/(1-.185)
R = Cl2recy/.116            # kg/kg fresh feed

# T4/T1 = (p2/p1)**[(gamma-1)/gamma]
gm = 1.355
p22 = 326.3
p21 = 101.
T4 = Ts1*(p2/p1)**((gm-1)/gm)
T5 = 313.15
fi3 = 1.88*10**-3*(343.1+91.6-26.2+2.5)         # kW
Fwater1 = fi3/(8*4.1868)                        # kg/s

# similarly
T6 = 379.9
fi4 = 1.88*10**-3*(28.5463*(T6-T5)+23.8795*10**-3*(T6**2-T5**2)/2-21.3631 \
*10**-6*(T6**3-T5**3)/3+6.4726*10**-9*(T6**4-T5**4)/4)  # kW
Fwater2 = fi4/(8*4.1868)                        # kg/s
Wreq = Fwater1+Fwater2
fi5 = 1.88*10**-3*(28.5463*(T5-Ts2)+23.8795*10**-3* \
(T5**2-Ts2**2)/2-21.3631*10**-6*(T5**3-Ts2**3)/3+6.4726 \
*10**-9*(T5**4-Ts2**4)/4) +.1333*252.93         # kW

# Result
print " a   Recycle ratio = ",R," kg Cl2/kg fresh feed    \nb   Cooling water required at  interface = "\
,Fwater1," kg/s  after cooler = ",Wreq," kg/s    \nc   Refrigiration load of chiller = ",fi5," kW."
 a   Recycle ratio =  0.149514564975  kg Cl2/kg fresh feed    
b   Cooling water required at  interface =  0.0230689309258  kg/s  after cooler =  0.152400566068  kg/s    
c   Refrigiration load of chiller =  35.1468085758  kW.

Example 5.17 Page 242

In [17]:
# solution 

# Variables 
# basis 100 kg of tin
T1 = 303.15
T2 = 505.15
n = 100/118.7                   # kmol

# Calculation 
# Q1 = n*[intgr from T1 to T2 (Cms dT)]
Q1 = 4973.3                     # kJ
lf = 7201.
Q2 = n*lf                       # kJ
Q = Q1+Q2
lv = 278.                       # kJ/kg
vp = Q/lv                       # kg

# Result
print " Quantity of eutectic mixture condensed = ",vp,\
" kg per 100 kg of tin melted at its melting point."
 Quantity of eutectic mixture condensed =  39.7117062542  kg per 100 kg of tin melted at its melting point.

Example 5.18 Page 243

In [18]:
# solution 

# Variables 
Ts1 = (438.2+436)/2.
Ta = 300.

# Calculation 
fi1 = .045*(Ts1-Ta)*3600.
theta1 = 307293/fi1                 #h
Ts2 = (436+434)/2.
fi2 = .045*(Ts2-Ta)*3600.
theta2 = 302415./fi2
Ts3 = (434+432.1)/2
fi3 = .045*(Ts3-Ta)*3600.
theta3 = 313859/fi3
theta = theta1+theta2+theta3

# Result
print " total time required = ",theta," hrs."
 total time required =  42.2249688079  hrs.

Example 5.19 Page 245

In [19]:
from numpy import poly1d, roots

# solution 

# Variables 
H1 = 482.9                      # kJ/kg
H2 = 273.4
fi1 = 100*(H1-H2)               # kJ/h
T1 = 313.15
T2 = 403.15

# Calculation 
fi11 = 21.3655*(T2-T1)+64.2841*10**-3*(T2**2-T1**2)/2-41.0506*10**-6 \
*(T2**3-T1**3)/3+9.7999*10**-9*(T2**4-T1**4)/4          # kJ/h

# at 20 MPa
h1 = 211.1
Ts = 277.6
H11 = 427.8
x = poly1d(0,'x')
p = x*h1+(100-x)*H11-100*H2
a = roots(p)[0]
fi2 = (100-a)*(H11-h1)          # kJ/h
h2 = -148.39
H3 = 422.61
y = poly1d(0,'y')
p1 = 100*176.18-(100-y)*H3+h2*y
b = roots(p1)[0]
fi3 = 100*(h1-176.8)
H = fi3+24021 
H4 = H/(100-43.16)
# from ref 23
T = 262.15

# Result
print "a   Yield of dry ice = ",b,\
" kg.    \nb   Percent liquifaction = ",a,\
".    \nc   Temp of vented gas = ",T," K."
a   Yield of dry ice =  89.8658011815  kg.    
b   Percent liquifaction =  71.2505768343 .    
c   Temp of vented gas =  262.15  K.

Example 5.20 Page 247

In [20]:
# solution 

# Variables 
# basis 200 kg/h of Sulphur firing
F = 200./32                     # kmol/h
O2req = 6.25*1.1
airin = O2req/.21

# Calculation 
N2in = airin-O2req
T1 = 1144.15
T2 = 463.15
fi = 788852.2                   # kJ/h
H = 15*4.1868+1945.2
qm = fi*.9/2008                 # kg/h

# Result
print " Amount of steam produced = ",qm," kg/h."
 Amount of steam produced =  353.569213147  kg/h.

Example 5.21 Page 248

In [21]:
# solution 

# Variables 
# enthalpy at Tbb
Tbb = 321.6
T1 = 298.15

# Calculation 
H1 = 65.4961*(Tbb-T1)+628.628*10**-3*(Tbb**2-T1**2)/2-1898.8*10**-6*(Tbb**3-T1**3)/3 \
+3186.51*10**-9*(Tbb**4-T1**4)/4                                # kJ/kmol
H2 = 31.421*(Tbb-T1)+976.058*10**-3*(Tbb**2-T1**2)/2-2353.68* \
10**-6*(Tbb**3-T1**3)/3+3092.73*10**-9*(Tbb**4-T1**4)/4         # kJ/kmol
Hsol = (H1+H2)/2                                                # kJ/kmol

# enthalpy at Tdp
lv1 = 25790*((469.7-329.9)/(469.7-309.2))**.38
lv2 = 28850*((507.6-329.9)/(507.6-341.9))**.38
Tdp = 329.9
H21ig = 65.4961*(Tdp-T1)+628.628*10**-3*(Tdp**2-T1**2)/2-1898.8*10**-6* \
(Tdp**3-T1**3)/3+3186.51*10**-9*(Tdp**4-T1**4)/4 + lv1          # kJ/kmol
H22ig = 31.421*(Tdp-T1)+976.058*10**-3*(Tdp**2-T1**2)/2-2353.68* \
10**-6*(Tdp**3-T1**3)/3+3092.73*10**-9*(Tdp**4-T1**4)/4 +lv2    # kJ/kmol
Hmixig = (H21ig+H22ig)/2

# Result
print " a   H = ",Hsol," kJ/kmol    b   H = ",Hmixig," kJ/kmol"
 a   H =  4370.454066  kJ/kmol    b   H =  33019.341801  kJ/kmol

Example 5.22 Page 252

In [22]:
# solution 

# Variables 
H1 = 23549.                 #kJ/kmol
H2 = 16325.
H3 = 28332.

# Calculation 
H4 = .4*H2+.6*H3

# Result
print "Enthalpy of vapor-liquid mixture after flashing = ",H4," kJ/mol."
Enthalpy of vapor-liquid mixture after flashing =  23529.2  kJ/mol.

Example 5.23 Page 253

In [23]:
# solution 

# Variables
# basis feed gas = 12000 Nm**3 = 535.4 kmol/h
T1 = 147.65                         # K
n1 = 535.4*.3156                    # kmol/h  HP tail gas stream
T = 118.5                           # K

# Calculation 
n2 = (535.4-n1)*.0602               # kmol/h    LP tail stream
n3 = 535.4-n2-n1                    # kmol/h  product H2 stream
p = 315.35*100/n3

# Result
print " Purity of product H2 stream = ",p," percent."
 Purity of product H2 stream =  91.5733341399  percent.

Example 5.24 Page 256

In [24]:
# solution 

# Variables 
# fi1 = integr (from 304.15 to 313.15) {11831.6+24997.4*10T**-3-5979.8*10**-6T**2-31.7*10**-9T3}dt
fi1 = 170787.7 # kJ/h

# Calculation 
fi2 = 535.4*12086 - (344.36*8743.2+168.97*18036+22.07*15892)          # kJ/h

# Result
print " a   Refrigiration requirement = ",fi1,\
" kJ/h    b   Refrigiration requirement based on real enthalpies = ",fi2," kJ/h."
 a   Refrigiration requirement =  170787.7  kJ/h    b   Refrigiration requirement based on real enthalpies =  61756.688  kJ/h.

Example 5.25 Page 257

In [3]:
# solution 

# Variables 
# basis 100 kmol/h of benzene feed rate
Cl2 = .4*100
HClp = 40.
Benzenecon = 37.
MCBp = 100*.37*.9189

# Calculation 
DCBp = Benzenecon-MCBp
unreactBenzene = 100-Benzenecon
Nt = HClp + MCBp + DCBp + unreactBenzene
# using eq      xi = Ni/(L(1-K1)+NtKi)  and sigma xi = 1
L = 89.669                  # kmol/h
V = Nt - L

# Result
print " Liquid product stream = ",L," kmol/h  Vapor product stream = ",V," kmol/h"
 Liquid product stream =  89.669  kmol/h  Vapor product stream =  50.331  kmol/h

Example 5.26 Page 260

In [26]:
# solution 

# Variables 
# 2C + 2O2 = 2CO2                  A
# 2H2 + O2 = 2H2O                  B
# C2H4 + 3O2 = 2CO2 + 2H2O         C
# A+B-C  gives
# 2C(g) + 2H2 = C2H4(g)            D

# Calculation 
H = -2*393.51-2*241.82+1323.1           # kJ/mol

# Result
print " Heat of formation of Ethylene is ",H," kJ/mol."
 Heat of formation of Ethylene is  52.44  kJ/mol.

Example 5.27 Page 260

In [27]:
# solution 

# Calculation 

Hc = 2*(-393.51)-887.811+2*(-285.83)-(-73.6+0)              #kJ/mol

# Result
print " Heat of combustion of ethyl mercaptan = ",Hc," kJ/mol."
 Heat of combustion of ethyl mercaptan =  -2172.891  kJ/mol.

Example 5.28 Page 261

In [28]:
# solution 
# Variables 
lv1 = 26694.                # kj/kmol
Tc = 466.74

# Calculation 
lv2 = lv1*((Tc-298.15)/(Tc-307.7))**.38/1000                # kJ/mol
Hf = -252.                  # kJ/mol
Hf1 = Hf-lv2                # kJ/kmol

# Result
print "Heat of formation of liquid di ethyl ether = ",Hf1," kJ/mol."
Heat of formation of liquid di ethyl ether =  -279.292123302  kJ/mol.

Example 5.29 Page 261

In [29]:
# solution 

# Variables 
# basis 1 kg motor spirit
G = 141.5/(131.5+64)

# Calculation 
# r = C/H
r = (74.+15*G)/(26-15*G)
C = r/6.605                     # C content of motor spirit
H2 = 1-C
O2req = C+H2
Hf = 44050-27829-18306.         # kJ/kg

# Result
print " Heat of formation of motor spirit = ",Hf," kJ/kg."
 Heat of formation of motor spirit =  -2085.0  kJ/kg.

Example 5.30 Page 267

In [30]:
# solution 
# Variables 
# basis 1 kmol of styrene
dH = 241749-189398.                     # kJ/mol

# Calculation 
Cmpn = dH/(600-298.15)                  # kJ/kmol K

# Result
print " Mean heat capacity between 600K and 298.15 K is ",Cmpn," kJ/kmol K."
 Mean heat capacity between 600K and 298.15 K is  173.433824747  kJ/kmol K.

Example 5.31 Page 269

In [31]:
# solution 

# Calculation 
# basis 1 mol of SiO2 reacted
Hf = (-2879+3*(-296.81)+3*0/2)-(3*(-1432.7)+1*(-903.5))  # kJ/mol SiO2

# Result
print " Heat of reaction = ",Hf," kJ/mol SiO2."
 Heat of reaction =  1432.17  kJ/mol SiO2.

Example 5.32 Page 269

In [32]:
# solution 

# Variables 
# basis 100 kg of 2% ammonia solution
NH3 = 2.                # kg
H2O = 98.               # kg

# Calculation 
Hr = -361.2-(-45.94-285.83)             # kJ/mol NH3 dissolved
Hd = -(Hr*2*1000/17.0305)               # kJ/100 kg sol.

# Result
print " heat of reaction = ",Hd," kJ/100 kg solution."
 heat of reaction =  3456.15219753  kJ/100 kg solution.

Example 5.33 Page 272

In [33]:
# solution 

# Variables 
# basis 1 kmol of SO2 reacted
a = 22.036-24.771-.5*(26.026)
b = (121.624-62.948-.5*11.755)
c = (-91.876+44.258-.5*(-2.343))
d = (24.369-11.122-.5*(-.562))
Hr = -395720+296810.                # kJ/kmol

# Calculation 
Hro = Hr-a*298.15-b*10**-3*298.15**2/2-c*10**-6*298.15**3/3-d*10**-9*298.15**4/4.
T = 778.15
Hrt = -Hro-15.748*T+26.4*10**-3*T**2-15.48*10**-6*T**3+3.382*10**-9*T**4

# Result
print " Heat of reaction at 775K is ",Hrt," kJ/kmol."
 Heat of reaction at 775K is  93855.2952943  kJ/kmol.

Example 5.34 Page 272

In [34]:
# solution 

# Calculation
Hr = -480-285.83+277.2+484.2                            # kJ/mol
Hrt1 = Hr*1000 + (146.89+75.76-119.55-129.70)*75        # kJ/kmol 
a = 4.2905+50.845-100.92-155.48
b = 934.378+213.08+111.8386+326.5951
c = -2640-631.398-498.54-744.199
d = 3342.58+648.746
Hro = Hr*1000+a*(-298.15)+b*10**-3*(-298.15**2)/2+ \
c*10**-6*(-298.15**3)/3+d*10**-9*(-298.15**4)/4
T = 373.15
Hrt = Hro+a*T+792.949*10**-3*T**2-1504.712*10**-6*T**3+997.832*10**-9*T**4

# Result
print " Heat of reaction at 373 K is ",Hrt," kJ/kmol reactant."
 Heat of reaction at 373 K is  -6441.65717017  kJ/kmol reactant.

Example 5.35 Page 273

In [1]:
# solution 

# Variables 
T2 = 800.
T1 = 298.15

# Calculation 
fi1 = 3614.577*(T2-T1)+305.561*10**-3*(T2**2-T2**2)/2+836.881*10**-6*(T2**3-T1**3)/3-393.707*10**-9*(T2**4-T1**4)/4  # kW
T3 = 875.
fi2 = 3480.737*(T3-T1)+754.347*10**-3*(T3**2-T2**2)/2+442.159*10**-6*(T3**3-T1**3)/3-278.735*10**-9*(T3**4-T1**4)/4  # kW
Hr = -98910.                            # kJ/kmol SO2 reacted     by eg 5.33
fi3 = (8.8511-.351)*Hr/3600.            # kW
dH = fi2/3600+fi3-fi1/3600.

# Result
print " Net enthalpy change = ",dH," kW."
 Net enthalpy change =  -178.010235047  kW.

Example 5.36 Page 275

In [36]:
# solution 

# Variables 
# basis 100 kmol outgoing gas mixture from scrubber
moistin = 3127.7*.015/18                        # kmol
waterin = 40.2+moistin                          # kmol


# Calculation 
# using tables 5.29 and 5.30
Hr = -27002658-(-26853359.)
Hr1 = Hr/246.4493                               # kJ/kmol total reactants

# Result
print " Heat of reaction = ",Hr1," kJ/kmol total reactants."
 Heat of reaction =  -605.80005705  kJ/kmol total reactants.

Example 5.37 Page 276

In [37]:
# solution 

# Variables 
fi3 = 15505407.                     # kJ/h
lv = 296.2                          # from table 5.6
Ht = 17131551.                      # kJ/h

# Calculation 
r = Ht/lv                           # kg/h

# Result
print " Downtherm circulation rate = ",r," kg/h."
 Downtherm circulation rate =  57837.7819041  kg/h.

Example 5.38 Page 279

In [38]:
import math
# solution 

# Variables 
F = 100.                        # kmol/h    feed rate of ethylene
Econ = .99*F


# Calculation and Result
Econ1 = Econ*.998
Econ2 = Econ-Econ1
Cl2con = Econ1+2*Econ2
Cl2in = F*1.1
Cl2s3 = Cl2in-Cl2con
HCls3 = Econ2
TCEp = Econ2
EDCp = Econ1
nC2H4 = 1
T = 328.15
pv1 = math.exp(4.58518-1521.789/(T-24.67))               # bar
pv2 = math.exp(4.06974-1310.297/(T-64.41))               # bar
xEDC = Econ1/(Econ1+Econ2)
xTEC = 1-xEDC
pEDC = 37.2*xEDC
pTEC = 12.64*xTEC
pCl2HClC2H4 = 1.6*100-pEDC-pTEC
yEDC = pEDC/160
yTEC = pTEC/160
nt = (Cl2s3+Econ2+1)*160/pCl2HClC2H4
nEDC = yEDC*nt
nTEC = yTEC*nt
print " Compositions of gas streams :   "
print "Component        Stream 3    Stream 5    Stream 4      Stream 6 "
print " Cl2           ",Cl2s3,"     ",Cl2s3
print "  HCl          ",HCls3,"     ",HCls3
print " C2H4          ",nC2H4,"     ",nC2H4
print " EDC           ",nEDC,"       0.2355      3.3947         98.5665"
print " TEC           ",nTEC,"        Nil       ",nTEC,"      ",TCEp
fi1 = (10.802*33.9+.198*29.1+1*43.6+3.6302*17.4+.0025*85.3)*(328.15-273.15)
fi2 = 35.053*1000*3.3947+39.58*1000*.0025
fi3 = (3.3947*129.4+.0025*144.4)*55/2
fi = fi1+ fi2+ fi3                                      # kJ/h
print " Heavy duty of Overhead condenser = ",fi," kJ/h.   "
fi5 = (100*43.6+110*33.9)*(328.15-273.15)
fi6 = 3.6302*1000*33.6+.0025*1000*38.166
fi7 = (98.5665*129.4+.1988*144.4)*(328.15-273.15)
fi8 = 216845.5*98.802+392394.5*.198
ficol = fi5+fi8-fi1-fi6-fi7
print " Heavy duty of external cooler = ",ficol," kJ/h."
 Compositions of gas streams :   
Component        Stream 3    Stream 5    Stream 4      Stream 6 
 Cl2            10.802       10.802
  HCl           0.198       0.198
 C2H4           1       1
 EDC            3.6264582115        0.2355      3.3947         98.5665
 TEC            0.00246937055797         Nil        0.00246937055797        0.198
 Heavy duty of Overhead condenser =  157524.3947  kJ/h.   
 Heavy duty of external cooler =  21095870.3588  kJ/h.

Example 5.39 Page 284

In [4]:
# solution 

# Variables 
To = 298.15
T1 = 483.15

# Calculation 
# fi1 = intgr(from To to T1){12199.5+2241.4*10**-3*T+1557.7*10**-6*T**2-671.3*10**-9*T**3}dT
fi1 = 2455874.6                 # kJ/h
dHr = 2*(-45.94)                # kJ/mol N2 reacted
fi2 = 91.88*1000*23.168
fi3 = fi1+fi2
# fi3 = intgr(from To to T2){10713.9+3841*10**-3*T+1278.8*10**-6*T**2-752.6*10**-9*T**3}dT 
# solving it
T2 = 657.41                     # K

# Result
print "Temperature of the gas mixture leaving the reactor = ",T2," K."
Temperature of the gas mixture leaving the reactor =  657.41  K.

Example 5.40 Page 292

In [40]:
# solution 

# Variables 
# basis 4 kmol of HCl gas
O2req = 1.                  # kmol
O2spply = 1.35*1

# Calculation 
N2 = 1.35*79/21.
air = O2spply+N2
HClbrnt = .8*4
HCl = 4-HClbrnt
O2 = O2spply-.8
Cl2 = .8*2
H2O = .8*2

# Result
print " a)   Composition of dry product gas stream : "
print " Component       Dry product gas stream,kmol"
print " HCl                 ",HCl
print "  O2                 ",O2
print " Cl2                 ",Cl2
print " H2O                 ",H2O
print "  N2                 ",N2
print "b)   "
H2 = 114.4*1000*.8
# H2 = intgr(from 298.15 to T){286.554+12.596*10**-3*T+63.246*10**-6*T**2-25.933*10**-9*T**3}dT
# solving it
T = 599.5                   # K
print " Adiabatic reaction temperature of product gas stream = ",T," K."
 a)   Composition of dry product gas stream : 
 Component       Dry product gas stream,kmol
 HCl                  0.8
  O2                  0.55
 Cl2                  1.6
 H2O                  1.6
  N2                  5.07857142857
b)   
 Adiabatic reaction temperature of product gas stream =  599.5  K.

Example 5.41 Page 294

In [41]:
# solution 

# Variables 
# 1 kmol of EB vapors entering the reactor at 811.15 K
# (from 811.15 to T1)intgr{-36.72+671.12*10**-3*T-422.02*10**-6*T**2+101.15*10**-9*T**3}dT = (from T1 to 978.15)intgr{487.38+1.19*10**-3*T+198.16*10**-6*T**2-68.21*10**-9*T**3}dT
# we get
T1 = 929.72                     # K
To = 298.15
H1 = 493405.                    # kJ
EBr = .35

# Calculation 
Styrenep = EBr*.9
Benzeneb = EBr*.03
Ethyleneb = Benzeneb
Cb = EBr*.01
Toulened = EBr*.06
Hr1 = 147.36-29.92              # kJ/mol EB
Hr2 = 82.93+52.5-29.92
Hr3 = -29.92
Hr4 = 50.17-74.52-147.36        # kJ/mol styrene
dHr = 1000*(Hr1*(Styrenep+Toulened)+Hr2*Benzeneb+Hr3*Cb+Hr4*Toulened)
H2 = H1-dHr

# H2 = (from To t0 T2)intgr{Comp2dT
# we get

T2 = 798.79                     # K

# Result
print " Adiabatic reaction T at the outlet of the reactor is ",T2," K."
 Adiabatic reaction T at the outlet of the reactor is  798.79  K.

Example 5.42 Page 297

In [62]:
# solution 

# Variables 
Hsol = 62.86                    # kJ/mol solute
Mcrystal = 286.1414

# Calculation 
Hcry = Hsol*1000/Mcrystal       # kJ/kg solute

# Result
print " Heat of crystallization of 1 kg crystal is ",Hcry," kJ."
 Heat of crystallization of 1 kg crystal is  219.681597979  kJ.

Example 5.43 Page 297

In [43]:
# solution 

# Variables 
Hf = -285.82                        # kJ/mol    of H2O

# Calculation 
Hcryst = -4327.26-(-1387.08+10*Hf)

# Result
print " Heat of crystallization = ",Hcryst," kJ/mol."
 Heat of crystallization =  -81.98  kJ/mol.

Example 5.44 Page 297

In [44]:
# solution 

# Variables 
Hfs = -1094.33
Hfao = -1072.32

# Calculation 
Hsol = Hfao-Hfs

# Result
print " Heat of solution of Boric acid = ",Hsol," kJ/mol."
 Heat of solution of Boric acid =  22.01  kJ/mol.

Example 5.45 Page 297

In [45]:
# solution 

# Variables 
# (a)
Hf = -982.8
Hfcryst = -1053.904

# Calculation 
Hdis = Hfcryst-Hf
# (b)
Hfcr = -3077.75
Hsol = Hfcryst+7*(-285.83)-(-3077.75)

# Result
print " a   Hdissolulition = ",Hdis," kJ/mol ZnSO4.    b   Hsolution = ",Hsol," kJ/kmol."
 a   Hdissolulition =  -71.104  kJ/mol ZnSO4.    b   Hsolution =  23.036  kJ/kmol.

Example 5.46 Page 300

In [46]:
# solution 

# Variables 
# using chart 5.16 we get
T = 329.5                       # K

# Result
print " T = ",T," K."
 T =  329.5  K.

Example 5.47 Page 300

In [47]:
# solution 

# Variables 
# basis 100(m1) kg 46% sol
NaOH = 46.                  # kg
H2O = 54.                   # kg

# Calculation 
m2 = NaOH/.25
NaOHo = 25.                 # kg
H2Oo = 75.                  # kg
Hf1 = -453.138              # kJ/mol
Hf2 = -467.678              # kJ/mol
Hs = Hf2-Hf1
Hg = -Hs*1000*1.501

# using Appendix IV.1
Hw1 = 146.65
Hw2 = 104.9
Hadd = 84*(Hw1-Hw2)
H = Hg+Hadd
C1 = 3.55
T2 = 298.15+H/(184*C1)      # K

# Result
print " Final sol T = ",T2," K."
 Final sol T =  336.930679731  K.

Example 5.48 Page 301

In [48]:
# solution 

# Variables 
# basis 100 kg of sol with 32% N
MNH4NO3 = 80.0434
MNH2CONO2 = 60.0553
MN2 = 28.0134

# Calculation 
na = 32/(60.9516)
Ureadis = 1.1758*na*MNH2CONO2                   # kg
water = 100-(na*MNH4NO3+Ureadis)
ndis = 525.
m = ndis/water
HE1 = 40.3044-2.5962*m+.1582*m**2-3.4782*10**-3*m**3
HE = HE1*ndis

# Result
print "Heat effect of the sol = ",HE," kJ."
Heat effect of the sol =  10388.7187316  kJ.

Example 5.49 Page 302

In [49]:
# solution 

# Variables 
Hmix = 896.
M1 = 88.                          # molar mass of n-amyl alcohol
M2 = 78.                          # molar mass of benzene

# Calculation 
B = .473*M2
A = .527*M1
Ha = Hmix/A
Hb = Hmix/B

# Result
print " Integral heat of sol of n-amyl alcohol = ",Ha,\
" kJ/kg n-amyl alcohol and of benzene = ",Hb," kJ/kg benzene."
 Integral heat of sol of n-amyl alcohol =  19.3203381059  kJ/kg n-amyl alcohol and of benzene =  24.2857917277  kJ/kg benzene.

Example 5.50 Page 302

In [50]:
from numpy import poly1d, roots
# solution 

# Variables 
# from fig 5.18
Ta = 379.5                              # K
dH = -274-(-106.5)                      # kJ/kg sol
Cm = 2.05                               # kJ/kg K
dHc = Cm*(Ta-298.15)

# Calculation 
# basis 100 kg of 93 % acid
# acid balance 
x = poly1d(0,'x')
p = .93*100+x*.15-(100+x)*.77
y = roots(p)[0]

#from fig
y1 = 25.3

# Result
print "a   Resultant T of 77 percent sol = ",Ta, \
" K.    \nb   Heat to be removed to cool it to 298.15 K = ",dH,\
" kJ/kg sol    \nc   By mean heat capacity method : ",dHc,\
" kJ/kg sol    \nd   Quantity of 15 percent acid to be mixed = ",y,\
" kg.    \ne   from fig : ",y1," kg."
a   Resultant T of 77 percent sol =  379.5  K.    
b   Heat to be removed to cool it to 298.15 K =  -167.5  kJ/kg sol    
c   By mean heat capacity method :  166.7675  kJ/kg sol    
d   Quantity of 15 percent acid to be mixed =  25.8064516129  kg.    
e   from fig :  25.3  kg.

Example 5.51 Page 304

In [51]:
# solution 

# Variables 
# basis 100 kg of 93% acid and 25.8 kg of 15% acid
Hfp = -814.
Hf1 = -830.
HE1 = Hf1-Hfp
Hf2 = -886.2
HE2 = Hf2-Hfp
Hf3 = -851.
HE3 = Hf3-Hfp

# Calculation 
Hsol = .9876*1000*(-37)-(.9482*1000*(-16)+.0394*1000*(-72.2))
Hev = 100*(30-25)*1.6
Hcon = 25.8*25*3.7
netHev = -Hsol-Hcon+Hev
T = 298.15+netHev/(125.8*2.05)

# Result
print " Temp of sol = ",T," K."
 Temp of sol =  363.832345186  K.

Example 5.52 Page 306

In [52]:
# solution 

# Variables 
# basis 1000 kg of mixed acid
C11 = 2.45

# Calculation 
H1 = -296.7+C11*(308.15-273.15)
C12 = 2.2
H2 = -87.8+C12*(308.15-273.15)
C13 = 1.45
H3 = -35.5+C13*(308.15-273.15)
C14 = 1.8
H4 = -148.9+C14*(308.15-273.15)
Hmix = 1000*H4-(76.3*H1+345.9*H2+577.7*H3)

# Result
print " Heat of mixing = ",Hmix," kJ."
 Heat of mixing =  -74878.72  kJ.

Example 5.53 Page 308

In [53]:
# solution 

# Variables 
F = 1135.
Benzenef = 400*.993

# Calculation 
HNO3con = Benzenef*63/78.
H1 = -186.5
C11 = 1.88
H11 = H1+C11*(298.15-273.15)
H2 = -288.9
C12 = 1.96
H22 = H2+C12*(298.15-273.15)
H3 = 0
C13 = 1.98
H33 = C13*(298.15-273.15)
Hr = -285.83+12.5-(-174.1+49.08)
Benzener = Benzenef/78.1118
fi = 903.84*H22+HNO3con*H33-F*H11+Benzener*Hr*1000              # kJ/h

# Result
print " Total heat exchanged = ",fi," kJ/h."
 Total heat exchanged =  -796777.546799  kJ/h.

Example 5.54 Page 311

In [54]:
# solution 

# Variables 
# from ref 24
H = 1600.83
To = 273.15
h = 200.
Hf1 = -79.3                 # table 5.59
Hf2 = -46.11
Hsol = Hf1-Hf2

# Calculation 
Hg = Hsol*1000*140./17.0305
Raq = 140/.15               # kg/h
dT = Hg/(4.145*Raq)
T = -dT+303.

# Result
print " Temp of resultant sol = ",T," K."
 Temp of resultant sol =  373.525565624  K.

Example 5.55 Page 311

In [55]:
# solution 

# Variables 
Hf1 = -80.14
Hf2 = -46.11

# Calculation 
Hsol = Hf1-Hf2
Hg = Hsol*1000.*2/17.0305

# Result
print " Heat generated for making 2 percent solution = ",Hg," kJ/100 kg sol."
 Heat generated for making 2 percent solution =  -3996.35947271  kJ/100 kg sol.

Example 5.56 Page 312

In [56]:
# solution 

# Variables 
fi3 = 15505407.
fi4 = 11395056.
fi5 = fi3-fi4  # kJ/h

# Calculation 
fi6 = 111.375*62.75*1000
fi7 = 1063379.
fi8 = 5532.15*4.1868*(303.15-298.15)
fi9 = 9030.4*3.45*(323.15-298.15)
fi = fi5+fi6+fi8-fi7-fi9

# Result
print " Heat removal in the cooler = ",fi," kJ/h."
 Heat removal in the cooler =  9372691.2781  kJ/h.

Example 5.57 Page 314

In [5]:
%matplotlib inline
# solution 
from numpy import linspace
from matplotlib.pyplot import plot, show

# Variables 
To = 273.15
T1 = 308.15
H1 = 124.8*(T1-To)                  # kJ/kmol
H2 = 134.9*(T1-To)                  # kJ/kmol

# Calculation 
HE1 = .1*.9*(542.4+55.4*(.9-.1)-132.8*(.9-.1)**2-168.9*(.9-.1)**3)  # kJ/kmol of mix
Ha = HE1+H1*.1+H2*.9
HE2 = .2*.8*(542.4+55.4*(.8-.2)-132.8*(.8-.2)**2-168.9*(.8-.2)**3)  # kJ/kmol of mix
Hb = HE2+H1*.2+H2*.8
HE3 = .3*.7*(542.4+55.4*(.7-.3)-132.8*(.7-.3)**2-168.9*(.7-.3)**3)  # kJ/kmol of mix
Hc = HE3+H1*.3+H2*.7
HE4 = .4*.6*(542.4+55.4*(.6-.4)-132.8*(.6-.4)**2-168.9*(.6-.4)**3)  # kJ/kmol of mix
Hd = HE4+H1*.4+H2*.6
HE5 = .5*.5*(542.4+55.4*(.5-.5)-132.8*(.5-.5)**2-168.9*(.5-.5)**3)  # kJ/kmol of mix
He = HE5+H1*.5+H2*.5
HE6 = .6*.4*(542.4+55.4*(.4-.6)-132.8*(.4-.6)**2-168.9*(.4-.6)**3)  # kJ/kmol of mix
Hf = HE6+H1*.6+H2*.4
HE7 = .7*.3*(542.4+55.4*(.3-.7)-132.8*(.3-.7)**2-168.9*(.3-.7)**3)  # kJ/kmol of mix
Hg = HE7+H1*.7+H2*.3
HE8 = .8*.2*(542.4+55.4*(.2-.8)-132.8*(.2-.8)**2-168.9*(.2-.8)**3)  # kJ/kmol of mix
Hh = HE8+H1*.8+H2*.2
HE9 = .9*.1*(542.4+55.4*(.1-.9)-132.8*(.1-.9)**2-168.9*(.1-.9)**3)  # kJ/kmol of mix
Hi = HE9+H1*.9+H2*.1
HE10 = .0*1.*(542.4+55.4*(.0-1.)-132.8*(.0-1.)**2-168.9*(.0-1.)**3)  # kJ/kmol of mix
Hj = HE10+H1+H2*0
x = linspace(0,1,100)
y = linspace(4300,5000,100)
y = 4721.5-57.4*x+1137.7*x**2-3993.6*x**3+3909.2*x**4-1351.2*x**5

# Result
plot(x,y)
show()
#title("H vs x1")
#xlabel("x1")
#ylabel("H (kJ/kg sol.)")
print "                     Enthalpy, kJ/kmol mix "
print "  x1         HE             H"
print "  0          0            ",H2
print "  0.1       ",HE1,"       ",Ha
print "  0.2       ",HE2,"       ",Hb
print "  0.3       ",HE3,"       ",Hc
print "  0.4       ",HE4,"       ",Hd
print "  0.5       ",HE5,"       ",He
print "  0.6       ",HE6,"       ",Hf
print "  0.7       ",HE7,"       ",Hg
print "  0.8       ",HE8,"       ",Hh
print "  0.9       ",HE9,"       ",Hi
print "  1.0       ",HE10,"      ",Hj
                     Enthalpy, kJ/kmol mix 
  x1         HE             H
  0          0             4721.5
  0.1        37.372608         4723.522608
  0.2        78.615936         4729.415936
  0.3        111.825504         4727.275504
  0.4        131.236032         4711.336032
  0.5        135.6         4680.35
  0.6        126.566208         4635.966208
  0.7        107.058336         4581.108336
  0.8        79.653504         4518.353504
  0.9        44.960832         4448.310832
  1.0        0.0        4368.0

Example 5.59 Page 318

In [59]:
# solution 
# Variables 

# from graph drawn in 5.57 we can see
H1E1 = 300.
H1E2 = 63.
H2E1 = 30.
H2E2 = 214.

# Result
print " H1 at x1=0.3 is ",H1E1," kJ/kg sol  \nH2 at x1=0.3 is ",H2E1,\
" kJ/kg sol  \nH1 at x1=0.6 is ",H1E2," kJ/kg sol  \nH2 at x1=0.6 is ",H2E2," kJ/kg sol."
 H1 at x1=0.3 is  300.0  kJ/kg sol  
H2 at x1=0.3 is  30.0  kJ/kg sol  
H1 at x1=0.6 is  63.0  kJ/kg sol  
H2 at x1=0.6 is  214.0  kJ/kg sol.

Example 5.60 Page 320

In [60]:
# solution 
# Variables 
# basis 100 kg 96.1% H2SO4
# from table 5.64
m1SO3 = 78.4                        # kg
m1H2O = 21.6
n1SO3 = m1SO3/80.063
n1H2O = m1H2O/18.015

# Calculation 
# resultant sol has 23.2% H2SO4
m2SO3 = 19.
m2H2O = 81.
Mrsol = m1SO3*100./m2SO3
Mw = Mrsol-100.
w = Mrsol-m1SO3/18.015              # kmol
HEosol = n1SO3*(-56940.)+n1H2O*(-32657.)           # kJ
HErsol = n1SO3*(-156168.)+w-(-335.)
HE = HErsol-HEosol                  # kJ/kg original acid
C = 3.43                            # kJ/kg K
dT = -HE/(Mrsol*C)
T = 291.15+dT                       # K

# Result
print " Heat of dilution = ",HE," kJ/kg original solution   \nFinal T of resultant solution = ",T," K."
 Heat of dilution =  -57267.8712082  kJ/kg original solution   
Final T of resultant solution =  331.612662617  K.

Example 5.61 Page 321

In [61]:
# solution 

# Variables 
# basis 100 kg of original acid
lv = 333.7                      # kJ/kg

# Calculation 
H = -lv-18*4.1868
HE = (-64277-H*312.63)/100      # kJ/kg

# Result
print " Heat of dilution = ",HE," kJ/kg."
 Heat of dilution =  636.08178112  kJ/kg.