From d36fc3b8f88cc3108ffff6151e376b619b9abb01 Mon Sep 17 00:00:00 2001 From: kinitrupti Date: Fri, 12 May 2017 18:40:35 +0530 Subject: Revised list of TBCs --- .../Chapter_1.ipynb | 230 ------- .../Chapter_10.ipynb | 151 ----- .../Chapter_11.ipynb | 696 --------------------- .../Chapter_12.ipynb | 203 ------ .../Chapter_13.ipynb | 502 --------------- .../Chapter_14.ipynb | 547 ---------------- .../Chapter_15.ipynb | 291 --------- .../Chapter_16.ipynb | 556 ---------------- .../Chapter_18.ipynb | 240 ------- .../Chapter_19.ipynb | 671 -------------------- .../Chapter_2.ipynb | 102 --- .../Chapter_20.ipynb | 377 ----------- .../Chapter_5.ipynb | 146 ----- .../Chapter_7.ipynb | 162 ----- .../Chapter_8.ipynb | 142 ----- .../Chapter_9.ipynb | 449 ------------- 16 files changed, 5465 deletions(-) delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_1.ipynb delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_10.ipynb delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_11.ipynb delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_12.ipynb delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_13.ipynb delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_14.ipynb delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_15.ipynb delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_16.ipynb delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_18.ipynb delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_19.ipynb delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_2.ipynb delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_20.ipynb delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_5.ipynb delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_7.ipynb delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_8.ipynb delete mode 100755 Elements_of_Thermodynamics_and_heat_transfer/Chapter_9.ipynb (limited to 'Elements_of_Thermodynamics_and_heat_transfer') diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_1.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_1.ipynb deleted file mode 100755 index 608b71cc..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_1.ipynb +++ /dev/null @@ -1,230 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:b4cfb785282e641d646d41001a3d0f6e3b05cd9780e1e3c87c417c701544b8b7" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 1 - Units and Dimensions" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 4" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the force required to accelerate\n", - "#Initialization of variables\n", - "gc=32.1739 #lbm ft/lbf s^2\n", - "m=10 #lbm\n", - "a=10. #ft/s^2\n", - "#calculations\n", - "F=m*a/gc\n", - "#results\n", - "print '%s %.3f %s' %(\"Force to accelerate =\",F,\"lbf\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Force to accelerate = 3.108 lbf\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 4" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the force required to accelerate\n", - "#Initialization of variables\n", - "gc=32.1739 #lbm ft/lbf s^2\n", - "m=10. #lbm\n", - "a=gc #ft/s^2\n", - "#calculations\n", - "F=m*a/gc\n", - "#results\n", - "print '%s %d %s' %(\"Force to accelerate =\",F,\"lbf\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Force to accelerate = 10 lbf\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 4" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the force required to accelerate\n", - "#Initialization of variables\n", - "gc=32.1739 #lbm ft/lbf s^2\n", - "F=5.00e-9 #lbf hr/ft^2\n", - "#calculations\n", - "F2=F*3600*gc\n", - "#results\n", - "print '%s %.2e %s' %(\"Force required =\",F2,\"lbm/ft sec\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Force required = 5.79e-04 lbm/ft sec\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the velocity\n", - "#Initialization of variables\n", - "v=88. #ft/s\n", - "#calculations\n", - "v2=v*3600./5280.\n", - "#results\n", - "print '%s %d %s' %(\"velocity =\",v2,\"mph\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "velocity = 60 mph\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 - Pg 7" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the velocity\n", - "#Initialization of variables\n", - "v=88. #ft/s\n", - "#calculations\n", - "v2=v*1/5280*3600.\n", - "#results\n", - "print '%s %d %s' %(\"velocity =\",v2,\"mph\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "velocity = 60 mph\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 - Pg 9" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the density of water and also the specific weight\n", - "#Initialization of variables\n", - "rho=62.305 #lbf/ft^2\n", - "g=32.1739 #ft/s^2\n", - "#calculations\n", - "gam=rho/g\n", - "#results\n", - "print '%s %.3f %s' %(\"Density of water in this system =\",gam,\"lbf/ft^2\")\n", - "print '%s %.3f %s' %(\"\\n Specific weight =\",rho,\"lbf/ft^2\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Density of water in this system = 1.937 lbf/ft^2\n", - "\n", - " Specific weight = 62.305 lbf/ft^2\n" - ] - } - ], - "prompt_number": 6 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_10.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_10.ipynb deleted file mode 100755 index ff3609da..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_10.ipynb +++ /dev/null @@ -1,151 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:1bfddf04d127361fe3f8fbf16a545bcc1144ba2e77c1a2b0127e1628ecf77a23" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 10 - The pvT relationships" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 164" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the pressure in ideal gas and vanderwaals case\n", - "#Initialization of variables\n", - "m=1 #lbm\n", - "T1=212+460. #R\n", - "sv=0.193 #ft^3/lbm\n", - "M=44\n", - "a=924.2 #atm ft^2 /mole^2\n", - "b=0.685 #ft^3/mol\n", - "R=0.73 #atm ft^3/R mol\n", - "#calculations\n", - "v=sv*M\n", - "p=R*T1/v\n", - "p2=R*T1/(v-b) -a/v**2\n", - "#results\n", - "print '%s %.1f %s' %(\"In ideal gas case, pressure =\",p,\" atm\")\n", - "print '%s %.1f %s' %(\"\\n In vanderwaals equation, pressure =\",p2,\" atm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "In ideal gas case, pressure = 57.8 atm\n", - "\n", - " In vanderwaals equation, pressure = 50.0 atm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 166" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the volume\n", - "#Initialization of variables\n", - "m=1 #lbm\n", - "p=50.9 #atm\n", - "t=212+460 #R\n", - "R=0.73\n", - "#calculations\n", - "pc=72.9 #atm\n", - "tc=87.9 +460 #R\n", - "pr=p/pc\n", - "Tr=t/tc\n", - "z=0.88\n", - "v=z*R*t/p\n", - "#results\n", - "print '%s %.3f %s' %(\"volume =\",v,\"ft^3/mole\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "volume = 8.481 ft^3/mole\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 167" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Pressure\n", - "#Initialization of variables\n", - "t=212+460. #R\n", - "v=0.193 #ft^3/lbm\n", - "M=44.\n", - "R=0.73\n", - "#calculations\n", - "tc=87.9+460 #F\n", - "zc=0.275\n", - "vc=1.51 #ft^3/mol\n", - "tr=t/tc\n", - "vr=v*M/vc\n", - "vrd=vr*zc\n", - "z=0.88\n", - "p=z*R*t/(M*v)\n", - "#results\n", - "print '%s %.1f %s' %(\"Pressure =\",p,\"atm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure = 50.8 atm\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_11.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_11.ipynb deleted file mode 100755 index 4aed469b..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_11.ipynb +++ /dev/null @@ -1,696 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:37c7e0de5d214bd8e1262734b18b139b442cc87b722d8f6c3ad97dd3d8903ad3" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 11 - The ideal gas and mixture relationships" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 184" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the work done\n", - "#Initialization of variables\n", - "n=1.3\n", - "T1=460+60. #R\n", - "P1=14.7 #psia\n", - "P2=125. #psia\n", - "R=1545.\n", - "M=29.\n", - "#calculations\n", - "T2=T1*(P2/P1)**((n-1)/n)\n", - "wrev=R/M *(T2-T1)/(1-n)\n", - "#results\n", - "print '%s %d %s' %(\"Work done =\",wrev,\"ft-lbf/lbm\")\n", - "print '%s' %(\"The answer is a bit different due to rounding off error in textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Work done = -58988 ft-lbf/lbm\n", - "The answer is a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 184" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Change in kinetic energy\n", - "#Initialization of variables\n", - "P2=10 #psia\n", - "P1=100 #psia\n", - "T1=900 #R\n", - "w=50 #Btu/lbm\n", - "k=1.39\n", - "cp=0.2418\n", - "#calculations\n", - "T2=T1*(P2/P1)**((k-1)/k)\n", - "T2=477\n", - "KE=-w-cp*(T2-T1)\n", - "#results\n", - "print '%s %.1f %s' %(\"Change in kinetic energy =\",KE,\"Btu/lbm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Change in kinetic energy = 52.3 Btu/lbm\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Final temperature\n", - "#Initialization of variables\n", - "T1=900 #R\n", - "P1=100 #psia\n", - "P2=10 #psia\n", - "#calculations\n", - "print '%s' %(\"From table B-9\")\n", - "pr1=8.411\n", - "pr2=pr1*P2/P1\n", - "T2=468 #R\n", - "#results\n", - "print '%s %.1f %s' %(\"Final temperature =\",T2,\"R \")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From table B-9\n", - "Final temperature = 468.0 R \n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 190" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the final temperature and pressure, work done and enthalpy\n", - "#Initialization of variables\n", - "cr=6\n", - "p1=14.7 #psia\n", - "t1=60.3 #F\n", - "M=29\n", - "R=1.986\n", - "#calculations\n", - "print '%s' %(\"from table b-9\")\n", - "vr1=158.58 \n", - "u1=88.62 #Btu/lbm\n", - "pr1=1.2147\n", - "vr2=vr1/cr\n", - "T2=1050 #R\n", - "u2=181.47 #Btu/lbm\n", - "pr2=14.686\n", - "p2=p1*(pr2/pr1)\n", - "dw=u1-u2\n", - "h2=u2+T2*R/M\n", - "#results\n", - "print '%s %d %s' %(\"final temperature =\",T2,\"R\")\n", - "print '%s %.1f %s' %(\"\\n final pressure =\",p2,\" psia\")\n", - "print '%s %.2f %s' %(\"\\n work done =\",dw,\" Btu/lbm\")\n", - "print '%s %.1f %s' %(\"\\n final enthalpy =\",h2,\" Btu/lbm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "from table b-9\n", - "final temperature = 1050 R\n", - "\n", - " final pressure = 177.7 psia\n", - "\n", - " work done = -92.85 Btu/lbm\n", - "\n", - " final enthalpy = 253.4 Btu/lbm\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 - Pg 193" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the mole fractions of oxygen and nitrogen, Average molecular weight and partial pressures, densities, volumes\n", - "#Initialization of variables\n", - "m1=10. #lbm\n", - "m2=15. #lnm\n", - "p=50. #psia\n", - "t=60.+460 #R\n", - "M1=32.\n", - "M2=28.02\n", - "R0=10.73 \n", - "#calculations\n", - "n1=m1/M1\n", - "n2=m2/M2\n", - "x1=n1/(n1+n2)\n", - "x2=n2/(n1+n2)\n", - "M=x1*M1+x2*M2\n", - "R=1545/M\n", - "V=(n1+n2)*R0*t/p\n", - "rho=p/(R0*t)\n", - "rho2=M*rho\n", - "p1=x1*p\n", - "p2=x2*p\n", - "v1=x1*V\n", - "v2=x2*V\n", - "#results\n", - "print '%s' %(\"part a\")\n", - "print '%s %.3f %s %.3f %s' %(\"Mole fractions of oxygen and nitrogen are\",x1,\" and\",x2,\" respectively\")\n", - "print '%s' %(\"part b\")\n", - "print '%s %.1f' %(\"Average molecular weight = \",M)\n", - "print '%s' %(\"part c\")\n", - "print '%s %.2f %s' %(\"specific gas constant =\",R,\"psia ft^3/lbm R\")\n", - "print '%s' %(\"part d\")\n", - "print '%s %.1f %s' %(\"volume of mixture =\",V,\"ft^3\")\n", - "print '%s %.5f %s %.3f %s' %(\"density of mixture is\",rho, \"mole/ft^3 and\",rho2, \"lbm/ft^3\")\n", - "print '%s' %(\"part e\")\n", - "print '%s %.2f %s %.2f %s' %(\"partial pressures of oxygen and nitrogen are\",p1,\"psia and\",p2,\"psia respectively\")\n", - "print '%s %.2f %s %.2f %s' %(\"partial volumes of oxygen and nitrogen are\",v1,\"ft^3 and\",v2,\"ft^3 respectively\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "part a\n", - "Mole fractions of oxygen and nitrogen are 0.369 and 0.631 respectively\n", - "part b\n", - "Average molecular weight = 29.5\n", - "part c\n", - "specific gas constant = 52.40 psia ft^3/lbm R\n", - "part d\n", - "volume of mixture = 94.6 ft^3\n", - "density of mixture is 0.00896 mole/ft^3 and 0.264 lbm/ft^3\n", - "part e\n", - "partial pressures of oxygen and nitrogen are 18.43 psia and 31.57 psia respectively\n", - "partial volumes of oxygen and nitrogen are 34.87 ft^3 and 59.74 ft^3 respectively\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 - Pg 195" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the gravimetric and ultimate analysis\n", - "#Initialization of variables\n", - "m1=5.28\n", - "m2=1.28\n", - "m3=23.52\n", - "#calculations\n", - "m=m1+m2+m3\n", - "x1=m1/m*100\n", - "x2=m2/m*100\n", - "x3=m3/m*100\n", - "C=12./44 *m1/ m*100\n", - "O=(32./44 *m1 + m2)/m*100\n", - "N=m3/m*100\n", - "#results\n", - "print '%s %.1f %s %.1f %s %.1f %s' %(\"From gravimetric analysis, co2 =\",x1,\"percent , o2 =\",x2,\"percent and n2 =\",x3,\"percent\")\n", - "print '%s %.2f %s %.2f %s %.2f %s' %(\"\\n From ultimate analysis, co2 =\",C,\"percent , o2 =\",O,\" percent and n2 =\",N,\" percent\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From gravimetric analysis, co2 = 17.6 percent , o2 = 4.3 percent and n2 = 78.2 percent\n", - "\n", - " From ultimate analysis, co2 = 4.79 percent , o2 = 17.02 percent and n2 = 78.19 percent\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 - Pg 197" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Entropy of the mixture\n", - "#Initialization of variables\n", - "import math\n", - "x1=1/3.\n", - "n1=1.\n", - "n2=2.\n", - "x2=2/3.\n", - "p=12.7 #psia\n", - "cp1=7.01 #Btu/mole R\n", - "cp2=6.94 #Btu/mole R\n", - "R0=1.986\n", - "T2=460+86.6 #R\n", - "T1=460. #R\n", - "p0=14.7 #psia\n", - "#calculations\n", - "p1=x1*p\n", - "p2=x2*p\n", - "ds1= cp1*math.log(T2/T1) - R0*math.log(p1/p0)\n", - "ds2= cp2*math.log(T2/T1) - R0*math.log(p2/p0)\n", - "S=n1*ds1+n2*ds2\n", - "#results\n", - "print '%s %.2f %s' %(\"Entropy of mixture =\",S,\"Btu/R\")\n", - "print '%s' %(\"\\n the answer given in textbook is wrong. please check using a calculator\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Entropy of mixture = 8.27 Btu/R\n", - "\n", - " the answer given in textbook is wrong. please check using a calculator\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8 - Pg 198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the change in internal energy and entropy\n", - "#Initialization of variables\n", - "import math\n", - "c1=4.97 #Btu/mol R\n", - "c2=5.02 #Btu/mol R\n", - "n1=2\n", - "n2=1\n", - "T1=86.6+460 #R\n", - "T2=50.+460 #R\n", - "#calculations\n", - "du=(n1*c1+n2*c2)*(T2-T1)\n", - "ds=(n1*c1+n2*c2)*math.log(T2/T1)\n", - "#results\n", - "print '%s %d %s' %(\"Change in internal energy =\",du,\" Btu\")\n", - "print '%s %.3f %s' %(\"\\n Change in entropy =\",ds,\"Btu/R\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Change in internal energy = -547 Btu\n", - "\n", - " Change in entropy = -1.037 Btu/R\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9 - Pg 198" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Pressure of the mixture\n", - "#Initialization of variables\n", - "n1=1\n", - "n2=2\n", - "c1=5.02\n", - "c2=4.97\n", - "t1=60. #F\n", - "t2=100. #F\n", - "R0=10.73\n", - "p1=30. #psia\n", - "p2=10. #psia\n", - "#calcualtions\n", - "t=(n1*c1*t1+n2*c2*t2)/(n1*c1+n2*c2)\n", - "V1= n1*R0*(t1+460)/p1\n", - "V2=n2*R0*(t2+460)/p2\n", - "V=V1+V2\n", - "pm=(n1+n2)*R0*(t+460)/V\n", - "#results\n", - "print '%s %.1f %s' %(\"Pressure of mixture =\",pm,\" psia\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure of mixture = 12.7 psia\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10 - Pg 199" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the change in entropy of gas \n", - "#Initialization of variables\n", - "import math\n", - "T2=546.6 #R\n", - "T1=520 #R\n", - "T3=560 #R\n", - "v2=1389.2\n", - "v1=186.2\n", - "R0=1.986\n", - "c1=5.02\n", - "c2=4.97\n", - "n1=1\n", - "n2=2\n", - "v3=1203\n", - "#calculations\n", - "ds1=n1*c1*math.log(T2/T1) + n1*R0*math.log(v2/v1)\n", - "ds2=n2*c2*math.log(T2/T3)+n2*R0*math.log(v2/v3)\n", - "ds=ds1+ds2\n", - "#results\n", - "print '%s %.3f %s' %(\"Change in entropy for gas 1 =\",ds1,\" Btu/R\")\n", - "print '%s %.3f %s' %(\"\\n Change in entropy for gas 1 =\",ds2,\"Btu/R\")\n", - "print '%s %.3f %s' %(\"\\n Net change in entropy =\",ds,\"Btu/R\")\n", - "print '%s' %(\"The answer is a bit different due to rounding off error in the textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Change in entropy for gas 1 = 4.242 Btu/R\n", - "\n", - " Change in entropy for gas 1 = 0.331 Btu/R\n", - "\n", - " Net change in entropy = 4.572 Btu/R\n", - "The answer is a bit different due to rounding off error in the textbook\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11 - Pg 200" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Final temperature and change in entropy of air and water.\n", - "#Initialization of variables\n", - "import math\n", - "m1=1. #lbm\n", - "m2=0.94 #lbm\n", - "M1=29.\n", - "M2=18.\n", - "p1=50. #psia\n", - "p2=100. #psia\n", - "t1=250 +460. #R\n", - "R0=1.986\n", - "cpa=6.96\n", - "cpb=8.01\n", - "#calculations\n", - "xa = (m1/M1)/((m1/M1)+ m2/M2)\n", - "xb=1-xa\n", - "t2=t1*(p2/p1)**(R0/(xa*cpa+xb*cpb))\n", - "d=R0/(xa*cpa+xb*cpb)\n", - "k=1/(1.-d)\n", - "dsa=cpa*math.log(t2/t1) -R0*math.log(p2/p1)\n", - "dSa=(m1/M1)*dsa\n", - "dSw=-dSa\n", - "dsw=dSw*M2/m2\n", - "#results\n", - "print '%s %d %s' %(\"Final temperature =\",t2,\" R\")\n", - "print '%s %.3f %s %.5f %s' %(\"\\n Change in entropy of air =\",dsa,\" btu/mole R and\",dSa, \"Btu/R\")\n", - "print '%s %.4f %s %.5f %s' %(\"\\n Change in entropy of water =\",dsw,\"btu/mole R and\",dSw,\" Btu/R\")\n", - "print '%s' %(\"The answers are a bit different due to rounding off error in textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Final temperature = 851 R\n", - "\n", - " Change in entropy of air = -0.115 btu/mole R and -0.00395 Btu/R\n", - "\n", - " Change in entropy of water = 0.0757 btu/mole R and 0.00395 Btu/R\n", - "The answers are a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12 - Pg 202" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the volume occupied and mass of steam\n", - "#Initialization of variables\n", - "T=250. + 460 #R\n", - "p=29.825 #psia\n", - "pt=50 #psia\n", - "vg=13.821 #ft^3/lbm\n", - "M=29.\n", - "R=10.73\n", - "#calculations\n", - "pa=pt-p\n", - "V=1/M *R*T/pa\n", - "ma=V/vg\n", - "xa=p/pt\n", - "mb=xa/M *18./(1.-xa)\n", - "#results\n", - "print '%s %.2f %s' %(\"In case 1, volume occupied =\",V,\" ft^3\")\n", - "print '%s %.2f %s' %(\"\\n In case 1, mass of steam =\",ma,\" lbm steam\")\n", - "print '%s %.3f %s' %(\"\\n In case 2, mass of steam =\",mb,\" lbm steam\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "In case 1, volume occupied = 13.02 ft^3\n", - "\n", - " In case 1, mass of steam = 0.94 lbm steam\n", - "\n", - " In case 2, mass of steam = 0.918 lbm steam\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13 - Pg 203" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calcualte the percentage\n", - "#Initialization of variables\n", - "ps=0.64 #psia\n", - "p=14.7 #psia\n", - "M=29.\n", - "M2=46.\n", - "#calculations\n", - "xa=ps/p\n", - "mb=xa*9./M *M2/(1-xa)*100\n", - "#results\n", - "print '%s %.1f %s' %(\"percentage =\",mb,\"percent\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "percentage = 65.0 percent\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14 - Pg 203" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the partial pressure of water vapor\n", - "#Initialization of variables\n", - "ps=0.5069 #psia\n", - "p=20 #psia\n", - "m1=0.01\n", - "m2=1\n", - "M1=18.\n", - "M2=29.\n", - "#calculations\n", - "xw= (m1/M1)/(m1/M1+m2/M2)\n", - "pw=xw*p\n", - "#results\n", - "print '%s %.3f %s' %(\"partial pressure of water vapor =\",pw,\"psia\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "partial pressure of water vapor = 0.317 psia\n" - ] - } - ], - "prompt_number": 14 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_12.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_12.ipynb deleted file mode 100755 index e7d6658a..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_12.ipynb +++ /dev/null @@ -1,203 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:fb635a7892259910462c375c5cd6000ddf39095d8593a85d6b876d44f34c4760" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 12 - Non steady flow, friction and availability" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 210" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the work done\n", - "#Initialization of variables\n", - "p1=100 #psia\n", - "p2=14.7 #psia\n", - "k=1.4\n", - "T1=700 #R\n", - "R=10.73/29.\n", - "V=50\n", - "cv=0.171\n", - "cp=0.24\n", - "R2=1.986/29.\n", - "#calculations\n", - "T2=T1/ (p1/p2)**((k-1)/k)\n", - "m1=p1*V/(R*T1)\n", - "m2=p2*V/(R*T2)\n", - "Wrev= cv*(m1*T1 - m2*T2) - (m1-m2)*(T2)*cp\n", - "#results\n", - "print '%s %d %s' %(\"Work done in case 1 =\",Wrev,\"Btu\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Work done in case 1 = 572 Btu\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 212" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Engine efficiency and Effectiveness\n", - "#Initialization of variables\n", - "p1=400 #psia\n", - "t1=600 #F\n", - "h1=1306.9 #Btu/lbm\n", - "b1=480.9 #Btu/lbm\n", - "p2=50 #psia\n", - "h2=1122 #Btu/lbm\n", - "h3=1169.5 #Btu/lbm\n", - "b3=310.9 #Btu/lbm\n", - "#calculations\n", - "print '%s' %(\"All the values are obtained from Mollier chart,\")\n", - "dw13=h1-h3\n", - "dw12=h1-h2\n", - "dasf=b3-b1\n", - "etae=dw13/dw12*100\n", - "eta=abs(dw13/dasf)*100\n", - "dq=dw13+dasf\n", - "#results\n", - "print '%s %.1f %s' %(\"Engine efficiency =\",etae,\" percent\")\n", - "print '%s %.1f %s' %(\"\\n Effectiveness =\",eta,\" percent\")\n", - "print '%s %.1f %s' %(\"\\n Loss of available energy =\",dq,\" Btu/lbm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "All the values are obtained from Mollier chart,\n", - "Engine efficiency = 74.3 percent\n", - "\n", - " Effectiveness = 80.8 percent\n", - "\n", - " Loss of available energy = -32.6 Btu/lbm\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 214" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the friction of the process per pound of air\n", - "#Initialization of variables\n", - "p1=100. #psia\n", - "p2=10. #psia\n", - "n=1.3\n", - "T1=800. #R\n", - "cv=0.172\n", - "R=1.986/29\n", - "#calculations\n", - "T2=T1*(p2/p1)**((n-1)/n)\n", - "dwir=cv*(T1-T2)\n", - "dwr=R*(T2-T1)/(1-n)\n", - "dq=dwr-dwir\n", - "#results\n", - "print '%s %.1f %s' %(\"The friction of the process per pound of air =\",dq,\" Btu/lbm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The friction of the process per pound of air = 18.6 Btu/lbm\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 215" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#Calculate the Friction\n", - "#Initialization of variables\n", - "ms=10 #lbm\n", - "den=62.3 #lbm/ft^3\n", - "A1=0.0218 #ft^2\n", - "A2=0.00545 #ft^2\n", - "p2=50. #psia\n", - "p1=100. #psia\n", - "gc=32.2 #ft/s^2\n", - "dz=30. #ft\n", - "#calculations\n", - "V1=ms/(A1*den)\n", - "V2=ms/(A2*den)\n", - "df=-144./den*(p2-p1) - (V2**2 -V1**2)/(2*gc) - dz\n", - "#results\n", - "print '%s %.1f %s' %(\"Friction =\",df,\"ft-lbf/lbm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Friction = 72.9 ft-lbf/lbm\n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_13.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_13.ipynb deleted file mode 100755 index b1a173c6..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_13.ipynb +++ /dev/null @@ -1,502 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:34e2c9e74989754957ab71e3380ee9241975584f70767576f7f879e815515185" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 13 - Fluid flow" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 223" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the velocity and area\n", - "#Initialization of variables\n", - "import math\n", - "import numpy\n", - "h1=1329.1 #Btu/lbm\n", - "v1=6.218 #ft^3/lbm\n", - "J=778.\n", - "g=32.174\n", - "m=1.\n", - "#calculations\n", - "p=([80., 60., 54.6, 40., 20.])\n", - "h=([ 1304.1, 1273.8, 1265, 1234.2, 1174.8])\n", - "v=([ 7.384, 9.208, 9.844, 12.554, 21.279])\n", - "Fc=1.\n", - "b=len(p)\n", - "V2=numpy.zeros(b)\n", - "A=numpy.zeros(b)\n", - "for i in range (1,b):\n", - "\tV2[i]=round(Fc*math.sqrt(2*J*g*(h1-h[i])),2)\n", - "\tA[i]=round(m*v[i] /V2[i],5)\n", - "\n", - "V2 = 0+ V2\n", - "A =0+ A\n", - "#results\n", - "print '%s' %('velocity (ft/s)= ')\n", - "print(V2)\n", - "print '%s' %('Area (ft^2)= ')\n", - "print(A)\n", - "#The initial values of velocity and area are 0 and infinity respectively\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "velocity (ft/s)= \n", - "[ 0. 1663.87 1791.37 2179.67 2779.33]\n", - "Area (ft^2)= \n", - "[ 0. 0.00553 0.0055 0.00576 0.00766]\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 228" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Area required in both cases\n", - "#Initialization of variables\n", - "import math\n", - "n=1.4\n", - "p1=50. #psia\n", - "J=778.\n", - "cp=0.24\n", - "T1=520. #R\n", - "k=n\n", - "R=1545/29.\n", - "m=1.\n", - "p2=10. #psia\n", - "#calculations\n", - "rpt=(2/(n+1))**(n/(n-1))\n", - "pt=p1*rpt\n", - "Vtrev=223.77*math.sqrt(cp*T1*(1- rpt**((k-1)/k)))\n", - "v1=R*T1/p1/144\n", - "vt=v1*(p1/pt)**(1./k)\n", - "At=m*vt/Vtrev\n", - "V2rev=223.77*math.sqrt(cp*T1*(1-(p2/p1)**((k-1)/k)))\n", - "v2=v1*(p1/p2)**(1/k)\n", - "A2=m*v2/V2rev\n", - "#results\n", - "print '%s %.5f %s' %(\"Area required =\",At,\" ft^2\")\n", - "print '%s %.5f %s' %(\"\\n Area in case 2 =\",A2,\" ft^2\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Area required = 0.00595 ft^2\n", - "\n", - " Area in case 2 = 0.00800 ft^2\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 231" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Throat area\n", - "#Initialization of variables\n", - "J=778.\n", - "g=32.2\n", - "pc=54.6 #psia\n", - "h1=1329.1 #Btu/lbm\n", - "h2=1265. #btu/lbm\n", - "V2rev=1790. #ft/s\n", - "cv=0.99\n", - "m=1 #lbm\n", - "cv2=0.96\n", - "#calculations\n", - "V2d=cv*V2rev\n", - "hd=cv**2 *(h1-h2)\n", - "h2d=h1-hd\n", - "v2d=9.946\n", - "A2d=m*v2d/V2d\n", - "#results\n", - "print '%s %.4f %s' %(\"Throat area in case 2 =\",A2d,\" ft^2\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Throat area in case 2 = 0.0056 ft^2\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 234" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the mass flow rate\n", - "#Initialization of variables\n", - "import math\n", - "p1=50. #psia\n", - "pr=0.58\n", - "#calculations\n", - "p=p1*pr\n", - "s1=1.6585\n", - "h1=1174.1 #Btu/lbm\n", - "sf=0.3680\n", - "sfg=1.3313\n", - "hfg=945.3\n", - "vg=13.746\n", - "hf=218.82\n", - "x= (s1-sf)/sfg\n", - "v2=vg*x\n", - "h2=hf+x*hfg\n", - "V2rev=223.77*math.sqrt(h1-h2)\n", - "m=math.pi/4 *1/144. *V2rev/v2\n", - "#results\n", - "print '%s %.3f %s' %(\"mass flow rate =\",m,\" lbm/sec\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "mass flow rate = 0.572 lbm/sec\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 - Pg 234" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Mass flow rate and Meta stable under cooling\n", - "#Initialization of variables\n", - "import math\n", - "k=1.31\n", - "p1=7200. #lbf/ft**2\n", - "v1=8.515 #ft**3/lbm\n", - "pr=0.6\n", - "m1=0.574\n", - "T1=741. #R\n", - "#calculations\n", - "V2rev=8.02*math.sqrt(k/(k-1) *p1*v1*(1- (pr)**((k-1)/k)))\n", - "v2=v1*(1/pr)**(1/k)\n", - "m=math.pi/4 *1/144 *V2rev/v2\n", - "C=m/m1\n", - "T2=T1*(0.887)\n", - "t=250+460. #R\n", - "dt=t-T2\n", - "#results\n", - "print '%s %.3f %s' %(\"Mass flow rate =\",m,\" lbm/sec\")\n", - "print '%s %d %s' %(\"\\n Meta stable under cooling =\",dt,\"F\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Mass flow rate = 0.597 lbm/sec\n", - "\n", - " Meta stable under cooling = 52 F\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 - Pg 240" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the average velocity and mass flow rate\n", - "#Initialization of variables\n", - "import math\n", - "zm=0.216\n", - "pm=62.3 #lbm/ft**2\n", - "p1=0.0736 #lbm/ft**2\n", - "g=32.2\n", - "d=4.\n", - "#calculations\n", - "H=zm*(pm-p1)/12/p1\n", - "V=math.sqrt(2*g*H)\n", - "m=math.pi/4 *d**2 *V*p1\n", - "#results\n", - "print '%s %.1f %s' %(\"average velocity =\",V,\" ft/sec\")\n", - "print '%s %.1f %s' %(\"\\n mass flow rate =\",m,\" lbm/sec\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "average velocity = 31.3 ft/sec\n", - "\n", - " mass flow rate = 29.0 lbm/sec\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 - Pg 244" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the area of throat and area of exit\n", - "#Initialization of variables\n", - "import math\n", - "p0=50. #psia\n", - "T0=520. #R\n", - "rho0=0.259 #lbm/ft^3\n", - "p2=10. #psia\n", - "mf=1. #lbm\n", - "#calculations\n", - "print '%s' %(\"From table B-17,\")\n", - "pr=0.528\n", - "Tr=0.833\n", - "rhor=0.634\n", - "ps=pr*p0\n", - "Ts=Tr*T0\n", - "rhos=rho0*rhor\n", - "Vs=49.1*math.sqrt(Ts)\n", - "As=mf/(Vs*rhos)\n", - "p2r=p2/p0\n", - "M2=1.71\n", - "V2=1.487*Vs\n", - "T2=0.632*Ts\n", - "A2=As*1.35\n", - "rho2=rhos*0.317\n", - "#results\n", - "print '%s %.5f %s' %(\"Area of throat =\",As,\"ft^2\")\n", - "print '%s %.5f %s' %(\"\\n Area of exit =\",A2,\"ft^2\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From table B-17,\n", - "Area of throat = 0.00596 ft^2\n", - "\n", - " Area of exit = 0.00805 ft^2\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8 - Pg 247" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Length of the pipe\n", - "#Initialization of variables\n", - "M1=0.2\n", - "M2=0.4\n", - "D=0.5 #ft\n", - "f=0.015\n", - "#calculations\n", - "f1=14.5\n", - "f2=2.31\n", - "dl=(f1-f2)*D/f\n", - "#results\n", - "print '%s %.1f %s' %(\"Length of pipe =\",dl,\"ft\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Length of pipe = 406.3 ft\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9 - Pg 248" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the change in entropy\n", - "#Initialization of variables\n", - "import math\n", - "py=20. #psia\n", - "px=3.55 #psia\n", - "R=1.986/29\n", - "#calculations\n", - "pr=py/px\n", - "print '%s' %(\"from table B-19\")\n", - "Mx=2\n", - "My=0.577\n", - "pr2=0.721\n", - "ds=R*math.log(1./pr2)\n", - "#results\n", - "print '%s %.4f %s' %(\"Change in entropy =\",ds,\"Btu/lbm R\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "from table B-19\n", - "Change in entropy = 0.0224 Btu/lbm R\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10 - Pg 249" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Internal and net thrust\n", - "#Initialization of variables\n", - "M1=0.5\n", - "M2=1.\n", - "A1=0.5 #ft^2\n", - "A2=1. #ft^2\n", - "p1=14.7 #psia\n", - "p2=14.7 #psia\n", - "k=1.4\n", - "#calculations\n", - "thru=p2*144*A2*(1+k*M2**2)-p1*144*A1*(1+k*M1**2)\n", - "net=thru-p1*144*(A2-A1)\n", - "#results\n", - "print '%s %d %s' %(\"Internal thrust =\",thru,\"lbf\")\n", - "print '%s %d %s' %(\"\\n Net thrust =\",net,\" lbf\")\n", - "print '%s' %(\"The answers are a bit different due to rounding off error in textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Internal thrust = 3651 lbf\n", - "\n", - " Net thrust = 2593 lbf\n", - "The answers are a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 10 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_14.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_14.ipynb deleted file mode 100755 index f953d99a..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_14.ipynb +++ /dev/null @@ -1,547 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:6c33bc146fd289fab423bb4c093c8f33bd27dc001258cc7dbd47055d0bcb3468" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 14 - Psychrometrics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 257" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the partial pressures, dew temperature and density of air, water and specific humidity, Degree of saturation\n", - "#Initialization of variables\n", - "t1=80+460 #R\n", - "ps=0.5069 #psia\n", - "print '%s' %(\"from steam tables,\")\n", - "vs=633.1 #ft^3/lbm\n", - "phi=0.3\n", - "R=85.6\n", - "Ra=53.3\n", - "p=14.696\n", - "#calculations\n", - "tdew=46. #F\n", - "pw=phi*ps\n", - "rhos=1/vs\n", - "rhow=phi*rhos\n", - "rhow2= pw*144/(R*t1)\n", - "pa=p-pw\n", - "rhoa= pa*144/(Ra*t1)\n", - "w=rhow/rhoa\n", - "mu=phi*(p-ps)/(p-pw)\n", - "Ws=0.622*(ps/(p-ps))\n", - "mu2=w/Ws\n", - "#results\n", - "print '%s' %(\"part a\")\n", - "print '%s %.5f %s' %(\"partial pressure of water =\",pw,\"psia\")\n", - "print '%s %d %s' %(\"\\n dew temperature =\",tdew,\"F\")\n", - "print '%s' %(\"part b\")\n", - "print '%s %.6f %s' %(\"density of water =\",rhow,\"lbm/ft^3\")\n", - "print '%s %.6f %s' %(\"\\n in case 2, density of water =\",rhow2,\"lbm/ft^3\")\n", - "print '%s %.6f %s' %(\"\\n density of air =\",rhoa,\"lbm/ft^3\")\n", - "print '%s' %(\"part c\")\n", - "print '%s %.4f %s' %(\"specific humidity =\",w,\"lbm steam/lbm air\")\n", - "print '%s' %(\"part d\")\n", - "print '%s %.3f' %(\"In method 1, Degree of saturation = \",mu)\n", - "print '%s %.3f' %(\"\\n In method 2, Degree of saturation = \",mu2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "from steam tables,\n", - "part a\n", - "partial pressure of water = 0.15207 psia\n", - "\n", - " dew temperature = 46 F\n", - "part b\n", - "density of water = 0.000474 lbm/ft^3\n", - "\n", - " in case 2, density of water = 0.000474 lbm/ft^3\n", - "\n", - " density of air = 0.072765 lbm/ft^3\n", - "part c\n", - "specific humidity = 0.0065 lbm steam/lbm air\n", - "part d\n", - "In method 1, Degree of saturation = 0.293\n", - "\n", - " In method 2, Degree of saturation = 0.293\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 258" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the change in moisture content and change in moisture content\n", - "#Initialization of variables\n", - "p=14.696 #psia\n", - "ps=0.0808 #psia\n", - "ps2=0.5069 #psia\n", - "phi2=0.5\n", - "phi=0.6\n", - "grain=7000.\n", - "#calculations\n", - "pw=phi*ps\n", - "w1=0.622*pw/(p-pw)\n", - "pw2=phi2*ps2\n", - "w2=0.622*pw2/(p-pw2)\n", - "dw=w2-w1\n", - "dwg=dw*grain\n", - "#results\n", - "print '%s %.6f %s' %(\"change in moisture content =\",dw,\" lbm water/lbm dry air\")\n", - "print '%s %.2f %s' %(\"\\n in grains, change =\",dwg,\" grains water/lbm dry air\")\n", - "print '%s' %(\"The answers are a bit different due to rounding off error in textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "change in moisture content = 0.008857 lbm water/lbm dry air\n", - "\n", - " in grains, change = 62.00 grains water/lbm dry air\n", - "The answers are a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 264" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the humidity ratio and relative humidity\n", - "#Initialization of variables\n", - "t1=80. #F\n", - "t2=60. #F\n", - "p=14.696 #psia\n", - "ps=0.507 #psia\n", - "pss=0.256 #psia\n", - "cp=0.24\n", - "#calculations\n", - "ws=0.622*pss/(p-pss)\n", - "w=(cp*(t2-t1) + ws*1060)/(1060+ 0.45*(t1-t2))\n", - "pw=w*p/(0.622+w)\n", - "phi=pw/ps*100\n", - "td=46. #F\n", - "#results\n", - "print '%s %.4f %s' %(\"\\n humidity ratio =\",w,\"lbm/lbm dry air\")\n", - "print '%s %.1f %s' %(\"\\n relative humidity =\",phi,\" percent\")\n", - "print '%s %d %s' %(\"\\n Dew point =\",td,\"F\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "\n", - " humidity ratio = 0.0064 lbm/lbm dry air\n", - "\n", - " relative humidity = 29.7 percent\n", - "\n", - " Dew point = 46 F\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 264" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the enthalpy and sigma function\n", - "#Initialization of variables\n", - "W=0.0065 #lbm/lbm of dry air\n", - "t=80. #F\n", - "td=60. #F\n", - "#calculations\n", - "H=0.24*t+W*(1060+0.45*t)\n", - "sig=H-W*(td-32)\n", - "Ws=0.0111\n", - "H2=0.24*td+Ws*(1060+0.45*td)\n", - "sig2=H2-Ws*(td-32)\n", - "#results\n", - "print '%s %.2f %s' %(\"In case 1, enthalpy =\",H,\" Btu/lbm dry air\")\n", - "print '%s %.2f %s' %(\"\\n In case 1, sigma function =\",sig,\" Btu/lbm dry air\")\n", - "print '%s %.2f %s' %(\"\\n In case 2, enthalpy =\",H2,\" Btu/lbm dry air\")\n", - "print '%s %.2f %s' %(\"\\n In case 2, sigma function =\",sig2,\" Btu/lbm dry air\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "In case 1, enthalpy = 26.32 Btu/lbm dry air\n", - "\n", - " In case 1, sigma function = 26.14 Btu/lbm dry air\n", - "\n", - " In case 2, enthalpy = 26.47 Btu/lbm dry air\n", - "\n", - " In case 2, sigma function = 26.15 Btu/lbm dry air\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 - Pg 264" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Enthalpy and heat added\n", - "#Initialization of variables\n", - "t1=30. #F\n", - "t2=60. #F\n", - "t3=80. #F\n", - "W1=0.00206\n", - "W2=0.01090\n", - "#calculations\n", - "cm1=0.24+0.45*W1\n", - "H1=cm1*t1+W1*1060\n", - "cm2=0.24+0.45*W2\n", - "H2=cm2*t3+W2*1060\n", - "hf=t2-32\n", - "dq=H2-H1-(W2-W1)*hf\n", - "#results\n", - "print '%s %.2f %s' %(\"In case 1, Enthalpy =\",H1,\" Btu/lbm dry air\")\n", - "print '%s %.2f %s' %(\"\\n In case 2, Enthalpy =\",H2,\" Btu/lbm dry air\")\n", - "print '%s %.2f %s' %(\"\\n Heat added =\",dq,\" Btu/lbm dry air\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "In case 1, Enthalpy = 9.41 Btu/lbm dry air\n", - "\n", - " In case 2, Enthalpy = 31.15 Btu/lbm dry air\n", - "\n", - " Heat added = 21.49 Btu/lbm dry air\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 - Pg 265" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the partial pressure and dew temperature, density of air, water and specific humidity\n", - "#Initialization of variables\n", - "pw=0.15#psia\n", - "print '%s' %(\"using psychrometric charts,\")\n", - "tdew=46 #F\n", - "#calculations\n", - "va=13.74 #ft^3/lbm dry air\n", - "rhoa=1./va\n", - "V=13.74\n", - "mw=46/7000.\n", - "rhow=mw/V\n", - "w=0.00657\n", - "#results\n", - "print '%s' %(\"part a\")\n", - "print '%s %.2f %s' %(\"partial pressure of water =\",pw,\" psia\")\n", - "print '%s %d %s' %(\"\\n dew temperature =\",tdew,\"F\")\n", - "print '%s' %(\"part b\")\n", - "print '%s %.6f %s' %(\"density of water =\",rhow,\"lbm/ft^3\")\n", - "print '%s %.4f %s' %(\"\\n density of air =\",rhoa,\"lbm/ft^3\")\n", - "print '%s' %(\"part c\")\n", - "print '%s %.5f %s' %(\"specific humidity =\",w,\"lbm steam/lbm air\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "using psychrometric charts,\n", - "part a\n", - "partial pressure of water = 0.15 psia\n", - "\n", - " dew temperature = 46 F\n", - "part b\n", - "density of water = 0.000478 lbm/ft^3\n", - "\n", - " density of air = 0.0728 lbm/ft^3\n", - "part c\n", - "specific humidity = 0.00657 lbm steam/lbm air\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 - Pg 266" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Enthalpy change\n", - "#Initialization of variables\n", - "W1=0.00206 #lbm/lbm dry air\n", - "W2=0.01090 #lbm/lbm dry air\n", - "t=60 #F\n", - "#calculations\n", - "dw=W1-W2\n", - "\n", - "hs=144.4\n", - "hs2=66.8-32\n", - "w1=14.4 #Btu/lbm\n", - "ws1=20 #Btu/lbm\n", - "w2=76.3 #Btu/lbm\n", - "ws2=98.5 #Btu/lbm\n", - "dwh1=-(w1-ws1)/7000. *hs\n", - "H1=9.3+dwh1\n", - "dwh2=(w2-ws2)/7000. *hs2\n", - "H2=31.3+dwh2\n", - "dwc=dw*(t-32)\n", - "dq=H2-H1+dwc\n", - "#results\n", - "print '%s %.2f %s' %(\"Enthalpy change =\",dq,\" Btu/lbm dry air\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Enthalpy change = 21.53 Btu/lbm dry air\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8 - Pg 267" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the humidity and Temperature\n", - "#Initialization of variables\n", - "print '%s' %(\"From psychrometric charts,\")\n", - "va1=13 #ft^3/lbm dry air\n", - "va2=13.88 #ft^3/lbm dry air\n", - "flow=2000. #cfm\n", - "#calculations\n", - "ma1= flow/va1\n", - "ma2=flow/va2\n", - "t=62.5# F\n", - "phi=0.83 #percent\n", - "#results\n", - "print '%s %.2f' %(\"humidity = \",phi)\n", - "print '%s %.1f %s' %(\"\\n Temperature =\",t,\" F\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From psychrometric charts,\n", - "humidity = 0.83\n", - "\n", - " Temperature = 62.5 F\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9 - Pg 270" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the dry bulb temperature and percent humidity\n", - "#Initialization of variables\n", - "t=90 #F\n", - "ts=67.2 #F\n", - "phi=0.3\n", - "per=0.8\n", - "#calculations\n", - "dep=t-ts\n", - "dt=dep*per\n", - "tf=t-dt\n", - "print '%s' %(\"from psychrometric charts,\")\n", - "phi2=0.8\n", - "#results\n", - "print '%s %.2f %s' %(\"Dry bulb temperature =\",tf,\" F\")\n", - "print '%s %.2f' %(\"\\n percent humidity = \",phi2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "from psychrometric charts,\n", - "Dry bulb temperature = 71.76 F\n", - "\n", - " percent humidity = 0.80\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10 - Pg 271" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the cooling range and Approach. Also calculate the amount of water cooled and percentage of water lost \n", - "#Initialization of variables\n", - "m=1. #lbm\n", - "t1=100. #F\n", - "t2=75. #F\n", - "db=65. #F\n", - "print '%s' %(\"From psychrometric charts,\")\n", - "t11=82 #F\n", - "phi1=0.4\n", - "H1=30. #Btu/lbm dry air\n", - "w1=65. #grains/lbm dry air\n", - "w2=250. #grains/lbm dry air\n", - "#calculations\n", - "cr=t1-t2\n", - "appr=t2-db\n", - "dmf3=(w2-w1)*0.0001427\n", - "hf3=68.\n", - "hf4=43.\n", - "H2=62.2\n", - "H1=30.\n", - "mf4= (H1-H2+ dmf3*hf3)/(hf4-hf3)\n", - "per=dmf3/(dmf3+mf4)*100\n", - "#results\n", - "print '%s %d %s' %(\"cooling range =\",cr,\"F\")\n", - "print '%s %d %s' %(\"\\n Approach =\",appr,\"F\")\n", - "print '%s %.3f %s' %(\"\\n amount of water cooled per pound of dry air =\",mf4,\"lbm dry air/lbm dry air\")\n", - "print '%s %.2f %s' %(\"\\n percentage of water lost by evaporation =\",per,\"percent\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From psychrometric charts,\n", - "cooling range = 25 F\n", - "\n", - " Approach = 10 F\n", - "\n", - " amount of water cooled per pound of dry air = 1.216 lbm dry air/lbm dry air\n", - "\n", - " percentage of water lost by evaporation = 2.12 percent\n" - ] - } - ], - "prompt_number": 10 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_15.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_15.ipynb deleted file mode 100755 index 5c710163..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_15.ipynb +++ /dev/null @@ -1,291 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:d49c3ebbe462c89b25518f64eebe9040738bf2ef82ee8e4dec85ee0229afc06b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 15 - Vapor cycles and processes" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 276" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Thermal efficiency and Furnace efficiency\n", - "#Initialization of variables\n", - "p1=600. #psia\n", - "p2=0.2563 #psia\n", - "t1=486.21 #F\n", - "t2=60. #F\n", - "fur=0.75\n", - "#calculations\n", - "print '%s' %(\"from steam tables,\")\n", - "h1=1203.2\n", - "hf1=471.6\n", - "hfg1=731.6\n", - "h2=1088\n", - "hf2=28.06\n", - "hfg2=1059.9\n", - "s1=1.4454\n", - "sf1=0.6720\n", - "sfg1=0.7734\n", - "s2=2.0948\n", - "sf2=0.0555\n", - "sfg2=2.0393\n", - "xd=(s1-sf2)/sfg2\n", - "hd=hf2+xd*hfg2\n", - "xa=0.3023\n", - "ha=hf2+xa*hfg2\n", - "wbc=0\n", - "wda=0\n", - "wcd=h1-hd\n", - "wab=ha-hf1\n", - "W=wab+wcd+wbc+wda\n", - "Wrev=hfg1- (t2+459.7)*sfg1\n", - "etat=(t1-t2)/(t1+459.7)*100\n", - "eta=fur*etat\n", - "#results\n", - "print '%s %d %s' %(\"Thermal efficiency =\",etat,\"percent\")\n", - "print '%s %.1f %s' %(\"\\n Furnace efficiency =\",eta,\" percent\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "from steam tables,\n", - "Thermal efficiency = 45 percent\n", - "\n", - " Furnace efficiency = 33.8 percent\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 277" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Thermal and Overall efficiency\n", - "#Initialization of variables\n", - "dhab=-123.1\n", - "etac=0.5\n", - "ha=348.5\n", - "etaf=0.75\n", - "eta=0.85\n", - "hf=471.6\n", - "hfg=731.6\n", - "hc=1203.2\n", - "dhcd=452.7\n", - "#calculations\n", - "dwabs=dhab/etac\n", - "hbd=ha-dwabs\n", - "dwcds=dhcd*eta\n", - "dqa=hc-hbd\n", - "etat=(dwcds+dwabs)/dqa*100.\n", - "eta=etat*etaf\n", - "#results\n", - "print '%s %.1f %s' %(\"Thermal efficiency =\",etat,\" percent\")\n", - "print '%s %.1f %s' %(\"\\n Overall efficiency = \",eta,\" percent\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thermal efficiency = 22.8 percent\n", - "\n", - " Overall efficiency = 17.1 percent\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 277" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Thermal and Overall efficiency\n", - "#Initialization of variables\n", - "t=60 #F\n", - "J=778.16\n", - "p1=600 #psia\n", - "p2=0.2563 #psia\n", - "etaf=0.85 \n", - "#calculations\n", - "print '%s' %(\"From steam tables,\")\n", - "vf=0.01604 #ft^3/lbm\n", - "dw=-vf*(p1-p2)*144/J\n", - "ha=28.06 #Btu/lbm\n", - "hb=29.84 #Btu/lbm\n", - "hd=1203.2 #Btu/lbm\n", - "he=750.5 #Btu/lbm\n", - "dqa=hd-hb\n", - "dqr=ha-he\n", - "dw=dqa+dqr\n", - "dwturb=hd-he\n", - "dwpump=ha-hb\n", - "etat=dw/dqa*100.\n", - "eta=etat*etaf\n", - "#results\n", - "print '%s %.1f %s' %(\"Thermal efficiency =\",etat,\" percent\")\n", - "print '%s %.1f %s' %(\"\\n Overall efficiency =\",eta,\"percent\")\n", - " \n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From steam tables,\n", - "Thermal efficiency = 38.4 percent\n", - "\n", - " Overall efficiency = 32.7 percent\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 278" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Thermal and Overall efficiency\n", - "#Initialization of variables\n", - "dhab=-1.78\n", - "etac=0.5\n", - "ha=28.06\n", - "eta=0.85\n", - "hf=471.6\n", - "hfg=731.6\n", - "hd=1203.2\n", - "dhcd=452.7\n", - "#calculations\n", - "dwabs=dhab/etac\n", - "hbd=ha-dwabs\n", - "dwcds=dhcd*eta\n", - "dqa=hd-hbd\n", - "etat=(dwcds+dwabs)/dqa*100.\n", - "eta=etat*eta\n", - "#results\n", - "print '%s %.1f %s' %(\"Thermal efficiency =\",etat,\"percent\")\n", - "print '%s %.1f %s' %(\"\\n Overall efficiency =\",eta,\"percent\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thermal efficiency = 32.5 percent\n", - "\n", - " Overall efficiency = 27.7 percent\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 - Pg 287" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the thermal efficiency\n", - "#Initialization of variables\n", - "p2=600 #psia\n", - "p1=44 #psia\n", - "te=486.21 #F\n", - "tb=273.1 #F\n", - "J=778.16\n", - "p3=0.25 #psia\n", - "#calculations\n", - "hc=241.9\n", - "hj=834.6\n", - "y=1-0.805\n", - "v1=0.0172\n", - "v2=0.016\n", - "ha=28.06\n", - "hd=hc+v1*(p2-p1)*144/J\n", - "hb=ha+v2*(p1-p3)*144/J\n", - "hh=1374\n", - "Qa=hh-hd\n", - "Qr=(ha-hj)*(1-y)\n", - "etat=(Qa+Qr)/Qa*100.\n", - "#results\n", - "print '%s %.1f %s' %(\"thermal efficiency =\",etat,\"percent\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "thermal efficiency = 42.6 percent\n" - ] - } - ], - "prompt_number": 5 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_16.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_16.ipynb deleted file mode 100755 index e73c5d78..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_16.ipynb +++ /dev/null @@ -1,556 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:b48de029dcc8d0a67a0785422dda0e79a8ad980134c0bbc3f290af08b9a74588" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 16 - Combustion" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 299" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Molecule\n", - "#Initialization of variables\n", - "per=85.\n", - "#calculations\n", - "a=per/12.\n", - "b=100-per\n", - "ad=1.13*a\n", - "bd=1.13*b+1\n", - "#results\n", - "print '%s %d %s %d' %(\"Molecule is C\",ad,\"H\",bd)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Molecule is C 8 H 17\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 299" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Oxygen and Nitrogen content\n", - "#Initialization of variables\n", - "per=0.071\n", - "#calculations\n", - "O2=8.74\n", - "N2=per/2 + 3.76*O2\n", - "#results\n", - "print '%s %.2f %s %.2f' %(\"Oxygen =\",O2,\"and Nitrogen =\",N2)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Oxygen = 8.74 and Nitrogen = 32.90\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 302" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the air fuel ratio\n", - "#Initialization of variables\n", - "N2=78.1\n", - "M=29.\n", - "co2=8.7\n", - "co=8.9\n", - "x4=0.3\n", - "x5=3.7\n", - "x6=14.7\n", - "#calculations\n", - "O2=N2/3.76\n", - "Z=(co2+co+x4)/8\n", - "AF=(O2+N2)*M/(Z*113)\n", - "#results\n", - "print '%s %.1f %s' %(\"Air fuel ratio =\",AF,\"lbm air/lbm fuel\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Air fuel ratio = 11.3 lbm air/lbm fuel\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 - Pg 303" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the air fuel ratio\n", - "#Initialization of variables\n", - "N2=78.1\n", - "M=29\n", - "ba=2.12\n", - "x4=0.3\n", - "x5=3.7\n", - "x6=14.7\n", - "#calculations\n", - "O2=N2/3.76\n", - "O2=N2/3.76\n", - "Z=(x4*4+x5*2+x6*2)/17\n", - "AF=(O2+N2)*M/(Z*113)\n", - "#results\n", - "print '%s %.1f %s' %(\"Air fuel ratio =\",AF,\"lbm air/lbm fuel\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Air fuel ratio = 11.4 lbm air/lbm fuel\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 - Pg 303" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the air fuel ratio\n", - "#Initialization of variables\n", - "N2=78.1\n", - "M=29\n", - "ba=2.12\n", - "x4=0.3\n", - "x5=3.7\n", - "x6=14.7\n", - "#calculations\n", - "O2=N2/3.76\n", - "c=14.7\n", - "b= x4*4 + x5*2 + x6*2\n", - "a=b/ba\n", - "AF=(O2+N2)*M/(a*12. + b)\n", - "#results\n", - "print '%s %.1f %s' %(\"Air fuel ratio =\",AF,\"lbm air/lbm fuel\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Air fuel ratio = 11.3 lbm air/lbm fuel\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 - Pg 304" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the air fuel ratio\n", - "#Initialization of variables\n", - "N2=78.1\n", - "M=29\n", - "ba=2.12\n", - "co2=8.7\n", - "co=8.9\n", - "x4=0.3\n", - "x5=3.7\n", - "x6=14.7\n", - "#calculations\n", - "O2=N2/3.76\n", - "c=14.7\n", - "Z=2.238\n", - "X=(Z*17-x4*4-x5*2)/2\n", - "a=co2+co/2+x4+x6/2\n", - "b=3.764*a\n", - "AF=(O2+N2)*M/(Z*113)\n", - "#results\n", - "print '%s %.1f %s' %(\"Air fuel ratio =\",AF,\"lbm air/lbm fuel\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Air fuel ratio = 11.3 lbm air/lbm fuel\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8 - Pg 305" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the air fuel ratio\n", - "#Initialization of variables\n", - "x1=8.7\n", - "x2=8.9\n", - "x3=0.3\n", - "N=78.1\n", - "z=113\n", - "M=29\n", - "#calculations\n", - "co2=(x1+x2+x3)*100/(N+x1+x2+x3)\n", - "a=2.325\n", - "AF=103*M/(a*z)\n", - "#results\n", - "print '%s %.2f' %(\"Air fuel ratio = \",AF)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Air fuel ratio = 11.37\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9 - Pg 308" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Higher heating value\n", - "#Initialization of variables\n", - "dH=-2369859 #Btu\n", - "r=1.986\n", - "dn=5.5\n", - "T=536.7 #R\n", - "#calculations\n", - "dQ=dH+dn*r*T\n", - "#results\n", - "print '%s %d %s' %(\"Higher heating value =\",dQ,\" Btu\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Higher heating value = -2363996 Btu\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10 - Pg 308" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Lower heating value\n", - "#Initialization of variables\n", - "y=13\n", - "x=12\n", - "M2=18\n", - "M=170\n", - "p=0.4593\n", - "vfg=694.9\n", - "J=778.2\n", - "m=9*18\n", - "u1=-2363996 #Btu\n", - "#calculations\n", - "z=y*M2/M\n", - "hfg=1050.4 #Btu/lbm\n", - "ufg= hfg- p*vfg*144/J\n", - "dU=ufg*m \n", - "Lhv=u1+dU\n", - "#results\n", - "print '%s %d %s' %(\"Lower heating value =\",Lhv,\"Btu/lbm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Lower heating value = -2203398 Btu/lbm\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11 - Pg 309" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Heat of the reaction\n", - "#Initialization of variables\n", - "n1=8\n", - "n2=9\n", - "n3=1\n", - "n4=12.5\n", - "U11=3852\n", - "U12=115\n", - "U21=3009\n", - "U22=101\n", - "U31=24773\n", - "U32=640\n", - "U41=2539\n", - "U42=83\n", - "H=-2203389\n", - "#calculations\n", - "dU1=n1*(U11-U12)+n2*(U21-U22)\n", - "dU2=n3*(U31-U32)+n4*(U41-U42)\n", - "Q=H+dU1-dU2\n", - "#results\n", - "print '%s %d %s' %(\"Heat of reaction =\",Q,\"Btu\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Heat of reaction = -2202154 Btu\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12 - Pg 310" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the final temperature\n", - "#Initialization of variables\n", - "n1=8\n", - "n2=9\n", - "n3=47\n", - "h1=118\n", - "h2=104\n", - "h3=82.5\n", - "Q=2203279 #Btu\n", - "#calculations\n", - "U11=n1*h1+n2*h2+n3*h3\n", - "U12=U11+Q\n", - "T2=5271 #R\n", - "#results\n", - "print '%s %d %s' %(\"Upon interpolating, T2 =\",T2,\" R\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Upon interpolating, T2 = 5271 R\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13 - Pg 313" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the percentage of dissociation\n", - "#Initialization of variables\n", - "import numpy\n", - "from numpy import roots\n", - "kp=5. \n", - "#calculations\n", - "p1=[24.,0,3,-2]\n", - "vec=numpy.roots(p1)\n", - "x=numpy.real(vec[2]*100.)\n", - "p2=[249.,0,3,-2]\n", - "vec2=numpy.roots(p2)\n", - "y=numpy.real(vec2[2]*100.)\n", - "#results\n", - "print '%s %.1f %s' %(\"percentage of dissociation =\",x,\" percent\")\n", - "print '%s %.d %s' %(\"\\n If pressure =10 . degree of dissociation =\",y,\"percent\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "percentage of dissociation = 34.3 percent\n", - "\n", - " If pressure =10 . degree of dissociation = 18 percent\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14 - Pg 314" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Extent of reaction\n", - "#Initialization of variables\n", - "import numpy\n", - "from numpy import roots\n", - "p=[24.,48,7,-4]\n", - "vec=numpy.roots(p)\n", - "x=numpy.real(vec[2] *100)\n", - "#results\n", - "print '%s %d %s' %(\"Extent of reaction=\",100-x,\"percent\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Extent of reaction= 78 percent\n" - ] - } - ], - "prompt_number": 15 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_18.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_18.ipynb deleted file mode 100755 index 8c56b4c9..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_18.ipynb +++ /dev/null @@ -1,240 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:f6da3400e962f069ab8b21139258f5f7cf61e5a3c236ae304fff64bfb1520423" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 18 - Refrigeration" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 347" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the cop, hp required, work of compression and expansion\n", - "#Initialization of variables\n", - "Ta=500. #R\n", - "Tr=540. #R\n", - "#calculations\n", - "cop=Ta/(Tr-Ta)\n", - "hp=4.71/cop\n", - "print '%s' %(\"From steam tables,\")\n", - "ha=48.02\n", - "hb=46.6\n", - "hc=824.1\n", - "hd=886.9\n", - "Wc=-(hd-hc)\n", - "We=-(hb-ha)\n", - "#results\n", - "print '%s %.1f' %(\"Coefficient of performance =\",cop)\n", - "print '%s %.3f %s' %(\"\\n horsepower required per ton of refrigeration =\",hp,\" hp/ton refrigeration\")\n", - "print '%s %.1f %s' %(\"\\n Work of compression =\",Wc,\" Btu/lbm\")\n", - "print '%s %.2f %s' %(\"\\n Work of expansion =\",We,\"Btu/lbm\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From steam tables,\n", - "Coefficient of performance = 12.5\n", - "\n", - " horsepower required per ton of refrigeration = 0.377 hp/ton refrigeration\n", - "\n", - " Work of compression = -62.8 Btu/lbm\n", - "\n", - " Work of expansion = 1.42 Btu/lbm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 349" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the cop\n", - "#Initialization of variables\n", - "x=0.8\n", - "he=26.28 #Btu/lbm\n", - "hb=26.28 #Btu/lbm\n", - "pe=98.76 #psia\n", - "pc=51.68 #psia\n", - "hc=82.71 #Btu/lbm\n", - "hf=86.80+0.95\n", - "#calculations\n", - "dwisen=-(hf-hc)\n", - "dwact=dwisen/x\n", - "hd=hc-dwact\n", - "cop=(hc-hb)/(hd-hc)\n", - "#results\n", - "print '%s %.2f' %(\"Coefficient of performance = \",cop)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Coefficient of performance = 8.96\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 351" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the work done, hp required, relative efficiency and mass flow rate, Compressor capacity\n", - "#Initialization of variables\n", - "hc=613.3#btu/lbm\n", - "hb=138.9#btu/lbm\n", - "ha=138.9#btu/lbm\n", - "hd=713.4 #btu/lbm\n", - "ta=464.7 #R\n", - "t0=545.7 #R\n", - "v=8.150 #ft^3/lbm\n", - "#calculations\n", - "Qa=hc-hb\n", - "Qr=ha-hd\n", - "Wcd=Qa+Qr\n", - "cop=abs(Qa/Wcd)\n", - "hp=abs(4.71/cop)\n", - "carnot=abs(ta/(t0-ta))\n", - "rel=abs(cop/carnot)\n", - "mass=200/Qa\n", - "C=mass*v\n", - "#results\n", - "print '%s %.1f %s' %(\"Work done =\",Wcd,\"Btu/lbm\")\n", - "print '%s %.3f %s' %(\"\\n horsepower required per ton of refrigeration =\",hp,\" hp/ton refrigeration\")\n", - "print '%s %.2f' %(\"\\n Coefficient of performance actual = \",cop)\n", - "print '%s %.3f' %(\"\\n Ideal cop = \",carnot)\n", - "print '%s %.3f' %(\"\\n relative efficiency =\",rel)\n", - "print '%s %.3f %s' %(\"\\n Mass flow rate =\",mass,\"lbm/min ton\")\n", - "print '%s %.2f %s' %(\"\\n Compressor capacity =\",C,\"cfm/ton\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Work done = -100.1 Btu/lbm\n", - "\n", - " horsepower required per ton of refrigeration = 0.994 hp/ton refrigeration\n", - "\n", - " Coefficient of performance actual = 4.74\n", - "\n", - " Ideal cop = 5.737\n", - "\n", - " relative efficiency = 0.826\n", - "\n", - " Mass flow rate = 0.422 lbm/min ton\n", - "\n", - " Compressor capacity = 3.44 cfm/ton\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 355" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Pressure ratio, Heat, Water make up required and Volume of vapor entering ejector\n", - "#Initialization of variables\n", - "pc=0.6982 #psia\n", - "pe=0.1217 #psia\n", - "m=200 #gal/min\n", - "qual=0.98\n", - "h1=23.07 #Btu/lbm\n", - "h2=8.05 #Btu/lbm\n", - "hw=1071.3\n", - "#calculations\n", - "rp=pc/pe\n", - "m2=m/0.01602 *0.1388 #Conversion of units \n", - "m2=1670\n", - "dh=15.02\n", - "Qa=m2*(h1-h2)\n", - "h3=h2 + qual*hw\n", - "m3=Qa/(h3-h1)\n", - "v=0.016+ qual*2444\n", - "C=m3*v\n", - "#results\n", - "print '%s %.2f' %(\"Pressure ratio =\",rp)\n", - "print '%s %d %s' %(\"\\n Heat =\",Qa,\"Btu/min\")\n", - "print '%s %.2f %s' %(\"\\n Water make up required =\",m3,\"lbm/min\")\n", - "print '%s %d %s' %(\"\\n Volume of vapor entering ejector =\",C,\"cfm\")\n", - "print '%s' %(\"The answers are a bit different due to rounding off error in textbook\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Pressure ratio = 5.74\n", - "\n", - " Heat = 25083 Btu/min\n", - "\n", - " Water make up required = 24.24 lbm/min\n", - "\n", - " Volume of vapor entering ejector = 58054 cfm\n", - "The answers are a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 1 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_19.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_19.ipynb deleted file mode 100755 index e14fdd84..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_19.ipynb +++ /dev/null @@ -1,671 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:6dda6a8235cbc517967b1f5033dd3771eb08f1241054f5c218f55be7d9c59b8c" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 19 - Fundamentals of heat transfer" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 381" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the experimental value of thermal conductivity and Required temperature\n", - "#Initialization of variables\n", - "import math\n", - "r1=1.12 #in\n", - "r2=3.06 #in\n", - "t1=203 #F\n", - "t2=184 #F\n", - "r3=2.09 #in\n", - "po=11.1 #watts\n", - "#calculations\n", - "km=po*3.413*(12/r1-12/r2)/(4*math.pi*(t1-t2))\n", - "dt=po*3.413*(12/r1-12/r3)/(4*math.pi*km)\n", - "t3d=t1-dt\n", - "#results\n", - "print '%s %.2f %s' %(\"The experimental value of thermal conductivity =\",km,\"Btu/hr ft F\")\n", - "print '%s %.1f %s' %(\"\\n Required temperature =\",t3d,\" F\")" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The experimental value of thermal conductivity = 1.08 Btu/hr ft F\n", - "\n", - " Required temperature = 189.1 F\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 383" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the heat loss and Temperature required\n", - "#Initialization of variables\n", - "import math\n", - "r1=4.035 #in\n", - "r2=4.312 #in\n", - "r3=5.312 #in\n", - "r4=6.812 #in\n", - "k12=25 #Btu/hr ft F\n", - "k23=0.05 #Btu/hr ft F\n", - "k34=0.04 #Btu/hr ft F\n", - "t1=625. #F\n", - "t4=125. #F\n", - "l=100. #ft\n", - "hr=1.7 #Btu/hr ft^2 F\n", - "#calculations\n", - "Rs=1/(2.*math.pi*l) *(math.log(r2/r1) /k12+math.log(r3/r2) /k23 +math.log(r4/r3) /k34)\n", - "Qd=(t1-t4)/Rs\n", - "dt=Qd*12/(hr*math.pi*2*l*6.812)\n", - "t0=t4-dt\n", - "#results\n", - "print '%s %d %s' %(\"Heat loss =\",Qd,\"Btu/hr\")\n", - "print '%s %d %s' %(\"\\n Temperature required =\",t0,\"F\")\n", - "print '%s' %(\"The answers given in the textbook are a bit different due to rounding off error\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Heat loss = 30231 Btu/hr\n", - "\n", - " Temperature required = 75 F\n", - "The answers given in the textbook are a bit different due to rounding off error\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 396" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Coefficient of heat transfer\n", - "#Initialization of variables\n", - "import math\n", - "dout=1 #in\n", - "d1=0.049 #in\n", - "t1=70. #F\n", - "t2=80. #F\n", - "rho=62.2 #lbm/ft^3\n", - "mum=2.22 #lbm/ft hr\n", - "k=0.352 #Btu/hr ft F\n", - "cp=1 #Btu/lbm F\n", - "vel=500000. #lbm/hr\n", - "n=100. #tubes\n", - "#calculations\n", - "D=dout-2*d1\n", - "t=(t1+t2)/2.\n", - "V=vel/n *4*144/(math.pi*D**2 *rho)\n", - "Re=rho*V*D/(mum*12)\n", - "Pr=cp*mum/k\n", - "Nu=0.023*Re**0.8 *Pr**0.4\n", - "hc=Nu*k*12/D\n", - "#results\n", - "print '%s %d %s' %(\"Coefficient of heat transfer =\",hc,\"Btu/hr ft^2 F\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Coefficient of heat transfer = 1040 Btu/hr ft^2 F\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 397" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Coefficient of heat transfer and Percentage change\n", - "#Initialization of variables\n", - "import math\n", - "d1=0.5 #ft\n", - "t1=200. #F\n", - "t2=80. #F\n", - "ta=400. #F\n", - "rho=0.0662 #lbm/ft**3\n", - "mum=0.0483 #lbm/ft hr\n", - "k=0.0167 #Btu/hr ft F\n", - "cp=0.2408 #Btu/lbm F\n", - "rho2=0.0567 #lbm/ft**3\n", - "mum2=0.0542 #lbm/ft hr\n", - "k2=0.0190 #Btu/hr ft F\n", - "cp2=0.2419 #Btu/lbm F\n", - "g=32.17\n", - "#calculations\n", - "ti=(t1+t2)/2.\n", - "bet=1/(460.+ti)\n", - "Pr1=cp*mum/k\n", - "Gr1=d1**3 *rho**2 *3600**2 *g*bet*(t1-t2)/mum**2\n", - "Gr1pr1=Gr1*Pr1\n", - "hc1=k/d1 *0.53*(Gr1pr1)**0.25\n", - "Q1=hc1*(t1-t2)\n", - "tf=(ta+t2)/2.\n", - "bet2=1/(460.+tf)\n", - "Pr2=cp2*mum2/k2\n", - "Gr2=d1**3 *rho2**2 *3600**2 *g*bet2*(ta-t2)/mum2**2\n", - "Gr2pr2=Gr2*Pr2\n", - "hc2=k2/d1 *0.53*(Gr2pr2)**0.25\n", - "Q2=hc2*(ta-t2)\n", - "per=100*(Q2-Q1)/Q1\n", - "#results\n", - "print '%s %.3f %s' %(\"Coefficient of heat transfer in case 1=\",hc1,\" Btu/hr ft^2 F\")\n", - "print '%s %.3f %s' %(\"\\n Coefficient of heat transfer in case 2 =\",hc2,\"Btu/hr ft^2 F\")\n", - "print '%s %d %s' %(\"\\n Percentage change =\",per,\"percent\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Coefficient of heat transfer in case 1= 1.076 Btu/hr ft^2 F\n", - "\n", - " Coefficient of heat transfer in case 2 = 1.312 Btu/hr ft^2 F\n", - "\n", - " Percentage change = 225 percent\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 - Pg 398" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Temperature o wing surface and Heat transfer convective\n", - "#Initialization of variables\n", - "chord=40. #ft\n", - "v=1200. #mph\n", - "t1=80. #F\n", - "t2=200. #F\n", - "mu=0.0447 #lbm/ft hr\n", - "rho=5280. #lbm/ft**3\n", - "cp=0.2404 #Btu/lbm F\n", - "k=0.0152 #Btu/hr ft F\n", - "J=778.\n", - "gc=32.17 #ft/s**2\n", - "mu2=0.0514 #lbm/ft hr\n", - "k2=0.0179 #Btu/hr ft F\n", - "cp2=0.2414 #Btu/lbm F\n", - "#calculations\n", - "Re=rho*v*chord*0.0735/mu\n", - "r=(mu*cp/k)**(1./3.)\n", - "tav=t1+ r*v**2 *rho**2 /(2*gc*J*cp*3600**2)\n", - "ts=t1+ 0.5*(t2-t1)+ 0.22*(tav-t1)\n", - "Re2=v*rho*chord*0.0610/mu2\n", - "Pr2=cp2*mu2/k2\n", - "hc=cp2*v*rho*0.0610 *0.037*Re2**(-0.2) *Pr2**(-0.667)\n", - "Q2=hc*(t2-tav)\n", - "#results\n", - "print '%s %.1f %s' %(\"Temperature of wing surface =\",tav,\" F\")\n", - "print '%s %d %s' %(\"\\n Heat transfer convective =\",Q2,\"Btu/hr ft^2\")\n", - "print '%s' %(\"The answers are a bit different due to rounding off error in textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Temperature of wing surface = 309.3 F\n", - "\n", - " Heat transfer convective = -9711 Btu/hr ft^2\n", - "The answers are a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 - Pg 413" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the percent of radiation emitted by surface and percent absorbed\n", - "#Initialization of variables\n", - "import math\n", - "r1=1. #in\n", - "r2=5. #in\n", - "F12=1.\n", - "#calculations\n", - "F21=4*math.pi*r1**2 *F12/(4*math.pi*r2**2)*100\n", - "F22=(1-F21/100.)*100.\n", - "#results\n", - "print '%s %d %s' %(\"Percent of radiation emitted by surface 2 on small sphere =\",F21,\" percent\")\n", - "print '%s %d %s' %(\"\\n Remaining\",F22, \"percent is absorbed by inner surface of larger sphere\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percent of radiation emitted by surface 2 on small sphere = 4 percent\n", - "\n", - " Remaining 96 percent is absorbed by inner surface of larger sphere\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 - Pg 413" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Net exchange of radiation\n", - "#Initialization of variables\n", - "short=2. #ft\n", - "apart=3. #ft\n", - "lon=4. #ft\n", - "T1=2260. #R\n", - "T2=530. #R\n", - "sigma=0.1714\n", - "#calculations\n", - "A1=short*lon\n", - "ratio=short/apart\n", - "print '%s' %(\"from curve 3\")\n", - "F=0.165\n", - "Q12=A1*F*sigma*((T1/100)**4 -(T2/100)**4)\n", - "#results\n", - "print '%s %d %s' %(\"Net exchange of radiation =\",Q12,\"Btu/hr\")\n", - "print '%s' %(\"The answer in the textbook is a bit different due to rounding off error in textbook.\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "from curve 3\n", - "Net exchange of radiation = 58844 Btu/hr\n", - "The answer in the textbook is a bit different due to rounding off error in textbook.\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8 - Pg 416" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Net exchange of radiation\n", - "#Initialization of variables\n", - "F=0.51\n", - "A1=8 #ft^2\n", - "sigma=0.1714\n", - "T1=2260. #R\n", - "T2=530. #R\n", - "#calculations\n", - "Q12=A1*F*sigma*((T1/100)**4 -(T2/100)**4)\n", - "#results\n", - "print '%s %d %s' %(\"Net exchange of radiation =\",Q12,\"Btu/hr\")\n", - "print '%s' %(\"The answer in the textbook is a bit different due to rounding off error in textbook.\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Net exchange of radiation = 181881 Btu/hr\n", - "The answer in the textbook is a bit different due to rounding off error in textbook.\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9 - Pg 417" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Net exchange of radiation\n", - "#Initialization of variables\n", - "F=0.51\n", - "A1=8. #f^2\n", - "sigma=0.1714\n", - "T1=2260. #R\n", - "T2=530. #R\n", - "#calculations\n", - "F12=1/(1/0.51 +(1/0.9 -1) +(1/0.6 -1))\n", - "Q12=A1*F12*sigma*((T1/100)**4 -(T2/100)**4)\n", - "#results\n", - "print '%s %d %s' %(\"Net exchange of radiation =\",Q12,\"Btu/hr\")\n", - "print '%s' %(\"The answer in the textbook is a bit different due to rounding off error in textbook.\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Net exchange of radiation = 130225 Btu/hr\n", - "The answer in the textbook is a bit different due to rounding off error in textbook.\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10 - Pg 418" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Percentage change in total heat transfer\n", - "#Initialization of variables\n", - "em=0.79\n", - "sigma=0.1714\n", - "T1=660. #R\n", - "T2=540. #R\n", - "T3=860. #R\n", - "#calculations\n", - "Q1=em*sigma*((T1/100)**4 -(T2/100)**4)\n", - "Q2=em*sigma*((T3/100)**4 -(T2/100)**4)\n", - "Qh1=129+Q1\n", - "Qh2=419+Q2\n", - "per=100*(Qh2-Qh1)/Qh1\n", - "#results\n", - "print '%s %.1f %s' %(\"Percentage change in total heat transfer =\",per,\"percent\")\n", - "print '%s' %(\"The answer in the textbook is a bit different due to rounding off error in textbook.\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Percentage change in total heat transfer = 285.7 percent\n", - "The answer in the textbook is a bit different due to rounding off error in textbook.\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 11 - Pg 419" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Error in probe reading\n", - "#Initialization of variables\n", - "Tp=12.57\n", - "Tw=10.73\n", - "ep=0.8\n", - "sig=0.1714\n", - "hc=7\n", - "#calculations\n", - "dt=ep*sig*(Tp**4-Tw**4)/hc\n", - "#results\n", - "print '%s %d %s' %(\"Error in probe reading =\",dt,\"F\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Error in probe reading = 229 F\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 12 - Pg 420" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Heat transfer in both cases\n", - "#Initialization of variables\n", - "import math\n", - "l=6 #ft\n", - "d1=0.55 #in\n", - "d2=0.75 #in\n", - "h1=280. #Btu/hr ft^2 F\n", - "h2=2000. #Btu/fr ft^2 F\n", - "k=220. #Btu/hr ft F\n", - "t2=212. #F\n", - "t1=60. #F\n", - "f=500. #Btu/hr ft^2 F\n", - "#calculations\n", - "A2=math.pi*d1*l/12\n", - "A3=math.pi*d2*l/12\n", - "Rt=1/(h1*A2) + 1/(h2*A3) +math.log(d2/d1) /(2*math.pi*k*l)\n", - "Q=(t2-t1)/Rt\n", - "Rt2=Rt+ 1/(f*A2)\n", - "Q2=(t2-t1)/Rt2\n", - "#results\n", - "print '%s %d %s' %(\"Heat transfer =\",Q,\"Btu/hr\")\n", - "print '%s %d %s' %(\"\\n Heat transfer in case 2=\",Q2,\" Btu/hr\")\n", - "print '%s' %(\"The answer in the textbook is a bit different due to rounding off error in textbook.\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Heat transfer = 33074 Btu/hr\n", - "\n", - " Heat transfer in case 2= 21994 Btu/hr\n", - "The answer in the textbook is a bit different due to rounding off error in textbook.\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 13 - Pg 422" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Overall Heat transfer coefficient\n", - "#Initialization of variables\n", - "import math\n", - "l=6 #ft\n", - "d1=0.55 #in\n", - "d2=0.75 #in\n", - "h1=280. #Btu/hr ft^2 F\n", - "h2=2000. #Btu/fr ft^2 F\n", - "k=220. #Btu/hr ft F\n", - "t2=212. #F\n", - "t1=60. #F\n", - "#calculations\n", - "A2=math.pi*d1*l/12\n", - "A3=math.pi*d2*l/12\n", - "Rt=1/(h1*A2) + 1/(h2*A3) +math.log(d2/d1) /(2*math.pi*k*l)\n", - "U3=1/(A3*Rt)\n", - "#results\n", - "print '%s %.1f %s' %(\"Overall Heat transfer coefficient =\",U3,\"Btu/hr ft^2 F\")\n", - "print '%s' %(\"The answer in the textbook is a bit different due to rounding off error in textbook.\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Overall Heat transfer coefficient = 184.7 Btu/hr ft^2 F\n", - "The answer in the textbook is a bit different due to rounding off error in textbook.\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 14 - Pg 427" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Parameters X and Z\n", - "#Initialization of variables\n", - "t1=300. #F\n", - "t2=260. #F\n", - "t3=200. #F\n", - "t4=160. #F\n", - "#calculations\n", - "X=(t2-t4)/(t1-t4)\n", - "Z=(t1-t3)/(t2-t4)\n", - "#results\n", - "print '%s %.3f %s %.1f %s' %(\"Parameters X and Z are\",X, \"and\",Z,\"respectively\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Parameters X and Z are 0.714 and 1.0 respectively\n" - ] - } - ], - "prompt_number": 16 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_2.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_2.ipynb deleted file mode 100755 index 511042b0..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_2.ipynb +++ /dev/null @@ -1,102 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:e3ffdae85ed1c10a54629e535e9e044264a512de563ad3fb48c98b93c4a65432" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2 - Fundamental Concepts" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 18" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the potential energy\n", - "#Initialization of variables\n", - "z=100 #ft\n", - "m=32.1739 #lbm\n", - "#calculations\n", - "PE=m*z\n", - "#results\n", - "print '%s %.2f %s' %(\"Potential energy =\",PE,\"ft-lbm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Potential energy = 3217.39 ft-lbm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 21" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the absolute energy of this mixture and the change in mass\n", - "#Initialization of variables\n", - "m0=18.016 #lbm\n", - "gc=32.1739 #lbm ft/lbf sec^2\n", - "c=186000*5280\n", - "dU=94.4*10**6 #ft-lbf\n", - "#calculations\n", - "U=m0/gc *c**2\n", - "dm= -dU*gc/c**2\n", - "#results\n", - "print '%s %.2e %s' %(\"Absolute energy of this mixture =\",U,\" ft-lbf\")\n", - "print '%s' %(\"\\n In case b, there is no change in mass\")\n", - "print '%s %.2e %s' %(\"\\n Change in mass =\",dm,\" lbm\")\n", - "print '%s' %(\"The answers are a bit different due to rounding off error in textbook.\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Absolute energy of this mixture = 5.40e+17 ft-lbf\n", - "\n", - " In case b, there is no change in mass\n", - "\n", - " Change in mass = -3.15e-09 lbm\n", - "The answers are a bit different due to rounding off error in textbook.\n" - ] - } - ], - "prompt_number": 2 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_20.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_20.ipynb deleted file mode 100755 index c603307c..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_20.ipynb +++ /dev/null @@ -1,377 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:dd9802b686cdfc5d04064f27577856b20913db7526956cd0d6229f433fb9f632" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 20 - Advanced topics in heat transfer" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 437" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Surface temperature of transmission line, rate of heat generation and max temperature in the line\n", - "#Initialization of variables\n", - "import math\n", - "heat=54.5 #Btu/hr ft\n", - "d=0.811 #in\n", - "h=2.5 #Btu/hr ft**2 F\n", - "ts=100 #F\n", - "km=220 #Btu/hr ft F\n", - "#calculations\n", - "t2=heat*12/(h*math.pi*d) +ts\n", - "w=heat*4*144/(math.pi*d**2)\n", - "t1=w*(d/2)**2 /(4*144*km) + t2\n", - "#results\n", - "print '%s %.1f %s' %(\"Surface temperature of transmission line =\",t2,\" F\")\n", - "print '%s %d %s' %(\"\\n Rate of heat generation per unit volume of wire =\",w,\"Btu/hr ft^2\")\n", - "print '%s %.2f %s' %(\"\\n Max. temperature in the line =\",t1,\" F\")\n", - "print '%s' %(\"The answers in the textbook are a bit different due to rounding off errors\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Surface temperature of transmission line = 202.7 F\n", - "\n", - " Rate of heat generation per unit volume of wire = 15192 Btu/hr ft^2\n", - "\n", - " Max. temperature in the line = 202.70 F\n", - "The answers in the textbook are a bit different due to rounding off errors\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 442" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the heat rate, total hourly loss and approx. temp of the tip of the fin and total heat loss\n", - "#Initialization of variables\n", - "import math\n", - "d1=1. #in\n", - "l=1. #ft\n", - "r=0.5 #ft\n", - "L=0.5 #in\n", - "Ts=430. #F\n", - "Ta=170. #F\n", - "dela=0.0125 #ft\n", - "h=10. #Btu/hr ft^2 F\n", - "eta=0.77\n", - "eta2=0.94\n", - "n=60. #fins\n", - "thick=0.025 #in\n", - "k2=132. #Btu/hr ft F\n", - "#calculations\n", - "Q=h*math.pi*d1**2 *(Ts-Ta)/12\n", - "rate=(r+L)/r\n", - "k=26 #Btu/hr ft F\n", - "Lt=L/12 *(h*12/(k*dela))**(1/2)\n", - "dtm=eta*(Ts-Ta)\n", - "As=2*math.pi*((2*d1)**2 -d1**2)/4\n", - "Q1=h*n*As*dtm/144\n", - "Q2=h*math.pi*d1*(12-60*thick)*(Ts-Ta)/144\n", - "Qt=Q1+Q2\n", - "al=0.8\n", - "tl=Ta+(Ts-Ta)/math.cosh(al)\n", - "al2=r/12 *(h*12*2/(k2*thick))\n", - "dtm2=eta2*(Ts-Ta)\n", - "Q12=h*n*As*dtm2/144\n", - "Qt2=Q12+Q2\n", - "#results\n", - "print '%s %.1f %s' %(\"Heat rate per foot of bare tube =\",Q,\"Btu/hr\")\n", - "print '%s %.1f %s' %(\"\\n Total hourly heat loss per foot of finned tube =\",Qt,\"Btu/hr\")\n", - "print '%s %d %s' %(\"\\n Approx. temp for tip of the fin =\",tl,\"F\")\n", - "print '%s %.1f %s' %(\"\\n In case of Al, Total beat loss =\",Qt2,\" Btu/hr\")\n", - "print '%s' %(\"The answers in the textbook are a bit different due to rounding off errors\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Heat rate per foot of bare tube = 680.7 Btu/hr\n", - "\n", - " Total hourly heat loss per foot of finned tube = 4526.5 Btu/hr\n", - "\n", - " Approx. temp for tip of the fin = 364 F\n", - "\n", - " In case of Al, Total beat loss = 5394.4 Btu/hr\n", - "The answers in the textbook are a bit different due to rounding off errors\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 444" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Length required\n", - "#Initialization of variables\n", - "import math\n", - "tl=125. #F\n", - "t0=80. #F\n", - "t1=1000. #F\n", - "d=1. #in\n", - "k=25. #Btu/hr ft F\n", - "k2=0.0208\n", - "Nu=18.\n", - "#calculations\n", - "byal=(tl-t0)/(t1-t0)\n", - "al=math.acosh(1/byal)\n", - "b=math.pi*d/12.\n", - "A=math.pi*d**2 /(4*144)\n", - "tm=(tl+t1)/2. +460\n", - "hr=0.79*0.1714*((tm/100)**4 - ((t0+460)/100)**4)/(tm-460-t0)\n", - "hc=Nu*k2*12/d\n", - "a=((hc+hr)*b/(k*A))**(0.5)\n", - "L=al/a\n", - "#results\n", - "print '%s %.2f %s' %(\"Length required =\",L,\" ft\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Length required = 0.99 ft\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 - Pg 452" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the time required\n", - "#Initialization of variables\n", - "import math\n", - "c=0.0947 #Btu/lbm F\n", - "rho=0.0551 #lbm/ft**3\n", - "mu=0.0553 #lbm/hr ft\n", - "t1=440. #F\n", - "ts=400. #F\n", - "t2=80. #F\n", - "d=0.1 #in\n", - "k=0.0194 #Btu/hr ft**2 F\n", - "rho2=558. #lbm/ft**3\n", - "v=10. #ft/s\n", - "#calculations\n", - "Re=d*3600*v*rho/(12*mu)\n", - "Nu=0.37*Re**0.6\n", - "hc=k*Nu*12/d\n", - "ex=math.log((t1-ts)/(t1-t2))\n", - "tau=-ex*d*rho2*c/(12*6*hc)\n", - "time=tau*3600\n", - "#results\n", - "print '%s %d %s' %(\"Time required =\",time,\"sec\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time required = 22 sec\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 - Pg 456" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Cooling time and Center temperature\n", - "#Initialization of variables\n", - "h=2 #Btu/hr ft**2 F\n", - "delta=1/6.\n", - "t=125. #F\n", - "t0=100. #F\n", - "ti=350. #F\n", - "k=0.167 #Btu/hr ft F\n", - "rho=80. #lbm/ft**3\n", - "c=0.4 #Btu/lbm F\n", - "#calculations\n", - "Bi=h*delta/k\n", - "tr=(t-t0)/(ti-t0)\n", - "tau=1.5*delta**2 *rho*c/k\n", - "tr2=0.21\n", - "tc=tr2*(ti-t0) + t0\n", - "#results\n", - "print '%s %.2f %s' %(\"Cooling time =\",tau,\" hr\")\n", - "print '%s %d %s' %(\"\\n Center temperature =\",tc,\" F\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Cooling time = 7.98 hr\n", - "\n", - " Center temperature = 152 F\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 - Pg 458" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate if the thin layero f insulation would increase the heat dissipation from wire\n", - "#Initialization of variables\n", - "h=2.5 #Btu/hr ft^2 F\n", - "kc=0.1 #Btu/hr ft F\n", - "r1=0.811/2\n", - "#calculations\n", - "r2c=kc/h *12\n", - "#results\n", - "if r2c>=r1:\n", - " print '%s %.2f %s' %(\"Thin layer of insulation would increase the heat dissipation from wire, r2c =\",r2c,\"in\")\n", - "else:\n", - " print '%s %.2f %s' %(\"Thin layer of insulation would decrease the heat dissipation from wire. r2c=\",r2c,\"in\")\n", - "\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thin layer of insulation would increase the heat dissipation from wire, r2c = 0.48 in\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8 - Pg 465" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the heat transfer from surfaces 1,2,3 and Temperature of surface R\n", - "#Initialization of variables\n", - "F12=0.19\n", - "F13=F12\n", - "FR3=F13\n", - "F2R=0.38\n", - "J1=1714.\n", - "Wb2=0.1714\n", - "#calculations\n", - "print '%s' %(\"Upon solving the simultaneous equations\")\n", - "Q1=1774 #Btu/hr ft\n", - "Q2=-547 #Btu/r ft\n", - "Q3=-1227 #Btu/hr ft\n", - "J2=548 #Btu/hr ft^2\n", - "Tr=909 #R\n", - "#results\n", - "print '%s %d %s' %(\"Heat transfer rate from surface 1 =\",Q1,\" Btu/hr ft\")\n", - "print '%s %d %s' %(\"\\n Heat transfer rate from surface 2 =\",Q2,\" Btu/hr ft\")\n", - "print '%s %d %s' %(\"\\n Heat transfer rate from surface 3 =\",Q3,\" Btu/hr ft\")\n", - "print '%s %d %s' %(\"\\n Temperature of surface R =\",Tr,\"R\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Upon solving the simultaneous equations\n", - "Heat transfer rate from surface 1 = 1774 Btu/hr ft\n", - "\n", - " Heat transfer rate from surface 2 = -547 Btu/hr ft\n", - "\n", - " Heat transfer rate from surface 3 = -1227 Btu/hr ft\n", - "\n", - " Temperature of surface R = 909 R\n" - ] - } - ], - "prompt_number": 7 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_5.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_5.ipynb deleted file mode 100755 index 20adaee3..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_5.ipynb +++ /dev/null @@ -1,146 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:ce73d802673a1107e52bf47eb7b2328d569cd7caf2e704d6bf5c2e992f46aa53" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 5 - The first law and the dynamic open system" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 68" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the work done by the system and power\n", - "#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 '%s %.1f %s' %(\"work done by the system =\",dw,\"Btu/lbm\")\n", - "print '%s %.1f %s' %(\"\\n Power =\",power,\"Btu/s\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "work done by the system = -9.7 Btu/lbm\n", - "\n", - " Power = -48.6 Btu/s\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 69" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the area of inlet pipe\n", - "#Initialization of variables\n", - "V=100 #ft/s\n", - "v=15. #lbm/ft^3\n", - "m=5. #lbm/s\n", - "#calculations\n", - "A=m*v/V\n", - "#results\n", - "print '%s %.2f %s' %(\"Area of inlet pipe =\",A,\"ft^2\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Area of inlet pipe = 0.75 ft^2\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 79" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the final temperature of the steam and change in temperature\n", - "#Initialization of variables\n", - "P=100. #psia\n", - "#calculations\n", - "print '%s' %(\"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 '%s %d %s' %(\"Final temperature of the steam =\",t2,\"F\")\n", - "print '%s %d %s' %(\"\\n Change in temperature =\",dt,\"F\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From table B-4\n", - "Final temperature of the steam = 540 F\n", - "\n", - " Change in temperature = 212 F\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_7.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_7.ipynb deleted file mode 100755 index 92d0279f..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_7.ipynb +++ /dev/null @@ -1,162 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:15d0388b2c544d629a9ec990a9a36b6e26ea291bc7812312e5319e0c4bde1ab8" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 7 - The second law" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 112" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the entropy in parts ab,ac and efficiency\n", - "#Initialization of variables\n", - "import math\n", - "cv=0.175 #Btu/lbm R\n", - "R0=1.986\n", - "M=29\n", - "T2=1040 #R\n", - "T1=520 #R\n", - "#calculations\n", - "cp=cv+R0/M\n", - "sab=cv*math.log(T2/T1)\n", - "sac=cp*math.log(T2/T1)\n", - "dqab=cv*(T2-T1)\n", - "dqca=cp*(T1-T2)\n", - "dqrev=T2*(sac-sab)\n", - "eta=(dqab+dqrev+dqca)/(dqab+dqrev)*100\n", - "#results\n", - "print '%s %.4f %s' %(\"Entropy in ab part =\",sab,\"Btu/lbm R\")\n", - "print '%s %.4f %s' %(\"\\n Entropy in ac part =\",sac,\" Btu/lbm R\")\n", - "print '%s %.2f %s' %(\"\\n Efficiency =\",eta,\" percent\")\n", - "print '%s' %(\"The answers are a bit different due to rounding off error in textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Entropy in ab part = 0.1213 Btu/lbm R\n", - "\n", - " Entropy in ac part = 0.1688 Btu/lbm R\n", - "\n", - " Efficiency = 9.80 percent\n", - "The answers are a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 115" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the change in entropy of the process\n", - "#Initialization of variables\n", - "import math\n", - "tc=32. #F\n", - "th=80. #F\n", - "mw=5 #lbm\n", - "mi=1 #lbm\n", - "P=14.7 #psia\n", - "cp=1\n", - "#calculations\n", - "t= (-144*mi+tc*mi+th*mw)/(mw+mi)\n", - "ds1=144/(tc+460)\n", - "ds2=cp*math.log((460+t)/(460+tc))\n", - "dsice=ds1+ds2\n", - "dswater=mw*cp*math.log((t+460)/(460+th))\n", - "ds=dsice+dswater\n", - "#results\n", - "print '%s %.4f %s' %(\"Change in entropy of the process =\",ds,\"Btu/R\")\n", - "print '%s' %(\"The answer is a bit different due to rounding off error in textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Change in entropy of the process = 0.0192 Btu/R\n", - "The answer is a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 119" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the change in available energy\n", - "#Initialization of variables\n", - "import math\n", - "cp=1\n", - "T2=60. #F\n", - "T1=100. #F\n", - "ta=32. #F\n", - "#calculations\n", - "dq=cp*(T2-T1)\n", - "ds=cp*math.log((460+T2)/(460+T1))\n", - "dE=dq-ds*(ta+460)\n", - "#results\n", - "print '%s %.1f %s' %(\"Change in available energy =\",dE,\"Btu/lbm\")\n", - "print '%s' %(\"The answer is a bit different due to rounding off error in textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Change in available energy = -3.5 Btu/lbm\n", - "The answer is a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_8.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_8.ipynb deleted file mode 100755 index d35614c2..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_8.ipynb +++ /dev/null @@ -1,142 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:efb3cb597d2918b83a867fe2c379b3952acba398aec14a9edf762b5c40043583" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 8 - Second and third law topics" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 125" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the value of dp/ds at constant volume\n", - "#Initialization of variables\n", - "P=500 #psia\n", - "T=700. #F\n", - "J=778.\n", - "#calculations\n", - "dpds=1490 *144/J\n", - "#results\n", - "print '%s %d %s' %(\"dp by ds at constant volume =\",dpds,\" F/ft^3/lbm\")\n", - "print '%s' %(\"The answer is a bit different due to rounding off error in textbook\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "dp by ds at constant volume = 275 F/ft^3/lbm\n", - "The answer is a bit different due to rounding off error in textbook\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 131" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the thermal efficiency\n", - "#Initialization of variables\n", - "import math\n", - "cp=0.25 #Btu/lbm R\n", - "T0=520. #R\n", - "T1=3460. #R\n", - "#calculations\n", - "dq=cp*(T0-T1)\n", - "ds=cp*math.log(T0/T1)\n", - "dE=dq-T0*ds\n", - "eta=dE/dq*100.\n", - "#results\n", - "print '%s %.1f %s' %(\"Thermal efficiency =\",eta,\"percent\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Thermal efficiency = 66.5 percent\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 134" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Loss of available energy\n", - "#Initialization of variables\n", - "import math\n", - "cp=0.25 #Btu/lbm R\n", - "T0=520. #R\n", - "T1=3460. #R\n", - "dG=21069. #Btu/lbm\n", - "dH=21502. #Btu/lbm\n", - "#calculations\n", - "dq=cp*(T0-T1)\n", - "ds=cp*math.log(T0/T1)\n", - "dE=dq-T0*ds\n", - "eta=dE/dq\n", - "dw=eta*dH\n", - "de=-dG+dw\n", - "#results\n", - "print '%s %d %s' %(\"Loss of available energy =\",de,\"Btu/lbm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Loss of available energy = -6774 Btu/lbm\n" - ] - } - ], - "prompt_number": 3 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_9.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_9.ipynb deleted file mode 100755 index 48194c0d..00000000 --- a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_9.ipynb +++ /dev/null @@ -1,449 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:071044d67259dbca809a68700f00a2b22bbcf445c19f6ea5840022a417d2395b" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 9 - Properties of the pure substance" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 1 - Pg 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Internal energy\n", - "#Initialization of variables\n", - "T=32 #F\n", - "m=1 #lbm\n", - "J=778.16\n", - "#calculations\n", - "print '%s' %(\"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 '%s %.7f %s' %(\"Internal energy =\",u,\" Btu/lbm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From steam tables,\n", - "Internal energy = -0.0002625 Btu/lbm\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2 - Pg 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Change in entropy\n", - "#Initialization of variables\n", - "P=40 #psia\n", - "#calculations\n", - "print '%s' %(\"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 '%s %.3f %s' %(\"Change in entropy =\",ds,\"Btu/lbm R\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "from steam tables,\n", - "Change in entropy = 0.351 Btu/lbm R\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3 - Pg 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the specific enthalpy\n", - "#Initialization of variables\n", - "x=0.35\n", - "T=18. #F\n", - "#calculations\n", - "print '%s' %(\"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 '%s %.1f %s' %(\"specific enthalpy =\",h,\"Btu/lbm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From table B-14,\n", - "specific enthalpy = 36.0 Btu/lbm\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 4 - Pg 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the heat required\n", - "#Initialization of variables\n", - "x=0.35\n", - "T=18 #F\n", - "T2=55.5 #F\n", - "#calculations\n", - "print '%s' %(\"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 '%s %.2f %s' %(\"Heat required =\",dh,\"Btu/lbm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From table B-14,\n", - "Heat required = 49.71 Btu/lbm\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 5 - Pg 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the enthalpy and Quality\n", - "#Initialization of variables\n", - "P=1460. #psia\n", - "T=135. #F\n", - "P2=700. #psia\n", - "#calculations\n", - "print '%s' %(\"From mollier chart,\")\n", - "h=120 #Btu/lbm\n", - "x=0.83\n", - "#results\n", - "print '%s %d %s' %(\"enthalpy =\",h,\"Btu/lbm\")\n", - "print '%s %.2f' %(\"\\n Quality =\",x)\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From mollier chart,\n", - "enthalpy = 120 Btu/lbm\n", - "\n", - " Quality = 0.83\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 6 - Pg 149" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Heat transferred\n", - "#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 '%s' %(\"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 '%s %.1f %s' %(\"Heat transferred =\",dq,\"Btu/lbm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From table 3,\n", - "Heat transferred = 11.4 Btu/lbm\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 7 - Pg 150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the work done and work required\n", - "#Initialization of variables\n", - "T1=100. #F\n", - "P2=1000. #psia\n", - "x=0.6\n", - "J=778.16\n", - "#calculations\n", - "print '%s' %(\"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 '%s %.1f %s' %(\"Work done =\",wrev,\"Btu/lbm\")\n", - "print '%s %.1f %s' %(\"\\n In case 2, work required =\",wact,\" Btu/lbm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From table 3,\n", - "Work done = -3.0 Btu/lbm\n", - "\n", - " In case 2, work required = -5.0 Btu/lbm\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 8 - Pg 150" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Heat transferred\n", - "#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 '%s' %(\"from steam table 2,\")\n", - "hc=1191.8 #Btu/lbm\n", - "qrev=hc-ha\n", - "#results\n", - "print '%s %.1f %s' %(\"Heat transferred =\",qrev,\" Btu/lbm\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "from steam table 2,\n", - "Heat transferred = 1120.8 Btu/lbm\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 9 - Pg 151" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the work done and Final state pressure\n", - "#Initialization of variables\n", - "P1=144 #psia\n", - "T1=400 #F\n", - "y=0.7\n", - "#calculations\n", - "print '%s' %(\"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 '%s %d %s' %(\"Work done =\",work,\"Btu/lbm\")\n", - "print '%s %.1f %s' %(\"\\n work done in case 2 =\",dw,\"Btu/lbm\")\n", - "print '%s %d %s' %(\"\\n Final state pressure =\",P2,\"psia\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "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" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 10 - Pg 154" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "#calculate the Quality of wet steam\n", - "#Initialization of variables\n", - "pb=14.696 #psia\n", - "pa=150 #psia\n", - "tb=300 #F\n", - "#calculations\n", - "print '%s' %(\"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*100\n", - "#results\n", - "print '%s %.1f %s' %(\"Quality of wet steam =\",x,\"percent\")\n" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "From steam tables,\n", - "Quality of wet steam = 99.8 percent\n" - ] - } - ], - "prompt_number": 10 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file -- cgit