# Chapter 11 : Energy Balance Thermophysics¶

## Example 11.1 pageno : 405¶

In :
# variables
m = 75.                     #kg
g = 9.81                    #m**2/s
d = 10.                     #m
t = 2.5*60                  #s

# Calculation
f = m*g
w = f * d
P = w / t

# Result
print "The work done = ",w,"Nm"
print "Power required = ",P,"W"

The work done =  7357.5 Nm
Power required =  49.05 W


## Example 11.2 pageno : 405¶

In :
# variables
PE = 1.5*10**3                  #J
m = 10.                         #kg
g = 9.81                        #m/s**2
v = 50.                         #m/s

# Calculation
#PE = mgz
z = PE / (m*g)
KE = m* (v**2) / 2

# Result
print "Height of the body from the ground = %.1f"%z,"m"
print "Kinetic energy of the body = ",KE/1000,"kJ"

Height of the body from the ground = 15.3 m
Kinetic energy of the body =  12.5 kJ


## Example 11.3 pageno : 405¶

In :
import math
# Variables
d = 100. /1000                  #m
m = 50.                         #kg
P = 1.01325*10**5.              #Pa

# Calculation
A = math.pi * (d**2)/4
Fatm = P * A
Fwt = m * g
Ftotal = Fatm + Fwt
P = Ftotal / A

# Result
print "(a)Pressure of the gas = %.4f"%(P/10**5),"bar"
z = 500/1000.                   #m
w = Ftotal * z
print "(b)Work done by the gas = %.2f"%w,"J"

(a)Pressure of the gas = 1.6378 bar
(b)Work done by the gas = 643.15 J


## Example 11.4 pageno : 406¶

In :
# variables
Sgr = 0.879
F = 5.                      #m**3/h

# Calculation
D = Sgr * 1000.
m = F * D/3600.             #kg/s
P = 3500.                   #kPa
W = P * m * 1000/ D

# Result
print "Power requirement for the pump = %d"%W,"W"

Power requirement for the pump = 4861 W


## Example 11.5 pageno : 408¶

In :
import math
# Variables

d = 3.                              #m
m = 12500.                          #kg
P = 7000.                           #kPa

# Calculation
U = 5.3*10**6                       #kJ
Vtank = 4*math.pi*((d/2)**3) / 3
Vliq = Vtank / 2
H = U + P * Vliq

# Result
print "Specific enthalpy of the fluid in the tank = %.2f"%(H/m),"kJ/kg"

Specific enthalpy of the fluid in the tank = 427.96 kJ/kg


## Example 11.6 pageno : 409¶

In :
# variables
P = 101.3                       #kPa
SVl = 1.04 * 10**-3             #m**3/kmol
SVg = 1.675                     #m**3/kmol
Q = 1030.                       #kJ

# Calculation
W = P * 10**3 * (SVg - SVl)/1000
U = Q - W
H = U +  P * 10**3 * (SVg - SVl)/1000

# Result
print "Change in internal energy = %.2f"%U,"kJ/kmol"
print "Change in enthalpy = ",H,"kJ/kmol"

Change in internal energy = 860.43 kJ/kmol
Change in enthalpy =  1030.0 kJ/kmol


## Example 11.7 pageno : 409¶

In :
# variables
#work is done on the system, hence, W is negative

W = - 2 * 745.7             #J/s
#heat is transferres to the surrounding, hence, heat transferred is negative,
Q = -3000.                  #kJ/h

# Calculation
U = Q*1000/3600 - W

# Result
print "Change in internal energy = %.2f"%U,"J/s"

Change in internal energy = 658.07 J/s


## Example 11.8 pageno : 410¶

In :
# variables
#Fe(s) + 2HCl(aq) = FeCl2(aq) + H2(g)
MFe = 55.847
m = 1.                      #kg

# Calculation
Nfe = m * 10**3/MFe
Nh2 = Nfe                   #(since 1 mole of Fe produces 1 mole of H2)
T = 300.                    #K
R = 8.314

#the change in volume is equal to the volume occupied by hydrogen produced
PV = Nh2 * R * T
W = PV

# Result
print "Work done = %.2f"%W,"J"

Work done = 44661.31 J


## Example 11.9 pageno : 412¶

In :
#Cp =1.436 + 2.18*10**-3*T
from scipy.integrate import quad

# variables
m = 1000./3600                  #kg/s
T1 = 380.                       #K
T2 = 550.                       #K

# Calculation
def f0(T):
return 1.436 + 2.18*10**-3*T

