# Illustration 3.1
# Page: 53
print'Illustration 3.1 - Page: 53\n\n'
# solution
#****Data*****#
# a = CO2 b = H2O
Ca0 = 0;#[kmol/cubic m]
Cai = 0.0336;#[kmol/cubic m]
Dab = 1.96*10**(-9);# [square m/s]
#*******#
density = 998.0;# [kg/cubic m]
viscosity = 8.94*10**(-4);#[kg/m.s]
rate = 0.05;#[kg/m.s] mass flow rate of liquid
L = 1;#[m]
g = 9.81;#[m/square s]
# From Eqn. 3.10
Del = ((3*viscosity*rate)/((density**2)*g))**(1.0/3);# [m]
Re = 4*rate/viscosity;
# Flow comes out to be laminar
# From Eqn. 3.19
Kl_avg = ((6*Dab*rate)/(3.141*density*Del*L))**(1.0/2);#[kmol/square m.s.(kmol/cubic m)]
bulk_avg_velocity = rate/(density*Del);#[m/s]
# At the top: Cai-Ca = Cai_Ca0 = Cai
#At the bottom: Cai-Cal
# From Eqn. 3.21 & 3.22
Cal = Cai*(1-(1.0/(exp(Kl_avg/(bulk_avg_velocity*Del)))));# [kmol/cubic m]
rate_absorption = bulk_avg_velocity*Del*(Cal-Ca0);# [kmol/s].(m of width)
print'The rate of absorption is ',round(rate_absorption,8),' kmol/sec.(m of width)'
# The actual value may be substantially larger.
# Illustration 3.2
# Page: 56
print'Illustration 3.2 - Page: 56\n\n'
# solution
#***Data****#
d = 0.025;# [m]
avg_velocity = 3;# [m/s]
viscosity = 8.937*10**(-4);# [kg/m.s]
density = 997;# [kg/m**3]
#*********#
kinematic_viscosity = viscosity/density;# [square m/s]
Re = d*avg_velocity*density/viscosity;
# Reynold's number comes out to be 83670
# At this Reynold's number fanning factor = 0.0047
f = 0.0047;
L = 1;# [m]
press_drop = 2*density*f*L*(avg_velocity**2)/(d);# [N/square m]
P = 3.141*(d**2)*avg_velocity*press_drop/4;# [N.m/s] for 1m pipe
m = 3.141*(d**2)*L*density/4;
# From Eqn. 3.24
Ld = ((kinematic_viscosity**3)*m/P)**(1.0/4);# [m]
# From Eqn. 3.25
Ud = (kinematic_viscosity*P/m)**(1.0/4);# [m/s]
print'Velocity of small eddies is',round(Ud,4),'m/s'
print'Length scale of small eddies is',round(Ld,7),'m'
# Illustration 3.3
# Page: 69
print'Illustration 3.3 - Page: 69\n\n'
# solution
# Heat transfer analog to Eqn. 3.12
# The Eqn. remains the same with the dimensionless conc. ratio replaced by ((tl-to)/(ti-to))
# The dimensionless group:
# eta = 2*Dab*L/(3*del**2*velocity);
# eta = (2/3)*(Dab/(del*velocity))*(L/del);
# Ped = Peclet no. for mass transfer
# eta = (2/3)*(1/Ped)*(L/del);
# For heat transfer is replaced by
# Peh = Peclet no. for heat transfer
# eta = (2/3)*(1/Peh)*(L/del);
# eta = (2/3)*(alpha/(del*velocity))*(L/del);
# eta = (2*alpha*L)/(3*del**2*velocity);
print'Heat transfer analog to Eqn. 3.21 is eta = (2*alpha*L)/(3*del**2*velocity)'
# Illustration 3.4
# Page: 69
import math
print'Illustration 3.4 - Page: 69\n\n'
# solution
#***Data****#
# a = UF6 b = air
# The average heat transfer coefficient: Nu_avg = 0.43+0.532(Re^0.5)(Pr^0.31)
# The analogus expression for mass transfer coefficient: Sh_avg = 0.43+0.532(Re^0.5)(Sc^0.31)
d = 0.006;# [m]
velocity = 3.0;# [m/s]
surf_temp = 43.0;# [C]
bulk_temp = 60.0;# [C]
avg_temp = (surf_temp+bulk_temp)/2; #[C]
density = 4.10;# [kg/cubic m]
viscosity = 2.7*10**(-5);# [kg/m.s]
Dab = 9.04*10**(-6);# [square m/s]
press = 53.32;# [kN/square m]
tot_press = 101.33;# [kN/square m]
#******#
avg_press = press/2.0; # [kN/square m]
Xa = avg_press/tot_press;
Xb = 1-Xa;
Re = d*velocity*density/viscosity;
Sc = viscosity/(density*Dab);
Sh_avg = 0.43+(0.532*(2733**0.5)*(0.728**0.5));
c = 273.2/(22.41*(273.2+avg_temp));# [kmol/cubic m]
F_avg = Sh_avg*c*Dab/d;#[kmol/cubic m]
Nb = 0.0;
Ca1_by_C = press/tot_press;
Ca2_by_C = 0.0;
Flux_a = 1.0;
# Using Eqn. 3.1
Na = Flux_a*F_avg*math.log((Flux_a-Ca2_by_C)/(Flux_a-Ca1_by_C));#[kmol UF6/square m.s]
print'Rate of sublimation is',round(Na,8),' kmol UF6/square m.s'
# the answer is slightly different in textbook due to approximation
# Illustration 3.5
# Page: 73
print'Illustration 3.5 - Page: 73\n\n'
# solution
#****Data****#
velocity = 15.0;# [m/s]
G = 21.3;# [kg/square m.s]
#******#
# Since the experimental data do not include the effects of changing Prandtl number.
# Jh = (h/(Cp*density*viscosity)) = (h/Cp*G)*(Pr^(2/3)) = Shi(Re);
# Shi(Re) must be compatible with 21.3*(G**0.6);
# Let Shi(Re) = b*(Re**n);
# Re = (l*G)/viscosity;
# h = (Cp*G/(Pr**(2/3)))*b*(Re**n);
# h = (Cp*G/(Pr**(2/3)))*b*((l*b/viscosity)**n) = 21.3*(G**0.6);
n = 0.6-1;
# b = 21.3*((Pr**(2/3))/Cp)*((l/viscosity)**(-n));
# Using data for air at 38 C & 1 std atm.
Cp1 = 1002;# [kJ/kg.K]
viscosity1 = 1.85*10**(-5);#[kg/m.s]
k1 = 0.0273;#[W/m.K]
Pr1 = (Cp1*viscosity1)/k1;
b_prime = 21.3*(Pr1**(2.0/3)/Cp1)*((1/viscosity1)**0.4);
# b = b_prime*l**(0.4);
# Jh = (h/(Cp*G))*Pr**(2/3) = b_prime*((l/Re)**(0.4)) = Shi(Re);
# The heat mass transfer analogy will be used to estimate the mass transfer coefficient. (Jd = Jh)
# Jd = (KG*Pbm*Mav*Sc**(2/3))/(density*viscosity) = Shi(Re) = b_prime*((l/Re)**0.4);
# KG*Pbm = F = (b_prime*density*viscosity)/(Re^0.4*Mav*Sc**(2/3)) = (b_prime*(density*velocity)**0.6*(viscosity^0.4))/(Mav*Sc**(2/3));
# For H2-H20, 38 C, 1std atm
viscosity2 = 9*10**(-6);# [kg/m.s]
density2 = 0.0794;# [kg/cubic m]
Dab = 7.75*10**(-5);# [square m/s]
Sc = viscosity2/(density2*Dab);
# Assuming desity, Molecular weight and viscosity of the gas are essentially those of H2
Mav = 2.02;# [kg/kmol]
F = (b_prime*(density2*velocity)**0.6*(viscosity2**0.4))/(Mav*Sc**(2.0/3));# [kmol/square m.s]
print'The required mass transfer: ',round(F,5),' kmol/square m.s'
# Illustration 3.6
# Page: 77
print'Illustration 3.6 - Page: 77\n\n'
# solution
from scipy import integrate
import math
#***Data***#
Dp = 0.0125;# [m]
viscosity = 2.4*10**(-5);# [kg/m.s]
Sc = 2.0;
E = 0.3;
Go = (2*10**(-3))/0.1;# molar superficial mass velocity [kmol/square m.s]
#********#
# a = CO b = Ni(CO)4
# Nb = -(Na/4);
Flux_a = 4.0/3;
Ca2_by_C = 0;# At the metal interface
# Ca1_by_C = Ya #mole fraction of CO in the bulk
# Eqn. 3.1 becomes: Na = (4/3)*F*log((4/3)/((4/3)-Ya));
# Let G = kmol gas/(square m bed cross section).s
# a = specific metal surface
# z = depth
# Therefore, Na = -(diff(Ya*G))/(a*diff(z));# [kmol/((square m metal surface).s)];
# For each kmol of CO consumed, (1/4)kmol Ni(CO)4 forms, representing a loss of (3/4) kmol per kmol of CO consumed.
# The CO consumed through bed depth dz is therefore (Go-G)(4/3) kmol;
# Ya = (Go-(Go-G)*(4/3))/G;
# G = Go/(4-(3*Ya));
# diff(YaG) = ((4*Go)/(4-3*Ya)**2)*diff(Ya);
# Substituting in Eqn. 3.64
# -(4*Go/((4-3*Ya)**2*a))*(diff(Ya)/diff(z)) = (4/3)*F*log(4/(4-3*Ya));
# At depth z:
# Mass velocity of CO = (Go-(Go-G)/(4/3))*28;
# Mass velocity of Ni(CO)4 = ((Go-G)*(1/3))*170.7;
# G_prime = 47.6*Go-19.6G; # total mass velocity [kg/square m.s]
# Substituting G leads to:
# G_prime = Go*(47.6-19.6*(4-3*Ya));# [kg/m.s]
# Re = (Dp*G')/viscosity
# With Go = 0.002 kmol/square m.s & Ya in the range 1-0.005, the range of Re is 292-444;
# From table 3.3:
# Jd = (F/G)*(Sc**(2/3)) = (2.06/E)*Re**(-0.575);
# F = (2.06/E*(Sc)**(2/3))*(Go/(4-3*Ya))*Re**(-0.575);
a = 6*(1-E)/Dp;
# Result after arrangement:
X2=lambda Ya:-((4*Go)/((4-(3*Ya))**2.0*a))*(3.0/4)*(E*(Sc**(2.0/3))*(4-(3*Ya))/(2.06*Go)*(1/math.log(4.0/(4-(3*Ya)))))*(((Dp/viscosity)*(Go*(47.6-(19.6/(4.0-(3*Ya))))))**0.575);# [m]
Z = integrate.quad(X2,1,0.005);
print'The bed depth required to reduce the CO content to 0.005 is',round(Z[0],3),'m'
#the answers are slightly different in textbook due to approximation while here answers are precise
# Illustration 3.7
# Page: 80
print'Illustration 3.7 - Page: 80\n\n'
# solution
#****Data*****#
# a = water b = air
out_dia = 0.0254;# [m]
wall_thick = 0.00165;# [m]
avg_velocity = 4.6;# [m/s]
T1 = 66.0;# [C]
P = 1.0;# [atm]
Pa1 = 0.24;# [atm]
k1 = 11400.0;# [W/(square m.K)]
T2 = 24.0;# [C]
k2 = 570.0;# [W/square m.K]
k_Cu = 381.0;# [w/square m.K]
#******#
# For the metal tube
int_dia = out_dia-(2*wall_thick);# [m]
avg_dia = (out_dia+int_dia)/2;# [mm]
Nb = 0;
Flux_a = 1;
Ya1 = 0.24;
Yb1 = 1-Ya1;
Mav = (Ya1*18.02)+(Yb1*29);# [kg/kmol]
density = (Mav/22.41)*(273/(273+T1));# [kg/cubic m]
viscosity = 1.75*10**(-5);# [kg/m.s]
Cpa = 1880.0;# [J/kg.K]
Cpmix = 1145.0;# [J/kg.K]
Sc = 0.6;
Pr = 0.75;
G_prime = avg_velocity*density;# [kg/square m.s]
G = G_prime/Mav;# [kmol/square m.s]
Re = avg_dia*G_prime/viscosity;
# From Table 3.3:
# Jd = Std*Sc**(2/3) = (F/G)*Sc**(2/3) = 0.023*Re**(-0.17);
Jd = 0.023*Re**(-0.17);
F = (0.023*G)*(Re**(-0.17)/Sc**(2.0/3));
# The heat transfer coeffecient in the absence of mass transfer will be estimated through Jd = Jh
# Jh = Sth*Pr^(2/3) = (h/Cp*G_prime)*(Pr^(2/3)) = Jd
h = Jd*Cpmix*G_prime/(Pr**(2.0/3));
U = 1/((1/k1)+((wall_thick/k_Cu)*(int_dia/avg_dia))+((1/k2)*(int_dia/out_dia)));# W/square m.K
# Using Eqn. 3.70 & 3.71 with Nb = 0
# Qt = (Na*18.02*Cpa/1-exp(-(Na*18.02*Cpa/h)))*(T1-Ti)+(Lambda_a*Na);
# Qt = 618*(Ti-T2);
# Using Eqn. 3.67, with Nb = 0, Cai/C = pai, Ca1/C = Ya1 = 0.24;
# Na = F*log(((Flux_a)-(pai))/((Flux_a)-(Ya1));
# Solving above three Eqn. simultaneously:
Ti = 42.2;# [C]
pai = 0.0806;# [atm]
Lambda_a = 43.4*10**6;# [J/kmol]
Na = F*log(((Flux_a)-(pai))/((Flux_a)-(Ya1)));# [kmol/square m.s]
Qt1 = 618*(Ti-T2);# [W/square m]
Qt2 = ((Na*18.02*Cpa/(1-exp(-(Na*18.02*Cpa/h))))*(T1-Ti))+(Lambda_a*Na);# [W/square m]
# since the value of Qt1 & Qt2 are relatively close
print'The local rate of condensation of water is ',round(Na,6),' kmol/square m.s'
# Illustration 3.8
# Page: 81
import math
print'Illustration 3.8 - Page: 81\n\n'
print'Illustration 3.8 (a)\n\n'
# Solution (a)
#***Data****#
# a = water b = air
Nb = 0;
h = 1100.0;# [W/square m]
#*****#
Ma = 18.02;# [kg/kmol]
Cpa = 2090;# [J/kg.K]
T1 = 600.0;# [C]
Ti = 260;# [C]
# The positive dirn. is taken to be from the bulk gas to the surface.
Has = 2.684*(10**6);# enthapy of saturated steam at 1.2 std atm, rel. to the liquid at 0 C in [J/kg]
Hai = 2.994*(10**6);# enthalpy of steam at 1 std atm, 260 C in [J/kg]
# Radiation contributions to the heat transfer from the gas to the surface are negligible. Eqn. 3.70 reduces to
Na = -((h/(Ma*Cpa))*log(1-((Cpa*(T1-Ti))/(Has-Hai))));# [kmol/square m.s]
print'The rate of steam flow reqd. is',round(Na,4),' kmol/square m.s\n\n'
# negative sign indicates that the mass flux is into the gas
print'Illustration 3.8 (b)\n\n'
# Solution (b)
#***Data****#
# a = water b = air
h = 572.0;# [W/square m]
T1 = 25.0;# [C]
#******#
Ti = 260.0;# [C]
# The positive dirn. is taken to be from the bulk gas to the surface.
Has = 1.047*10**(5);# enthapy of saturated steam at 1.2 std atm, rel. to the liquid at 0 C in [J/kg]
Hai = 2.994*(10**6);# enthalpy of steam at 1 std atm, 260 C in [J/kg]
# Radiation contributions to the heat transfer from the gas to the surface are negligible. Eqn. 3.70 reduces to
Na = -((h/(Ma*Cpa))*math.log(1-((Cpa*(T1-Ti))/(Has-Hai))));# [kmol/square m.s]
print'The rate of steam flow reqd. is',round(Na,4),' kmol/square m.s'
# negative sign indicates that the mass flux is into
# the answer of part B in textbook is incorrect