{
 "metadata": {
  "name": "",
  "signature": "sha256:66650a76faf5eec3efd8e3c62ecb57addf32e1a6b2cb5d90995ca785777b9427"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 4 :  The Dense Bed"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1, Page 106\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "#Variable declaration\n",
      "dt=4;               #Vessel diameter in m\n",
      "Lmf=2;              #Length of the bed in m\n",
      "ephsilonmf=0.48;    #Void fraction of bed\n",
      "rhos=1500;          #Density of solid in kg/m**3\n",
      "rhog=3.6;           #Density of gas in kg/m**3\n",
      "myu=2E-5;           #Viscosity of gas in kg/m s\n",
      "po=3;               #Pressure of inlet gas in bar\n",
      "uo=0.4;             #Superficial velocity of gas in m/s\n",
      "uorm=40;            #Maximum allowable jet velocity from holes in m/s\n",
      "g=9.80;             #Acceleration due to gravity in m/s**2\n",
      "gc=1;\n",
      "pi=3.1428;\n",
      "\n",
      "#CALCULATION\n",
      "#Computation of minimum allowable pressure drop through the distributor\n",
      "deltapb=((1-ephsilonmf)*(rhos-rhog)*g*Lmf)/gc;  #Calculation of pressure drop in bed using Eqn.(3.17)\n",
      "deltapd=0.3*deltapb;                            #Calculation of pressure drop in distributor using Eqn.(3)\n",
      "\n",
      "#Computation of orifice coefficient\n",
      "Ret=(dt*uo*rhog)/myu;\n",
      "if Ret>=3000:\n",
      "    Cd=0.60;\n",
      "elif Ret>=2000:\n",
      "    Cd=0.61;\n",
      "elif Ret>=1000:\n",
      "    Cd=0.64;\n",
      "elif Ret>=500:\n",
      "    Cd=0.68;\n",
      "elif Ret>=300:\n",
      "    Cd=0.70;\n",
      "elif Ret>=100:\n",
      "    Cd=0.68;\n",
      "\n",
      "#Computation of gas velocity through orifice\n",
      "uor=Cd*((2*deltapd)/rhog)**0.5;   #Calculation of gas velocity through orifice by using Eqn.(12)\n",
      "f=(uo/uor)*100;                   #Calculation of fraction of open area in the perforated plate \n",
      "\n",
      "\n",
      "#Computation of number of orifices per unit area of distributor\n",
      "dor=[0.001,0.002,0.004];          #Different orifice diameters in m\n",
      "n=len(dor);\n",
      "i=0;\n",
      "Nor = [0.,0.,0.]\n",
      "while i<n:\n",
      "    Nor[i]=(uo*4)/(pi*uor*(dor[i])**2);#Calculation of number of orifices by using Eqn.(13)\n",
      "    i=i+1;\n",
      "    \n",
      "#OUTPUT\n",
      "print 'The pressure drop in bed:%fPa'%deltapb\n",
      "print 'The minimum allowable pressure drop in distributor:%fPa'%deltapd\n",
      "if uor<uorm:\n",
      "    print 'The gas veleocity of %fm/s is satisfactory'%uor\n",
      "else:\n",
      "    print 'The gas veleocity of %fm/s is not satisfactory'%uor\n",
      "\n",
      "if f<10:\n",
      "    print 'The fraction of open area of %f percent is allowable'%f\n",
      "else:\n",
      "    print 'The fraction of open area of %f percent is not allowable'%f\n",
      "\n",
      "print 'Diameter of orifice(m)',\n",
      "print '\\tNumber of orifices per unit area(per sq.m)'\n",
      "\n",
      "j=0;\n",
      "while j<n:\n",
      "    print '%f'%dor[j],\n",
      "    print '\\t\\t%f'%Nor[j]\n",
      "    j=j+1;\n",
      "\n",
      "print 'This number can be rounded off.'\n",
      "print 'Since orifices that are too small are liable to clog and those that are too large cause uneven distribution of gas, we choose orifice of diameter %fm'%dor[2]\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The pressure drop in bed:15251.308800Pa\n",
        "The minimum allowable pressure drop in distributor:4575.392640Pa\n",
        "The gas veleocity of 30.250265m/s is satisfactory\n",
        "The fraction of open area of 1.322302 percent is allowable\n",
        "Diameter of orifice(m) \tNumber of orifices per unit area(per sq.m)\n",
        "0.001000 \t\t16829.610145\n",
        "0.002000 \t\t4207.402536\n",
        "0.004000 \t\t1051.850634\n",
        "This number can be rounded off.\n",
        "Since orifices that are too small are liable to clog and those that are too large cause uneven distribution of gas, we choose orifice of diameter 0.004000m\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2, Page 108\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "lor=0.1;      #Minimum allowable tuyere spacing in m\n",
      "uorm=30;      #Maximum allowable jet velocity from the tuyere in m/s\n",
      "uo=0.4;       #Superficial velocity of gas in m/s\n",
      "uor=30.2;     #Gas velocity through orifice,from Exa 1, in m/s\n",
      "Cd=0.6;       #Dicharge coefficient from Exa 1\n",
      "rhog=3.6      #Density of gas in kg/m**3\n",
      "pi=3.1428;\n",
      "\n",
      "#CALCULATION\n",
      "Nor=1/(lor**2);                     #Calculation of number of orifices per unit area by assuming minimum spacing for tuyeres\n",
      "dor=((4/pi)*(uo/uor)*(1/Nor))**0.5; #Calculation of diameter of inlet orifiec by using Eqn.(13)\n",
      "\n",
      "#Computation of diameter of hole for different number of holes per tuyere\n",
      "q=(lor**2)*uo;                      #Volumetric flow rate in m**3/s\n",
      "Nh=[8.,6.,4.];                         #Different number of holes per tuyere\n",
      "n=len(Nh);\n",
      "i=0;\n",
      "dh = [0.,0.,0.]\n",
      "while i<n:\n",
      "    dh[i]=((((q/Nh[i])*(4./pi))/uorm)**0.5);#Calculation of diameter of holes\n",
      "    i=i+1;\n",
      "\n",
      "deltaph=(rhog/2.)*((uor/Cd)**2)\n",
      "\n",
      "#OUTPUT\n",
      "print 'Number of holes(number of holes/tuyeres)',\n",
      "print '\\tDiameter of hole(m)'\n",
      "j=0;\n",
      "while j<n:\n",
      "    print '%f'%Nh[j],\n",
      "    print '\\t\\t\\t\\t\\t%f'%dh[j]\n",
      "    j=j+1;\n",
      "\n",
      "print 'The design chosen is as follows'\n",
      "print '\\tTuyeres are as shown in Fig.2(b),page 97'\n",
      "print '\\tNumber of holes = %f(Since rectangular pitch is chosen for tuyeres)'%Nh[1]\n",
      "print '\\tDiameter of hole = %fm'%dh[1]\n",
      "print '\\tDiameter of incoming high-pressure-drop orifice = %fm ID'%dor\n",
      "print 'Checking the pressure drop in tuyeres'\n",
      "print 'Since pressure drop of %.1f Pa gives sufficiently high \\\n",
      "distributor pressure drop as seen in Exa.1, use of inlet orifice can be dispensed.'%deltaph\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Number of holes(number of holes/tuyeres) \tDiameter of hole(m)\n",
        "8.000000 \t\t\t\t\t0.004606\n",
        "6.000000 \t\t\t\t\t0.005318\n",
        "4.000000 \t\t\t\t\t0.006513\n",
        "The design chosen is as follows\n",
        "\tTuyeres are as shown in Fig.2(b),page 97\n",
        "\tNumber of holes = 6.000000(Since rectangular pitch is chosen for tuyeres)\n",
        "\tDiameter of hole = 0.005318m\n",
        "\tDiameter of incoming high-pressure-drop orifice = 0.012984m ID\n",
        "Checking the pressure drop in tuyeres\n",
        "Since pressure drop of 4560.2 Pa gives sufficiently high distributor pressure drop as seen in Exa.1, use of inlet orifice can be dispensed.\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3, Page 110\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "deltapd=[3,10]    #Distributor pressure drop in kPa\n",
      "deltapd2=10.0;    #Distributor pressure drop in kPa\n",
      "po=101.0;         #Entering air pressure in kPa\n",
      "To=20.0;          #Entering air temperature in degree C\n",
      "y=1.4;            #Fugacity of air\n",
      "deltapb=10;       #Pressure drop in bed in kPa\n",
      "p3=103;           #Pressure at the bed exit in kPa\n",
      "F=8;              #Feed rate of coal in tons/hr\n",
      "H=25;             #Gross heatig value of coal in MJ/kg\n",
      "Fa=10;            #Air required at standard condition in nm**3/kg\n",
      "etac=0.75;        #Efficiency of compressor\n",
      "etap=36;          #Efficiency of plant in %\n",
      "\n",
      "#CALCULATION\n",
      "#Calculation of volumetric flow rate of air\n",
      "vo=((F*1000)*Fa*((To+273)/273.0))/3600.0;\n",
      "\n",
      "#Case(a) Distributor Pressure drop = 3kPa and Case(b) Distributor Pressure drop = 10kPa\n",
      "n=len(deltapd);\n",
      "i=0;\n",
      "p1= [0,0]\n",
      "p2 = [0,0]\n",
      "ws = [0.,0.]\n",
      "while i<n:\n",
      "    p2[i]=p3+deltapb;      #Calculation of pressure at the entrance of the bed\n",
      "    p1[i]=p2[i]+deltapd[i];#Calculation of pressure before entering the bed\n",
      "    ws[i]=(y/(y-1))*po*vo*((p1[i]/po)**((y-1)/y)-1)*(1.0/etac);#Calculation of power required for the compressor by Eqn.(18) & Eqn.(20)\n",
      "    i=i+1;\n",
      "\n",
      "#Case(c) 50% of the required bypassed to burn the volatile gases. Distributor Pressure drop = 3kPa\n",
      "#No change in pressure drop from case(a)\n",
      "v1=vo/2.0;   #New volumetric flow rate of air\n",
      "ws1=455/2.0; #Power required for blower for primary air\n",
      "ws2=(y/(y-1))*po*v1*((p3/po)**((y-1)/y)-1)*(1/etac);#Power required for blower for bypassed air\n",
      "wst=ws1+ws2;                #Total power required for the two blowers\n",
      "p=((ws[1]-wst)/ws[1])*100;  #Saving in power when compared to case(a)\n",
      "\n",
      "#OUTPUT\n",
      "print 'Case(a)'\n",
      "print '\\tVolumetric flow rate of air = %.2f m**3/hr'%vo\n",
      "print '\\tPower required for compressor = %.0f kW'%ws[0]\n",
      "print 'Case(b)'\n",
      "print '\\tVolumetric flow rate of air = %.2f m**3/hr'%vo\n",
      "print '\\tPower required for compressor = %.0f kW'%ws[1]\n",
      "print 'Case(c)'\n",
      "print '\\tVolumetric flow rate of air = %.3f m**3/hr'%v1\n",
      "print '\\tPower required for compressor for primary air = %.1f kW'%ws1\n",
      "print '\\tPower required for blower for bypassed air = %.1f kW'%ws2\n",
      "print '\\tTotal power required for the two blowers = %.0f kW'%wst\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Case(a)\n",
        "\tVolumetric flow rate of air = 23.85 m**3/hr\n",
        "\tPower required for compressor = 454 kW\n",
        "Case(b)\n",
        "\tVolumetric flow rate of air = 23.85 m**3/hr\n",
        "\tPower required for compressor = 651 kW\n",
        "Case(c)\n",
        "\tVolumetric flow rate of air = 11.925 m**3/hr\n",
        "\tPower required for compressor for primary air = 227.5 kW\n",
        "\tPower required for blower for bypassed air = 31.6 kW\n",
        "\tTotal power required for the two blowers = 259 kW\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}