x =  quad(f0,T1,T2)
Q = m*x

# Result
print "Heat load on the heater = %.1f"%Q,"kW"

Heat load on the heater = 115.7 kW


## Example 11.10 page no : 413¶

In :
#Cp = 26.54 + 42.454*10**-3 * T - 14.298 * 10**-6 * T**2

from scipy.integrate import quad

# variables
T1 = 300.                   #K
T2 = 1000.                  #K
m = 1.                      #kg
N = m/44                    #kmol

# Calculation
def f3(T):
return 26.54 + 42.454*10**-3 * T - 14.298 * 10**-6 * T**2

x =  quad(f3,T1,T2)

Q = N*x

# Result
print "(a)Heat required = %.2f"%Q,"kJ"

#for temperature in t degree celsius
#Cp = 26.54 + 42.454*10**-3 * (t + 273.15) - 14.298 * 10**-6 * (t + 273.15)**2
#Cp = 37.068 + 34.643 * 10**-3*t - 14.298* 10**-6 * t**2 (kJ/kmolC)
#Cp = 8.854 + 8.274*10**-3*t -3.415*10**-6*t**2 ( Kcal/kmolC)
#For degree Fehreneit scale,replacet by ( t1 - 32)/18, we get
#Cp = 8.7058 + 4.6642 * 10**-3 *t1 - 1.0540 * 10**-6 * t1**2 ( Btu/lbmolF)

(a)Heat required = 755.85 kJ


## Example 11.11 pageno : 414¶

In :
%matplotlib inline

from matplotlib.pyplot import *

# variables
T = [273, 373, 473, 573, 673, 773, 873, 973, 1073, 1173, 1273]
Cp = [33.6, 35.1, 36 ,36.6, 37, 37.3, 37.5, 37.6, 37.7, 37.8, 37.9]

# Calculation
plot(T,Cp)
suptitle("Determination of enthalpy change ")
xlabel("Temperature, K ")
ylabel("Heat capacity, kJ/kmol K")

H = 36828.              #kJ/kmol

# Result
print "Enthalpy change = ",H,"kJ/kmol"

Populating the interactive namespace from numpy and matplotlib Enthalpy change =  36828.0 kJ/kmol


## Example 11.12 page no : 415¶

In :
#Cp = 26.586 + 7.582 * 10 **-3 * T - 1.12 * 10**-6 * T**2

from scipy.integrate import quad

# variables
T1 = 500.                   #K
T2 = 1000.                  #K

# Calculation
def f5(T):
return 26.586 + 7.582 * 10**-3 * T - 1.12 * 10**-6 * T**2

x =  quad(f5,T1,T2)

Cpm = 1 *x / ( T2 - T1 )

# Result
print "(a)Mean molal heat capacity = %.3f"%Cpm,"kJ/kmolK"
V = 500.                    #m**3
N = V / 22.4143
Q = N * Cpm * ( T2 - T1 )
print "(b)Heat to be supplied = %.3e"%Q,"kJ/h"
T3 = 1500.                  #K
Q1 = Cpm * (T3 - T1)

def f6(T):
return 26.586 + 7.582 * 10 **-3 * T - 1.12 * 10**-6 * T**2

y =  quad(f6,T1,T3)

Q2 = y
Perror = (Q2 - Q1) * 100 / Q2
print "(c)Percent error = %.1f"%Perror,"%"

# note : answer may vary because of rounding error.

(a)Mean molal heat capacity = 31.619 kJ/kmolK
(b)Heat to be supplied = 3.527e+05 kJ/h
(c)Percent error = 4.1 %


## Example 11.13 page no : 416¶

In :
# variables
T1 = 1500.                      #K
Tr = 273.                       #K
T2 = 400.                       #K
Cpm1 = 50.                      #kJ/kmol
Cpm2 = 35.                      #kJ/mol

# Calculation
H = Cpm1 * ( T1 - Tr ) - Cpm2 * ( T2 - Tr )

# Result
print "Enthalpy change = ",H,"kJ/kmol"

Enthalpy change =  56905.0 kJ/kmol


## Example 11.14 pageno : 417¶

In :
from scipy.integrate import quad

# variables
#CO,  26.586 + 7.582*10**-3*T - 1.12*10**-6*T**2
#CO2, 26.540 + 42.454*10**-3*T - 14.298*10**-6*T**2
#O2, 25.74 + 12.987*10**-3*T - 3.864*10**-6*T**2
#N2, 27.03 + 5.815*10**-3*T - 0.289*10**-6*T**2
#Cpmix = summation ( yi*Cpi ) = summation(yi*ai + yi*bi*T + yi*ci*T**2)

