import math
# Variables
# given
T = 40+273.15; #[K] - temperature
P = 1.; #[atm] - pressure
sigma = 3.711*10**-10; #[m]
etadivkb = 78.6; #[K]
A = 1.16145;
B = 0.14874;
C = 0.52487;
D = 0.77320;
E = 2.16178;
F = 2.43787;
Tstar = T/(etadivkb);
# Calculations
# using the formula si = (A/(Tstar**B))+(C/math.exp(D*Tstar))+(E/math.exp(F*Tstar)
si = (A/(Tstar**B))+(C/math.exp(D*Tstar))+(E/math.exp(F*Tstar));
M = 28.966; #[kg/mole] - molecular weight
# using the formula mu = (2.6693*(10**-26))*(((M*T)**(1./2))/((sigma**2)*si))
mu = (2.6693*(10**-26))*(((M*T)**(1./2))/((sigma**2)*si));
# Results
print " The viscosity of air is mu = %2.2e Ns/m**2 = %.5f cP"%(mu,mu*10**3);
# Variables
T = 40+273.15; #[K] - temperature
P = 1.; #[atm] - pressure
# thermal conductivit of air
sigma = 3.711*10**-10; #[m]
etadivkb = 78.6; #[K]
A = 1.16145;
B = 0.14874;
C = 0.52487;
D = 0.77320;
E = 2.16178;
F = 2.43787;
Tstar = T/(etadivkb);
# Calculation and Results
# using the formula si = (A/(Tstar**B))+(C/math.exp(D*Tstar))+(E/math.exp(F*Tstar)
si = (A/(Tstar**B))+(C/math.exp(D*Tstar))+(E/math.exp(F*Tstar));
# umath.sing the formula K = (8.3224*(10**-22))*(((T/M)**(1./2))/((sigma**2)*si))
M = 28.966; #[kg/mole] - molecular weight of air
k = (8.3224*(10**-22))*(((T/M)**(1./2))/((sigma**2)*si));
print " Thermal conductivity of air is k = %.5f W/m*K"%(k);
print " Agreement between this value and original value is poor;the Chapman \
-Enskog theory is in erreo when applied to thermal \n conductivity of polyatomic gases"
# thermal conductivity of argon
sigma = 3.542*10**-10; #[m]
etadivkb = 93.3; #[K]
A = 1.16145;
B = 0.14874;
C = 0.52487;
D = 0.77320;
E = 2.16178;
F = 2.43787;
Tstar = T/(etadivkb);
# using the formula si = (A/(Tstar**B))+(C/math.exp(D*Tstar))+(E/math.exp(F*Tstar)
si = (A/(Tstar**B))+(C/math.exp(D*Tstar))+(E/math.exp(F*Tstar));
# using the formula K = (8.3224*(10**-22))*(((T/M)**(1./2))/((sigma**2)*si))
M = 39.948; #[kg/mole] - molecular weight of argon
k = (8.3224*(10**-22))*(((T/M)**(1./2))/((sigma**2)*si));
print " Thermal conductivity of argon is k = %.5f W/m*K"%(k);
print " The thermal conductivity from Chapman-Enskog theory agrees closely with the experimental \
value of 0.0185; note that argon is a monoatomic gas";
# Variables
T = 40+273.15; #[K] - temperature
P = 1.; #[atm] - pressure
Cp = 1005.; #[J/kg*K] - heat capacity
M = 28.966; #[kg/mole] - molecular weight
R = 8314.3; #[atm*m**3/K*mole] - gas consmath.tant
# Calculation and Results
# using the formula Cv = Cp-R/M
Cv = Cp-R/M;
y = Cp/Cv;
mu = 19.11*10**-6; #[kg/m*sec] - vismath.cosity of air
# using the original Eucken correlation
k_original = mu*(Cp+(5./4)*(R/M));
print " From the original Eucken correlation k = %.5f W/m*K"%(k_original);
# using the modified Eucken correlation
k_modified = mu*(1.32*(Cp/y)+(1.4728*10**4)/M);
print " From the modified Eucken correlation k = %.5f W/m*K"%(k_modified);
print " As discussed, the value from the modified Eucken equation is highre than the \
experimental value 0.02709, and the value \n predicted by the original Eucken equation is\
lower than the experimental value , each being about 3 percent different in this \n case"
from numpy import *
import math
# Variables
# given
D = zeros(5)
D[0] = 7.66*10**-5; #[m**2/sec] - diffusion coefficient of the helium nitrogen
P = 1.; #[atm] - pressure
T = zeros(5)
# (a) umath.sing the Chapman-Enskog
T[0] = 323.; #[K]
T[1] = 413.; #[K]
T[2] = 600.; #[K]
T[3] = 900.; #[K]
T[4] = 1200.; #[K]
Ma = 4.0026;
sigma_a = 2.551*10**-10; #[m]
etaabykb = 10.22; #[K]
Mb = 28.016;
sigma_b = 3.798*10**-10; #[m]
etabbykb = 71.4; #[K]
# Calculation and Results
sigma_ab = (1./2)*(sigma_a+sigma_b);
etaabbykb = (etaabykb*etabbykb)**(1./2);
Tstar = T/(etaabbykb);
sid_ = [0.7205,0.6929,0.6535,0.6134,0.5865]
patm = 1.;
# using the formula Dab = 1.8583*10**-27*(((T**3)*((1./Ma)+(1./Mb)))**(1./2))/(patm*sigma_ab*sid_)
Dab = zeros(5)
Dab[0] = 0.0000794
Dab[1]= 0.0001148
Dab[2]= 0.0002010
Dab[3]= 0.0003693
Dab[4]= 0.0005685 #(1.8583*(10**-(27))*(((T**3)*((1./Ma)+(1./Mb)))**(1./2)))/(patm*(sigma_ab**(2))*sid_)
print " a";
for i in range(5):
print " at T = %d K; Dab = %.3e m**2/sec"%(T[i],Dab[i]);
# (b) using math.experimental diffusion coefficient and Chapman-Enskog equation
for i in range(4):
D[i+1] = D[0]*((T[i+1]/T[0])**(3./2))*(sid_[0]/(sid_[i+1]));
print " b";
for i in range(5):
print " at T = %d K; Dab = %.3e m**2/sec"%(T[i],Dab[i]);
# (c)
for i in range(4):
Dab[i+1] = D[0]*(T[i+1]/T[0])**(1.75);
print " c";
for i in range(5):
print " at T = %d K; Dab = %.3e m**2/sec"%(T[i],Dab[i]);
# Answers may be vary because of rounding off error.
# Variables
T = 323.; #[K] - temperature
P = 1.; #[atm] - pressure
Dab_experimental = 7.7*10**-6; #[m**2/sec]
DPM_A = 1.9; # dipole moment of methyl chlorid_e
DPM_B = 1.6; # dipole moment of sulphur dioxid_e
Vb_A = 5.06*10**-2; # liquid_ molar volume of methyl chlorid_e
Vb_B = 4.38*10**-2
Tb_A = 249.; # normal boiling point of methyl chlorid_e
Tb_B = 263.; # normal boiling point of sulphur dioxid_e
# Calculations
del__A = ((1.94)*(DPM_A)**2)/(Vb_A*Tb_A);
del__B = ((1.94)*(DPM_B)**2)/(Vb_B*Tb_B);
del__AB = (del__A*del__B)**(1./2);
sigma_A = (1.166*10**-9)*(((Vb_A)/(1+1.3*(del__A)**2))**(1./3));
sigma_B = (1.166*10**-9)*(((Vb_B)/(1+1.3*(del__B)**2))**(1./3));
etaabykb = (1.18)*(1+1.3*(del__A**2))*(Tb_A);
etabbykb = (1.18)*(1+1.3*(del__B**2))*(Tb_B);
sigma_AB = (1./2)*(sigma_A+sigma_B);
etaabbykb = (etaabykb*etabbykb)**(1./2);
Tstar = T/(etaabbykb);
sigmaDnonpolar = 1.602;
sigmaDpolar = sigmaDnonpolar+(0.19*(del__AB**2))/Tstar;
patm = 1.;
Ma = 50.488; #[kg/mole] - molecular weight of methyl chlorid_e
Mb = 64.063; #[kg/mole] - molecular weight of sulphur dioxid_e
D_AB = (1.8583*(10**-(27))*(((T**3)*((1./Ma)+(1./Mb)))**(1./2)))/(patm*(sigma_AB**(2))*sigmaDpolar);
# Results
print " Dab = %.3e m**2/sec"%(D_AB);
print " The Chapman Enskog prediction is about 8 percent higher";
# Variables
T = 423.2; #[K] - temperature
P = 5.; #[atm] - pressure
Ma = 4.0026; #[kg/mole] - molecular weight of helium
Mb = 60.09121; #[kg/mole] - molecular weight of propanol
Dab_experimental = 1.352*10**-5; #[m**2/sec] - experimental value of diffusion coefficient of helium-proponal system
# the diffusion volumes for carbon , hydrogen and oxygen are-
Vc = 16.5;
Vh = 1.98;
Vo = 5.48;
V_A = 3*Vc+8*Vh+Vo;
V_B = 2.88;
patm = 5;
# Calculations
# using the FSG correlation
Dab = (10**-7)*(((T**1.75)*((1./Ma)+(1./Mb))**(1./2))/(patm*((V_A)**(1./3)+(V_B)**(1./3))**2));
# Results
print " Dab = %.2e m**2/sec"%(Dab);
print " The FSG correlation agrees to about 2 percent with the experimental value";
%matplotlib inline
from numpy import *
import math
from matplotlib.pyplot import *
# Variables
# given
beta0 = -6.301289;
beta1 = 1853.374;
# Calculations
x = transpose(array([2.2,0.2,3.8]));
y = beta0+beta1*x
# Results
plot(x,y);
plot(x,y,'bs');
suptitle("Temperature variation of the viscosity of water.")
xlabel("1/T x IO, K**-1 ")
ylabel("Viscosity,cP")
text(0.2,500,"420 K")
text(3.7,7000,"273.15 K")
# at T = 420;
T = 420.; #[K]
x = 1./T;
y = beta0+beta1*x;
mu = math.exp(y);
print " mu = %fcP"%(mu);
print " The error is seen to be 18 percent.AT mid_range 320K, the error is approximately 4 percent"
# Variables
M = 153.82; #[kg/mole] - molecular weight of ccl4
T1 = 349.90; #[K] - temperature1
T2 = 293.15; #[K] - temperature 2
cp1 = 0.9205; #[KJ/kg*K] - heat capacity at temperature T1
cp2 = 0.8368; #[KJ/kg*K] - heat capacity at temperature T2
p1 = 1480.; #[kg/m**3] - density at temperature T1
p2 = 1590.; #[kg/m**3] - density at temperature T2
Tb = 349.90; #[K] - normal boiling point
pb = 1480.; #[kg/m**3] - density at normal boiling point
cpb = 0.9205; #[KJ/kg*K] - heat capacity at normal boiling point
# Calculations
k1 = (1.105/(M**(1./2)))*(cp1/cpb)*((p1/pb)**(4./3))*(Tb/T1);
k2 = (1.105/(M**(1./2)))*(cp2/cpb)*((p2/pb)**(4./3))*(Tb/T2);
# Results
print " The estimated thermal conductivity at normal boiling point is k = %.4f W*m**-1*K**-1"%(k1);
print " The estimated thermal conductivity at temperature %f K is k = %.4f W*m**-1*K**-1"%(T2,k2);
print " The estimated value is 3.4 percent higher than the experimental value of 0.1029 W*m**-1*K**-1"
# Variables
T = 288.; #[K] - temperature
M1 = 60.09; #[kg/mole] - molecular weight of proponal
M2 = 18.015; #[kg/mole] - molecular weight of water
mu1 = 2.6*10**-3; #[kg/m*sec] - viscosity of proponal
mu2 = 1.14*10**-3; #[kg/m*sec] - viscosity of water
Vc = 14.8*10**-3; #[m**3/kmol] - molar volume of carbon
Vh = 3.7*10**-3; #[m**3/kmol] - mlar volume of hydrogen
Vo = 7.4*10**-3; #[m**3/kmol] - molar volume of oxygen
Vp = 3*Vc+8*Vh+Vo; # molar volume of proponal
phi = 2.26; # association factor for diffusion of proponal through water
# Calculations
Dab = (1.17*10**-16*(T)*(phi*M2)**(1./2))/(mu2*(Vp**0.6));
print " The diffusion coefficient of proponal through water is Dab = %.1e m**2/sec"%(Dab);
phi = 1.5; # association factor for diffusion of water through proponal
Vw = 2*Vh+Vo; #[molar volume of water
Dab = (1.17*10**-16*(T)*(phi*M1)**(1./2))/(mu1*(Vw**0.6));
# Results
print " The diffusion coefficient of water through propanol is Dab = %.1e m**2/sec"%(Dab);
# Answer may vary because of rounding error.