#initialization of variables
from math import pi
Tdisc = 30. # Centigrade
T = 21. # Centigrade
T0 = 18. # Centigrade
R0 = 1.5 # cm
V = 1000. # cc
t = 3600. #seconds
Nu = 0.082 #cm**2/sec
omeg = 2*pi*10/60 #sec**-1
from math import log
#Calculations
k = -V*(log((Tdisc-T)/(Tdisc-T0)))/(pi*(R0**2)*t)# k = h/d*cp cm/sec
alpha = ((1/0.62)*(k)*(Nu**(1/6))*(omeg**(-0.5)))**1.5/2 # cm**2/sec
#Results
print"the value of thermal diffusivity is cm**2/sec",round(alpha,4)
#initialization of variables
d =1000. # kg/m^3
h = 30. # W/m^2-C-sec
Hvap = 2300*10**3 # J/kg
T = 75. # C
Ti = 31. # C
l = 0.04 # m
epsilon = 0.36
c = 3600 # sec/hr
t1 = (Hvap/h)*(1/(T-Ti))*(l*epsilon*d)# sec
t = (t1/c) # in hr
#Results
print"The time taken for drying is hr",round(t,3)# answer wrong in textbook
#intialization of variables
d = 100*10**-4 # cm
v = 10**-3# cm/sec
nu = 0.2 # cm**2/sec
DS = 0.3 # cm**2/sec
DG = 3*10**-7 # cm**2/sec
H = 4.3*10**-4 # at 60 degree centigrade
#Calculations
kG = (2+(0.6*((d*v/nu)**0.5)*((nu/DS)**(1/3))))*DS/d# cm/sec
k = kG*H
t = 30*DG/k**2
#Results
print"The mass transfer coefficient is cm/sec",round(k,3)
print"\nTHe time needed to dry the particle is sec",round(t,3)
#Answer wrong in textbook starting from kG
#initialization of variables
slope = 230. #J/g-mol-C
nair = 60. # gmol/cm^2-sec
CpH2O = 75. # J/gmol-C
f = 0.4 # Correction factor
F = 2150./(60*0.018)#gmol/m^2-sec
kc= 20./3.
a = 3 # m^2/m^3
k = 2.7 # integral of dH/Hi-H with limits Hout and Hin
#Calculations
nH2Omax = slope*nair/CpH2O#gmol/m^2-sec
nH2O = nH2Omax*(1-f) #gmol/m^2-sec
A = F/nH2O # m^2
l = (nair/(kc*a))*k # m
#Results
print"The flow rate of the water per tower cross section is gmol H2O/m^2-sec",nH2O
print"\nThe area of tower cross section is m^2",round(A,3)
print"\nThe length of the tower is m",l
#initialization of variables
A = 0.01 # cm**2
l = 1. # cm
VA = 3. # cc
VB = 3. # cc
alphagas = 0.29
alphaliquid = -1.3
x1 = 0.5
x2 = 0.5
deltaT = 50. # Kelvin Thot-Tcold = 50
Tavg = 298. # kelvin
Dgas = 0.3 # cm**2/sec
Dliquid = 10**-5 # cm**2/sec
#calculations
deltaY = alphagas*x1*x2*deltaT/Tavg # Y1hot-Y1cold = DeltaY
deltaX = alphaliquid*x1*x2*deltaT/Tavg# X1hot-X1cold = DeltaX
Beta = (A/l)*((1/VA)+(1/VB))#cm**-2
BetaDgasinverse = 1/(Beta*Dgas)# sec
BetaDliquidinverse = (1/(Beta*Dliquid))/(365*24*60*60)
#Results
print"The seperation achieved for gas is ",round(deltaY,3)
print"\nThe seperation achieved for liquid is ",round(deltaY,3)
print"\nThe time taken for seperation for gas will be seconds",BetaDgasinverse
print"\nThe time taken for seperation for liquid will be year",round(BetaDliquidinverse,3)