xco2 = 0.09
xco = 0.02
xo2 = 0.07
xn2 = 0.82
T1 = 600.                   #K
T2 = 375.                   #K

# Calculation
sumai = xco * 26.586 +xco2 * 26.540 + xo2 * 25.74 + xn2*27.03
sumbi = xco * 7.582*10**-3 + xco2*42.454*10**-3+xo2*12.987*10**-3 + xn2*5.815*10**-3
sumci = -(xco * 1.12*10**-6 + xco2*14.298*10**-6+xo2*3.864*10**-6+xn2*0.289*10**-6)

def f8(T):
return sumai+sumbi*T+sumci*T**2

H =  quad(f8,T2,T1)

# Result
print "Enthalpy change = %.2f"%H,"kJ/kmol"

# note : Calculating integration using quad may vary answer. Because Python use's its own methodology to calculate quad.

Enthalpy change = 7009.12 kJ/kmol


## Example 11.15 pageno : 420¶

In :
# variables
Hna = 26.04                     #J/g-atomK
Hs = 22.6                       #J/g-atomK
Ho = 16.8                       #J/g-atomK
Hh = 9.6                        #J/g-atomK

# Calculation
Hna2so410h2o = 2*Hna + Hs + 14*Ho  + 20*Hh
Hexp = 592.2                    #J/molK
Deviation = (Hexp - Hna2so410h2o)*100/Hexp

# Result
print "Deviation in heat capacity = %.2f"%Deviation,"%"

Deviation in heat capacity = 15.25 %


## Example 11.16 pageno : 421¶

In :
# variables
P1 = 75.                    #kPa
T1 = 573.                   #K
Tvap = 365.                 #K
Tbasis = 273.               #K

#Since, the boiling point of water at 75kPa is 375K, the vapour at 573K is superheated
H1 = 3075.                  #kJ/kg
Cliq = 4.2                  #kJ/kgK
Cvap = 1.97                 # kJ/kg/K
m = 1.                      #kg

# Calculation
#let assume converting liq. water into superheated stream occurs in 3 steps,

Hc1 = m*Cliq * ( Tvap - Tbasis )

Hc3 = m*Cvap*(T1 - Tvap)

#total enthalpy = 3075 = Hc1 + Hc2 + Hc3, therefore
Hc2 = H1 - Hc1 - Hc3

# Result
print "Heat of vapourisation = ",Hc2,"kJ/kg"

Heat of vapourisation =  2278.84 kJ/kg


## Example 11.17 pageno : 422¶

In :
from scipy.integrate import quad

# variables
T1 = 250.                           #K
T = 273.15                          #K
T2 = 400.                           #K
Cice = 2.037                        #kJ/kgK
T3 = 373.15                         #K
Cliq = 75.726                       #kJ/kmolK

#Cp = 30.475 + 9.652*10**-3*T + 1.189*10**-6*T**2
Hfusion = 6012.                     #kJ/kmol
Hvap = 40608.                       #kJ/kmol

# Calculation
#1 - Heat for raising the temperature of ice, H1
H1 = Cice * (T - T1)
#2 - Latent heat of fusion of ice,  Hf
Hf = Hfusion / 18.016               #kJ

#3 - Sensible heat of raising the temperature of water, H2
H2 = Cliq * ( T3 - T)/18.016
#4 - Latent heat of vaporization of water, Hv
Hv = Hvap / 18.016
#5 - Sensible heat of raising the temperature of water vapou, H3

def f4(T):
return 30.475 + 9.652*10.**-3*T + 1.189*10.**-6*T**2.

H3 =  51.243883    #quadrature(f4,T3,T2)

Q = H1 + H2 + H3 + Hf + Hv

# Result
print "Heat required = %.1f"%Q,"kJ"

Heat required = 3106.4 kJ


## Example 11.18 pageno : 423¶

In :
# variables
#Cp = 0.16 + 4.78 * (10**-3) * T ( organic liquid )
#Cp = 0.7935 + 1.298 * (10**-4) * T ( CCL4 )
Tb = 349.9                          #K
Hv = 195.                           #kJ/kg
Cp = 0.4693                         #kJ/kgK

# Calculation
#Let T be the final temperature
#integration(T - 650)(0.16 + 4.78 * (10**-3) * T)dt = integration(295 - T)(0.7935 + 1.298 * (10**-4) * T)dt
# the above equation yields, 2.4549*(10**-3)*T**2 + 0.9535*T - 1353.51 = 0, from this we get
T = 573.3                           #K

#since this temperature is above boiling point of CCl4,
#heat balance is, integration(T - 650)(0.16 + 4.78 * (10**-3) * T)dt = integration(295 - 349.9)(0.7935 + 1.298 * (10**-4) * T)dt + Hv + integration(349.9 - T)*0.4693*dT
#solving above equation, we get,
T1 = 540.1                          #K

# Result
print "equilibrium temperature of the mixture = ",T1,"K"

equilibrium temperature of the mixture =  540.1 K


## Example 11.19 pageno : 427¶

In :
import math

# Variables
T1 = 363.                       #K
T2 = 373.                       #K
P1s = 70.11                     #kPa
P2s = 101.3                     #kPa
R = 8.314                       #kJ/kmolK

# Calculation
# ln(P2s / P1s) = Hv / R * (1/T1 - 1/T2)
Hv = (math.log(P2s/P1s)*R)/(1/T1 - 1/T2)
Hv1 = Hv / (18)

# Result
print "Mean heat of vaporization = %.f"%Hv1,"kJ/kg"

Mean heat of vaporization = 2302 kJ/kg


## Example 11.20 pageno : 427¶

In :
# variables
T = 273.15 - 30
R = 8.314                        #K

# Calculation
#lnPs = 14.2410 - 2137.72 / (T-26.72)
#dlnPs/dT = Hv / RT2
Hv = 2137.72 * R * T**2 / ( T - 26.72 )**2

# Result
print "Heat of vaporization = %.2f"%Hv,"kJ/kmol"

Heat of vaporization = 22432.33 kJ/kmol


## Example 11.21 pageno : 427¶

In :
# variables
Hv1 = 2256.                     #kJ/kg
T1 = 373.                       #K
T2 = 473.                       #K
Tc = 647.                       #K

# Calculation
Tr1 = T1 / Tc
Tr2 = T2 / Tc
#Hv2 / Hv1 = ((1-Tr2)/(1-Tr1))**0.38
Hv2 = Hv1*(((1-Tr2)/(1-Tr1))**0.38)

# Result
print "Latent heat of vaporization of water at 473K = %d"%Hv2,"kJ/kg"

Latent heat of vaporization of water at 473K = 1898 kJ/kg


## Example 11.22 pageno : 428¶

In :
import math
from scipy.integrate import quad

# Variables
#Cp = a + b*T

T1 = 293.15                     #K
Cp1 = 131.05                    #J/molK
T2 = 323.                       #K
Cp2 = 138.04                    #J/molK

# Calculation
#a + 293*b = 131.05
#a + 323*b = 138.04
b = (Cp1 - Cp2)/(T1 - T2)
a = Cp1 - b * T1

#Cp = 62.781 + 0.233*T
# Hvb / Tb = 36.63 + 8.31lnTb
Tb = 273.15 + 80.1              #K

Hvb = (36.63 + 8.31*math.log(Tb)) * Tb
m = 100.                        #kg

def f7(T):
return 62.781 + 0.233*T

k = quad(f7,T1,Tb)

H = m*(10.**3) * ( k)/78.048 + m*(10.**3) * Hvb/78.048

# Result
print "Heat required = %.3e J" %H

Heat required = 4.928e+07 J


## Example 11.23 pageno : 430¶

In :
# variables
P = 10.                 #kPa
T1 = 323.15             #K
T2 = 373.15             #K
T = 358.15              #K
H1 = 2592.6             #kJ/kg
H2 = 2687.5             #kJ/kg

# Calculation
#H by interpolation,
H = H1 + ((H2 - H1)/(T2 - T1))*(T - T1)
Hl = 697.061            #kJ/kg
Hg = 2762.              #kJ/kg

#H = x*Hl + ( 1 - x )* Hg
x = (H - Hg)/(Hl - Hg)
Pmois = x*100
Psteam = ( 1 - x )*100

# Result
print "Percentage of moisture = %.f"%Pmois,"%"
print "Percentage of dry saturated steam = %.f"%Psteam,"%"

Percentage of moisture = 5 %
Percentage of dry saturated steam = 95 %


## Example 11.24 pageno : 430¶

In :
# variables
P = 3500.                   #kPa
T = 673.15                  #K
SV = 0.08453                #m**3/kg
Vcondensed = 1/2.
m = 100.                    #kg

