# Chapter 14 : Mass Transfer¶

### Example 14.1¶

In [1]:
import math
# Determining Mass Fractions from Mole Fractions

# Variables
yN2 = 0.781
yO2 = 0.209
yAr = 0.01			#Mole fractions
M_N2 = 28
M_O2 = 32
M_Ar = 39.9			#Molar Masses

# Calculations and Results
M_air = yN2*M_N2+yO2*M_O2+yAr*M_Ar			#[kg/kmol]
print "The molar mass of air is",M_air,"kg/kmol"

w_N2 = yN2*M_N2/M_air;
w_O2 = yO2*M_O2/M_air;
w_Ar = yAr*M_Ar/M_air;
print "The mass fractions of N2, O2 and Ar in dry standard atmosphere are" \
,100*w_N2,"percent",",",100*w_O2,"percent","and",100*w_Ar,"percent","respectively"

The molar mass of air is 28.955 kg/kmol
The mass fractions of N2, O2 and Ar in dry standard atmosphere are 75.5240891038 percent , 23.0979105509 percent and 1.37800034536 percent respectively


### Example 14.2¶

In [2]:
import math
# Mole Fraction of Water Vapor at the surface of a Lake

# Variables
P_vapor = 1.705			#Partial Pressure of water vapor in the air at the lake surface is saturation pressure of watre at 15 degree Celcius[kPa]
T_lake = 15.			#[degree Celcius]
P = 92. 		    	#Atmospheric pressure at lake level [kPa]

# Calculations and Results
y_vapor = P_vapor/P;
print "The mole fraction of water vapor in the air at the surface of lake is",y_vapor

y_water = 1-y_vapor			#Since water contains dissolved air
print "Mole fraction of liquid water in lake",y_water

The mole fraction of water vapor in the air at the surface of lake is 0.0185326086957
Mole fraction of liquid water in lake 0.981467391304


### Example 14.3¶

In [3]:
import math
# Mole Fraction of Dissolved Air in Water

# Variables
P_vapor = 1.96			#The partial presure of water vapor in the air at the lake surface is the saturation pressure of water at 17 degree Celcius
H = 62000.  			#Henry's consmath.tant for air dissolved in water at 290K[bar]
P = 92.  	    		#Atmospheric Pressure at lake level[kPa]

# Calculations and Results
P_dryair = P-P_vapor			#[kPa]
print "The partial pressure of dry air is",P_dryair/100,"bar"

y_dryair = (P_dryair/100)/H;
print "The mole fraction of air in the water is",y_dryair

The partial pressure of dry air is 0.9004 bar
The mole fraction of air in the water is 1.45225806452e-05


### Example 14.4¶

In [4]:
import math
# Diffusion of Hydrogen Gas into a Nickel Plate

# Variables
s = 0.00901		    	#Solubility of hydrogen in nickel at 358K[kmol/m**3.bar]
P_H2 = 300./100			#[bar]
M_H2 = 2			    #Molar Mass of hydrogen[kg/kmol]

# Calculations and Results
C_H2 = s*P_H2			#[kmol/m**3]
print "The molar density of hydrogen in the nickel at the interface is",C_H2,"kmol/m**3"

rho_H2 = C_H2*M_H2			#[kg/m**3]
print "Mass Density of hydrogen is",rho_H2,"kg/m**3"

The molar density of hydrogen in the nickel at the interface is 0.02703 kmol/m**3
Mass Density of hydrogen is 0.05406 kg/m**3


### Example 14.5¶

In [5]:
import math
# Diffusion of Hydrogen through a Spherical Container

# Variables
CA1 = 0.087
CA2 = 0 			#Molar concentration of hydrogen in the nickel at inner and outer surfaces[kmol/m**3]
t = 0.06			#Thickness of shell[m]
D_AB = 1.2*(10**(-12))			#Diffusion coefficient for hydrogen in the nickel at the specified temperature is[m**2/s]
M_H2 = 2			#Molar Mass of H2[kg/kmol]

# Calculations and Results
N_diff = 4*math.pi*r1*r2*D_AB*(CA1-CA2)/(r2-r1);
print "The molar flow rate of hydrogen through the shell by diffusion is",N_diff,"kmol/s"

m_diff = M_H2*N_diff;
print "The mass flow rate of hydrogen is",m_diff,"kg/s"

The molar flow rate of hydrogen through the shell by diffusion is 1.22796563024e-10 kmol/s
The mass flow rate of hydrogen is 2.45593126048e-10 kg/s


### Example 14.6¶

In [6]:
import math
# Condensation and Freezing of Moisture in Walls

Ti = 20
To = -16			#Indoor and outdoor temperatures[degree Celcius]
R_wall = 3.05			#Total thermal resismath.tance of the wall[m**2.degree Celcius/W]
A = 1			#Heat transfer area[m**2]
R_ext = 0.40			#The thermal resismath.tance of the exterior part of the wall beyond the insulation[m**2.degree Celcius/W]
Rv_int = 0.012+0.0004
Rv_ext = 0.0138+0.019			#Indoor and outdoor vapor resismath.tances[Pa.m**2.s/ng]
phi1 = 0.6
phi2 = 0.7			#Indoor and outdoor Relative Humidity
Psat1 = 2340
Psat2 = 151			#Indoor and outdoor saturation pressures[Pa]

# Calculations and Results
Q_wall = A*(Ti-To)/R_wall			#[W]
print "The rate of heat transfer through unit area of wall is",Q_wall,"W"

T_I = To+(Q_wall*R_ext);
print "The temperature of outer sheathing interface is",T_I,"degree Celcius"

P = 234			#The saturation pressure of water at temp T_I[Pa]
Pv1 = phi1*Psat1;
Pv2 = phi2*Psat2;
print "The vapor pressure at the indoor and the outdoor is" \
,Pv1,"Pa","and",round(Pv2),"Pa"

mv_int = A*(Pv1-P)/Rv_int;
mv_ext = A*(P-Pv2)/Rv_ext;
print "The rate of moisture flow through the interior and exterior parts of the wall is" \
,mv_int,"ng/s","and",mv_ext,"ng/s"

mv_freezing = mv_int-mv_ext;
print "The moisture is freezing in the insulation at the rate of",mv_freezing,"ng/s"

The rate of heat transfer through unit area of wall is 11.8032786885 W
The temperature of outer sheathing interface is -11.2786885246 degree Celcius
The vapor pressure at the indoor and the outdoor is 1404.0 Pa and 106.0 Pa
The rate of moisture flow through the interior and exterior parts of the wall is 94354.8387097 ng/s and 3911.58536585 ng/s
The moisture is freezing in the insulation at the rate of 90443.2533438 ng/s


### Example 14.7¶

In [7]:
import math
# Hardening of Steel by the diffusion of carbon

# Variables
D_AB = 4.8*10**(-10)			#Diffusion coefficient of carbon in steel at the furnace temperature [m**2/s]
wA_i = 0.0015		        	#Initial carbon concentration
wA_e = 0.012		        	#Equilibrium concentration of carbon
wA_t = 0.01 	    	    	#Concentration of carbon after desired time
x = 0.0005      			    #Diffusion dismath.tance[m]

# Calculations
a = (wA_t-wA_i)/(wA_e-wA_i);
#Tthe argument whose complimentary error function is a = 0.81 is 0.17
t = (x**2)/(4*D_AB*(0.17**2))			#[seconds]

# Results
print "Time taken to reach desired level of hardening is",round(t),"seconds"

Time taken to reach desired level of hardening is 4505.0 seconds


### Example 14.8¶

In [10]:
import math
# Venting of Helium into the Atmosphere by Diffusion

# Variables
D_AB = 7.2*10**(-5)			#Diffusion coefficient of air in helium[m**2/s]
M_He = 4
M_air = 29			#Molar masses of helium and air[kg/kmol]
D = 0.005       			#Internal diameter of tube[m]
L = 15		            	#Length of tube[m]
R1 = 8.314  	    		#Universal Gas Consmath.tant[kPa.m**3/kmol.K]
R2 = 2.0769		    	    #Universal Gas Consmath.tant[kPa.m**3/kg.K]
T = 298			            #/Ambient temperature[K]

# Calculations and Results
A = math.pi*(D**2)/4			#Flow area[m**2]
P_He0 = 1
P_HeL = 0			#Pressure of helium at x = 0 i.e. bottom of tube and at x = L i.e. at the top of the tube [atm]
N_He = D_AB*A*(P_He0-P_HeL)*(101.3)/(R1*T*L);
print "The molar flow rate of Helium is",N_He,"kmol/s"

