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 /Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter13.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 'Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter13.ipynb')
-rw-r--r--[-rwxr-xr-x] | Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter13.ipynb | 97 |
1 files changed, 85 insertions, 12 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 index 3ff72a8c..7d2de00a 100755..100644 --- a/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter13.ipynb +++ b/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter13.ipynb @@ -40,6 +40,7 @@ } ], "source": [ + "import math\n", "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", @@ -92,7 +93,7 @@ } ], "source": [ - "\n", + "import math\n", "rk = 14.0 # Compression ratio\n", "k = 6.0 # cutoff percentage ratio\n", "rc = k/100*(rk-1)+1\n", @@ -136,6 +137,7 @@ } ], "source": [ + "import math\n", "rk = 16 # Compression ratio\n", "T1 = 15 # Air inlet temperature in degree Celsius\n", "P1 = 0.1 # Air inlet pressure in MPa\n", @@ -192,6 +194,7 @@ } ], "source": [ + "import math\n", "T1 = 50.0 # Temperature before compression stroke in degree Celsius\n", "rk = 16.0 # Compression ratio\n", "g = 1.4 # Heat capacity ratio\n", @@ -251,6 +254,7 @@ } ], "source": [ + "import math\n", "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", @@ -289,7 +293,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": { "collapsed": false }, @@ -311,12 +315,12 @@ } ], "source": [ - "\n", + "import math\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", + "Wnet_max = cp*(math.sqrt(Tmax)-math.sqrt(Tmin))**2 # maximum work\n", + "n_cycle = 1.0-math.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", @@ -336,7 +340,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 10, "metadata": { "collapsed": false }, @@ -360,7 +364,7 @@ } ], "source": [ - "\n", + "import math\n", "rp = 6 # pressure ratio\n", "g = 1.4 # Heat capacity ratio\n", "cv = 0.718 # Constant volume heat capacity\n", @@ -378,7 +382,7 @@ "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", + "R = m_dot*cp*T0*((T4/T0)-1-math.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", @@ -396,7 +400,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 11, "metadata": { "collapsed": false }, @@ -414,6 +418,7 @@ } ], "source": [ + "import math\n", "nc = 0.87 # Compressor efficiency \n", "nt = 0.9 # Turbine efficiency\n", "T1 = 311 # Compressor inlet temperature in K\n", @@ -451,7 +456,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 12, "metadata": { "collapsed": false }, @@ -469,7 +474,7 @@ } ], "source": [ - "\n", + "import math\n", "#Given that\n", "nc = 0.85 # Compressor efficiency\n", "nt = 0.9 # Turbine efficiency\n", @@ -492,7 +497,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 13, "metadata": { "collapsed": false }, @@ -513,6 +518,7 @@ } ], "source": [ + "import math\n", "#Given that\n", "v = 300.0 # Aircraft velocity in m/s\n", "p1 = 0.35 # Pressure in bar\n", @@ -542,6 +548,73 @@ "#The answers vary due to round off error\n", "\n" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex13.11:pg-567" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Example 13.11 \n", + "\n", + "\n", + " Air fuel ratio is 39.6515678976\n", + "\n", + " Overall efficiency of combined plant is 53.5993550102 percent \n" + ] + } + ], + "source": [ + "import math\n", + "Ta = 15 # Atmospheric temperature in degree Celsius \n", + "rp = 8 # pressure ratio\n", + "g = 1.33 # heat capacity ratio for gas\n", + "g1 = 1.40 # heat capacity ratio for air\n", + "cv = 0.718 # Constant volume heat capacity\n", + "cpa = 1.005 # Constant pressure heat capacity for air\n", + "cpg = 1.11 # Constant pressure heat capacity for gas\n", + "R = 0.287 # Gas constant\n", + "Tb = (Ta+273)*(rp)**((g1-1)/g1) # Temperature after compression\n", + "Tc = 800 # Temperature after heat addition in degree Celsius\n", + "Td = (Tc+273)/((rp)**((g-1)/g)) # Temperature after expansion\n", + "Wgt = cpg*(Tc+273-Td)-cpa*(Tb-Ta-273)\n", + "Q1 = cpg*(Tc+273-Tb)\n", + "Q1_ = cpg*(Tc+273-Td)\n", + "h1 = 3775 # Enthalpy at state 1 in kJ/kg\n", + "h2 = 2183 # Enthalpy at state2 in kJ/kg\n", + "h3 = 138 # Enthalpy at state3 in kJ/kg\n", + "h4 = h3 # Isenthalpic process\n", + "Q1_st = h1-h3 # Total heat addition\n", + "Q_fe = cpg*(Tc-100) # Heat transfer by steam\n", + "was = Q1_st/Q_fe # air steam mass ratio\n", + "Wst = h1-h2# work done by steam turbine\n", + "PO = 190e03 # Power output in kW\n", + "ws = PO/(was*Wgt+Wst)# steam flow rate\n", + "wa = was*ws # Air flow rate\n", + "CV = 43300 # Calorific volume of fuel in kJ/kg\n", + "waf = CV/(Q1+Q1_) # Air fuel ratio\n", + "FEI = (wa/waf)*CV # Fuel energy input\n", + "noA = PO/FEI # combined cycle efficiency\n", + "\n", + "print \"\\n Example 13.11 \\n\"\n", + "print \"\\n Air fuel ratio is \",waf\n", + "print \"\\n Overall efficiency of combined plant is \",noA*100,\" percent \"\n", + "#The answers vary due to round off error\n", + "\n" + ] } ], "metadata": { |