# Calculation
V = m * SV / (m/2)
#m*(Vl+Vg)*Vcondensed = m * SV
#But Vl is negligible,
Vg = m * SV / (m * Vcondensed)
#using steam table
T1 = 459.5                  #K
P1 = 1158.                  #kPa

#internal energy of superheated steam from steam table
I = 2928.4                  #kJ/kg
U1 = m * I
Ul = 790.                   #kJ/kg
Ug = 2585.9                 #kJ/kg
U2 = m*Vcondensed*Ul + m*(1-Vcondensed)*Ug
Q = U2 - U1

# Result
print "The amount of heat removed fromt he system = ",Q,"kJ"

The amount of heat removed fromt he system =  -124045.0 kJ


## Example 11.25 pageno : 433¶

In :
# variables
m = 1000.                       #kg/h ( basis  mass of 10% NaOH solution )
Pfeed = 10.                     #%
Ppro = 50.                      #(Percentage NaOH in product)

# Calculation
#Taking NaOH balance,P being the weight of the product
P = Pfeed * m / Ppro

#W be the weight of water evaporized
W = m - P

#step1 - cooling 1000kg/h of 10% solution from 305K to 298K
T1 = 305.                       #K
T2 = 298.                       #K
Cliq = 3.67                     #kJ/kgK
H1 = m*Cliq * (T2 - T1)

#step2 - separation into pure components
Hsolution = -42.85              #kJ/mol
H2 = -Pfeed * m *1000 *Hsolution/ (40*100)

#step3 - W kg water is converted to water vapour
Hvap = 2442.5                   #kJ/kg
H3 = W * Hvap

#step4 - water vapour at 298K is heated to 373.15K
Cvap = 1.884                    #kJ/kgK
T3 = 373.15                     #K
H4 = W * Cvap * ( T3 - T2 )

#step5 - formation of 200kg of 50% NaOH solution at 298K
Hsolu = -25.89                  #kJ/mol
H5 = Pfeed * m *1000 *Hsolu/ (40*100)

#step6 - Heating the solution from 298K to 380K
Csolu = 3.34                    #kJ/kg
T4 = 380.                       #K
H6 = P * Csolu * (T4 - T2)
Htotal = H1 + H2 + H3 + H4 + H5 + H6

# Result
print "The enthalpy change accompanying the complete process = %d"%Htotal,"kJ"

The enthalpy change accompanying the complete process = 2138752 kJ


## Example 11.26 page no : 435¶

In :
# variables
Nwater = 0.8                        #moles
Nethanol = 0.2                      #moles
T = 323.                            #K
Cwater = 4.18*10**3                 #J/kgK
Cethanol = 2.58*10**3               #J/kgK
Hmixing1 = -758.                    #J/mol ( at 298K )
Hmixing2 = -415.                    #J/mol ( at 323K )
T1 = 298.                           #K
T2 = 523.                           #K

# Calculation
#step1 - 0.8 mol of water is cooled from 323 K to 298K
H1 = Nwater * 18 * Cwater * ( T1 - T )/ 1000

#step2 - 0.2 mol ethanol cooled from 323K to 298K
H2 = Nethanol * 46 * Cethanol * ( T1 - T )/1000

#step3 - 0.8 mol water and 0.2 mol ethanol are mixed together,
H3 = Hmixing1

#step4 solution is heated to 323K, H4 = Cpm * (T - T1)
#Hmixing2 = H1 + H2 + H3 + H4
H4 = Hmixing2 - H1 - H2 - H3
Cpm = H4 / ( T - T1 )

# Result
print "The mean heat capacity of a 20 percent solution = %.2f"%Cpm,"J/molK"

The mean heat capacity of a 20 percent solution = 97.65 J/molK


## Example 11.27 page no : 437¶

In :
# variables
F = 1000.                       #kg/h
H1 = 116.3                      #kJ/kg ( enthalpy of feed solution - 10% NaOH, 305 K )
H2 = 560.57                     #kJ/kg ( enthalpy of thick liquor - 50% NaOH, 380 K )
Hsteam = 2676.                  #kJ/kg ( 1atm , 373.15K )

#by doing material balances,
P = 200.                        #kg/h
mvap = 800.                     #kg/h

# Calculation
#Enthalpy balance gives, F*H1 + Q = mvap*Hsteam + P*H2
Q = (mvap*Hsteam + P*H2)-F*H1

# Result
print "Heat to be supplied = ",Q,"kJ/h"

Heat to be supplied =  2136614.0 kJ/h


