summaryrefslogtreecommitdiff
path: root/Mass_Transfer_Operations_by_R_E_Treybal/4-Diffusion_In_Solids.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Mass_Transfer_Operations_by_R_E_Treybal/4-Diffusion_In_Solids.ipynb')
-rw-r--r--Mass_Transfer_Operations_by_R_E_Treybal/4-Diffusion_In_Solids.ipynb387
1 files changed, 387 insertions, 0 deletions
diff --git a/Mass_Transfer_Operations_by_R_E_Treybal/4-Diffusion_In_Solids.ipynb b/Mass_Transfer_Operations_by_R_E_Treybal/4-Diffusion_In_Solids.ipynb
new file mode 100644
index 0000000..cf99f83
--- /dev/null
+++ b/Mass_Transfer_Operations_by_R_E_Treybal/4-Diffusion_In_Solids.ipynb
@@ -0,0 +1,387 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Diffusion In Solids"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1: Ficks_Law_Diffusio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Illustration 4.1\n",
+"// Page: 89\n",
+"\n",
+"printf('Illustration 4.1 - Page: 89\n\n');\n",
+" \n",
+"// solution\n",
+"\n",
+"//***Data****//\n",
+"P = 2;// [atm]\n",
+"a1 = 0.025;// [m]\n",
+"a2 = 0.050;// [m]\n",
+"solub = 0.053*P;// [cubic m H2 (STP)/(cubic m rubber)]\n",
+"Ca1 = solub/22.41;// inner surface of the pipe\n",
+"Ca2 = 0;// resistance to difusion of H2 away from the surface is negligible.\n",
+"Da = 1.8*10^(-10);// [square m/s]\n",
+"l = 1;// [m]\n",
+"//********//\n",
+"\n",
+"z = (a2-a1)/2;// [m]\n",
+"// Using Eqn. 4.4\n",
+"Sav = (2*(%pi)*l*(a2-a1))/(2*log(a2/a1));// [square m]\n",
+"// Using Eqn. 4.3\n",
+"w = (Da*Sav*(Ca1-Ca2))/z;// [kmol H2/s for 1m length]\n",
+"w = w*2.02*10^3*3600;// [g H2/m.h]\n",
+"printf('The rate of loss of H2 by diffusion per m of pipe length: %e g H2/m.h',w);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: Unsteady_State_Diffusion.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Illustration 4.2\n",
+"// Page: 92\n",
+"\n",
+"printf('Illustration 4.2 - Page: 92\n\n');\n",
+"printf('Illustration 4.2 (a)\n\n');\n",
+"\n",
+"// solution (a)\n",
+"\n",
+"// Given\n",
+"a = 3/2;// [cm]\n",
+"thetha = 68*3600;// [s]\n",
+"// Ca can e calculated in terms of g/100 cubic cm\n",
+"Cao = 5;// [g/100 cubic cm]\n",
+"Ca_thetha = 3;// [g/100 cubic cm]\n",
+"Ca_Inf = 0;// [g/100 cubic cm]\n",
+"//**********//\n",
+"\n",
+"E = (Ca_thetha-Ca_Inf)/(Cao-Ca_Inf);\n",
+"// E = 0.6;\n",
+"// From Fig. 4.2 (Pg 91): For diffusion from only one exposed surface D*thetha/(4*a^2) = 0.128\n",
+"D = 0.128*4*(a^2)/thetha;// [square cm/s]\n",
+"D = D*10^(-4);// [square m/s]\n",
+"printf('Diffusivity of urea in gel from only one exposed durface: %e square m/s\n\n',D);\n",
+"\n",
+"printf('Illustration 4.2 (b)\n\n');\n",
+"\n",
+"// Solution (b)\n",
+"\n",
+"//****Data****//\n",
+"// Ca can e calculated in terms of g/100 cubic cm\n",
+"Cao = 5;// [g/100 cubic cm]\n",
+"Ca_thetha = 1;// [g/100 cubic cm]\n",
+"Ca_Inf = 0;// [g/100 cubic cm]\n",
+"//*********//\n",
+"\n",
+"E = (Ca_thetha-Ca_Inf)/(Cao-Ca_Inf);\n",
+"// E = 0.2;\n",
+"// From Fig. 4.2 (Pg 91): For diffusion from only one exposed surface D*thetha/(4*a^2) = 0.568\n",
+"D = 4.70*10^(-6);// From Illusration 4.2(a) [square cm/s]\n",
+"thetha = 0.568*4*a^2/D;// [s]\n",
+"thetha = thetha/3600;// [h]\n",
+"printf('The time taken for the avg. conc. to fall to 1g/100 cubic cm is:%f h\n\n',thetha);\n",
+"\n",
+"printf('Illustration 4.2 (c)\n\n');\n",
+"\n",
+"// solution (c)\n",
+"\n",
+"//****Data*****//\n",
+"Cao = 5;// [g/100 cubic cm]\n",
+"Ca_thetha = 1;// [g/100 cubic cm]\n",
+"Ca_Inf = 0;// [g/100 cubic cm]\n",
+"//*******//\n",
+"\n",
+"E = (Ca_thetha-Ca_Inf)/(Cao-Ca_Inf);\n",
+"// E = 0.2;\n",
+"// From Fig. 4.2: For diffusion from two opposite exposed surface D*thetha/(a^2) = 0.568\n",
+"D = 4.70*10^(-6);// From Illusration 4.2(a) [square cm/s]\n",
+"thetha = 0.568*(a^2)/D;// [s]\n",
+"thetha = thetha/3600;// [h]\n",
+"printf('The time taken for the avg. conc. to fall to 1g/100 cubic cm is:%f h',thetha);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: Diffusion_through_Polymers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Illustration 4.3\n",
+"// Page: 94\n",
+"\n",
+"printf('Illustration 4.3 - Page: 94\n\n');\n",
+"\n",
+"// solution \n",
+"\n",
+"//****Data****//\n",
+"z = 0.1;// [cm]\n",
+"pa1 = 1;// [cmHg]\n",
+"pa2 = 0;// [cmHg]\n",
+"Da = 1.1*10^(-10)*10^4;// [square cm/s]\n",
+"//***********//\n",
+"\n",
+"// Solubility coeffecient in terms of Hg\n",
+"Sa = 0.90/76;// [cubic cm gas (STP)/cubic cm.cmHg]\n",
+"// Using Eqn. 4.15\n",
+"Va = (Da*Sa*(pa1-pa2))/z;// [cubic cm(STP)/square cm.s]\n",
+"// Using Eqn. 4.16\n",
+"P = Da*Sa;// [cubic cm gas (STP)/square cm.s.(cmHg/cm)]\n",
+"printf('The rate of diffusion of CO is:%e cubic cm(STP)/square cm.s\n',Va);\n",
+"printf('The permeability of the membrane is %e cubic cm gas (STP)/square cm.s.(cmHg/cm)',P)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4: Diffusion_in_Porous_Solids.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Illustration 4.4\n",
+"// Page: 96\n",
+"\n",
+"printf('Illustration 4.4 - Page: 96\n\n');\n",
+"\n",
+"// solution\n",
+"\n",
+"//****Data****//\n",
+"a = 0.005;// [m]\n",
+"// For the KCl diffusion\n",
+"Dab1 = 1.84*10^(-9);// [square m/s]\n",
+"thetha = 4.75*3600;// [s]\n",
+"Ca_Inf = 0;\n",
+"// For K2CrO4 diffusion\n",
+"Cao = 0.28;// [g/cubic cm]\n",
+"Ca_Inf = 0.002;// [g/cubic cm]\n",
+"Dab2 = 1.14*10^(-9);// [square m/s]\n",
+"//*******//\n",
+"\n",
+"E = 0.1;// For 90% removal of KCl\n",
+"// From Fig. 4.2 (Pg 91): Deff*thetha/a^2 = 0.18\n",
+"Deff = 0.18*a^2/thetha;// [square m/s]\n",
+"Dab_by_Deff = Dab1/Deff;\n",
+"Ca_thetha = 0.1*0.28;// [g/cubic cm]\n",
+"Es = (Ca_thetha-Ca_Inf)/(Cao-Ca_Inf);\n",
+"// From Fig. 4.2 (Pg 91): Deff*thetha/a^2 = 0.30\n",
+"Deff = Dab2/Dab_by_Deff;// [square m/s]\n",
+"thetha = 0.3*a^2/Deff;// [s]\n",
+"thetha = thetha/3600;// [h]\n",
+"printf('The time reqd. is:%f h',thetha);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5: Diffusion_in_Porous_Solids.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Illustration 4.5\n",
+"// Page: 98\n",
+"printf('Illustration 4.5 - Page: 98\n\n');\n",
+"printf('Illustration 4.5 (a)\n\n');\n",
+"\n",
+"// solution (a)\n",
+"\n",
+"//****Data****//\n",
+"// a = H2 b = N2\n",
+"Dab_eff = 5.3*10^(-6);// [square m/s]\n",
+"Dkb_eff = 1.17*10^(-5);// [square m/s]\n",
+"Dab = 7.63*10^(-5);// [square m/s]\n",
+"//*******//\n",
+"\n",
+"R = 8314;//[Nm/kmol]\n",
+"Mb = 2.02;// [kg/kmol]\n",
+"T = 293;// [K]\n",
+"Dtrue_by_Deff = Dab/Dab_eff;\n",
+"// Since the ratio is strictly a matter of the geometry of the solid.\n",
+"Dkb = Dkb_eff*Dtrue_by_Deff;// [square m/s]\n",
+"// From Eqn. 4.20\n",
+"d = 3*Dkb*((%pi*Mb)/(8*R*T))^0.5;// [m]\n",
+"printf('The equivalent pore diameter is: %e m\n\n',d);\n",
+"\n",
+"printf('Illustration 4.5 (b)\n\n');\n",
+"\n",
+"// Solution (b)\n",
+"\n",
+"//****Data*****//\n",
+"// a = O2 b = N2 c = H2\n",
+"Ya1 = 0.8;\n",
+"Ya2 = 0.2;\n",
+"Pt = 10133;// [N/square m]\n",
+"z = 0.002;// [m]\n",
+"T = 293;// [K]\n",
+"//*******//\n",
+"\n",
+"// From Table 2.1 (Pg 31):\n",
+"Dab = 1.81*10^(-5);// [square m/s] at STP\n",
+"Dkc = 1.684*10^(-4);// [square m/s] From Illustration 4.5(a)\n",
+"Mc = 2.02;// [kg/kmol]\n",
+"Ma = 32;// [kg/kmol]\n",
+"Mb = 28.02;// [kg/kmol]\n",
+"Dab = Dab*(1/0.1)*((293/273)^1.5);// [square m/s] at 0.1 atm & 20 C\n",
+"DabEff = Dab/14.4;// [square m/s] From Illustration 4.5(a)\n",
+"Dka = Dkc*((Mc/Ma)^0.5);// [square m/s]\n",
+"DkaEff = Dka/14.4;// [square m/s]\n",
+"Nb_by_Na = -(Ma/Mb)^0.5;\n",
+"// Na/(Na+Nb) = 1/(1+(Nb/Na))\n",
+"Na_by_NaSumNb = 1/(1+(Nb_by_Na));\n",
+"DabEff_by_DkaEff = DabEff/DkaEff;\n",
+"// By Eqn. 4.23\n",
+"Na = (Na_by_NaSumNb)*(DabEff*Pt/(R*T*z))*log((((Na_by_NaSumNb)*(1+DabEff_by_DkaEff))-Ya2)/(((Na_by_NaSumNb)*(1+DabEff_by_DkaEff))-Ya1));// [kmol/square m.s]\n",
+"Nb = Na*(Nb_by_Na);// [kmol/square m.s]\n",
+"printf('Diffusion flux of O2 is %e kmol/square m.s\n',Na);\n",
+"printf('Diffusion flux of N2 is %e kmol/square m.s\n',Nb);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: Hydrodynamic_flow_of_gases.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Illustration 4.6\n",
+"// Page: 100\n",
+"\n",
+"printf('Illustration 4.6 - Page: 100\n\n');\n",
+"\n",
+"// solution\n",
+"\n",
+"//***Data***//\n",
+"// a = N2\n",
+"// For N2 at 300K\n",
+"viscosity1 = 1.8*10^(-5);// [kg/m.s]\n",
+"Pt1 = 10133;// [N/square m.sec]\n",
+"T = 300;// [K]\n",
+"z = 0.0254;// [m]\n",
+"T2 = 393;// [K]\n",
+"//***********//\n",
+"\n",
+"Ma = 28.02;// [kg/kmol]\n",
+"R = 8314;// [J/K.kgmol]\n",
+"//From Eqn 4.22\n",
+"lambda = (3.2*viscosity1/Pt1)*(R*T/(2*(%pi)*Ma))^0.5;\n",
+"d = 10^(-4);// [m]\n",
+"d_by_lambda = d/lambda;\n",
+"// Kundsen flow will not occur\n",
+"// N2 flow corresponding to 9 cubic ft/square ft.min at 300K & 1 std atm = 0.0457 cubic m/square m.min\n",
+"Na1 = 0.0457*(273/T)*(1/22.41);// [kmol/square m.s]\n",
+"Pt1_diff_Pt2 = 2*3386/13.6;// [N/square m]\n",
+"Ptav = Pt1+(Pt1_diff_Pt2/2);// [N/square m]\n",
+"// From Eqn. 4.26\n",
+"k1 = Na1*R*T*z/(Ptav*(Pt1_diff_Pt2));// [m^4/N.s]\n",
+"\n",
+"//For N2 at 393K\n",
+"viscosity2 = 2.2*10^(-5);// [kg/m.s]\n",
+"k2 = (k1*viscosity1)/(viscosity2);// [m^4/N.s]\n",
+"// From Eqn 4.26\n",
+"Na = (k2*Ptav*Pt1_diff_Pt2)/(R*T2*z);// [kmol/square m.s]\n",
+"printf('Flow rate to be expected is %e kmol/square m.s',Na);"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}