{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 10 : Psychrometrics"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.1 Page no : 464"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "t_db = 293.; \t\t\t#K\n",
      "W = 0.0095; \t\t\t#kg/kg of dry air\n",
      "p_t = 1.0132; \n",
      "\n",
      "# Calculations and Results\n",
      "print (\"(i) Partial pressure of vapour\")\n",
      "p_v = p_t*W/(W+0.622);\n",
      "print (\"p_v = %.3f\")% (p_v), (\"bar\")\n",
      "\n",
      "\n",
      "p_vs = 0.0234; \t\t\t#bar; From steam tables corresponding to 20 0C\n",
      "phi = p_v/p_vs;\n",
      "print (\"(ii)relative hmidity  = %.3f\")% (phi)\n",
      "\n",
      "\n",
      "print (\"(iii) Dew point temperature\")\n",
      "t_dp = 13 + (14-13)/(0.01598 - 0.0150)*(0.01524-0.0150); \t\t\t#From stea table by interpolation\n",
      "print (\"t_dp = %.3f\")% (t_dp), (\"0C\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) Partial pressure of vapour\n",
        "p_v = 0.015 bar\n",
        "(ii)relative hmidity  = 0.651\n",
        "(iii) Dew point temperature\n",
        "t_dp = 13.245 0C\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.2 Page no : 465"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "t_db = 290.; \t\t\t#K\n",
      "phi = 0.6; \t\t\t#relative humidity\n",
      "p_t = 1.01325; \t\t\t#bar\n",
      "p_vs = 0.0194; \t\t\t#bar\n",
      "\n",
      "# Calculations\n",
      "p_v = phi*p_vs;\n",
      "W = 0.622*p_v/(p_t - p_v);\n",
      "t_dp = 9 + (10-9)*(0.01164-0.01150)/(0.01230 - 0.01150); \t\t\t#By interpolation from steam tables\n",
      "\n",
      "# Results\n",
      "print (\"Specific Humidity = %.4f\")% (W), (\"kg/kg of dry air\")\n",
      "\n",
      "print (\"dew point temperature  = \"), (t_dp), (\"0C\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Specific Humidity = 0.0072 kg/kg of dry air\n",
        "dew point temperature  =  9.175 0C\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.3 Page no : 465"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "phi = 0.55;\n",
      "p_vs = 0.0425; \t\t\t#bar\n",
      "p_t = 1.0132; \t\t\t#bar\n",
      "\n",
      "# Calculations\n",
      "p_v = phi*p_vs;\n",
      "W = 0.622*p_v/(p_t-p_v);\n",
      "\n",
      "#Specific humidity after removing o.oo4 kg of water vapour\n",
      "Wnew = W-0.004;\n",
      "p_v = p_t*Wnew/(Wnew+0.622);\n",
      "p_vs = 0.0234; \t\t\t#bar\n",
      "\n",
      "# Results\n",
      "print (\"(i) Relative humidity\"),\n",
      "phi = p_v/p_vs;\n",
      "print (\"phi = %.3f\")%(phi)\n",
      "\n",
      "\n",
      "print (\"(ii) Dew point temperature\")\n",
      "\n",
      "print (\"Corresponding to 0.0171 bar, from steam tables\")\n",
      "t_dp = 15.; \t\t\t#0C\n",
      "print (\"t_dp = %.3f\")% (t_dp), (\"0C\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) Relative humidity phi = 0.732\n",
        "(ii) Dew point temperature\n",
        "Corresponding to 0.0171 bar, from steam tables\n",
        "t_dp = 15.000 0C\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.4 Page no : 466"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "t_db = 35.; \t\t\t#0C\n",
      "t_wb = 25.; \t\t\t#0C\n",
      "p_t = 1.0132; \t\t\t#bar\n",
      "\n",
      "#Corresponding to 25 0C in steam tables\n",
      "p_vs_wb = 0.0317; \t\t\t#bar\n",
      "\n",
      "# Calculations\n",
      "p_v = p_vs_wb - (p_t - p_vs_wb)*(t_db - t_wb)/(1527.4 - 1.3*t_wb);\n",
      "\n",
      "print (\"(i) Specific humidity\")\n",
      "W = 0.622*p_v/(p_t-p_v);\n",
      "print (\"W = %.3f\")% (W), (\"kg/kg of dry air\")\n",
      "\n",
      "print (\"(ii) Relative humidity\")\n",
      "\n",
      "#Corresponding to 35 0C, from steam tables\n",
      "p_vs = 0.0563;\n",
      "\n",
      "phi = p_v/p_vs;\n",
      "print (\"phi %.3f\")% (phi)\n",
      "\n",
      "\n",
      "print (\"(iii) Vapour density\")\n",
      "R_v = 8314.3/18;\n",
      "T_v = 308.; \t\t\t#K\n",
      "\n",
      "rho_v = p_v*10**5/(R_v*T_v);\n",
      "print (\"rho_v = %.3f\")% (rho_v),(\"kg/m**3\")\n",
      "\n",
      "print (\"(iv) Dew point temperature\")\n",
      "t_dp = 21 + (22-21)*(0.0252-0.0249)/(0.0264-0.0249);\n",
      "print (\"t_dp %.3f\")%(t_dp), (\"0C\")\n",
      "\n",
      "print (\"(v) Enthalpy of mixture per kg of dry air\")\n",
      "cp = 1.005;\n",
      "h_g = 2565.3; \t\t\t#kJ/kg; corresponding to 35 0C\n",
      "h_vapour = h_g + 1.88*(t_db - t_dp);\n",
      "\n",
      "h = cp*t_db + W*h_vapour;\n",
      "print (\"h = %.3f\")% (h), (\"kJ/kg of dry air\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) Specific humidity\n",
        "W = 0.016 kg/kg of dry air\n",
        "(ii) Relative humidity\n",
        "phi 0.446\n",
        "(iii) Vapour density\n",
        "rho_v = 0.018 kg/m**3\n",
        "(iv) Dew point temperature\n",
        "t_dp 21.200 0C\n",
        "(v) Enthalpy of mixture per kg of dry air\n",
        "h = 76.175 kJ/kg of dry air\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.5 Page no : 467"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#For the air at 35 0C DBT and 60% R.H.\n",
      "p_vs = 0.0563; \t\t\t#bar; Corresponding to 35 0C from stem tables\n",
      "\n",
      "phi = 0.6;\n",
      "p_t = 1.0132; \t\t\t#bar\n",
      "cp = 1.005;\n",
      "t_db = 35.; \t\t\t#0C\n",
      "h_g = 2565.5; \t\t\t#kJ/kg\n",
      "m1 = 1.; \t\t\t#kg\n",
      "m2 = 2.; \t\t\t#kg\n",
      "m = m1+m2;\n",
      "\n",
      "# Calculations\n",
      "p_v = phi*p_vs;\n",
      "W1 = 0.622*p_v/(p_t-p_v);\n",
      "\n",
      "#Corresponding to 0.0388 bar, from steam tables\n",
      "t_dp = 26.+(27.-26)*(0.0338-0.0336)/(0.0356-0.0336);\n",
      "\n",
      "h_vapour = h_g + 1.88*(t_db - t_dp);\n",
      "h1 = cp*t_db+W1*h_vapour;\n",
      "\n",
      "#For the air at 20\u00b0C DBT and 13\u00b0C dew point temperature :\n",
      "p_v = 0.0150; \t\t\t#bar\n",
      "\n",
      "W2 = 0.622*p_v/(p_t-p_v);\n",
      "t_db = 20.; \t\t\t#0C\n",
      "t_dp = 13.;\n",
      "h_g = 2538.1; \t\t\t#kJ/kg\n",
      "h_vapour = h_g + 1.88*(t_db - t_dp);\n",
      "h2 = cp*t_db+W2*h_vapour;\n",
      "\n",
      "#let enthalpy per kg of moist air be h\n",
      "h = ((m1*h1/(1+W1)) + (m2*h2/(1+W2)))/m;\n",
      "#Let Mass of vapour/kg of moist air be M\n",
      "M = (m1*W1/(1+W1) + m2*W2/(1+W2))/m;\n",
      "#Let specific humidity be denoted by SH\n",
      "SH = M/(1-M);\n",
      "\n",
      "# Results\n",
      "print (\"Specific humidity  = %.3f\")% (SH), (\"kg/kg of dry air\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Specific humidity  = 0.013 kg/kg of dry air\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.6 Page no : 468"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "#For air at 20 0C and 75% R.H\n",
      "p_vs = 0.0234; \t\t\t#bar\n",
      "phi = 0.75;\n",
      "p_t = 1.0132;\n",
      "cp = 1.005;\n",
      "t_db = 20.; \t\t\t#0C\n",
      "\n",
      "# Calculations\n",
      "p_v = phi*p_vs;\n",
      "t_dp = 15 + (16-15)*(0.01755-0.017)/(0.0182-0.017);\n",
      "W = 0.622*p_v/(p_t-p_v);\n",
      "\n",
      "h_g = 2538.1 \t\t\t#kJ/kg\n",
      "h_vapour = h_g + 1.88*(t_db - t_dp);\n",
      "h1 = cp*t_db + W*h_vapour;\n",
      "\n",
      "# Calculations and Results\n",
      "print (\"(i) Relative humidity of heated air :\")\n",
      "\n",
      "\t\t\t#For air at 30\u00b0C DBT\n",
      "p_vs = 0.0425; \t\t\t#bar; corresponding to 30 0C\n",
      "phi = p_v/p_vs;\n",
      "print (\"Relative humidity = %.3f\")% (phi*100), (\"%\")\n",
      "\n",
      "\n",
      "print (\"(ii) Heat added to air per minute\")\n",
      "h_g = 2556.3; \t\t\t#kJkg\n",
      "t_db = 30.;\n",
      "h2 = cp*t_db+W*h_vapour;\n",
      "V = 90.; \t\t\t#m**3\n",
      "R = 287.;\n",
      "T = 293.; \t\t\t#K\n",
      "\n",
      "m = (p_t-p_v)*V*10**5/R/T;\n",
      "\n",
      "Amt = m*(h2-h1);\n",
      "print (\"Amount of heat added per minute = %.3f\")% (Amt),(\"kJ\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) Relative humidity of heated air :\n",
        "Relative humidity = 41.294 %\n",
        "(ii) Heat added to air per minute\n",
        "Amount of heat added per minute = 1070.942 kJ\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.7 Page no : 469"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#For air at 35 0C DBT and 50% RH\n",
      "p_vs = 0.0563; \t\t\t#bar; At 35 0C, from steam tables\n",
      "phi = 0.5;\n",
      "p_t = 1.0132;\n",
      "t_db1 = 35.; \t\t\t#0C\n",
      "t_dp1 = 23.; \t\t\t#0C\n",
      "cp = 1.005;\n",
      "R = 287.;\n",
      "\n",
      "# Calculations\n",
      "p_v = phi*p_vs;\n",
      "W1 = 0.622*p_v/(p_t-p_v);\n",
      "h_g1 = 2565.3; \t\t\t#kJ/kg\n",
      "\n",
      "h_vapour = h_g1 + 1.88*(t_db1 - t_dp1);\n",
      "h1 = cp*t_db1+W1*h_vapour;\n",
      "\n",
      "# Results\n",
      "print (\"(i) R.H. of cooled air\")\n",
      "p_vs = 0.0317;\n",
      "phi = p_v/p_vs;\n",
      "print (\"RH of cooled air = %.3f\")% (phi*100), (\"%\")\n",
      "\n",
      "\n",
      "print (\"(ii) Heat removed from air\")\n",
      "h_g2 = 2547.2; \t\t\t#kJ/kg\n",
      "t_db2 = 25.; \t\t\t#0C\n",
      "t_dp2 = 23.; \t\t\t#0C\n",
      "W2 = W1;\n",
      "T = 308.; \t\t\t#K\n",
      "V = 40.; \t\t\t#m**3\n",
      "\n",
      "h_vapour = h_g2 + 1.88*(t_db2 - t_dp2);\n",
      "h2 = cp*t_db2+W2*h_vapour;\n",
      "m = (p_t-p_v)*10**5*V/R/T;\n",
      "\n",
      "#Let Heat removed be denoted by H\n",
      "H = m*(h1-h2);\n",
      "print (\"Heat removed  = %.3f\")% (H), (\"kJ\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) R.H. of cooled air\n",
        "RH of cooled air = 88.801 %\n",
        "(ii) Heat removed from air\n",
        "Heat removed  = 477.209 kJ\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.8 Page no : 470"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#For the air at 35\u00b0C DBT and 50% R.H.\n",
      "\n",
      "# Variables\n",
      "p_vs = 0.0563; \t\t\t#bar; At 35 0C, from steam tables\n",
      "phi = 0.5;\n",
      "p_v = phi*p_vs;\n",
      "p_t = 1.0132; \t\t\t#bar\n",
      "\n",
      "t_dp1 = 23.; \t\t\t#0C\n",
      "t_db1 = 35.; \t\t\t#0C\n",
      "W1 = 0.622*p_v/(p_t-p_v);\n",
      "h_g1 = 2565.3; \t\t\t#kJ/kg\n",
      "R = 287.;\n",
      "cp = 1.005;\n",
      "\n",
      "# Calculations and Results\n",
      "h_vapour = h_g1 + 1.88*(t_db1 - t_dp1);\n",
      "h1 = cp*t_db1+W1*h_vapour;\n",
      "\n",
      "\n",
      "print (\"(i) Relative humidity of out coming air and its wet bulb temperature.\")\n",
      "\n",
      "print (\"Relative humidity of exit air is 100 per cent.\")\n",
      "\n",
      "t_wb = 20; \t\t\t#0C\n",
      "print (\"Wet bulb temperture = %.3f\")%(t_wb), (\"0C\")\n",
      "\n",
      "p_v = 0.0234; \t\t\t#bar\n",
      "p_vs = p_v;\n",
      "t_db2 = 20; \t\t\t#0C\n",
      "h_g2 = 2538.1; \t\t\t#kJ/kg\n",
      "t_dp2 = t_db2;\n",
      "\n",
      "W2 = 0.622*p_v/(p_t-p_v);\n",
      "h_vapour = h_g2 + 1.88*(t_db2 - t_dp2);\n",
      "h2 = cp*t_db2+W2*h_vapour;\n",
      "\n",
      "T = 308.; \t\t\t#K\n",
      "V = 120.; \t\t\t#m**3\n",
      "\n",
      "W = W1-W2; \t\t\t#Weight of water vvapour removed per kg of dry air \n",
      "h = h1-h2; \t\t\t#Heat removed per kg of dry air\n",
      "m = (p_t-p_v)*10**5*V/R/T;\n",
      "\n",
      "\n",
      "print (\"(ii) Capacity of the cooling coil in tonnes of refrigeration\")\n",
      "C = m*(h1-h2)*60/14000;\n",
      "print (\"Capacity  = %.3f\")% (C), (\"TR\")\n",
      "\n",
      "\n",
      "Amt = m*(W1-W2)*60;\n",
      "print (\"(iii)Amount of water removed per hour = %.3f\")% (Amt), (\"kg/h\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) Relative humidity of out coming air and its wet bulb temperature.\n",
        "Relative humidity of exit air is 100 per cent.\n",
        "Wet bulb temperture = 20.000 0C\n",
        "(ii) Capacity of the cooling coil in tonnes of refrigeration\n",
        "Capacity  = 13.678 TR\n",
        "(iii)Amount of water removed per hour = 24.753 kg/h\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.9 Page no : 471"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "p_vs = 0.0563; \t\t\t#bar\n",
      "phi = 0.2;\n",
      "p_v = phi*p_vs;\n",
      "p_t = 1.0132; \t\t\t#bar\n",
      "\n",
      "\n",
      "# Calculations and Results\n",
      "W1 = 0.622*p_v/(p_t-p_v);\n",
      "\n",
      "print (\"(i) Dew point temperature\")\n",
      "\t\t\t#\n",
      "t_dp = 8+(9.-8)*(0.01126-0.01072)/(0.01150-0.01072);\n",
      "print (\"dew point temperature = %.3f\")% (t_dp), (\"0C\")\n",
      "\n",
      "\n",
      "print (\"(ii) Relative humidity of the exit air :\")\n",
      "p_vs_wb = 0.0170; \t\t\t#bar\n",
      "p_vs = 0.0234; \t\t\t#bar\n",
      "t_db = 20.; \t\t\t#0C\n",
      "t_wb = 15.; \t\t\t#0C\n",
      "\n",
      "p_v = p_vs_wb - (p_t-p_vs_wb)*(t_db-t_wb)/(1527.4-1.3*t_wb);\n",
      "W2 = 0.622*p_v/(p_t-p_v);\n",
      "\n",
      "RH = p_v/p_vs;\n",
      "print (\"Relative humidity = %.3f\")% (RH)\n",
      "\n",
      "p_v = 0.01126; \t\t\t#bar\n",
      "R = 287.;\n",
      "T = 308.; \t\t\t#K\n",
      "V = 150.;\n",
      "\n",
      "m = (p_t-p_v)*V*10**5/R/T;\n",
      "\n",
      "\n",
      "print (\"(iii) Amount of water vapour added to the air per minute\")\n",
      "amt = m*(W2-W1);\n",
      "print (\"Amount  = %.3f\")% (amt), (\"kg/min\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) Dew point temperature\n",
        "dew point temperature = 8.692 0C\n",
        "(ii) Relative humidity of the exit air :\n",
        "Relative humidity = 0.585\n",
        "(iii) Amount of water vapour added to the air per minute\n",
        "Amount  = 0.261 kg/min\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.10 Page no : 471"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "p_s = 0.0206; \t\t\t#bar\n",
      "p_t = 1; \t\t\t#bar\n",
      "p_s1 = 0.03782; \t\t\t#bar\n",
      "W_2s = 0.622*p_s/(p_t-p_s);\n",
      "\n",
      "cp = 1.005;\n",
      "t_db2 = 18; \t\t\t#0C\n",
      "t_db1 = 28; \t\t\t#0C\n",
      "\n",
      "h_g2 = 2534.4; \t\t\t#kJ/kg\n",
      "h_f2 = 75.6; \t\t\t#kJ/kg\n",
      "h_g1 = 2552.6; \t\t\t#kJ/kg\n",
      "\n",
      "# Calculations\n",
      "W1 = (cp*(t_db1-t_db2) + W_2s*(h_g2-h_f2))/(h_g1-h_f2);\n",
      "p_v1 = W1*p_t/(0.622+W1);\n",
      "RH = p_v1/p_s1; \t\t\t#Relative humidity\n",
      "\n",
      "# Results\n",
      "print (\"Relative humidity %.3f\")% (RH)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Relative humidity 0.705\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.11 Page no : 472"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "t_db1 = 38.; \t\t\t#0C\n",
      "t_db2 = 18.; \t\t\t#0C\n",
      "phi_1 = 0.75;\n",
      "phi_2 = 0.85;\n",
      "p_t = 1.; \t\t\t#bar\n",
      "cp = 1.005;\n",
      "\n",
      "#At 38 0C\n",
      "p_vs = 0.0663; \t\t\t#bar\n",
      "h_g1 = 2570.7; \t\t\t#kJ/kg\n",
      "\n",
      "# Calculations\n",
      "p_v = phi_1*p_vs;\n",
      "W1 = 0.622*p_v/(p_t-p_v);\n",
      "\n",
      "#At 18 0C\n",
      "p_vs = 0.0206; \t\t\t#bar\n",
      "h_g2 = 2534.4; \t\t\t#kJ/kg\n",
      "h_f2 = 75.6; \t\t\t#kJ/kg\n",
      "p_v = phi_2*p_vs;\n",
      "W2 = 0.622*p_v/(p_t-p_v);\n",
      "\n",
      "q = (W2*h_g2 - W1*h_g1) + cp*(t_db2-t_db1) + (W1-W2)*h_f2;\n",
      "\n",
      "# Results\n",
      "print (\"Heat transfer rate = %.3f\")% (q), (\"kJ/kg of dry air\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat transfer rate = -74.052 kJ/kg of dry air\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.12 Page no : 473"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "#At 38 0C\n",
      "p_vs = 0.0663; \t\t\t#bar\n",
      "h_g1 = 2570.7; \t\t\t#kJ/kg\n",
      "phi = 0.25;\n",
      "p_t = 1.0132;\n",
      "p_v = phi*p_vs;\n",
      "cp = 1.005;\n",
      "\n",
      "#At 18 0C\n",
      "h_g2 = 2534.4; \t\t\t#kJ/kg\n",
      "p_vs = 0.0206; \t\t\t#bar\n",
      "W1 = 0.622*p_v/(p_t-p_v);\n",
      "\n",
      "t_db1 = 38.; \t\t\t#0C\n",
      "t_db2 = 18.; \t\t\t#0C\n",
      "\n",
      "# Results\n",
      "W2 = (cp*(t_db1-t_db2) + W1*h_g1)/h_g2;\n",
      "\n",
      "#amount of water added  = amt\n",
      "amt = W2-W1;\n",
      "\n",
      "# Results\n",
      "print (\"amt = %.5f\")% (amt), (\"kg/kg of dry air\")\n",
      "\n",
      "p_v2 = amt*p_t/(0.622+amt);\n",
      "RH = p_v2/p_vs;\n",
      "\n",
      "print (\"Final relative humidity %.3f\")% (RH)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "amt = 0.00808 kg/kg of dry air\n",
        "Final relative humidity 0.631\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.13 Page no : 474"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "\n",
      "# Variables\n",
      "#At 22 0c\n",
      "p_vs = 0.0264; \t\t\t#bar\n",
      "phi_3 = 0.55;\n",
      "p_t = 1.0132; \t\t\t#bar\n",
      "\n",
      "p_v3 = phi_3*p_vs;\n",
      "W3 = 0.622*p_v3/(p_t-p_v3);\n",
      "\n",
      "#At 3 0C\n",
      "p_vs1 = 0.0076; \t\t\t#bar\n",
      "p_v1 = p_vs1;\n",
      "\n",
      "# Calculations and Results\n",
      "W1 = 0.622*p_v1/(p_t-p_v1);\n",
      "R = 287.;\n",
      "T_3 = 295.; \t\t\t#K\n",
      "v = R*T_3/(p_t-p_v3)/10**5;\n",
      "m = (W3-W1)/v;\n",
      "\n",
      "print (\"(i)Mass of spray water required = %.6f\")% (m), (\"kg moisture/m**3\")\n",
      "\n",
      " \n",
      "t_dp = 12.5; \t\t\t#0C\n",
      "cp = 1.005;\n",
      "t_db3 = 22.; \t\t\t#0C\n",
      "h_g3 = 2524.; \t\t\t#kJ/kg\n",
      "h_vapour3 = h_g3 + 1.88*(t_db3 - t_dp);\n",
      "W2 = 0.0047;\n",
      "h_g2 = 2524; \t\t\t#kJ/kg\n",
      "h4 = 41.87;\n",
      "\n",
      "t_db2 = (cp*t_db3 + W3*h_vapour3 -W2*h_g2 + 1.88*W2*t_dp - (W3-W2)*h4)/(cp-W2*1.88);\n",
      "print (\"(ii) Temperature to which the air must be heated\"),(\"t_db2 = %.3f\")%(t_db2), (\"0C\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i)Mass of spray water required = 0.005122 kg moisture/m**3\n",
        "(ii) Temperature to which the air must be heated t_db2 = 33.290 0C\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.14 Page no : 476"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "p_vs = 0.0206; \t\t\t#bar\n",
      "phi = 0.6;\n",
      "p_t = 1.013; \t\t\t#bar\n",
      "\n",
      "# Calculations and Results\n",
      "p_v1 = phi*p_vs;\n",
      "p_a1 = p_t-p_v1;\n",
      "V = 9.; \t\t\t#m**3\n",
      "R = 287.;\n",
      "T = 291.; \t\t\t#K\n",
      "\n",
      "m_a = p_a1*10**5*V/R/T;\n",
      "\n",
      "m_v1 = 0.0828; \t\t\t#kg/s\n",
      "\n",
      "#At exit at 26 0C\n",
      "p_vs = 0.0336; \t\t\t#bar\n",
      "phi = 1;\n",
      "p_v = p_vs;\n",
      "W2 = 0.622*p_v/(p_t-p_v);\n",
      "m_v2 = W2*m_a;\n",
      "m = m_v2-m_v1;\n",
      "\n",
      "print (\"(i)Make-up water required = %.3f\")%(m), (\"kg/s\")\n",
      "\n",
      "\n",
      "\n",
      "m_w1 = 5.5; \t\t\t#kg/s\n",
      "m_w2 = m_w1-m;\n",
      "Wi = 4.75; \t\t\t#kJ/s\n",
      "h_w1 = 184.3; \t\t\t#kJ/kg\n",
      "h_a1 = 18.09; \t\t\t#kJ/kg\n",
      "h_v1 = 2534.74; \t\t\t#kJ/kg\n",
      "h_v2 = 2549; \t\t\t#kJ/kg\n",
      "h_a2 = 26.13; \t\t\t#kJ/kg\n",
      "\n",
      "h_w2 = (Wi + m_w1*h_w1 + m_a*h_a1 + m_v1*h_v1 - m_a*h_a2 - m_v2*h_v2)/m_w2;\n",
      "\n",
      "#By interpolation, h_w2 corresponds to t\n",
      "t = 26.7; \t\t\t#0C\n",
      "\n",
      "print (\"(ii)final temperature of water = %.3f\")%(t), (\"0C\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i)Make-up water required = 0.147 kg/s\n",
        "(ii)final temperature of water = 26.700 0C\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.15 Page no : 478"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "m_water = 60000.; \t\t\t#kg/s\n",
      "c = 4.186;\n",
      "t1 = 30.; \t\t\t#0C\n",
      "t2 = 35.; \t\t\t#0C\n",
      "\n",
      "# Calculations\n",
      "Q = m_water*c*(t2-t1);\n",
      "\n",
      "h1 = 76.5; \t\t\t#kJ/kg\n",
      "W1 = 0.016; \t\t\t#kg/kg of air \n",
      "h2 = 92.5; \t\t\t#kJ/kg \n",
      "W2 = 0.0246; \t\t\t#kg/kg of air\n",
      "m_air = Q/(h2-h1);\n",
      "A = m_air/10; \t\t\t#Quantity of air handled per fan\n",
      "\n",
      "# Results\n",
      "print (\"Quantity of air handled per fan = %.3f\")%(A), (\"kg/h\")\n",
      "\n",
      "B = m_air*(W2-W1);\n",
      "\n",
      "print (\"Quantity of make up water = %.3f\")% (B),(\"kg/h\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Quantity of air handled per fan = 7848.750 kg/h\n",
        "Quantity of make up water = 674.992 kg/h\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.17 Page no : 479"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "h1 = 35.4; \t\t\t#kJ/kg\n",
      "h2 = 45.2; \t\t\t#kJ/kg\n",
      "v_s1 = 0.8267; \t\t\t#m**3/kg\n",
      "m_a = 241.9;\n",
      "\n",
      "# Calculations and Results\n",
      "RH = 41; \t\t\t# From chart\n",
      "print (\"(i) R.H. of heated air  = %.3f\")%(RH), (\"%\")\n",
      "\n",
      "WBT = 16.1; \t\t\t#0C\n",
      "print (\"(ii) WBT of heated air  = \"), (WBT), (\"\u00baC\")\n",
      "\n",
      "Q = m_a*(h2-h1);\n",
      "print (\"(iii) Heat added to air per minute  = \"), (Q), (\"kJ\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) R.H. of heated air  = 41.000 %\n",
        "(ii) WBT of heated air  =  16.1 \u00baC\n",
        "(iii) Heat added to air per minute  =  2370.62 kJ\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.18 Page no : 480"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "h1 = 29.3; \t\t\t#kJ/kg\n",
      "h2 = 42.3; \t\t\t#kJ/kg\n",
      "h3 = h2;\n",
      "t_db2 = 24.5; \t\t\t#0C\n",
      "t_db1 = 12; \t\t\t#0C\n",
      "v_s1 = 0.817; \t\t\t#m**3/kg\n",
      "amt = 0.30; \t\t\t#Amount of air circulation m**3/min/person\n",
      "capacity = 60; \t\t\t#Seating capacity of office\n",
      "BF = 0.4; \t\t\t#By-pass factor\n",
      "W3 = 8.6;\n",
      "W1 = 6.8;\n",
      "\n",
      "# Calculations and Results\n",
      "m_a = amt*capacity/v_s1;\n",
      "\n",
      "Q = m_a*(h2-h1)/60;\n",
      "print (\"(i) Heating capacity of the heating coil  = %.3f\")%(Q), (\"kW\")\n",
      "\n",
      "t_db4 = (t_db2-BF*t_db1)/(1-BF);\n",
      "print (\"Coil surface temperature  = %.3f\")%(t_db4),(\"\u00baC\")\n",
      "\n",
      "c = m_a*(W3-W1)/1000*60;\n",
      "print (\"(ii) The capacity of the humidifier  = %.3f\")% (c),(\"kg/h\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) Heating capacity of the heating coil  = 4.774 kW\n",
        "Coil surface temperature  = 32.833 \u00baC\n",
        "(ii) The capacity of the humidifier  = 2.379 kg/h\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.19 Page no : 482"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "h1 = 82.5; \t\t\t#kJ/kg\n",
      "h2 = 47.5; \t\t\t#kJ/kg\n",
      "h3 = 55.7; \t\t\t#kJ/kg\n",
      "h5 = 36.6; \t\t\t#kJ/kg\n",
      "W1 = 19.6; \t\t\t#gm/kg\n",
      "W3 = 11.8; \t\t\t#gm/kg\n",
      "t_db2 = 17.6; \t\t\t#0C\n",
      "t_db3 = 25.; \t\t\t#0C\n",
      "v_s1 = 0.892; \t\t\t#m**3/kg\n",
      "amt = 250.; \t\t\t#m**3/min\n",
      "\n",
      "# Calculations and Results\n",
      "m_a = amt/v_s1;\n",
      "capacity = m_a*(h1-h2)*60/14000.;\n",
      "print (\"(i) The capacity of the cooling coil  = %.3f\")%(capacity),(\"TR\")\n",
      "\n",
      "BF = (h2-h5)/(h1-h5);\n",
      "print (\"by-pass factor of the cooling coil  = %.3f\")%(BF)\n",
      "\n",
      "Q = m_a*(h3-h2)/60.;\n",
      "print (\"(ii) The heating capacity of the heating coil  = %.3f\")%(Q),(\"kW\")\n",
      "\n",
      "BF = 0.3;\n",
      "t_db6 = (t_db3-BF*t_db2)/(1-BF);\n",
      "print (\"surface temperature of heating coil  = %.3f\")% (t_db6), (\"C\")\n",
      "\n",
      "m = m_a*(W1-W3)*60/1000.;\n",
      "print (\"(iii) The mass of water vapour removed per hour  = %.3f\")% (m), (\"kg/h\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) The capacity of the cooling coil  = 42.040 TR\n",
        "by-pass factor of the cooling coil  = 0.237\n",
        "(ii) The heating capacity of the heating coil  = 38.303 kW\n",
        "surface temperature of heating coil  = 28.171 C\n",
        "(iii) The mass of water vapour removed per hour  = 131.166 kg/h\n"
       ]
      }
     ],
     "prompt_number": 19
    }
   ],
   "metadata": {}
  }
 ]
}