{ "metadata": { "name": "", "signature": "sha256:d0e1d2df0aff726a3a406932f708cdf8d06257d8034bc7c7a566a7dd78b80f46" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 6 : Diffusion of Interacting Species" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.1.1 pg : 166" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "\t\n", "#initialization of variables\n", "DHplus = 9.31*10**-5 \t# cm**2/sec\n", "DClminus = 2.03*10**-5 \t# cm**2/sec\n", "\t\n", "#Calculations\n", "DHCl = (2/((1/DHplus)+(1/DClminus)))\n", "tHplus = DHplus/(DHplus+DClminus)\n", "percentage = tHplus*100 \t# percent\n", "\t\n", "#Results\n", "print \"The diffusion co efficient of the solution is %.1e cm**2/sec\"%(DHCl)\n", "print \" The transeference for protons is %.f percent\"%(percentage)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The diffusion co efficient of the solution is 3.3e-05 cm**2/sec\n", " The transeference for protons is 82 percent\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.1.2 pg : 167" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\t\n", "#initialization of variables\n", "z1 = 3.\n", "z2 = 1.\n", "D2 = 2.03*10**-5 \t# cm**2/sec\n", "D1 = 0.62*10**-5 \t# cm**2/sec\n", "\t\n", "#Calculations\n", "D = ((z1+z2)/((z1/D2)+(z2/D1))) \t# cm**2/sec\n", "\t\n", "#Results\n", "print \"The diffusion coefficient is %.2e cm**2/sec\"%(D)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The diffusion coefficient is 1.29e-05 cm**2/sec\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.1.5 pg : 171" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\t\n", "#initialization of variables\n", "zCa = 2.\n", "zCl = 1.\n", "DCl = 2.03*10**-5 \t# cm**2/sec\n", "DCa = 0.79*10**-5 \t# cm**2/sec\n", "\t\n", "#Calculations\n", "DCaCl2 = ((zCa+zCl)/((zCa/DCl)+(zCl/DCa))) \t# cm**2/sec\n", "\t\n", "#Results\n", "print \"The diffusion coefficient of CaCl2 is %.2e cm**2/sec\"%(DCaCl2)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The diffusion coefficient of CaCl2 is 1.33e-05 cm**2/sec\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.2.1 pg : 175" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\t\n", "#initialization of variables\n", "pKa = 4.756\n", "DH = 9.31*10**-5 \t# cm**2/sec\n", "DCH3COO = 1.09*10**-5 \t#cm**2/sec\n", "D2 = 1.80*10**-5 \t#cm**2/sec\n", "Ct = 10. \t# moles/lit\n", "\t\n", "#Calculations\n", "K = 10**pKa \t# litres/mol\n", "D1 = 2/((1/DH)+(1/DCH3COO))\n", "D = 2/((1/D1)+(1/D2))#*10**5\t# Diffusion co efficient in x*10**-5 cm**2/sec\n", "\t\n", "#Results\n", "print \"The diffusion coefficient of acetic acid in water is %.2e cm**2/sec\"%(D)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The diffusion coefficient of acetic acid in water is 1.87e-05 cm**2/sec\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.4.1 pg : 202" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\t\n", "#initialization of variables\n", "sigma1 = 4.23 \t# angstroms\n", "sigma2 = 4.16 \t#Angstroms\n", "sigma12 = (sigma1+sigma2)/2 \t# angstroms\n", "T = 573. \t# Kelvin\n", "M1 = 28.\n", "M2 = 26.\n", "p = 1. \t#atm\n", "Omega = 0.99\n", "Deff = 0.17 \t #cm**2/sec\n", "\t\n", "#Calculations\n", "D = ((1.86*10**-3)*((T)**1.5)*(((1/M1)+(1/M2))**0.5))/((p)*((sigma12)**2)*Omega)\t#cm**2/sec\n", "Tou = D/Deff\n", "\t\n", "#Results\n", "print \"The tortuosity is %.f\"%(Tou)\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The tortuosity is 2\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.4.2 pg : 203" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "#Initialzation of variables\n", "kb = 1.38*10**-16 \t# g-cm**2/sec**2-K\n", "T = 310. \t#Kelvin\n", "Mu = 0.01 \t # g/cm-sec\n", "R0 = 2.5*10**-8 \t#cm\n", "d = 30.*10**-8 \t #cm\n", "\n", "#Calculations\n", "D = (kb*T/(6*math.pi*Mu*R0))*(1+((9./8)*(2*R0/d)*(math.log(2*R0/d)))+((-1.54)*(2*R0/d)))\t#cm**2/sec\n", "\n", "#Results\n", "print \"The diffusion coefficient is %.2e cm**2/sec\"%(D)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The diffusion coefficient is 3.70e-06 cm**2/sec\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.4.3 pg : 204" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "\n", "#Initialzation of variables\n", "kb = 1.38*10**-16 \t# g-cm**2/sec**2-K\n", "T = 373. \t# K\n", "T0 = 273. \t# K\n", "sigma = 2.83*10**-8 \t# cm\n", "p = 1.01*10**6\t # g/cm-sec**2\n", "l = 0.6 \t # cm\n", "d = 13.*10**-7 \t # cm\n", "m = 2/(6.023*10**23)\t# gm/sec\n", "M1 = 2.01\n", "M2 = 28.0\n", "sigma1 = 2.92\t#cm\n", "sigma2 = 3.68\t#cm\n", "sigma12 = (sigma1+sigma2)/2\n", "omega = 0.80\n", "deltac1 = (1/(22.4*10**3))*(T0/T)\n", "\n", "#Calculations\n", "DKn = (d/3)*(math.sqrt((2*kb*T)/m))\t#cm**2/sec\n", "flux1 = (DKn*deltac1/l)#*10**5\t#in x*10**-5mol/cm**2-sec\n", "D = (1.86*10**-3)*(T**(1.5))*(((1/M1)+(1/M2))**0.5)/(p*(sigma12**2)*omega)\n", "flux2 = (D*deltac1/l)#*10**11\t# in x*10**-11 mol/cm**2-sec\n", "\n", "#Results\n", "print \"The steady diffusion flux is %.1e mol/cm**2-sec\"%(flux1)\n", "print \"The flux through 18.3 micrometre pore is %.1e cm**2/sec\"%(flux2)\t# answer wrong in text book\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The steady diffusion flux is 4.2e-06 mol/cm**2-sec\n", "The flux through 18.3 micrometre pore is 6.1e-11 cm**2/sec\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.4.4 pg : 205" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "\t\n", "#initialization of variables\n", "d=0.01 \t#cm\n", "s=2.*10**-2 \t#cm\n", "\t\n", "#Calculations\n", "phi = 4./3 *math.pi*(d/2)**3 /(s**3)\n", "print (\"On solving, D\")\n", "D=5*10**-7 \t#cm**2/s\n", "\t\n", "#Results\n", "print \"Diffusion in homogeneous gel = %.1e cm**2/sec\"%(D)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "On solving, D\n", "Diffusion in homogeneous gel = 5.0e-07 cm**2/sec\n" ] } ], "prompt_number": 15 } ], "metadata": {} } ] }