m_He = N_He*M_He;
print "Mass flow rate of helium is",m_He,"kg/s"

N_air = -N_He			#Equimolar counter diffusion process
m_air = N_air*M_air;
print "The flow rate of air into the pipeline is",m_air,"kg/s"

w_air = m_air/(m_air+m_He);
print "Mass fraction of air in the helium pipeline is",w_air,"which is negligible"

m_net = m_He+m_air			#[kg/s]
#Taking density of mixture at x = 0 to be the density of helium as the
# mass fraction of air at the bottom is very small
rho = P_He0*101.325/(R2*T)			#[kg/m**3]
V = m_net/(rho*A)			#[m/s]
print "The average flow velocity at the bottom of the tube is",V,"m/s"

The molar flow rate of Helium is 3.85349046335e-12 kmol/s
Mass flow rate of helium is 1.54139618534e-11 kg/s
The flow rate of air into the pipeline is -1.11751223437e-10 kg/s
Mass fraction of air in the helium pipeline is 1.16 which is negligible
The average flow velocity at the bottom of the tube is -2.99695101963e-05 m/s


### Example 14.9¶

In [11]:
import math
# Measuring Diffusion Coefficient by the Stefan tube

# Variables
D = 0.03			#Diameter of tube[m]
P = 83.5			#Atmospheric Pressure at an elevation of 1600m[kPa]
T = 20+273			#Ambient temperature[K]
R = 8.314			#Universal Gas Consmath.tant[kPa.m**3/kmol.K]
P_vapor0 = 2.34			#The saturation pressure of water at 20 degree Celcius[kPa]
M_vapor = 18			#Molar mass of water vapor[kg/kmol]
x = 0.4			#Dismath.tance from water surface to the open end of the tube[m]

# Calculations and Results
#water vapor is species A
yA0 = P_vapor0/P;
print "The mole fraction of water vapor (species A) at the Interface is",yA0
yAL = 0 			#mole fraction of water vapor on the top of the tube
C = P/(R*T)			#[kmol/m**3]
A = math.pi*(D**2)/4			#[m**2]
print "The cross sectional area of tube",A,"m**2"

m_vapor = (1.23*10**(-3))/(15*24*3600)			#Rate of evaporation [kg/s]
N_vapor = m_vapor/M_vapor;
print "The molar flow rate of vapor is",N_vapor,"kmol/s"

D_AB = (N_vapor/A)*(x/C)/math.log((1-yAL)/(1-yA0));
print "Binary diffusion coefficient of water vapor in air at 20 degree Celcius and 83.5kPa" \
,D_AB,"m**2/s"

The mole fraction of water vapor (species A) at the Interface is 0.0280239520958
The cross sectional area of tube 0.000706858347058 m**2
The molar flow rate of vapor is 5.27263374486e-11 kmol/s
Binary diffusion coefficient of water vapor in air at 20 degree Celcius and 83.5kPa 3.0623821858e-05 m**2/s


### Example 14.10¶

In [12]:
import math
# Mass Convection inside a Circular Pipe

# Variables
D = 0.015			#Inner Diameter[m]
T = 300			#Temp of air[K]
P = 1			#Pressure of air[atm]
v = 1.2			#Average velocity of air[m/s]
nu = 1.58*10**(-5)			#Vismath.cosity[m**2/s]

# Calculations and Results
#Water is Species Aand air is species B
D_AB = (1.87*10**(-10))*(T**2.072)/P			#[m**2/s]
print "The mass diffusivity of water vapor in air at 300K is",D_AB,"m**2/s"
Re = v*D/nu;
print "The Reynolds number for internal flow is",round(Re)
if(Re<2300):
print ("laminar Flow")
Sh = 3.66			#Sherwood number equals to Nusselt number
h_mass = Sh*D_AB/D			#[m/s]
print "The mass transfer coefficient is",h_mass,"m/s"
else:
print ("Flow is not laminar")

The mass diffusivity of water vapor in air at 300K is 2.53767993801e-05 m**2/s
The Reynolds number for internal flow is 1139.0
laminar Flow
The mass transfer coefficient is 0.00619193904874 m/s


### Example 14.11¶

In [14]:
import math
# Anamath.logy between Heat and Mass Transfer

