Chapter 6: Multiphase Systems

Example 6.1-1, page no. 244

In [1]:
#Initialization of variables
import math
import numpy
from numpy import linalg
import scipy
from scipy import integrate

T2=15.4+273.2  #K
T1=7.6+273.2  #K
P1=40.0 #mm of Hg
P2=60.0 #mm of Hg
T=42.2+273.2 #K
R=8.314 #J/mol.k

#Calculations and printing :

print(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")
print("let deltaHv/R = S")
S= - (T1*T2* math.log(P2/P1))/(T1-T2)
deltahv=S*R
print '%s %d' %(" \n Latent Heat of Vaporization (J/mol) =",deltahv)
B=math.log(P1) + S/T1
print '%s %.3f' %("\n B=",B)
P=math.exp(-S/T + B)
print '%s %.3f %s %.3f' %("\n P* at",T," K is (mm Hg)= ",P)
raw_input('press enter key to exit')
 All the values in the textbook are Approximated hence the values in this code differ from those of Textbook
let deltaHv/R = S
 
 Latent Heat of Vaporization (J/mol) = 35023

 B= 18.691

 P* at 315.400  K is (mm Hg)=  207.400
press enter key to exit
Out[1]:
''

Example 6.3-1, page no. 250

In [ ]:
#Initialization of variables
import math
import numpy
from numpy import linalg
import scipy
from scipy import integrate

P=760.0 #mm of Hg
Pstar=289.0 #mm of Hg

#Calculations and printing :

print(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")
y=Pstar/P
print '%s %.3f %s %.3f' %(" \n Molar composition of Water is",y," and Air is",1-y)
raw_input('press enter key to exit')
 All the values in the textbook are Approximated hence the values in this code differ from those of Textbook
 
 Molar composition of Water is 0.380  and Air is 0.620

Example 6.3-2, page no. 251

In [1]:
#Initialization of variables
import math
import numpy
from numpy import linalg
import scipy
from scipy import integrate

T=100.0+273.2 #K
PT=5260.0 #mm of Hg
y=0.1 #by volume
basis= 100 #mol of feed gas

#Calculations and printing :

print(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")
P=y*PT
if(P<760):
    print("The Vapour is Super heated")
elif(P==760): 
    print("The vapour is At Dew point")
else:
    print("The vapour is not Super heated")

print("From tables Tdp=90 C")
print("Superheat = 100-90=10 C ")
print("Using Raoult law at the outlet")
y1=355/PT
print '%s %.3f' %("y1=",y1)
print("Balance on Dry Air")
n2=basis*(1-y)/(1-y1)
print '%s %.3f' %("n2 (mol) = ",n2)
print("Total mole balance")
n1=basis-n2
print '%s %.3f' %("n1 (mol) = ",n1)
print '%s %.3f' %(" \n Percentage condesation=",n1*100/(y*basis))
Psaturation=760/y
print '%s %.3f %s' %("\n Any increase in pressure above", Psaturation," mm of Hg must cause condensation ")
print(" \n For the next part of the problem use the same code by modifying PT to be 8500 mm of Hg")
raw_input('press enter key to exit')
 All the values in the textbook are Approximated hence the values in this code differ from those of Textbook
The Vapour is Super heated
From tables Tdp=90 C
Superheat = 100-90=10 C 
Using Raoult law at the outlet
y1= 0.067
Balance on Dry Air
n2 (mol) =  96.514
Total mole balance
n1 (mol) =  3.486
 
 Percentage condesation= 34.862

 Any increase in pressure above 7600.000  mm of Hg must cause condensation 
 
 For the next part of the problem use the same code by modifying PT to be 8500 mm of Hg
press enter key to exit
Out[1]:
''

Example 6.3-3, page no. 254

In [2]:
#Initialization of variables
import math
import numpy
from numpy import linalg
import scipy
from scipy import integrate

T=75.0 +273 #K
P75=289.0 #mm of Hg
hr=0.3
Porig=825.0 #mm of Hg
PorigBar=1.1 #bar
Vdot=1000.0 #M^3/h
R=0.0831

#Calculations and printing :

print (" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")
P=hr*P75
y=P/Porig
ndot=PorigBar*Vdot/(R*T)
ndotWater=ndot*y
print '%s %.3f' %(" \n Molar flowrate of Water (Kmol/h) = ",ndotWater)
ndotBDA=ndot*(1-y)
print '%s %.3f' %(" \n Molar flowrate of Dry Air (Kmol/h) = ",ndotBDA)
ndotO2=ndotBDA*0.21
print '%s %.3f' %(" \n Molar flowrate of Oxygen (Kmol/h) = ",ndotO2)
hm=P/(Porig-P)
ha=hm*18/29
hmdot=P75/(Porig-P75)
hp=100*hm/hmdot
print '%s %.3f' %(" \n Molal Humidity (mol water/mol BDA) = ",hm)
print '%s %.3f' %(" \n Absolute Humidity (kg water/kg BDA) = ",ha)
print '%s %.3f' %(" \n Percentage Humidity=",hp)
print("\n From table B.3, Tdp=48.7 C")
raw_input('press enter key to exit')
 All the values in the textbook are Approximated hence the values in this code differ from those of Textbook
 
 Molar flowrate of Water (Kmol/h) =  3.997
 
 Molar flowrate of Dry Air (Kmol/h) =  34.040
 
 Molar flowrate of Oxygen (Kmol/h) =  7.148
 
 Molal Humidity (mol water/mol BDA) =  0.117
 
 Absolute Humidity (kg water/kg BDA) =  0.073
 
 Percentage Humidity= 21.780

 From table B.3, Tdp=48.7 C
press enter key to exit
Out[2]:
''

Example 6.4-1, page no. 255

In [3]:
 
#Initialization of variables
import math
import numpy
from numpy import linalg
import scipy
from scipy import integrate

basis=100.0 #lb-mole/h
x=0.45
PH2O=31.6 #mm of Hg
PSO2=176.0 #mm of Hg
P=760.0 #mm of Hg
y=2.0
M1=64.0 
M2=18.0

#Calculations and printing :

print(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")
yH2O=PH2O/P
ySO2=PSO2/P
yAir=1-yH2O-ySO2
print("Using Air balance, ")
nG2=(1-x)*basis/yAir
print '%s %.3f' %("nG2 (lbm/h) = ",nG2)
xSO2=y/102
xH2O=1-xSO2
print("Using SO2 balance, ")
nL2=(basis*x-nG2*ySO2)*M1/(xSO2)
print '%s %.3f' %("nL2 (lbm/h) = ",nL2)
print("Using H2O balance, ")
nL1=nG2*yH2O*M2 + nL2*xH2O
print '%s %.3f' %("nL1 (lbm H2O/h) = ",nL1)
SO2Absorbed=nL2*xSO2
SO2Fed=basis*x*M1
Fraction=SO2Absorbed/SO2Fed
print '%s %.3f' %(" \n Fraction SO2 absorbed (lbm SO2 absorbed/lbm SO2 fed) = ",Fraction)
raw_input('press enter key to exit')
 All the values in the textbook are Approximated hence the values in this code differ from those of Textbook
Using Air balance, 
nG2 (lbm/h) =  75.670
Using SO2 balance, 
nL2 (lbm/h) =  89683.186
Using H2O balance, 
nL1 (lbm H2O/h) =  87981.325
 
 Fraction SO2 absorbed (lbm SO2 absorbed/lbm SO2 fed) =  0.611
press enter key to exit
Out[3]:
''

Example 6.4-2, page no. 258

In [4]:
#Initialization of variables
import math
import numpy
from numpy import linalg
import scipy
from scipy import integrate

basis=100.0 #lb-mole/h
x=0.45
PH2O=31.6 #mm of Hg
PSO2=176.0 #mm of Hg
P=760.0 #mm of Hg
y=2.0
M1=64.0 
M2=18.0

#Calculations and printing :

print(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")
yH2O=PH2O/P
ySO2=PSO2/P
yAir=1-yH2O-ySO2
print("Using Air balance, ")
nG2=(1-x)*basis/yAir
print '%s %.3f' %("nG2 (lbm/h) = ",nG2)
xSO2=y/102
xH2O=1-xSO2
print("Using SO2 balance, ")
nL2=(basis*x-nG2*ySO2)*M1/(xSO2)
print '%s %.3f' %("nL2 (lbm/h) = ",nL2)
print("Using H2O balance, ")
nL1=nG2*yH2O*M2 + nL2*xH2O
print '%s %.3f' %("nL1 (lbm H2O/h) = ",nL1)
SO2Absorbed=nL2*xSO2
SO2Fed=basis*x*M1
Fraction=SO2Absorbed/SO2Fed
print '%s %.3f' %(" \n Fraction SO2 absorbed (lbm SO2 absorbed/lbm SO2 fed) = ",Fraction)
raw_input('press enter key to exit')
 All the values in the textbook are Approximated hence the values in this code differ from those of Textbook
Using Air balance, 
nG2 (lbm/h) =  75.670
Using SO2 balance, 
nL2 (lbm/h) =  89683.186
Using H2O balance, 
nL1 (lbm H2O/h) =  87981.325
 
 Fraction SO2 absorbed (lbm SO2 absorbed/lbm SO2 fed) =  0.611
press enter key to exit
Out[4]:
''

Example 6.5-1, page no. 264

In [5]:
#Initialization of variables
import math
import numpy
from numpy import linalg
import scipy
from scipy import integrate

basis=150.0 #kg feed
S100=0.905 #g AgNO3/g
S20=0.689 #g AgNO3/g
inputx=0.095 #kg water/kg
outputx=0.311 #kg water/kg

#Calculations and printing :

print(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")
print("\n Composition of Filter cake,")
print("\n m2=4m3")
print("\n Water balance around the crystallizer,")
print '%s' %("\n basis*inputx* kg H2O = outputx m1 + outputx m1 \n")
print("Mass balance around crystallizer, \n")
print '%d %s' %(basis,"=m1+m2+m3")
A=([[0, 1, -4],[outputx, 0, outputx],[1, 1, 1]])
b=([[0],[basis*inputx],[basis]])
C=numpy.dot(linalg.inv(A),b)
#Here we solved two linear equations simultaneously
m1=C[0,0]
print '%s %.2f' %(" \n m1 (Kg) = ",m1)
m2=C[1,0]
print '%s %d' %(" \n m2 (Kg) = ",m2)
m3=C[2,0]
print '%s %d' %(" \n m3 (Kg) = ",m3)
print("\n Overall AgNO3 balance,")
m5=(1-inputx)*basis - (1-outputx)*m1
print '%s %d' %("\n m5 (kg AgNO3 crystals recovered) = ",m5)
percentage=m5*100/(basis*(1-inputx))
print '%s %.3f' %(" \n Percentage recovery=",percentage)
print("\n Overall mass balance")
m4=basis-m1-m5
print '%s %d' %("\n m4 (Kg water removed in the Dryer) = ",m4)
raw_input('press enter key to exit')
 All the values in the textbook are Approximated hence the values in this code differ from those of Textbook

 Composition of Filter cake,

 m2=4m3

 Water balance around the crystallizer,

 basis*inputx* kg H2O = outputx m1 + outputx m1 

Mass balance around crystallizer, 

150 =m1+m2+m3
 
 m1 (Kg) =  19.77
 
 m2 (Kg) =  104
 
 m3 (Kg) =  26

 Overall AgNO3 balance,

 m5 (kg AgNO3 crystals recovered) =  122
 
 Percentage recovery= 89.963

 Overall mass balance

 m4 (Kg water removed in the Dryer) =  8
press enter key to exit
Out[5]:
''

Example 6.5-2, page no. 266

In [6]:
#Initialization of variables
import math
import numpy
from numpy import linalg
import scipy
from scipy import integrate

inputx=0.6
basis=100.0 #kg Feed
S=63.0 #Kg KNO3/100 Kg H2O

#Calculations and printing :

print(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")
outputx=S/(S+100)
print '%s %.3f' %("x (Kg KNO3/Kg) = ",outputx)
print("Water balance")
m1=basis*(1-inputx)/(1-outputx)
print '%s %.3f' %(" \n m1 (Kg) = ",m1)
print("Mass balance")
m2=basis-m1
print '%s %.3f' %(" \n m2 (kg) = ",m2)
percentage=m2*100/(basis*inputx)
print '%s %.3f' %(" \n Percentage of KNO3 in the feed that crystallizes is ",percentage)
raw_input('press enter key to exit')
 All the values in the textbook are Approximated hence the values in this code differ from those of Textbook
x (Kg KNO3/Kg) =  0.387
Water balance
 
 m1 (Kg) =  65.200
Mass balance
 
 m2 (kg) =  34.800
 
 Percentage of KNO3 in the feed that crystallizes is  58.000
press enter key to exit
Out[6]:
''

Example 6.5-3, page no. 267

In [7]:
#Initialization of variables
import math
import numpy
from numpy import linalg
import scipy
from scipy import integrate

basis=1.0 #Tonne Epsom salt produced/h
inputx=0.301 #Tonne MgSO4/tonne
outputx=0.232 #Tonne MgSO4/tonne
M=120.4
M1=246.4

#Calculations and printing :

print(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")
print("Total mass balance")
print("m1=1+m2")
print("MgSO4 balance")
print(" \n inputx m1 = bassis* M/ M1 + m2 outputx")
A=([[1, -1],[inputx, -outputx]])
b=([[1],[basis*M/M1]])
C=numpy.dot(linalg.inv(A),b)
#Here we solved two linear equations simultaneously
m1=C[0,0]
m2=C[1,0]
print '%s %.3f' %(" \n m1 (Tonne/h) = ",m1)
print '%s %.3f' %(" \n m2 (Tonne/h) = ",m2)
raw_input('press enter key to exit')
 All the values in the textbook are Approximated hence the values in this code differ from those of Textbook
Total mass balance
m1=1+m2
MgSO4 balance
 
 inputx m1 = bassis* M/ M1 + m2 outputx
 
 m1 (Tonne/h) =  3.719
 
 m2 (Tonne/h) =  2.719
press enter key to exit
Out[7]:
''

Example 6.5-4, page no. 270

In [8]:
#Initialization of variables
import math
import numpy
from numpy import linalg
import scipy
from scipy import integrate

m1=5.0 #g of solute
m2=100.0 #g of Water
P=1.0 #atm
Tf=100.421 #C
Ti=25.0 #C
R=8.314 #J/mol.K

#Calculations and printing :

print(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")
x=(Tf-100.)*40656./(R*373.16*373.16)
y=m2/18.016
Ms=m1*(1-x)/(y*x)
print '%s %.3f' %(" \n Ms (g/mol) =",Ms)
deltaTm=R*273.16*273.16*x/6009.5
Tms=0-deltaTm
print '%s %.3f' %(" \n Tms (C)=",Tms)
Pstar=(1-x)*23.756
print '%s %.3f' %(" \n Solvent Vapour pressure (mm Hg) = ",Pstar)
raw_input('press enter key to exit')
 All the values in the textbook are Approximated hence the values in this code differ from those of Textbook
 
 Ms (g/mol) = 60.028
 
 Tms (C)= -1.526
 
 Solvent Vapour pressure (mm Hg) =  23.405
press enter key to exit
Out[8]:
''

Example 6.6-1, page no. 272

In [9]:
#Initialization of variables
import math
import numpy
from numpy import linalg
import scipy
from scipy import integrate

V1=200.0 #CC Acetone
x=0.1 #Wt acetone 
V2=400.0 #CC chloroform
DA=0.792 #g/cc
DC=1.489 #g/cc
DW=1.0 #g/cc

#Calculations and printing :

print(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")
Dbar=DA*DW/(x*DW + (1-x)*DA)
mass1=V1*Dbar
mass2=V2*DC
print("C balance")
m4=mass2
print '%s %.3f' %(" \n m4=",m4)
print("W balance")
m2=(1-x)*mass1
print '%s %.3f' %(" \n m2=",m2)
print("A balance")
print("m1+m3=x * mass1")
print("Distribution Cooefficient ,K=m3*(m1+m2)/m1*(m3+m4)")
print("On solving, ")
m1=2.7
m3=16.8
percentage=m3*100/(x*mass1)
print '%s %.3f' %(" \n m1=",m1)
print '%s %.3f' %(" \n m3=",m3)
print '%s %.3f' %(" \n percentage of acetone transferred to chloroform=",percentage)
raw_input('press enter key to exit')
 All the values in the textbook are Approximated hence the values in this code differ from those of Textbook
C balance
 
 m4= 595.600
W balance
 
 m2= 175.394
A balance
m1+m3=x * mass1
Distribution Cooefficient ,K=m3*(m1+m2)/m1*(m3+m4)
On solving, 
 
 m1= 2.700
 
 m3= 16.800
 
 percentage of acetone transferred to chloroform= 86.206
press enter key to exit
Out[9]:
''

Example 6.6-2, page no. 274

In [10]:
#Initialization of variables
import math
import numpy
from numpy import linalg
import scipy
from scipy import integrate

basis=1000.0 #Kg of solution
inputxA=0.3 #Wt. fraction of acetone
outputxA1=0.05
outputxM1=0.02
outputxA2=0.1
outputxM2=0.87

#Calculations and printing :

print(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")
print("Mass balance")
print("ms + basis = mE + mR")
print("acetone balance")
print("inputxA *basis = outputxA2 *mE + outputxA1* mR")
print("Water balance")
print(" \n 1-inputxA *basis = 1-outputxA2-outputxM2 *mE + 1-outputxA1-outputxM1* mR")
A=([[1, 1, -1],[outputxA2, outputxA1, 0],[1-outputxA2-outputxM2, 1-outputxA1-outputxM1, 0]])
b=([[basis],[inputxA*basis],[(1-inputxA)*basis]])
C=numpy.dot(linalg.inv(A),b)
#Here We solved three linear equations simultaneously
mE=C[0,0]
mR=C[1,0]
mS=C[2,0]
print '%s %.3f' %(" \n mE (Kg) = ",mE)
print '%s %.3f' %(" \n mR (Kg) = ",mR)
print '%s %.3f' %(" \n mS (Kg MIBK) = ",mS)
raw_input('press enter key to exit')
 All the values in the textbook are Approximated hence the values in this code differ from those of Textbook
Mass balance
ms + basis = mE + mR
acetone balance
inputxA *basis = outputxA2 *mE + outputxA1* mR
Water balance
 
 1-inputxA *basis = 1-outputxA2-outputxM2 *mE + 1-outputxA1-outputxM1* mR
 
 mE (Kg) =  2666.667
 
 mR (Kg) =  666.667
 
 mS (Kg MIBK) =  2333.333
press enter key to exit
Out[10]:
''

Example 6.7-1, page no. 276

In [11]:
#Initialization of variables
import math
import numpy
from numpy import linalg
import scipy
from scipy import integrate

V=50.0 #L
P=1.0 #atm
T=34.0+273.2 #K
y=0.3
xF=0.001
R=0.08206
Pstar=169.0 #mm of Hg
Pmm=760.0 #mm of Hg

#Calculations and printing :

print(" All the values in the textbook are Approximated hence the values in this code differ from those of Textbook")
n=P*V/(R*T)
print '%s %.3f' %(" \n No.of moles (mol) = ",n)
y0=y*Pstar/Pmm
print '%s %.3f' %(" \n Y0= (mol CCl4/mol) = ",y0)
Pfinal=xF*Pmm
b=0.096*Pfinal
Xstar=0.794*b/(1+b)
print '%s %.3f' %(" \n Mass of CCl4 adsorbed to Carbon at equilibrium (g CCl4 ads/g C) = ",Xstar)
Mads=(y0*n- xF*n)*154
print '%s %.3f' %(" \n Mass of CCl4 adsorbed (g) = ",Mads)
Mc=Mads/Xstar
print '%s %.3f' %(" \n Mass of carbon Required (g) = ",Mc)
raw_input('press enter key to exit')
 All the values in the textbook are Approximated hence the values in this code differ from those of Textbook
 
 No.of moles (mol) =  1.983
 
 Y0= (mol CCl4/mol) =  0.067
 
 Mass of CCl4 adsorbed to Carbon at equilibrium (g CCl4 ads/g C) =  0.054
 
 Mass of CCl4 adsorbed (g) =  20.071
 
 Mass of carbon Required (g) =  371.750
press enter key to exit
Out[11]:
''