From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 905/CH1/EX1.1/1_1.sce | 53 ++++++++++++++++++++++++++++++++++ 905/CH1/EX1.10/1_10.sce | 27 +++++++++++++++++ 905/CH1/EX1.11/1_11.sce | 72 +++++++++++++++++++++++++++++++++++++++++++++ 905/CH1/EX1.12/1_12.sce | 28 ++++++++++++++++++ 905/CH1/EX1.13/1_13.sce | 77 +++++++++++++++++++++++++++++++++++++++++++++++++ 905/CH1/EX1.14/1_14.sce | 23 +++++++++++++++ 905/CH1/EX1.15/1_15.sce | 22 ++++++++++++++ 905/CH1/EX1.16/1_16.sce | 26 +++++++++++++++++ 905/CH1/EX1.19/1_19.sce | 50 ++++++++++++++++++++++++++++++++ 905/CH1/EX1.2/1_2.sce | 42 +++++++++++++++++++++++++++ 905/CH1/EX1.20/1_20.sce | 33 +++++++++++++++++++++ 905/CH1/EX1.21/1_21.sce | 51 ++++++++++++++++++++++++++++++++ 905/CH1/EX1.22/1_22.sce | 54 ++++++++++++++++++++++++++++++++++ 905/CH1/EX1.23/1_23.sce | 25 ++++++++++++++++ 905/CH1/EX1.24/1_24.sce | 49 +++++++++++++++++++++++++++++++ 905/CH1/EX1.3/1_3.sce | 45 +++++++++++++++++++++++++++++ 905/CH1/EX1.6/1_6.sce | 37 ++++++++++++++++++++++++ 905/CH1/EX1.7/1_7.sce | 48 ++++++++++++++++++++++++++++++ 905/CH1/EX1.8/1_8.sce | 41 ++++++++++++++++++++++++++ 905/CH1/EX1.9/1_9.sce | 70 ++++++++++++++++++++++++++++++++++++++++++++ 20 files changed, 873 insertions(+) create mode 100755 905/CH1/EX1.1/1_1.sce create mode 100755 905/CH1/EX1.10/1_10.sce create mode 100755 905/CH1/EX1.11/1_11.sce create mode 100755 905/CH1/EX1.12/1_12.sce create mode 100755 905/CH1/EX1.13/1_13.sce create mode 100755 905/CH1/EX1.14/1_14.sce create mode 100755 905/CH1/EX1.15/1_15.sce create mode 100755 905/CH1/EX1.16/1_16.sce create mode 100755 905/CH1/EX1.19/1_19.sce create mode 100755 905/CH1/EX1.2/1_2.sce create mode 100755 905/CH1/EX1.20/1_20.sce create mode 100755 905/CH1/EX1.21/1_21.sce create mode 100755 905/CH1/EX1.22/1_22.sce create mode 100755 905/CH1/EX1.23/1_23.sce create mode 100755 905/CH1/EX1.24/1_24.sce create mode 100755 905/CH1/EX1.3/1_3.sce create mode 100755 905/CH1/EX1.6/1_6.sce create mode 100755 905/CH1/EX1.7/1_7.sce create mode 100755 905/CH1/EX1.8/1_8.sce create mode 100755 905/CH1/EX1.9/1_9.sce (limited to '905/CH1') diff --git a/905/CH1/EX1.1/1_1.sce b/905/CH1/EX1.1/1_1.sce new file mode 100755 index 000000000..669b6b2bb --- /dev/null +++ b/905/CH1/EX1.1/1_1.sce @@ -0,0 +1,53 @@ +clear; +clc; + +// Illustration 1.1 +// Page: 6 + +printf('Illustration 1.1 - Page: 6\n\n'); + +//*****Data***** +T = 300; // [K] +P = 500; // [kPa] +R = 8.314; // [J/mole.K] +//*****// +printf('Illustration 1.1 (a) - Page: 6\n\n'); +// Solution (a) +// Using equation 1.7 +C = P/(R*T); // [Total molar concentration, kmole/cubic m] +printf("Total molar concentration in the gas feed is %f kmole/cubic m\n\n",C); + +printf('Illustration 1.1 (b) - Page: 7\n\n'); +// Solution (b) + +// Mixture of gases +// Components a-CH4 , b-C2H6 , c-nC3H8 , d-nC4H10 +// Basis: 100 kmole of gas mixture +n_a = 88; // [kmole] +n_b = 4; // [kmole] +n_c = 5; // [kmole] +n_d = 3; // [kmole] +M_a = 16.04; // [gram/mole] +M_b = 30.07; // [gram/mole] +M_c = 44.09; // [gram/mole] +M_d = 58.12; // [gram/mole] +m_a = n_a*M_a; // [kg] +m_b = n_b*M_b; // [kg] +m_c = n_c*M_c; // [kg] +m_d = n_d*M_d; // [kg] +n_total = n_a+n_b+n_c+n_d; // [kmole] +m_total = m_a+m_b+m_c+m_d; // [kg] +M_avg = m_total/n_total; // [kg/kmole] +row = C*M_avg; // [mass density, kg/cubic m] +printf("Average molecular weight of gas feed is %f kg/kmole\n",M_avg); +printf("Density of gas feed is %f kg/cubic m\n\n",row); + +printf('Illustration 1.1 (c) - Page: 7\n\n'); +// Solution (c) + +// Mass fraction of each component +x_a = m_a/m_total; +x_b = m_b/m_total; +x_c = m_c/m_total; +x_d = m_d/m_total; +printf("Mass fraction of CH4, C2H6, nC3H8, nC4H10 are %f, %f, %f, %f respectively",x_a,x_b,x_c,x_d); \ No newline at end of file diff --git a/905/CH1/EX1.10/1_10.sce b/905/CH1/EX1.10/1_10.sce new file mode 100755 index 000000000..bdaec9359 --- /dev/null +++ b/905/CH1/EX1.10/1_10.sce @@ -0,0 +1,27 @@ +clear; +clc; + +// Illustration 1.10 +// Page: 30 + +printf('Illustration 1.10 - Page:30 \n\n'); +// Solution + +//*****Data*****// +// acetone-1 benzene-2 +T = 298; // [K] +x_1 = 0.7808; +x_2 = 1-x_1; +// The infinite dilution diffusivities are +D_12o = 2.75*10^-9; // [square m/s] +D_21o = 4.15*10^-9; // [square m/s] +// From the NRTL equation, for this system at the given temperature and concentration the thermodynamic correction factor r = 0.871. +r = 0.871; +D_12exp = 3.35*10^-9; // [square m/s] +//*****// + +// Using equation 1.56 +D_12 = (D_12o^x_2)*(D_21o^x_1); +D_12 = D_12*r; +printf("The theoritical value of Fick diffusivity is %e square m/s",D_12); +// The predicted value of the Fick diffusivity is in excellent agreement with the experimental result. \ No newline at end of file diff --git a/905/CH1/EX1.11/1_11.sce b/905/CH1/EX1.11/1_11.sce new file mode 100755 index 000000000..863da9d76 --- /dev/null +++ b/905/CH1/EX1.11/1_11.sce @@ -0,0 +1,72 @@ +clear; +clc; + +// Illustration 1.11 +// Page: 33 + +printf('Illustration 1.11 - Page:33 \n\n'); +// Solution + +//*****Data*****// +// ammonia-1 nitrogen-2 hydrogen-3 +T = 300; // [K] +P = 1; // [bar] +y_1 = .40; +y_2 = .20; +y_3 = .40; +//*****// + +// Lennard-Jones parameter for ammonia +sigma_1 = 2.9; // [Angstrom] +d_1 = 558.3; // [E/K, K] +M_1 = 17; // [gram/mole] + +// Lennard-Jones parameter for nitrogen +sigma_2 = 3.798; // [Angstrom] +d_2 = 71.4; // [E/K, K] +M_2 = 28; // [gram/mole] + +// Lennard-Jones parameter for hydrogen +sigma_3 = 2.827; // [Angstrom] +d_3 = 59.7; // [E/K, K] +M_3 = 2; // [gram/mole] + +// Binary diffusivitiy of ammonia in nitrogen (D_12) + +sigma_12 = (sigma_1+sigma_2)/2; // [Angstrom] +d_12 = sqrt(d_1*d_2); // [K] +M_12 = 2/((1/M_1)+(1/M_2)); // [gram/mole] + +T_star12 = T/d_12; +a = 1.06036; b = 0.15610; c = 0.19300; d = 0.47635; e = 1.03587; f = 1.52996; g = 1.76474; h = 3.89411; +ohm12 = ((a/T_star12^b)+(c/exp(d*T_star12))+(e/exp(f*T_star12))+(g/exp(h*T_star12))); + +// Substituting these values into the Wilke-Lee equation yields (equation 1.49) +D_12 = ((10^-3*(3.03-(.98/sqrt(M_12)))*T^1.5)/(P*(sqrt(M_12))*(sigma_12^2)*ohm12)); // [square cm/s] +printf("The diffusivitiy of ammonia in nitrogen %e square cm/s\n",D_12); + +// Binary diffusivitiy of ammonia in hydrogen (D_13) + +sigma_13 = (sigma_1+sigma_3)/2; // [Angstrom] +d_13 = sqrt(d_1*d_3); // [K] +M_13 = 2/((1/M_1)+(1/M_3)); // [gram/mole] + +T_star13 = T/d_13; +a = 1.06036; b = 0.15610; c = 0.19300; d = 0.47635; e = 1.03587; f = 1.52996; g = 1.76474; h = 3.89411; +ohm13 = ((a/T_star13^b)+(c/exp(d*T_star13))+(e/exp(f*T_star13))+(g/exp(h*T_star13))); + +// Substituting these values into the Wilke-Lee equation yields (equation 1.49) +D_13 = ((10^-3*(3.03-(.98/sqrt(M_13)))*T^1.5)/(P*(sqrt(M_13))*(sigma_13^2)*ohm13)); // [square cm/s] +printf("The diffusivitiy of ammonia in hydrogen %e square cm/s\n",D_13); + +// Figure 1.5 shows the flux of ammonia (N_1) toward the catalyst surface, where +// it is consumed by chemical reaction, and the fluxes of nitrogen (N_2) and hydrogen (N_3) +// produced by the reaction migrating away from the same surface. + +// Therefore N_1 = N_2+N_3 +// From equation 1.59 +// N_2 = -(0.5)*N_1 and N_3 = -(1.5)*N_1 + +// Substituting in equation (1.58) we obtain +D_1eff = (1+y_1)/((y_2+0.5*y_1)/D_12 + (y_3+1.5*y_1)/D_13); // [square cm/s] +printf("The effective diffusivity of ammonia in the gaseous mixture is %e square cm/s",D_1eff); \ No newline at end of file diff --git a/905/CH1/EX1.12/1_12.sce b/905/CH1/EX1.12/1_12.sce new file mode 100755 index 000000000..d95f98586 --- /dev/null +++ b/905/CH1/EX1.12/1_12.sce @@ -0,0 +1,28 @@ +clear; +clc; + +// Illustration 1.12 +// Page: 34 + +printf('Illustration 1.12 - Page:34 \n\n'); +// Solution + +//*****Data*****// +// ammonia-1 nitrogen-2 hydrogen-3 +T = 300; // [K] +P = 1; // [bar] +y_1 = .40; +y_2 = .20; +y_3 = .40; +//*****// + +// The binary diffusivities are the same as for Example 1.11. +D_12 = 0.237; // [square cm/s] +D_13 = 0.728; // [square cm/s] + +// mole fractions of nitrogen (2) and hydrogen (3) on an ammonia (1)-free base from equation (1.61) +y_21 = y_2/(1-y_1); +y_31 = y_3/(1-y_1); +// Substituting in equation (1.60) gives us +D_1eff = 1/((y_21/D_12)+(y_31/D_13)); +printf("The effective diffusivity of ammonia in the gaseous mixture is %e square cm/s",D_1eff); \ No newline at end of file diff --git a/905/CH1/EX1.13/1_13.sce b/905/CH1/EX1.13/1_13.sce new file mode 100755 index 000000000..6a9c5db4e --- /dev/null +++ b/905/CH1/EX1.13/1_13.sce @@ -0,0 +1,77 @@ +clear; +clc; + +// Illustration 1.13 +// Page: 36 + +printf('Illustration 1.13 - Page:36 \n\n'); +// Solution + +//*****Data***** +// acetic acid-1 water-2 ethyl alcohol-3 +T = 298; // [K] +// The data required data for water at 298 K +u_2 = 0.894; // [cP] +V_c1 = 171; // [cubic cm/mole] +// From equation 1.48 +V_b1 = 62.4; // [cubic cm/mole] +// Substituting in equation (1.53) +// the infinite dilution diffusion coefficient of acetic acid in water at 298 K +E = (9.58/V_b1)-1.12; +D_abo12 = (1.25*10^-8)*(((V_b1)^-.19)-0.292)*(T^1.52)*(u_2^E); // [square cm/s] + + +// Data for acetic acid +T_b1 = 390.4; // [K] +T_c1 = 594.8; // [K] +P_c1 = 57.9; // [bar] +V_c1 = 171; // [cubic cm/mole] +M_1 = 60; // [gram/mole] + +// Data for ethanol +T_b3 = 351.4; // [K] +T_c3 = 513.9; // [K] +P_c3 = 61.4; // [bar] +V_c3 = 167; // [cubic cm/mole] +M_3 = 46; // [gram/mole] +u_3 = 1.043; // [cP] + +// Using the Hayduk and Minhas correlation for nonaqueous solutions + +// According to restriction 3 mentioned above, the molar volume of the acetic acid to be used in equation (1.54) should be +V_b1 = V_b1*2; // [cubic cm/mole] +// The molar volume of ethanol is calculated from equation (1.48) +V_b3 = 60.9; // [cubic cm/mole] + + +// For acetic acid (1) +T_br1 = T_b1/T_c1; // [K] +// Using equation 1.55 +alpha_c1 = 0.9076*(1+((T_br1)*log(P_c1/1.013))/(1-T_br1)); +sigma_c1 = (P_c1^(2/3))*(T_c1^(1/3))*(0.132*alpha_c1-0.278)*(1-T_br1)^(11/9); // [dyn/cm] + +// For ethanol (3) +T_br3 = T_b3/T_c3; // [K] +// Using equation 1.55 +alpha_c3 = 0.9076*(1+((T_br3*log(P_c3/1.013))/(1-T_br3))); +sigma_c3 = (P_c3^(2/3))*(T_c3^(1/3))*(0.132*alpha_c3-0.278)*(1-T_br3)^(11/9); // [dyn/cm] + +// Substituting in equation 1.54 +D_abo13 = (1.55*10^-8)*(V_b3^0.27)*(T^1.29)*(sigma_c3^0.125)/((V_b1^0.42)*(u_3^0.92)*(sigma_c1^0.105)); + +// The viscosity of a 40 wt% aqueous ethanol solution at 298 K is u_mix = 2.35 cP +u_mix = 2.35; // [cP] +// The solution composition must be changed from mass to molar fractions following a procedure similar to that illustrated in Example 1.2 +// Accordingly, a 40 wt% aqueous ethanol solution converts to 20.7 mol%. +// Therefore mole fraction of ethanol (x_3) and water (x_2) + +x_3 = 0.207; +x_2 = 1-x_3; +// Using equation 1.62 +D_1eff = ((x_2*D_abo12*(u_2^0.8))+(x_3*D_abo13*(u_3^0.8)))/(u_mix^0.8); +printf("The diffusion coefficient of acetic acid at very low concentrations diffusing into a mixed solvent containing 40.0 wt percent ethyl alcohol in water at a temperature of 298 K is %e square cm/s\n\n",D_1eff); + +// The experimental value reported by Perkins and Geankoplis (1969) is +D_1exp = 5.71*10^-6; // [square cm/s] +percent_error = ((D_1eff-D_1exp)/D_1exp)*100; // [%] +printf("The error of the estimate is %f\n",percent_error); \ No newline at end of file diff --git a/905/CH1/EX1.14/1_14.sce b/905/CH1/EX1.14/1_14.sce new file mode 100755 index 000000000..91a82850f --- /dev/null +++ b/905/CH1/EX1.14/1_14.sce @@ -0,0 +1,23 @@ +clear; +clc; + +// Illustration 1.14 +// Page: 39 + +printf('Illustration 1.14 - Page:39 \n\n'); +// Solution + +//*****Data***** +// Binary gaseous mixture of components A and B +P = 1; // [bar] +T = 300; // [K] +R = 8.314; // [cubic m.Pa/mole.K] +delta = 1; // [mm] +y_A1 = 0.7; +y_A2 = 0.2; +D_AB = 0.1; // [square cm/s] +//*****// + +// Using equation 1.72 +N_A = (D_AB*10^-4)*(P*10^5)*(y_A1-y_A2)/(R*T*delta*10^-3); +printf("The molar flux of component A is %f mole/square m.s",N_A); \ No newline at end of file diff --git a/905/CH1/EX1.15/1_15.sce b/905/CH1/EX1.15/1_15.sce new file mode 100755 index 000000000..bfd41b06e --- /dev/null +++ b/905/CH1/EX1.15/1_15.sce @@ -0,0 +1,22 @@ +clear; +clc; + +// Illustration 1.15 +// Page: 43 + +printf('Illustration 1.15 - Page:43 \n\n'); +// Solution + +//*****Data*****// +// Diffusion of A through stagnant B +P_total = 1.0; // [bar] +P_B1 = 0.8; // [bar] +P_B2 = 0.3; // [bar] +//*****// + +// Using equation 1.83 +P_BM = (P_B2-P_B1)/(log(P_B2/P_B1)); // [bar] +// using the result of Example 1.14, we have +N_A = 0.2; // [mole/square m.s] +N_A = N_A*P_total/P_BM; // [moloe/square m.s] +printf("The molar flux of component A is %f mole/square m.s",N_A); \ No newline at end of file diff --git a/905/CH1/EX1.16/1_16.sce b/905/CH1/EX1.16/1_16.sce new file mode 100755 index 000000000..fcdb43084 --- /dev/null +++ b/905/CH1/EX1.16/1_16.sce @@ -0,0 +1,26 @@ +clear; +clc; + +// Illustration 1.16 +// Page: 44 + +printf('Illustration 1.16 - Page:44 \n\n'); +// Solution + +//*****Data*****// +// Nickel Carbonyl-A carbon monoxide-B +T = 323; // [K] +P = 1; // [atm] +R = 8.314; // [cubic m.Pa/mole.K] +y_A1 = 1.0; +y_A2 = 0.5; +delta = 0.625; // [mm] +D_AB = 20; // [square mm/s] +//*****// + +// The stoichiometry of the reaction determines the relation between the fluxes: from equation (1-59), N_B = - 4N_A and N_A + N_B = -3NA +// Molar flux fraction si_A = N_A/(N_A+N_B) = N_A/(-3*N_A) = -1/3 +si_A = -1/3; +// Using equation 1.78 +N_A = si_A*(D_AB*10^-6*P*10^5*log((si_A-y_A2)/(si_A-y_A1))/(R*T*delta*10^-3)); +printf("The molar flux of component A is %f mole/square m.s",N_A); diff --git a/905/CH1/EX1.19/1_19.sce b/905/CH1/EX1.19/1_19.sce new file mode 100755 index 000000000..70a0bd3d5 --- /dev/null +++ b/905/CH1/EX1.19/1_19.sce @@ -0,0 +1,50 @@ +clear; +clc; + +// Illustration 1.19 +// Page: 54 + +printf('Illustration 1.19 - Page:54 \n\n'); +// Solution + +//*****Data*****// +// a-CuS04 b-H2O +T = 273; // [K] +delta = 0.01; // [mm] +sol_ab = 24.3; // [gram/100 gram water] +den_ab = 1140; // [kg/cubic m] +D_ab = 3.6*10^-10; // [square m/s] +den_b = 999.8; // [kg/cubic m] +//*****// + +// both fluxes are in the same direction; therefore, they are both positive and relation is N_b = 5N_a (where N_b and N_a are molar fluxes of component 'a' and 'b') +// From equation (1.76), si_a = 1/6 = 0.167 +si_a = 0.167; +// Calculation of mole fraction of component 'a' +// Basis: 100 gram H2O (b) +M_a = 159.63; // [gram/mole] +M_b = 18; // [gram/mole] +M_c =249.71; // [here M_c is molecular mass of hydrated CuSO4, gram/mole] +m_a = 24.3; // [gram] +m_c = m_a*(M_a/M_c); // [here m_c is the mass of CuSO4 in 24.3 gram of crystal, gram] +m_d = m_a-m_c; // [here m_d is mass of hydration of water in the crystal, gram] +m_b_total = 100+m_d; // [total mass of water, gram] + +x_a1 = (m_c/M_a)/((m_c/M_a)+(m_b_total/M_b)); +x_a2 = 0; + +// At point 1, the average molecular weight is +M_1 = x_a1*M_a+(1-x_a1)*M_b; // [gram/mole] +// At point 2, the average molecular weight is +M_2 = x_a2*M_a+(1-x_a2)*M_b +// Molar density at point 1 and 2 +row_1 = den_ab/M_1; // [kmole/cubic m] +row_2 = den_b/M_2 +row_avg = (row_1+row_2)/2; // [kmole/cubic m] + +// Using equation 1.96 + +N_a = si_a*D_ab*row_avg*log((si_a-x_a2)/(si_a-x_a1))/(delta*10^-3); // [kmole/square m.s] +rate = N_a*M_c*3600; // [kg/square m of crystal surface area per hour] +printf("the rate at which the crystal dissolves in solution is %f kg/square m of crystal surface area per hour",rate); + diff --git a/905/CH1/EX1.2/1_2.sce b/905/CH1/EX1.2/1_2.sce new file mode 100755 index 000000000..3c5fe66d4 --- /dev/null +++ b/905/CH1/EX1.2/1_2.sce @@ -0,0 +1,42 @@ +clear; +clc; + +// Illustration 1.2 +// Page: 7 + +printf('Illustration 1.2 - Page: 7\n\n'); + +//*****Data***** +// Component a-KNO3 b-H20 +T = 293; // [K] +s_eqm = 24; // [percent by weight, %] +row = 1162; // [density of saturated solution, kg/cubic m] +//*****// + +printf('Illustration 1.2 (a)- Page: 7\n\n'); +// Solution (a) + +// Basis: 100 kg of fresh wash solution +m_a = (s_eqm/100)*100; // [kg] +m_b = 100 - m_a; // [kg] +M_a = 101.10; // [gram/mole] +M_b = 18.02; // [gram.mole] +// Therefore moles of component 'a' and 'b' are +n_a = m_a/M_a; // [kmole] +n_b = m_b/M_b; // [kmole] + +m_total = 100; // [basis, kg] +n_total = n_a+n_b; // [kmole] +// Average molecular weight +M_avg = m_total/n_total; // [kg/kmole] +// Total molar density of fresh solution +C = row/M_avg; // [kmole/cubic m] +printf("Total molar density of fresh solution is %f kmole/cubic m\n\n",C); + +printf('Illustration 1.2 (b)- Page: 8\n\n'); +// Solution (b) + +// mole fractions of components 'a' and 'b' +x_a = n_a/n_total; +x_b = n_b/n_total; +printf("Mole fraction of KNO3 and H2O is %f %f",x_a,x_b); \ No newline at end of file diff --git a/905/CH1/EX1.20/1_20.sce b/905/CH1/EX1.20/1_20.sce new file mode 100755 index 000000000..a2d69f2a6 --- /dev/null +++ b/905/CH1/EX1.20/1_20.sce @@ -0,0 +1,33 @@ +clear; +clc; + +// Illustration 1.20 +// Page: 58 + +printf('Illustration 1.20 - Page:58 \n\n'); +// Solution + +//*****Data*****// +// A-hydrogen B-ethane +T = 373; // [K] +P = 10; // [atm] +d = 4000; // [Angstrom] +e = 0.4; // [porosity] +t = 2.5; // [tortuosity] +D_AB = 0.86/P; // [square cm/s] +k = 1.3806*10^-23; // [J/K] +//*****// + +// Using data from Appendix B for hydrogen and ethane, and equation (1.45) +sigma_A = 2.827; // [Angstrom] +sigma_B = 4.443; // [Angstrom] +sigma_AB = ((sigma_A+sigma_B)/2)*10^-10; // [m] + +lambda = k*T/(sqrt(2)*3.14*(sigma_AB^2)*P*1.01325*10^5); // [m] +lambda = lambda*10^10; // [Angstrom] +// From equation 1.101 +K_n = lambda/d; +printf("The value of a dimensionless ratio, Knudsen number is %f\n\n",K_n); +// If K_n is less than 0.05 then diffusion inside the pores occurs only by ordinary molecular diffusion and equation 1.100 can be used to calculate D_ABeff +D_ABeff = D_AB*e/t; +printf("The effective diffusivity of hydrogen in ethane is %f square cm /s",D_ABeff); \ No newline at end of file diff --git a/905/CH1/EX1.21/1_21.sce b/905/CH1/EX1.21/1_21.sce new file mode 100755 index 000000000..1cbe34140 --- /dev/null +++ b/905/CH1/EX1.21/1_21.sce @@ -0,0 +1,51 @@ +clear; +clc; + +// Illustration 1.21 +// Page: 60 + +printf('Illustration 1.21 - Page:60 \n\n'); +// Solution + +//*****Data*****// +// a-oxygen b-nitrogen +T = 293; // [K] +P = 0.1; // [atm] +d = 0.1*10^-6; // [m] +e = 0.305; // [porosity] +t = 4.39; // [tortuosity] +k = 1.3806*10^-23; // [J/K] +l = 2*10^-3; // [m] +R = 8.314; // [cubic m.Pa/mole.K] +x_a1 = 0.8; +x_a2 = 0.2; +M_a = 32; // [gram/mole] +M_b = 28; // [gram/mole] +//*****// + +// Using data from Appendix B for oxygen and nitrogen, and equation (1.45) +sigma_a = 3.467; // [Angstrom] +sigma_b = 3.798; // [Angstrom] +sigma_AB = ((sigma_a+sigma_b)/2)*10^-10; // [m] + +lambda = k*T/(sqrt(2)*3.14*(sigma_AB^2)*P*1.01325*10^5); // [m] +// From equation 1.101 +K_n = lambda/d; +printf("The value of a dimensionless ratio, Knudsen number is %f\n\n",K_n); +// If K_n is greater than 0.05 then transport inside the pores is mainly by Knudsen diffusion +// Using equation 1.103 +D_Ka = (d/3)*(sqrt(8*R*T)/sqrt(3.14*M_a*10^-3)); // [square m/s] + +// Using equation 1.107 +D_Kaeff = D_Ka*e/t; // [square m/s] + +p_a1 = (x_a1*P)*1.01325*10^5; // [Pa] +p_a2 = (x_a2*P)*1.01325*10^5; // [Pa] + +// Using equation 1.108 +N_a = D_Kaeff*(p_a1-p_a2)/(R*T*l); // [mole/square m.s] +// Now using the Graham’s law of effusion for Knudsen diffusion +// N_b/N_a = -sqrt(M_a/M_b) ,therefore +N_b = -N_a*sqrt(M_a/M_b); // [mole/square m.s] + +printf("The diffusion fluxes of both components oxygen and nitrogen are %e mole/square m.s and %e mole/square m.s respectively\n",N_a,N_b); diff --git a/905/CH1/EX1.22/1_22.sce b/905/CH1/EX1.22/1_22.sce new file mode 100755 index 000000000..e0225cdae --- /dev/null +++ b/905/CH1/EX1.22/1_22.sce @@ -0,0 +1,54 @@ +clear; +clc; + +// Illustration 1.22 +// Page: 61 + +printf('Illustration 1.22 - Page:61 \n\n'); +// Solution + +//*****Data*****// +// a-oxygen b-nitrogen +T = 293; // [K] +P = 0.1; // [atm] +d = 0.3*10^-6; // [m] +e = 0.305; // [porosity] +t = 4.39; // [tortuosity] +k = 1.3806*10^-23; // [J/K] +R = 8.314; // [cubic m.Pa/mole.K] +l = 2*10^-3; // [m] +D_ab = 2.01*10^-4; // [square m/s] +y_a1 = 0.8; +y_a2 = 0.2; +//*****// + +// Using data from Appendix B for oxygen and nitrogen, and equation (1.45) +sigma_a = 3.467; // [Angstrom] +sigma_b = 3.798; // [Angstrom] +sigma_AB = ((sigma_a+sigma_b)/2)*10^-10; // [m] + +lambda = k*T/(sqrt(2)*3.14*(sigma_AB^2)*P*1.01325*10^5); // [m] +// From equation 1.101 +K_n = lambda/d; +printf("The value of a dimensionless ratio, Knudsen number is %f\n\n",K_n); + +// It means that both molecular and Knudsen diffusion are important and equation (1.109) must be used to calculate N_a +// From example 1.21 N_b/N_a = -1.069 +// Therefore si_a = 1/(1+(N_b/N_a)) +si_a = 1/(1+(-1.069)); + +// From equation 1.100 +D_abeff = D_ab*e/t; // [square m/s] + +// From equation 1.103 +D_Ka = (d/3)*(sqrt(8*R*T)/sqrt(3.14*M_a*10^-3)); // [square m/s] + +// Using equation 1.107 +D_Kaeff = D_Ka*e/t; // [square m/s] + +Y_a = 1+(D_abeff/D_Kaeff); + +// Using equation 1.109 to calculate N_a +N_a = (si_a*P*1.01325*10^5*D_abeff*log((si_a*Y_a-y_a2)/(si_a*Y_a-y_a1)))/(R*T*l); +N_b = -1.069*N_a; +printf("The diffusion fluxes of both components oxygen and nitrogen are %e mole/square m.s and %e mole/square m.s respectively\n",N_a,N_b); \ No newline at end of file diff --git a/905/CH1/EX1.23/1_23.sce b/905/CH1/EX1.23/1_23.sce new file mode 100755 index 000000000..6499d9c34 --- /dev/null +++ b/905/CH1/EX1.23/1_23.sce @@ -0,0 +1,25 @@ +clear; +clc; + +// Illustration 1.23 +// Page: 62 + +printf('Illustration 1.23 - Page:62 \n\n'); +// Solution + +//*****Data*****// +// A-beta dextrin B-water +T = 293; // [K] +d = 88.8; // [Average pore diameter, Angstrom] +d_mol = 17.96; // [Molecular diameter, Angstrom] +e = 0.0233; // [porosity] +t = 1.1; // [tortuosity] +D_AB = 3.22*10^-6; // [square cm/s] +//*****// + +// Using equation 1.111 to calculate restrictive factor +K_r = (1-(d_mol/d))^4 + +// Using equation 1.110 to calculate effective diffusivity +D_ABeff = e*D_AB*K_r/t; // [square cm/s] +printf("The effective diffusivity of beta-dextrin at 298 K is %e square cm/s",D_ABeff); \ No newline at end of file diff --git a/905/CH1/EX1.24/1_24.sce b/905/CH1/EX1.24/1_24.sce new file mode 100755 index 000000000..9f6e3cfd1 --- /dev/null +++ b/905/CH1/EX1.24/1_24.sce @@ -0,0 +1,49 @@ +clear; +clc; + +// Illustration 1.24 +// Page: 63 + +printf('Illustration 1.24 - Page:63 \n\n'); +// Solution + +//*****Data*****// +// a-nitrogen +P_atm = 1.01325*10^5; // [Pa] +T = 300; // [K] +P_2 = 10130; // [Pa] +P_1 = 500+P_2; // [Pa] +d = 0.01*10^-2; // [average pore diameter, m] +u = 180; // [micro Poise] +u = 180*10^-6*10^-1; // [Pa.s] +l = 25.4*10^-3; // [m] +v = 0.05; // [volumetric flow rate, cubic m/square m.s] +R = 8.314; // [cubic m.Pa/mole.K] +//*****// + +printf('Illustration 1.24 (a) - Page:63 \n\n'); +// Solution (a) + +P_avg = (P_1+P_2)/2; // [Pa] +// The mean free path for nitrogen is from equation (1.102) +lambda = 0.622*10^-6; // [m] +K_n = lambda/d; +// Therefore, Knudsen diffusion will not occur and all the flow observed is of a hydrodynamic nature. + +// From the ideal gas law, the nitrogen flux corresponding to the volumetric flow rate of 0.05 m3/m2-s at 300 K and 1 atm + +N_a = P_atm*v/(R*T); // [mole/square m.s] +// Using equation 1.113 +B_o = u*R*T*N_a*l/(P_avg*(P_1-P_2)); // [square m] +printf("The value of the viscous flow parameter is %e square m\n\n",B_o); + +printf('Illustration 1.24 (b) - Page:64 \n\n'); +// Solution (b) + +T1 = 393; // [K] +u = 220; // [micro Poise] +u = 220*10^-6*10^-1; // [Pa.s] +// Substituting in equation (1.113) the new values of temperature and viscosity and the value of B_o, obtained in part (a) while maintaining the pressure conditi// ons unchanged, we get N_a +N_a1 = B_o*P_avg*(P_1-P_2)/(l*T*u*R); // [mole/square m.s] +v1 = N_a1*R*T/P_atm; // [cubic m(measured at 300 K and 1 atm)/ square m.s] +printf("The nitrogen flow to be expected at 393 K with the same pressure difference is %e cubic m(measured at 300 K and 1 atm)/ square m.s\n",v1); diff --git a/905/CH1/EX1.3/1_3.sce b/905/CH1/EX1.3/1_3.sce new file mode 100755 index 000000000..d4cea7d1a --- /dev/null +++ b/905/CH1/EX1.3/1_3.sce @@ -0,0 +1,45 @@ +clear; +clc; + +// Illustration 1.3 +// Page: 9 + +printf('Illustration 1.3 - Page:9 \n\n'); + +//*****Data*****// +// Blood contains two parts a-blood cells b-plasma +f_a = 45; // [percent of blood cells by volume] +f_b = 55; // [percent of plasma by volume] +r = 1200; // [Rate of blood which is pumped through artificial kidney, mL/minute] +m_urine = 1540; // [mass of urine collected, g] +x_u = 1.3; // [urea concentration, percent by weight] +// Data for sample of blood plasma +c_urea = 155.3; // [mg/dL] +d = 1.0245; // [specfic gravity of plasma] +//*****// + +printf('Illustration 1.3 (a) - Page:9 \n\n'); +// Solution (a) + +// Basis: 4 hours +// Assuming that the rate of formation and decomposition of urea during the procedure is negligible and that no urea is removed by the patient’s kidneys +// Therefore urea in “clean” blood = urea in “dirty” blood - urea in urine + +m_u = m_urine*(x_u/100); // [mass of urea in urine, g] +// total volume of plasma that flows through the artificial kidney in 4 hours +V_b = r*60*(f_b/100)*(1/100)*4; // [dL] +// urea in dirty blood from given plasma concentration +m_ud = c_urea*(1/1000)*V_b; // [g] +// urea removal efficiency +n = (m_u/m_ud)*100; +printf("Urea removal efficiency is %f\n\n",n); + +printf('Illustration 1.3 (b) - Page:10 \n\n'); +// Solution (b) + +m_uc = m_ud-m_u; // [mass of urea on clean blood, g] +m_p = d*100*V_b; // [Mass of plasma entering, g] +m_rem = m_p-m_urine; // [Mass of plasma remaining, g] +V_brem = m_rem/(d*100); // [Volume of plasma remaining, dL] +c_y = (m_uc*1000)/V_brem; // [urea concentration in remaining plasma, mg/dL] +printf("urea concentration in the plasma of the cleansed blood is %f mg/dL",c_y); \ No newline at end of file diff --git a/905/CH1/EX1.6/1_6.sce b/905/CH1/EX1.6/1_6.sce new file mode 100755 index 000000000..20474810f --- /dev/null +++ b/905/CH1/EX1.6/1_6.sce @@ -0,0 +1,37 @@ +clear; +clc; + +// Illustration 1.6 +// Page: 21 + +printf('Illustration 1.6 - Page:21 \n\n'); +// Solution + +//*****Data*****// +// a-CS2 b-air +T = 273; // [K] +P = 1; // [bar] +// 1 bar = 10^5 Pa +// Values of the Lennard-Jones parameters (sigma and E/K) are obtained from Appendix B: +sigma_a = 4.483; // [1st Lennard-Jones parameter, Angstrom] +sigma_b = 3.620; // [Angstrom] +d_a = 467; // [d = E/K 2nd Lennard-Jones parameter, K] +d_b = 97; // [K] +M_a = 76; // [gram/mole] +M_b = 29; // [gram/mole] +sigma_ab = (sigma_a+sigma_b)/2; // [Angstrom] +d_ab = sqrt(d_a*d_b); // [K] +M_ab = 2/((1/M_a)+(1/M_b)); // [gram/mole] + +T_star = T/d_ab; +a = 1.06036; b = 0.15610; c = 0.19300; d = 0.47635; e = 1.03587; f = 1.52996; g = 1.76474; h = 3.89411; +ohm = ((a/T_star^b)+(c/exp(d*T_star))+(e/exp(f*T_star))+(g/exp(h*T_star))); + +// Substituting these values into the Wilke-Lee equation yields (equation 1.49) +D_ab = ((10^-3*(3.03-(.98/sqrt(M_ab)))*T^1.5)/(P*(sqrt(M_ab))*(sigma_ab^2)*ohm)); // [square cm/s] +printf("The diffusivity of carbon disulfide vapor in air at 273 K and 1 bar is %e square cm/s\n",D_ab); + +// The experimental value of D_ab obtained from Appendix A: +D_abexp = (.894/(P*10^5))*10^4; // [square cm/s] +percent_error = ((D_ab-D_abexp)/D_abexp)*100; // [%] +printf("The percent error of the estimate, compared to the experimental value is %f ",percent_error); \ No newline at end of file diff --git a/905/CH1/EX1.7/1_7.sce b/905/CH1/EX1.7/1_7.sce new file mode 100755 index 000000000..44ba378b6 --- /dev/null +++ b/905/CH1/EX1.7/1_7.sce @@ -0,0 +1,48 @@ +clear; +clc; + +// Illustration 1.7 +// Page: 22 + +printf('Illustration 1.7 - Page:22 \n\n'); +// Solution + +//*****Data*****// +// A-C3H5Cl B-air +T = 298; // [K] +P = 1; // [bar] +//*****// + +// Values of the Lennard-Jones parameters for allyl chloride must be estimated from equations (1.46) and (1.47). +// From Table 1.2 +V_bA = 3*14.8+5*3.7+24.6; // [cubic cm/mole] +// From equation 1.46 +sigma_A = 1.18*(V_bA)^(1/3); // [1st Lennard-Jones parameter, Angstrom] +// Normal boiling-point temperature for allyl chloride is Tb = 318.3 K +// From equation 1.47, E/K = 1.15*Tb +T_b = 318.3; // [K] +d_A = 1.15*T_b; // [2nd Lennard-Jones parameter for C3H5Cl E/K, K] +M_A = 76.5; // [gram/mole] + +// Lennard-Jones parameters for air +sigma_B = 3.62; // [Angstrom] +d_B = 97; // [2nd Lennard-Jones parameter for air E/K, K] + +M_B = 29; // [gram/mole] + +sigma_AB = (sigma_A+sigma_B)/2; // [Angstrom] +d_AB = sqrt(d_A*d_B); // [K] +M_AB = 2/((1/M_A)+(1/M_B)); // [gram/mole] + +T_star = T/d_AB; +a = 1.06036; b = 0.15610; c = 0.19300; d = 0.47635; e = 1.03587; f = 1.52996; g = 1.76474; h = 3.89411; +ohm = ((a/T_star^b)+(c/exp(d*T_star))+(e/exp(f*T_star))+(g/exp(h*T_star))); + +// Substituting these values into the Wilke-Lee equation yields (equation 1.49) +D_AB = ((10^-3*(3.03-(.98/sqrt(M_AB)))*T^1.5)/(P*(sqrt(M_AB))*(sigma_AB^2)*ohm)); // [square cm/s] +printf("The diffusivity of allyl chloride in air at 298 K and 1 bar is %e square cm/s\n",D_AB); + +// The experimental value of D_AB reported by Lugg (1968) is 0.098 square cm/s +D_ABexp = .098; // [square cm/s] +percent_error = ((D_AB-D_ABexp)/D_ABexp)*100; // [%] +printf("The percent error of the estimate, compared to the experimental value is %f ",percent_error); \ No newline at end of file diff --git a/905/CH1/EX1.8/1_8.sce b/905/CH1/EX1.8/1_8.sce new file mode 100755 index 000000000..b0396b268 --- /dev/null +++ b/905/CH1/EX1.8/1_8.sce @@ -0,0 +1,41 @@ +clear; +clc; + +// Illustration 1.8 +// Page: 26 + +printf('Illustration 1.8 - Page:26 \n\n'); +// Solution + +//*****Data*****// +// solute A-C2H60 solvent B-water +T = 288; // [K] +//*****// +// Critical volume of solute +V_c = 167.1; // [cubic cm/mole] +// Calculating molar volume using equation 1.48 +V_ba = 0.285*(V_c)^1.048; // [cubic cm/mole] +u_b = 1.153; // [Viscosity of liquid water at 288 K, cP] +M_solvent = 18; // [gram/mole] +phi_b = 2.26; // [association factor of solvent B] + +printf('Illustration 1.8 (a) - Page:26 \n\n'); +// Solution (a) + +// Using the Wilke-Chang correlation, equation 1.52 +D_abo1 = (7.4*10^-8)*(sqrt(phi_b*M_solvent))*T/(u_b*(V_ba)^.6); // [diffusivity of solute A in very dilute solution in solvent B, square cm/s] +printf("Diffusivity of C2H60 in a dilute solution in water at 288 K is %e square cm/s\n",D_abo1); +// The experimental value of D_abo reported in Appendix A is 1.0 x 10^-5 square cm/s +D_aboexp = 1*10^-5; // [square cm/s] +percent_error1 = ((D_abo1-D_aboexp)/D_aboexp)*100; // [%] +printf("The percent error of the estimate, compared to the experimental value is %f\n\n ",percent_error1); + +printf('Illustration 1.8 (b) - Page:27 \n\n'); +// Solution (b) + +// Using the Hayduk and Minhas correlation for aqueous solutions equation 1.53 +E = (9.58/V_ba)-1.12; +D_abo2 = (1.25*10^-8)*(((V_ba)^-.19)-0.292)*(T^1.52)*(u_b^E); // [square cm/s] +printf("Diffusivity of C2H60 in a dilute solution in water at 288 K is %e square cm/s\n",D_abo2); +percent_error2 = ((D_abo2-D_aboexp)/D_aboexp)*100; // [%] +printf("The percent error of the estimate, compared to the experimental value is %f ",percent_error2); \ No newline at end of file diff --git a/905/CH1/EX1.9/1_9.sce b/905/CH1/EX1.9/1_9.sce new file mode 100755 index 000000000..6c48a44c2 --- /dev/null +++ b/905/CH1/EX1.9/1_9.sce @@ -0,0 +1,70 @@ +clear; +clc; + +// Illustration 1.9 +// Page: 27 + +printf('Illustration 1.9 - Page:27 \n\n'); +// Solution + +//*****Data*****// +// A-acetic acid(solute) B-acetone(solvent) +T = 313; // [K] +// The following data are available (Reid, et al., 1987): + +// Data for acetic acid +T_bA = 390.4; // [K] +T_cA = 594.8; // [K] +P_cA = 57.9; // [bar] +V_cA = 171; // [cubic cm/mole] +M_A = 60; // [gram/mole] + +// Data for acetone +T_bB = 329.2; // [K] +T_cB = 508; // [K] +P_cB = 47; // [bar] +V_cB = 209; // [cubic cm/mole] +u_bB = 0.264; // [cP] +M_B = 58; // [gram/mole] +phi = 1; + +printf('Illustration 1.9 (a) - Page:27 \n\n'); +// Solution (a) +// Using equation 1.48 +V_bA = 0.285*(V_cA)^1.048; // [cubic cm/mole] + +// Using the Wilke-Chang correlation , equation 1.52 +D_abo1 = (7.4*10^-8)*(sqrt(phi*M_B))*T/(u_bB*(V_bA)^.6); +printf("Diffusivity of acetic acid in a dilute solution in acetone at 313 K using the Wilke-Chang correlation is %e square cm/s\n",D_abo1); +// From Appendix A, the experimental value is 4.04*10^-5 square cm/s +D_aboexp = 4.04*10^-5; // [square cm/s] +percent_error1 = ((D_abo1-D_aboexp)/D_aboexp)*100; // [%] +printf("The percent error of the estimate, compared to the experimental value is %f\n\n ",percent_error1); + +printf('Illustration 1.9 (b) - Page:28 \n\n'); +// Solution (b) + +// Using the Hayduk and Minhas correlation for nonaqueous solutions + +V_bA = V_bA*2; // [cubic cm/mole] +V_bB = 0.285*(V_cB)^1.048; // [cubic cm/mole] + +// For acetic acid (A) +T_brA = T_bA/T_cA; // [K] +// Using equation 1.55 +alpha_cA = 0.9076*(1+((T_brA)*log(P_cA/1.013))/(1-T_brA)); +sigma_cA = (P_cA^(2/3))*(T_cA^(1/3))*(0.132*alpha_cA-0.278)*(1-T_brA)^(11/9); // [dyn/cm] + +// For acetone (B) +T_brB = T_bB/T_cB; // [K] +// Using equation 1.55 +alpha_cB = 0.9076*(1+((T_brB*log(P_cB/1.013))/(1-T_brB))); +sigma_cB = (P_cB^(2/3))*(T_cB^(1/3))*(0.132*alpha_cB-0.278)*(1-T_brB)^(11/9); // [dyn/cm] + +// Substituting in equation 1.54 +D_abo2 = (1.55*10^-8)*(V_bB^0.27)*(T^1.29)*(sigma_cB^0.125)/((V_bA^0.42)*(u_bB^0.92)*(sigma_cA^0.105)); + +printf("Diffusivity of acetic acid in a dilute solution in acetone at 313 K using the Hayduk and Minhas correlation is %e square cm/s\n",D_abo2); + +percent_error2 = ((D_abo2-D_aboexp)/D_aboexp)*100; // [%] +printf("The percent error of the estimate, compared to the experimental value is %f\n\n ",percent_error2); -- cgit