# Variables
#Napthalene is species A and air is species B
M_A = 128.2			#Molar Mass of A[kg/kmol]
M_air = 29.			#Molar mass of B[kg/kmol]
P = 101325.			#Pressure of Air[Pa]
T = 298.			#Temperature[K]
D_AB = 0.61*10**(-5)			#[m**2/s]
v = 2.			#Stream velocity[m/s]
rho = 1.184			#Density of air[kg/m**3]
Cp = 1007.			#Specific Heat[J/kg.K]
a = 2.141*10**(-5)			#Absorptivity[m**2/s]
w_inf = 0.			#Mass fraction of napthalene at free stream conditions
P_As = 11.			#Vapor Pressure of Napthalene at surface[Pa]
mA = 12*10.**(-3)			#Mass of napthalene sublimated[kg]
delta_t = 15.*60			#time of sublimation[s]
As = 0.3			#surface area of the body[m**2]

# Calculations and Results
w_As = (P_As/P)*(M_A/M_air);
print "Mass fraction at the surface is",w_As

m_evap = mA/delta_t			#[kg/s]
print "The rate of evaporation of napthalene is",m_evap,"kg/s"

h_mass = m_evap/(rho*As*(w_As-w_inf));
print "The mass convection coefficient is",h_mass,"m/s"

#Using anamath.logy between heat and mass transfer
h_heat = rho*Cp*h_mass*((a/D_AB)**(2/3))			#[W/m**2.degree Celcius]
print "The average heat transfer coefficient is",round(h_heat),"W/m**2.degree Celcius"

Mass fraction at the surface is 0.000479916962318
The rate of evaporation of napthalene is 1.33333333333e-05 kg/s
The mass convection coefficient is 0.0782167343205 m/s
The average heat transfer coefficient is 93.0 W/m**2.degree Celcius


### Example 14.12¶

In [15]:
import math
# Evaporative Cooling of a Canned Drink

# Variables
#Water is species A and air is species B
M_A = 18
M_B = 29;			#Molar Masses of water and air[kg/kmol]
D_AB = 2.5*10**(-5)			#Diffusivity of water vapor in air[m**2/s]
T_inf = 30			#Ambient Temperature[degree Celcius]
T_avg = (20+T_inf)/2			#Average temperature
P = 101.325			#Atmospheric Pressure[kPa]
#Properties of A at 20 degree Celcius
h_fg = 2454			#[kJ/kg]
Pv1 = 2.34			#Saturation vapor pressure[kPa]
Pv2 = 4.25			#Vapor Pressure at 30 degree Celcius[kPa]
#Properties of air at average temperature and 1 atm
Cp = 1.007			#[kJ/kg]
a = 2.141*10**(-5)			#[m**2/s]
phi = 0.4			#Relative Humidity

# Calculations and Results
Le = a/D_AB;
print "The Lewis Number is",Le

Pv_inf = phi*Pv2			#[kPa]
print "The vapor pressure of air away from the surface is",Pv_inf,"kPa"

Ts = T_inf-(h_fg*M_A*(Pv1-Pv_inf)/(Cp*(Le**(2/3))*M_B*P));
print "The temperature of the drink can be lowered to",Ts,"degree Celcius"

The Lewis Number is 0.8564
The vapor pressure of air away from the surface is 1.7 kPa
The temperature of the drink can be lowered to 20.4460501647 degree Celcius


### Example 14.13¶

In [16]:
import math
# Heat Loss from Uncovered Hot Water Baths

# Variables
Ts = 50+273			#Uniform temperature of water[K]
T_surr = 20+273			#Average temperature of surrounding surfaces[K]
T_inf = 25+273			#Ambient temperature[K]
As = 3.5*1			#Surface area of water bath[m**2]
p = 2*(3.5+1)			#Perimeter of top surface of water bath[m]
e = 0.95			#Emissivity of liquid water
phi = 0.52			#Relative Humidity
Rv = 0.4615			#Universal Gas Consmath.tant[kPa.m**3/kg.K]
Ra = 0.287			#Universal Gas Consmath.tant[kPa.m**3/kg.K]
g = 9.81			#[m**2/s]

# Calculations and Results
#(a)
print "The radiation heat loss from the water to the surrounding surface is",round(Q_rad),"W"

