{
 "metadata": {
  "name": "",
  "signature": "sha256:6f27b63789233dbcd6b595c8e65a2bfbfddf8fdce1aec80ae9bb6f8c99f32cf1"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 6: Forced Convection Inside Tubes And Ducts"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6.1: Page 365"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.1 \"\n",
      "\n",
      "#Inlet temperature in degree C\n",
      "Tin = 10;\n",
      "#Outlet temperature in degree C\n",
      "Tout = 40;\n",
      "#Diameter in m\n",
      "D = 0.02;\n",
      "#Massflow rate in kg/s\n",
      "m = 0.01;\n",
      "#Heat flux in W/m2\n",
      "q = 15000;\n",
      "\n",
      "#From Table 13 in Appendix 2, the appropriate properties of water at an\n",
      "#average temperature between inlet and outlet of 25\u00b0C are\n",
      "\n",
      "#Density in kg/m3\n",
      "rho = 997;\n",
      "#Specific heat in J/kgK\n",
      "c = 4180;\n",
      "#Thermal conductivity in W/mK\n",
      "k = 0.608;\n",
      "#Dynamic vismath.cosity in Ns/m2\n",
      "mu = 0.00091;\n",
      "\n",
      "print \"Reynolds Number is\"\n",
      "#Reynolds number\n",
      "Re = (4*m)/((math.pi*D)*mu)\n",
      "print int(Re)\n",
      "print \"Flow is Laminar\"\n",
      "\n",
      "#Since the thermal-boundary condition is one of uniform heat flux, Nu\u0005= 4.36 from Eq. (6.31)\n",
      "#Nusselt number\n",
      "Nu = 4.36;\n",
      "print \"Heat transfer coefficient in W/m2K\"\n",
      "#Heat transfer coefficient in W/m2K\n",
      "hc = (Nu*k)/D\n",
      "print int(hc)\n",
      "\n",
      "#The length of pipe needed for a 30\u00b0C temperature rise is obtained from a heat balance\n",
      "print \"Length of pipe in m\"\n",
      "#Length of pipe in m\n",
      "L = ((m*c)*(Tout-Tin))/((math.pi*D)*q)\n",
      "print round(L,2)\n",
      "\n",
      "print \"Inner surface temperature at outlet in degree C\"\n",
      "#Inner surface temperature at outlet in degree C\n",
      "Ts = q/hc+Tout\n",
      "print round(Ts,2)\n",
      "\n",
      "#The friction factor is found from Eq. (6.18)\n",
      "print \"Friction factor is\"\n",
      "#Friction factor is\n",
      "f = 64/Re\n",
      "print round(f,4)\n",
      "#Average velocity in m/s\n",
      "U = (4*m)/(((rho*math.pi)*D)*D);\n",
      "print \"The pressure drop in the pipe in N/m2\"\n",
      "#The pressure drop in the pipe in N/m2\n",
      "deltaP = ((((f*L)*rho)*U)*U)/(D*2)\n",
      "print round(deltaP,1)\n",
      "\n",
      "#Efficiency\n",
      "n = 0.5;\n",
      "#The pumping power P is obtained from Eq. 6.19\n",
      "print \"Pumping power in W is\"\n",
      "#Pumping power in W\n",
      "P = (m*deltaP)/(rho*n)\n",
      "print round(P,6)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.1 \n",
        "Reynolds Number is\n",
        "699\n",
        "Flow is Laminar\n",
        "Heat transfer coefficient in W/m2K\n",
        "132\n",
        "Length of pipe in m\n",
        "1.33\n",
        "Inner surface temperature at outlet in degree C\n",
        "153.17\n",
        "Friction factor is\n",
        "0.0915\n",
        "The pressure drop in the pipe in N/m2\n",
        "3.1\n",
        "Pumping power in W is\n",
        "6.2e-05\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6.2: Page 369"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.2 \"\n",
      "\n",
      "#Diameter in m\n",
      "D = 0.01;\n",
      "#Wall thickness in m\n",
      "t = 0.02/100;\n",
      "#Massflow rate in kg/s\n",
      "m = 0.05;\n",
      "#Inlet temperature in degree C\n",
      "Tin = 35;\n",
      "#Outlet temperature in degree C\n",
      "Tout = 45.0;\n",
      "#Assuming a constant tube temp. in degree C\n",
      "T = 100.0;\n",
      "\n",
      "#From Table 16 in Appendix 2, we get the following properties for oil at\n",
      "#40\u00b0C\n",
      "\n",
      "#Density in kg/m3\n",
      "rho = 876.0;\n",
      "#Specific heat in J/kgK\n",
      "c = 1964.0;\n",
      "#Thermal conductivity in W/mK\n",
      "k = 0.144;\n",
      "#Dynamic vismath.cosity in Ns/m2\n",
      "mu = 0.21;\n",
      "#Prandtl number\n",
      "Pr = 2870.0;\n",
      "\n",
      "#Reynolds Number is\n",
      "Re = (4*m)/((math.pi*D)*mu);\n",
      "\n",
      "#For laminar flow and constant temperature assumption\n",
      "#Nusselt number\n",
      "Nu = 3.66;\n",
      "#Heat transfer coefficient in W/m2K\n",
      "hc = (Nu*k)/D;\n",
      "#Heat transfer rate in W\n",
      "q = (m*c)*(Tout-Tin);\n",
      "#LMTD in degree K\n",
      "LMTD = (T-Tout-(T-Tin))/math.log((T-Tout)/(T-Tin));\n",
      "\n",
      "print \"Length of pipe in m is\"\n",
      "#Length of pipe in m\n",
      "L = q/(((math.pi*D)*hc)*LMTD)\n",
      "print round(L,2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.2 \n",
        "Length of pipe in m is\n",
        "9.91\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6.3: Page 375"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.3 \"\n",
      "\n",
      "#Bulk temperature in degree K\n",
      "T = 293;\n",
      "#Side of square duct in m\n",
      "b = 0.1;\n",
      "#Length of square duct in m\n",
      "L = 5;\n",
      "#Wall temperature in degree K\n",
      "Tw = 300;\n",
      "#Velocity in m/s\n",
      "U = 0.03;\n",
      "\n",
      "#Hydraulic diameter in m\n",
      "D = 4*((b*b)/(4*b));\n",
      "\n",
      "#Physical properties at 293 K from Table 19 in Appendix 2 are\n",
      "\n",
      "#Density in kg/m3\n",
      "rho = 810;\n",
      "#Specific heat in J/kgK\n",
      "c = 2366;\n",
      "#Thermal conductivity in W/mK\n",
      "k = 0.167;\n",
      "#Dynamic vismath.cosity in Ns/m2\n",
      "mu = 0.00295;\n",
      "#Prandtl number\n",
      "Pr = 50.8;\n",
      "\n",
      "#Reynolds Number is\n",
      "Re = ((U*D)*rho)/mu;\n",
      "\n",
      "#Hence, the flow is laminar. Assuming fully developed flow, we get the\n",
      "#Nusselt number for a uniform wall temperature from Table 6.1\n",
      "\n",
      "Nu = 2.98;\n",
      "#Heat transfer coefficient in W/m2K\n",
      "hc = (Nu*k)/D;\n",
      "\n",
      "#Similarly, from Table 6.1, the product Re*f=56.91\n",
      "\n",
      "print \"Friction factor is\"\n",
      "#Friction factor\n",
      "f = 56.91/Re\n",
      "print round(f,4)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.3 \n",
        "Friction factor is\n",
        "0.0691\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6.4: Page 378"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.4 \"\n",
      "\n",
      "#Temperature of device camath.sing in degree K\n",
      "Ts = 353;\n",
      "#Length of holes in m\n",
      "L = 0.3;\n",
      "#Diameter of holes in m\n",
      "D = 0.00254;\n",
      "#Inlet temperature in degree K\n",
      "Tin = 333;\n",
      "#Velocity in m/s\n",
      "U = 0.2;\n",
      "\n",
      "#The properties of water at 333 K, from Table 13 in Appendix 2, are\n",
      "\n",
      "#Density in kg/m3\n",
      "rho = 983;\n",
      "#Specific heat in J/kgK\n",
      "c = 4181;\n",
      "#Thermal conductivity in W/mK\n",
      "k = 0.658;\n",
      "#Dynamic vismath.cosity in Ns/m2\n",
      "mu = 0.000472;\n",
      "#Prandtl number\n",
      "Pr = 3;\n",
      "\n",
      "#Reynolds Number is\n",
      "Re = ((U*D)*rho)/mu;\n",
      "\n",
      "if (((Re*Pr)*D)/L)>10 :\n",
      "  #Eq. (6.42) can be used to evaluate the heat transfer coefficient.\n",
      "  #But math.since the mean bulk temperature is not known, we shall evaluate all the properties first at the inlet bulk temperature Tb1 ,\n",
      "  #then determine an exit bulk temperature, and then make a second iteration to obtain a more precise value.\n",
      "\n",
      "  #At the wall temperature of 353 K\n",
      "  #Vismath.cosity in SI units\n",
      "  mus = 0.000352; \n",
      "  #From Eq. (6.42)\n",
      "  #Nusselt number\n",
      "  Nu = (1.86*((((Re*Pr)*D)/L)**0.33))*((mu/mus)**0.14);\n",
      "  #Heat transfer coefficient in W/m2K\n",
      "  hc = (Nu*k)/D;\n",
      "  #mass flow rate in kg/s\n",
      "  m = ((((rho*math.pi)*D)*D)*U)/4;\n",
      "\n",
      "  #Inserting the calculated values for hc and m into Energy balance equation, along with Tb1 and Ts and\n",
      "  #gives Tb2=345K\n",
      "\n",
      "  #For the second iteration, we shall evaluate all properties at the new average bulk temperature\n",
      "  #Bulk temp. in degree C\n",
      "  Tb = (345.0+Tin)/2;\n",
      "\n",
      "  #At this temperature, we get from Table 13 in Appendix 2:\n",
      "  #Density in kg/m3\n",
      "  rho = 980.0;\n",
      "  #Specific heat in J/kgK\n",
      "  c = 4185;\n",
      "  #Thermal conductivity in W/mK\n",
      "  k = 0.662;\n",
      "  #Dynamic vismath.cosity in Ns/m2\n",
      "  mu = 0.000436;\n",
      "  #Prandtl number\n",
      "  Pr = 2.78;\n",
      "\n",
      "  #New reynolds Number is\n",
      "  Re = ((U*D)*rho)/mu;\n",
      "\n",
      "  #With this value of Re, the heat transfer coefficient can now be calculated.\n",
      "  #We obtain the following similarly\n",
      "  #Nusselt number\n",
      "  Nu = 5.67;\n",
      "  #Heat transfer coefficient in W/m2K\n",
      "  hc = (Nu*k)/D;\n",
      "  #Similarly putting this value in energy balance yields\n",
      "  #Bulk temperature in degree K\n",
      "  Tb2 = 345;  \n",
      "\n",
      "  print \"Outlet temperature in degree K\"\n",
      "  #Outlet temperature in degree K\n",
      "  print round(Tb2,2)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.4 \n",
        "Outlet temperature in degree K\n",
        "345.0\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6.5: Page 389"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.5 \"\n",
      "\n",
      "#Velocity in ft/s\n",
      "U = 10.0;\n",
      "#Outer diameter in inches\n",
      "D = 1.5;\n",
      "#Inner diameter in inches\n",
      "d = 1.0;\n",
      "#Temperature of water in degree F\n",
      "Tw = 180.0;\n",
      "#Temperature of wall in degree F\n",
      "Twall = 100.0;\n",
      "\n",
      "#The hydraulic diameter D for this geometry is 0.5 in.\n",
      "D = 0.5;\n",
      "\n",
      "#Umath.sing properties given in the table provided\n",
      "\n",
      "#Reynolds number\n",
      "Re = (((U*D)*3600)*60.8)/(12*0.75);\n",
      "#Prandtl number\n",
      "Pr = (1*0.75)/0.39;\n",
      "#The Nusselt number according to the Dittus-Boelter correlation [Eq. (6.60)] \n",
      "Nu = (0.023*(125000**0.8))*(Pr**0.3);\n",
      "print 'The Nusselt number according to the Dittus-Boelter correlation comes out to be \\n',int(Nu)\n",
      "\n",
      "#Umath.sing the Sieder-Tate correlation [Eq. (6.61)]\n",
      "#Nusselt number\n",
      "Nu = 358;\n",
      "print 'The Nusselt number according to the Sieder-Tate correlation comes out to be \\n',Nu\n",
      "\n",
      "#The Petukhov-Popov correlation [Eq. (6.63)] gives\n",
      "#Friction factor\n",
      "f = (1.82*log10(125000)-1.64)**(-2);\n",
      "#K1 of Eq. 6.63\n",
      "K1 = 1+3.4*f;\n",
      "#K2 of Eq. 6.63\n",
      "K2 = 11.7+1.8/(Pr**0.33);\n",
      "#Nusselt number\n",
      "Nu = 370;\n",
      "\n",
      "#The Sleicher-Rouse correlation [Eq. (6.64)] yields\n",
      "#a of Eq. 6.64\n",
      "a = 0.852;\n",
      "#b of Eq. 6.64\n",
      "b = 1/3.0+0.5/math.exp(0.6*4.64);\n",
      "#Reynolds number\n",
      "Re = 82237;\n",
      "#Nusselt number\n",
      "Nu = 5+(0.015*(Re**a))*(4.64**b);\n",
      "print 'Nusselt number according to The Sleicher-Rouse correlation comes out to be \\n',int(Nu)\n",
      "\n",
      "print \"Assuming that the correct answer is  Nu=370\"\n",
      "print \"The first two correlations underpredict by about 10% and 3.5%, respectively\"\n",
      "print \"while the Sleicher-Rouse method overpredicts by about 10.5%.\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.5 \n",
        "The Nusselt number according to the Dittus-Boelter correlation comes out to be \n",
        "334\n",
        "The Nusselt number according to the Sieder-Tate correlation comes out to be \n",
        "358\n",
        "Nusselt number according to The Sleicher-Rouse correlation comes out to be \n",
        "409\n",
        "Assuming that the correct answer is  Nu=370\n",
        "The first two correlations underpredict by about 10% and 3.5%, respectively\n",
        "while the Sleicher-Rouse method overpredicts by about 10.5%.\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6.6: Page 394"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.6 \"\n",
      "\n",
      "#Mass flow rate in kg/s\n",
      "m = 3;\n",
      "#Diameter of tube in m\n",
      "D = 5/100.0;\n",
      "#Temperature of fluid in degree K\n",
      "Tb = 473.0;\n",
      "#Temperature of wall in degree K\n",
      "Ts = 503.0;\n",
      "\n",
      "#Density in kg/m3\n",
      "rho = 7700.0;\n",
      "#Specific heat in J/kgK\n",
      "c = 130.0;\n",
      "#Thermal conductivity in W/mK\n",
      "k = 12.0;\n",
      "#Kinematic vismath.cosity in m2/s\n",
      "nu = 0.00000008;\n",
      "#Prandtl number\n",
      "Pr = 0.011;\n",
      "\n",
      "#The rate of heat transfer per unit temperature rise in W is\n",
      "q = (m*c)*1;\n",
      "\n",
      "#Reynolds Number is\n",
      "Re = (D*m)/(((((rho*math.pi)*D)*D)*nu)/4);\n",
      "\n",
      "#The heat transfer coefficient in W/m2K is obtained from Eq. (6.67)\n",
      "hc = ((k*0.625)*((Re*Pr)**0.4))/D;\n",
      "\n",
      "#Surface area in m2\n",
      "A = q/(hc*(Ts-Tb));\n",
      "\n",
      "print \"Required length of tube in m is\"\n",
      "#Required length of tube in m\n",
      "L = A/(math.pi*D)\n",
      "print round(L,4)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.6 \n",
        "Required length of tube in m is\n",
        "0.0307\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6.7: Page 405"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "print \"Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.7 \"\n",
      "\n",
      "#Temperature of airstream in degree C\n",
      "Tair = 20;\n",
      "#Velocity of air in m/s\n",
      "U = 1.8;\n",
      "#Side of circuit in m\n",
      "L = 27/1000.0;\n",
      "#Spacing in the circuit in m\n",
      "H = 17/1000.0;\n",
      "\n",
      "#At 20\u00b0C, the properties of air from Table 28, Appendix 2, are \n",
      "\n",
      "#Density in kg/m3\n",
      "rho = 7700.0;\n",
      "#Specific heat in J/kgK\n",
      "c = 130.0;\n",
      "#Thermal conductivity in W/mK\n",
      "k = 0.0251;\n",
      "#Kinematic vismath.cosity in m2/s\n",
      "nu = 0.0000157;\n",
      "#Prandtl number\n",
      "Pr = 0.011;\n",
      "\n",
      "#Reynolds number\n",
      "Re = (U*H)/nu;\n",
      "\n",
      "#From Fig. (6.27), we see that the second integrated circuit is in the inlet region and estimate Nu2 =\u000529.\n",
      "#Nusselt number in second circuit\n",
      "Nu2 = 29;\n",
      "print \"Heat transfer coefficient along 2nd circuit in W/m2K\"\n",
      "#Heat transfer coefficient in W/m2K\n",
      "hc2 = (Nu2*k)/L\n",
      "print round(hc2)\n",
      "\n",
      "#The sixth integrated circuit is in the developed region and from Eq. (6.79)\n",
      "#Nusselt number in sixth circuit\n",
      "Nu6 = 21.7;\n",
      "print \"Heat transfer coefficient along 6th circuit in W/m2K\"\n",
      "##Heat transfer coefficient in W/m2K\n",
      "hc6 = (Nu6*k)/L\n",
      "print round(hc6,1)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Principles of Heat Transfer, 7th Ed. Frank Kreith et. al Chapter - 6 Example # 6.7 \n",
        "Heat transfer coefficient along 2nd circuit in W/m2K\n",
        "27.0\n",
        "Heat transfer coefficient along 6th circuit in W/m2K\n",
        "20.2\n"
       ]
      }
     ],
     "prompt_number": 27
    }
   ],
   "metadata": {}
  }
 ]
}