{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 11 : Heat and mass transfer in duct flow"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 11.1 - Page No :497\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "# given\n",
      "K_drywall = 0.28;  \t\t\t #[Btu/ft*degF] - thermal conductivity of dry wall\n",
      "K_fibreglass = 0.024;  \t\t #[Btu/ft*degF] - thermal conductivity of fibre glass\n",
      "K_concrete = 0.5;  \t\t\t #[Btu/ft*degF] - thermal conductivity of concrete\n",
      "T4 = 0.;              \t\t #[degF]\n",
      "T1 = 65.;  \t\t\t         #[degF]\n",
      "deltaT = T4-T1;  \t    \t #[degF]\n",
      "a = 1.;               \t\t #[ft**2] - assuming area of 1 ft**2\n",
      "deltax1 = 0.5/12;  \t\t\t #[ft]\n",
      "deltax2 = 3.625/12;  \t\t #[ft]\n",
      "deltax3 = 6./12;  \t\t\t #[ft]\n",
      "\n",
      "# Calculations\n",
      "R1 = deltax1/(K_drywall*a);      \t\t\t #[h*degF/Btu]\n",
      "R2 = deltax2/(K_fibreglass*a);  \t\t\t #[h*degF/Btu]\n",
      "R3 = deltax3/(K_concrete*a);  \t    \t\t #[h*degF/Btu]\n",
      "qx = deltaT/(R1+R2+R3);\n",
      "q12 = -qx;\n",
      "q23 = -qx;\n",
      "q34 = -qx;\n",
      "deltaT1 = (-q12)*deltax1*(1./(K_drywall*a));\n",
      "T2 = T1+deltaT1;\n",
      "deltaT2 = (-q23)*deltax2*(1./(K_fibreglass*a));\n",
      "T3 = T2+deltaT2;\n",
      "deltaT3 = (-q34)*deltax3*(1./(K_concrete*a));\n",
      "T4 = T3+deltaT3;\n",
      "\n",
      "# Results\n",
      "print \" T1  =  %.0f F \\\n",
      "\\n T2  =  %.1f F \\\n",
      "\\n delta T2 = %.2f deg F \\\n",
      "\\n T3  = %.2f F \\\n",
      "\\n delta T3 = %.2f deg F \\\n",
      "\\n T4  =  %.0f F\"%(T1,T2,deltaT2,T3,deltaT3,T4);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " T1  =  65 F \n",
        " T2  =  64.3 F \n",
        " delta T2 = -59.56 deg F \n",
        " T3  = 4.73 F \n",
        " delta T3 = -4.73 deg F \n",
        " T4  =  0 F\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 11.2 - Page No :501\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "r1 = (2.067/2.)/(12);  \t\t #[ft]\n",
      "r2 = r1+0.154/12;  \t\t\t #[ft]\n",
      "r3 = r2+3/12.;  \t\t\t #[ft]\n",
      "L = 1.;  \t\t\t #[ft]\n",
      "Ka = 26.;  \t\t\t #[Btu/h*ft*degF]\n",
      "Kb = 0.04;  \t\t #[Btu/h*ft*degF]\n",
      "T1 = 50.;  \t\t\t #[degF]\n",
      "\n",
      "# Calculations\n",
      "Ra = (math.log(r2/r1))/(2*math.pi*L*Ka);\n",
      "Rb = (math.log(r3/r2))/(2*math.pi*L*Kb);\n",
      "R = Ra+Rb;\n",
      "deltaT = -18;  \t\t\t #[degF] - driving force\n",
      "Qr = -(deltaT/(R));\n",
      "deltaT1 = (-Qr)*(Ra);\n",
      "T2 = T1+deltaT1;\n",
      "\n",
      "# Results\n",
      "print \" Qr = %.3f\"%Qr;\n",
      "print \" The interface temperature is  T2  =  %.3f degF\"%(T2);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Qr = 3.589\n",
        " The interface temperature is  T2  =  49.997 degF\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 11.3 - Page No :502\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "Ra = 8.502*10**-4;  \t\t\t #[h*degF*Btu**-1]\n",
      "Rb = 5.014;  \t\t        \t #[h*degF*Btu**-1]\n",
      "r1 = (2.067/2)/(12.);  \t\t\t #[ft]\n",
      "r2 = r1+0.154/12.;  \t\t\t #[ft]\n",
      "r3 = r2+3/12.;  \t\t\t     #[ft]\n",
      "d1 = 2.*r1;\n",
      "d0 = 2.*r3;\n",
      "h0 = 25.;  \t    \t\t #[Btu/h*ft**2*degF]\n",
      "h1 = 840.;  \t\t\t #[Btu/h*ft**2*degF]\n",
      "L = 1.;       \t\t\t #[ft] - considering 1 feet length\n",
      "\n",
      "# Calculations\n",
      "R0 = 1./(h0*math.pi*d0*L);\n",
      "R1 = 1./(h1*math.pi*d1*L);\n",
      "R = R0+R1+Ra+Rb;\n",
      "deltaT = -400;  \t\t\t #[degF]\n",
      "Qr = -(deltaT)/R;\n",
      "# the heat loss calculated above is the heat loss per foot.therefore for 500 ft\n",
      "L = 500.;\n",
      "Qr = Qr*L;\n",
      "\n",
      "# Results\n",
      "print \" the heat loss for a 500 feet pipe is  qr  =  %.2e Btu/h\"%(Qr);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " the heat loss for a 500 feet pipe is  qr  =  3.97e+04 Btu/h\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 11.5 - Page No :521\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "Nre = 50000.;\n",
      "d = 0.04;  \t\t\t #[m] - diameter of pipe\n",
      "\n",
      "# physical properties of water\n",
      "T1 = 293.15;  \t\t\t #[K]\n",
      "T2 = 303.15;  \t\t\t #[K]\n",
      "T3 = 313.15;  \t\t\t #[K]\n",
      "p1 = 999.;  \t\t\t #[kg/m**3] - density of water at temperature T1\n",
      "p2 = 996.0;  \t\t\t #[kg/m**3] - density of water at temperature T2\n",
      "p3 = 992.1;  \t\t\t #[kg/m**3] - density of water at temperature T3\n",
      "mu1 = 1.001;  \t\t\t #[cP] - viscosity of water at temperature T1\n",
      "mu2 = 0.800;  \t\t\t #[cP] - viscosity of water at temperature T2\n",
      "mu3 = 0.654;  \t\t\t #[cP] - viscosity of water at temperature T3\n",
      "k1 = 0.63;  \t\t\t #[W/m*K] - thermal conductivity of water at temperature T1\n",
      "k2 = 0.618;  \t\t\t #[W/m*K] - thermal conductivity of water at temperature T2\n",
      "k3 = 0.632;  \t\t\t #[W/m*K] - thermal conductivity of water at temperature T3\n",
      "cp1 = 4182.;  \t\t\t #[J/kg*K] - heat capacity of water at temperature T1\n",
      "cp2 = 4178.;  \t\t\t #[J/kg*K] - heat capacity of water at temperature T2\n",
      "cp3 = 4179.;  \t\t\t #[J/kg*K] - heat capacity of water at temperature T3\n",
      "Npr1 = 6.94;  \t\t\t # prandtl no. at temperature T1\n",
      "Npr2 = 5.41;  \t\t\t # prandtl no. at temperature T2\n",
      "Npr3 = 4.32;  \t\t\t # prandtl no. at temperature T3\n",
      "\n",
      "\n",
      "# Calculations\n",
      "# (a)  Dittus -Boelter-this correction evalutes all properties at the mean bulk temperature,which is T1\n",
      "kmb = 0.603\n",
      "h = (kmb/d)*0.023*((Nre)**(0.8))*((Npr1)**0.4);\n",
      "\n",
      "\n",
      "# Results\n",
      "print \" a) Dittus -Boelter the heat transfer coefficient is  \\nh  =  %.0f W/m**2*K \\\n",
      "  =  %.0f Btu/ft**2*h**-1*degF\"%(h,h*0.17611);\n",
      "\n",
      "# (b) Seid_er Tate-this correlation evaluates all the properties save muw at the mean bulk temperature \n",
      "h = (kmb/d)*(0.027)*((Nre)**0.8)*((Npr1)**(1./3))*((mu1/mu3)**0.14);\n",
      "print \" b) Seid_er Tate the heat transfer coefficient is  \\nh  =  %.0f W/m**2*K \\\n",
      "  =  %.0f Btu/ft**2*h**-1*degF\"%(h,h*0.17611);\n",
      "\n",
      "# (c) Sleicher-Rouse equation\n",
      "a = 0.88-(0.24/(4+Npr3));\n",
      "b = (1./3)+0.5*math.exp((-0.6)*Npr3);\n",
      "Nref = Nre*(mu1/mu2)*(p2/p1);\n",
      "Nnu = 5+0.015*((Nref)**a)*((Npr3)**b);\n",
      "h = Nnu*(kmb/d);\n",
      "print \" c) Sleicher-Rouse equation the heat transfer coefficient is  \\nh  =  %.0f W/m**2*K \\\n",
      "  =  %.0f Btu/ft**2*h**-1*degF\"%(h,h*0.17611);\n",
      "\n",
      "# (d) Colbum Analogy- the j factor for heat transfer is calculated\n",
      "jh = 0.023*((Nref)**(-0.2));\n",
      "Nst = jh*((Npr2)**(-2./3));\n",
      "U = (Nre*mu1*10**-3)/(d*p1);\n",
      "h = Nst*(p1*cp1*U);\n",
      "print \" d) Colbum Analogy the heat transfer coefficient is  \\nh \\\n",
      " =  %.0f W/m**2*K  =  %.0f Btu/ft**2*h**-1*degF\"%(h,h*0.17611);\n",
      "\n",
      "# (e) Friend-Metzner\n",
      "f = 0.005227;\n",
      "Nnu = ((Nre)*(Npr1)*(f/2.)*((mu1/mu3)**0.14))/(1.20+((11.8)*((f/2)**(1./2))*(Npr1-1)*((Npr1)**(-1./3))));\n",
      "h = Nnu*(kmb/d);\n",
      "print \" e) Friend-Metzner the heat transfer coefficient is  \\nh  =  %.0f W/m**2*K \\\n",
      " =  %.0f Btu/ft**2*h**-1*degF\"%(h,h*0.17611);\n",
      "\n",
      "# (f) Numerical analysis\n",
      "Nnu = 320.;\n",
      "h = Nnu*(kmb/d);\n",
      "print \" f) Numerical analysis the heat transfer coefficient is  \\nh  =  %.0f W/m**2*K \\\n",
      "  =  %.0f Btu/ft**2*h**-1*degF\"%(h,h*0.17611);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " a) Dittus -Boelter the heat transfer coefficient is  \n",
        "h  =  4322 W/m**2*K   =  761 Btu/ft**2*h**-1*degF\n",
        " b) Seid_er Tate the heat transfer coefficient is  \n",
        "h  =  4733 W/m**2*K   =  834 Btu/ft**2*h**-1*degF\n",
        " c) Sleicher-Rouse equation the heat transfer coefficient is  \n",
        "h  =  4766 W/m**2*K   =  839 Btu/ft**2*h**-1*degF\n",
        " d) Colbum Analogy the heat transfer coefficient is  \n",
        "h  =  4292 W/m**2*K  =  756 Btu/ft**2*h**-1*degF\n",
        " e) Friend-Metzner the heat transfer coefficient is  \n",
        "h  =  4713 W/m**2*K  =  830 Btu/ft**2*h**-1*degF\n",
        " f) Numerical analysis the heat transfer coefficient is  \n",
        "h  =  4824 W/m**2*K   =  850 Btu/ft**2*h**-1*degF\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 11.6 - Page No :525\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "# given\n",
      "Tw = 680.;  \t\t\t #[K] - temperature at the wall\n",
      "Tb = 640.;  \t\t\t #[K] - temperature at the bulk\n",
      "Tf = (Tw+Tb)/2;  \t\t\t #[K]\n",
      "Nre = 50000.;\n",
      "vmb = 2.88*10.**-7;\n",
      "vf = 2.84*10.**-7;\n",
      "Nref = Nre*(vmb/vf);\n",
      "k = 27.48;\n",
      "d = 0.04;\n",
      "\n",
      "# Calculation and Results\n",
      "# from table 11.3 the prandtl no. is\n",
      "Npr = 8.74*10**-3\n",
      "\n",
      "# consmath.tant heat flow\n",
      "Nnu = 6.3+(0.0167)*((Nref)**0.85)*((Npr)**0.93);\n",
      "h = Nnu*(k/d);\n",
      "print \" constant heat flow h  =  %.0f W/m**2*K  =  %.0f Btu/ft**2*h*degF\"%(h,round(h*0.17611,-1));\n",
      "\n",
      "# constant wall temperature\n",
      "Nnu = 4.8+0.0156*((Nref)**0.85)*((Npr)**0.93);\n",
      "h = Nnu*(k/d);\n",
      "print \" constant wall temperature h  =  %d W/m**2*K  =  %d Btu/ft**2*h*degF\"%(h,h*0.17611);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " constant heat flow h  =  5723 W/m**2*K  =  1010 Btu/ft**2*h*degF\n",
        " constant wall temperature h  =  4600 W/m**2*K  =  810 Btu/ft**2*h*degF\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 11.7 - Page No :536\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables\n",
      "di = 0.620;  \t\t\t #[inch] - internal diameter\n",
      "d0 = 0.750;  \t\t\t #[inch] - outer diameter\n",
      "Ai = 0.1623;  \t\t\t #[ft**2/ft]\n",
      "Ao = 0.1963;  \t\t\t #[ft**2/ft]\n",
      "wc = 12*(471.3/0.9425);  #[lb/h]\n",
      "cp = 1.;  \t\t\t #[Btu/lbm*degF] - heat capacity of water\n",
      "Tco = 110.;\n",
      "Tci = 50.;\n",
      "\n",
      "# Calculations\n",
      "qtotal = wc*cp*(Tco-Tci);\n",
      "deltaH_coldwater = 3.6*10**5;\n",
      "deltaH_vapourization = 1179.7-269.59;\n",
      "wh = deltaH_coldwater/deltaH_vapourization;\n",
      "hi = 80.;  \t\t\t #[Btu/h*ft**2*degF]\n",
      "ho = 500.;  \t\t\t #[Btu/h*ft**2*degF]\n",
      "km = 26.;  \t\t\t #[Btu/h*ft*degF]\n",
      "Ui = 1./((1./hi)+((Ai*math.log(d0/di))/(2*math.pi*km))+(Ai/(Ao*ho)));\n",
      "deltaT1 = 300-50.;\n",
      "deltaT2 = 300-110.;\n",
      "LMTD = (deltaT1-deltaT2)/(math.log(deltaT1/deltaT2));\n",
      "A = qtotal/(Ui*LMTD);\n",
      "L = A/Ai;\n",
      "\n",
      "# Results\n",
      "print \"the length of the heat exchanger is  L  =  %.2f ft\"%(L);\n",
      "\n",
      "# Answer is slightly different becasue of rounding error."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the length of the heat exchanger is  L  =  145.53 ft\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 11.8 - Page No :537\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "L = 30.;  \t\t\t     #[ft] - length\n",
      "Ai = 0.1623*L;\n",
      "di = 0.620;  \t\t\t #[inch] - internal diameter\n",
      "d0 = 0.750;  \t\t\t #[inch] - outer diameter\n",
      "Ao = 0.1963*L;  \t\t #[ft**2/ft]\n",
      "wc = 12.*(471.3/0.9425);\n",
      "cp = 1.;  \t\t\t #[Btu/lbm*degF] - heat capacity of water\n",
      "\n",
      "# Calculations\n",
      "deltaH_coldwater = 3.6*10**5;\n",
      "deltaH_vapourization = 1179.7-269.59;\n",
      "wh = deltaH_coldwater/deltaH_vapourization;\n",
      "hi = 80.;  \t\t\t #[Btu/h*ft**2*degF]\n",
      "ho = 500.;  \t\t #[Btu/h*ft**2*degF]\n",
      "km = 26.;  \t\t\t #[Btu/h*ft*degF]\n",
      "Ui = 1./((1./hi)+(((Ai/L)*math.log(d0/di))/(2*math.pi*km))+(Ai/(Ao*ho)));\n",
      "deltaT1 = 300-50.;\n",
      "deltaT = deltaT1/(math.exp((Ui*Ai)/(wc*cp)));\n",
      "Tsat = 300.;\n",
      "Tc2 = Tsat-deltaT;\n",
      "\n",
      "# Results\n",
      "print \" Therefore, the outlet temperature of the cold fluid_ is  Tc2  =  %.2f degF\"%(Tc2);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Therefore, the outlet temperature of the cold fluid_ is  Tc2  =  63.75 degF\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 11.9 - Page No :538\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "Ai = 4.869;\n",
      "wc = 6000.;\n",
      "cp = 1.;\n",
      "Rf = 0.002;\n",
      "Uclean = 69.685;\n",
      "\n",
      "# Calculations\n",
      "Udirty = 1./(Rf+(1./Uclean));\n",
      "deltaT1 = 300.-50;\n",
      "deltaT2 = deltaT1/(math.exp((Udirty*Ai)/(wc*cp)));\n",
      "Th2 = 300.;\n",
      "Tc2 = Th2-deltaT2;\n",
      "\n",
      "# Results\n",
      "print \" the outlet temperature is  Tc2  =  %.1f degF\"%(Tc2);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " the outlet temperature is  Tc2  =  62.1 degF\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 11.10 - Page No :544\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables\n",
      "Ui = 325.;  \t\t\t #[W/m**2*K] - overall heat transfer coefficient\n",
      "Thi = 120.;  \t\t\t #[degC] - inlet temperature of hydrocarbon\n",
      "Tho = 65.;  \t\t\t #[degC] - outlet temperature of hydrocarbon\n",
      "Tci = 15.;  \t\t\t #[degC] - inlet temperature of water\n",
      "Tco = 50.;  \t\t\t #[degC] - outlet temperture of water\n",
      "cp = 4184.;  \t\t\t #[J/kg*K] - heat capacity of water\n",
      "ch = 4184.*0.45\t\t\t #[J/kg*K] - heat capacity of hydrocarbon\n",
      "wc = 1.2;    \t\t\t #[kg/sec] - mass flow rate of water\n",
      "\n",
      "# Calculation and Results\n",
      "wh = ((wc*cp)*(Tco-Tci))/((ch)*(Thi-Tho));\n",
      "qtotal = wc*cp*(Tco-Tci);\n",
      "\n",
      "# (a) - parallel double pipe\n",
      "F = 1.;\n",
      "Thi = 120.;  \t\t\t #[degC] - inlet temperature of hydrocarbon\n",
      "Tho = 65.;  \t\t\t #[degC] - outlet temperature of hydrocarbon\n",
      "Tci = 15.;  \t\t\t #[degC] - inlet temperature of water\n",
      "Tco = 50.;  \t\t\t #[degC] - outlet temperture of water\n",
      "deltaT1 = Thi-Tci;\n",
      "deltaT2 = Tho-Tco;\n",
      "LMTD = (deltaT2-deltaT1)/(math.log(deltaT2/deltaT1));\n",
      "Ai = qtotal/((Ui*LMTD));\n",
      "print \" a) parallel double pipe  Ai  =  %.2f m**2\"%(Ai);\n",
      "\n",
      "# (b) - counter flow\n",
      "F = 1.;\n",
      "Thi = 120.;  \t\t\t #[degC] - inlet temperature of hydrocarbon\n",
      "Tho = 65.;  \t\t\t #[degC] - outlet temperature of hydrocarbon\n",
      "Tco = 15.;  \t\t\t #[degC] - inlet temperature of water\n",
      "Tci = 50.;  \t\t\t #[degC] - outlet temperture of water\n",
      "deltaT1 = Thi-Tci;\n",
      "deltaT2 = Tho-Tco;\n",
      "LMTD = (deltaT2-deltaT1)/(math.log(deltaT2/deltaT1));\n",
      "Ai = qtotal/((Ui*LMTD));\n",
      "print \" b) counter flow   Ai  =  %.2f m**2\"%(Ai);\n",
      "\n",
      "# (c) - 1-2 shell and tube \n",
      "Thi = 120.;  \t\t\t #[degC] - inlet temperature of hydrocarbon\n",
      "Tho = 65.;  \t\t\t #[degC] - outlet temperature of hydrocarbon\n",
      "Tci = 15.;  \t\t\t #[degC] - inlet temperature of water\n",
      "Tco = 50.;  \t\t\t #[degC] - outlet temperture of water\n",
      "Z = (Thi-Tho)/(Tco-Tci);\n",
      "nh = (Tco-Tci)/(Thi-Tci);\n",
      "deltaT1 = Thi-Tco;\n",
      "deltaT2 = Tho-Tci;\n",
      "F = 0.92;\n",
      "LMTD = (F*(deltaT2-deltaT1))/(math.log(deltaT2/deltaT1));\n",
      "Ai = qtotal/((Ui*LMTD));\n",
      "print \" c) 1-2 shell and tube   Ai  =  %.2f m**2\"%(Ai);\n",
      "\n",
      "# (d) - 2-4 shell and tube\n",
      "Thi = 120.;  \t\t\t #[degC] - inlet temperature of hydrocarbon\n",
      "Tho = 65.;  \t\t\t #[degC] - outlet temperature of hydrocarbon\n",
      "Tci = 15.;  \t\t\t #[degC] - inlet temperature of water\n",
      "Tco = 50.;  \t\t\t #[degC] - outlet temperture of water\n",
      "Z = (Thi-Tho)/(Tco-Tci);\n",
      "nh = (Tco-Tci)/(Thi-Tci);\n",
      "F = 0.975;\n",
      "LMTD = (F*(deltaT2-deltaT1))/(math.log(deltaT2/deltaT1));\n",
      "Ai = qtotal/((Ui*LMTD));\n",
      "print \" d) 2-4 shell and tube   Ai  =  %.2f m**2\"%(Ai);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " a) parallel double pipe  Ai  =  11.69 m**2\n",
        " b) counter flow   Ai  =  9.10 m**2\n",
        " c) 1-2 shell and tube   Ai  =  9.89 m**2\n",
        " d) 2-4 shell and tube   Ai  =  9.33 m**2\n"
       ]
      }
     ],
     "prompt_number": 19
    }
   ],
   "metadata": {}
  }
 ]
}