summaryrefslogtreecommitdiff
path: root/Thermodynamics_Demystified/Chapter6.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Thermodynamics_Demystified/Chapter6.ipynb')
-rwxr-xr-xThermodynamics_Demystified/Chapter6.ipynb704
1 files changed, 0 insertions, 704 deletions
diff --git a/Thermodynamics_Demystified/Chapter6.ipynb b/Thermodynamics_Demystified/Chapter6.ipynb
deleted file mode 100755
index 4f406b7e..00000000
--- a/Thermodynamics_Demystified/Chapter6.ipynb
+++ /dev/null
@@ -1,704 +0,0 @@
-{
- "metadata": {
- "name": "",
- "signature": "sha256:e92a3a85838e85e036e1c07a34c6c3996a0867f06470b08d471a9b83e142be32"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 6:Power Vapor Cycles"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.1:PG-146"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "# Please refer to the given figure in question for quantities\n",
- "P2=2*1000 #higher pressure converted in in kPa\n",
- "P1=10 # lower pressure in kPa\n",
- "rho=1000 # density of water in Kg/m^3\n",
- "h1=192 # enthalpy at state 1 in kJ/kg\n",
- "h3=3248 # enthalpy at state 3 in kJ/kg\n",
- "s3=7.1279# entropy at state 3 in kJ/kg.K\n",
- "\n",
- "#calculation of pump work\n",
- "wp=(P2-P1)/rho # pump work given by equation 4.56 in textbook\n",
- "h2=h1+wp # by enrgy balance b/w state 1 and 2\n",
- "q=h3-h2 # Heat input from 2 to 3\n",
- "\n",
- "s4=s3 # isentropic process\n",
- "sf=0.6491 # entropy of saturated liquid @10 kPa from steam table\n",
- "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
- "x=(s4-sf)/(sg-sf)# from property of pure substance\n",
- "hf=191.8 #enthalpy of saturated liquid @10 kPa from steam table\n",
- "hg=2584 # enthalpy of saturated vapour @10 kPa from steam table\n",
- "h4=hf+x*(hg-hf)# enthalpy @ state 4\n",
- "\n",
- "wt=h3-h4 # turbine work\n",
- "\n",
- "efficiency=(wt-wp)/q # efficiency of power cycle\n",
- "print \" The Efficiency is\",round(efficiency,4),\" or\",round(efficiency*100,1),\"%\"\n",
- "# the answer is correct within limits\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.3238 or 32.4 %\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.2:PG-149"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "# Please refer to the given figure of question 6.1 for quantities\n",
- "effi1=0.323 #old efficiency\n",
- "P2=4*1000 #higher pressure converted in in kPa\n",
- "P1=10 # lower pressure in kPa\n",
- "rho=1000 # density of water in Kg/m^3\n",
- "h1=192 # enthalpy at state 1 in kJ/kg\n",
- "h3=3214 # enthalpy at state 3 i.e @400 degree celsius and 4MPa in kJ/kg\n",
- "s3=6.769# entropy at state 3 i.e @400 degree celsius and 4MPa in kJ/kg.K\n",
- "\n",
- "s4=s3 # insentropic process\n",
- "sf=0.6491 # entropy of saturated liquid @10 kPa from steam table\n",
- "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
- "\n",
- "x=(s4-sf)/(sg-sf)# quality of steam\n",
- "\n",
- "hf=192 #enthalpy of saturated liquid @10 kPa from steam table\n",
- "hg=2584 # enthalpy of saturated vapour @10 kPa from steam table\n",
- "h4=hf+x*(hg-hf)# enthalpy @ state 4\n",
- "h2=h1 # isenthalpic process\n",
- "qb=h3-h2 # heat addition\n",
- "\n",
- "wt=h3-h4 # turbine work\n",
- "\n",
- "effi2=(wt)/qb # efficiency of power cycle\n",
- "\n",
- "print \" The Efficiency is\",round(effi2,3),\" or\",round(effi2*100),\"% \\n\"\n",
- "\n",
- "perincrease=((effi2-effi1)/effi1)*100 \n",
- "\n",
- "print \" The % increase in Efficiency is\",round(perincrease,2),\" \\n\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.354 or 35.0 % \n",
- "\n",
- " The % increase in Efficiency is 9.69 \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.3:PG-149"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "# Please refer to fig of question 6.1 for quantities\n",
- "effi1=0.323 #old efficiency\n",
- "P2=2*1000 #higher pressure converted in in kPa\n",
- "P1=10 # lower pressure in kPa\n",
- "rho=1000 # density of water in Kg/m^3\n",
- "T2=600# max temperature of cycle in degree celsius\n",
- "h1=192 # enthalpy at state 1 in kJ/kg\n",
- "h3=3690 # enthalpy at state 3 in kJ/kg, 600*C and 2MPa pressure\n",
- "s3=7.702# entropy at state 3 in kJ/kg.K, 600*C and 2MPa pressure\n",
- " \n",
- "s4=s3# isentropic process\n",
- "sf=0.6491 # entropy of saturated liquid @10 kPa from steam table\n",
- "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
- "\n",
- "x=(s4-sf)/(sg-sf)# quality of steam\n",
- "\n",
- "hf=192 #enthalpy of saturated liquid @10 kPa from steam table\n",
- "hg=2584 # enthalpy of saturated vapour @10 kPa from steam table\n",
- "h4=hf+x*(hg-hf)# enthalpy @ state 4\n",
- "\n",
- "h2=h1 # isenthalpic process\n",
- "qb=h3-h2 # heat addition\n",
- "\n",
- "wt=h3-h4 # turbine work\n",
- "\n",
- "effi2=(wt)/qb # efficiency of power cycle\n",
- "print \" The Efficiency is\",round(effi2,3),\" or\",round(effi2*100),\"% \\n\"\n",
- "perincrease=((effi2-effi1)/effi1)*100 \n",
- "print \" The % increase in Efficiency is\",round(perincrease,2),\" \\n\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.357 or 36.0 % \n",
- "\n",
- " The % increase in Efficiency is 10.56 \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.4:PG-150"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "# Please refer to fig of question 6.1 for quantities\n",
- "effi1=0.323 #old efficiency\n",
- "P2=2*1000 #higher pressure converted in in kPa\n",
- "P1=4 # condenser pressure in kPa\n",
- "rho=1000 # density of water in Kg/m^3\n",
- "h1=192 # enthalpy at state 1 in kJ/kg\n",
- "h3=3248 # enthalpy at state 3 in kJ/kg\n",
- "s3=7.1279# entropy at state 3 in kJ/kg.K\n",
- "\n",
- "s4=s3 # isentropic process \n",
- "\n",
- "sf=0.4225 # entropy of saturated liquid @10 kPa from steam table\n",
- "sg=8.4754 # entropy of saturated vapour @10 kPa from steam table\n",
- "\n",
- "x=(s4-sf)/(sg-sf)# from property of pure substance\n",
- "\n",
- "hf=121 #enthalpy of saturated liquid @4 kPa from steam table\n",
- "hg=2554 # enthalpy of saturated vapour @4 kPa from steam table\n",
- "h4=hf+x*(hg-hf)# enthalpy @ state 4h1=h2 # isenthalpic process\n",
- "h2=h1 # isenthalpic process\n",
- "qb=h3-h2 # heat addition\n",
- "\n",
- "wt=h3-h4 # turbine work\n",
- "\n",
- "effi2=(wt)/qb # efficiency of power cycle\n",
- "print \" The Efficiency is\",round(effi2,4),\" or\",round(effi2*100),\"% \\n\"\n",
- "perincrease=((effi2-effi1)/effi1)*100 \n",
- "print \" The % increase in Efficiency is\",round(perincrease,2),\" \\n\"\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.3603 or 36.0 % \n",
- "\n",
- " The % increase in Efficiency is 11.55 \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 14
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.5:PG-152"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "P2=2*1000 #higher pressure converted in in kPa\n",
- "P1=10 # lower pressure in kPa\n",
- "h1=192.0 # enthalpy at 10 kPa in kJ/kg\n",
- "h3=3248.0 # enthalpy @ state 3 in kJ/kg from table C.3\n",
- "s3=7.128 # entropy @ state 3 in kJ/kg.K from table C.3\n",
- "s4=s3 # isentropic process\n",
- "\n",
- "h2=h1 #isenthalpic process\n",
- "h4=((s4-7.038)/(7.233-7.038))*(3056-2950)+2950 #using adjacent values for \n",
- "#interpolation from table C.3 \n",
- "h5=3267.0 # enthalpy at 800 kPa and $00 degree celsius\n",
- "s5=7.572 # entropy at 800 kPa and $00 degree celsius\n",
- "\n",
- "s6=s5 # isentropic process\n",
- "sf=0.6491# entropy of saturated liquid @10 kPa from steam table\n",
- "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
- "\n",
- "x=(s6-sf)/(sg-sf)# quality of steam\n",
- "\n",
- "hf=192.0 #enthalpy of saturated liquid @10 kPa from steam table\n",
- "hg=2585.0 # enthalpy of saturated vapour @10 kPa from steam table\n",
- "\n",
- "h6=hf+x*(hg-hf)# enthalpy @ state 6\n",
- "\n",
- "# we now calculate energy input\n",
- "qb=(h5-h4)+(h3-h2)# heat interaction\n",
- "\n",
- "# we now calculate work output\n",
- "wt=(h5-h6)+(h3-h4)# turbine work\n",
- "\n",
- "eff=(wt)/qb # efficiency of power cycle\n",
- "print\" The Efficiency is\",round(eff,3),\" or\",round(eff*100,2),\"%\"\n",
- "\n",
- "# // The anwer is different in textbook as there the intermediate values are approximated while in python the calculations are precise \n",
- "\n",
- "\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.336 or 33.57 %\n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.6:PG-155"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "# initialization of variables\n",
- "\n",
- "# Please refer to fig of question 6.1 for quantities\n",
- "\n",
- "effi1=0.357 #efficiency from example 6.3\n",
- "P2=2*1000.0 #higher pressure converted in in kPa\n",
- "P1=10.0 # lower pressure in kPa\n",
- "rho=1000.0 # density of water in Kg/m^3\n",
- "T2=600.0 # max temperature of cycle in degree celsius\n",
- "h1=192.0 # enthalpy at state 1 in kJ/kg\n",
- "h3=3690.0 # enthalpy at state 3 in kJ/kg, 600*C and 2MPa pressure\n",
- "h4=2442.0 # enthalpy from example 6.3\n",
- "h6=505.0 # specific enthalpy @ 200 kPa from steam table\n",
- "h7=h6 # isenthalpic process\n",
- "s3=7.702# entropy at state 3 in kJ/kg.K, 600*C and 2MPa pressure\n",
- "\n",
- "h2=h1 # isenthalpic process\n",
- "s5=s3 # isentropic process\n",
- "h5=(s3-7.509)*(2971-2870)/(7.709-7.509)+2870 # interpolationg from steam table 2 200 kPa using s5=s3= 7.702 kJ/kg.\n",
- "\n",
- "m6=1.0 # let mass of steam =1 Kg\n",
- "m5=(h6-h2)*(m6)/(h5-h2) \n",
- "m2=m6-m5 # conservation of mass\n",
- "\n",
- "wt=h3-h5+(h5-h4)*m2 # work done by turbine\n",
- "qb=h3-h7 # heat given to bolier\n",
- "effi2=(wt)/qb # efficiency of power cycle\n",
- "print \" The Efficiency is\",round(effi2,4),\" or\",round(effi2*100),\"% \\n\"\n",
- "perincrease=((effi2-effi1)/effi1)*100 \n",
- "print \" The % increase in Efficiency is\",round(perincrease,2),\" \\n\"\n",
- "\n",
- "# The anwer is different in textbook as there the intermediate values are approximated while in python the calculations are precise \n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.3732 or 37.0 % \n",
- "\n",
- " The % increase in Efficiency is 4.55 \n",
- "\n"
- ]
- }
- ],
- "prompt_number": 27
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.7:PG-156"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "P2=2*1000 #higher pressure converted in kPa\n",
- "P1=10 # lower pressure in kPa\n",
- "h1=192 # enthalpy at 10 kPa in kJ/kg\n",
- "h3=3248 # enthalpy @ state 3 in kJ/kg from table C.3\n",
- "s3=7.128 # entropy @ state 3 in kJ/kg.K from table C.3\n",
- "\n",
- "s4=s3 # isentropic process\n",
- "\n",
- "h4=((s4-7.038)/(7.233-7.038))*(3056-2950)+2950 #using adjacent values for \n",
- "#interpolation from table C.3 \n",
- "h5=3267 # enthalpy at 800 kPa and $00 degree celsius\n",
- "s5=7.572 # entropy at 800 kPa and $00 degree celsius\n",
- "\n",
- "s6=s5 # isentropic process\n",
- "sf=0.6491# entropy of saturated liquid @10 kPa from steam table\n",
- "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
- "\n",
- "x=(s6-sf)/(sg-sf)# quality of steam\n",
- "\n",
- "hf=192 #enthalpy of saturated liquid @10 kPa from steam table\n",
- "hg=2585 # enthalpy of saturated vapour @10 kPa from steam table\n",
- "\n",
- "h6=hf+x*(hg-hf)# enthalpy @ state 6\n",
- "h7=721 # enthalpy of saturated liquid @800 kPa from steam table\n",
- "h8=h7 # isenthalpic process\n",
- "h2=h1 # isenthalpic process\n",
- "\n",
- "m8=1 # let mass of steam =1 Kg\n",
- "m4=(h8-h2)*(m8)/(h4-h2)\n",
- "m2=m8-m4 # conservation of mass\n",
- "\n",
- "wt=h3-h4+(h5-h6)*m2 # work done by turbine\n",
- "qb=h3-h8+(h5-h4)*m2 # heat given to bolier\n",
- "\n",
- "effi=(wt)/qb # efficiency of power cycle\n",
- "# result\n",
- "print \" The Efficiency is\",round(effi,3),\" or\",round(effi*100,2),\"%\"\n",
- "\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.347 or 34.7 %\n"
- ]
- }
- ],
- "prompt_number": 28
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.8:PG-159"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "\n",
- "# for rankine cycle refer to fig 6.9\n",
- "\n",
- "effiT=0.8 # turbine efficiency\n",
- "P2=2*1000 # higher pressure converted in kPa\n",
- "P1=10 # lower pressure in kPa\n",
- "h1=192 # enthalpy at 10 kPa in kJ/kg\n",
- "h3=3690 # enthalpy of superheated steam @ 2 MPa from steam table in kJ/kg\n",
- "s3=7.702 #entropy of superheated steam @ 2 MPa from steam table in kJ/kg.K\n",
- "# state 4' is repsresented by '41'\n",
- "h2=h1 #isenthalpic process\n",
- "s41=s3 # entropy is constant\n",
- "sf=0.6491 # entropy of saturated liquid @10 kPa from steam table\n",
- "sg=8.151 # entropy of saturated vapour @10 kPa from steam table\n",
- "x=(s41-sf)/(sg-sf)# from property of pure substance\n",
- "\n",
- "hf=191.8 #enthalpy of saturated liquid @10 kPa from steam table\n",
- "hg=2584 # enthalpy of saturated vapour @10 kPa from steam table\n",
- "h41=hf+x*(hg-hf)# enthalpy @ state 41\n",
- "\n",
- "wa=effiT*(h3-h41)# turbine efficiency =(actual work)/(isentropic work)\n",
- "\n",
- "qb=h3-h2 # heat supplied\n",
- "\n",
- "effi=(wa)/qb # efficiency of power cycle\n",
- "print\" The Efficiency is\",round(effi,3),\" or\",round(effi*100,1),\"%\"\n",
- "\n",
- "h4=h3-wa # adiabatic process\n",
- "\n",
- "# now using interpolation for superheated steam @ 10 kPa\n",
- "T4=(h4-2688)*(150-100)/(2783-2688)+100\n",
- "\n",
- "print \"\\n The Temperature from interpolation comes out to be\",int(T4),\" degree celsius\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " The Efficiency is 0.286 or 28.6 %\n",
- "\n",
- " The Temperature from interpolation comes out to be 101 degree celsius\n"
- ]
- }
- ],
- "prompt_number": 32
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.9:PG-162"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#initialization of variables\n",
- "\n",
- "# refer to fig 6.10c\n",
- "\n",
- "mdot=0.6 # mass flow rate of refrigerant in kg/sec\n",
- "T1=-24 # evaporator temperature in degree celsius\n",
- "T2=39.39 # condenser temperature in degree celsius\n",
- "h1=232.8 # enthalpy of saturated R134a vapour @ -24 degree celsius from table D.1\n",
- "s1=0.9370 # entropy of saturated R134a vapour @ -24 degree celsius from table D.1\n",
- "h3=105.3 # enthalpy of saturated R134a liquid @ -24 degree celsius from table D.2\n",
- "h4=h3 # isenthalpic process\n",
- "\n",
- "# interpolating enthalpy from table D.3 @ 39.39 degree celsius\n",
- "h2=(s1-0.9066)*(280.19-268.68)/(0.9428-0.9066)+268.68\n",
- "QdotE=mdot*(h1-h4) # heat transfer rate\n",
- "WdotC=mdot*(h2-h1)# power given to compressor\n",
- "\n",
- "COP=QdotE/WdotC # coefficient of performance\n",
- "\n",
- "Hp=(WdotC/0.746)/(QdotE/3.52) #calculating Horsepower required per Ton\n",
- "\n",
- "print \"The rate of refrigeration is\",round(QdotE,2),\"kJ/s \\n \"\n",
- "print \"The coefficient of performance is\",round(COP,2),\"\\n \"\n",
- "print \"The rating in horsepower per ton is\",round(Hp,3),\" hp\\n \"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The rate of refrigeration is 76.5 kJ/s \n",
- " \n",
- "The coefficient of performance is 2.8 \n",
- " \n",
- "The rating in horsepower per ton is 1.686 hp\n",
- " \n"
- ]
- }
- ],
- "prompt_number": 37
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.10:PG-163"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "#initialization of variables\n",
- "# refer to fig 6.10c\n",
- "effi=0.8 # compressor efficiency\n",
- "mdot=0.6 # mass flow rate of refrigerant in Kg/sec\n",
- "T4=-24 # temperature of evaporator\n",
- "T2=39.39 # temperature of condensor\n",
- "T1=-20.0 # supeheating temperature\n",
- "T3=40 # subcooling temperature\n",
- "h3=106.2 # enthalpy of liquid R-134a @ 40 degree celsius from table D.1\n",
- "h4=h3 # isenthalpic process\n",
- "h1=236.5 # enthalpy of superheated R-134a @ 0.10 MPa and -20 degree celsius from table D.3\n",
- "s1=0.960 #entropy of superheated R-134a @ 0.10 MPa and -20 degree celsius from table D.3 \n",
- "\n",
- "s2dash=s1 # isentropic process\n",
- "\n",
- "# using interpolation from table D.3 @ 1.0 MPa for s2dash=0.960 \n",
- "h2dash=(s2dash-0.9428)*(291.36-280.19)/(0.9768-0.9428)+280.19\n",
- "\n",
- "h2=(h2dash-h1)/(effi)+h1 # by definition of compressor efficiency\n",
- "\n",
- "QdotE=mdot*(h1-h4)#heat transfer rate power given to compressor\n",
- " \n",
- "wdotc=mdot*(h2-h1)# power given to compressor\n",
- "\n",
- "COP=QdotE/wdotc # coefficient of performance\n",
- "\n",
- "print \"The rate of refrigeration is\",round(QdotE,1),\"kJ/s \\n \"\n",
- "\n",
- "print \"The coefficient of performance is\",round(COP,2),\"\\n \"\n",
- "# The value of Wdotc is shown wrong in the textbook. It should be multiplied by mass flow rate\n",
- " "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The rate of refrigeration is 78.2 kJ/s \n",
- " \n",
- "The coefficient of performance is 2.11 \n",
- " \n"
- ]
- }
- ],
- "prompt_number": 41
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6.11:PG-165"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# solution\n",
- "#initialization of variables\n",
- "# refer to fig 6.10c\n",
- "\n",
- "QdotC=300 #heating Load in KWh or heat rejected by condensor\n",
- "T1=-12 # evaporator temperature in degree celsius\n",
- "P2=800 # condensor pressure in kPa \n",
- "h1=240 # specific enthalpy of saturated R-134a vapour @ -12 degree celsius from table D.1\n",
- "s1=0.927 # specific entropy of saturated R-134a vapour @ -12 degree celsius from table D.1\n",
- "s2=s1 # isentropic process\n",
- "h3=93.4 #specific enthalpy of saturated R-134a liquid @ 800 kPa from tableD.2\n",
- "\n",
- "# extrapolating enthalpy from table D.2 @ 0.8 MPa for s=0.927\n",
- "h2=273.7-(0.9374-s2)*(284.4-273.7)/(0.9711-0.9374)\n",
- "\n",
- "# QdotE=mdot*(h1-h4) is heat transfer rate\n",
- "mdot=QdotC/(h2-h3)# mass flow rate\n",
- "\n",
- "WdotC=mdot*(h2-h1)# power given to compressor\n",
- "\n",
- "#part(a)\n",
- "COP=QdotC/WdotC # coefficient of performance\n",
- "print \"The coefficient of performance is\",round(COP,2),\"\\n \"\n",
- "\n",
- "#part(b)\n",
- "Cost=WdotC*0.07 # cost of electricity\n",
- "print \"The cost of electricity is $\",round(Cost,3),\"/hr \\n\"\n",
- "\n",
- "#part(c)\n",
- "costgas=(300*3600*0.50)/100000 # cost of gas\n",
- "print \"The cost of gas is $\",round(costgas,2),\"/hr \\nThus heat pump is better \"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The coefficient of performance is 5.82 \n",
- " \n",
- "The cost of electricity is $ 3.607 /hr \n",
- "\n",
- "The cost of gas is $ 5.4 /hr \n",
- "Thus heat pump is better \n"
- ]
- }
- ],
- "prompt_number": 66
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": [],
- "prompt_number": 61
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file