#initialization of variables
p1 = 10. # pressure in atm
H = 600. # henrys constant in atm
c1 = 0 # gmol/cc
N1 = 2.3*10**-6 # mass flux in mol/cm**2-sec
c = 1./18. #total Concentration in g-mol/cc
D = 1.9*10**-5 # Diffusion co efficient in cm**2/sec
#Calculations
c1i = (p1/H)*c # Component concentration in gmol/cc
k = N1/(c1i-c1)#Mass transfer co efficient in cm/sec
l = D/k # Film thickness in cm
#Results
print"The film thickness is cm",round(l,5)
#initialization of variables
D = 1.9*10**-5 #Diffusion co efficient in cm**2/sec
k = 2.5*10**-3 # M.T.C in cm/sec
from math import pi
#Calculations
Lbyvmax = 4*D/((k**2)*pi)#sec
tou = D/k**2 # sec
#Results
print"The contact time sec",round(Lbyvmax,1)
print"\nThe surface resident time sec",round(tou,1)
#initialization of variables
const = 0.5 # The part of flow in the system which bypasses the region where the mass transfer occurs
v1 = 1. # cm/sec
al = 10**3
k = 10**-3 # cm/sec
v2 = 3. # cm/sec
from math import log
from math import exp
#Calculations
C1byC10first = const + (1-const)*(exp(-k*al/v1))# c1/c10
appk1 = (v1/al)*(log(1/C1byC10first))# Apparent m.t.c for first case in cm/sec
C1byC10second = const + (1-const)*(exp(-((3)**0.5)*k*al/v2))#c1/c10 in second case
appk2 = (v2/al)*log(1/C1byC10second)# apparent m.t.c for second case in cm/sec
power = log(appk2/appk1)/log(v2/v1)
#Results
print"The apparent m.t.c for the first case is cm/sec",appk1
print"\nThe apparent m.t.c for the second case is cm/sec",appk2
print"\nThe apparent is proportional to the power of of the velocity",round(power,2)
#initialization of variables
D = 1*10**-5 #cm**2/sec
d = 2.3 # cm
L = 14 # cm
v0 = 6.1 # cm/sec
#gamma(4./3.)=0.8909512761;
#calculations
k = ((3**(1./3.))/(0.8909512761))*((D/d))*(((d**2)*v0/(D*L))**(1./3.))# cm/sec
#Results
print"The average mass transfer coefficient is cm/sec",round(k,5)
#initialization of variables
tn = 300000 # turbulence number
v0 = 10 # cm/sec
p = 1 # g/cc
mu = 0.01 # g/cm-sec
delta = 2.5 #cm
D = 1*10**-5 # cm**2/sec
#Calculations
x = tn*mu/(v0*p)# cm
delta = ((280/13)**(1/2))*x*((mu/(x*v0*p))**(1/2))#cm
deltac = ((D*p/mu)**(1/3))*delta#cm
k = (0.323*(D/x)*((x*v0*p/mu)**0.5)*((mu/(p*D))**(1/3)))*10**5# x*10**-5 cm/sec
#Results
print"The distance at which turbulent flow starts is cm",x
print"\nThe boundary layer for flow at this point is cm",delta
print"\nThe boundary layer for concentration at this point is cm",deltac
print"\nThe local m.t.c at the leading edge and at the position of transistion is x10**-5 cm/sec",round(k,3)