{
 "metadata": {
  "name": "",
  "signature": "sha256:d5accb40ab200594c5bee653d2ffb7fee1e29e674b04c22a54296f7e8cb68080"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 9 : Kinetic theory and transport\n",
      "phenomena"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.1 pg : 232"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "# Variables\n",
      "import math \n",
      "N0 = 6.025*10**26\n",
      "M = 32.\n",
      "k = 1.38*10**-23\n",
      "T = 300. \t\t\t#K\n",
      "\t\t\t\n",
      "# Calculations\n",
      "m = M/N0\n",
      "vavg = math.sqrt(8*k*T/(math.pi*m))\n",
      "vrms = math.sqrt(3*k*T/m)\n",
      "vm = math.sqrt(2*k*T/m)\n",
      "\t\t\t\n",
      "# Results\n",
      "print \"Average velocity  =  %d m/sec\"%(vavg)\n",
      "print \" RMS velocity  =  %d m/sec\"%(vrms)\n",
      "print \" Most probable velocity  =  %.f m/sec\"%(vm)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Average velocity  =  445 m/sec\n",
        " RMS velocity  =  483 m/sec\n",
        " Most probable velocity  =  395 m/sec\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.2 pg : 233"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "# Variables\n",
      "import math \n",
      "T = 300. \t\t\t#K\n",
      "dv = 0.02\n",
      "vm = 395. \t\t\t#m/s\n",
      "m = 5.32*10**-26 \t\t\t#kg\n",
      "k = 1.38*10**-23\n",
      "vrms = 483. \t\t\t#m/s\n",
      "\t\t\t\n",
      "# Calculations\n",
      "N1 = math.sqrt(2/math.pi) *(m/(k*T))**(3./2) *vm**2 *math.exp(-1) *dv*vm\n",
      "N2 = math.sqrt(2/math.pi) *(m/(k*T))**(3./2) *vrms**2 *math.exp(-3/2) *dv*vrms\n",
      "\t\t\t\n",
      "# Results\n",
      "print \"Fraction of oxygen molecules at v most probable speed  =  %.4f \"%(N1)\n",
      "print \" Fraction of oxygen molecules at v rms speed  =  %.4f \"%(N2)\n",
      "\n",
      "# rounding off error"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Fraction of oxygen molecules at v most probable speed  =  0.0167 \n",
        " Fraction of oxygen molecules at v rms speed  =  0.0112 \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.3 pg : 236"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "# Variables\n",
      "p = 1.013*10**5 \t\t\t#N/m**2\n",
      "k = 1.38*10**-23\n",
      "T = 300.     \t    \t\t#K\n",
      "v = 445. \t    \t    \t#m/s\n",
      "A = 0.001*10**-6 \t\t\t#m**2\n",
      "\t\t\t\n",
      "# Calculations\n",
      "n = p/(k*T)\n",
      "J = n*v/4\n",
      "escaping = J*A\n",
      "\t\t\t\n",
      "# Results\n",
      "print \"No. of molecules escaping per unit time  =  %.2e mol/sec\"%(escaping)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "No. of molecules escaping per unit time  =  2.72e+18 mol/sec\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.4 pg : 239"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "# Variables\n",
      "import math \n",
      "d = 3.5*10**-10 \t\t\t#m\n",
      "n = 2.45*10**25\n",
      "\t\t\t\n",
      "# Calculations\n",
      "sig = math.pi*d**2\n",
      "lambda_ = 1./(math.sqrt(2) *sig*n) \n",
      "frac = math.exp(-2)\n",
      "\t\t\t\n",
      "# Results\n",
      "print \"Mean free path  =  %.2e m\"%(lambda_)\n",
      "print \" fraction of molecules  =  %.3f\"%(frac)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Mean free path  =  7.50e-08 m\n",
        " fraction of molecules  =  0.135\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.5 pg : 244"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "# Variables\n",
      "P = 1. \t    \t\t#atm\n",
      "T = 300. \t\t\t#K\n",
      "\t\t\t\n",
      "# Calculations\n",
      "cv = 4.97\n",
      "vavg = 1580.     \t\t\t#ft/s\n",
      "sig = 4.13*10**-18 \t\t\t#ft**2\n",
      "N0 = 6.025*10**26 *0.4536\n",
      "K = vavg*3600.*cv/(3*N0*sig)\n",
      "\t\t\t\n",
      "# Results\n",
      "print \"Thermal conductivity   =  %.2e B/hr ft F\"%(K)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thermal conductivity   =  8.35e-03 B/hr ft F\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.6 pg : 245"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "# Variables\n",
      "m = 5.32*10**-26     \t\t\t#kg\n",
      "v = 445.         \t    \t\t#m/s\n",
      "sigma = 3.84*10**-19 \t\t\t#m**2\n",
      "\t\t\t\n",
      "# Calculations\n",
      "mu = m*v/(3*sigma)\n",
      "\t\t\t\n",
      "# Results\n",
      "print \"Dynamic viscosity of oxygen  =  %.2e newton sec/m**2\"%(mu)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Dynamic viscosity of oxygen  =  2.06e-05 newton sec/m**2\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}