## Example 11.28 pageno : 439¶

In :
# variables
U2 = 0.35*10**3                 #kJ
U1 = 0.25*10**3                 #kJ
#since the tank is rigid the volume does not change during heating, Under constant volume, the change in the internal energy is equal to the heat supplied

# Calculation
Q = U2 - U1

# Result
print "Heat transferred to the air = ",Q,"kJ"

Heat transferred to the air =  100.0 kJ


## Example 11.29 pageno : 439¶

In :
# variables
W = -2.25*745.7             #W ( work done on the system and 1hp = 745.7W)
Q = -3400.                  #kJ/h ( Heat transferred to the surrounding )

# Calculation
U = Q*1000/3600 - W

# Result
print "Rise in the Internal energy of the system = %.3f"%U,"J/s"

Rise in the Internal energy of the system = 733.381 J/s


## Example 11.30 pageno : 440¶

In :
# variables
#2Fe + 3/2O2 = Fe2O3
Hliberated = 831.08                 #kJ

# Calculation
Q = -Hliberated*1000

# Result
print "Q = ",Q,"J"

#P(V) = (n)RT
#W = P(V) = (n)RT
n = -1.5
R = 8.314
T = 298.                            #K
W = (n) * R * T
print "W = %.1f"%W,"J"
U = Q - W
print "U = %.5e"%U,"J"

Q =  -831080.0 J
W = -3716.4 J
U = -8.27364e+05 J


## Example 11.31 pageno : 440¶

In :
# variables
Vgas = 0.09                     #m**3
Vliq = 0.01                     #m**3
SVliq = 1.061*10**-3            #m**3/kg
SVvap = 0.8857                  #m**3/kg

# Calculation
mvap = Vgas / SVvap
mliq = Vliq / SVliq
Ul = 504.5                      #kJ/kg
Ug = 2529.5                     #kJ/kg
U1 = Ul * mliq + Ug * mvap
SVtotal = (Vgas + Vliq)/(mvap + mliq)
#using steam table , these value of specific volume corresponds to
# pressure of 148.6bar and internal energy of 2464.6kJ/kg
U = 2464.                       #kJ/kg
Utotal = U * (mvap + mliq)
#Utotal - U1 = Q - W,but W = o, hence,
Q = Utotal - U1

# Result
print "Heat to be added = %.f"%Q,"kJ"

# note: answer may vary because of rounding error

Heat to be added = 18462 kJ


## Example 11.32 pageno : 443¶

In :
# variables
m = 10.                     #kg(air)
N = m / 29                  #kmol
P1 = 100.                   #kPa
T1 = 300.                   #K
R = 8.314

# Calculation
V1 = N * R * T1 / P1
V2 = V1
T2 = 600.                   #K
Cv = 20.785                 #kJ/kmolK
Cp = 29.099                 #kJ/kmolK
U = N * Cv * (T2 - T1)
Q = U
W = Q - U
H = U + N * R * ( T2 - T1 )

# Result
print "(a)Change in internal energy at constant volume = %d"%U,"kJ"
print "heat supplied at constant volume = %d"%Q,"kJ"
print "Work done at constant volume = ",W,"kJ"
print "Change in Enthalpy at constant volume = %d"%H,"kJ"
P2 = P1
H2 = N * Cp * ( T2 - T1 )
Q2 = H2
U2 = H2 - N * R * (T2 - T1)
W2 = Q2 - U2
print "(b)Change in internal energy at constant Pressure = %d"%U2,"kJ"
print "heat supplied at constant Pressure = %d"%Q2,"kJ"
print "Work done at constant Pressure = %d"%W2,"kJ"
print "Change in Enthalpy at constant Pressure = %d"%H2,"kJ"

(a)Change in internal energy at constant volume = 2150 kJ
heat supplied at constant volume = 2150 kJ
Work done at constant volume =  0.0 kJ
Change in Enthalpy at constant volume = 3010 kJ
(b)Change in internal energy at constant Pressure = 2150 kJ
heat supplied at constant Pressure = 3010 kJ
Work done at constant Pressure = 860 kJ
Change in Enthalpy at constant Pressure = 3010 kJ


## Example 11.33 pageno : 444¶

In :
# variables
Cp = 29.3                   #kJ/kmol
R = 8.314
Cv = Cp - R
T1 = 300.                   #K
P1 = 1.                     #bar
P2 = 2.                     #bar

