{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 18 : Two Phase Gas Liquid Systems Partial Saturation and Humidity"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      " Example 18.1  Page no.539\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "V = 1. ;\t\t\t# Volume of water vapour-[cubic metre]\n",
      "rel_h =  43. ;\t\t\t# relative humidity -[%]\n",
      "vp_H2O = 1.61 ;\t\t\t# vapour pressure of water at 94 F-[in. of Hg]\n",
      "P_H2O = vp_H2O*(rel_h/100) ;\t\t\t# Pressure of water vapour in air-[in. of Hg]\n",
      "P =  29.92 ;\t\t\t# [in of Hg]\n",
      "T = 94+460. ;\t\t\t# Temperature -[Rankine]\n",
      "Ts =  492. ;\t\t\t#Temperature std. -[Rankine]\n",
      "mw_H2O = 18. ;\t\t\t# molecular mass of water -[lb]\n",
      "\n",
      "# Calculations\n",
      "H2O = (5280**3*Ts*P_H2O*mw_H2O)/(T*P*359) ;\t\t\t#mass of H2O-[lb]\n",
      "# The dew point is temperature at which water vapour in air first condense ,i.e at realative humidity 100 %, therefore\n",
      "psat_H2O = P_H2O ;\t\t\t# Saturation pressure of H2O -[in. of Hg]\n",
      "\n",
      "# Results\n",
      "print 'Saturation pressure of H2O %.3f in. of Hg'%psat_H2O\n",
      "print 'Use saturation  pressure of H2O to get dew point temperature T from steam table: T is about 68-69 F.'\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Saturation pressure of H2O 0.692 in. of Hg\n",
        "Use saturation  pressure of H2O to get dew point temperature T from steam table: T is about 68-69 F.\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      " Example 18.2  Page no. 541\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "# Data from steam table\n",
      "psat_H2O = 31.8 ;\t\t\t# Saturation pressure -[mm of Hg]\n",
      "\n",
      "#(c)\n",
      "H =  .0055 ;\t\t\t# Humidity\n",
      "mw_H2O =  18. ;\t\t\t# Molecular wt.  of water-[lb]\n",
      "mw_air =  29. ;\t\t\t# Molecular wt. of air -[lb]\n",
      "P = 750. ;\t\t\t# Pressure total -[mm of Hg]\n",
      "\n",
      "# Calculations\n",
      "p_H2O = ((H*mw_air*P)/mw_H2O)/(1+(H*mw_air/mw_H2O)) ;\t\t\t# Partial pressure of water vapour in air-[mm of Hg]\n",
      "#(a)\n",
      "rel_H = (p_H2O/psat_H2O)*100  ;\t\t\t# relative humidity -[%]\n",
      "#(b)\n",
      "mol_H = (p_H2O)/(P-p_H2O) ;\t\t\t# Molal humidity\n",
      "\n",
      "# Results\n",
      "print '(a)Relative humidity is %.0f%% .'%rel_H\n",
      "print '(b)Molal humidity is %.1e '%mol_H\n",
      "print '(c)Partial pressure of water vapour in air is %.1f  mm of Hg.'%p_H2O\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Relative humidity is 21% .\n",
        "(b)Molal humidity is 8.9e-03 \n",
        "(c)Partial pressure of water vapour in air is 6.6  mm of Hg.\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      " Example 18.3  Page No. 544\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "V_BDA  = 1000. ;\t\t\t# Volume of bone dry air(BDA) at 20 C & 108.0 kPa\n",
      "mol_V =  22.4 ;\t\t\t# Molar volume of gas at standard condition-[m**3]\n",
      "T = 20+273. ;\t\t\t# Temperature of BDA-[K]\n",
      "P = 108.0 ;\t\t\t#Pressure of BDA-[kPa]\n",
      "Ts = 273. ;\t\t\t# Standard temperature-[K]\n",
      "Ps = 101.3 ;\t\t\t#Standard pressure-[kPa]\n",
      "W = 0.93 ;\t\t\t# [kg]\n",
      "mw_W =  18. ;\t\t\t# mol. wt. of 1kmol water -[kg]\n",
      "\n",
      "# Calculations\n",
      "mol_W = W/mw_W ;\t\t\t# amount of water vapour(W)-[kg mol]\n",
      "mol_BDA = (V_BDA*Ts*P)/(T*Ps*mol_V) ;\t\t\t#  amount of BDA-[kg mol]\n",
      "p_H2O =  (mol_W/(mol_W+mol_BDA))*P ;\t\t\t# Partial pressure of H2O-[kPa]\n",
      "\n",
      "# Get vapour pressure for water at 15 C , namely 1.70 kPa\n",
      "psat_H2O  =  1.70 ;\t\t\t#vapour pressure for water at 15 C-[kPa]\n",
      "rel_H = (p_H2O/psat_H2O) ;\t\t\t#Fractional relative humidity-[]\n",
      "\n",
      "# Results\n",
      "print '(a)Fractional relative humidity of original air was %.3f .'%rel_H\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Fractional relative humidity of original air was 0.074 .\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      " Example 18.4  Page no.545\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "F  = 1000. ;\t\t\t# Volume of entering moist air at 22 C & 101.0 kPa\n",
      "mol_V =  22.4 ;\t\t\t# Molar volume of gas at standard condition-[m**3]\n",
      "T_in = 22.+273 ;\t\t\t# Temperature of entering moist air-[K]\n",
      "P_in = 101.0 ;\t\t\t#Pressure of entering moist air -[kPa]\n",
      "dp_in = 11.+273 ;\t\t\t# Dew point of entering air-[K]\n",
      "Ts = 273. ;\t\t\t# Standard temperature-[K]\n",
      "Ps = 101.3 ;\t\t\t#Standard pressure-[kPa]\n",
      "T_out = 58.+273 ;\t\t\t# Temperature of exiting moist air-[K]\n",
      "P_out = 98. ;\t\t\t#Pressure of exiting moist air -[kPa]\n",
      "\n",
      "# Additional vapour pressure data\n",
      "psat_in = 1.31 ;\t\t\t#Vapour pressure of entering moist air -[kPa]\n",
      "psat_out = 18.14 ;\t\t\t# Vapour pressure of exiting moist air -[kPa]\n",
      "pBDA_in = P_in-psat_in ;\t\t\t# Pressure of entering dry air - [kPa]\n",
      "pBDA_out  =  P_out - psat_out ;\t\t\t# Pressure of exiting dry air - [kPa]\n",
      "\n",
      "# Calculations\n",
      "mol_F = (F*P_in*Ts)/(Ps*T_in*mol_V) ;\t\t\t# Moles of moist air entering-[kg mol]\n",
      "mol_P = (mol_F*(pBDA_in/P_in))/(pBDA_out/P_out); \t\t\t#BDA balance- [kg mol]\n",
      "mol_W = mol_P-mol_F ;\t\t\t# Total balance -[kg mol]\n",
      "mw_BDA = 29. ;\t\t\t# Mol. wt. of dry air\n",
      "mw_H2O = 18. ;\t\t\t# Mol. wt. of water vapour\n",
      "m_BDA = (mol_F*pBDA_in/P_in)*mw_BDA ;\t\t\t# Mass of dry air entering-[kg]\n",
      "m_H2O = (mol_F*psat_in/P_in)*mw_H2O ;\t\t\t# Mass of water vapour entering-[kg]\n",
      "wa_in = m_BDA+m_H2O ;\t\t\t#Total wet air entering -[kg]\n",
      "H2O_ad = mol_W*mw_H2O/wa_in ;\t\t\t#Water added to each kg of wet air entering the process-[kg]\n",
      "\n",
      "# Results\n",
      "print 'Water added to each kg of wet air entering the process is %.3f kg.'%H2O_ad\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Water added to each kg of wet air entering the process is 0.132 kg.\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      " Example 18.5  Page No.547\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "# Given data\n",
      "#Basis: F = 29.76 lb mol\n",
      "F  = 29.76 ;\t\t\t# amount of entering moist air -[lb mol]\n",
      "F_rh = 90/100. ;\t\t\t# Relative humidity\n",
      "T_in = 100 + 460. ;\t\t\t# Temperature of entering moist air-[Rankine]\n",
      "P_in = 29.76 ;\t\t\t#Pressure of entering moist air -[in. of Hg]\n",
      "psat_in =  1.93 ;\t\t\t# Saturation pressure from steam table-[in. of Hg]\n",
      "T_out = 120 + 460. ;\t\t\t# Temperature of exiting dry air-[Rankine]\n",
      "P_out = 131.7 ;\t\t\t#Pressure of exiting dry air -[in. of Hg]\n",
      "psat_out =  3.45 ;\t\t\t# Saturation pressure from steam table-[in. of Hg]\n",
      "mol_V =  22.4 ;\t\t\t# Molar volume of gas at standard condition-[m**3]\n",
      "mw_H2O  =  18.02 ;\t\t\t# Mol. wt. of water -[lb]\n",
      "mw_air  =  29. ;\t\t\t# Mol. wt. of air -[lb]\n",
      "p_H2O_in = F_rh*psat_in ;\t\t\t# Partial pressure of water vapour at inlet--[in. of Hg]\n",
      "p_air_in = P_in-p_H2O_in ;\t\t\t# Partial pressure of air at inlet--[in. of Hg]\n",
      "\n",
      "# Calculations\n",
      "# Assume condensation takes place , therefore output gas P is saturated,\n",
      "P_rh =  1;\t\t\t# Relative humidity of output gas\n",
      "p_H2O_out = P_rh*psat_out ;\t\t\t# Partial pressure of water vapour at outlet--[in. of Hg]\n",
      "p_air_out = P_out-p_H2O_out ;\t\t\t# Partial pressure of air at outlet--[in. of Hg]\n",
      "\n",
      "# Get W and P from  balance of air and water\n",
      "P = (p_air_in*F/P_in)/(p_air_out/P_out) ;\t\t\t# From air balance-[ lb mol]\n",
      "W = (p_H2O_in*F/P_in)-(P*p_H2O_out/P_out);\t\t\t# From water balance -[lb mol]\n",
      "W_ton = (W*mw_H2O*2000)/(p_air_in*mw_air) ;\t\t\t# Moles of water condenses per ton dry air-[lb mol]\n",
      "W_m = mw_H2O*W_ton ;\t\t\t# Mass of water condenses per ton dry air-[lb]\n",
      "\n",
      "# Results\n",
      "#  Since W is positive our assumption(condensation takes place ) is right .\n",
      "print '(a) Yes water condense out during compression ,since W(%.3f  lb mol) is positive our assumption(condensation takes place ) \\nis right .'%W\n",
      "print '(b) Amount of water condenses per ton dry air is %.1f lb mol i.e %.0f lb water.'%(W_ton,W_m)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Yes water condense out during compression ,since W(0.983  lb mol) is positive our assumption(condensation takes place ) \n",
        "is right .\n",
        "(b) Amount of water condenses per ton dry air is 43.6 lb mol i.e 786 lb water.\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}