{
 "metadata": {
  "name": "",
  "signature": "sha256:a7f87932a4eea8107911ad53ff496ae266946836f956d53145d3e7186e5c88d6"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 11 : Boiling and Condensation"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.1  Page No : 480"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "Tsat = 100.;\t\t\t#Saturation temperature of water in degree C\n",
      "p1 = 957.9;\t\t\t#Density of liquid in kg/m**3\n",
      "Cpl = 4217.;\t\t\t#Specific heat in J/kg.K\n",
      "u = (279.*10**-6);\t\t\t#Dynamic viscosity in N.s/m**2\n",
      "Pr = 1.76;\t\t\t#Prantl number\n",
      "hjg = 2257.;\t\t\t#Enthalpy in kJ/kg\n",
      "s = (58.9*10**-3);\t\t\t#Surface tension in N/m\n",
      "pv = 0.5955;\t\t\t#Density of vapour in kg/m**3\n",
      "m = 30.;\t\t\t#Rate of water in kg/h\n",
      "D = 0.3;\t\t\t#Diameter in m\n",
      "\n",
      "# Calculations\n",
      "q = round((m*hjg*1000)/(3600*math.pi*D**2/4));\t\t\t#Heat transfer in W/m**2\n",
      "Ts = Tsat+(((q/(u*hjg*1000))*math.sqrt(s/(9.81*(p1-pv)))))**0.33\n",
      "\n",
      "# Results\n",
      "print 'Temperature of the bottom surface of the pan is %3.2f degree C'%(Ts)\n",
      "\n",
      "# NOte: answer in book is wrong."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Temperature of the bottom surface of the pan is 101.02 degree C\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.2  Page No : 481"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "Tsat = 100;\t\t\t#Saturation temperature of water in degree C\n",
      "p1 = 957.9;\t\t\t#Density of liquid in kg/m**3\n",
      "Cpl = 4217;\t\t\t#Specific heat in J/kg.K\n",
      "u = (279*10**-6);\t\t\t#Dynamic vismath.cosity in N.s/m**2\n",
      "Pr = 1.76;\t\t\t#Prantl number\n",
      "hjg = 2257;\t\t\t#Enthalpy in kJ/kg\n",
      "s = (58.9*10**-3);\t\t\t#Surface tension in N/m\n",
      "pv = 0.5955;\t\t\t#Density of vapour in kg/m**3\n",
      "m = 30;\t\t\t#Rate of water in kg/h\n",
      "D = 0.3;\t\t\t#Diameter in m\n",
      "\n",
      "# Calculations\n",
      "q = (0.18*hjg*1000*pv*((s*9.81*(p1-pv))/pv**2)**0.25)/10**6;\t\t\t#Burnout heat flux in MW/m**2\n",
      "\n",
      "# Results\n",
      "print 'Burnout heat flux is %3.3f MW/m**2'%(q)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Burnout heat flux is 1.520 MW/m**2\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.3  Page No : 481"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "D = 0.0016;\t\t\t#Diameter of the wire in m\n",
      "T = 255;\t\t\t#Temperature difference in degree C\n",
      "p1 = 957.9;\t\t\t#Density of liquid in kg/m**3\n",
      "Cpl = 4640;\t\t\t#Specific heat in J/kg.K\n",
      "u = (18.6*10**-6);\t\t\t#Dynamic viscosity in N.s/m**2\n",
      "hjg = 2257;\t\t\t#Enthalpy in kJ/kg\n",
      "k = (58.3*10**-3);\t\t\t#Thermal conductivity in W/m.K\n",
      "pv = 31.54;\t\t\t#Density of vapour in kg/m**3\n",
      "Ts = 628;\t\t\t#Surface temperature in K\n",
      "Tsat = 373;\t\t\t#Saturation temperature in K\n",
      "\n",
      "# Calculations\n",
      "hc = (0.62*((k**3*pv*(p1-pv)*9.81*((hjg*1000)+(0.4*Cpl*T)))/(u*D*T))**0.25);\t\t\t#Convective heat transfer coefficient in W/m**2.K\n",
      "hr = ((5.67*10**-8)*(Ts**4-Tsat**4))/(Ts-Tsat);\t\t\t#Radiative heat transfer coefficient in W/m**2.K\n",
      "hm = (hc+(0.75*hr));\t\t\t#Mean heat transfer coefficient in W/m**2.K\n",
      "Q = (hm*3.14*D*T)/1000;\t\t\t#Power dissipation rate per unit length of the heater in kW/m\n",
      "\n",
      "# Results\n",
      "print 'Mean heat transfer coefficient is %3.1f W/m**2.K \\n \\\n",
      "Power dissipation rate per unit length of the heater is %3.3f kW/m'%(hm,Q)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Mean heat transfer coefficient is 1340.9 W/m**2.K \n",
        " Power dissipation rate per unit length of the heater is 1.718 kW/m\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.4  Page No : 485"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "Ts = 10.;\t\t\t#Surface temperature in degree C\n",
      "p1 = 10.;\t\t\t#Pressure of water in atm\n",
      "\n",
      "# Calculations\n",
      "hp = (5.56*Ts**0.4);\t\t\t#Heat transfer coefficient in kW/m**2.K\n",
      "hp1 = (5.56*(2*Ts)**3*p1**0.4);\t\t\t#Heat transfer coefficient in kW/m**2.K\n",
      "hp2 = (5.56*Ts**3*(2*p1)**0.4);\t\t\t#Heat transfer coefficient in kW/m**2.K\n",
      "x1 = (hp1/hp)/1000;\t\t\t#Ratio of heat transfer coefficients\n",
      "x2 = (hp2/hp)*100;\t\t\t#Ratio of heat transfer coefficients\n",
      "\n",
      "# Results\n",
      "print 'Heat transfer coefficient becomes %.f times the original value in the first case\\n \\\n",
      "Heat transfer coefficient is increased only by 32 percent in the second case'%(x1)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat transfer coefficient becomes 8 times the original value in the first case\n",
        " Heat transfer coefficient is increased only by 32 percent in the second case\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.5  Page No : 485"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "p = 6.;\t\t\t#Pressure of water in atm\n",
      "D = 0.02;\t\t\t#Diameter of the tube in m\n",
      "Ts = 10.;\t\t\t#Wall temperature in degree C\n",
      "L = 1.;\t\t\t#Length of the tube in m\n",
      "\n",
      "# Calculations\n",
      "p1 = (p*1.0132*10**5)/10**6;\t\t\t#Pressure in MN/m**2\n",
      "h = (2.54*Ts**3*math.exp(p1/1.551));\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "Q = (h*math.pi*D*L*Ts);\t\t\t#Heat transfer rate in W/m\n",
      "\n",
      "\n",
      "# Results\n",
      "print 'Heat transfer rate is %3.1f W/m'%(Q)\n",
      "\n",
      "\n",
      "# note : rounding off error."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat transfer rate is 2361.8 W/m\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.6  Page No : 489"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "p = 2.45;\t\t\t#Pressure of dry saturated steam in bar\n",
      "h = 1;\t\t\t#Height of vertical tube in m\n",
      "Ts = 117;\t\t\t#Tube surface temperature in degree C\n",
      "d = 0.2;\t\t\t#Distance from upper end of the tube in m\n",
      "\n",
      "# Calculations\n",
      "Tsat = 127;\t\t\t#Saturation temperature of water in degree C\n",
      "p1 = 941.6;\t\t\t#Density of liquid in kg/m**3\n",
      "k1 = 0.687;\t\t\t#Thermal conductivity in W/m.K\n",
      "u = (227*10**-6);\t\t\t#Dynamic vismath.cosity in N.s/m**2\n",
      "hfg = 2183;\t\t\t#Enthalpy in kJ/kg\n",
      "pv = 1.368;\t\t\t#Density of vapour in kg/m**3\n",
      "q = round((((4*k1*u*10*d)/(9.81*p1*(p1-pv)*hfg*1000))**0.25)*1000,2);\t\t\t#Thickness of condensate film in mm\n",
      "h = (k1/(q/1000));\t\t\t#Local heat transfer coefficient at x = 0.2 in W/m**2.K\n",
      "\n",
      "# Results\n",
      "print 'Thickness of condensate film is %3.2f mm \\n \\\n",
      "Local heat transfer coefficient at x = 0.2 is %3.0f W/m**2.K'%(q,h)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thickness of condensate film is 0.09 mm \n",
        " Local heat transfer coefficient at x = 0.2 is 7633 W/m**2.K\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.7  Page No : 491"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "D = 0.05;\t\t\t#Diameter of the tube in m\n",
      "L = 2;\t\t\t#Length of the tube in m\n",
      "Ts = 84;\t\t\t#Outer surface temperature in degree C\n",
      "Tsat = 100;\t\t\t#Saturation temperature of water in degree C\n",
      "Tf = (Tsat+Ts)/2;\t\t\t#Film temperature in degree C\n",
      "p1 = 963.4;\t\t\t#Density of liquid in kg/m**3\n",
      "u = (306*10**-6);\t\t\t#Dynamic vismath.cosity in N.s/m**2\n",
      "hfg = 2257;\t\t\t#Enthalpy in kJ/kg\n",
      "pv = 0.596;\t\t\t#Density of vapour in kg/m**3\n",
      "k1 = 0.677;\t\t\t#Thermal conductivity in W/m.K\n",
      "\n",
      "# Calculations\n",
      "hL = (1.13*((9.81*p1*(p1-pv)*k1**3*hfg*1000)/(u*16*L))**0.25);\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "Ref = ((4*hL*L*2)/(hfg*1000*u));\t\t\t#Reynolds nmber\n",
      "Q = (hL*math.pi*D*L*10);\t\t\t#Heat transfer rate in W\n",
      "m = (Q/(hfg*1000))*3600;\t\t\t#Condensate mass flow rate in kg/h\n",
      "\n",
      "# Results\n",
      "print 'Heat transfer rate is %3.0f W  \\n \\\n",
      "Condensate mass flow rate is %3.1f kg/h'%(Q,m)\n",
      "\n",
      "# note : rounding off error."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat transfer rate is 17930 W  \n",
        " Condensate mass flow rate is 28.6 kg/h\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.8  Page No : 492"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "h = 2.8;\t\t\t#Height of the plate in m\n",
      "T = 54.;\t\t\t#Temperature of the plate in degree C\n",
      "Tsat = 100.;\t\t\t#Saturation temperature of water in degree C\n",
      "Tf = (Tsat+T)/2;\t\t\t#Film temperature in degree C\n",
      "p1 = 973.7;\t\t\t#Density of liquid in kg/m**3\n",
      "u = (365.*10**-6);\t\t\t#Dynamic viscosity in N.s/m**2\n",
      "hfg = 2257.;\t\t\t#Enthalpy in kJ/kg\n",
      "pv = 0.596;\t\t\t#Density of vapour in kg/m**3\n",
      "k1 = 0.668;\t\t\t#Thermal conductivity in W/m.K\n",
      "\n",
      "# Calculations\n",
      "Re = (0.00296*((p1*9.81*(p1-pv)*k1**3*(Tsat-T)**3*h**3)/(u**5*(hfg*1000)**3))**(5./9));\t\t\t#Reynolds number\n",
      "hL = (0.0077*((9.81*p1*(p1-pv)*k1**3)/u**2)**(1./3)*Re**0.4);\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "Q = (hL*h*(Tsat-T))/1000;\t\t\t#Heat transfer rate per unit width in kW/m\n",
      "\n",
      "# Results\n",
      "print 'Heat transfer rate per unit width is %3.2f kW/m'%(Q)\n",
      "\n",
      "\n",
      "# note : rounding error."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat transfer rate per unit width is 702.33 kW/m\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.9  Page No : 494"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "T = 100;\t\t\t#Temperature of dry steam in degree C\n",
      "Do = 0.025;\t\t\t#Outer diameter of the pipe in m\n",
      "Ts = 84;\t\t\t#Surface temmperature of pipe in degree C\n",
      "Tf = (T+Ts)/2;\t\t#Film temperature in degree C\n",
      "p1 = 963.4;\t\t\t#Density of liquid in kg/m**3\n",
      "u = (306*10**-6);\t#Dynamic viscosity in N.s/m**2\n",
      "hfg = 2257;\t\t\t#Enthalpy in kJ/kg\n",
      "pv = 0.596;\t\t\t#Density of vapour in kg/m**3\n",
      "k1 = 0.677;\t\t\t#Thermal conductivity in W/m.K\n",
      "\n",
      "# Calculations\n",
      "h = (0.725*((9.81*p1*(p1-pv)*k1**3*hfg*1000)/(u*(T-Ts)*Do))**0.25);\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "q = (h*3.14*Do*(T-Ts))/1000;\t\t\t#Heat transfer per unit length in kW/m\n",
      "m = (q/hfg)*3600;\t\t\t            #Total mass flow of condensate per unit length in kg/h\n",
      "\n",
      "# Results\n",
      "print 'Rate of formation of condensate per unit length is %3.2f kg/h'%(m)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Rate of formation of condensate per unit length is 21.94 kg/h\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.10  Page No : 494"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "m = 50;\t\t\t#Mass of vapour per hour\n",
      "n = 100;\t\t\t#Number of tubes\n",
      "D = 0.01;\t\t\t#Diameter of the tube in m\n",
      "L = 1;\t\t\t#Length of the tube in m\n",
      "n1 = 10;\t\t\t#Array of 10*10\n",
      "\n",
      "# Calculations\n",
      "mr = ((0.725/1.13)*(L/(n1*D))**0.25);\t\t\t#Ratio of horizontal and vertical position \n",
      "mv = (m/mr);\t\t\t#Mass flow rate in the vertical position in kg/h\n",
      "\n",
      "# Results\n",
      "print 'Mass flow rate in the vertical position is %3.2f kg/h'%(mv)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Mass flow rate in the vertical position is 43.82 kg/h\n"
       ]
      }
     ],
     "prompt_number": 14
    }
   ],
   "metadata": {}
  }
 ]
}