{ "metadata": { "name": "Chapter 11" }, "nbformat": 2, "worksheets": [ { "cells": [ { "cell_type": "markdown", "source": [ "#Chapter 11 :- Thermodynamic Relations" ] }, { "cell_type": "markdown", "source": [ "##Example 11.1 Page no-491" ] }, { "cell_type": "code", "collapsed": false, "input": [ "", "# Given:-", "m = 4.00 # mass of carbon monoxide in kg", "T = 223.00 # temperature of carbon monoxide in kelvin", "D = 0.2 # inner diameter of cylinder in meter", "L = 1.00 # length of the cylinder in meter", "pi=3.14", "# Analysis", "M = 28.00 # molar mass in kg/kmol", "# Calculations", "V = (pi*D**2.00/4.00)*L # volume occupied by the gas in m^3", "vbar = M*(V/m) # The molar specific volume in m^3/kmol", "", "# Part(a)", "# From Table A-1 for CO", "Tc = 133 # in kelvin", "Pc = 35 # in bar", "Tr = T/Tc # reduced temperature", "Rbar = 8314 # universal gas constant in N.m/kmol.K", "Z = 0.9", "# Calculations", "vrdash = (vbar*Pc*10**5)/(Rbar*Tc) # pseudoreduced specific volume", "p = (Z*Rbar*T/vbar)*10**-5 # in bar", "# Result", "print '-> part(a)the pressure in bar is: '", "print round(p,2)", "", "# Part(b)", "# The ideal gas equation of state gives", "# Calculations", "p = (Rbar*T/vbar)/10**5 # in bar", "# Result", "print '-> Part(b)the pressure in bar is: '", "print round(p,2)", "", "# Part(c)", "# For carbon monoxide, the van der Waals constants a and b can be read directly from Table A-24", "a = 1.474 # in (m^3/kmol)^2", "b = 0.0395 # in m^3/kmol", "# Calculations", "p = (Rbar*T/(vbar-b))/10**5 - a/vbar**2", "# Result", "print '-> Part(c)the pressure in bars is: '", "print round(p,2)", "", "# Part(d)", "# For carbon monoxide, the Redlich\u2013Kwong constants can be read directly from Table A-24", "a = 17.22 # in m^6*K^.5/kmol^2", "b = 0.02737 # in m^3/kmol", "# Calculations", "p = (Rbar*T/(vbar-b))/10**5 - a/(vbar*(vbar+b)*T**.5)", "# Result", "print '-> Part(d)the pressure in bar is: '", "print round(p,2)" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "-> part(a)the pressure in bar is: ", "75.92", "-> Part(b)the pressure in bar is: ", "84.35", "-> Part(c)the pressure in bars is: ", "72.32", "-> Part(d)the pressure in bar is: ", "75.12" ] } ], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "%matplotlib inline" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "", "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].", "For more information, type 'help(pylab)'." ] } ], "prompt_number": 2 }, { "cell_type": "markdown", "source": [ "##Example 11.3 Page no-501" ] }, { "cell_type": "code", "collapsed": false, "input": [ " ", "# Given:-", "# Part(a)", "v = 0.4646 # specific volume in in m^3/kg", "M = 18.02 # molar mass of water in kg/kmol", "# At the specified state, the temperature is 513 K and the specific volume on a molar basis is", "vbar = v*M # in m^3/kmol", "# From Table A-24", "a = 142.59 # (m^3/kmol)^2 * K^.5", "b = 0.0211 # in m^3/kmol", "", "Rbar = 8314.0 # universal gas constant in N.m/kmol.K", "T = 513.0 # in kelvin", "delpbydelT = (Rbar/(vbar-b) + a/(2*vbar*(vbar+b)*T**1.5)*10**5)/10**3 # in kj/(m^3*K)", "", "# By The Maxwell relation", "delsbydelv = delpbydelT", "# Result", "print '-> The value of delpbydelT in kj/(m^3*K) is: ',delpbydelT", "", "# Part(b)", "from pylab import *", "# A value for (dels/delv)T can be estimated using a graphical approach with steam table data, as follows: At 240\u0004C, Table A-4 provides the values for specific entropy s and specific volume v tabulated below", "T = 240.0 # in degree celcius", "# At p =1, 1.5, 3, 5, 7, 10 bar respectively", "y = [7.994, 7.805, 7.477, 7.230, 7.064, 6.882] # in kj/kg.k # in kj/kg.k", "x = [2.359, 1.570, 0.781, 0.4646, 0.3292, 0.2275] # in m^3/kg # in m^3/kg", "plot(x,y)", "xlabel(\"Specific volume\")", "ylabel(\"Specific entropy\")", "show()", "# The pressure at the desired state is 5 bar.The corresponding slope is", "delsbydelv = 1 # in kj/m^3.K", "print '-> From the data of the table,delsbydelv = ',delsbydelv" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "-> The value of delpbydelT in kj/(m^3*K) is: 1.00430251045" ] }, { "output_type": "display_data", "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEMCAYAAADAqxFbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYVnX+//EnBpq7pY5TgEtQKSqLWKbfGilzTSxJTZhp\n0XIr17HJaflNNjWZTVeTWF+lplJbXNrUJrW+pLghrgg1GG64oGaiooAmCuf3x8kbbgFvRA7nhvv1\nuC6uy/u+D+e8Pdfxfvn5fM75fLwMwzAQERH5TS27CxAREfeiYBAREScKBhERcaJgEBERJwoGERFx\nomAQEREnlgbDtGnTaN++PR07diQmJoZz586V2Gb8+PHcfPPNhISEkJycbGU5IiJSDpYFw759+3jv\nvffYtm0bP/zwAwUFBSxYsMBpm2XLlrF792527drFu+++y5gxY6wqR0REysmyYGjUqBE+Pj6cOXOG\nCxcucObMGXx9fZ22Wbp0KY8++igAXbp0ITs7m6NHj1pVkoiIlIO3VTu+/vrrmTx5Mi1btqRu3br0\n7t2be++912mbQ4cO4e/v73jt5+dHZmYmLVq0cLzn5eVlVYkiIjVaRSe2sKzFsGfPHt566y327dvH\n4cOHyc3N5ZNPPimx3aWFlxYEhmHoxzB48cUXba/BXX50LnQuatK5OHrUYPZsgx49DLZurZx9Xg3L\ngmHLli1069aNpk2b4u3tTVRUFImJiU7b+Pr6cvDgQcfrzMzMEt1NIiI10S+/wOzZ0KMH3HILrFoF\nTz4J7drZXZmFwdC2bVuSkpI4e/YshmEQHx9PUFCQ0zYDBgxg3rx5ACQlJdGkSROnbiQRkZrk0jBY\nvRqeegqOHIEFCyAqCurWtbtKC8cYQkJCeOSRR+jcuTO1atWiU6dOjBgxgri4OABGjRpFv379WLZs\nGYGBgdSvX58PP/zQqnJqhIiICLtLcBs6F0V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Hat29PSEgIP/30k9Pg6smTJwkJCWHmzJn861//AsxbTrds2UJISAjt27d3DNK+8MILnDx5\nko4dOxIaGkpCQkKJ4xX/37yXl5fj9YwZM1i1ahXBwcF07tzZqavqoiZNmhAUFMSBAwfo3LkzAGFh\nYTz22GPcfvvt3HHHHYwYMcLRjXRx3/7+/gwZMoQOHTrw0EMP0alTp1LPRfF6iv9+z549iYmJoWvX\nrgQHBzNkyBByc3PLdX5FSqPbVaXaatOmDVu3bq2x00uL2EUtBqm2avKKXCJ2UotBREScqMUgIiJO\nFAwiIuJEwSAiIk4UDCIi4kTBICIiThQMIiLi5P8Da332C1BJf1gAAAAASUVORK5CYII=\n" }, { "output_type": "stream", "stream": "stdout", "text": [ "-> From the data of the table,delsbydelv = 1" ] } ], "prompt_number": 3 }, { "cell_type": "markdown", "source": [ "##Example 11.4 Page no-506" ] }, { "cell_type": "code", "collapsed": false, "input": [ "", "# Given:-", "# Analysis", "# For comparison, Table A-2 gives at 100\u0004C,", "hgf =2257.00 # in kj/kg", "ugf = 2087.6 # in kj/kg", "sgf = 6.048 # in kj/kg.K", "# Values", "print '-> From table, hg-hf = ',hgf", "print '-> From table, ug-uf = ',ugf", "print '-> From table, sg-sf = ',sgf", "", "# Part(a)", "T = 373.15 # in kelvin", "# If we plot a graph between temperature and saturation pressure using saturation pressure\u2013temperature data from the steam tables, the desired slope is:", "delpbydelT = 3570.00 # in N/(m^2.K)", "vg = 1.673 # in m^3/kg", "vf = 1.0435e-3 # in m^3/kg", "# Calculations", "# From the Clapeyron equation", "hgf = T*(vg-vf)*delpbydelT*10**-3 # in kj/kg", "# Result", "print '-> Part(a)using Clapeyron equation, hg-hf = ', round(hgf,2)", "", "# Part(b)", "psat = 1.014e5 # in N/m^2", "hgf = 2256.00 # can be obtained using IT software in kj/kg", "# Calculations", "ugf = hgf - psat*(vg-vf)/10**3 # in kj/kg", "# Result", "print '-> Part(b)ug-uf = ', round(ugf,2)", "# Part(c)", "# Calculation", "sgf =hgf/T # in kj/kg.K ", "# Result", "print '-> Part(c)sg-sf = ', round(sgf,2)" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "-> From table, hg-hf = 2257.0", "-> From table, ug-uf = 2087.6", "-> From table, sg-sf = 6.048", "-> Part(a)using Clapeyron equation, hg-hf = 2227.29", "-> Part(b)ug-uf = 2086.46", "-> Part(c)sg-sf = 6.05" ] } ], "prompt_number": 4 }, { "cell_type": "markdown", "source": [ "##Example 11.6 Page no-517" ] }, { "cell_type": "code", "collapsed": false, "input": [ "", "# Given:-", "# Part(a)", "v = 1.00/998.21 # specific volume of water in m^3/kg", "T = 293.00 # given temperature in kelvin", "beta = 206.6e-6 # volume expansivity in /K", "k = 45.90e-6 # isothermal compressibility in /bar", "# Interpolating in Table A-19", "cp = 4.188 # in kj/kg.k", "# Calculations", "cpv = (v*T*beta**2.00/k)*10**2 # in kj/kg.k", "cv = cp-cpv # in kj/kg.k", "errorPercentage = 100*(cp-cv)/cv", "# Result", "print '-> The percentage error is: ',round(errorPercentage,2)", "", "# Part(b)", "# Calculations", "K = cp/cv # specific heat ratio", "c = ((K*v/k)*10**5)**0.5 # velocity of sound in m/s", "# Result", "print '-> The velocity of sound is: ',round(c,2),'m/s'" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "-> The percentage error is: 0.66", "-> The velocity of sound is: 1482.19 m/s" ] } ], "prompt_number": 5 }, { "cell_type": "markdown", "source": [ "##Example 11.8 Page no-526" ] }, { "cell_type": "code", "collapsed": false, "input": [ "", "# Given:-", "p1 = 100.00 # in bar", "T1 = 300.00 # in kelvin", "p2 = 40.00 # in bar", "T2 = 245.00 # in kelvin", "", "", "# From table A-23", "h1starbar = 8723.00 # in kj/kmol", "h2starbar = 7121.00 # in kj/kmol", "# From Tables A-1", "Tc = 126.00 # critical temperature in kelvin", "pc = 33.9 # critical pressure in bar", "M = 28.00 # molar mass in kg/kmol", "Rbar = 8.314 # universal gas constant in kj/(kmol.K)", "Term1 = 0.5 ", "Term2 = 0.31", "", "# Calculations", "TR1 = T1/Tc # reduced temperature at the inlet", "PR1 = p1/pc # reduced pressure at the inlet", "TR2 = T2/Tc # reduced temperature at the exit", "PR2 = p2/pc # reduced pressure at the exit", "wcvdot = (1.00/M)*(h1starbar-h2starbar-Rbar*Tc*(Term1-Term2)) # in kj/kg", "", "# Result", "print '-> The work developed, in kJ per kg of nitrogen flowing is : '", "print round(wcvdot,2)" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "-> The work developed, in kJ per kg of nitrogen flowing is : ", "50.11" ] } ], "prompt_number": 6 }, { "cell_type": "markdown", "source": [ "##Example 11.9 Page no-529" ] }, { "cell_type": "code", "collapsed": false, "input": [ "", "# Given:-", "# Part(a)", "# With values from Table A-23", "sT2bar = 185.775 # in kj/(kmol.K)", "sT1bar = 191.682 # in kj/(kmol.K)", "Rbar = 8.314 # universal gas constant", "M = 28.00 # molar mass in kg/kmol ", "p2 = 40.00 # in bar", "p1 = 100.00 # in bar", "Term1 = 0.21", "Term2 = 0.14", "", "# Calculations", "import math", "S2StarBarMinusS1StarBar = sT2bar-sT1bar-Rbar*math.log(p2/p1) # The change in specific entropy in kj/(kmol.K)", "sigmacvdot = (1.00/M)*(S2StarBarMinusS1StarBar-Rbar*(Term2-Term1))", "# Result", "print '-> the rate of entropy production in kj/kg.K is: '", "print round(sigmacvdot,2)", "", "# Part(b)", "# From Table A-23,", "h2starbar = 6654.00 # in kj/kmol", "h1starbar = 8723.00 # in kj/kmol", "Tc = 126.00 # critical temperature in kelvin", "Term2 = 0.36", "Term1 = 0.5", "wcvdot = 50.1 # from example 11.8", "", "# Calculations", "wcvdots = (1.00/M)*(h1starbar-h2starbar-Rbar*Tc*(Term1-Term2)) # isentropic work in kj/kg", "etat = wcvdot/wcvdots # turbine efficiency", "", "# Result", "print '-> The isentropic turbine efficiency is: '", "print round(etat,2)" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "-> the rate of entropy production in kj/kg.K is: ", "0.08", "-> The isentropic turbine efficiency is: ", "0.73" ] } ], "prompt_number": 7 }, { "cell_type": "markdown", "source": [ "##Example 11.10 Page no-533" ] }, { "cell_type": "code", "collapsed": false, "input": [ "", "# Given:-", "# Analysis", "V = 0.241 # volume of the mixture in m^3", "T = 511.00 # temperature of the mixture in kelvin", "n1 = 0.18 # number of moles of methane in kmol", "n2 = 0.274 # number of moles of butane in kmol", "Rbar = 8314 # universal gas constant in (N.m)/(kmol.K)", "", "# Calculations", "n = n1 + n2 # The total number of moles of mixture", "y1 = n1/n # mole fraction of methane", "y2 = n2/n # mole fraction of butane", "vbar = V/(n) # The specific volume of the mixture on a molar basis in m^3/kmol", "", "# Part(a)", "p = (Rbar*T/vbar)*10**-5 # in bar", "# Result", "print '-> The pressure in bar obtained using ideal gas equation is: '", "print round(p,2)", "", "# Part(b)", "# From table A-1", "Tc1 = 191.00 # critical temperature for methane in kelvin ", "Pc1 = 46.4 # critical pressure for methane in bar", "Tc2 = 425.00 # critical temperature for butane in kelvin", "Pc2 = 38.00 # critical pressure for butane in bar", "Z = 0.88", "", "", "# Calculations", "Tc = y1*Tc1 + y2*Tc2 # critical temperature in kelvin", "Pc = y1*Pc1 + y2*Pc2 # critical pressure in bar", "TR = T/Tc # reduced temperature of the mixture", "vRdash= vbar*Pc/(Rbar*Tc)", "p = ((Z*Rbar*T)/vbar)*10**-5 # mixture pressure in bar", "# Result", "print '-> Pressure obtained using Kay\u2019s rule together with the generalized compressibility chart, is: '", "print round(p,2)", "", "# Part(c)", "# Table A-24 gives the following van der Waals constants values for methane", "a1 = 2.293 # in (m^3/kmol)^2", "b1 = 0.0428 # in m^3/kmol", "# Table A-24 gives the following van der Waals constants values for butane", "a2 = 13.86 # in (m^3/kmol)^2", "b2 = 0.1162 # in m^3/kmol", "", "a = (y1*a1**.5 + y2*a2**.5)**2 # in bar*(m^3/kmol)^2", "b = y1*b1+y2*b2 # in m^3/kmol", "# From van der Waals equation", "p = ((Rbar*T)/(vbar-b))*10**-5 - a/(vbar**2)", "print '-> The pressure in bar from van der Waals equation is: '", "print round(p,2)", "", "# Part(d)", "# For methane", "TR1 = T/Tc1", "vR1dash = (.241/.18)*10**5*Pc1/(Rbar*Tc1)", "Z1 = 1.00", "# For butane", "TR2 = T/Tc2", "vR2dash = (.88*10**5*Pc2)/(Rbar*Tc2)", "Z2 = 0.8", "Z = y1*Z1 + y2*Z2", "# Accordingly, the same value for pressure as determined in part (b) using Kay\u2019s rule results:", "p = 70.4", "", "# Result", "print '-> The pressure in bar obtained using the rule of additive pressures employing the generalized compressibility chart is: '", "print round(p,2)" ], "language": "python", "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "-> The pressure in bar obtained using ideal gas equation is: ", "80.03", "-> Pressure obtained using Kay\u2019s rule together with the generalized compressibility chart, is: ", "70.43", "-> The pressure in bar from van der Waals equation is: ", "66.97", "-> The pressure in bar obtained using the rule of additive pressures employing the generalized compressibility chart is: ", "70.4" ] } ], "prompt_number": 8 } ] } ] }