{
 "metadata": {
  "name": "",
  "signature": "sha256:5cf24d0307e45e34f1d1e8828ef11e3ac74cacd774f3b3015eadb6dcfa4cb99e"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 8 : Production Of Power From Heat"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.1 page no : 121"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "#(a)-As in Example(7.6)\n",
      "P1 = 8600.;\t\t\t#[KPa]\n",
      "T1 = 773.15;\t\t\t#[K]\n",
      "#values of Enthalpy and Entropy from Steam tables\n",
      "H1 = 3391.6;\t\t\t#[KJ/Kg]\n",
      "S1 = 6.6858;\t\t\t#[KJ/Kg/K]\n",
      "\n",
      "P2 = 10;\t\t\t#[KPa]\n",
      "S2i = S1;\t\t\t#Isentropic\n",
      "\n",
      "S2_liquid = 0.6493;\n",
      "S2_vapor = 8.1511;\n",
      "H2_liquid = 191.8;\n",
      "H2_vapor = 2584.8;\n",
      "\n",
      "# Calculations and Results\n",
      "x2 = (S2i-S2_liquid)/(S2_vapor-S2_liquid);\n",
      "\n",
      "H2i = H2_liquid+(x2*(H2_vapor-H2_liquid));\n",
      "del_Hs_1 = round((H2i-H1),1);\t\t\t#[KJ/Kg]\n",
      "Ws = del_Hs_1;\n",
      "H3i = H2i;\n",
      "H4 = H2_liquid;\n",
      "#Applying Eqn(8.2)\n",
      "Q_condenser = round((H4-H3i),1);\t\t\t#heat Of condenser  [KJ/Kg]\n",
      "#From Example(7.10)\n",
      "#Properties of saturated liquid water @ 318.15K\n",
      "V = 1010;\t\t\t#[cm**3/Kg]\n",
      "V = 1010*10**-6;\t\t\t#[m**3/Kg]\n",
      "Beta = 425*10**-6;\t\t\t#[K**-1]\n",
      "Cp = 4.178;\t\t\t#[KJ/Kg/K]\n",
      "\n",
      "#From Eqn(7.24)\n",
      "Ws_2 = round((V*(P1-P2)),1)\t\t\t#[KPa m**3/Kg]\n",
      "del_Hs_2 = Ws_2;\n",
      "H1 = H4+del_Hs_2;\n",
      "#Enthalpy Of saturated steam at 8600KPa and 773.15K\n",
      "H2 = 3391.6;\t\t\t#[KJ/Kg]\n",
      "#Applying Eqn(8.2)\n",
      "Q_boiler = H2-H1;\n",
      "\n",
      "Ws_Rankine = -Q_boiler-Q_condenser;\n",
      "eta = round((abs(Ws_Rankine)/Q_boiler),3);\n",
      "print ('(a)Rankine Cycle')\n",
      "print 'Thermal Efficiency',eta\n",
      "\n",
      "#(b)\n",
      "eta_b = 0.75;\n",
      "del_H_1 = del_Hs_1*eta_b;\n",
      "Ws_turbine = del_H_1;\n",
      "H3 = H2+del_H_1;\n",
      "Q_condenser = H4-H3;\n",
      "\n",
      "#By Example 7.10 for the pump\n",
      "Ws_pump = del_Hs_2/eta_b;\n",
      "del_H_2 = Ws_pump;\n",
      "Ws_net = Ws_turbine+Ws_pump;\n",
      "H1 = H4+del_H_2;\n",
      "\n",
      "Q_boiler = H2-H1;\n",
      "efficiency = round(abs(Ws_net)/Q_boiler,4);\n",
      "print ('(b)Practical cycle with 0.75 efficiency')\n",
      "print 'Thermal Efficiency',efficiency\n",
      "\n",
      "#(c)\n",
      "#By rating of Power Cycle\n",
      "rWs_net = -80000;\t\t\t#[KJ/s]  Power Rating \n",
      "rm = round(rWs_net/Ws_net,2);\n",
      "\n",
      "rQ_boiler = round(rm*Q_boiler/1000,1);\t\t\t#[MW]\n",
      "rQ_condenser = round(rm*Q_condenser/1000,1);\t\t\t#[MW]\n",
      "print ('(c)By rating of Power Cycle');\n",
      "print 'Steam Rate',rm,'kg/s'\n",
      "print 'Heat Transfer rate in boiler',rQ_boiler,'MW'\n",
      "print 'Heat Transfer rate in condenser',rQ_condenser,'MW'\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Rankine Cycle\n",
        "Thermal Efficiency 0.397\n",
        "(b)Practical cycle with 0.75 efficiency\n",
        "Thermal Efficiency 0.2961\n",
        "(c)By rating of Power Cycle\n",
        "Steam Rate 84.74 kg/s\n",
        "Heat Transfer rate in boiler 270.2 MW\n",
        "Heat Transfer rate in condenser -190.2 MW\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.4  page no : 122"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "K = 6.;\t\t\t#Pb/Pa\n",
      "T1 = 298.15;\t\t\t#[K]\n",
      "Tmax = 1033.15;\t\t\t#[K]\n",
      "Gamma = 1.4;\n",
      "\n",
      "# Calculations and Results\n",
      "#(a)  Gamma = 1.4\n",
      "#From Eqn(8.12)\n",
      "eta_a = round(1-((1/K)**((Gamma-1)/Gamma)),1);\n",
      "print ('(a)Efficiency of an ideal air cycle')\n",
      "print 'Efficiency',eta_a\n",
      "\n",
      "#(b)  eta_c = 0.83  eta_t = 0.86\n",
      "eta_c = 0.83;\n",
      "eta_t = 0.86;\n",
      "K2 = Tmax/T1;\n",
      "alpha = (K)**((Gamma-1)/Gamma);\n",
      "\n",
      "#Umath.sing Eqn(8.13)\n",
      "eta_b = round(((eta_t*eta_c*K2*(1-(1/alpha)))-(alpha-1))/((eta_c*(K2-1))-(alpha-1)),3);\n",
      "print ('(b)Thermal efficiency of an air cycle if the Compressor and Turbine Operate adiabatically')\n",
      "print 'Thermal efficiency',eta_b\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Efficiency of an ideal air cycle\n",
        "Efficiency 0.4\n",
        "(b)Thermal efficiency of an air cycle if the Compressor and Turbine Operate adiabatically\n",
        "Thermal efficiency 0.234\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}