{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 9 Properties of the pure substance" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:9.1 Pg:304" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "From steam tables,\n", "Internal energy = -0.0002625 Btu/lbm\n" ] } ], "source": [ "#Initialization of variables\n", "T=32 #F\n", "m=1 #lbm\n", "J=778.16\n", "#calculations\n", "print \"From steam tables,\"\n", "hf=0 \n", "p=0.08854 #psia\n", "vf=0.01602 #ft**3/lbm\n", "u=hf-p*144*vf/J\n", "#results\n", "print \"Internal energy = %.7f Btu/lbm\"%(u)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:9.2 Pg:305" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "from steam tables,\n", "Change in entropy = 0.351 Btu/lbm R\n" ] } ], "source": [ "#Initialization of variables\n", "P=40 #psia\n", "#calculations\n", "print \"from steam tables,\"\n", "hf=200.8 #Btu/lbm\n", "hg=27 #Btu/lbm\n", "T=495 #R\n", "ds=(hf-hg)/T\n", "#results\n", "print \"Change in entropy = %.3f Btu/lbm R\"%(ds)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:9.3 Pg:305" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "From table B-14,\n", "specific enthalpy = 36.0 Btu/lbm\n" ] } ], "source": [ "#Initialization of variables\n", "x=0.35\n", "T=18 #F\n", "#calculations\n", "print \"From table B-14,\"\n", "hf=12.12 #Btu/lbm\n", "hg=80.27 #Btu.lbm\n", "hfg=-hf+hg\n", "h=hf+x*hfg\n", "#results\n", "print \"specific enthalpy = %.1f Btu/lbm\"%(h)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:9.4 Pg:306" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "From table B-14,\n", "Heat required = 49.71 Btu/lbm\n" ] } ], "source": [ "#Initialization of variables\n", "x=0.35\n", "T=18 #F\n", "T2=55.5 #F\n", "#calculations\n", "print \"From table B-14,\"\n", "hf=12.12 #Btu/lbm\n", "hg=80.27 #Btu.lbm\n", "hfg=-hf+hg\n", "h=hf+x*hfg\n", "h2=85.68 #Btu/lbm\n", "dh=h2-h\n", "#results\n", "print \"Heat required = %.2f Btu/lbm\"%(dh)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:9.5 Pg:307" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "From mollier chart,\n", "enthalpy = 120 Btu/lbm\n", "\n", " Qulaity = 0.83\n" ] } ], "source": [ "#Initialization of variables\n", "P=1460 #psia\n", "T=135 #F\n", "P2=700 #psia\n", "#calculations\n", "print \"From mollier chart,\"\n", "h=120 #Btu/lbm\n", "x=0.83\n", "#results\n", "print \"enthalpy = %d Btu/lbm\"%(h)\n", "print \"\\n Qulaity = %.2f\"%(x)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:9.6 Pg:307" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "From table 3,\n", "Heat transferred = 11.4 Btu/lbm\n" ] } ], "source": [ "#Initialization of variables\n", "m=1 #lbm\n", "P1=144 #psia\n", "P2=150 #psia\n", "T1=360 #F\n", "J=778.16\n", "#calculations\n", "print \"From table 3,\"\n", "v1=3.160 #ft**3/lbm\n", "h1=1196.5 #Btu/lbm\n", "u1=h1-P1*144*v1/J\n", "h2=1211.4 #Btu/lbm\n", "u2=h2-P2*144*v1/J\n", "dq=u2-u1\n", "#results\n", "print \"Heat transferred = %.1f Btu/lbm\"%(dq)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:9.7 Pg:307" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "From table 3,\n", "Work done = -3.0 Btu/lbm\n", "\n", " In case 2, work required = -5.0 Btu/lbm\n" ] } ], "source": [ "#Initialization of variables\n", "T1=100 #F\n", "P2=1000 #psia\n", "x=0.6\n", "J=778.16\n", "#calculations\n", "print \"From table 3,\"\n", "v=0.01613 #ft**3/lbm\n", "P1=0.9 #psia\n", "wrev=-v*(P2-P1)*144/J\n", "dv=0.000051 #ft**3/lbm\n", "wcomp=(P2+P1)/2 *dv*144/J\n", "wact=wrev/x\n", "#results\n", "print \"Work done = %.1f Btu/lbm\"%(wrev)\n", "print \"\\n In case 2, work required = %.1f Btu/lbm\"%(wact)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:9.8 Pg:308" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "from steam table 2,\n", "Heat transferred = 1120.8 Btu/lbm\n" ] } ], "source": [ "#Initialization of variables\n", "pa=1000 #atm\n", "ta=100 #F\n", "#calculations\n", "hf=67.97 #Btu/lbm\n", "w=3 #Btu/lbm\n", "ha=hf+w\n", "print \"from steam table 2,\"\n", "hc=1191.8 #Btu/lbm\n", "qrev=hc-ha\n", "#results\n", "print \"Heat transferred = %.1f Btu/lbm\"%(qrev)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:9.9 Pg:309" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "From steam tables,\n", "Work done = 266 Btu/lbm\n", "\n", " work done in case 2 = 186.8 Btu/lbm\n", "\n", " Final state pressure = 3 psia\n", "The answer is a bit different due to rounding off error in textbook\n" ] } ], "source": [ "#Initialization of variables\n", "P1=144 #psia\n", "T1=400 #F\n", "y=0.7\n", "#calculations\n", "print \"From steam tables,\"\n", "h1=1220.4 #Btu/lbm\n", "s1=1.6050 #Btu/lbm R\n", "s2=1.6050 #Btu/lbm R\n", "P2=3 #psia\n", "sf=0.2008 #Btu/lbm R\n", "sfg=1.6855 #Btu/lbm R\n", "x=(s1-sf)/sfg\n", "hf=109.37 #Btu/lbm\n", "hfg=1013.2 #Btu/#bm\n", "h2=hf+x*hfg\n", "work=h1-h2\n", "dw=y*work\n", "h2d=h1-dw\n", "#results\n", "print \"Work done = %d Btu/lbm\"%(work)\n", "print \"\\n work done in case 2 = %.1f Btu/lbm\"%(dw)\n", "print \"\\n Final state pressure = %d psia\"%(P2)\n", "print \"The answer is a bit different due to rounding off error in textbook\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:9.10 Pg:309" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "From steam tables,\n", "Quality of wet steam = 99.8 percent\n" ] } ], "source": [ "#Initialization of variables\n", "pb=14.696 #psia\n", "pa=150 #psia\n", "tb=300 #F\n", "#calculations\n", "print \"From steam tables,\"\n", "hb=1192.8 #Btu/lbm\n", "ha=hb\n", "hf=330.51 #Btu/lbm\n", "hfg=863.6 #Btu/lbm\n", "x=(ha-hf)/hfg\n", "#results\n", "print \"Quality of wet steam = %.1f percent\"%(x*100)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.9" } }, "nbformat": 4, "nbformat_minor": 0 }