{ "metadata": { "name": "", "signature": "sha256:7f2ac1f73c638662f50d765235be56ca14cf295f3e77d6b32e206a78e4a459fc" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 9 : Properties of Pure Substances" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.1 Page No : 295" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "tsat = 179.91; # celsius\n", "vf = 0.001127; # m**3/kg\n", "vg = 0.19444; #m**3/kg\n", "\n", "# Calculation\n", "vfg = vg-vf;\n", "sf = 2.1387;\n", "sg = 6.5865;\n", "sfg = sg-sf;\n", "\n", "# Results\n", "print \"At 1 Mpa saturation temperature is\",tsat,\"degree\"\n", "print \"Changes in specific volume is\",vfg,\"m3/kg\"\n", "print \"Change in entropy during evaporation is\",sfg,\"kJ/kg K\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "At 1 Mpa saturation temperature is 179.91 degree\n", "Changes in specific volume is 0.193313 m3/kg\n", "Change in entropy during evaporation is 4.4478 kJ/kg K\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.3 Page No : 295" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "v = 0.09\n", "vf = 0.001177\n", "vg = 0.09963;\n", "\n", "# Calculation\n", "x = (v-vf)/(vg-vf);\n", "hf = 908.79; hfg = 1890.7;\n", "sf = 2.4474; sfg = 3.8935;\n", "h = hf+(x*hfg);\n", "s = sf+(x*sfg);\n", "\n", "# Results\n", "print \"The enthalpy and entropy of the system are %.4f and %.2f kJ/kg and kJ/kg K respectively\"%(s,h)\n", "\n", "# rounding off error. please check." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The enthalpy and entropy of the system are 5.9601 and 2614.55 kJ/kg and kJ/kg K respectively\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.4 Page No : 296" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from numpy import interp\n", "\n", "# Variables\n", "# for T = 350 degree\n", "T1 = 350; \n", "v1 = 0.2003; \n", "h1 = 3149.5; \n", "s1 = 7.1369;\n", "# for T = 400 degree\n", "T2 = 400; \n", "v2 = 0.2178; \n", "h2 = 3257.5; \n", "s2 = 7.3026;\n", "\n", "# Calculation\n", "# Interpolation for T = 380;\n", "T = [T1 ,T2];\n", "v = [v1 ,v2];\n", "h = [h1 ,h2];\n", "s = [s1 ,s2];\n", "v3 = interp(380,T,v);\n", "h3 = interp(380,T,h);\n", "s3 = interp(380,T,s);\n", "\n", "# Results\n", "print \"The entropy, enthalpy and volume of stem at 1.4MPa and 380 degree is %.4f kJ/Kg, %.1f kJ/Kg, %.4f kJ/Kg respectively\"%(s3,h3,v3)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The entropy, enthalpy and volume of stem at 1.4MPa and 380 degree is 7.2363 kJ/Kg, 3214.3 kJ/Kg, 0.2108 kJ/Kg respectively\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.5 Page No : 296" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "Psat = 3.973e06;\n", "vf = 0.0012512\n", "vg = 0.05013;\n", "hf = 1085.36\n", "hfg = 1716.2;\n", "sf = 2.7927\n", "sfg = 3.2802;\n", "mf = 9 # liquid in kg\n", "V = 0.04; # volume\n", "\n", "# Calculation\n", "Vf = mf*vf;\n", "Vg = V-Vf;\n", "mg = Vg/vg;\n", "m = mf+mg;\n", "x = mg/m;\n", "v = vf+x*(vg-vf);\n", "h = hf+x*hfg;\n", "s = sf+(x*sfg);\n", "u = h-Psat*v*1e-03;\n", "\n", "# at T = 250\n", "uf = 1080.39\n", "ufg = 1522;\n", "u_ = uf+x*ufg;\n", "\n", "# Results\n", "print \"The pressure is %.3f Mpa\"%(Psat/1000000)\n", "print \"The mass is %.3f Kg\"%m\n", "print \"Specific volume is %.5f m3/Kg\"%v\n", "print \"Enthalpy is %.2f kJ/Kg\"%h\n", "print \"The entropy is %.4f kJ/Kg K\"%s\n", "print \"The interal energy is %.2f kJ/Kg\"%u\n", "print \"u = %.2f kJ/kg\"%u_ #incorrect answer in the textbook\n", "\n", "# rounding off error. please check. book answers may wrong." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The pressure is 3.973 Mpa\n", "The mass is 9.573 Kg\n", "Specific volume is 0.00418 m3/Kg\n", "Enthalpy is 1188.13 kJ/Kg\n", "The entropy is 2.9891 kJ/Kg K\n", "The interal energy is 1171.53 kJ/Kg\n", "u = 1171.53 kJ/kg\n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.6 Page No : 297" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "from numpy import interp\n", "\n", "# Part (a)\n", "vg1_ = 0.8919\n", "T1_ = 120;\n", "vg2_ = 0.77076\n", "T2_ = 125;\n", "vg_ = [vg1_, vg2_]\n", "T_ = [T1_, T2_];\n", "v1 = 0.7964;\n", "h1 = 2967.6;\n", "P1 = 0.3e03; \t\t\t# in Kpa\n", "\n", "# Calculation and Results\n", "T1 = interp(v1,vg_,T_);\n", "print \"The steam become saturated at \",T1,\"degree\"\n", "\n", "# Part (b)\n", "vf = 0.001029\n", "vg = 3.407;\n", "hf = 334.91\n", "hfg = 2308.8;\n", "Psat = 47.39; \t\t\t# In kPa\n", "v2 = v1;\n", "x2 = (v1-vf)/(vg-vf);\n", "h2 = hf+x2*hfg;\n", "P2 = Psat;\n", "Q12 = (h2-h1)+v1*(P1-P2);\n", "\n", "print \"The quality factor at t=80 degree is %.4f\"%x2\n", "print \"The heat transfered per kg of steam in cooling from 250 degree to 80 degree %.2f kJ/Kg\"%Q12\n", "\n", "# rounding off error. interp function gives slightly different answer." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The steam become saturated at 125.0 degree\n", "The quality factor at t=80 degree is 0.2335\n", "The heat transfered per kg of steam in cooling from 250 degree to 80 degree -1892.35 kJ/Kg\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.7 Page No : 298" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Variables\n", "# At T = 40 degree\n", "Psat = 7.384e06;\n", "sf = 0.5725\n", "sfg = 7.6845;\n", "hf = 167.57\n", "hfg = 2406.7;\n", "s1 = 6.9189\n", "h1 = 3037.6;\n", "\n", "# Calculation\n", "x2 = round((s1-sf)/sfg,3) ;\n", "h2 = hf+(x2*hfg);\n", "W = h1-h2;\n", "\n", "\n", "# Results\n", "print \"The ideal work output of the turbine is %.2f kJ/Kg\"%W\n", "\n", "# rounding off error. please check using calculator." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The ideal work output of the turbine is 882.10 kJ/Kg\n" ] } ], "prompt_number": 22 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.8 Page No : 299" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "from numpy import interp\n", "\n", "# Variables\n", "w3 = 2.3 #adiabatic mixing\n", "w1 = 1.0;\n", "w2 = w3-w1;\n", "h1 = 2950.0;\n", "\n", "# At 0.8MPa, 0.95 dry\n", "x = 0.95;\n", "hf = 721.11\n", "hfg = 2048;\n", "\n", "# Calculation\n", "h2 = hf + (x*hfg);\n", "h3 = ((w1*h1)+(w2*h2))/w3;\n", "# Interpolation\n", "H = [2769.1, 2839.3];\n", "T = [170.43, 200];\n", "t3 = interp(2790,H,T);\n", "s3 = 6.7087; \n", "s4 = s3;\n", "x4 = (s3-1.7766)/5.1193;\n", "h4 = 604.74+(x4*2133.8);\n", "V4 = math.sqrt(2000*(h3-h4));\n", "\n", "# Results\n", "print \"The condition of superheat after mixing %.2f degree\"%(t3-T[0])\n", "print \"The velocity of steam leaving the nozzle is %.1f m/sec\"%V4\n", "\n", "# rounding off error. please check." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The condition of superheat after mixing 8.80 degree\n", "The velocity of steam leaving the nozzle is 508.7 m/sec\n" ] } ], "prompt_number": 25 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.9 Page No : 300" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "h2 = 2716.2\n", "hf = 844.89\n", "hfg = 1947.3;\n", "\n", "# Calculation\n", "x1 = (h2-hf)/hfg;\n", "h3 = 2685.5;\n", "x4 = (h3-hf)/hfg;\n", "\n", "# Results\n", "print \"The quality of steam in pipe line is %.3f\"%x1\n", "print \"Maximum moisture is %.2f %%\"%(100-(x4*100))\n", "\n", "# rounding off error." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The quality of steam in pipe line is 0.961\n", "Maximum moisture is 5.48 %\n" ] } ], "prompt_number": 26 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.10 Page No : 301" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "# At 0.1Mpa, 110 degree\n", "h2 = 2696.2\n", "hf = 844.89\n", "hfg = 1947.3;\n", "\n", "# Calculation\n", "x2 = (h2-hf)/hfg;\n", "vf = 0.001023; \t\t\t# at T = 70 degree\n", "V = 0.000150; \t\t\t# In m3\n", "m1 = V/vf;\n", "m2 = 3.24;\n", "x1 = (x2*m2)/(m1+m2);\n", "\n", "# Results\n", "print \"The quality of the steam in the pipe line is %.3f\"%x1\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The quality of the steam in the pipe line is 0.910\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.11 Page No : 302" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "# P = 1MPa\n", "vf = 0.001127\n", "vg = 0.1944;\n", "hg = 2778.1\n", "uf = 761.68;\n", "ug = 2583.6\n", "ufg = 1822;\n", "# Initial anf final mass\n", "Vis = 5.\n", "Viw = 5.;\n", "Vfs = 6.\n", "Vfw = 4.\n", "\n", "# Calculation\n", "ms = ((Viw/vf)+(Vis/vg)) - ((Vfw/vf)+(Vfs/vg)) ;\n", "U1 = ((Viw*uf/vf)+(Vis*ug/vg));\n", "Uf = ((Vfw*uf/vf)+(Vfs*ug/vg));\n", "Q = Uf-U1+(ms*hg)\n", "\n", "# Results\n", "print \"The heat transfer during the process is\",round(Q/1000,3),\"kJ\"\n", "\n", "# It seems book answer is wrong. please check using calculator." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The heat transfer during the process is 1788.192 kJ\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.12 Page No : 303" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\n", "# Variables\n", "m = 0.02\n", "d = 0.28\n", "l = 0.305;\n", "P1 = 0.6e06\n", "P2 = 0.12e06;\n", "\n", "# Calculation and Results\n", "# At 0.6MPa, t = 200 degree\n", "v1 = 0.352\n", "h1 = 2850.1;\n", "V1 = m*v1;\n", "Vd = (math.pi/4)*d**2*l;\n", "V2 = V1+Vd ; \n", "n = math.log(P1/P2)/math.log(V2/V1);\n", "W12 = ((P1*V1)-(P2*V2))/(n-1);\n", "\n", "print \"The value of n is %.2f\"%n\n", "print \"The work done by the steam is %.1f kJ\"%(W12/1000)\n", "\n", "v2 = V2/m;\n", "vf = 0.0010476\n", "vfg = 1.4271;\n", "x2 = (v2-vf)/vfg ;\n", "# At 0.12MPa\n", "uf = 439.3\n", "ug = 2512.0;\n", "u2 = uf + (x2*(ug-uf));\n", "u1 = h1-(P1*v1*1e-03);\n", "Q12 = m*(u2-u1)+ (W12/1000);\n", "\n", "print \"The heat transfer is %.3f kJ\"%Q12\n", "\n", "# rounding off error. please check." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of n is 1.24\n", "The work done by the steam is 4.7 kJ\n", "The heat transfer is -1.801 kJ\n" ] } ], "prompt_number": 32 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.13 Page No : 305" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "x1 = 1.\n", "x2 = 0.8;\n", "# at 0.2MPa\n", "vg = 0.8857\n", "v1 = vg\n", "hg = 2706.7\n", "h1 = hg; \n", "m1 = 5.\n", "V1 = m1*v1;\n", "\n", "# Calculation\n", "# at 0.5MPa\n", "m2 = 10; \n", "hf = 640.23\n", "hfg = 2108.5\n", "vf = 0.001093\n", "vfg = 0.3749;\n", "v2 = vf+(x2*vfg);\n", "V2 = m2*v2;\n", "\n", "Vm = V1+V2;\n", "m = m1+m2;\n", "vm = Vm/m;\n", "u1 = h1;\n", "h2 = hf+(x2*hfg);\n", "u2 = h2;\n", "m3 = m;\n", "h3 = ((m1*u1)+(m2*u2))/m3;\n", "u3 = h3; \n", "v3 = vm;\n", "# From mollier diagram\n", "x3 = 0.870\n", "p3 = 3.5\n", "s3 = 6.29;\n", "s1 = 7.1271;\n", "sf = 1.8607\n", "sfg = 4.9606;\n", "s2 = sf+(x2*sfg);\n", "E = m3*s3-((m1*s1)+(m2*s2));\n", "\n", "# Results\n", "print \"Final pressure is \",p3,\"bar\"\n", "print \"Steam quality is\",x3\n", "print \"Entropy change during the process is %.2f kJ/K\"%E\n", "\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Final pressure is 3.5 bar\n", "Steam quality is 0.87\n", "Entropy change during the process is 0.42 kJ/K\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.14 Page No : 306" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "# At 6 MPa, 400 degree\n", "h1 = 3177.2\n", "s1 = 6.5408;\n", "\n", "# At 20 degree\n", "h0= 83.96\n", "s0 = 0.2966;\n", "T0 = 293.\n", "\n", "# Calculation\n", "f1 = (h1-h0)-T0*(s1-s0);\n", "# By interpolation \n", "t2 = 273. + 393;\n", "s2 = 6.63;\n", "h2 = h1;\n", "f2 = (h2-h0)-T0*(s2-s0);\n", "df = f1-f2;\n", "x3s = (s2-1.5301)/(7.1271-1.5301);\n", "h3s = 504.7+(x3s*2201.9);\n", "eis = 0.82;\n", "h3 = h2-eis*(h1-h3s);\n", "x3 = (h3-504.7)/2201.7;\n", "s3 = 1.5301+(x3*5.597);\n", "f3 = (h3-h0)-T0*(s3-s0);\n", "\n", "# Results\n", "print \"The availability of the steam before the throttle valve %.1f kJ/Kg\"%f1\n", "print \"The availability of the steam after the throttle valve %.2f Kj/Kg\"%f2\n", "print \"The availability of the steam at the turbine exhaust %.2f kJ/Kg\"%f3\n", "print \"The specific work output from the turbine is %.1f kJ/Kg\"%(h2-h3)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The availability of the steam before the throttle valve 1263.7 kJ/Kg\n", "The availability of the steam after the throttle valve 1237.55 Kj/Kg\n", "The availability of the steam at the turbine exhaust 601.85 kJ/Kg\n", "The specific work output from the turbine is 546.3 kJ/Kg\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.15 Page No : 308" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "# At 25 bar, 350 degree\n", "h1 = 3125.87\n", "s1 = 6.8481;\n", "# 30 degree\n", "h0 = 125.79\n", "s0 = 0.4369;\n", "h2 = 2865.5\n", "s2 = 7.3115;\n", "# At 0.2 bar 0.95 dry\n", "hf = 251.4\n", "hfg = 2358.3;\n", "sf = 0.8320\n", "sg = 7.0765;\n", "\n", "# Calculation\n", "h3 = hf+0.92*hfg;\n", "s3 = sf+(0.92*sg);\n", "# Part (a)\n", "T0 = 303;\n", "f1 = (h1-h0)-(T0*(s1-s0));\n", "f2 = (h2-h0)-(T0*(s2-s0));\n", "f3 = (h3-h0)-(T0*(s3-s0));\n", "\n", "# Results\n", "print \"Availability of steam entering at state 1 is %.2f kJ/Kg\"%f1\n", "print \"Availability of steam leaving at state 2 is %.2f kJ/Kg\"%f2\n", "print \"Availability of steam leaving at state 3 is %.2f kJ/Kg\"%f3\n", "\n", "# Part (b)\n", "m2m1 = 0.25\n", "m3m1 = 0.75;\n", "Wrev = f1-(m2m1*f2)-(m3m1*f3);\n", "print \"Maximum work is %.2f kJ/Kg\"%Wrev\n", "\n", "# Part (c)\n", "w1 = 600.\n", "w2 = 150.\n", "w3 = 450.;\n", "Q = -10.*3600; \t\t\t# For 1 hour\n", "I = T0*(w2*s2+w3*s3-w1*s1)-Q;\n", "print \"Irreversibility is %.2f MJ/h\"%(I/1000)\n", "\n", "# rounding off error. please check using calcultor." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Availability of steam entering at state 1 is 1057.49 kJ/Kg\n", "Availability of steam leaving at state 2 is 656.71 kJ/Kg\n", "Availability of steam leaving at state 3 is 202.89 kJ/Kg\n", "Maximum work is 741.15 kJ/Kg\n", "Irreversibility is 124.46 MJ/h\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.16 Page No : 309" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "# At dead state of 1 bar, 300K\n", "u0 = 113.1\n", "h0 = 113.2;\n", "v0 = 0.001005\n", "s0 = 0.0395;\n", "T0 = 300.\n", "P0 = 100.;\n", "\n", "# Calculation and Results\n", "K = h0-(T0*s0);\n", "# Part (a)\n", "u = 376.9\n", "h = 377; \n", "v = 0.001035\n", "s = 1.193;\n", "m = 3 \n", "a = h - 300 * s\n", "fi = m*(a - (-5.3)) \t\t\t# As P = P0 = 1 bar\n", "print \"Energy of system in Part (a) is\",fi,\"kJ\"\n", "\n", "# Part (b)\n", "u = 3099.8\n", "h = 3446.3\n", "v = 0.08637\n", "s = 7.090; \t\t\t# At P = 4 Mpa, t = 500 degree\n", "m = 0.2;\n", "b = u +100* v - 300 * s\n", "fib = m*(b-(-5.3));\n", "print \"Energy of system in Part (b) is\",fib,\"kJ\"\n", "\n", "# Part (c)\n", "m = 0.4;\n", "x = 0.85; \t\t\t# Quality\n", "u = 192+x*2245;\n", "h = 192+x*2392;\n", "s = 0.649+x*7.499;\n", "v = 0.001010+x*14.67;\n", "c = round(u + 100*v - 300*s,1)\n", "fic = m*(c - (-5.3));\n", "print \"Energy of system in Part (c) is\",round(fic,1),\"kJ\"\n", "\n", "# Part (d)\n", "m = 3;\n", "h = -354.1; s = -1.298; \t\t\t# at 1000kPa, -10 degree\n", "fid = m*(h-h0-T0*(s-s0))# ((h-h0)-T0*(s-s0));\n", "print \"Energy of system in Part (d) is\",fid,\"kJ\"\n", "\n", "# book answer is wrong. please check." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Energy of system in Part (a) is 73.2 kJ\n", "Energy of system in Part (b) is 197.3474 kJ\n", "Energy of system in Part (c) is 498.3 kJ\n", "Energy of system in Part (d) is -198.15 kJ\n" ] } ], "prompt_number": 64 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.17 Page No : 310" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "# Given\n", "th1 = 90.+273;\n", "tc1 = 25.+273;\n", "tc2 = 50.+273;\n", "mc = 1.\n", "T0 = 300.;\n", "th2p = 60.+273; \t\t\t# Parallel\n", "th2c = 35.+273; \t\t\t# Counter\n", "\n", "# Calculation\n", "mhp = (tc2-tc1)/(th1-th2p); \t\t\t# Parallel\n", "mhc = (tc2-tc1)/(th1-th2c); \t\t\t# Counter\n", "h0 = 113.2\n", "s0 = 0.395\n", "T0 = 300; \t\t\t# At 300 K\n", "h1 = 376.92\n", "s1 = 1.1925; \t\t\t# At 90 degree\n", "af1 = mhp*((h1-h0)-T0*(s1-s0));\n", "\n", "# Parallel Flow\n", "h2 = 251.13; s2 =0.8312; \t\t\t# At 60 degree\n", "h3 = 104.89; s3 = 0.3674; \t\t\t# At 25 degree\n", "h4 = 209.33; s4 = 0.7038; \t\t\t# At 50 degree\n", "REG = mc*((h4-h3)-T0*(s4-s3)); \t\t\t# Rate of energy gain\n", "REL = mhp*((h1-h2)-T0*(s1-s2)); \t\t\t# Rate of energy loss\n", "Ia = REL-REG; \t\t\t# Energy destruction\n", "n2a = REG/REL; \t\t\t# Second law efficiency\n", "\n", "# Results\n", "print (\"In parallel flow\")\n", "print \"The rate of irreversibility is\",Ia,\"kW\"\n", "print \"The Second law efficiency is %.2f %%\"%(n2a*100)\n", "\n", "# Counter flow\n", "h2 = 146.68\n", "s2 = 0.5053; \t\t\t# At 35 degree\n", "REG_b = REG; \t\t\t# Rate of energy gain by hot water is same in both flows\n", "REL_b = mhc*((h1-h2)-T0*(s1-s2));\n", "Ib = REL_b-REG_b; \t\t\t# Energy destruction\n", "n2b = REG_b/REL_b; \t\t\t# Second law efficiency\n", "\n", "print (\"In Counter flow\")\n", "print \"The rate of irreversibility is %.2f kW\"%Ib\n", "print \"The Second law efficiency is %.2f %%\"%(n2b*100)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "In parallel flow\n", "The rate of irreversibility is 10.98 kW\n", "The Second law efficiency is 24.28 %\n", "In Counter flow\n", "The rate of irreversibility is 7.43 kW\n", "The Second law efficiency is 32.16 %\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 9.18 Page No : 312" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "m = 50 ; \t\t\t# in kg/h\n", "Th = 23.+273; \t\t\t# Home temperature\n", "\n", "# State 1\n", "T1 = 150.+273;\n", "h1 = 2746.4;\n", "s1 = 6.8387;\n", "\n", "# State 2\n", "h2 = 419.0;\n", "s2 = 1.3071;\n", "T0 = 318;\n", "\n", "# Calculation\n", "b1 = h1-(T0*s1);\n", "b2 = h2-(T0*s2);\n", "Q_max = m*(b1-b2)/(T0/Th-1);\n", "\n", "# Results\n", "print \"The maximum cooling rate is %.0f kW\"%(Q_max/3600)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The maximum cooling rate is 106 kW\n" ] } ], "prompt_number": 15 } ], "metadata": {} } ] }