# Illustration 7.1
# Page: 222
print'Illustration 7.1 - Page: 222\n\n'
# Solution
import math
from scipy.optimize import fsolve
# ****Data****#
Temp1 = 273+26.1;# [K]
P1 = 100;# [mm Hg]
Temp2 = 273+60.6;# [K]
P2 = 400;# [mm Hg]
P = 200;# [mm Hg]
#*****#
def f12(T):
return ((1/Temp1)-(1/T))/((1/Temp1)-(1/Temp2))-((math.log(P1)-math.log(P))/(math.log(P1)-math.log(P2)))
T = fsolve(f12,37);# [K]
print"At",round(T-273,1)," degree C, the vapour pressure of benzene is 200 mm Hg\n"
# Illustration 7.2:
# Page: 223
print'Illustration 7.2 - Page: 223\n\n'
#part(a) and part(b) are table based and doesn't require an calculation
print'Illustration 7.2 (c)\n\n'
# Solution (c)
# Reference: H20
# At 25 OC
m = 0.775;
Mr = 18.02;# [kg/kmol]
lambdar = 2443000;# [N/m.kg]
M = 78.05;# [kg/kmol]
# From Eqn. 7.6:
Lambda = m*lambdar*Mr/M;# [N/m.kg]
print"Latent Heat of Vaporization at 25 degree C is",round(Lambda/1000,2)," kN/m.kg\n"
# the answer is slightly different in textbook due to approximation
# Illustration 7.3
# Page: 226
print'Illustration 7.3 - Page: 226\n\n'
# solution
# ****Data****#
m = 10;# [kg]
Cvap = 1.256;# [kJ/kg.K]
Cliq = 1.507;# [kJ/kg.K]
Temp1 = 100;# [OC]
Temp4 = 10;# [OC]
#******#
# Using Fig 7.2 (Pg 224):
Temp2 = 25;# [OC]
# Using the notation of Fig. 7.3:
H1_diff_H2 = Cvap*(Temp1-Temp2);# [kJ/kg]
# From Illustration 7.2:
H2_diff_H3 = 434;# [Latent Heat of Vaporisation, kJ/kg]
H3_diff_H4 = Cliq*(Temp2-Temp4);# [kJ/kg]
H1_diff_H4 = H1_diff_H2+H2_diff_H3+H3_diff_H4;# [kJ/kg]
H = m*H1_diff_H4;# [kJ]
print"Heat evolved for 10 kg Benzene is ",int(H)," kJ\n"
# Illustration 7.4
# Page: 227
print'Illustration 7.4 - Page: 227\n\n'
# solution
#****Data****#
# A = benzene vapour; B = Nitrogen Gas
P = 800.0;# [mm Hg]
Temp = 273.0+60;# [K]
pA = 100.0;# [mm Hg]
#******#
pB = P-pA;# [mm Hg]
MA = 78.05;# [kg/kmol]
MB = 28.08;# [kg/kmol]
# Mole Fraction
print"On the Basis of Mole Fraction\n"
yAm = pA/P;
yBm = pB/P;
print"Mole Fraction of Benzene is ",yAm
print"\nMole Fraction of Nitrogen is ",yBm
print"\n"
# Volume Fraction
print"On the Basis of Volume Fraction\n"
# Volume fraction is same as mole Fraction
yAv = yAm;
yBv = yBm;
print"Volume Fraction of Benzene is ",yAv
print"\n Volume Fraction of Nitrogen is ",yBv
print"\n"
# Absolute Humidity
print"On the basis of Absolute humidity\n"
Y = pA/pB;# [mol benzene/mol nitrogen]
Y_prime = Y*(MA/MB);# [kg benzene/kg nitrogen]
print"The concentration of benzene is ",round(Y_prime,3)," kg benzene/kg nitrogen\n"
# Illustration 7.5
# Page: 228
print'Illustration 7.5 - Page: 228\n\n'
print'Illustration 7.5 (a)\n\n'
# solution(a)
#****Data****#
# A = benzene vapour; B = Nitrogen Gas
P = 1.0;# [atm]
#*****#
MA = 78.05;# [kg/kmol]
MB = 28.02;# [kg/kmol]
# Since gas is saturated, from Fig. 7.2 (Pg 224):
pA = 275.0/760;# [atm]
Y = pA/(P-pA);# [kmol benzene/kmol nitrogen]
Y_prime = Y*(MA/MB);# [kg benzene/kg nitrogen]
print"The concentration of benzene is ",round(Y_prime,3)," kg benzene/kg nitrogen\n\n"
print'Illustration 7.5 (b)\n\n'
# solution(b)
# A = benzene vapour; B = CO2
MA = 78.05;# [kg/kmol]
MB = 44.01;# [kg/kmol]
# Since gas is saturated, from Fig. 7.2:
pA = 275.0/760;# [atm]
Y = pA/(P-pA);# [kmol benzene/kmol CO2]
Y_prime = Y*(MA/MB);# [kg benzene/kg CO2]
print"The concentration of benzene is",round(Y_prime,3)," kg benzene/kg CO2\n"
# Illustration 7.6
# Page: 234
print'Illustration 7.6 - Page: 234\n\n'
# solution
#****Data****#
# A = water vapour; B = air
TempG = 55;# [OC]
P = 1.0133*10**(5);# [N/square m]
Y_prime = 0.030;# [kg water/kg dry air]
#******#
MA = 18.02;# [kg/kmol]
MB = 28.97;# [kg/kmol]
# Percent Humidity
# From psychrometric chart, at 55 OC
Ys_prime = 0.115;# [kg water/kg dry air]
percent_Humidity = (Y_prime/Ys_prime)*100;
print"The sample has percent Humidity =",round(percent_Humidity,1),"%"
# Molal Absolute Humidity
Y = Y_prime*(MB/MA);# [kmol water/kmol dry air]
print"\n Molal Absolute Humidity of the sample is",round(Y,4)," kmol water/kmol dry air\n"
# Partial Pressure
pA = Y*P/(1+Y);# [N/square m]
print"The Partial Pressure Of Water is",int(pA)," N/square m\n"
# Relative Humidity
pa = 118*133.3;# [vapour pressure of water at 55 OC,N/square m]
relative_Humidity = (pA/pa)*100;
print"The sample has relative Humidity = ",round(relative_Humidity,1)," %\n"
# Dew Point
# From psychrometric chart,
dew_point = 31.5;# [OC]
print"Dew point Of the Sample is",dew_point," degree C\n"
# Humid Volume
# At 55 OC
vB = 0.93;# [specific volume of dry air,cubic m/kg]
vsB = 1.10;# [specific volume of saturated air,cubic m/kg]
vH = vB+((vsB-vB)*(percent_Humidity/100));# [cubic m/kg]
print"The Humid Volume of the Sample is ",round(vH,3)," cubic m/kg\n"
# Humid Heat
CB = 1005;# [J/kg.K]
CA = 1884;# [J/kg.K]
Cs = CB+(Y_prime*CA);# [J/kg]
print"The Humid Heat is ",round(Cs,1)," J/kg dry air.K\n"
# Enthalpy
HA = 56000;# [J/kg dry air]
HsA = 352000;# [J/kg dry air]
H_prime = HA+((HsA-HA)*(percent_Humidity/100));# [J/kg dry air]
print"The Enthalphy of the sample is ",round(H_prime/1000,1),"KJ/kg dry air\n"
# the answer is slightly different in textbook due to approximation
# Illustration 7.7
# Page: 236
print'Illustration 7.7 - Page: 236\n\n'
# solution
#****Data****#
# A = water vapour; B = air
V = 100;# [m**3]
Tempi = 55;# [OC]
Tempf = 110;# [OC]
#*****#
# From Illustration 7.6
vH = 0.974;# [m**3/kg]
Cs = 1061.5;# [J/kg]
WB = V/vH;# [kg]
Q = WB*Cs*(Tempf-Tempi);# [J]
print"Heat required is ",round(Q,3)," J\n"
# the answer is slightly different in textbook due to approximation in book
# Illustration 7.9
# Page:240
from scipy.optimize import fsolve
print'Illustration 7.9 - Page:240\n\n'
# solution
#****Data****#
Tempw = 35;# [OC]
Tempg = 65;# [OC]
#******#
# From psychrometric chart
lambda_w = 2419300;# [J/kg]
Y_prime_w = 0.0365;# [kg H2O/kg dry air]
# From fig 7.5(a)
hG_by_kY = 950;# [J/kg]
# From Eqn. 7.26
def f13(Y_prime):
return (Tempg-Tempw)-((lambda_w*(Y_prime_w-Y_prime))/hG_by_kY)
Y_prime = fsolve(f13,2);# [kg H2O/kg dry air]
print"Humidity of air is",round(Y_prime[0],4),"kg H2O/kg dry air\n"
# Illustration 7.10
# Page:241
print'Illustration 7.10 - Page:241\n\n'
# solution
#****Data****#
Tg = 60;# [OC]
Y_prime = 0.050;# [kg toulene/kg air]
#*****#
# Wet Bulb temparature
Dab = 0.92*10**(-5);# [square m/s]
density_air = 1.060;# [kg/cubic cm];
viscocity_G = 1.95*10**(-5);# [kg/m.s]
Sc = viscocity_G/(density_air*Dab);
# From Eqn. 7.28
hG_by_kY = 1223*(Sc**0.567);# [J/kg.K]
# Soln. of Eqn. 7.26 by trial & error method:
# (Tg-Tw) = (Yas_prime-Y_prime)*(lambda_w/hG_by_kY)
Tw = 31.8;# [OC]
print"Wet Bulb Temparature:",Tw," degree C\n"
# Adiabatic Saturation Temparature
C_air = 1005;# [J/kg.K]
C_toulene = 1256;# [J/kg.K]
Cs = C_air+(C_toulene*Y_prime);# [J/kg.K]
# Soln. of Eqn. 7.21 by trial & error method:
# (Tg-Tas) = (Yas_prime-Y_prime)*(lambda_as/Cs)
Tas = 25.7;# [OC]
print"Adiabatic Saturation Temparature: ",round(Tas,1)," degree C\n"
# Illustration 7.11
# Page: 249
print'Illustration 7.11 - Page: 249\n\n'
# solution
#****Data****#
L_min = 2.27;# [kg/square m.s]
G_min = 2;# [kg/square m.s]
L2_prime = 15;# [kg/s]
Q = 270.0;# [W]
Templ2 = 45.0;# [OC]
Tempg1 = 30.0;# [OC]
Tempw1 = 24.0;# [OC]
Kya = 0.90;# [kg/cubic m.s]
#*******#
H1_prime = 72;# [kJ/kg dry air]
Y1_prime = 0.0160;# [kg water/kg dry air]
Templ1 = 29;# [OC]
Cal = 4.187;# [kJ/kg]
# Tower cross section Area:
Al = L2_prime/L_min;# [square m]
Ag = Gs/G_min;# [square m]
A = min(Al,Ag);# [square m]
Area = 3.25;
# From Eqn. 7.54
def f16(Z):
return Area-(Kya*Z/G_min)
Z = fsolve(f16,2);
print"The height of tower is",round(Z,2)," m\n"
NtoG = 3.25;
HtoG = G_min/Kya;# [m]
# Make up water
# Assuming the outlet air is essentially saturated:
Y2_prime = 0.0475;# [kg water/kg dry air]
E = G_min*(A)*(Y2_prime-Y1_prime);# [kg/s]
# Windage loss estimated as 0.2 percent
W = 0.002*L2_prime;# [kg/s]
ppm_blowdown = 2000;# [ppm]
ppm_makeup = 500;# [ppm]
# Since the weight fraction are proportional to the corresponding ppm values:
B = (E*ppm_makeup/(ppm_blowdown-ppm_makeup))-W;# [kg/s]
M = B+E+W;# [kg/s]
print"The makeup water requirement is estimated to be",round(M,2)," kg/s\n"
# Illustration 7.13
# Page: 254
print'Illustration 7.13\n\n'
# solution
import math
from scipy.optimize import fsolve
# Given
Tempg1=65;# [OC]
Y1_prime=0.0170;# [kg water/kg dry air]
# Using adiabatic satursion line on Fig. 7.5 (Pg 232)
Tempas=32;# [OC]
Yas_prime=0.0309;# [kg water/kg dry air]
Tempg2=45;# [OC]
Z=2;# [m]
#*******#
Y2_prime=0.0265;# [kg water/kg dry air]
def f19(Kya_by_Gs):
return math.log((Yas_prime-Y1_prime)/(Yas_prime-Y2_prime))-(Kya_by_Gs*Z)
Kya_by_Gs=fsolve(f19,1);# [1/m]
# For the extended chamber:
Z=4;# [m]
def f20(Y2_prime):
return math.log((Yas_prime-Y1_prime)/(Yas_prime-Y2_prime))-(Kya_by_Gs*Z)
Y2_prime=fsolve(f20,0.029);#[kg water/kg dry air]
# With the same adiabatic curve:
Tempg2=34;# [OC] from the curve
print"The Outlet Conditions are:\n"
print"Absolute Humidity is",round(Y2_prime,4)," kg water/kg dry air\n"
print"Dry Bulb Temperature is",round(Tempg2), "degree C\n"
# Illustration 7.14
# Page: 256
print'Illustration 7.14 - Page: 256\n\n'
# solution
import math
from scipy.optimize import fsolve
#****Data****#
# a = N2 b = CO
# Entering gas
Y1_prime = 0.0;# [kg water/kg dry air]
Pt = 1.0;# [atm]
Tempg1 = 315.0;# [OC]
G_prime = 5.0;# [square m/s]
# Temp of the tower:
Templ2 = 18.0;# [OC]
Density_L2 = 1000.0; #[kg/square m]
viscocity_L2 = 1.056*10**(-3);# [kg/m.s]
Tempg2 = 27.0;# [OC]
Mb = 28.0;# [kg/kmol]
Ma = 18.02;# [kg/kmol]
Density_G1 = (Mb/22.41)*(273/(Tempg1+273));# [kg/square m]
G1 = G_prime*(Density_G1);# [kg/s]
# Since the outlet gas is nearly saturated:
Y_prime = 0.024;# [kg water/kg dry air]
Y2_prime = 0.022;# [kg water/kg dry air, assumed]
G2 = G1*(1+Y2_prime);# [kg/s]
Mav = (1+Y2_prime)/((1/Mb)+(Y2_prime/Ma));# [kg/kmol]
Density_G2 = (Mav/22.4)*(273.0/(Templ2+273));# [kg/square m]
L2_by_G2 = 2.0;
abcissa = L2_by_G2*(Density_G2/(Density_L2-Density_G2))**(1/2);
# From Fig. 6.34:
# For a gas pressure drop of 400 N/square m/m
ordinate = 0.073;
# From Table 6.3:
Cf = 65.0;
J = 1.0;
def f21(G2_prime):
return ((G2_prime**2)*Cf*(viscocity_L2**0.1)*J/(Density_G2*(Density_L2-Density_G2)))-ordinate
# Tentative data:
G2_prime = fsolve(f21,2);# [kg/square m.s]
Area = G1/G2_prime;# [square m]
dia = math.sqrt(4*Area/math.pi);# [m]
# Final data:
dia = 1.50;# [m]
Area = math.pi*dia**2.0/4;# [square m]
Gs_prime = G1/Area;# [kg/square m.s]
G2_prime = G2/Area;# [kg/square m.s]
L2_prime = L2_by_G2*G2_prime;# [kg/square m.s]
# From Eqn. 7.29:
def f22(L1_prime):
return (L2_prime-L1_prime)-(Gs_prime*(Y2_prime-Y1_prime))
L1_prime = fsolve(f22,2);
Cb = 1089;# [J/kg.K]
Ca = 1884;# [J/kg.K]
Cs1 = Cb+(Y1_prime*Ca);# [J/(kg dry air).K]
Cs2 = Cb+(Y2_prime*Ca);# [J/(kg dry air).K]
Tempo = Templ2;# [base temp.,K]
Lambda = 2.46*10**6;# [J/kg]
CaL = 4187;# [J/kg K]
# From Eqn. 7.31:
def f23(Templ1):
return ((L2_prime*CaL*(Templ2-Tempo))+(Gs_prime*Cs1*(Tempg1-Tempo)))-((L1_prime*CaL*(Templ1-Tempo))+(Gs_prime*(Cs2*(Tempg2-Tempo))+(Y2_prime*Lambda)))
Templ1 = fsolve(f23,2);
# At Templ1 = 49.2 OC
viscocity_L = 0.557*10**(-3);# [kg/m.s]
Density_L = 989.0;# [kg/square m]
K = 0.64;# [w/m.K]
Prl = CaL*viscocity_L/K;
# For Entering Gas:
viscocity_G1 = 0.0288*10**(-3);# [kg*/m.s]
Dab = 0.8089*10**(-4);# [square m/s]
ScG = viscocity_G1/(Density_G1*Dab);
PrG = 0.74;
# From Illustration 6.7:
a = 53.1;# [square m/square m]
Fga = 0.0736;# [kmol/square m]
Hga = 4440.0;# [W/square m.K]
Hla = 350500.0;# [W/square m.K]
# At the bottom, by several trial:
Tempi = 50.3;# [OC]
pai = 93.9/760;# [atm]
paG = 0;# [atm]
# By Eqn. 7.64:
dY_prime_by_dZ = -(Ma*Fga/Gs_prime)*math.log((1-(pai/Pt))/(1-(paG/Pt)));# [(kg H2O/kg dry gas)/m]
Hg_primea = -(Gs_prime*Ca*dY_prime_by_dZ)/(1-math.exp((Gs_prime*Ca*dY_prime_by_dZ)/(Hga)));# [W/square m.K]
dTempg_by_dZ = -(Hg_primea*(Tempg1-Tempi)/(Gs_prime*Cs1));# [OC/m]
Tempi = (Templ1)+((Gs_prime*(Cs1*dTempg_by_dZ)+((Ca*(Tempg1))-(CaL*(Templ1))+(((CaL-Ca)*(Tempo))+Lambda))*dY_prime_by_dZ)/((Gs_prime*CaL*dY_prime_by_dZ)-Hla));#[OC]
# Assume:
delta_Tempg = -30;# [OC]
delta_Z = delta_Tempg/(dTempg_by_dZ);# [m]
Tempg = Tempg1+delta_Tempg;# [OC]
Y_prime = Y1_prime+(dY_prime_by_dZ)*delta_Z;# [kg H2O/kg dry gas]
paG = Y_prime/(Y_prime+(Ma/Mb));# [atm]
Cs = Cb+Ca*(Y_prime);# [J/(kg dry air).K]
# Water balance, From Eqn. 7.29:
def f24(L_prime):
return (L2_prime-L_prime)-(Gs_prime*(Y_prime-Y1_prime))
L_prime = fsolve(f24,2);# [kg/square m.s]
def f25(Templ):
return ((L_prime*CaL*(Templ-Tempo))+(Gs_prime*Cs1*(Tempg1-Tempo)))-((L1_prime*CaL*(Templ1-Tempo))+(Gs_prime*(Cs*(Tempg-Tempo))+(Y_prime*Lambda)))
Templ = fsolve(f25,2);
# This process is repeated several times until gas temp falls to Tempg2
Z = 1.54;# [m] Z = sum of all delta_Z
# The value of Y2_prime was calculated to be 0.0222 which is sufficiently close to the assumed value.
print"The diameter of tower is ",dia," m\n"
print"The packed height is",Z, "m\n"
# Illustration 7.15
# Page: 267
print'Illustration 7.15 - Page: 267\n\n'
from scipy.optimize import fsolve
import math
import numpy
# solution
#***Data***#
w = 0.75;# [m]
OD = 19.05/1000;# [m]
l = 3.75;# [m]
n = 20;
t = 1.65/1000;# [m]
Ws = 2.3;# [kg/s]
Wal = 10.0;# [kg/s]
Wt = 4.0;# [kg/s]
Density = 800;# [kg/cubic m]
viscocity = 0.005;# [kg/m.s]
K = 0.1436;# [W/m.K]
Ct = 2010.0;# [J/kg.K]
Cal = 4187.0;# [J/kg.K]
Y1_prime = 0.01;# [kg H2O/kg dry air]
Y2_prime = 0.06;# [kg H2O/kg dry air]
TempT = 95.0;# [OC]
#*****#
Free_area = (w-(n*OD))*l;# [square m]
Gs_min = 2.3/Free_area;# [kg/square m.s]
M1 = 1.461;Yav_prime = (Y1_prime+Y2_prime)/2;# [kg H2O/kg dry air]
# From Eqn. 7.86:
ky = 0.0493*(Gs_min*(1+Yav_prime))**0.905;# [kg/square m.s.delta_Y_prime]
# From Fig. 7.5:
H1_prime = 56000.0;# [J/kg]
Ao = 400*math.pi*OD*l;# [square m]
# Cooling water is distributed over 40 tubes & since tubes are staggered
geta = Wal/(40.0*2*l);# [kg/m.s]
geta_by_OD = geta/OD;# [kg/square m.s]
# Assume:
TempL = 28.0;# [OC]
# From Eqn. 7.84:
hL_prime = (982+(15.58*TempL))*(geta_by_OD**(1/3));# [W/square m.K]
# From Eqn. 7.85:
hL_dprime = 11360;# [W/square m.K]
# From Fig. 7.5 (Pg 232)
m = 5000.0;# [J/kg.K]
Ky = 1.0/((1/ky)+(m/hL_dprime));
ID = (OD-(2.0*t));# [m]
Ai = math.pi*(ID**2)/4;# [square m]
Gt_prime = Wt/(n*Ai);# [kg/square m.s]
M2 = -0.7204;Re = ID*Gt_prime/viscocity;
Pr = Ct*viscocity/K;
# From a standard correlation:
hT = 364.0;# [W/square m.K]
Dav = (ID+OD)/2.0;# [m]
Zm = (OD-ID)/2;# [m]
Km = 112.5;# [W/m.K]
# From Eqn. 7.67:
Uo = 1/((OD/(ID*hT))+((OD/Dav)*(Zm/Km))+(1/hL_prime));# [W/square m.K]
# From Eqn. 7.75:
alpha1 = -(((Uo*Ao)/(Wt*Ct))+((Uo*Ao)/(Wal*Cal)));
alpha2 = m*Uo*Ao/(Wt*Ct);
# From Eqn. 7.76:
beeta1 = Ky*Ao/(Wal*Cal);
beeta2 = -((m*Ky*Ao/(Wal*Cal))-(Ky*Ao/Ws));
def f26(r):
return (r**2)+((alpha1+beeta2)*r)+((alpha1*beeta2)-(alpha2*beeta1))
r1 = fsolve(f26,10);
r2 = fsolve(f26,0);
beeta2 = 1.402;
# From Eqn. 7.83:
# N1-(M1*(r1+alpha1)/beeta1) = 0............................................(1)
# N2-(M2*(r2+alpha2)/beeta2) = 0............................................(2)
# From Eqn. 7.77:
# At the top:
x1 = 1.0;
# TempL2+(M1*exp(r1*x1))+(M2*exp(-(r2*x1))) = TempL.........................(3)
# From Eqn. 7.78:
# At the bottom:
x2 = 0.0;
# H1_star-N1-N2 = H1_prime..................................................(4)
# From Eqn. 7.80:
# ((M1/r1)*(exp(r1)-1))+((M2*r2)*(exp(r2)-1)) = (Tempt-TempL)...............(5)
# From Eqn. 7.81:
# ((N1/r1)*(exp(r1)-1))+((N2*r2)*(exp(r2)-1)) = (H1_star-H1_prime)..........(6)
# From Eqn. 7.91 & Eqn. 7.92:
# Uo*Ao*(TempT-TempL)=Ky*Ao*(H1_star-H1_prime)..............................(7)
# Elimination of M's & N's by solving Eqn. (1) to (4) and (7) simultaneously:
# and from Fig. 7.5 (Pg 232):
TempL1=28.0;# [OC]
H1_star=(Uo*Ao*(TempT-TempL)/(Ky*Ao))+H1_prime;# [J/kmol]
N1 = 3594.0*M1
N2 =-43288.0*M2;
# By Eqn. 5
delta_Temp = ((M1/r1)*(math.exp(r1)-1))+((M2*r2)*(math.exp(r2)-1));# [OC]
Q = Uo*delta_Temp*Ao;
TempT1 = TempT-(Q/(Wt*Ct));# [OC]
H2_prime = Q/(Ws)+H1_prime;# [J/kg]
print"Temperature to which oil was cooled:",int(TempT1)," degree C\n"
# The solution in the textbook is wrong