From 92cca121f959c6616e3da431c1e2d23c4fa5e886 Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Tue, 7 Apr 2015 15:58:05 +0530 Subject: added books --- .../Chapter9.ipynb | 540 +++++++++++++++++++++ 1 file changed, 540 insertions(+) create mode 100755 Thermodynamics_An_Engineering_Approach/Chapter9.ipynb (limited to 'Thermodynamics_An_Engineering_Approach/Chapter9.ipynb') diff --git a/Thermodynamics_An_Engineering_Approach/Chapter9.ipynb b/Thermodynamics_An_Engineering_Approach/Chapter9.ipynb new file mode 100755 index 00000000..1008c6c0 --- /dev/null +++ b/Thermodynamics_An_Engineering_Approach/Chapter9.ipynb @@ -0,0 +1,540 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Gas Power Cycles" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9-2 ,Page No.498" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "T1=17+273;#temperature of air in K\n", + "P1=100;#pressure of air in kPa\n", + "r=8.0;#compression ratio i.e v1/v2\n", + "qin=800;#heat transfer rate in kJ/kg\n", + "\n", + "#constants used\n", + "R=0.287;#in kPa-m^3/kg-K\n", + "\n", + "#from Table A-17\n", + "#at T1\n", + "u1=206.91;\n", + "vr1=676.1;\n", + "\n", + "#calculations\n", + "#Process 1-2\n", + "vr2=vr1/r;\n", + "#at this vr2\n", + "T2=652.4;\n", + "u2=475.11;\n", + "P2=P1*(T2/T1)*(r);\n", + "#Process 2-3\n", + "u3=qin+u2;\n", + "#at this u3\n", + "T3=1575.1;\n", + "vr3=6.108;\n", + "P3=P2*(T3/T2)*1;#factor of 1 as v3=v2\n", + "print'maximum temperature in the cycle %f K'%T3;\n", + "print'maximum pressure %f MPa'%round((P3/1000),3);#factor of 1000 to convert into MPa\n", + "#Process 3-4\n", + "vr4=r*vr3;\n", + "#at this vr4 \n", + "T4=795.6;\n", + "u4=588.74;\n", + "#Process 4-1\n", + "qout=u4-u1;\n", + "Wnet=qin-qout;\n", + "print'net work output %f kJ/kg'%round(Wnet,2);\n", + "nth=Wnet/qin;\n", + "print'thermal efficiency is %f'%round(nth,3);\n", + "v1=R*T1/P1;\n", + "MEP=Wnet/(v1*(1-1/r));\n", + "MEP=round(MEP);\n", + "print'mean effective pressure %i kPa'%(MEP)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum temperature in the cycle 1575.100000 K\n", + "maximum pressure 4.345000 MPa\n", + "net work output 418.170000 kJ/kg\n", + "thermal efficiency is 0.523000\n", + "mean effective pressure 574 kPa\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9-3 ,Page No.501" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "V1=117.0;#intial volumne in in^3\n", + "T1=80+460.0;#intial temperature in R\n", + "P1=14.7;#intial pressure in psia\n", + "r=18.0;#compression ratio\n", + "rc=2.0;#cut-off ratio\n", + "\n", + "#constants used\n", + "R=0.3704;#in psia ft^3/lbm R\n", + "cp=0.240;#in Btu/lbm R\n", + "cv=0.171;#in Btu/lbm R\n", + "\n", + "#from Table A-2Ea\n", + "k=1.4;\n", + "\n", + "#calculations\n", + "V2=V1/r;\n", + "V3=rc*V2;\n", + "V4=V1;\n", + "#Process 1-2\n", + "T2=T1*(V1/V2)**(k-1);\n", + "P2=P1*(V1/V2)**k;\n", + "T2=round(T2);\n", + "P2=round(P2);\n", + "print('Process 1-2');\n", + "print'temperature %i R'%T2;\n", + "print'pressure %i psia'%P2;\n", + "#Process 2-3\n", + "P3=P2;\n", + "T3=T2*(V3/V2);\n", + "T3=round(T3);\n", + "P3=round(P3);\n", + "print('Process 2-3');\n", + "print'temperature %i R'%T3;\n", + "print'pressure %i psia'%P3;\n", + "#Process 3-4\n", + "T4=T3*(V3/V4)**(k-1);\n", + "P4=P3*(V3/V4)**k;\n", + "T4=round(T4);\n", + "print('Process 3-4');\n", + "print'temperature %i R'%T4;\n", + "print'pressure %f psia'%round(P4,1);\n", + "m=P1*V1/(R*T1)/1728;#factor of 1728 to covert to ft^3 from in^3\n", + "Qin=m*cp*(T3-T2);\n", + "Qout=m*cv*(T4-T1);\n", + "Wnet=Qin-Qout ;\n", + "print'work output %f Btu'%round(Wnet,3);\n", + "nth=Wnet/Qin;\n", + "print'thermal efficiency is %f'%round(nth,3);\n", + "MEP=Wnet/(V1-V2)*778.17*12;#factor of 778.17 and 12 to convert to lbf ft and in from Btu and ft respectively\n", + "MEP=round(MEP);\n", + "print'mean effective pressure %i psia'%MEP" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Process 1-2\n", + "temperature 1716 R\n", + "pressure 841 psia\n", + "Process 2-3\n", + "temperature 3432 R\n", + "pressure 841 psia\n", + "Process 3-4\n", + "temperature 1425 R\n", + "pressure 38.800000 psia\n", + "work output 1.296000 Btu\n", + "thermal efficiency is 0.633000\n", + "mean effective pressure 110 psia\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9-5 ,Page No.511" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#given data\n", + "T1=300;#compressor inlet temperature in K\n", + "r=8;#pressure ratio\n", + "T3=1300;#turbine inlet temperature in K\n", + "\n", + "#calcualtions\n", + "#Process 1-2\n", + "#at T1\n", + "h1=300.19;\n", + "Pr1=1.386;\n", + "Pr2=r*Pr1;\n", + "#at Pr2\n", + "T2=540;\n", + "h2=544.35;\n", + "print'temperature at exit of compressor %i K'%T2;\n", + "#Process 3-4\n", + "#at T3\n", + "h3=1395.17;\n", + "Pr3=330.9;\n", + "Pr4=Pr3/r;\n", + "#at Pr4\n", + "T4=770;\n", + "h4=789.37;\n", + "print'temperature at turbine exit %i K'%T4;\n", + "Win=h2-h1;\n", + "Wout=h3-h4;\n", + "rbw=Win/Wout;\n", + "print'back work ratio is %f'%round(rbw,3);\n", + "qin=h3-h2;\n", + "Wnet=Wout-Win;\n", + "nth=Wnet/qin;\n", + "print'thermal efficeincy is %f'%round(nth,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "temperature at exit of compressor 540 K\n", + "temperature at turbine exit 770 K\n", + "back work ratio is 0.403000\n", + "thermal efficeincy is 0.425000\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9-6 ,Page No.513" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#from 9.5\n", + "Wsc=244.16;#work input of compressor in kJ/kg\n", + "Wst=606.60;#work output of turbine in kJ/kg\n", + "h1=300.19;#process 1-2 data\n", + "h3=1395.17;#process 3-4 data\n", + "\n", + "#given data\n", + "nC=0.8;#compressor effciency \n", + "nT=0.85;#turbine efficiency\n", + "\n", + "#calculations\n", + "Win=Wsc/nC;\n", + "Wout=nT*Wst;\n", + "rbw=Win/Wout;\n", + "print'back work ratio is %f'%round(rbw,3);\n", + "h2a=h1+Win;\n", + "qin=h3-h2a;\n", + "Wnet=Wout-Win;\n", + "nth=Wnet/qin;\n", + "print'thermal efficeincy is %f'%round(nth,3)\n", + "h4a=h3-Wout;\n", + "#from A-17 at h4a\n", + "T4a=853;\n", + "print'turbine exit temperature %i K is'%T4a\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "back work ratio is 0.592000\n", + "thermal efficeincy is 0.266000\n", + "turbine exit temperature 853 K is\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9-7 ,Page No.516" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#from 9.6\n", + "h2a=605.39;#entalpy of air leaving the compressor in kJ/kg\n", + "h4a=880.36;#entalpy of air leaving the turbinein kJ/kg\n", + "h3=1395.97;#in kJ/kg\n", + "Wnet=210.41;#net woek done in kJ/kg\n", + "\n", + "#given data\n", + "n=0.80;#thermal efficiency\n", + "\n", + "#calculations\n", + "# n = (h5 - h2a) / (h4a - h2a)\n", + "h5=(h4a - h2a)*n+h2a;\n", + "qin=h3-h5;\n", + "nth=Wnet/qin;\n", + "print'thermal efficeincy is %f'%round(nth,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "thermal efficeincy is 0.369000\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9-8 ,Page No.519" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "\n", + "#given data\n", + "T1=300;#inlet temperature of compressor in K\n", + "T6=1300;#inlet temperature of turbine in K\n", + "r=8;#overall compression ratio\n", + "\n", + "#calculations\n", + "#as it is case of intercooling\n", + "ri=sqrt(r);#ri stands for P2/P1 = P4/P3 = P6/P7 = P8/P9\n", + "#from A-17 at T1\n", + "h1=300.19;\n", + "Pr1=1.386;\n", + "Pr2=ri*Pr1;\n", + "#from A-17 at Pr2\n", + "T2=403.3;\n", + "h2=403.31;\n", + "#from A-17 at T6\n", + "h6=1395.97;\n", + "Pr6=330.9;\n", + "Pr7=Pr6/ri;\n", + "#from A-17 at Pr7\n", + "T7=1006.4;\n", + "h7=1053.33;\n", + "#at inlets\n", + "T3=T1;h3=h1;T8=T6;h8=h6;\n", + "#et exits\n", + "T4=T2;h4=h2;T9=T7;h9=h7;h5=h7;\n", + "Win=2*(h2-h1);\n", + "Wout=2*(h6-h7);\n", + "Wnet=Wout-Win;\n", + "qin=(h6-h4)+(h8-h7);\n", + "rbw=Win/Wout;\n", + "print'back work ratio is %f'%round(rbw,3);\n", + "nth=Wnet/qin;\n", + "print'thermal efficeincy is %f'%round(nth,3)\n", + "#part - b\n", + "print('part - b');\n", + "qin=(h6-h5)+(h8-h7);\n", + "nth=Wnet/qin;\n", + "print'thermal efficeincy is %f'%round(nth,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "back work ratio is 0.301000\n", + "thermal efficeincy is 0.359000\n", + "part - b\n", + "thermal efficeincy is 0.699000\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9-9 ,Page No.523" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "\n", + "#given data\n", + "m=100;\n", + "P1=5;#air pressue in psia\n", + "T1=-40+460;#air temperature in R\n", + "T4=2000+460;#turbine inlet temperature in R\n", + "V1=850;#aircraft velocity in ft/sec\n", + "rp=10;#pressure ratio\n", + "\n", + "#constants used\n", + "cp=0.240;#in Btu/lbm F\n", + "k=1.4;\n", + "\n", + "#calculations\n", + "#Process 1-2\n", + "T2=T1+V1**2/(2*cp)/25037;#factor of 25037 to covert to Btu/lbm\n", + "P2=P1*(T2/T1)**(k/(k-1));\n", + "#Process 2-3 \n", + "P3=rp*P2;\n", + "P4=P3;\n", + "T3=T2*(P3/P2)**((k-1)/k);\n", + "#Win=Wout\n", + "T5=T4-T3+T2;\n", + "P5=P4*(T5/T4)**(k/(k-1));\n", + "T5=round(T5);\n", + "print'temperature at turbine exit %i R'%T5;\n", + "print'pressure at turbine exit %f psia'%round(P5,1);\n", + "#Process 5-6\n", + "P6=P1;\n", + "T6=T5*(P6/P5)**((k-1)/k);\n", + "T6=round(T6);#round off\n", + "V6=sqrt(2*cp*(T5-T6)*25037);#factor of 25037 to covert to (ft/s)^2\n", + "print'the velocity of nozzle exit %i ft/s'%(round(V6));\n", + "Wp=m*(V6-V1)*V1/25037;#factor of 25037 to covert to Btu/lbm\n", + "Qin=m*cp*(T4-T3);\n", + "nP=Wp/Qin;\n", + "print'propulsive efficiency is %f percent'%round(nP*100,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "temperature at turbine exit 2013 R\n", + "pressure at turbine exit 39.600000 psia\n", + "the velocity of nozzle exit 3285 ft/s\n", + "propulsive efficiency is 22.500000 percent\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9-10 ,Page No.529" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "\n", + "#from 9.2\n", + "r=8;#compression ratio i.e v1/v2\n", + "T0=290.0;#temperature of air in K\n", + "T1=290.0;#temperature in the begining of the isentropic compression process in K\n", + "T2=652.4;#temperature in the end of the isentropic compression process in K\n", + "T3=1575.1;#temperature after process 2-3 in K\n", + "P2=1.7997;#pressure in the end of the isentropic compression process in MPa\n", + "P3=4.345;#pressure after process 2-3 in MPa\n", + "qin=800.0;#heat transfer rate in kJ/kg\n", + "qout=381.83;#heat rejection in kJ/kg\n", + "wnet=418.17;#net work in kJ/kg\n", + "\n", + "#given data\n", + "Tsource=1700;#temperature of working fluid at source in K\n", + "\n", + "#constants used\n", + "R=0.287;#in kPa-m^3/kg-K\n", + "\n", + "#calculations\n", + "#s1=s2 ; s3=s4\n", + "s03=3.5045;\n", + "s02=2.4975;\n", + "s32=(s03-s02)-R*log(P3/P2);#s32 stands for s3-s2\n", + "xdest23=T0*(s32-qin/Tsource);\n", + "Tsink=T1;\n", + "xdest41=T0*(-s32+qout/Tsink);\n", + "xdestcycle=xdest23+xdest41;\n", + "print'exergy destrustion associated with Otto cycle %f kJ/kg'%round(xdestcycle,1);\n", + "# X4 = (u4 - u0 )- T0*(s4 - s0) + P0(v4 - v0)\n", + "# s4 - s0 = s4 - s1 = s32\n", + "# u4 - u0 = u4 - u1 = qout\n", + "# v4 - v0 = v4 - v1 = 0\n", + "#hence x4 is\n", + "X4=qout-T0*s32;\n", + "print'exergy destruction of purge stream %f kJ/kg'%round(X4,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "exergy destrustion associated with Otto cycle 245.400000 kJ/kg\n", + "exergy destruction of purge stream 163.200000 kJ/kg\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file -- cgit