{
 "metadata": {
  "name": "",
  "signature": "sha256:c31b3e182c94546bee565a2d8036e956b36a8e464b50b24f4e687e55ce855452"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 8:VAPOUR CYCLE"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.1, Page No: 362"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "TH=311.06; # Source temperature in degree celcius\n",
      "pb=10; # Boiler pressure in MPa\n",
      "TL=32.88; # Sink temperature in degree celcius \n",
      "pc=5; # Condenser pressure in kPa\n",
      "# From steam tables at pb\n",
      "h2=1407.56; # specific enthalpy in kJ/kg \n",
      "h3=2724.7; # specific enthalpy in kJ/kg \n",
      "s2=3.3596; # specific entropy in kJ/kg K\n",
      "s3=5.6141; # specific entropy in kJ/kg K\n",
      "# From steam tables at pc\n",
      "hf=137.82; hfg=2423.7; # specific enthalpy in kJ/kg \n",
      "sf=0.4764; sfg=7.9187; # specific entropy in kJ/kg K\n",
      "\n",
      "#Calculation\n",
      "x1=(s2-sf)/sfg; # quality of steam at state 1\n",
      "x4=(s3-sf)/sfg; # quality of steam at state 4\n",
      "h1=hf+x1*hfg; # specific enthalpy at state 1\n",
      "h4=hf+x4*hfg; # specific enthalpy at state 4\n",
      "wT=h3-h4; # Turbine work\n",
      "wC=h2-h1; # Compressor work\n",
      "wnet=wT-wC; # Net work output\n",
      "qH=h3-h2; # Heat added\n",
      "rw=wnet/wT; # Ratio of net work to trbine work\n",
      "eff_th=wnet/qH; # Thermal efficiency\n",
      "SSC=3600/wnet; # specific steam consumption\n",
      "\n",
      "#Result\n",
      "print \"Ratio of net work to trbine work =\",round(rw,3),\"\\nThermal efficiency =\",round(eff_th*100,1),\"%\"\n",
      "print \"specific steam consumption =\",round(SSC,3),\"kg/kWh\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ratio of net work to trbine work = 0.618 \n",
        "Thermal efficiency = 47.6 %\n",
        "specific steam consumption = 5.741 kg/kWh\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.2, Page No:366"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "TH=311.06; # Source temperature in degree celcius\n",
      "p2=10; # Boiler pressure in MPa\n",
      "TL=32.88; # Sink temperature in degree celcius \n",
      "p1=5; # Condenser pressure in kPa\n",
      "# From steam tables at p2\n",
      "h3=2724.7; # specific enthalpy in kJ/kg \n",
      "s3=5.6141; # specific entropy in kJ/kg K\n",
      "# From steam tables at p1\n",
      "hf=137.82; hfg=2423.7; # specific enthalpy in kJ/kg \n",
      "sf=0.4764; sfg=7.9187; # specific entropy in kJ/kg K\n",
      "\n",
      "#Calculations\n",
      "x4=(s3-sf)/sfg; # quality of steam at state 4\n",
      "h4=hf+x4*hfg; # specific enthalpy at state 4\n",
      "h1=137.82; # specific enthalpy at state 1 in kJ/kg \n",
      "s1=0.4764; # specific entropy at state in kJ/kgK\n",
      "v1=0.001005; # specific volume in m^3/kg\n",
      "wp=abs (v1*(p2*10**3-p1)); # Pump work (absolute value)\n",
      "h2=h1+wp; # specific enthalpy at state 2\n",
      "wT=h3-h4; # Turbine work\n",
      "wnet=wT-wp; # Net work output\n",
      "qH=h3-h2; # Heat added\n",
      "rw=wnet/wT; # Ratio of net work to trbine work\n",
      "eff_th=wnet/qH; # Thermal efficiency\n",
      "SSC=3600/wnet; # specific steam consumption\n",
      "\n",
      "#Results\n",
      "print \"Ratio of net work to trbine work =\",round(rw,2),\"\\nThermal efficiency =\",round(eff_th*100,0),\"%\"\n",
      "print \"specific steam consumption =\",round(SSC,3),\"kg/kWh\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ratio of net work to trbine work = 0.99 \n",
        "Thermal efficiency = 39.0 %\n",
        "specific steam consumption = 3.585 kg/kWh\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.3, Page No:369"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "TH=311.06; # Source temperature in degree celcius\n",
      "p2=10; # Boiler pressure in MPa\n",
      "TL=32.88; # Sink temperature in degree celcius \n",
      "p1=5; # Condenser pressure in kPa\n",
      "# (a).Actual carnot cycle\n",
      "eff_Tur=0.8; # Efficiency of turbine\n",
      "eff_com=0.6; # Efficiency of compressure\n",
      "# From steam tables at p2\n",
      "h3=2724.7; # specific enthalpy in kJ/kg \n",
      "s3=5.6141; # specific entropy in kJ/kg K\n",
      "s2=3.3596; # specific entropy in kJ/kg K\n",
      "h2=1407.56; # specific enthalpy in kJ/kg \n",
      "# From steam tables at p1\n",
      "hf=137.82; hfg=2423.7; # specific enthalpy in kJ/kg \n",
      "sf=0.4764; sfg=7.9187; # specific entropy in kJ/kg K\n",
      "\n",
      "#Calculations for (a)\n",
      "x1=(s2-sf)/sfg; # quality of steam at state 1\n",
      "x4=(s3-sf)/sfg; # quality of steam at state 4\n",
      "h1=hf+x1*hfg; # specific enthalpy at state 1\n",
      "h4=hf+x4*hfg; # specific enthalpy at state 4\n",
      "wTs=h3-h4; # Turbine work\n",
      "wT=eff_Tur*wTs; # Actual turbine work\n",
      "wCs=h2-h1; # Compressor work\n",
      "wC=wCs/eff_com; # Actual compressor work\n",
      "wnet=wT-wC; # Net work output\n",
      "h2a=h1+wC; # specific enthalpy\n",
      "qH=h3-h2a; # Heat added\n",
      "rw=wnet/wT; # Ratio of net work to trbine work\n",
      "eff_th=wnet/qH; # Thermal efficiency\n",
      "SSC=3600/wnet; # specific steam consumption\n",
      "\n",
      "#Results for (a)\n",
      "print \"(a).Actual carnot cycle\",\"\\nRatio of net work to trbine work =\",round(rw,4),\"\\nThermal efficiency =\",round(eff_th*100,2),\"%\"\n",
      "print \"specific steam consumption =\",round(SSC,1),\"kg/kWh\"\n",
      "\n",
      "#Variable declaration for (b)\n",
      "#   (b).Actual Rankine cycle\n",
      "eff_Tur=0.8; # Efficiency of turbine\n",
      "eff_pump=0.9; # Efficiency of Pump\n",
      "# From steam tables at p1\n",
      "h1=137.82; # specific enthalpy at state 1 in kJ/kg \n",
      "s1=0.4764; # specific entropy at state in kJ/kgK\n",
      "v1=0.001005; # specific volume in m^3/kg\n",
      "\n",
      "#Calculations for (b)\n",
      "wps=abs (v1*(p2*10**3-p1)); # Pump work (absolute value)\n",
      "wp=wps/eff_pump; # Actual pmp work\n",
      "h2a=h1+wp; # # specific enthalpy at state 2\n",
      "wnet=wT-wp; # Net work output\n",
      "qH=h3-h2a; # Heat added\n",
      "rw=wnet/wT; # Ratio of net work to trbine work\n",
      "eff_th=wnet/qH; # Thermal efficiency\n",
      "SSC=3600/wnet; # specific steam consumption\n",
      "\n",
      "#Results for (b)\n",
      "print \"\\n\\n(b).Actual Rankine cycle\",\"\\nRatio of net work to trbine work =\",round(rw,3),\"\\nThermal efficiency =\",round(eff_th*100,0),\"%\"\n",
      "print \"specific steam consumption =\",round(SSC,1),\"kg/kWh\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a).Actual carnot cycle \n",
        "Ratio of net work to trbine work = 0.2046 \n",
        "Thermal efficiency = 15.68 %\n",
        "specific steam consumption = 21.7 kg/kWh\n",
        "\n",
        "\n",
        "(b).Actual Rankine cycle \n",
        "Ratio of net work to trbine work = 0.986 \n",
        "Thermal efficiency = 31.0 %\n",
        "specific steam consumption = 4.5 kg/kWh\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.4, Page No:379 "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "T3=450; # temperature of steam at state 3 in degree celcius\n",
      "p3=10; # Boiler pressure in MPa \n",
      "p6=5; # Condenser pressure in kPa\n",
      "# From steam tables at state 1\n",
      "hf=137.82; hfg=2423.7; # specific enthalpy in kJ/kg \n",
      "sf=0.4764; sfg=7.9187; # specific entropy in kJ/kg K\n",
      "h1=137.82; # specific enthalpy at state 1 in kJ/kg \n",
      "s1=0.4764; # specific entropy at state in kJ/kgK\n",
      "v1=0.001005; # specific volume in m^3/kg\n",
      "\n",
      "#Calculations for (a)\n",
      "wp=abs (v1*(p3*10**3-p6)); # Pump work (absolute value)\n",
      "h2=h1+wp; # specific enthalpy at state 2\n",
      "#   (a).Rankine cycle with superheat\n",
      "# From steam tables at state 3\n",
      "h3=3240.9;# specific enthalpy in kJ/kg\n",
      "s3=6.419; # specific entropy in kJ/kg K\n",
      "# State 4_1\n",
      "x4_1=(s3-sf)/sfg; # Quality of steam at state 4_1\n",
      "h4_1=hf+x4_1*hfg; # specific enthalpy at state 4_1\n",
      "wT=h3-h4_1; # Turbine work\n",
      "wnet=wT-wp; # Net work output\n",
      "qH=h3-h2; # Heat added\n",
      "eff_th=wnet/qH; # Thermal efficiency\n",
      "SSC=3600/wnet; # specific steam consumption\n",
      "\n",
      "#Results for (a)\n",
      "print \"(a).Rankine cycle with superheat\",\"\\nQuality of steam at exhaust = \",round(x4_1,2),\"\\nThermal efficiency =\",round(eff_th*100,1),\"%\"\n",
      "print \"specific steam consumption =\",round(SSC,3),\"kg/kWh\"\n",
      "\n",
      "#Variable declaration for (b)\n",
      "#   (b).Reheat cycle\n",
      "s4=s3; # isentropic expansion\n",
      "x4=0.975; # Quality of steam at state 4\n",
      "# from steam table intermediate pressure is selected for s4 & x4 by interpolation and assumed by round value\n",
      "p4=1.2; # Intermediate pressure in MPa\n",
      "# From steam tables at state 4\n",
      "hf4=798.6; hfg4=1986.2; # specific enthalpy in kJ/kg \n",
      "h4=hf4+x4*hfg4; # specific enthalpy in kJ/kg \n",
      "# From steam tables at state 5\n",
      "h5=3368.5;# specific enthalpy in kJ/kg\n",
      "s5=7.5266; # specific entropy in kJ/kg K\n",
      "\n",
      "#Calculations for (b)\n",
      "x6=(s5-sf)/sfg; # Quality of steam at state 6\n",
      "h6=hf+x6*hfg; # specific enthalpy in kJ/kg \n",
      "wT=(h3-h4)+(h5-h6); # Turbine work\n",
      "wnet=wT-wp; # Net work output\n",
      "qH=(h3-h2)+(h5-h4); # Heat added\n",
      "eff_th=wnet/qH; # Thermal efficiency\n",
      "SSC=3600/wnet; # specific steam consumption\n",
      "\n",
      "#Results for (b)\n",
      "print \"\\n\\n(b).Reheat cycle\",\"\\nQuality of steam at exhaust = \",round(x6,2),\"\\nThermal efficiency =\",round(eff_th*100,1),\"%\"\n",
      "print \"specific steam consumption =\",round(SSC,3),\"kg/kWh\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a).Rankine cycle with superheat \n",
        "Quality of steam at exhaust =  0.75 \n",
        "Thermal efficiency = 41.2 %\n",
        "specific steam consumption = 2.825 kg/kWh\n",
        "\n",
        "\n",
        "(b).Reheat cycle \n",
        "Quality of steam at exhaust =  0.89 \n",
        "Thermal efficiency = 42.1 %\n",
        "specific steam consumption = 2.295 kg/kWh\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.5, Page No:386 "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "T5=311.06; # temperature of steam at state 5  in degree celcius\n",
      "p5=10; # Boiler pressure in MPa\n",
      "p4=p5;\n",
      "T7=32.88; # temperature of steam at state 7  in degree celcius \n",
      "p7=5; # Condenser pressure in kPa\n",
      "p1=p7;\n",
      "# From steam tables at p7\n",
      "h1=137.82; # specific enthalpy at state 1 in kJ/kg \n",
      "s1=0.4764; # specific entropy at state 1 in kJ/kgK\n",
      "v1=0.001005; # specific volume in m^3/kg\n",
      "\n",
      "#Calculations\n",
      "wp=abs (v1*(p5*10**3-p7)); # Pump work (absolute value)\n",
      "h2=h1+wp; # specific enthalpy at state 2\n",
      "T6=(T5+T7)/2; # Temperature of bleed system\n",
      "h5=2724.7; # specific enthalpy at state 5 in kJ/kg \n",
      "s5=5.6141; # specific entropy at state 5 in kJ/kgK\n",
      "# From steam tables at state 6\n",
      "p6=791.5; # bleed steam pressure in kPa\n",
      "p2=p6; p3=p6;\n",
      "vf6=0.00114; # specific volume in m^3/kg\n",
      "v3=vf6;\n",
      "hf6=719.21; hfg6=2049.5; # specific enthalpy in kJ/kg \n",
      "sf6=2.0419; sfg6=4.6244; # specific entropy in kJ/kg K\n",
      "x6=(s5-sf6)/sfg6; # quality of steam at state 6\n",
      "h6=hf6+x6*hfg6; # specific enthalpy at state 6\n",
      "h3=hf6; # specific enthalpy at state 3\n",
      "m1=(h3-h2)/(h6-h2); # Fraction of bleed steam\n",
      "wLP=abs (v1*(p2-p1)); # LP work\n",
      "wHP=abs (v3*(p4*10**3-p3)); # HP work\n",
      "wp=(1-m1)*wLP+wHP; # Total pump work\n",
      "h2=h1+wp; h4=h3+wp; # Specific Enthalpies of water\n",
      "# From steam tables at pc\n",
      "hf7=137.82; hfg7=2423.7; # specific enthalpy in kJ/kg \n",
      "sf7=0.4764; sfg7=7.9187; # specific entropy in kJ/kg K\n",
      "x7=(s5-sf7)/sfg7; # quality of steam at state 7\n",
      "h7=hf7+x7*hfg7; # specific enthalpy at state 4\n",
      "wT=(h5-h6)+(1-m1)*(h6-h7); # Turbine work\n",
      "wnet=wT-wp; # Net work output\n",
      "qH=h5-h4; # Heat added\n",
      "eff_th=wnet/qH; # Thermal efficiency\n",
      "SSC=3600/wnet; # specific steam consumption\n",
      "\n",
      "#Result\n",
      "print \"Thermal efficiency =\",round(eff_th*100,1),\"%\",\"\\nspecific steam consumption =\",round(SSC,3),\"kg/kWh\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thermal efficiency = 42.4 % \n",
        "specific steam consumption = 4.254 kg/kWh\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.6, Page No:389"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration \n",
      "ps=6.89+1; # Pressure of steam produced in bar (Absolute)\n",
      "x=0.96; # Quality of steam produced\n",
      "f=75; # Steady flow of water in litres\n",
      "t=9.5; # Time consumption of water in minutes\n",
      "tf=685; #Time consumption of 10 litre fuel in seconds\n",
      "Vf=10; # consumption of fuel in litres\n",
      "Sf=0.85; # specific gravity of water\n",
      "CV=43125; # Calorific value of fuel in kJ/kg\n",
      "\n",
      "#Calculation\n",
      "ms=f/(t*60);# Steam generation\n",
      "mf=Vf*Sf/tf; # consumption of fuel\n",
      "# From steam tables at ps\n",
      "hf=718.5; hfg=2050; # specific enthalpy in kJ/kg \n",
      "hs=hf+x*hfg; # specific enthalpy of steam produced\n",
      "hFW=146.7; # Enthalpy of feed water at 35 degree celcius\n",
      "eff_boiler=(ms*(hs-hFW))/(mf*CV); # Boiler Efficiency\n",
      "\n",
      "#Result\n",
      "print \"Boiler Efficiency = \",round(eff_boiler*100,2),\"%\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Boiler Efficiency =  62.45 %\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.7, Page No:394"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration \n",
      "TL=-15; # Source temperature in degree celcius\n",
      "TH=40; # Sink temperature in degree celcius\n",
      "# From the table of properties of Freon - 12\n",
      "h2=203.05; h3=74.53; hf4=22.31; hg4=180.85; # specific enthalpy in kJ/kg \n",
      "s1=0.682; s3=0.2716; sf4=0.0906; sg4=0.7046; sfg4=sg4-sf4;# specific entropy in kJ/kg K\n",
      "\n",
      "#Calculations\n",
      "sf1=sf4; sfg1=sfg4; s2=s1; s4=s3; hf1=hf4; hg1=hg4; hfg4=hg4-hf4; hfg1=hfg4;# refer figure 8.20 \n",
      "x1=(s1-sf1)/sfg1; # Dryness fraction at state 1\n",
      "x4=(s4-sf4)/sfg4; # dryness fraction at state 4\n",
      "h1=hf1+x1*hfg1; h4=hf4+x4*hfg4; # specific enthalpy in kJ/kg \n",
      "wc=h2-h1; # work of compression\n",
      "wE=h3-h4; # Work of expansion\n",
      "qL=h1-h4; # Refrigerating effect\n",
      "qH=h2-h3; # Heat rejected\n",
      "wnet=wc-wE; # Net work\n",
      "COPc=qL/wnet; # COP of the cycle\n",
      "\n",
      "#Results\n",
      "print \"Work of compression = \",round(wc,2),\"kJ/kg\",\"\\nWork of expansion =\",round(wE,2),\"kJ/kg\"\n",
      "print \"Refrigerating effect = \",round(qL,2),\"kJ/kg\"\n",
      "print \"Heat rejected =\",qH,\"kJ/kg\",\"\\nCOP of the cycle =\",round(COPc,3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Work of compression =  28.04 kJ/kg \n",
        "Work of expansion = 5.48 kJ/kg\n",
        "Refrigerating effect =  105.97 kJ/kg\n",
        "Heat rejected = 128.52 kJ/kg \n",
        "COP of the cycle = 4.699\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.8, Page No:400 "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "TL=-15; # Source temperature in degree celcius\n",
      "TH=40; # Sink temperature in degree celcius\n",
      "# From the table of properties of Freon - 12\n",
      "h3=74.53; h1=180.85; h4=h3; # specific enthalpy in kJ/kg \n",
      "s1=0.7046; s2=0.682; # specific entropy in kJ/kg K\n",
      "\n",
      "# (a)               \n",
      "\n",
      "#Calculation for (i)\n",
      "# (i).Condensor and Evaporator pressure\n",
      "pc=0.9607; # Saturation pressure at TH in MPa\n",
      "pE=0.1826; # Saturation pressure at TL in MPa\n",
      "\n",
      "#Results for (i)\n",
      "print \"(a)\",\"\\n(i).Condensor and Evaporator pressure\",\"\\nCondensor pressure = \",pc,\"MPa\"\n",
      "print \"Evaporator pressure = \",pE,\"MPa\"\n",
      "\n",
      "#Calculation for (ii)\n",
      "# (ii).Compressor discharge temperature  & Enthalpy\n",
      "p2=pc; # Condensor pressure\n",
      "s2=s1; # refer figure 8.25\n",
      "# From the table of properties of Freon - 12 at pc\n",
      "t2=46.8; # Compressor discharge temperature in degree celcius\n",
      "h2=208.3; # specific enthalpy in kJ/kg \n",
      "\n",
      "#Results for (ii)\n",
      "print \"\\n(ii).Compressor discharge temperature  & Enthalpy\",\"\\nCompressor discharge temperature = \",t2,\"oC\"\n",
      "print \"Enthalpy = \",h2,\"kJ/kg\"\n",
      "\n",
      "#Calculation for (iii)\n",
      "# (iii).Ratio of COP of the cycle to Carnot COP\n",
      "w=h2-h1; # Compressor work\n",
      "qL=h1-h4; # Refrigeration effect\n",
      "COP=qL/w; # COP of the cycle\n",
      "COPc=4.68; # COP of carnot cycle from example 8.7\n",
      "r=COP/COPc; # Ratio of COP of the cycle to Carnot COP\n",
      "\n",
      "#Results for (iii)\n",
      "print \"\\n(iii).Ratio of COP of the cycle to Carnot COP = \",round(r,2)\n",
      "\n",
      "#Calculation for (b)\n",
      "# (b)                \n",
      "QL=0.440; # Capacity of refrigerator in kW (1/8 ton of refrigeration)\n",
      "m=QL/qL; # Mass flow rate of refrigerant\n",
      "W=m*w; # Power consumption of compressor\n",
      "QH=QL+W; # Heat rejected\n",
      "\n",
      "#Results for (b)\n",
      "print \"\\n\\n(b)\",\"\\nMass flow rate of refrigerant = \",round(m,5),\"kg/s\",\"\\nPower consumption of compressor = \",round(W,4),\"kW\"\n",
      "print \"Heat rejected to surroundings = \",round(QH,4),\"kW   (Error in textbook answer)\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) \n",
        "(i).Condensor and Evaporator pressure \n",
        "Condensor pressure =  0.9607 MPa\n",
        "Evaporator pressure =  0.1826 MPa\n",
        "\n",
        "(ii).Compressor discharge temperature  & Enthalpy \n",
        "Compressor discharge temperature =  46.8 oC\n",
        "Enthalpy =  208.3 kJ/kg\n",
        "\n",
        "(iii).Ratio of COP of the cycle to Carnot COP =  0.83\n",
        "\n",
        "\n",
        "(b) \n",
        "Mass flow rate of refrigerant =  0.00414 kg/s \n",
        "Power consumption of compressor =  0.1136 kW\n",
        "Heat rejected to surroundings =  0.5536 kW   (Error in textbook answer)\n"
       ]
      }
     ],
     "prompt_number": 8
    }
   ],
   "metadata": {}
  }
 ]
}