diff options
author | kinitrupti | 2017-05-12 18:40:35 +0530 |
---|---|---|
committer | kinitrupti | 2017-05-12 18:40:35 +0530 |
commit | d36fc3b8f88cc3108ffff6151e376b619b9abb01 (patch) | |
tree | 9806b0d68a708d2cfc4efc8ae3751423c56b7721 /Thermodynamics_for_Engineers/Chapter_19_1.ipynb | |
parent | 1b1bb67e9ea912be5c8591523c8b328766e3680f (diff) | |
download | Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.gz Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.bz2 Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.zip |
Revised list of TBCs
Diffstat (limited to 'Thermodynamics_for_Engineers/Chapter_19_1.ipynb')
-rwxr-xr-x | Thermodynamics_for_Engineers/Chapter_19_1.ipynb | 625 |
1 files changed, 0 insertions, 625 deletions
diff --git a/Thermodynamics_for_Engineers/Chapter_19_1.ipynb b/Thermodynamics_for_Engineers/Chapter_19_1.ipynb deleted file mode 100755 index c26dff35..00000000 --- a/Thermodynamics_for_Engineers/Chapter_19_1.ipynb +++ /dev/null @@ -1,625 +0,0 @@ -{
- "metadata": {
- "name": "",
- "signature": "sha256:b29f8e2efad125f0a07d8b8d8802c0ef47be5bcad75aba5a349e2e6b7da74bda"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter 19 - Gas Turbines"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 1 - Pg 398"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#calculate the compressor work, turbine work and thermal efficiency in all cases\n",
- "#Initalization of variables\n",
- "import math\n",
- "n=1.4\n",
- "t1=540. #R\n",
- "tmax=1200. #F\n",
- "tmax2=1500. #F\n",
- "pr=5.\n",
- "cp=0.24\n",
- "#calculations\n",
- "t2=t1*math.pow(pr,(n-1)/n)\n",
- "work=cp*(t2-t1)\n",
- "t4=(tmax+460) /math.pow(pr,(n-1)/n)\n",
- "twork=cp*(tmax+460-t4)\n",
- "net=twork-work\n",
- "eff=(1- 1/math.pow(pr,(n-1)/n))*100\n",
- "Qs=cp*(tmax+460-t2)\n",
- "ett=net/Qs *100\n",
- "t42=(tmax2+460)/math.pow(pr,(n-1)/n)\n",
- "twork2=cp*(tmax2+460-t42)\n",
- "net2=twork2-work\n",
- "Qs2=cp*(tmax2+460-t2)\n",
- "eff3=net2/Qs2 *100\n",
- "#results\n",
- "print '%s %.1f %s' %(\"Compressor work =\",work,\"Btu/lb\")\n",
- "print '%s %.1f %s' %(\"\\n Turbine work =\",twork,\"Btu/lb\")\n",
- "print '%s %.1f %s' %(\"\\n Net work =\",net,\"Btu/lb\")\n",
- "print '%s %.1f %s' %(\"\\n Thermal efficiency =\",eff,\"percent\")\n",
- "print '%s %.1f %s' %(\"\\n In case 2, Thermal efficiency =\",ett,\" percent\")\n",
- "print '%s %.1f %s' %(\"\\n In case 2, Turbine work =\",twork2,\"Btu/lb\")\n",
- "print '%s %.1f %s' %(\"\\n In case 2, Net work =\",net2,\" Btu/lb\")\n",
- "print '%s %.1f %s' %(\"\\n In case 3, Thermal efficiency =\",eff3,\" percent,\")\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Compressor work = 75.7 Btu/lb\n",
- "\n",
- " Turbine work = 146.9 Btu/lb\n",
- "\n",
- " Net work = 71.2 Btu/lb\n",
- "\n",
- " Thermal efficiency = 36.9 percent\n",
- "\n",
- " In case 2, Thermal efficiency = 36.9 percent\n",
- "\n",
- " In case 2, Turbine work = 173.4 Btu/lb\n",
- "\n",
- " In case 2, Net work = 97.7 Btu/lb\n",
- "\n",
- " In case 3, Thermal efficiency = 36.9 percent,\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 2 - Pg 400"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#calculate the indicated compressor work, internal work and thermal efficiency\n",
- "#Initalization of variables\n",
- "work=75.9 #Btu/lb\n",
- "twork=173.5 #Btu/lb\n",
- "eta=0.8\n",
- "t2=856 #R\n",
- "t1=540 #R\n",
- "t4=1960 #R\n",
- "cp=0.24\n",
- "#calculations\n",
- "cwork=work/eta\n",
- "internal=twork*eta\n",
- "net=-cwork+internal\n",
- "t2d=(t2-t1)/eta + t1\n",
- "Qs=cp*(t4-t2d)\n",
- "eff=net/Qs *100\n",
- "#results\n",
- "print '%s %.1f %s' %(\"Indicated compressor work =\",cwork,\" Btu/lb\")\n",
- "print '%s %.1f %s' %(\"\\n Internal work =\",internal,\"Btu/lb\")\n",
- "print '%s %.1f %s' %(\"\\n Net work =\",net,\" Btu/lb\")\n",
- "print '%s %.2f %s' %(\"\\n Thermal efficiency =\",eff,\"percent\")\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Indicated compressor work = 94.9 Btu/lb\n",
- "\n",
- " Internal work = 138.8 Btu/lb\n",
- "\n",
- " Net work = 43.9 Btu/lb\n",
- "\n",
- " Thermal efficiency = 17.86 percent\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 3 - Pg 402"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#calculate the compressor work, turbine work and thermal efficiency\n",
- "#Initalization of variables\n",
- "eff=0.97\n",
- "c1=94.9 #Btu/lb\n",
- "c2=138.8 #Btu/lb\n",
- "ntee=246. #Btu/lb\n",
- "#calculations\n",
- "cwork=c1/eff\n",
- "twork=c2*eff\n",
- "net=twork-cwork\n",
- "etat=net/ntee *100\n",
- "#results\n",
- "print '%s %.1f %s' %(\"Compressor work =\",cwork,\"Btu/lb\")\n",
- "print '%s %.1f %s' %(\"\\n Turbine work =\",twork,\" Btu/lb\")\n",
- "print '%s %.1f %s' %(\"\\n Net work =\",net,\" Btu/lb\")\n",
- "print '%s %.1f %s' %(\"\\n Thermal efficiency =\",etat,\"percent\")\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Compressor work = 97.8 Btu/lb\n",
- "\n",
- " Turbine work = 134.6 Btu/lb\n",
- "\n",
- " Net work = 36.8 Btu/lb\n",
- "\n",
- " Thermal efficiency = 15.0 percent\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 4 - Pg 403"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#calculate the thermal efficiency\n",
- "#Initalization of variables\n",
- "import math\n",
- "pr=5.\n",
- "p1=14. #psia\n",
- "pd=3. #psi\n",
- "pen=70. #psia\n",
- "tin=1960. #R\n",
- "n=1.4\n",
- "cp=0.24\n",
- "Qs=265. #Btu/lb\n",
- "#calculations\n",
- "p2=p1*pr\n",
- "pe=pen-pd\n",
- "prt=pe/p1\n",
- "tex=tin/math.pow(prt,(n-1)/n)\n",
- "twork=cp*(tin-tex)\n",
- "net=twork-75.9\n",
- "eff=net/Qs *100.\n",
- "#results\n",
- "print '%s %.1f %s' %(\"Thermal efficiency =\",eff,\"percent\")\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Thermal efficiency = 35.4 percent\n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 5 - Pg 403"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#calculate the thermal efficiency\n",
- "#Initalization of variables\n",
- "import math\n",
- "pr=5.\n",
- "p1=14. #psia\n",
- "pd=3. #psi\n",
- "pen=70. #psia\n",
- "tin=1960. #R\n",
- "n=1.4\n",
- "cp=0.24\n",
- "Qs=265.\n",
- "ef=0.95\n",
- "#calculations\n",
- "p2=p1*pr\n",
- "pe=pen-pd\n",
- "prt=pe/p1\n",
- "tex=tin/math.pow(prt,(n-1)/n)\n",
- "twork=cp*(tin-tex)\n",
- "net=twork-75.9\n",
- "Qs2=Qs/ef\n",
- "eff=net/Qs2 *100.\n",
- "#results\n",
- "print '%s %.1f %s' %(\"Thermal efficiency =\",eff,\"percent\")"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Thermal efficiency = 33.6 percent\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 6 - Pg 404"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#calculate the final pressure\n",
- "#Initalization of variables\n",
- "pr1=1.0590\n",
- "pr2=4.396\n",
- "p1=14. #psia\n",
- "#calculations\n",
- "prr=pr2/pr1\n",
- "p2=p1*prr\n",
- "#results\n",
- "print '%s %.1f %s' %(\"Final pressure =\",p2,\" psia\")\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Final pressure = 58.1 psia\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 7 - Pg 404"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#calculate the compressor work\n",
- "#Initalization of variables\n",
- "t1=540. #R\n",
- "h1=129.06\n",
- "pr1=1.386\n",
- "cr=5.\n",
- "#calculations\n",
- "pr2=pr1*cr\n",
- "print '%s' %(\"From air tables,\")\n",
- "h2=204.63\n",
- "cwork=h2-h1\n",
- "#results\n",
- "print '%s %.2f %s' %(\"Compressor work =\",cwork,\"Btu/lb\")\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "From air tables,\n",
- "Compressor work = 75.57 Btu/lb\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 8 - Pg 405"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#calculate the turbine work\n",
- "#Initalization of variables\n",
- "cr=5.\n",
- "pr3=176.73 #psia\n",
- "h3=14580.3 #Btu/mol\n",
- "M=28.9\n",
- "#calculations\n",
- "pr4=pr3/cr\n",
- "h4=9409.\n",
- "twork=h3-h4\n",
- "turb=twork/M\n",
- "#results\n",
- "print '%s %.1f %s' %(\"Turbine work =\",turb,\" Btu/lb\")\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Turbine work = 178.9 Btu/lb\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 9 - Pg 407"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#calculate the air fuel ratio\n",
- "#Initalization of variables\n",
- "chem=19000. #Btu/lb\n",
- "m1=204.63 #Btu/lb\n",
- "M=28.9\n",
- "w=14580.3\n",
- "#calculations\n",
- "ma=(chem-w/M)/(w/M -m1)\n",
- "#results\n",
- "print '%s %.1f %s' %(\"Air fuel ratio =\",ma,\"lb air/lb fuel\")\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Air fuel ratio = 61.7 lb air/lb fuel\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 10 - Pg 409"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#calculate the thermal efficiency of the unit\n",
- "#Initalization of variables\n",
- "cp=0.24\n",
- "h=138.8\n",
- "t3=1960. #R\n",
- "#calculations\n",
- "t4d=t3-h/cp\n",
- "Qs=cp*(t3-t4d)\n",
- "work=43.9 #Btu/lb\n",
- "etat=work/Qs *100.\n",
- "#results\n",
- "print '%s %.1f %s' %(\"Thermal efficiency of the unit =\",etat,\"percent\")\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Thermal efficiency of the unit = 31.6 percent\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 11 - Pg 412"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#calculate the thermal efficiency\n",
- "#Initalization of variables\n",
- "import math\n",
- "n=1.4\n",
- "t1=540. #R\n",
- "tmax=1500. #F\n",
- "pr=5.\n",
- "cp=0.24\n",
- "p1=14. #psia\n",
- "p3=70. #psia\n",
- "#calculations\n",
- "pint=p1*math.sqrt(pr)\n",
- "t2=t1*math.pow(pint/p1,((n-1)/n))\n",
- "t4=t1*math.pow(p3/pint,((n-1)/n))\n",
- "w=cp*(t4-t1)\n",
- "w2=2*w\n",
- "t6=(tmax+460)/math.pow(p3/pint,((n-1)/n))\n",
- "t8=(tmax+460)/math.pow(pint/p1,((n-1)/n))\n",
- "work=cp*(tmax+460-t6)\n",
- "w22=2*work\n",
- "net=w22-w2\n",
- "Qa=cp*(tmax+460-t2)\n",
- "Qb=cp*(tmax+460-t6)\n",
- "Qt=Qa+Qb\n",
- "eta=net/Qt*100.\n",
- "#results\n",
- "print '%s %.2f %s' %(\"Thermal efficiency =\",eta,\"percent\")\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Thermal efficiency = 31.25 percent\n"
- ]
- }
- ],
- "prompt_number": 11
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 12 - Pg 413"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#calculate the thermal efficiency\n",
- "#Initalization of variables\n",
- "import math\n",
- "n=1.4\n",
- "t1=540. #R\n",
- "tmax=1500. #F\n",
- "pr=5.\n",
- "cp=0.24\n",
- "p1=14. #psia\n",
- "p3=70. #psia\n",
- "w2=75.9 #Btu/lb\n",
- "Qa=265 #Btu/lb\n",
- "#calculations\n",
- "pint=p1*math.sqrt(pr)\n",
- "t6=(tmax+460)/math.pow(p3/pint,((n-1)/n))\n",
- "t8=(tmax+460)/math.pow(pint/p1,((n-1)/n))\n",
- "work=cp*(tmax+460-t6)\n",
- "w22=2*work\n",
- "net=w22-w2\n",
- "Qb=cp*(tmax+460-t6)\n",
- "Qt=Qa+Qb\n",
- "eta=net/Qt*100.\n",
- "#results\n",
- "print '%s %.1f %s' %(\"Thermal efficiency =\",eta,\"percent\")"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Thermal efficiency = 32.4 percent\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example 13 - Pg 413"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#calculate the thermal efficiency\n",
- "#Initalization of variables\n",
- "n=1.4\n",
- "t1=540. #R\n",
- "tmax=1500. #F\n",
- "pr=5.\n",
- "cp=0.24\n",
- "t3=1558. #R\n",
- "net=125.8 #Btu/lb\n",
- "#calculations\n",
- "Q=cp*(tmax+460-t3)\n",
- "Qt=2*Q\n",
- "eta=net/Qt*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 = 65.2 percent\n"
- ]
- }
- ],
- "prompt_number": 13
- }
- ],
- "metadata": {}
- }
- ]
-}
\ No newline at end of file |