{
 "metadata": {
  "name": "",
  "signature": "sha256:da2384fa5db2cbd49ec84301569b45dd22f0d12dd2e12e0fa83528eb61b2d43b"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 25 : Energy Balances How to Account for Chemical Reaction"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 25.1  page no. 766\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "Qa = -393.51 ;\t\t\t# Heat of reaction of reaction (a) - [kJ/g mol C] \n",
      "Qb = -282.99 ;\t\t\t# Heat of reaction of reaction (b) - [kJ/g mol CO] \n",
      "del_Ha = Qa ;\t\t\t# Change in enthalpy of reaction A - [kJ/g mol C]\n",
      "del_Hb = Qb ;\t\t\t# Change in enthalpy of reaction B - [kJ/g mol CO]\n",
      "\n",
      "# Calculations\t\n",
      "del_Hfc = del_Ha - del_Hb ;\t\t\t# Standard heat of formation of CO - [kJ/g mol C]\n",
      "\n",
      "# Results\n",
      "print 'Standard heat of formation of CO is %.2f kJ/g mol C.'%del_Hfc\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Standard heat of formation of CO is -110.52 kJ/g mol C.\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      " Example 25.2  page no. 767\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "H_H2 = 0 ;\t\t\t# Standard heat of formation of H2 -[kJ/ g mol H2]\n",
      "H_Cl2 = 0 ;\t\t\t# Standard heat of formation of Cl2 -[kJ/ g mol Cl2]\n",
      "H_HCl = -92.311 ;\t\t\t#  Standard heat of formation of HCl -[kJ/ g mol HCl]\n",
      "\n",
      "# Calculations\n",
      "H_f = 1*H_HCl - (1./2)*(H_H2 + H_Cl2) ; \t\t\t# Standard heat of formation of HCl by reaction - [kJ/ g mol HCl]\n",
      "\n",
      "# Results\n",
      "print 'Standard heat of formation of HCl(g) is %.3f kJ/g mol HCl.'%H_f\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Standard heat of formation of HCl(g) is -92.311 kJ/g mol HCl.\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      " Example 25.3  page no. 771\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables\n",
      "H_fNH3 = -46.191 ;\t\t\t# Standard heat of formation of NH3 -[kJ/ g mol]\n",
      "H_fO2 = 0 ;\t\t\t#Standard heat of formation of O2 -[kJ/ g mol]\n",
      "H_fNO = 90.374 ;\t\t\t# Standard heat of formation of NO -[kJ/ g mol]\n",
      "H_fH2O = -241.826 ;\t\t\t# Standard heat of formation of H2O -[kJ/ g mol]\n",
      "\n",
      "# Calculations\n",
      "H_rxn = ((4*H_fNO + 6*H_fH2O) - (4*H_fNH3 + 5*H_fO2))/4. ;\t\t\t# Heat of above reaction-[kJ/ g mol NH3]\n",
      "\n",
      "# Results\n",
      "print 'Heat of above reaction is %.3f kJ/g mol NH3.'%H_rxn\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat of above reaction is -226.174 kJ/g mol NH3.\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      " Example 25.4  page no. 773\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "P1 = 1. ;\t\t\t# Initial pressure - [atm]\n",
      "P2 = 1. ;\t\t\t# Final pressure - [atm]\n",
      "T1 = 500. ;\t\t\t# Initial temperature -[degree C]\n",
      "T2 = 500. ;\t\t\t# Final temperature -[degree C]\n",
      "\n",
      "m_CO2 = 1. ;\t\t\t# Moles of CO2 - [ g mol]\n",
      "m_H2 = 4. ;\t\t\t# Moles of H2 - [ g mol]\n",
      "m_H2O = 2. ;\t\t\t# Moles of H2O - [ g mol]\n",
      "m_CH4 = 1. ;\t\t\t# Moles of CH4 - [ g mol]\n",
      "\n",
      "H_fCO2 = -393.250 ;\t\t\t# Heat of formation of CO2 - [kJ/g mol] \n",
      "H_fH2 = 0. ;\t\t\t# Heat of formation of H2 - [kJ/g mol] \n",
      "H_fH2O = -241.835 ;\t\t\t# Heat of formation of H2O - [kJ/g mol] \n",
      "H_fCH4 = -74.848 ;\t\t\t# Heat of formation of CH4 - [kJ/g mol] \n",
      "\n",
      "H_CO2 = 21.425 ;\t\t\t# Change in enthalpy during temperature change from 25 to 500 degree C  of CO2 - [kJ/g mol] \n",
      "H_H2 = 13.834 ;\t\t\t# Change in enthalpy during temperature change from 25 to 500 degree C of H2 - [kJ/g mol] \n",
      "H_H2O = 17.010 ;\t\t\t# Change in enthalpy during temperature change from 25 to 500 degree C of H2O - [kJ/g mol] \n",
      "H_CH4 = 23.126 ;\t\t\t# Change in enthalpy during temperature change from 25 to 500 degree C of CH4 - [kJ/g mol] \n",
      "\n",
      "# Calculations\n",
      "H_rxn_25 = (m_CH4*H_fCH4 + m_H2O*H_fH2O) - (m_CO2*H_fCO2 + m_H2*H_fH2) ;\t\t\t# Heat of reaction at 25 C\n",
      "sum_H_rct = m_CO2*H_CO2 + m_H2*H_H2 ;\t\t\t# sum of heat of formation of reactant - [kJ]\n",
      "sum_H_pdt = m_CH4*H_CH4 + m_H2O*H_H2O ;\t\t\t#sum of heat of formation of product - [kJ]\n",
      "# Heat of above reaction is calculated by eqn. 25.4\n",
      "H_rxn_500 = sum_H_pdt - sum_H_rct + H_rxn_25  ;\t\t\t# Heat of reaction at 500 C\n",
      "\n",
      "# Results\n",
      "print 'Heat of above reaction at 500 degree C and 1 atm is %.1f kJ.'%H_rxn_500\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat of above reaction at 500 degree C and 1 atm is -184.9 kJ.\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 25.5  page no. 775\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "m_CO2 = 1. ;\t\t\t# Moles of CO2 - [ g mol]\n",
      "m_H2 = 4. ;\t\t\t# Moles of H2 - [ g mol]\n",
      "m_H2O = 2. ;\t\t\t# Moles of H2O - [ g mol]\n",
      "m_CH4 = 1. ;\t\t\t# Moles of CH4 - [ g mol]\n",
      "P1 = 1. ;\t\t\t# Initial pressure  - [atm]\n",
      "P2 = 1. ;\t\t\t# Final pressure - [atm] \n",
      "\n",
      "T1_CO2 = 800. ;\t\t\t# Initial temperature of entering CO2 -[K]\n",
      "T1_H2 = 298. ;\t\t\t# Initial temperature of entering H2 -[K]\n",
      "T2 = 1000. ;\t\t\t# Temperature of exiting product - [K]\n",
      "\n",
      "m1_CO2 = 1. ;\t\t\t# Moles of entering CO2 - [ g mol]\n",
      "m1_H2 = 4. ;\t\t\t# Moles of entering H2 - [ g mol]\n",
      "f_con = 70./100 ;\t\t\t# Fractional conversion of CO2 \n",
      "m2_H2O = 2*f_con ;\t\t\t# Moles of H2O in product - [ g mol]\n",
      "m2_CH4 = 1*f_con ;\t\t\t# Moles of CH4 in product - [ g mol]\n",
      "m2_CO2 = m1_CO2*(1-f_con) ;\t\t\t#  Moles of CO2 in product - [ g mol]\n",
      "m2_H2 = m1_H2*(1-f_con) ;\t\t\t#  Moles of CO2 in product - [ g mol]\n",
      "\n",
      "H_fCO2 = -393.250 ;\t\t\t# Heat of formation of CO2 - [kJ/g mol] \n",
      "H_fH2 = 0 ;\t\t\t# Heat of formation of H2 - [kJ/g mol] \n",
      "H_fH2O = -241.835 ;\t\t\t# Heat of formation of H2O - [kJ/g mol] \n",
      "H_fCH4 = -74.848 ;\t\t\t# Heat of formation of CH4 - [kJ/g mol] \n",
      "\n",
      "H1_CO2 = 22.798 ;\t\t\t# Change in enthalpy during temperature change from 298K to 800 K  of CO2 - [kJ/g mol] \n",
      "H1_H2 = 0 ;\t\t\t# Change in enthalpy during temperature change from 298K to 298 K  of H2 - [kJ/g mol] \n",
      "H2_H2O = 25.986 ;\t\t\t# Change in enthalpy during temperature change from 298K to 1000 K  of H2O - [kJ/g mol] \n",
      "H2_CH4 = 38.325 ;\t\t\t# Change in enthalpy during temperature change from 298K to 1000 K  of CH4 - [kJ/g mol] \n",
      "H2_CO2 = 33.396; \t\t\t# Change in enthalpy during temperature change from 298K to 1000 K  of CO2 - [kJ/g mol] \n",
      "H2_H2 = 20.620; \t\t\t# Change in enthalpy during temperature change from 298K to 1000 K  of H2 - [kJ/g mol] \n",
      "\n",
      "# Calculations\n",
      "H_rxn_25 = (m_CH4*H_fCH4 + m_H2O*H_fH2O) - (m_CO2*H_fCO2 + m_H2*H_fH2) ;\t\t\t# Standard heat of reaction at 25 C-[kJ]\n",
      "H_rxn_ac = f_con*H_rxn_25 ;\t\t\t# Heat of reaction actual - [kJ]\n",
      "sum_H_rct = m1_CO2*H1_CO2 + m1_H2*H1_H2 ;\t\t\t# sum of heat of formation of reactant - [kJ]\n",
      "sum_H_pdt = m2_CH4*H2_CH4 + m2_H2O*H2_H2O + m2_CO2*H2_CO2 + m2_H2*H2_H2 ;\t\t\t#sum of heat of formation of product - [kJ]\n",
      "H_rxn = sum_H_pdt - sum_H_rct + H_rxn_ac  ;\t\t\t# Heat of reaction -[kJ/ g mol CO2]\n",
      "\n",
      "Q = H_rxn ;\t\t\t# Heat transfer to/from the reactor - [kJ]\n",
      "\n",
      "# Results\n",
      "print 'Heat transfer to/from the reactor  is %.3f kJ.Since Q is negative , the reactor losses heat.'%Q\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat transfer to/from the reactor  is -40.515 kJ.Since Q is negative , the reactor losses heat.\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 25.6  page no. 776\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "H_EtOH =-1330.51  ;\t\t\t# Change in enthalpy of ethanol -[kJ/g mol]\n",
      "H_Ac = -887.01 ;\t\t\t# Change in enthalpy of acetate -[kJ/g mol]\n",
      "H_Fr = -221.75 ;\t\t\t# Change in enthalpy of formate -[kJ/g mol]\n",
      "H_Lc = -1330.51 ;\t\t\t# Change in enthalpy of lactate -[kJ/g mol]\n",
      "H_Mn = -2882.78  ;\t\t\t# Change in enthalpy of mannitol -[kJ/g mol]\n",
      "mol_EtOH =1.29   ;\t\t\t#ethanol produced / g mol mannitol -[g mol]\n",
      "mol_Ac = 0.22    ; \t\t\t#acetate produced / g mol mannitol -[g mol]\n",
      "mol_Fr = 1.6    ; \t\t\t#formate produced / g mol mannitol-[g mol]\n",
      "mol_Lc = 0.4    ;\t\t\t#lactate produced / g mol mannitol-[g mol]\n",
      "mol_Mn = 1.0    ;\t\t\t#mannitol produced / g mol mannitol-[g mol]\n",
      "B_growth = 40.5   ;\t\t\t# Biomass growth -[g cells/g mol mannitol]\n",
      "\n",
      "# Calculations and Results\n",
      "del_H1 = H_EtOH*mol_EtOH +H_Ac*mol_Ac + H_Fr*mol_Fr + H_Lc*mol_Lc - H_Mn*mol_Mn ;\t\t\t# Net enthalpy change for several products (metabolites) per g mol mannitol consumed -[kJ]\n",
      "printnt ' (a) Net enthalpy change for several products (metabolites) per g mol mannitol consumed is %.2f kJ.'%del_H1\n",
      "\n",
      "\t\t\t#(b)\n",
      "del_H2 = del_H1 / B_growth ;\t\t\t#Net enthalpy change for several products (metabolites) per g cells produced-[kJ]\n",
      "print '  (b) Net enthalpy change for several products (metabolites) per g cells produced is %.2f kJ.'%del_H2\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " (a) Net enthalpy change for several products (metabolites) per g mol mannitol consumed is 84.28 kJ.\n",
        "  (b) Net enthalpy change for several products (metabolites) per g cells produced is 2.08 kJ.\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 25.7  page no. 777\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Solution \n",
      "\n",
      "# Variables\n",
      "H_Cb = -26. ;\t\t\t#Standard heat of formation of carbaryl(C12H11O2N) -[kJ/ g mol]\n",
      "H_HCl = -92.311 ;\t\t\t#Standard heat of formation of HCl -[kJ/ g mol]\n",
      "H_Ma = -20.0 ;\t\t\t#Standard heat of formation of methyl amine(CH3NH2) -[kJ/ g mol]\n",
      "H_Mi = -9*10**4 ;\t\t\t#Standard heat of formation of methyl isocynate(C2H3NO) -[kJ/ g mol]\n",
      "H_Nc = -17.9 ;\t\t\t#Standard heat of formation of 1-Napthalenyl chloroformate(C11H7O2Cl) -[kJ/ g mol]\n",
      "H_N = 30.9 ;\t\t\t#Standard heat of formation of napthol(C10H8O) -[kJ/ g mol]\n",
      "H_P = -221.85 ;\t\t\t#Standard heat of formation of phosgene(COCl2) -[kJ/ g mol]\n",
      "\n",
      "# Calculations\n",
      "H_rxn_a = (2*H_HCl + 1*H_Mi) - (1*(H_Ma) + 1*H_P )  ;\t\t\t# Heat of reaction (A)-[kJ]\n",
      "H_rxn_b = (1*H_Cb ) - (1*(H_Mi) + 1*H_N )  ;\t\t\t# Heat of reaction (B)-[kJ]\n",
      "H_rxn_c = (1*H_Nc) - (1*(H_N) + 1*H_P )  ;\t\t\t# Heat of reaction (C)-[kJ]\n",
      "H_rxn_d = (1*H_Cb + 1*H_HCl) - (1*(H_Nc) + 1*H_Ma )  ;\t\t\t# Heat of reaction (D)-[kJ]\n",
      "\n",
      "# Results\n",
      "#Bhopal Process\n",
      "print ' Bhopal process .'\n",
      "print '   (a) Heat of reaction (A) is %.1e kJ.'%H_rxn_a\n",
      "print '   (b) Heat of reaction (B) is %.1e kJ.'%H_rxn_b\n",
      "\n",
      "#Alternate process\n",
      "print '  Alternate process .'\n",
      "print '   (c) Heat of reaction (C) is %.2f kJ.'%H_rxn_c\n",
      "print '   (d) Heat of reaction (D) is %.2f kJ.'%H_rxn_d\n",
      "print ' The above data show that capital cost of Bhopal process could be higher than alternate process.'\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Bhopal process .\n",
        "   (a) Heat of reaction (A) is -9.0e+04 kJ.\n",
        "   (b) Heat of reaction (B) is 9.0e+04 kJ.\n",
        "  Alternate process .\n",
        "   (c) Heat of reaction (C) is 173.05 kJ.\n",
        "   (d) Heat of reaction (D) is -80.41 kJ.\n",
        " The above data show that capital cost of Bhopal process could be higher than alternate process.\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 25.8  page no. 782\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "P1 = 1. ;\t\t\t# Initial pressure - [atm]\n",
      "P2 = 1. ;\t\t\t# Final pressure - [atm]\n",
      "T1 = 500. ;\t\t\t# Initial temperature -[degree C]\n",
      "T2 = 500. ;\t\t\t# Final temperature -[degree C]\n",
      "\n",
      "m_CO2 = 1. ;\t\t\t# Moles of CO2 - [ g mol]\n",
      "m_H2 = 4. ;\t\t\t# Moles of H2 - [ g mol]\n",
      "m_H2O = 2. ;\t\t\t# Moles of H2O - [ g mol]\n",
      "m_CH4 = 1. ;\t\t\t# Moles of CH4 - [ g mol]\n",
      "\n",
      "H_fCO2 = -393.250; \t\t\t# Heat of formation of CO2 - [kJ/g mol] \n",
      "H_fH2 = 0 ;\t\t\t# Heat of formation of H2 - [kJ/g mol] \n",
      "H_fH2O = -241.835 ;\t\t\t# Heat of formation of H2O - [kJ/g mol] \n",
      "H_fCH4 = -74.848 ;\t\t\t# Heat of formation of CH4 - [kJ/g mol] \n",
      "\n",
      "H_CO2 = 21.425 ;\t\t\t# Change in enthalpy during temperature change from 25 to 500 degree C  of CO2 - [kJ/g mol] \n",
      "H_H2 = 13.834 ;\t\t\t# Change in enthalpy during temperature change from 25 to 500 degree C of H2 - [kJ/g mol] \n",
      "H_H2O = 17.010 ;\t\t\t# Change in enthalpy during temperature change from 25 to 500 degree C of H2O - [kJ/g mol] \n",
      "H_CH4 = 23.126 ;\t\t\t# Change in enthalpy during temperature change from 25 to 500 degree C of CH4 - [kJ/g mol] \n",
      "\n",
      "# Calculations\n",
      "H_in  = (H_fCO2 + H_CO2)*m_CO2 + (H_fH2 + H_H2)*m_H2 ;\t\t\t# Enthalpy change for inputs -[kJ]\n",
      "H_out = (H_fH2O + H_H2O)*m_H2O + (H_fCH4 + H_CH4)*m_CH4 ; \t\t\t# Enthalpy change for outputs -[kJ]\n",
      "del_H = H_out - H_in ;\t\t\t# Net enthalpy change of process -[kJ]\n",
      "\n",
      "# Results\n",
      "print 'Heat of above reaction at 500 degree C and 1 atm is %.1f kJ.'%del_H\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat of above reaction at 500 degree C and 1 atm is -184.9 kJ.\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 25.9  page no. 783\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Solution \n",
      "\n",
      "# Variables\n",
      "m_CO = 1. ;\t\t\t# Moles of CO input- [g mol]\n",
      "m1_O2 = 1.5 ;\t\t\t# Moles of O2 input - [g mol]\n",
      "m_CO2 = 1. ;\t\t\t# Moles of CO2 output - [g mol]\n",
      "m2_O2 = 1. ;\t\t\t# Moles of O2 output - [g mol]\n",
      "T_in_CO = 298. ;\t\t\t# Temperature of entering CO -[K]\n",
      "T_in_O2 = 400. ;\t\t\t#Temperature of entering O2 -[K]\n",
      "T_out_CO2 = 300. ;\t\t\t# Temperature of exiting CO2 -[K]\n",
      "T_out_O2 = 300. ;\t\t\t# Temperature of exiting O2 -[K]\n",
      "\n",
      "H_fCO = -110.520 ;\t\t\t# Heat of formation of CO - [kJ/g mol] \n",
      "H_fO2 = 0 ;\t\t\t# Heat of formation of O2 - [kJ/g mol] \n",
      "H_fCO2 = -393.250 ;\t\t\t# Heat of formation of CO2 - [kJ/g mol] \n",
      "\n",
      "H_CO = 0 ;\t\t\t# Change in enthalpy during temperature change from 298K to 298 K of CO - [kJ/g mol] \n",
      "H1_O2 = 11.619 ;\t\t\t# Change in enthalpy during temperature change from 298K to 400 K of input O2 - [kJ/g mol] \n",
      "H_CO2 = 11.644 ;\t\t\t# Change in enthalpy during temperature change from 298K to 300 K of CO2 - [kJ/g mol] \n",
      "H2_O2 = 8.389 ;\t\t\t# Change in enthalpy during temperature change from 298K to 300 K of output  O2 - [kJ/g mol] \n",
      "\n",
      "# Calculations\n",
      "H_in  = (H_fCO + H_CO)*m_CO + (H_fO2 + H1_O2)*m1_O2 ;\t\t\t# Enthalpy change for inputs -[kJ]\n",
      "H_out  = (H_fCO2 + H_CO2)*m_CO2 + (H_fO2 + H2_O2)*m2_O2 ;\t\t\t# Enthalpy change for inputs -[kJ]\n",
      "del_H = H_out - H_in ;\t\t\t# Net enthalpy change of process -[kJ]\n",
      "\n",
      "# Results\n",
      "print 'Heat of above reaction  is %.1f kJ.'%del_H\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat of above reaction  is -280.1 kJ.\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 25.10   page no. 788\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Solution \n",
      "\n",
      "# Given \n",
      "Ex_hv = 29770.0 ;\t\t\t# Experimental heating value of given coal - [kJ/kg]\n",
      "\n",
      "C = 71.0/100 ;\t\t\t#Fraction of C in coal \n",
      "H2 = 5.6/100 ;\t\t\t# Fraction of H2 in coal \n",
      "N2 = 1.6/100 ;\t\t\t# Fraction of N2 in coal \n",
      "S = 2.7/100 ;\t\t\t# Fraction of S in coal \n",
      "ash = 6.1/100 ;\t\t\t# Fraction of ash in coal \n",
      "O2 = 13.0/100 ;\t\t\t#Fraction of O2 in coal \n",
      "\n",
      "# Calculations\n",
      "HHV = 14544*C + 62028*(H2 - O2/8) + 4050*S ;\t\t\t# Higher heating value (HHV) by Dulong formula -[Btu/lb]\n",
      "HHV_SI = HHV *1.055/0.454 ;\t\t\t# HHV in SI unt - [kJ/kg]\n",
      "\n",
      "# Results\n",
      "print 'The experimental heating value -                       %.0f kJ.'%Ex_hv\n",
      "print ' Higher heating value (HHV) by Dulong formula -         %.0f kJ.'%HHV_SI\n",
      "print ' The two values are quite close.' \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The experimental heating value -                       29770 kJ.\n",
        " Higher heating value (HHV) by Dulong formula -         29980 kJ.\n",
        " The two values are quite close.\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 25.11  page no. 789\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables\n",
      "H_req = 10**6 ;\t\t\t# Heat requirement - [Btu]\n",
      "\n",
      "d_N6 = 60.2 ;\t\t\t# Density of fuel no. 6-[lb/ft**3]\n",
      "d_N2 = 58.7 ;\t\t\t# Density of fuel no. 2-[lb/ft**3]\n",
      "S_N6 = 0.72/100 ;\t\t\t# Sulphur content in fuel no. 6\n",
      "S_N2 = 0.62/100; \t\t\t#Sulphur content in fuel no. 2\n",
      "lhv_N6 = 155000 ;\t\t\t#Lower heating value of  No.6 -[Btu/gal]\n",
      "lhv_N2 = 120000 ;\t\t\t#Lower heating value of  No.2 -[Btu/gal]\n",
      "\n",
      "# Calculations\n",
      "S1 = H_req*d_N6*S_N6/lhv_N6 ;\t\t\t# Sulphur emmited when we use fuel NO. 6-[lb]\n",
      "S2 = H_req*d_N2*S_N2/lhv_N2 ;\t\t\t# Sulphur emmited when we use fuel NO. 2-[lb]\n",
      "\n",
      "# Results\n",
      "print ' Sulphur emmited when we use fuel NO. 6 is %.2f lb.'%S1 \n",
      "print ' Sulphur emmited when we use fuel NO. 2 is %.2f lb.'%S2 \n",
      "print 'Clearly fuel no. 6 should be selected because of its low SO2 emmission.'\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Sulphur emmited when we use fuel NO. 6 is 2.80 lb.\n",
        " Sulphur emmited when we use fuel NO. 2 is 3.03 lb.\n",
        "Clearly fuel no. 6 should be selected because of its low SO2 emmission.\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "code",
     "collapsed": true,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 11
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}