{
 "metadata": {
  "name": "",
  "signature": "sha256:ca5009f0cb9dd781f90e694bd80e1f1d823182523e44edb65991cb3279963181"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 8 : Natural Convection"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.1  Page No : 340"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "L = 0.3;\t\t\t#Length of the glass plate in m\n",
      "Ta = 27;\t\t\t#Temperature of air in degree C\n",
      "Ts = 77;\t\t\t#Surface temperature in degree C\n",
      "v = 4;\t\t\t#Velocity of air in m/s\n",
      "\n",
      "# Calculations\n",
      "Tf = (Ta+Ts)/2;\t\t\t#Film temperature in degree C\n",
      "k = 0.02815;\t\t\t#Thermal conductivity in W/m.K\n",
      "v1 = (18.41*10**-6);\t\t\t#Kinematic viscosity in m**2/s\n",
      "Pr = 0.7;\t\t\t#Prantl number\n",
      "b = (3.07*10**-3);\t\t\t#Coefficient of thermal expansion in 1./K\n",
      "Gr = (9.81*b*(Ts-Ta)*L**3)/v1**2;\t\t\t#Grashof number\n",
      "q = L*((3.93*(1./math.sqrt(Pr))*(0.952+Pr)**0.25*Gr**(-0.25)));\t\t\t#Boundary layer thickness at the trailing edge of the plate in free convection in m\n",
      "Re = (v*L)/v1;\t\t\t#Reynolds number\n",
      "q1 = (5*L)/math.sqrt(Re);\t\t\t#Boundary layer thickness at the trailing edge of the plate in forced convection in m\n",
      "\n",
      "# Results\n",
      "print 'Boundary layer thickness at the trailing edge of the plate in free convection is % 3.4f m \\\n",
      "\\nBoundary layer thickness at the trailing edge of the plate in forced convection is %3.4f m'%(q,q1) \n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Boundary layer thickness at the trailing edge of the plate in free convection is  0.0153 m \n",
        "Boundary layer thickness at the trailing edge of the plate in forced convection is 0.0059 m\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.2  Page No : 341"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# Variables\n",
      "L = 0.3;\t\t\t#Length of the glass plate in m\n",
      "Ta = 27;\t\t\t#Temperature of air in degree C\n",
      "Ts = 77;\t\t\t#Surface temperature in degree C\n",
      "v = 4;\t\t\t#Velocity of air in m/s\n",
      "\n",
      "# Calculations\n",
      "Tf = (Ta+Ts)/2;\t\t\t#Film temperature in degree C\n",
      "k = 0.02815;\t\t\t#Thermal conductivity in W/m.K\n",
      "v1 = (18.41*10**-6);\t\t\t#Kinematic viscosity in m**2/s\n",
      "Pr = 0.7;\t\t\t#Prantl number\n",
      "b = (3.07*10**-3);\t\t\t#Coefficient of thermal expansion in 1./K\n",
      "Gr = (9.81*b*(Ts-Ta)*L**3)/v1**2;\t\t\t#Grashof number\n",
      "Re = (v*L)/v1;\t\t\t#Reynolds number\n",
      "Nu = (0.677*math.sqrt(Pr)*(0.952+Pr)**(-0.25)*Gr**0.25);\t\t\t#Nusselts number\n",
      "h = (Nu*k)/L;\t\t\t#Heat transfer coefficient for natural convection in W/m**2.K\n",
      "Nux = (0.664*math.sqrt(Re)*Pr**(1./3));\t\t\t#Nusselts number\n",
      "hx = (Nux*k)/L;\t\t\t#Heat transfer coefficient for forced convection in W/m**2.K\n",
      "\n",
      "# Results\n",
      "print 'Heat transfer coefficient for natural convection is %3.1f W/m**2.K \\n \\\n",
      "Heat transfer coefficient for forced convection is %3.2f W/m**2.K'%(h,hx)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat transfer coefficient for natural convection is 4.9 W/m**2.K \n",
        " Heat transfer coefficient for forced convection is 14.12 W/m**2.K\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.3  Page No : 343"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "L = 0.609;\t\t\t#Height of the metal plate in m\n",
      "Ts = 161.;\t\t\t#Temperature of the wall in degree C\n",
      "Ta = 93.;\t\t\t#Temperature of air in degree C\n",
      "\n",
      "# Calculations\n",
      "Tf = (Ts+Ta)/2;\t\t\t#Film temperature in degree C\n",
      "k = 0.0338;\t\t\t#Thermal conductivity in W/m.K\n",
      "v1 = (26.4*10**-6);\t\t\t#Kinematic vismath.cosity in m**2/s\n",
      "Pr = 0.69;\t\t\t#Prantl number\n",
      "b = 0.0025;\t\t\t#Coefficient of thermal expansion in 1./K\n",
      "a = (38.3*10**-6);\t\t\t#Thermal diffusivity in m**2/s\n",
      "Ra = ((9.81*b*L**3*(Ts-Ta))/(v1*a));\t\t\t#Rayleigh number\n",
      "Nu = (0.68+((0.67*Ra**0.25)/(1+(0.492/Pr)**(9./16))**(4./9)));\t\t\t#Nussults number\n",
      "h = (Nu*k)/L;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "Q = (h*L*(Ts-Ta));\t\t\t#Rate of heat transfer in W\n",
      "Nul = 0.59 * (3.72*10**8)**(1./4)\n",
      "\n",
      "# Results\n",
      "print 'Heat transfer coefficient is %3.3f W/m**2.K Rate of heat transfer is %3.2f W'%(h,Q)\n",
      "print \"NuL = %.2f W\"%Nul"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat transfer coefficient is 3.990 W/m**2.K Rate of heat transfer is 165.24 W\n",
        "NuL = 81.94 W\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.4  Page No : 344"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "W = 0.5;\t\t\t#Width of the radiator in m\n",
      "L = 1.;\t\t\t#Height of the radiator in m\n",
      "Ts = 84.;\t\t\t#Surface temperature in degree C\n",
      "Ta = 20.;\t\t\t#Room temperature in degree C\n",
      "\n",
      "# Calculations\n",
      "Tf = (Ts+Ta)/2;\t\t\t#Film temperature in degree C\n",
      "k = 0.02815;\t\t\t#Thermal conductivity in W/m.K\n",
      "v1 = (18.41*10**-6);\t\t\t#Kinematic viscosity in m**2/s\n",
      "Pr = 0.7;\t\t\t#Prantl number\n",
      "b = 0.003077;\t\t\t#Coefficient of thermal expansion in 1./K\n",
      "Ra = ((9.81*b*L**3*(Ts-Ta)*Pr)/(v1**2));\t\t\t#Rayleigh number\n",
      "Nu = (0.825+((0.387*Ra**(1./6))/(1+(0.492/Pr)**(9./16))**(8./27)))**2;\t\t\t#Nussults number\n",
      "h = (1170.9*k)/L;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "Q = (h*W*L*(Ts-Ta));\t\t\t#Convective heat loss in W\n",
      "\n",
      "# Results\n",
      "print 'Convective heat loss from the radiator is %3.2f W'%(Q)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Convective heat loss from the radiator is 1054.75 W\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.5  Page No : 345"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "L = 0.8;\t\t\t#Height of the plate in m\n",
      "W = 0.08;\t\t\t#Width of the plate in m\n",
      "Ts = 170;\t\t\t#Surafce temperature in degree C\n",
      "Tw = 70;\t\t\t#Temperature of water in degree C\n",
      "Tf = 130;\t\t\t#Final temperature in degree C\n",
      "\n",
      "# Calculations\n",
      "Tb = (Ts+Tw)/2;\t\t\t#Film temperature in degree C\n",
      "p = 960.63;\t\t\t#Density in kg/m**3\n",
      "k = 0.68;\t\t\t#Thermal conductivity in W/m.K\n",
      "v1 = (0.294*10**-6);\t\t\t#Kinematic viscosity in m**2/s\n",
      "b = 0.00075;\t\t\t#Coefficient of thermal expansion in 1./K\n",
      "Cp = 4216;\t\t\t#Specific heat in J/kg.K\n",
      "a = (1.68*10**-7);\t\t\t#Thermal diffusivity in m**2/s\n",
      "Lc = (W/2);\t\t\t#Characteristic length in m\n",
      "Ra = ((9.81*b*Lc**3*(Tf-Tw))/(v1*a));\t\t\t#Rayleigh number\n",
      "Nu1 = (0.15*Ra**(1./3));\t\t\t#Nussults number\n",
      "h1 = (Nu1*k)/Lc;\t\t\t#Heat transfer coefficient at top surface in W/m**2.K \n",
      "Nu2 = 0.27*(Ra)**(0.25);\t\t\t#Nusselts number\n",
      "h2 = (Nu2*k)/Lc;\t\t\t#Heat transfer coefficient at bottom surface in W/m**2.K\n",
      "Q = ((h1+h2)*W*L*(Tf-Tw))/1000;\t\t\t#Rate of heat input to the plate in kW\n",
      "\n",
      "# Results\n",
      "print 'Rate of heat input to the plate necessary to maintain the temperature at %3.0f degree C is %3.2f kW'%(Tf,Q)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Rate of heat input to the plate necessary to maintain the temperature at 130 degree C is 10.85 kW\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.6  Page No : 346"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "L = 0.3;\t\t\t#Height of the duct in m\n",
      "W = 0.6;\t\t\t#Width of the duct in m\n",
      "Ts = 15;\t\t\t#Surface temperature in degree C\n",
      "Ta = 25;\t\t\t#Temeprature of air in degree C\n",
      "\n",
      "# Calculations\n",
      "Tb = (Ts+Ta)/2;\t\t\t#Film temperature in degree C\n",
      "p = 1.205;\t\t\t#Density in kg/m**3\n",
      "k = 0.02593;\t\t\t#Thermal conductivity in W/m.K\n",
      "v1 = (15.06*10**-6);\t\t\t#Kinematic viscosity in m**2/s\n",
      "b = 0.00341;\t\t\t#Coefficient of thermal expansion in 1./K\n",
      "Cp = 1005;\t\t\t#Specific heat in J/kg.K\n",
      "Pr = 0.705;\t\t\t#Prantl number\n",
      "Ra = ((9.81*b*L**3*(Ta-Ts)*Pr)/(v1**2));\t\t\t#Rayleigh number\n",
      "Nux = (0.59*Ra**(0.25));\t\t\t#Nusselts number\n",
      "hx = (Nux*k)/L;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "Lc = (W/2);\t\t\t#Characteristic length in m\n",
      "Nu1 = (0.15*Ra**(1./3));\t\t\t#Nussults number\n",
      "h1 = (Nu1*k)/Lc;\t\t\t#Heat transfer coefficient at top surface in W/m**2.K \n",
      "Nu2 = 0.27*(Ra)**(0.25);\t\t\t#Nusselts number\n",
      "h2 = (Nu2*k)/Lc;\t\t\t#Heat transfer coefficient at bottom surface in W/m**2.K\n",
      "Q = ((2*hx*L)+(W*(h1+h2)))*(Ta-Ts);\t\t\t#Rate of heat gained per unit length in W/m\n",
      "\n",
      "# Results\n",
      "print 'Rate of heat gained per unit length is %3.2f W/m'%(Q)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Rate of heat gained per unit length is 56.11 W/m\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.7  Page No : 348"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "LH = 0.08;\t\t\t#Horizantal length in m\n",
      "LV = 0.12;\t\t\t#Vertical length in m\n",
      "Ts = 50;\t\t\t#Surface temperature in degree C\n",
      "Ta = 0;\t\t\t#Temeprature of air in degree C\n",
      "\n",
      "# Calculations\n",
      "L = (LH*LV)/(LH+LV);\t\t\t#Characteristic length in m\n",
      "Tb = (Ts+Ta)/2;\t\t\t#Film temperature in degree C\n",
      "p = 0.707;\t\t\t#Density in kg/m**3\n",
      "k = 0.0263;\t\t\t#Thermal conductivity in W/m.K\n",
      "v1 = (15.89*10**-6);\t\t\t#Kinematic viscosity in m**2/s\n",
      "b = (1./300);\t\t\t#Coefficient of thermal expansion in 1./K\n",
      "Pr = 0.707;\t\t\t#Prantl number\n",
      "Gr = ((9.81*b*L**3*(Ts-Ta))/(v1**2));\t\t\t#Grashof number\n",
      "Nu = 0.55*Gr**(0.25);\t\t\t#Nussults number\n",
      "h = (Nu*k)/L;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "\n",
      "# Results\n",
      "print 'Heat transfer coefficient is %3.2f W/m**2.K'%(h)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat transfer coefficient is 8.77 W/m**2.K\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.8  Page No : 349"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "D = 0.2;\t\t\t#Outer diameter of the pipe in m\n",
      "Ts = 100;\t\t\t#Surface temperature in degree C\n",
      "Ta = 20;\t\t\t#Temperature of air in degree C\n",
      "L = 3;\t\t\t#Length of pipe in m\n",
      "\n",
      "# Calculations\n",
      "Tf = (Ts+Ta)/2;\t\t\t#Film temperature in degree C\n",
      "k = 0.02896;\t\t\t#Thermal conductivity in W/m.K\n",
      "v1 = (18.97*10**-6);\t\t\t#Kinematic viscosity in m**2/s\n",
      "b = (1./333);\t\t\t#Coefficient of thermal expansion in 1./K\n",
      "Pr = 0.696;\t\t\t#Prantl number\n",
      "Gr = ((9.81*b*L**3*(Ts-Ta))/(v1**2));\t\t\t#Grashof number\n",
      "Ra = (Gr*Pr);\t\t\t#Rayleigh number\n",
      "Nu = (0.1*Ra**(1./3));\t\t\t#Nussults number\n",
      "h = (Nu*k)/L;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "Q = (h*3.14*D*(Ts-Ta));\t\t\t#Rate of heat loss per meter length of pipe in W/m\n",
      "\n",
      "# Results\n",
      "print 'Rate of heat loss per meter length of pipe is %3.2f W/m'%(Q)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Rate of heat loss per meter length of pipe is 241.24 W/m\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.9  Page No : 350"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "D = 0.1;\t\t\t#Outer diamter of the pipe in m\n",
      "Ta = 30.;\t\t\t#Ambient temperature of air degree C\n",
      "Ts = 170.;\t\t\t#Surface temperature in degree C\n",
      "e = 0.9;\t\t\t#Emissivity \n",
      "\n",
      "# Calculations\n",
      "Tb = (Ts+Ta)/2;\t\t\t#Film temperature in degree C\n",
      "k = 0.0321;\t\t\t#Thermal conductivity in W/m.K\n",
      "v1 = (23.13*10**-6);\t\t\t#Kinematic viscosity in m**2/s\n",
      "b = 0.00268;\t\t\t#Coefficient of thermal expansion in 1./K\n",
      "Pr = 0.688;\t\t\t#Prantl number\n",
      "Ra = ((9.81*b*D**3*(Ts-Ta)*Pr)/(v1**2));\t\t\t#Rayleigh number\n",
      "Nu = (0.6+((0.387*Ra**(1./6))/(1+(0.559/Pr)**(9./16))**(8./27)))**2;\t\t\t#Nussults number\n",
      "h = (Nu*k)/D;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "Q = (h*3.1415*D*(Ts-Ta))+(e*3.1415*D*5.67*10**-8*((Ts+273)**4-(Ta+273)**4));\t\t\t#Total heat loss per meter length of pipe in m\n",
      "NuD = 0.48*(4.72*10**6)*0.25\n",
      "\n",
      "# Results\n",
      "print 'Total heat loss per meter length of pipe is %3.2f W/m'%(Q)\n",
      "print \"NuD = %.2f\"%NuD\n",
      "\n",
      "# Note : rounding off error.\n",
      "# Note : 2nd answer is wrong in book"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total heat loss per meter length of pipe is 801.20 W/m\n",
        "NuD = 566400.00\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.10  Page No : 351"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# Variables\n",
      "Ta = 25;\t\t\t#Temperature of air in degree C\n",
      "Ts = 95;\t\t\t#Surface temperature of wire in degree C\n",
      "D = 0.0025;\t\t\t#Diameter of wire in m\n",
      "R = 6;\t\t\t#Resistivity in ohm/m\n",
      "\n",
      "# Calculations\n",
      "Tf = (Ts+Ta)/2;\t\t\t#Film temperature in degree C\n",
      "k = 0.02896;\t\t\t#Thermal conductivity in W/m.K\n",
      "v1 = (18.97*10**-6);\t\t\t#Kinematic viscosity in m**2/s\n",
      "b = (1./333);\t\t\t#Coefficient of thermal expansion in 1./K\n",
      "Pr = 0.696;\t\t\t#Prantl number\n",
      "Gr = ((9.81*b*D**3*(Ts-Ta))/(v1**2));\t\t\t#Grashof number\n",
      "Ra = (Gr*Pr);\t\t\t#Rayleigh number\n",
      "Nu = (1.18*Ra**(1./8));\t\t\t#Nussults number\n",
      "h = (Nu*k)/D;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "Q = (h*3.14*D*(Ts-Ta));\t\t\t#Rate of heat loss per unit length of wire in W/m\n",
      "I = math.sqrt(Q/R);\t\t\t#Maximum current intensity in A\n",
      "\n",
      "# Results\n",
      "print 'Heat transfer coefficient is %3.2f W/m**2.K \\n \\\n",
      "Maximum current intensity is %3.2f A'%(h,I)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat transfer coefficient is 22.91 W/m**2.K \n",
        " Maximum current intensity is 1.45 A\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.11  Page No : 352"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "D = 0.01;\t\t\t#Diameter of spherical steel ball in m\n",
      "Ts = 260;\t\t\t#Surface temperature in degree C\n",
      "Ta = 20;\t\t\t#Temperature of air in degree C\n",
      "\n",
      "# Calculations\n",
      "Tf = (Ts+Ta)/2;\t\t\t#Film temperature in degree C\n",
      "k = 0.0349;\t\t\t#Thermal conductivity in W/m.K\n",
      "v1 = (27.8*10**-6);\t\t\t#Kinematic viscosity in m**2/s\n",
      "b = (1./413);\t\t\t#Coefficient of thermal expansion in 1./K\n",
      "Pr = 0.684;\t\t\t#Prantl number\n",
      "Ra = ((9.81*b*D**3*(Ts-20)*Pr)/(v1**2));\t\t\t#Rayleigh number\n",
      "Nu = (2+(0.43*Ra**0.25));\t\t\t#Nusuults number\n",
      "h = (k*Nu)/D;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "Q = (h*3.14*D**2*(Ts-Ta));\t\t\t#Rate of heat loss in W\n",
      "\n",
      "# Results\n",
      "print 'Rate of convective heat loss is %3.2f W'%(Q)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Rate of convective heat loss is 1.48 W\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.12  Page No : 353"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "D = 0.1;\t\t\t#Outer diamter of the pipe in m\n",
      "Ta = 30;\t\t\t#Ambient temperature of air degree C\n",
      "Ts = 170;\t\t\t#Surface temperature in degree C\n",
      "e = 0.9;\t\t\t#Emissivity \n",
      "\n",
      "# Calculations\n",
      "h = (1.32*((Ts-Ta)/D)**0.25);\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "q = (h*3.1415*D*(Ts-Ta));\t\t\t#Heat transfer in W/m\n",
      "\n",
      "# Results\n",
      "print 'Heat loss due to free convection is %3.2f W/m'%(q)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat loss due to free convection is 355.12 W/m\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.13  Page No : 355"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "L = 0.015;\t\t\t#Thickness of the slot in m\n",
      "D = 2;\t\t\t#Dimension of square plate in m\n",
      "T1 = 120;\t\t\t#Temperature of plate 1\n",
      "T2 = 20;\t\t\t#Temperature of plate 2\n",
      "\n",
      "# Calculations\n",
      "Tf = (T1+T2)/2;\t\t\t#Film temperature in degree C\n",
      "k = 0.0295;\t\t\t#Thermal conductivity in W/m.K\n",
      "v1 = (2*10**-5);\t\t\t#Kinematic viscosity in m**2/s\n",
      "b = (1./343);\t\t\t#Coefficient of thermal expansion in 1./K\n",
      "Gr = ((9.81*b*L**3*(T1-T2))/(v1**2));\t\t\t#Grashof number\n",
      "ke = (0.064*k*Gr**(1./3)*(D/L)**(-1./9));\t\t\t#Effective thermal conductivity in W/m.K\n",
      "Q = (ke*D**2*(T1-T2))/L;\t\t\t#Rate of heat transfer in W\n",
      "\n",
      "# Results\n",
      "print 'Effective thermal conductivity is %3.4f W/m.K Rate of heat transfer is %3.1f W'%(ke,Q)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Effective thermal conductivity is 0.0317 W/m.K Rate of heat transfer is 844.8 W\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.14  Page No : 356"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "d = 0.0254;\t\t\t#Diamath.tance between the plates in m\n",
      "Tl = 60;\t\t\t#Temperature of the lower panel n degree C\n",
      "Tu = 15.6;\t\t\t#Temperature of the upper panel in degree C\n",
      "\n",
      "# Calculations\n",
      "Tf = (Tl+Tu)/2;\t\t\t#Film temperature in degree C\n",
      "p = 1.121;\t\t\t#Density in kg/m**3\n",
      "k = 0.0292;\t\t\t#Thermal conductivity in W/m.K\n",
      "v1 = (0.171*10**-4);\t\t\t#Kinematic viscosity in m**2/s\n",
      "b = (3.22*10**-3);\t\t\t#Coefficient of thermal expansion in 1./K\n",
      "Pr = 0.7;\t\t\t#Prantl number\n",
      "Gr = ((9.81*b*d**3*(Tl-Tu))/(v1**2));\t\t\t#Grashof number\n",
      "Nu = (0.195*Gr**0.25);\t\t\t#Nussults number\n",
      "q = (Nu*k*(Tl-Tu))/d;\t\t\t#Heat flux across the gap in W/m**2\n",
      "\n",
      "# Results\n",
      "print 'Free convection heat transfer is %3.1f W/m**2'%(q)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Free convection heat transfer is 166.7 W/m**2\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.15  Page No : 359"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "p = 3;\t\t\t#Pressure of air in atm\n",
      "r1 = 0.075;\t\t\t#Radius of first sphere in m\n",
      "r2 = 0.1;\t\t\t#Radius of second sphere in m\n",
      "L = 0.025;\t\t\t#Distance in m\n",
      "T1 = 325;\t\t\t#Temperature of first sphere in K\n",
      "T2 = 275;\t\t\t#Temperature of second sphere in K\n",
      "R = 287;\t\t\t#Universal gas consmath.tant in J/\n",
      "\n",
      "# Calculations\n",
      "Tf = (T1+T2)/2;\t\t\t#Film temperature in degree C\n",
      "d = (p/(R*Tf));\t\t\t#Desnsity in kg/m**3\n",
      "k = 0.0263;\t\t\t#Thermal conductivity in W/m.K\n",
      "v1 = (5.23*10**-6);\t\t\t#Kinematic viscosity in m**2/s\n",
      "b = (1./300);\t\t\t#Coefficient of thermal expansion in 1./K\n",
      "Pr = 0.707;\t\t\t#Prantl numbe\n",
      "Gr = ((9.81*b*L**3*(T1-T2))/(v1**2));\t\t\t#Grashof number\n",
      "Ra = (Gr*Pr);\t\t\t#Rayleigh number\n",
      "Ra1 = ((L/((4*r1*r2)**4))*(Ra/((2*r1)**(-7./5)+(2*r2)**(-7./5))**5))**0.25;\t\t\t#Equivalent Rayleigh's number\n",
      "ke = (k*0.74*((Pr*Ra1)/(0.861+Pr))**0.25);\t\t                                \t#Effective thermal conductivity in W/m.K\n",
      "Q = (ke*3.14*4*r1*r2*(T1-T2))/L;\t\t                                        \t#Rate of heat loss in W\n",
      "\n",
      "# Results\n",
      "print 'Convection heat transfer rate is %3.2f W'%(Q)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Convection heat transfer rate is 4.92 W\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.16  Page No : 362"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "p = 1;\t\t\t#Pressure of air in atm\n",
      "Ta = 27;\t\t\t#Temperature of air in degree C\n",
      "D = 0.02;\t\t\t#Diamter of the tube in m\n",
      "v = 0.3;\t\t\t#Velocity of air in m/s\n",
      "Ts = 127;\t\t\t#Surface temperature in degree C\n",
      "L = 1;\t\t\t#Length of the tube in m\n",
      "\n",
      "# Calculations\n",
      "k = 0.0262;\t\t\t#Thermal conductivity in W/m.K\n",
      "v1 = (1.568*10**-5);\t\t\t#Kinematic viscosity in m**2/s\n",
      "Pr = 0.708;\t\t\t#Prantl number\n",
      "b = (1./300);\t\t\t#Coefficient of thermal expansion in 1./K\n",
      "ub = (1.847*10**-5);\t\t\t#Dynamic viscosity in Ns/m**2\n",
      "us = (2.286*10**-5);\t\t\t#Viscosity of wall in Ns/m**2\n",
      "Re = (v*D)/v1;\t\t\t#Reynolds number\n",
      "Gr = ((9.81*b*D**3*(Ts-Ta))/(v1**2));\t\t\t#Grashof number\n",
      "Gz = (Re*Pr*(D/L));\t\t\t#Graetz number\n",
      "Nu = (1.75*(ub/us)**0.14*(Gz+(0.012*(Gz*Gr**(1./3))**(4./3)))**(1./3));\t\t\t#Nussults number\n",
      "h = (k*Nu)/D;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "Q = (h*3.14*D*L*(Ts-Ta));\t\t\t#Heat transfer in W\n",
      "\n",
      "# Results\n",
      "print 'Heat transfer in the tube is %3.2f W'%(Q)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat transfer in the tube is 40.86 W\n"
       ]
      }
     ],
     "prompt_number": 18
    }
   ],
   "metadata": {}
  }
 ]
}