# Calculation
#step1 - Volume remains constant, therefore the work done is
# zero and heat supplied is Cv, Also T2/T1 = P2/P1
T2 = P2 * T1 / P1
Q1 = Cv * ( T2 - T1 )
W1 = 0

# Result
print "Work done at constant volume = ",W1,"kJ"
print "Heat supplied at constant volume = ",Q1,"kJ"

#step2 - Process is abdiabatic
Q2 = 0
r = 1.4
T3 = T2 * (( P1 / P2 )**((r - 1)/r))
W2 = Cv * ( T2 - T3 )

print "Work done in adiabatic process = %.1f"%W2,"kJ"
print "Heat supplied in adiabatic process = ",Q2,"kJ"

#step3 - process is isobaric
Q3 = Cp * (T1 - T3)
U3 = Cv * (T1 - T3)
W3 = Q3 - U3
print "Work done at constant pressure = %.2f"%W3,"kJ"
print "Heat supplied at constant pressure = %.1f"%Q3,"kJ"

# Note : Answers in book is wrong. while calculating heat supplied i.e. Cv(T2-T1), value of Cv is been taken wrongly.

Work done at constant volume =  0 kJ
Heat supplied at constant volume =  6295.8 kJ
Work done in adiabatic process = 2262.3 kJ
Heat supplied in adiabatic process =  0 kJ
Work done at constant pressure = -1597.96 kJ
Heat supplied at constant pressure = -5631.5 kJ


## Example 11.34 pageno : 445¶

In :
import math

# Variables
P1 = 5.                         #bar
P2 = 4.                         #bar
T1 = 600.                       #K
V = 0.1                         #m**3
T2 = 400.                       #K
T = 298.                        #K
Cp = 30.                        #J/molK

#step1 - isothermal condition
U1 = 0
H1 = 0
P = 1.                          #bar
R = 8.314

# Calculation
W1 = R*T1*math.log(P1/P2)
Q1 = W1

# Result
print "(a)Change in the internal energy in isothermal condition = ",U1,"kJ/kmol"
print "Change in the enthalpy energy in isothermal condition = ",H1,"kJ/kmol"
print "Work done in isothermal condition = %.2f"%W1,"kJ/kmol"
print "Heat supplied in isothermal condition = %.2f"%Q1,"kJ/kmol"
N = round(P * (1.01325 * 10**5) * V / ( R * T ),2)                # answer slightly different because of rouding error.
Cv = Cp - R
U2 = Cv * (T2 - T)*N    #Answer differes due to slighlty different value of N
H2 = Cp * (T2 - T)*N    #Answer differes due to slighlty different value of N
W2 = 0
Q2 = U2 + W2
print
print "\n(b)Change in the internal energy at constant volume condition = %d"%U2,"J"
print "Change in the enthalpy energy at constant volume condition = %d"%H2,"kJ/kmol"
print "Work done at constant volume condition = ",W2,"kJ/kmol"
print "Heat supplied at constant volume condition = %d"%Q2,"kJ/kmol"

# note : answer varies because of rounding error.

(a)Change in the internal energy in isothermal condition =  0 kJ/kmol
Change in the enthalpy energy in isothermal condition =  0 kJ/kmol
Work done in isothermal condition = 1113.13 kJ/kmol
Heat supplied in isothermal condition = 1113.13 kJ/kmol

(b)Change in the internal energy at constant volume condition = 9046 J
Change in the enthalpy energy at constant volume condition = 12515 kJ/kmol
Work done at constant volume condition =  0 kJ/kmol
Heat supplied at constant volume condition = 9046 kJ/kmol


## Example 11.35 pageno : 448¶

In :
# variables
m = 1.                              #kg
u2 = 0.5                            #m/s
u1 = 60.                            #m/s
H = -3000.                          #kJ/kg

# Calculation
#KE = (u**2)/2
KE = ((u2 ** 2) - (u1**2))/2000
g = 9.81                            #m/s**2
Z1 = 7.5                            #m
Z2 = 2.                             #m

#PE = g * (Z)
PE = g * (Z2 - Z1)/1000
W = 800.                            #kJ/kg
Q = H + PE + KE + W

# Result
print "Heat removed from the fluid = %.2f"%Q,"kJ/kg"

Heat removed from the fluid = -2201.85 kJ/kg


## Example 11.37 pageno : 449¶

In :
# variables
g = 9.81                        #m/s**2
z = 55.
PE = g * z
KE = 0.
T2 = 288.                       #K
f = 1.5*10**-2                  #m**3/min
D = 1000.                       #kg/m**3
m = f * D
Qsupp = 500.                    #kJ/min
Qlost = 400.                    #kJ/min

