{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 5 The first law and the dynamic open system" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:5.2 Pg:105" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "work done by the system = -9.7 Btu/lbm\n", "\n", " Power = -48.6 Btu/s\n" ] } ], "source": [ "## Initialization of variables\n", "rate= 5 #lbm/sec\n", "Q=50 #Btu/s\n", "h2=1020 #Btu/lbm\n", "h1=1000 #Btu/lbm\n", "V2=50 #ft/s\n", "V1=100 #ft/s\n", "J=778\n", "g=32.2 #ft/s**2\n", "gc=g\n", "Z2=0\n", "Z1=100 #ft\n", "#calculations\n", "dw=Q/rate -(h2-h1) -(V2**2- V1**2)/(2*gc*J) -g/gc *(Z2-Z1)/J\n", "power=dw*rate\n", "#results\n", "print \"work done by the system = %.1f Btu/lbm\"%(dw)\n", "print \"\\n Power = %.1f Btu/s\"%(power)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:5.3 Pg:106" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Area of inlet pipe = 0.75 ft**2\n" ] } ], "source": [ "#Initialization of variables\n", "V=100.0 #ft/s\n", "v=15 #lbm/ft**3\n", "m=5 #lbm/s\n", "#calculations\n", "A=m*v/V\n", "#results\n", "print \"Area of inlet pipe = %.2f ft**2\"%(A)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:5.4 Pg:106" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "From table B-4\n", "Final temperature of the steam = 540 F\n", "\n", " Change in temperature = 212 F\n" ] } ], "source": [ "#Initialization of variables\n", "P=100.0 #psia\n", "#calculations\n", "print \"From table B-4\"\n", "h=1187.2 #Btu/lbm\n", "t1=328 #F\n", "t2=540 #F\n", "dt=t2-t1\n", "#results\n", "print \"Final temperature of the steam = %d F\"%(t2)\n", "print \"\\n Change in temperature = %d F\"%(dt)" ] } ], "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 }