Matlab Code for Liquids
function lschmidt2 = lschmidt2(T, Tdeg, solvent, index)
% Calculates the dimensionless Schmidt number for liquid mixtures at
% infinite dilution. For liquid mixtures, the Schmidt numbers can reach up to 40000.
% The densities used for Schmidt number calculations are the densities of the
% solvent at T=298.15K. Densities were assumed to be independent of
% temperature. Densities were found from the CRC handbook of thermophysical and
% thermochemical data.
% Viscosities were calculated using the Lewis and Squires liquid
% viscosity-temperature correlation. Given a value of viscosity at
% a chosen temperature, viscosity values can be estimated at other
% temperatures.
% Diffusivities were calculated using using Tyn and Calus method. The Tyn
% and Calus method has certain restrictions:
% 1) The method cannot be used for diffusion in viscous solvents
% 2) If the solute is water, a dimer value of molar volume and surface
% tension should be used.
% 3) If the solute is an organic acid and the solvent is not water,
% methanol, or butanol, the acid should be considered a dimer, with twice
% the expected value of molar volume.
% 4) For non-polar solute diffusing into monohydroxy alcohols, the values
% of Vb and Pb should be multiplied by a factor equal to 8*mu where mu is
% the solvent viscosity.
% Argument List:
%T [=] temperature in the units of Tdeg
%Tdeg [=] chosen temperature scale
% 1 - 'kelvin'
% 2 - 'celsius'
% 3 - 'rankine'
% 4 - 'farenheit'
%solvent[=] association parameter of solvent liquid species as follows
% 1 - 'water'
% 2- '1-butene'
% 3- '1,2-dichloroethane'
% 4- '1-hexene'
% 5- '1-pentene'
% 6- 'acetone'
% 7- 'benzene'
% 8- 'carbon dioxide'
% 9- 'carbon disulfide'
% 10- 'carbon tetrachloride'
% 11- 'chloroform'
% 12- 'cyclohexane'
% 13- 'dichloromethane'
% 14- 'diethyl ether'
% 15- 'ethane'
% 16- 'ethanol'
% 17- 'methanol'
% 18- 'methyl chloride'
% 19- 'n-hexane'
% 20- 'n-octane'
% 21- 'n-pentane'
% 22- 'nitrous oxide'
% 23- 'o-xylene'
% 24- 'phenol'
% 25- 'propane'
% 26- 'propylene'
% 27- 'styrene'
% 28- 'toluene'
%index [=] index of compounds from start301
% Returns:
%Sc [=] Schmidt
global mw lrho critP critV TbpK critT
if nargin==3
index = [1 2];
end
j=index(1); %j will always be the solvent
k=index(2);
% Conversion of given T to Kelvin
if Tdeg==2
T=(T+273.15);
end
if Tdeg==3
T=(T*.55556);
end
if Tdeg==4
T=(T+459.67)*.55556;
end
% Calculation of liquid viscosity
% -------------------------------------------------------------------
if solvent==1 %water
mu=liqmucalc(T, 1);
end
if solvent==2 %1-butene
muk = 0.17; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==3 %dichloroethane
muk = 0.83; % muk at Tk
Tk = 20+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==4 %1-hexene
muk = 0.25; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==5 %1-pentene
muk = 0.24; % muk at Tk
Tk = 273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==6 %acetone
muk = 0.32; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==7 %benzene
muk = 0.61; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==8 %carbon dioxide
muk = 0.06; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==9 %carbon disulfide
muk = 0.36; % muk at Tk
Tk = 20+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==10 %carbon tetrachloride
muk = 0.86; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==11 %chloroform
muk = 0.52; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==12 %cyclohexane
muk = 0.88; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==13 %dichloromethane
muk = 0.41; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==14 %diethyl ether
muk = 0.23; % muk at Tk
Tk = 20+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==15 %ethane
muk = 0.032; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==16 %ethanol
muk = 1.04; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==17 %methanol
muk = 0.55; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==18 %methyl chloride
muk = 0.18; % muk at Tk
Tk = 20+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==19 %n-hexane
muk = 0.30; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==20 %n-octane
muk = 0.51; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==21 %n-pentane
muk = 0.225; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==22 %nitrous oxide
muk = 0.35; % muk at Tk
Tk = -160+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==23 %o-xylene
muk = 0.76; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==24 %phenol
muk = 3.25; % muk at Tk
Tk = 50+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==25 %propane
muk = 0.091; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==26 %propylene
muk = 0.081; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==27 %styrene
muk = 0.71; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if solvent==28 %Toluene
muk = 0.55; % muk at Tk
Tk = 25+273.15;
mu = (muk^-.2661+(T-Tk)/233)^(-1/.2661);
end
if mu > 25
fprintf('This Schmidt number calculated will be inaccurate')
end
%---------------------------------------------------------------------
% Calculation of liquid Diffusivity using Tyn and Calus method
Tbrsolvent = TbpK(j)/critT(j);
Tbrsolute = TbpK(k)/critT(k);
alphasolvent = 0.9076*(1+(Tbrsolvent*log(critP(j)*.01/1.013)/(1-Tbrsolvent)));
alphasolute = 0.9076*(1+(Tbrsolute*log(critP(k)*.01/1.013)/(1-Tbrsolute)));
sigmasolvent = (critP(j)*.01)^(2/3)*(critT(j))^(1/3)*(.132*alphasolvent-.278)*(1-Tbrsolvent)^(11/9);
sigmasolute = (critP(k)*.01)^(2/3)*(critT(k))^(1/3)*(.132*alphasolute-.278)*(1-Tbrsolute)^(11/9);
% Estimating molar volumes at normal boiling temperature
Vsolvent = 0.285*(critV(j)*100^3)^1.048;
Vsolute = 0.285*(critV(k)*100^3)^1.048;
% Diffusivities
DAB = 8.93*10^-8*Vsolvent^.267/(Vsolute)^.433*T/mu*(sigmasolvent/sigmasolute)^.15;
DAB = DAB/(100^2) % changing units to m^2/s rho = lrho(j);
mu = mu*10^-3; % changing units from cP to kg/ (m s)
Sc = mu/(DAB*rho)
|