{ "metadata": { "name": "", "signature": "sha256:498eddefb3635fb861c09bdd97718d2b72fb04f4d3b083cedbf9f6de28a92b4e" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter10:IRREVERSIBILITY AND AVAILABILITY" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex10.1:pg-386" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#example 1\n", "#Calculating reversible work\n", "#Form the Steam Tables,the inlet and the exit state properties are \n", "\n", "hi=171.95 #initial specific heat of enthalpy in kJ/kg\n", "si=0.5705 #initial specific entropy in kJ/kg-K\n", "se=2.1341 #final specific entropy in kJ/kg-K\n", "he=765.34 #final specific heat of enthalpy in kJ/kg-K\n", "m=5 #mass flow rate of feedwater in kg/s\n", "q1=900/m #heat added by one of the sources in kJ/kg\n", "q2=he-hi-q1 #second heat transfer in kJ/kg\n", "To=25+273.3 #Temp. of the surroundings in K\n", "T1=100+273.2 #temp. of reservoir of one of the source in K\n", "T2=200+273.2 #temp. of reservoir of second source in K\n", "wrev=To*(se-si)-(he-hi)+q1*(1-To/T1)+q2*(1-To/T2) #reversible work in kJ/kg\n", "print\"\\n Hence, the irreversibility is\",round(wrev),\"kJ/kg\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", " Hence, the irreversibility is 62.0 kJ/kg\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex10.2:pg-387" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#example 2\n", "#Calculating reversible work\n", "#Form the Steam Tables,the inlet and the exit state properties are\n", "\n", "hi=298.6 #initial specific heat of enthalpy in kJ/kg\n", "si=6.8631 #initial specific entropy in kJ/kg-K\n", "se=7.4664 #final specific entropy in kJ/kg-K\n", "he=544.7 #final specific heat of enthalpy in kJ/kg-K\n", "q=-50 #heat lost to surroundings in kJ/kg\n", "w=hi-he+q #work in kJ/kg\n", "To=25+273.2 #Temp. of the surroundings in K\n", "P1=100 #Pressure of ambient air in kPa\n", "P2=1000 #Final pressure of air after compression in kPa\n", "R=0.287 #Universal gas constant in kJ/kg-K\n", "wrev=To*(se-si-R*log(P2/P1))-(he-hi)+q*(1-To/To)#reversible work for the given change of state in kJ/kg\n", "i=wrev-w #irreversibility in kJ/kg\n", "print\"\\n Hence,the irreversibility is\",round(i,1),\"kJ/kg\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", " Hence,the irreversibility is 32.8 kJ/kg\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex10.2E:pg-388" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#example 2E\n", "#Calculating reversible work\n", "#Form the Steam Tables,the inlet and the exit state properties are\n", "\n", "hi=129.18 #initial specific heat of enthalpy in Btu/lbm\n", "si=1.6405 #initial specific entropy in Btu/lbm R\n", "se=1.7803 #final specific entropy in Btu/lbm R\n", "he=231.20 #final specific heat of enthalpy in Btu/lbm\n", "q=-22 #heat lost to surroundings in Btu/lbm\n", "w=hi-he+q #work in Btu/lbm\n", "To=539.7 #Temp. of the surroundings in R\n", "P1=14.7 #Pressure of ambient air in lbf/in^2\n", "P2=150 #Final pressure of air after compression in lbf/in^2\n", "R=0.06855 #Universal gas constant in Btu/lbm R\n", "wrev=To*(se-si-R*log(P2/P1))-(he-hi)+q*(1-To/To)#reversible work for the given change of state in Btu/lbm\n", "i=wrev-w #irreversibility in Btu/lbm\n", "print\"\\n Hence,the irreversibility is\",round(i,2),\"Btu/lbm\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", " Hence,the irreversibility is 11.52 Btu/lbm\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex10.3:pg-390" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#example 3\n", "#Calculating reversible work and irreversibility\n", "#Form the Steam Tables at state 1\n", "\n", "u1=1243.5 #initial specific internal energy in kJ/kg\n", "s1=4.4819 #initial specific entropy in kJ/kg-K\n", "v1=28.895 #initial specific volume in m^3/kg\n", "v2=2*v1 #final specific volume in kg/m^3\n", "u2=u1 #initial specific internal energy in kJ/kg\n", "#These two independent properties, v2 and u2 , fix state 2.The final temp. is calculated by interplotation using the data for T2=5C and v2,x=0/3928 and u=948.5 kJ/kg. For T2=10C and v2, x=0.5433 and u=1317 kJ/kg\n", "T2=9.1+273.2 #final temp. in K\n", "x2=0.513 #quality in final state\n", "s2=4.644 #final specific entropy in kJ/kg\n", "V1=1 #volume of part of A in m^3\n", "m=V1/v1 #mass flow rate in kg/s\n", "To=20+273.2 #Room temperature in K\n", "Wrev=To*m*(s2-s1) #reversible work in kJ\n", "I=Wrev #irreversibility of the process\n", "print\"\\n The irreversibility is\",round(I,3),\"kJ\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", " The irreversibility is 1.645 kJ\n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex10.4:pg-391" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#example 4\n", "#calculating the final mass in the tank and the irreversibility in the process\n", "#From the ammonia tables, the initial and line state properties are\n", "\n", "V=1#volume of the rigid tank in m^3\n", "v1=0.6995#initial specific volume in m^3/kg\n", "u1=1369.5#initial specific internal energy in kJ/kg\n", "s1=5.927#initial specific entropy in kJ/kg K\n", "h1=134.41#initial specific heat of enthalpy in kJ/kg\n", "si=0.5408#in kJ/kg K\n", "m1=V/v1#initial mass in kg\n", "x2=0.007182\n", "v2=(0.001534 + x2 * 0.41684)#in m^3/kg\n", "v2=round(v2,7)\n", "s2=0.5762#final specific entropy in kJ/kg\n", "m2=V/v2#the final mass in kg\n", "mi=m2-m1#in kg\n", "mi=round(mi,3)\n", "T=293.15# in K\n", "S2gen=(m2*s2-m1*s1-mi*si)#in kJ/kg\n", "S2gen=round(S2gen,3)\n", "Icv=T*S2gen#in kJ\n", "print\"\\n the final mass is \",round(m2,2),\"kg\"\n", "print\"\\n the irreversiblity is\",round(Icv,3),\"kJ\"\n", "\n", "\n", "\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", " the final mass is 220.86 kg\n", "\n", " the irreversiblity is 34.885 kJ\n" ] } ], "prompt_number": 31 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex10.5:pg-396" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#example 5\n", "#calculating the availability per kilogram of the steam entering and at both points at which steam leaves the turbine,\n", "#the isentropic efficiency,the second-law efficiency for this process\n", "#For the ideal isentropic turbine,\n", "\n", "h0=104.9#in kJ/kg\n", "s0=0.3674#entropy at state0 in kJ/kgK\n", "m1=30#mass at state1 in kg\n", "phi1=1109.6#in kJ/kg\n", "h1=3115.3#enthalpy at state1 in kJ/kg\n", "m2=5#mass at state2 in kg\n", "phi2=755.3#in kJ/kg\n", "h2=2855.4#enthalpy at state2 For the actual turbine in kJ/kg\n", "m3=25#mass at state3 in kg\n", "phi3=195.0#in kJ/kg\n", "S2s=6.7428#entropy in kJ/kg K at state2\n", "x2s=(6.7428-1.8606)/4.906# dryness factor at state2 \n", "x2s=round(x2s,4)\n", "h2s=640.2+(x2s*2108.5)#entropy at state2 for the ideal isentropic turbine\n", "S3s=6.7428#entropy in kJ/kg K\n", "x3s=(6.7428-0.7549)/7.2536# dryness factor at state3\n", "x3s=round(x3s,4)\n", "h3s=225.9+(x3s*2373.1)#enthalpy in kJ/kg\n", "h3=2361.8#enthalpy at state3 For the actual turbine in kJ/kg\n", "Ws=(m1*h1-m2*h2s-m3*h3s)#workdone for the ideal isentropic turbine in kW\n", "W=(m1*h1-m2*h2-m3*h3)#workdone For the actual turbine in kW\n", "W2=(m1*phi1-m2*phi2-m3*phi3)#workdone for the second ideal isentropic turbine in kW\n", "eta1=W/Ws#The isentropic efficiency\n", "eta2=W/W2#he second-law efficiency\n", "print\"\\n the workdone for the ideal isentropic turbine is \",round(Ws),\"kW\"\n", "print\"\\n the workdone for the actual turbine is \",round(W),\"kg\"\n", "print\"\\n the workdone for the second ideal isentropic turbine is \",round(W2),\"kW\"\n", "print\"\\n the isentropic efficiency is \",round(eta1,3)\n", "print\"\\n the second-law efficiency is \",round(eta2,3)\n", "#The answer of the x2s in the book is wrong.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", " the workdone for the ideal isentropic turbine is 25145.0 kW\n", "\n", " the workdone for the actual turbine is 20137.0 kg\n", "\n", " the workdone for the second ideal isentropic turbine is 24637.0 kW\n", "\n", " the isentropic efficiency is 0.801\n", "\n", " the second-law efficiency is 0.817\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex10.6:pg-399" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#example 6\n", "#calculate the second-law efficiency for this process and the irreversibility per kilogram of water evaporated\n", "\n", "he1=2950#enthalpy in kJ/kg\n", "hi1=632.2#enthalpy in kJ/kg\n", "he2=599.5#enthalpy in kJ/kg\n", "hi2=1199#enthalpy in kJ/kg\n", "#r=mp/mh\n", "r=(he1-hi1)/(hi2-he2)#the ratio of the mass flow of water\n", "T0=298.15#in K\n", "S1=1.8418#entropy at state1 in kJ/kgK\n", "S2=7.0384#entropy at state2 in kJ/kgK\n", "S3=7.8751#entropy at state3 in kJ/kgK\n", "S4=7.3173#entropy at state4 in kJ/kgK\n", "#phi=phi2-phi1\n", "phi=(he1-hi1)-T0*(S2-S1)#The increase in availability of the water is, per kilogram of water in kJ/kg\n", "#w=(mp2/mh2)*(phi3-phi4)\n", "w=r*((hi2-he2)-T0*(S3-S4))#The decrease in availability of the products, per kilogram of water in kJ/kg\n", "eta=phi/w#the second-law efficiency\n", "#i=I/mh\n", "i=phi+w#the process irreversibility per kilogram of water in kJ/kg\n", "#e=I2/mh2\n", "e=(T0*(S2-S1)+(T0*r*(S4-S3)))#The total irreversibility in kJ/kg\n", "print\"\\n the second law efficiency is \",round(eta,3)\n", "print\"\\n the total irreversibility is \",round(e,2),\"kJ/kg\"\n", "\n", "\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", " the second law efficiency is 0.459\n", "\n", " the total irreversibility is 906.38 kJ/kg\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex10.7:pg-403" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#example 7\n", "#calculate the heater\u2019s second-law efficiency\n", "\n", "h0=104.87#enthalpy in kJ/kg\n", "s0=0.3673#entropy in kJ/kg K\n", "h1=171.97#in kJ/kg\n", "he=765.25#in kJ/kg\n", "s1=0.5705#in kJ/kg K\n", "T0=298.2#in C\n", "se=2.1341#in kJ/kg K\n", "shi1=(h1-h0)-T0*(s1-s0)#in kJ/kg\n", "shie=(he-h0)-T0*(se-s0)#in kJ/kg\n", "T1=373.2#in C\n", "T2=473.2#in C\n", "q1=180#heat at state1 in kJ\n", "q2=413.28#heat at state2 in kJ\n", "phisource1=(1-T0/T1)*q1#in kJ/kg\n", "phisource2=(1-T0/T2)*q2#in kJ/kg\n", "phisource=phisource1+phisource2#in kJ/kg\n", "Icv=phisource+shi1-shie#in kJ/kg\n", "eta2law=(phisource-Icv)/phisource#the heater\u2019s second-law efficiency\n", "print\"\\n the heater\u2019s second-law efficiency is\",round(eta2law,2)\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", " the heater\u2019s second-law efficiency is 0.67\n" ] } ], "prompt_number": 53 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex10.8:pg-404" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#example 8\n", "#calculate any heat transfer downward, and follow the flux of exergy, and find the exergy destruction in the process.\n", "Qout=500.0#in W\n", "Qin=500.0#in W\n", "Tsurf=1000.0#in K\n", "T0=298.15#in K\n", "Sgen1=Qout/Tsurf#in W/K\n", "phides=(T0*Sgen1)#in W\n", "phitrans=((1-T0/Tsurf)*Qout)#in W\n", "Ttop=500#in K\n", "Sgen2=(Qout/Ttop)-(Qin/Tsurf)#in W/K\n", "Te=phitrans-phides-((1-T0/Ttop)*Qout)#the exergy destruction in the process\n", "print\"\\n the exergy destruction in the process is\",round(Te)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", " the exergy destruction in the process is 0.0\n" ] } ], "prompt_number": 77 } ], "metadata": {} } ] }