# Calculation
Qnet = (Qsupp - Qlost) * D / m
W = 2*745.7                     #W
Ws = -W * 0.6 / (m/60)
H = Qnet - Ws - PE - KE
Cp = 4200.
T1 = H / Cp
T = T1 + T2

# Result
print "The temperature of exit water = %.2f"%T,"K"

The temperature of exit water = 290.31 K


## Example 11.38 pageno : 450¶

In :
# variables
m = 1000.                   #kg/h (dried product)

# S be the amount of dry solid in the product stream
Pmoisture1 = 4.             #%
Pmoisture2 = 0.2            #%
P = 1.
S = m *(1 - P/1000)

# Calculation
X1 = Pmoisture1/(100 - Pmoisture1)
X2 = Pmoisture2/(100 - Pmoisture2)

#let G be the weight of dry air in the air stream
Y1 = 0.01                   #kg water/kg dry solid
Cp = 1.507
Cw = 4.2
T1 = 298.                   #K
T = 273.                    #K
T2 = 333.                   #K
Tg1 = 363.                  #K
Tg2 = 305.                  #K

Hs1 = (Cp + X1 * Cw) * (T1 - T)
Hs2 = (Cp + X2 * Cw) * (T2 - T)
#Hg = Cs(Tg - To) + Y*L
#Cs = 1.005 + 1.884*Y
L = 2502.3                  #kJ/kg dry air
Hg1 = (1.005 + 1.884 * Y1)*(Tg1 - T) + Y1 * L
Q = -40000.                 #kJ/h

#Calculating for T2, Hg2 = 32.16 + 2562.59*Y
#change in enthalpy = Q
#H1 = S * Hs1 + G * HG1 = 37814.22 + 117.17G
#H2 = 100728.14 + G* (32.16 + 2561.59*Y)
#change in enthalpy = Q
#62913.92 + G *(-85.01 + 2561.59*Y) + 40000 = 0
#102913.92 + G *(-85.01 + 2561.59*Y) = 0            (1)
#moisture balance, S*X1 + G*Y1 = S*X2 + G*Y2
#G*(Y-0.01) = 39.62                                 (2)
#solving simultaneously ( 1 ) and ( 2 ),
Gdry = 3443.                #kg/h
G = Gdry*(1 + Y1)

# Result
print "Air requirement = ",G,"kg/h"

Air requirement =  3477.43 kg/h


## Example 11.39 pageno : 452¶

In :
# variables
m = 1000.                   #kg/h ( feed solution )

#F - mass of feed distilled, W - mass of the bottom product, D - mass of the distillate, xf, xd and xw - weight fraction of actone in feed, distillate and residue resp_
#total balance, F = D + W
#Acetone balance, F*xf = D*xd + w*xw
F = 1000
xf = 0.10
xd = 0.9
xw = 0.01

# Calculation
#substituting in above equations,
D = F * (xf - xw) / (xd - xw)
W = F - D
R = 8
L = R * D
#material balance around the condenser,G vapour reaching the condenser
G = L + D
Td = 332.                   #K
T2 = 300.                   #K
Tw = 370.                   #K
Tf = 340.                   #K
Lacetone1 = 620.            #kJ/kg
Lwater1 = 2500.             #kJ/kg
Ld = xd * Lacetone1 + (1 - xd) * Lwater1
Cpacetone = 2.2             #kJ/kgK
Cpwater = 4.2               #kJ/kgK
Cp = xd * Cpacetone + (1-xd)*Cpwater
H = Ld + Cp * ( Td - T2 )
Cpc = 4.2                   #kJ/kg
Tc = 30.                    #K ( change in temperature allowable for cooling water )
m = G * H / ( Cpc * Tc )

# Result
print "(a)The circulation rate of cooling water = %2f"%m,"kg/h"
Qc = G * H
Hd = 0.
Hw = (xw * Cpacetone + (1-xw)*Cpwater)*(Tw - T2)
Hf = (xf * Cpacetone + (1-xf)*Cpwater)*(Tf - T2)
Qb = D * Hd + W * Hw + Qc - F * Hf
Hcondensation = 2730.       #kJ/kg
msteam = Qb/Hcondensation
print "(b)Amount of steam supplied = %.2f"%msteam,"kg/h"

(a)The circulation rate of cooling water = 6391.011236 kg/h
(b)Amount of steam supplied = 332.70 kg/h