{
 "metadata": {
  "name": "",
  "signature": "sha256:8a5095404e42ad0481b2633ccdee2541d7442fadbd298c8c24e95833702be496"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter5-Heat transfer media"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg110"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "## Example 5.1\n",
      "print('Example 5.1');\n",
      "print('Page No. 110');\n",
      "\n",
      "## given\n",
      "Q = 0.30*10**6;## Heat transfer rate in W/sq.m\n",
      "T1 = 540;## Mean gas temperature in degree celcius\n",
      "T2 = 207;## Steam temperature in degree celcius\n",
      "K_tube = 40;## Thermal conductivity of tube in W/m-K\n",
      "K_scale = 2.5 ;## Thermal conductivity of scale in W/m-K\n",
      "L_tube = 4*10**-3;## Length of tube in m\n",
      "\n",
      "## By Fourier equation and neglecting curvature effect, Q/A = [(T1- T2)/((L_tube/K_tube)+(L_scale/K_scale))]\n",
      "L_scale = K_scale*(((T1-T2)/Q)-(L_tube/K_tube));\n",
      "print'%s %.2f %s'%('The thickness of scale is ',L_scale,' m',)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Example 5.1\n",
        "Page No. 110\n",
        "The thickness of scale is  0.00  m\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg113"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "## Example 5.2\n",
      "print('Example 5.2');\n",
      "print('Page No. 113');\n",
      "\n",
      "## given\n",
      "T1 = 10;## in degree celcius\n",
      "T2 = 70;## in degree celcius\n",
      "d = 25*10**-3;## Inside diameter in m\n",
      "v = 1.5;## veocity in m/s\n",
      "\n",
      "Tm = (T1+T2)/2.;## Arithmetic Mean  temperature in degree celcius\n",
      "## At Tm, All physical properties of water is calculated by using steam table\n",
      "\n",
      "##(a)Heat absorbed by water \n",
      "p = 992.;## Density of water in kg/m**3 At Tm\n",
      "A = (math.pi*d**2)/4.;## Area in m**2\n",
      "m = p*v*A;## Mass flow rate in kg/s\n",
      "h_70 = 293*10**3.;## Specific enthalpy of water in J/kg  at 70 degree celcius(from  steam table)\n",
      "h_10 = 42*10**3.;## Specific enthalpy of water in J/kg at 10 degree celcius(from  steam table)\n",
      "Q = m*(h_70 - h_10);## in W\n",
      "print'%s %.2f %s'%(' Heat absorbed by water is ',Q,' W ')\n",
      "\n",
      "##(b) Film heat transfer\n",
      "##At Tm, the following properites of water are found by using steam table\n",
      "u = 650*10**-6.;## viscosity in Ns/m\n",
      "Cp = 4180.;##Specific heat in J/kg-s\n",
      "K = 0.632;## Thermal conductivity in W/m-s\n",
      "\n",
      "\n",
      "Re = (d*v*p)/u;##Reynolds Number ## answer wrongly calculated in the text book\n",
      "Pr = (Cp*u)/K;## Prandtl Number\n",
      "Re_d = (Re)**0.8;\n",
      "Pr_d = (Pr)**0.4;\n",
      "\n",
      "## By Dittus-Boelter Equation\n",
      "##Nu = 0.0232 * Re**0.8 Pr**0.4 = (hd)/K\n",
      "Nu = 0.0232 * Re_d * Pr_d;## Nusselt Number\n",
      "h = (Nu*K)/d;##W/m**2-K\n",
      "print'%s %.2f %s'%('The film heat transfer coefficient is',h,'W/sq.m K')## Deviation in answer due to direct substitution and wrongly calculated in the text book\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Example 5.2\n",
        "Page No. 113\n",
        " Heat absorbed by water is  183335.49  W \n",
        "The film heat transfer coefficient is 6725.39 W/sq.m K\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg117"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "## Example 5.3\n",
      "print('Example 5.3');\n",
      "print('Page No. 117');\n",
      "\n",
      "## given\n",
      "T1 = 25.;## in degree celcius\n",
      "T2 = 212.;## in degree celcius\n",
      "x = 0.96;## dryness fraction\n",
      "m = 1.25;## Mass flow rate in kg/s\n",
      "\n",
      "##from steam table\n",
      "hL_212 = 907.*10**3;## Specific enthalpy at 212 degree celcius in J/kg\n",
      "hL_25 = 105.*10**3;## Specific enthalpy at 25 degree celcius in J/kg\n",
      "l_212 = 1890*10**3;## Latent heat of vapourisation at 212 degree celcius in J/kg\n",
      "\n",
      "Q = m*((hL_212+(x*l_212))-hL_25);## in W\n",
      "print'%s %.2f %s'%('The required heat is ',Q,' W')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Example 5.3\n",
        "Page No. 117\n",
        "The required heat is  3270500.00  W\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg117"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "## Example 5.4\n",
      "print('Example 5.4');\n",
      "print('Page No. 117');\n",
      "\n",
      "## given\n",
      "T = 25;## in degree celcius\n",
      "x = 0.96;## dryness fraction\n",
      "m = 3.15;## Mass flow rate in kg/s\n",
      "CV = 42.6*10**6;## Calorific value in J/kg\n",
      "P = 15;## Pressure in bar\n",
      "n = 0.8;## Efficiency\n",
      "\n",
      "##from steam table\n",
      "hL_1 = 843*10**3;## Specific enthalpy in J/kg\n",
      "hL_2 = 293*10**3;## Specific enthalpy  in J/kg\n",
      "l_1 = 1946*10**3;## Latent heat of vapourisation at 70 degree celcius in J/kg\n",
      "\n",
      "Q = m*((hL_1+(x*l_1))-hL_2);## in W\n",
      "Q_Ac = Q/n## Actual heat required in Watts\n",
      "Oil = Q_Ac/CV;\n",
      "print'%s %.4f %s'%('The oil required is ',Oil,' kg/s')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Example 5.4\n",
        "Page No. 117\n",
        "The oil required is  0.2235  kg/s\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5-pg120"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "## Example 5.5\n",
      "print('Example 5.5');\n",
      "print('Page No. 120');\n",
      "\n",
      "## given\n",
      "T1 = 134;## in degree celcius\n",
      "T2 = 100;## in degree celcius\n",
      "x = 0.96;## dryness fraction\n",
      "m = 0.75;## Mass flow rate in kg/s\n",
      "\n",
      "##from steam table\n",
      "hL_134 = 563*10**3;## Specific enthalpy at 134 degree celcius in J/kg\n",
      "hL_100 = 419*10**3;## Specific enthalpy at 100 degree celcius in J/kg\n",
      "l_134 = 2162*10**3;## Latent heat of vapourisation at 134 degree celcius in J/kg\n",
      "\n",
      "Q = m*((hL_134+(x*l_134))-hL_100);## in W\n",
      "print'%s %.4f %s'%('The required heat is ',Q,' W')## Deviation in answer due to direct substitution and some approximation in answer in book\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Example 5.5\n",
        "Page No. 120\n",
        "The required heat is  1664640.0000  W\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg120"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "## Example 5.6\n",
      "print('Example 5.6');\n",
      "print('Page No. 120');\n",
      "\n",
      "## given\n",
      "x = 0.90;## dryness fraction\n",
      "m = 0.25;## Mass flow rate in kg/s\n",
      "P = 0.7;## pressure in bar\n",
      "T1 = 10;## in degree celcius\n",
      "\n",
      "##from steam table\n",
      "h_10= 42*10**3;## Specific enthalpy  of water at 10 degree celcius in J/kg\n",
      "h_25 = 105*10**3;## Specific enthalpy of water at 25 degree celcius in J/kg\n",
      "h_30 = 126*10**3;## Specific enthalpy of water at 30 degree celcius in J/kg\n",
      "h_s = 2432*10**3;## Specific enthalpy of steam in J/kg\n",
      "\n",
      "##(a)T2 = 25;\n",
      "T2 = 25;## in degree celcius\n",
      "## By heat balance, heat transfered at 10 degree celcius = heat gained at 25 degree celcius; \"(m*h_s)+(h_10*y)= (m*h_25)+(h_25*y)\"; where 'y' is the quqntity of water to be used at 25 degree celcius in kg/s\n",
      "y = (m*(h_s-h_25)/(h_25-h_10));\n",
      "print'%s %.2f %s'%('the quantity of water to be used at 25 degree celcius is ',y,' kg/s ')\n",
      "\n",
      "\n",
      "##(b)T2 = 30;\n",
      "T2 = 30;## in degree celcius\n",
      "## By heat balance, heat transfered at 10 degree celcius = heat gained at 30 degree celcius; \"(m*h_s)+(h_10*y)= (m*h_30)+(h_30*y)\"; where 'z' is the quqntity of water to be used at 30 degree celcius in kg/s\n",
      "z = (m*(h_s-h_30)/(h_30-h_10));\n",
      "print'%s %.2f %s'%('the quantity of water to be used at 30 degree celcius is ',z,' kg/s ')\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Example 5.6\n",
        "Page No. 120\n",
        "the quantity of water to be used at 25 degree celcius is  9.23  kg/s \n",
        "the quantity of water to be used at 30 degree celcius is  6.86  kg/s \n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex7-pg121"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "## Example 5.7\n",
      "print('Example 5.7');\n",
      "print('Page No. 121');\n",
      "\n",
      "## given\n",
      "x = 0.97;## dryness fraction\n",
      "m = 4.0;## Mass flow rate in kg/s\n",
      "v = 40;## velocity in m/s\n",
      "P = 10;## pressure in bar\n",
      "\n",
      "##from steam table\n",
      "Sp_vol = 0.194;## specific volume at 10 bar dry steam in m**3/kg\n",
      "\n",
      "Q = Sp_vol*x*m## Volumetric flow rate of steam in m**3/s\n",
      "d = math.sqrt((Q*m)/(v*math.pi));\n",
      "print'%s %.2f %s'%('the required diameter of pipe is ',d,' m')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Example 5.7\n",
        "Page No. 121\n",
        "the required diameter of pipe is  0.15  m\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex8-pg122"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "## Example 5.8\n",
      "print('Example 5.8');\n",
      "print('Page No. 122');\n",
      "\n",
      "## given\n",
      "T1 = 25;## in degree celcius\n",
      "T2 = 450;## in degree celcius\n",
      "m = 7.5;## Mass flow rate in kg/s\n",
      "\n",
      "##from steam table\n",
      "hL_450 = 3303*10**3;## Specific enthalpy at 450 degree celcius in J/kg\n",
      "hL_25 = 105*10**3;## Specific enthalpy at 25 degree celcius in J/kg\n",
      "\n",
      "Q = m*(hL_450 - hL_25);## in W\n",
      "print'%s %.2f %s'%('The required heat is ',Q,' W')## Deviation in answer due to direct substitution and some approximation in answer in book\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Example 5.8\n",
        "Page No. 122\n",
        "The required heat is  23985000.00  W\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex9-pg122"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "## Example 5.9\n",
      "print('Example 5.9');\n",
      "print('Page No. 122');\n",
      "\n",
      "## given\n",
      "P1 = 15;## Pressure at state 1 in bar\n",
      "P2 = 1.5;## Pressure at state 2 in bar\n",
      "T1 = 198;## in degree celcius\n",
      "\n",
      "## as the process is adiabatic; => Q = 0; => ehthalpy at state1 = enthalpy at state 2\n",
      "h_1 = 2789*10**3;## specific enthalpy at state 1 in J/kg\n",
      "h_2 = h_1;##specific enthalpy at state 2 in J/kg\n",
      "\n",
      "T3 = 150;## in degree celcius\n",
      "T4 = 200;## in degree celcius\n",
      "h_3 = 2773*10**3;## specific enthalpy at state 3 in J/kg\n",
      "h_4 = 2873*10**3;## specific enthalpy at state 4 in J/kg\n",
      "\n",
      "## Assuming a liner realtionship between temperature and enthalpy for the temperature range 150-200 degree celcius\n",
      "h = ((h_4 - h_3)/(T4 - T3));## specific enthalpy per degree celcius in J/kg-degC\n",
      "t = ((h_2 - h_3)/h);## in degree celcius\n",
      "T2 = T3 + t;## in degree celcius\n",
      "print'%s %.2f %s'%('the temperature of the final superheated steam at 1.5 bar is',T2,' deg C')\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Example 5.9\n",
        "Page No. 122\n",
        "the temperature of the final superheated steam at 1.5 bar is 158.00  deg C\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex10-pg123"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "## Example 5.10\n",
      "print('Example 5.10');\n",
      "print('Page No. 123');\n",
      "\n",
      "## given\n",
      "m = 0.45;## Mass flow rate in kg/s\n",
      "P = 2.;## pressure in bar\n",
      "T1 = 60.;## in degree celcius\n",
      "T2 = 250.;## in degree celcius\n",
      "h_s = 2971.*10**3;## Specific enthalpy of superheated steam in J/kg\n",
      "h_d = 2706.*10**3;## Specific enthalpy of dry saturated steam in J/kg\n",
      "h_e = h_s - h_d;##excess Specific enthalpy in J/kg\n",
      "h = 251*10**3.;## in J/kg\n",
      "V_s = 0.885;## specific volume of dry saturated steam at 2bar in m**3/kg\n",
      "\n",
      "h_r = h_d- h;## heat required to convert water at 60 deg C into dry saturated steam at 2 bar\n",
      "w = (h_e/h_r);## in kg/kg\n",
      "print'%s %.3f %s'%('the quantity of water requried is ',w,' kg/kg')\n",
      "\n",
      "M = m*w;## in kg/s\n",
      "print'%s %.3f %s'%('the total mass flow rate of water required is ',M,' kg/s ')\n",
      "\n",
      "M_d = M + m;## mass flow rate of desuperheated steam in kg/s\n",
      "V = M_d*V_s;## in m**3/s\n",
      "print'%s %.2f %s'%('the total mass flow rate of desuperheated steam required is',V,' m**3/s ')\n",
      "## Deviation in answer due to some approximation in answer in  the book\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Example 5.10\n",
        "Page No. 123\n",
        "the quantity of water requried is  0.108  kg/kg\n",
        "the total mass flow rate of water required is  0.049  kg/s \n",
        "the total mass flow rate of desuperheated steam required is 0.44  m**3/s \n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex11-pg130"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "## Example 5.11\n",
      "print('Example 5.11');\n",
      "print('Page No. 130');\n",
      "\n",
      "## given\n",
      "T1 = 180.;## in degree celcius\n",
      "T2 = 350.;## in degree celcius\n",
      "m = 0.5;## Mass flow rate in kg/s\n",
      "\n",
      "\n",
      "##from steam table\n",
      "hL_180 = 302*10**3.;## Specific enthalpy at 180 degree celcius in J/kg\n",
      "hL_350 = 690*10**3.;## Specific enthalpy at 350 degree celcius in J/kg\n",
      "\n",
      "Q = m*(hL_350 - hL_180);## in W\n",
      "print'%s %.2f %s'%('The required heat is ',Q,' W')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Example 5.11\n",
        "Page No. 130\n",
        "The required heat is  194000.00  W\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex12-pg130"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "## Example 5.12\n",
      "print('Example 5.12');\n",
      "print('Page No. 130');\n",
      "\n",
      "## given\n",
      "T1 = 200.;## in degree celcius\n",
      "T2 = 300.;## in degree celcius\n",
      "m_l = 0.55;## Mass flow rate  of liquid in kg/s\n",
      "P = 3; ##pressure in bar\n",
      "Cp = 2.34*10**3;## Mean haet capacity in J/kg-K\n",
      "h = 272*10**3;## Latent heat of eutectic mixture at 3 bar\n",
      "\n",
      "Q = m_l*Cp*(T2 -T1);## in Watts\n",
      "m = Q/h;## in kg/s\n",
      "print'%s %.2f %s'%('The mass flow rate of dry saturated eutectic mixture is',m,' kg/s')\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Example 5.12\n",
        "Page No. 130\n",
        "The mass flow rate of dry saturated eutectic mixture is 0.47  kg/s\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex13-pg131"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "## Example 5.13\n",
      "print('Example 5.13');\n",
      "print('Page No. 131');\n",
      "import numpy\n",
      "## given\n",
      "T = 300.;## in degree celcius\n",
      "v = 2.;## velocity in m/s\n",
      "d = 40.*10**-3;## diameter in m\n",
      "## From the table 5.3 and 5.4 given in the  book\n",
      "K_d = numpy.array([2.80, 2.65, 2.55, 2.75])## in W/m**2-k\n",
      "Re =  numpy.array([117*10**3 ,324*10**3, 159*10**3 ,208*10**3])##Reynolds number\n",
      "Pr =  numpy.array([12, 4.50, 10.0, 7.3])##Prandtl Number\n",
      "\n",
      "## By Dittus-Boelter Equation\n",
      "##Nu = 0.0232 * Re**0.8*Pr**0.3 = (hd)/K\n",
      "##h =  0.0232 * Re**0.8*Pr**0.3 *(K/d)\n",
      "\n",
      "h_T = 0.0232 * Re[0]**0.8*Pr[0]**0.3*K_d[0];## ##W/m**2-K\n",
      "print('The film heat transfer coefficient using Transcal N is',h_T,' W/sq.m K ')## Deviation in answer due to direct substitution \n",
      "\n",
      "\n",
      "h_D = 0.0232 * Re[1]**0.8*Pr[1]**0.3*K_d[1];## ##W/m**2-K\n",
      "print'%s %.2f %s'%('The film heat transfer coefficient using Dowtherm A is ',h_D,' W/sq.m K ')## Deviation in answer due to direct substitution \n",
      "\n",
      "\n",
      "h_M = 0.0232 * Re[2]**0.8*Pr[2]**0.3*K_d[2];## ##W/m**2-K\n",
      "print'%s %.2f %s'%('The film heat transfer coefficient using Marlotherm S is ',h_M,' W/sq.m K \\n')## Deviation in answer due to direct substitution \n",
      "\n",
      "\n",
      "h_S = 0.0232 * Re[3]**0.8*Pr[3]**0.3*K_d[3];## ##W/m**2-K\n",
      "print'%s %.2f %s'%('The film heat transfer coefficient using Santotherm 60 is ',h_S,' W/sq.m K \\n')## Deviation in answer due to direct substitution \n",
      "\n",
      "\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Example 5.13\n",
        "Page No. 131\n",
        "('The film heat transfer coefficient using Transcal N is', 1552.2050049396955, ' W/sq.m K ')"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "The film heat transfer coefficient using Dowtherm A is  2472.48  W/sq.m K \n",
        "The film heat transfer coefficient using Marlotherm S is  1710.59  W/sq.m K \n",
        "\n",
        "The film heat transfer coefficient using Santotherm 60 is  2080.98  W/sq.m K \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex14-pg137"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "## Example 5.14\n",
      "print('Example 5.14');\n",
      "print('Page No. 137');\n",
      "\n",
      "## given\n",
      "T1 = 25;## Wet-bulb temperature in degree celcius\n",
      "T2 = 40;##Dry-bulb temperature in degree celcius\n",
      "\n",
      "##By using the humidity chart and steam tables for air-water mixtures at the given temperatures, the all following data can be obtained\n",
      "\n",
      "##(a) humidity\n",
      "w = 0.014;## in kg/kg\n",
      "print'%s %.2f %s'%('the required humidity is ',w,' kg/kg ')\n",
      "\n",
      "\n",
      "##(b) relative humidity\n",
      "R_H = 30;## in percentage\n",
      "print'%s %.2f %s'%('the required relative humidity in percentage is ',R_H,'')\n",
      "\n",
      "##(c) the dew point\n",
      "T_w = 20;## in degree celcius\n",
      "print'%s %.2f %s'%('the required dew-point temperature is ',T_w,' deg C')\n",
      "\n",
      "##(d) the humid heat\n",
      "Cpa = 1.006*10**3;## Heat Capacity of bone dry air in J/kg-K\n",
      "Cpwv = 1.89*10**3;## Heat Capacity of water vapour in J/kg-K\n",
      "S = Cpa + (w*Cpwv);##in J/kg-K\n",
      "print'%s %.2f %s'%('the humid heat is',S,' J/kg-K' )\n",
      "\n",
      "##(e) the humid volume\n",
      "V_G = ((1/29.)+(w/18.))*22.41*((T2 + 273.)/273.);##in m**3/kg\n",
      "print'%s %.2f %s'%('the humid volume is ',V_G,' m**3/kg ')\n",
      "\n",
      "##(f) adiabatic process\n",
      "w_A = 0.020;## in kg/kg\n",
      "print'%s %.2f %s'%('the humidity of the mixture if saturated adiabatically is ',w_A,' kg/kg ')\n",
      "\n",
      "## (h) isothermal process\n",
      "w_i = 0.049;## in kg/kg\n",
      "print'%s %.2f %s'%('the humidity of the mixture if saturated isothermally is ',w_i,' kg/kg ')\n",
      "\n",
      "\n",
      " \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Example 5.14\n",
        "Page No. 137\n",
        "the required humidity is  0.01  kg/kg \n",
        "the required relative humidity in percentage is  30.00 \n",
        "the required dew-point temperature is  20.00  deg C\n",
        "the humid heat is 1032.46  J/kg-K\n",
        "the humid volume is  0.91  m**3/kg \n",
        "the humidity of the mixture if saturated adiabatically is  0.02  kg/kg \n",
        "the humidity of the mixture if saturated isothermally is  0.05  kg/kg \n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex15-pg137"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "## Example 5.15\n",
      "print('Example 5.15');\n",
      "print('Page No. 137');\n",
      "\n",
      "## given\n",
      "T = 25.;## Wet-bulb temperature in degree celcius\n",
      "T1 = 30.;##Dry-bulb temperature in degree celcius\n",
      "V = 5.;## Volumetric flow rate of initial air-water mixture in m**3/s\n",
      "T2 = 70.;## Final Dry-bulb temperature in degree celcius\n",
      "\n",
      "##By using the humidity chart and steam tables for air-water mixtures at the given temperatures, the all following data can be obtained\n",
      "w = 0.018;## humidity at 25/30 degree celcius in kg/kg\n",
      "Cpa_1 = 1.00*10**3;## Heat Capacity of bone dry air at 30 degree celcius in J/kg-K\n",
      "Cpwv_1 = 1.88*10**3;## Heat Capacity of water vapour  at 30 degree celcius in J/kg-K\n",
      "Cpa_2 = 1.008*10**3;## Heat Capacity of bone dry air at 70 degree celcius in J/kg-K\n",
      "Cpwv_2 = 1.93*10**3;## Heat Capacity of water vapour at 70 degree celcius in J/kg-K\n",
      "lo = 2.50*10**6;##  Specifc Latent heat of vapourisation  of water at 0 degree celcius in J/kg\n",
      "\n",
      "S_1 = Cpa_1 + (w*Cpwv_1);## the humid heat at 30 degree celcius in J/kg-K\n",
      "S_2 = Cpa_2 + (w*Cpwv_2);##the humid heat at 70 degree celcius in J/kg-K\n",
      "\n",
      "hG_1 = ((S_1*T1) + (w*lo));##the specific enthalpy at 30 degree celcius in J/kg\n",
      "hG_2 = ((S_2*T2) + (w*lo));##the specific enthalpy at 70 degree celcius in J/kg\n",
      "VG_1 = ((1/29.)+(w/18.))*22.41*((T1 + 273)/273.);## Humid volume at 30 degree celcius in m**3/kg\n",
      "m = V/VG_1;## Mass flow rate in kg/s\n",
      "Q = m*(hG_2 - hG_1);## in Watts\n",
      "print'%s %.2f %s'%('The required heat is ',Q,' W')## Deviation in answer is due to some approximation in calculation in the book\n",
      "\n",
      "w_2 = w;## given in the question\n",
      "VG_2 = ((1/29.)+(w_2/18.))*22.41*((T2 + 273)/273.);## Humid volume at 70 degree celcius in m**3/kg\n",
      "V_f = m*VG_2;## in m**3/s\n",
      "print'%s %.2f %s'%( 'The volumetric flow rate of initial air-water mixture is ',V_f,' m^3/s')\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Example 5.15\n",
        "Page No. 137\n",
        "The required heat is  237814.35  W\n",
        "The volumetric flow rate of initial air-water mixture is  5.66  m^3/s\n"
       ]
      }
     ],
     "prompt_number": 18
    }
   ],
   "metadata": {}
  }
 ]
}