#(b)
Tavg = (Ts+T_inf)/2			#Average temperature[degree Celcius]
P = 92			#Atmospheric pressure[kPa]
#At average temperature Tavg and Pressure P,Properties of dry air:-
k = 0.02644			#[W/m.degree Celcius]
Pr = 0.7262			#Prandtl  number, independent of pressure
a = (2.312*10**(-5))/P			#Absorptivity[m**2/s]
nu = (1.849*10**(-5))			#Kinematic vismath.cosity[m**2/s]
#At T_surr properties of water are:-
h_fg = 2383			#[kJ/kg]
Pvs = 12.35			#[kPa]
Psat = 3.17			#Saturation Pressure of water at surface temp[kPa]
#The air at surface is saturated therefore vapor pressure at surface is simple the saturation pressure of water at the surface temperature
Pv_inf = phi*Psat			#[kPa]
#At the surface
rho_vs = Pvs/(Rv*Ts);
print "Density of water vapor at the surface is",rho_vs,"kg/m**3"

rho_as = (P-Pvs)/(Ra*Ts);
print "Density of air at the surface is",rho_as,"kg/m**3"

rho_s = rho_vs+rho_as;
print "Density of mixture at the surface is",rho_s,"kg/m**3"

#Away from the surface
rho_vinf = Pv_inf/(Rv*T_inf);
print "Density of vapor away from the surface is",rho_vinf,"kg/m**3"

rho_ainf = (P-Pv_inf)/(Ra*T_inf);
print "Density of air away from the surface is",rho_ainf,"kg/m**3"

rho_inf = rho_ainf+rho_vinf;
print "The density of mixture away from the surface is",rho_inf,"kg/m**3"

Lc = As/p;
print "The characteristic length is",Lc,"m"

Gr = g*(rho_inf-rho_s)*(Lc**3)/(((rho_inf+rho_s)/2)*(nu**2));
print "The Grashof number is",Gr

Nu = 0.15*((Gr*Pr)**(1/3));
print "The Nusselt number is",Nu

h_conv = Nu*k/Lc;
print "The convection heat transfer coefficient is" \
,h_conv,"W/m**2.degree Celcius"

Q_conv = h_conv*As*(Ts-T_inf);
print "The natural convection heat transfer rate is" \
,Q_conv,"W"

#(c)
D_AB = (1.87*10**(-10))*(Tavg**2.072)/(P/101.325);
print "The mass diffusivity of water vapor in air at the average temperature is" \
,D_AB,"m**2/s"

Sc = nu/D_AB;
print "The Schmidt Number is",Sc

Sh = 0.15*((Gr*Sc)**(1/3));
print "The Sherwood Number is",Sh

h_mass = Sh*D_AB/Lc;
print "The mass transfer coefficient is",h_mass,"m/s"

mv = h_mass*As*(rho_vs-rho_vinf);
print "The evaporation rate is",mv,"kg/s"

Q_evap = mv*h_fg;
print "The rate of heat transfer by evaporation is",Q_evap,"kW"

print "The total rate of heat transfer from the water to the surrounding air and surfaces is" \
,Q_total,"W"

The radiation heat loss from the water to the surrounding surface is 663.0 W
Density of water vapor at the surface is 0.082850041425 kg/m**3
Density of air at the surface is 0.859214032211 kg/m**3
Density of mixture at the surface is 0.942064073636 kg/m**3
Density of vapor away from the surface is 0.0119860100199 kg/m**3
Density of air away from the surface is 1.05642260833 kg/m**3
The density of mixture away from the surface is 1.06840861835 kg/m**3
The characteristic length is 0.388888888889 m
The Grashof number is 212109490.96
The Nusselt number is 0.15
The convection heat transfer coefficient is 0.0101982857143 W/m**2.degree Celcius
The natural convection heat transfer rate is 0.89235 W
The mass diffusivity of water vapor in air at the average temperature is 2.99138162238e-05 m**2/s
The Schmidt Number is 0.618109032351
The Sherwood Number is 0.15
The mass transfer coefficient is 1.15381862577e-05 m/s
The evaporation rate is 2.86174837664e-06 kg/s
The rate of heat transfer by evaporation is 0.00681954638154 kW
The total rate of heat transfer from the water to the surrounding air and surfaces is 670.289804281 W