diff options
Diffstat (limited to 'Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter13.ipynb')
-rw-r--r-- | Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter13.ipynb | 568 |
1 files changed, 568 insertions, 0 deletions
diff --git a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter13.ipynb b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter13.ipynb new file mode 100644 index 00000000..3ff72a8c --- /dev/null +++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter13.ipynb @@ -0,0 +1,568 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13: Gas power cycle" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.1:pg-554" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 13.1\n", + "\n", + "\n", + " Cycle efficiency is 56.4724718352 percent\n", + "\n", + " Maximum temperature in the cycle is 3632.38927303 K\n", + "\n", + " Maximum pressure in the cycle is 9.43477733254 MPa\n", + "\n", + " Mean effective pressure is 1.53325865881 MPa\n" + ] + } + ], + "source": [ + "T1 = 35 # Air inlet temperature in degree Celsius\n", + "P1 = 0.1 # Air inlet pressure in MPa\n", + "Q1 = 2100 # Heat supply in kJ/kg\n", + "R = 0.287 # gas constant\n", + "rk = 8 # Compression ratio\n", + "g = 1.4 # Heat capacity ratio\n", + "n_cycle = 1-(1/rk**(g-1)) # cycle efficiency \n", + "v1 = (R*(T1+273))/(P1*1e3) # Initial volume\n", + "v2 = v1/8 # Volume after compression\n", + "T2 = (T1+273)*(v1/v2)**(g-1) # Temperature after compression\n", + "cv = 0.718 # Constant volume heat capacity in kJ/kg\n", + "T3 = Q1/cv + T2 # Temperature at after heat addition\n", + "P21 = (v1/v2)**g # Pressure ratio\n", + "P2 = P21*P1 # Pressure after compression\n", + "P3 = P2*(T3/T2) # Pressure after heat addition\n", + "Wnet = Q1*n_cycle # Net work output\n", + "Pm = Wnet/(v1-v2) # Mean pressure\n", + "print \"\\n Example 13.1\\n\"\n", + "print \"\\n Cycle efficiency is \",n_cycle*100 ,\" percent\"\n", + "print \"\\n Maximum temperature in the cycle is \",T3 ,\" K\"\n", + "print \"\\n Maximum pressure in the cycle is \",P3 ,\" MPa\"\n", + "print \"\\n Mean effective pressure is \",Pm/1e3 ,\" MPa\"\n", + "#The answers vary due to round off error" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.2:pg-555" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 13.2\n", + "\n", + "\n", + " Air standard efficiency is 59.8676909231 percent\n" + ] + } + ], + "source": [ + "\n", + "rk = 14.0 # Compression ratio\n", + "k = 6.0 # cutoff percentage ratio\n", + "rc = k/100*(rk-1)+1\n", + "g = 1.4 # Heat capacity ratio\n", + "n_diesel = 1.0-((1.0/g))*(1.0/rk**(g-1))*((rc**(g-1))/(rc-1)) # Cycle efficiency\n", + "print \"\\n Example 13.2\\n\"\n", + "print \"\\n Air standard efficiency is \",n_diesel*100 ,\" percent\"\n", + "#The answers vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.3:pg-556" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 13.3\n", + "\n", + "\n", + " Cut-off ratio is 2.00789702047\n", + "\n", + " Heat supplied per kg of air is 884.346993978 kJ/kg\n", + "\n", + " Cycle efficiency is 61.3340410825 percent\n", + "\n", + " Mean effective pressure is 699.968703831 kPa\n" + ] + } + ], + "source": [ + "rk = 16 # Compression ratio\n", + "T1 = 15 # Air inlet temperature in degree Celsius\n", + "P1 = 0.1 # Air inlet pressure in MPa\n", + "T3 = 1480 # Highest temperature in cycle in degree Celsius\n", + "g = 1.4 # Heat capacity ratio\n", + "R = 0.287 # Gas constant\n", + "T2 = (T1+273)*(rk**(g-1)) # Temperature after compression\n", + "rc = (T3+273)/T2 # cut off ratio\n", + "cp = 1.005 # Constant pressure heat constant\n", + "cv = 0.718 # Constant volume heat constant\n", + "Q1 = cp*(T3+273-T2) # Heat addition\n", + "T4 = (T3+273)*((rc/rk)**(g-1)) # Temperature after heat addition\n", + "Q2 = cv*(T4-T1-273) # Heat rejection\n", + "n = 1-(Q2/Q1) # cycle efficiency\n", + "n_ = 1-((1/g))*(1/rk**(g-1))*((rc**(g-1))/(rc-1)) # cycle efficiency from another formula\n", + "Wnet = Q1*n # Net work \n", + "v1 = (R*(T1+273))/(P1*1e3) # Volume before compression\n", + "v2 = v1/rk # Volume after compression\n", + "Pm = Wnet/(v1-v2) # Mean pressure\n", + "print \"\\n Example 13.3\\n\"\n", + "print \"\\n Cut-off ratio is \",rc\n", + "print \"\\n Heat supplied per kg of air is \",Q1 ,\" kJ/kg\"\n", + "print \"\\n Cycle efficiency is \",n*100 ,\" percent\"\n", + "print \"\\n Mean effective pressure is \",Pm ,\" kPa\"\n", + "#The answers vary due to round off error" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.4:pg-558" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 13.4\n", + "\n", + "\n", + " Efficiency of the cycle is 66.3143793932 percent\n", + "\n", + " Mean effective pressure is 4.45799460092 bar\n" + ] + } + ], + "source": [ + "T1 = 50.0 # Temperature before compression stroke in degree Celsius\n", + "rk = 16.0 # Compression ratio\n", + "g = 1.4 # Heat capacity ratio\n", + "P3 = 70.0 # Maximum cycle pressure in bar\n", + "cv = 0.718 # Constant volume heat addition capacity\n", + "cp = 1.005 # Constant pressure heat addition capacity\n", + "R = 0.287 # Gas constant\n", + "T2 = (T1+273)*((rk**(g-1))) #Temperature after compression stroke \n", + "P1 = 1.0 # Pressure before compression in bar\n", + "P2 = P1*(rk)**g # Pressure after compression\n", + "T3 = T2*(P3/P2) # Temperature after constant volume heat addition\n", + "Q23 = cv*(T3-T2) # Constant volume heat added\n", + "T4 = (Q23/cp)+T3 # Temperature after constant pressure heat addition\n", + "v43 = T4/T3 # cut off ratio \n", + "v54 = rk/v43 # Expansion ratio\n", + "T5 = T4*(1/v54)**(g-1) # Temperature after expansion\n", + "P5 = P1*(T5/(T1+273)) # Pressure after expansion\n", + "Q1 = cv*(T3-T2)+cp*(T4-T3) # Total heat added\n", + "Q2 = cv*(T5-T1-273) # Heat rejected\n", + "n_cycle = 1-(Q2/Q1) # Cycle efficiency\n", + "v1 = (R*(T1+273))/(P1*1e2) # Volume before compression \n", + "v2 = (1/16)*v1 # Swept volume\n", + "Wnet = Q1*n_cycle # Net work done\n", + "Pm = Wnet/(v1-v2) # Mean pressure\n", + "print \"\\n Example 13.4\\n\"\n", + "print \"\\n Efficiency of the cycle is \",n_cycle*100 ,\" percent\"\n", + "print \"\\n Mean effective pressure is \",Pm/100 ,\" bar\"\n", + "#The answers vary due to round off error\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.5:pg-559" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 13.5\n", + "\n", + "\n", + " The percentage increase in cycle efficiency \n", + " due to regeneration is 41.4076056717 percent\n" + ] + } + ], + "source": [ + "P1 = 0.1 # Air pressure at turbine inlet in MPa\n", + "T1 = 30 # Air temperature at turbine inlet in degree Celsius\n", + "T3 = 900 # Maximum cycle temperature at turbine inlet in degree Celsius\n", + "rp = 6 # Pressure ratio\n", + "nt = 0.8 # Turbine efficiency\n", + "nc = 0.8# Compressor efficiency\n", + "g = 1.4 # Heat capacity ratio\n", + "cv = 0.718 # Constant volume heat capacity\n", + "cp = 1.005 # Constant pressure heat capacity\n", + "R = 0.287 # Gas constant\n", + "T2s = (T1+273)*(rp)**((g-1)/g)\n", + "T4s = (T3+273)/((rp)**((g-1)/g))\n", + "T21 = (T2s-T1-273)/nc # Temperature raise due to compression\n", + "T34 = nt*(T3+273-T4s) # Temperature drop due to expansion\n", + "Wt = cp*T34 # Turbine work\n", + "Wc = cp*T21 # Compressor work\n", + "T2 = T21+T1+273 # Temperature after compression\n", + "Q1 = cp*(T3+273-T2) # Heat added\n", + "n = (Wt-Wc)/Q1 # First law efficiency\n", + "T4 = T3+273-T34 # Temperature after expansion\n", + "T6 = 0.75*(T4-T2) + T2 # Regeneration temperature \n", + "Q1_ = cp*(T3+273-T6)# Heat added\n", + "n_ = (Wt-Wc)/Q1_ #cycle efficiency\n", + "I = (n_-n)/n # Fractional increase in cycle efficiency\n", + "print \"\\n Example 13.5\\n\"\n", + "print \"\\n The percentage increase in cycle efficiency \\n due to regeneration is \",I*100 ,\" percent\"\n", + "#The answers vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.6:pg-560" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 13.6\n", + "\n", + "\n", + " Maximum work done per kg of air is 239.466740619 kJ/kg\n", + "\n", + " Cycle efficiency is 47.1237354986 percent\n", + "\n", + " Ratio of Brayton and Carnot efficiency is 0.654123779948\n" + ] + } + ], + "source": [ + "\n", + "cp = 1.005 # Constant pressure heat capacity\n", + "Tmax = 1073.0 # Maximum cycle temperature in K\n", + "Tmin = 300.0# Minimum cycle temperature in K\n", + "Wnet_max = cp*(sqrt(Tmax)-sqrt(Tmin))**2 # maximum work\n", + "n_cycle = 1.0-sqrt(Tmin/Tmax) # cycle efficiency\n", + "n_carnot = 1.0-(Tmin/Tmax) # Carnot efficiency\n", + "r = n_cycle/n_carnot # Efficiency ratio\n", + "print \"\\n Example 13.6\\n\"\n", + "print \"\\n Maximum work done per kg of air is \",Wnet_max ,\" kJ/kg\"\n", + "print \"\\n Cycle efficiency is \",n_cycle*100 ,\" percent\"\n", + "print \"\\n Ratio of Brayton and Carnot efficiency is \",r\n", + "#The answers vary due to round off error\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.7:pg-561" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 13.7\n", + "\n", + "\n", + " The thermal efficiency of the cycle is 40.0663025288 percent\n", + "\n", + " Work ratio is 0.544951697902\n", + "\n", + " Power output is 40.0663025288 MW\n", + "\n", + " Energy flow rate of the exhaust gas stream is 20.5297861501 MW\n" + ] + } + ], + "source": [ + "\n", + "rp = 6 # pressure ratio\n", + "g = 1.4 # Heat capacity ratio\n", + "cv = 0.718 # Constant volume heat capacity\n", + "cp = 1.005 #Constant pressure heat capacity\n", + "R = 0.287 # Gas constant\n", + "T1 = 300 # Minimum temperature in K\n", + "T3 = 1100 # Maximum cycle temperature in K\n", + "T0 = 300 # Atmospheric temperature in K\n", + "n_cycle = 1-(1/rp**((g-1)/g)) # cycle efficiency\n", + "T2 = (T1)*(rp**((g-1)/g)) # Temperature after compression\n", + "T4 = (T3)/(rp**((g-1)/g)) # Temperature after expansion\n", + "Wc = cp*(T2-T1) # Compressor work\n", + "Wt = cp*(T3-T4) # Turbine work\n", + "WR = (Wt-Wc)/Wt # Work ratio\n", + "Q1 = 100 # Heat addition in MW\n", + "PO = n_cycle*Q1 # Power output\n", + "m_dot = (Q1*1e06)/(cp*(T3-T2)) # Mass flow rate\n", + "R = m_dot*cp*T0*((T4/T0)-1-log(T4/T0)) # Exergy flow rate\n", + "print \"\\n Example 13.7\\n\"\n", + "print \"\\n The thermal efficiency of the cycle is \",n_cycle*100 ,\" percent\"\n", + "print \"\\n Work ratio is \",WR\n", + "print \"\\n Power output is \",PO ,\" MW\"\n", + "print \"\\n Energy flow rate of the exhaust gas stream is \",R/1e6 ,\" MW\"\n", + "#The answers vary due to round off error\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.8:pg-562" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 13.8\n", + "\n", + "\n", + " Percentage of air that may be taken from the compressor is 11.5044247788 percent\n" + ] + } + ], + "source": [ + "nc = 0.87 # Compressor efficiency \n", + "nt = 0.9 # Turbine efficiency\n", + "T1 = 311 # Compressor inlet temperature in K\n", + "rp = 8 # compressor pressure ratio\n", + "P1 = 1 # Initial pressure in atm\n", + "T3 = 1367 # Turbine inlet temperature\n", + "P2 = P1*rp # Final pressure \n", + "P3 = 0.95*P2 # Actual pressure after compression\n", + "P4 = 1 # Atmospheric pressure\n", + "g = 1.4 # Heat capacity ratio\n", + "cv = 0.718 # Constant volume heat capacity\n", + "cp = 1.005 # Constant pressure heat capacity\n", + "R = 0.287 # Gas constant\n", + "# With no cooling\n", + "T2s = T1*((P2/P1)**((g-1)/g)) # Ideal temperature after compression\n", + "T2 = T1 + (T2s-T1)/0.87 # Actual temperature after compression\n", + "T4s = T3*(P4/P3)**((g-1)/g) # Ideal temperature after expansion\n", + "n = (((T3-T4s)*nt)-((T2s-T1)/nc))/(T3-T2) # cycle efficiency\n", + "# With cooling\n", + "n_cycle = n-0.05\n", + "x = 0.13 # Fluid quality\n", + "r = x/(x+1) # \n", + "print \"\\n Example 13.8\\n\"\n", + "print \"\\n Percentage of air that may be taken from the compressor is \",r*100 ,\" percent\"\n", + "#The answers vary due to round off error\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.9:pg-563" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 13.9 \n", + "\n", + "\n", + " Optimum specific output is 1.0\n" + ] + } + ], + "source": [ + "\n", + "#Given that\n", + "nc = 0.85 # Compressor efficiency\n", + "nt = 0.9 # Turbine efficiency\n", + "r = 3.5 # Ratio of max and min temperature \n", + "gama = 1.4 # Ratio of heat capacities for air\n", + "print \"\\n Example 13.9 \\n\"\n", + "x = (gama-1)/gama\n", + "r_opt = ((nc*nt*r)**(2/3))**(1/x)\n", + "print \"\\n Optimum specific output is \",r_opt\n", + "#The answers vary due to round off error\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.10:pg-566" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 13.10 \n", + "\n", + "\n", + " The temperature of the gases at the turbine exit is 1114.47439653 K,\n", + " The pressure of the gases at the turbine exit is 311.998817219 kN/m**2,\n", + " The velocity of gases at the nozzle exit is 1.0 m/sec,\n", + " The propulsive efficiency of the cycle is -10.6673736259 percent\n" + ] + } + ], + "source": [ + "#Given that\n", + "v = 300.0 # Aircraft velocity in m/s\n", + "p1 = 0.35 # Pressure in bar\n", + "t1 = -40.0 # Temperature in degree centigrade\n", + "rp = 10.0 # The pressure ratio of compressor \n", + "t4 = 1100.0 # Temperature of gases at turbine intlet in degree centigrade\n", + "ma = 50.0 # Mass flow rate of air at the inlet of compressor in kg/s\n", + "cp = 1.005 # Heat capacity of air at constant pressure in kJ/kg-K\n", + "gama=1.4 # Ratio of heat capacities for air\n", + "print \"\\n Example 13.10 \\n\"\n", + "T1 = t1+273\n", + "T4 = t4+273\n", + "T2 = T1 + (v**2)/(2*cp)*(10**-3)\n", + "p2 = p1*(100)*((T2/T1)**(gama/(gama-1)))\n", + "p3 = rp*p2\n", + "p4 =p3\n", + "T3 = T2*((p3/p2)**((gama-1)/gama))\n", + "T5 = T4-T3+T2\n", + "p5 = ((T5/T4)**(gama/(gama-1)))*(p4)\n", + "p6 = p1*100\n", + "T6 = T5*((p6/p5)**((gama-1)/gama))\n", + "V6 = (2*cp*(T5-T6)*1000)**(1/2)\n", + "Wp = ma*(V6-v)*v*(10**-6)\n", + "Q1 = ma*cp*(T4-T3)*(10**-3)\n", + "np = Wp/Q1\n", + "print \"\\n The temperature of the gases at the turbine exit is \",T5 ,\" K,\\n The pressure of the gases at the turbine exit is \",p5 ,\" kN/m**2,\\n The velocity of gases at the nozzle exit is \",V6 ,\" m/sec,\\n The propulsive efficiency of the cycle is \",np*100 ,\" percent\"\n", + "#The answers vary due to round off error\n", + "\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |