summaryrefslogtreecommitdiff
path: root/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)
diff options
context:
space:
mode:
authorroot2014-07-14 15:31:28 +0530
committerroot2014-07-14 15:31:28 +0530
commit5a3a66e158c99bbf7900278d8e7056136d628dbe (patch)
tree6d8c0f65acb3e9451d5092e8d718e7febcbd0d05 /Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)
parent69aa63da6cb2bc3f5822533e3f97c46d7efbaafc (diff)
downloadPython-Textbook-Companions-5a3a66e158c99bbf7900278d8e7056136d628dbe.tar.gz
Python-Textbook-Companions-5a3a66e158c99bbf7900278d8e7056136d628dbe.tar.bz2
Python-Textbook-Companions-5a3a66e158c99bbf7900278d8e7056136d628dbe.zip
adding books
Diffstat (limited to 'Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)')
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/README.txt10
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch10.ipynb1095
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch11.ipynb2029
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch12.ipynb1743
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch13.ipynb2797
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch14.ipynb1470
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch15.ipynb1519
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch16.ipynb957
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch2.ipynb915
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch3.ipynb1384
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch4.ipynb3240
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch5.ipynb2525
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch6.ipynb1173
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch7.ipynb189
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch8.ipynb880
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch9.ipynb1533
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/screenshots/ch13.pngbin0 -> 129151 bytes
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/screenshots/ch4.pngbin0 -> 122510 bytes
-rwxr-xr-xEngineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/screenshots/ch9.pngbin0 -> 143955 bytes
19 files changed, 23459 insertions, 0 deletions
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/README.txt b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/README.txt
new file mode 100755
index 00000000..d0906541
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Ashutosh Kumar
+Course: btech
+College/Institute/Organization: Indian Institute of Technology - Bombay, CHAR Lab 2
+Department/Designation: Electrical Department
+Book Title: Engineering Thermodynamics: A Computer Approach (SI Units Version)
+Author: R. K. Rajput
+Publisher: Laxmi Pulications (P) Ltd., New Delhi
+Year of publication: 2007
+Isbn: 9780763782726
+Edition: 3 \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch10.ipynb b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch10.ipynb
new file mode 100755
index 00000000..291a95fe
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch10.ipynb
@@ -0,0 +1,1095 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10 : Psychrometrics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.1 Page no : 464"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "t_db = 293.; \t\t\t#K\n",
+ "W = 0.0095; \t\t\t#kg/kg of dry air\n",
+ "p_t = 1.0132; \n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Partial pressure of vapour\")\n",
+ "p_v = p_t*W/(W+0.622);\n",
+ "print (\"p_v = %.3f\")% (p_v), (\"bar\")\n",
+ "\n",
+ "\n",
+ "p_vs = 0.0234; \t\t\t#bar; From steam tables corresponding to 20 0C\n",
+ "phi = p_v/p_vs;\n",
+ "print (\"(ii)relative hmidity = %.3f\")% (phi)\n",
+ "\n",
+ "\n",
+ "print (\"(iii) Dew point temperature\")\n",
+ "t_dp = 13 + (14-13)/(0.01598 - 0.0150)*(0.01524-0.0150); \t\t\t#From stea table by interpolation\n",
+ "print (\"t_dp = %.3f\")% (t_dp), (\"0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Partial pressure of vapour\n",
+ "p_v = 0.015 bar\n",
+ "(ii)relative hmidity = 0.651\n",
+ "(iii) Dew point temperature\n",
+ "t_dp = 13.245 0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.2 Page no : 465"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "t_db = 290.; \t\t\t#K\n",
+ "phi = 0.6; \t\t\t#relative humidity\n",
+ "p_t = 1.01325; \t\t\t#bar\n",
+ "p_vs = 0.0194; \t\t\t#bar\n",
+ "\n",
+ "# Calculations\n",
+ "p_v = phi*p_vs;\n",
+ "W = 0.622*p_v/(p_t - p_v);\n",
+ "t_dp = 9 + (10-9)*(0.01164-0.01150)/(0.01230 - 0.01150); \t\t\t#By interpolation from steam tables\n",
+ "\n",
+ "# Results\n",
+ "print (\"Specific Humidity = %.4f\")% (W), (\"kg/kg of dry air\")\n",
+ "\n",
+ "print (\"dew point temperature = \"), (t_dp), (\"0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific Humidity = 0.0072 kg/kg of dry air\n",
+ "dew point temperature = 9.175 0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.3 Page no : 465"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "phi = 0.55;\n",
+ "p_vs = 0.0425; \t\t\t#bar\n",
+ "p_t = 1.0132; \t\t\t#bar\n",
+ "\n",
+ "# Calculations\n",
+ "p_v = phi*p_vs;\n",
+ "W = 0.622*p_v/(p_t-p_v);\n",
+ "\n",
+ "#Specific humidity after removing o.oo4 kg of water vapour\n",
+ "Wnew = W-0.004;\n",
+ "p_v = p_t*Wnew/(Wnew+0.622);\n",
+ "p_vs = 0.0234; \t\t\t#bar\n",
+ "\n",
+ "# Results\n",
+ "print (\"(i) Relative humidity\"),\n",
+ "phi = p_v/p_vs;\n",
+ "print (\"phi = %.3f\")%(phi)\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Dew point temperature\")\n",
+ "\n",
+ "print (\"Corresponding to 0.0171 bar, from steam tables\")\n",
+ "t_dp = 15.; \t\t\t#0C\n",
+ "print (\"t_dp = %.3f\")% (t_dp), (\"0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Relative humidity phi = 0.732\n",
+ "(ii) Dew point temperature\n",
+ "Corresponding to 0.0171 bar, from steam tables\n",
+ "t_dp = 15.000 0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.4 Page no : 466"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "t_db = 35.; \t\t\t#0C\n",
+ "t_wb = 25.; \t\t\t#0C\n",
+ "p_t = 1.0132; \t\t\t#bar\n",
+ "\n",
+ "#Corresponding to 25 0C in steam tables\n",
+ "p_vs_wb = 0.0317; \t\t\t#bar\n",
+ "\n",
+ "# Calculations\n",
+ "p_v = p_vs_wb - (p_t - p_vs_wb)*(t_db - t_wb)/(1527.4 - 1.3*t_wb);\n",
+ "\n",
+ "print (\"(i) Specific humidity\")\n",
+ "W = 0.622*p_v/(p_t-p_v);\n",
+ "print (\"W = %.3f\")% (W), (\"kg/kg of dry air\")\n",
+ "\n",
+ "print (\"(ii) Relative humidity\")\n",
+ "\n",
+ "#Corresponding to 35 0C, from steam tables\n",
+ "p_vs = 0.0563;\n",
+ "\n",
+ "phi = p_v/p_vs;\n",
+ "print (\"phi %.3f\")% (phi)\n",
+ "\n",
+ "\n",
+ "print (\"(iii) Vapour density\")\n",
+ "R_v = 8314.3/18;\n",
+ "T_v = 308.; \t\t\t#K\n",
+ "\n",
+ "rho_v = p_v*10**5/(R_v*T_v);\n",
+ "print (\"rho_v = %.3f\")% (rho_v),(\"kg/m**3\")\n",
+ "\n",
+ "print (\"(iv) Dew point temperature\")\n",
+ "t_dp = 21 + (22-21)*(0.0252-0.0249)/(0.0264-0.0249);\n",
+ "print (\"t_dp %.3f\")%(t_dp), (\"0C\")\n",
+ "\n",
+ "print (\"(v) Enthalpy of mixture per kg of dry air\")\n",
+ "cp = 1.005;\n",
+ "h_g = 2565.3; \t\t\t#kJ/kg; corresponding to 35 0C\n",
+ "h_vapour = h_g + 1.88*(t_db - t_dp);\n",
+ "\n",
+ "h = cp*t_db + W*h_vapour;\n",
+ "print (\"h = %.3f\")% (h), (\"kJ/kg of dry air\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Specific humidity\n",
+ "W = 0.016 kg/kg of dry air\n",
+ "(ii) Relative humidity\n",
+ "phi 0.446\n",
+ "(iii) Vapour density\n",
+ "rho_v = 0.018 kg/m**3\n",
+ "(iv) Dew point temperature\n",
+ "t_dp 21.200 0C\n",
+ "(v) Enthalpy of mixture per kg of dry air\n",
+ "h = 76.175 kJ/kg of dry air\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.5 Page no : 467"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#For the air at 35 0C DBT and 60% R.H.\n",
+ "p_vs = 0.0563; \t\t\t#bar; Corresponding to 35 0C from stem tables\n",
+ "\n",
+ "phi = 0.6;\n",
+ "p_t = 1.0132; \t\t\t#bar\n",
+ "cp = 1.005;\n",
+ "t_db = 35.; \t\t\t#0C\n",
+ "h_g = 2565.5; \t\t\t#kJ/kg\n",
+ "m1 = 1.; \t\t\t#kg\n",
+ "m2 = 2.; \t\t\t#kg\n",
+ "m = m1+m2;\n",
+ "\n",
+ "# Calculations\n",
+ "p_v = phi*p_vs;\n",
+ "W1 = 0.622*p_v/(p_t-p_v);\n",
+ "\n",
+ "#Corresponding to 0.0388 bar, from steam tables\n",
+ "t_dp = 26.+(27.-26)*(0.0338-0.0336)/(0.0356-0.0336);\n",
+ "\n",
+ "h_vapour = h_g + 1.88*(t_db - t_dp);\n",
+ "h1 = cp*t_db+W1*h_vapour;\n",
+ "\n",
+ "#For the air at 20\u00b0C DBT and 13\u00b0C dew point temperature :\n",
+ "p_v = 0.0150; \t\t\t#bar\n",
+ "\n",
+ "W2 = 0.622*p_v/(p_t-p_v);\n",
+ "t_db = 20.; \t\t\t#0C\n",
+ "t_dp = 13.;\n",
+ "h_g = 2538.1; \t\t\t#kJ/kg\n",
+ "h_vapour = h_g + 1.88*(t_db - t_dp);\n",
+ "h2 = cp*t_db+W2*h_vapour;\n",
+ "\n",
+ "#let enthalpy per kg of moist air be h\n",
+ "h = ((m1*h1/(1+W1)) + (m2*h2/(1+W2)))/m;\n",
+ "#Let Mass of vapour/kg of moist air be M\n",
+ "M = (m1*W1/(1+W1) + m2*W2/(1+W2))/m;\n",
+ "#Let specific humidity be denoted by SH\n",
+ "SH = M/(1-M);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Specific humidity = %.3f\")% (SH), (\"kg/kg of dry air\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific humidity = 0.013 kg/kg of dry air\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.6 Page no : 468"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "#For air at 20 0C and 75% R.H\n",
+ "p_vs = 0.0234; \t\t\t#bar\n",
+ "phi = 0.75;\n",
+ "p_t = 1.0132;\n",
+ "cp = 1.005;\n",
+ "t_db = 20.; \t\t\t#0C\n",
+ "\n",
+ "# Calculations\n",
+ "p_v = phi*p_vs;\n",
+ "t_dp = 15 + (16-15)*(0.01755-0.017)/(0.0182-0.017);\n",
+ "W = 0.622*p_v/(p_t-p_v);\n",
+ "\n",
+ "h_g = 2538.1 \t\t\t#kJ/kg\n",
+ "h_vapour = h_g + 1.88*(t_db - t_dp);\n",
+ "h1 = cp*t_db + W*h_vapour;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Relative humidity of heated air :\")\n",
+ "\n",
+ "\t\t\t#For air at 30\u00b0C DBT\n",
+ "p_vs = 0.0425; \t\t\t#bar; corresponding to 30 0C\n",
+ "phi = p_v/p_vs;\n",
+ "print (\"Relative humidity = %.3f\")% (phi*100), (\"%\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Heat added to air per minute\")\n",
+ "h_g = 2556.3; \t\t\t#kJkg\n",
+ "t_db = 30.;\n",
+ "h2 = cp*t_db+W*h_vapour;\n",
+ "V = 90.; \t\t\t#m**3\n",
+ "R = 287.;\n",
+ "T = 293.; \t\t\t#K\n",
+ "\n",
+ "m = (p_t-p_v)*V*10**5/R/T;\n",
+ "\n",
+ "Amt = m*(h2-h1);\n",
+ "print (\"Amount of heat added per minute = %.3f\")% (Amt),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Relative humidity of heated air :\n",
+ "Relative humidity = 41.294 %\n",
+ "(ii) Heat added to air per minute\n",
+ "Amount of heat added per minute = 1070.942 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.7 Page no : 469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#For air at 35 0C DBT and 50% RH\n",
+ "p_vs = 0.0563; \t\t\t#bar; At 35 0C, from steam tables\n",
+ "phi = 0.5;\n",
+ "p_t = 1.0132;\n",
+ "t_db1 = 35.; \t\t\t#0C\n",
+ "t_dp1 = 23.; \t\t\t#0C\n",
+ "cp = 1.005;\n",
+ "R = 287.;\n",
+ "\n",
+ "# Calculations\n",
+ "p_v = phi*p_vs;\n",
+ "W1 = 0.622*p_v/(p_t-p_v);\n",
+ "h_g1 = 2565.3; \t\t\t#kJ/kg\n",
+ "\n",
+ "h_vapour = h_g1 + 1.88*(t_db1 - t_dp1);\n",
+ "h1 = cp*t_db1+W1*h_vapour;\n",
+ "\n",
+ "# Results\n",
+ "print (\"(i) R.H. of cooled air\")\n",
+ "p_vs = 0.0317;\n",
+ "phi = p_v/p_vs;\n",
+ "print (\"RH of cooled air = %.3f\")% (phi*100), (\"%\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Heat removed from air\")\n",
+ "h_g2 = 2547.2; \t\t\t#kJ/kg\n",
+ "t_db2 = 25.; \t\t\t#0C\n",
+ "t_dp2 = 23.; \t\t\t#0C\n",
+ "W2 = W1;\n",
+ "T = 308.; \t\t\t#K\n",
+ "V = 40.; \t\t\t#m**3\n",
+ "\n",
+ "h_vapour = h_g2 + 1.88*(t_db2 - t_dp2);\n",
+ "h2 = cp*t_db2+W2*h_vapour;\n",
+ "m = (p_t-p_v)*10**5*V/R/T;\n",
+ "\n",
+ "#Let Heat removed be denoted by H\n",
+ "H = m*(h1-h2);\n",
+ "print (\"Heat removed = %.3f\")% (H), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) R.H. of cooled air\n",
+ "RH of cooled air = 88.801 %\n",
+ "(ii) Heat removed from air\n",
+ "Heat removed = 477.209 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.8 Page no : 470"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#For the air at 35\u00b0C DBT and 50% R.H.\n",
+ "\n",
+ "# Variables\n",
+ "p_vs = 0.0563; \t\t\t#bar; At 35 0C, from steam tables\n",
+ "phi = 0.5;\n",
+ "p_v = phi*p_vs;\n",
+ "p_t = 1.0132; \t\t\t#bar\n",
+ "\n",
+ "t_dp1 = 23.; \t\t\t#0C\n",
+ "t_db1 = 35.; \t\t\t#0C\n",
+ "W1 = 0.622*p_v/(p_t-p_v);\n",
+ "h_g1 = 2565.3; \t\t\t#kJ/kg\n",
+ "R = 287.;\n",
+ "cp = 1.005;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "h_vapour = h_g1 + 1.88*(t_db1 - t_dp1);\n",
+ "h1 = cp*t_db1+W1*h_vapour;\n",
+ "\n",
+ "\n",
+ "print (\"(i) Relative humidity of out coming air and its wet bulb temperature.\")\n",
+ "\n",
+ "print (\"Relative humidity of exit air is 100 per cent.\")\n",
+ "\n",
+ "t_wb = 20; \t\t\t#0C\n",
+ "print (\"Wet bulb temperture = %.3f\")%(t_wb), (\"0C\")\n",
+ "\n",
+ "p_v = 0.0234; \t\t\t#bar\n",
+ "p_vs = p_v;\n",
+ "t_db2 = 20; \t\t\t#0C\n",
+ "h_g2 = 2538.1; \t\t\t#kJ/kg\n",
+ "t_dp2 = t_db2;\n",
+ "\n",
+ "W2 = 0.622*p_v/(p_t-p_v);\n",
+ "h_vapour = h_g2 + 1.88*(t_db2 - t_dp2);\n",
+ "h2 = cp*t_db2+W2*h_vapour;\n",
+ "\n",
+ "T = 308.; \t\t\t#K\n",
+ "V = 120.; \t\t\t#m**3\n",
+ "\n",
+ "W = W1-W2; \t\t\t#Weight of water vvapour removed per kg of dry air \n",
+ "h = h1-h2; \t\t\t#Heat removed per kg of dry air\n",
+ "m = (p_t-p_v)*10**5*V/R/T;\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Capacity of the cooling coil in tonnes of refrigeration\")\n",
+ "C = m*(h1-h2)*60/14000;\n",
+ "print (\"Capacity = %.3f\")% (C), (\"TR\")\n",
+ "\n",
+ "\n",
+ "Amt = m*(W1-W2)*60;\n",
+ "print (\"(iii)Amount of water removed per hour = %.3f\")% (Amt), (\"kg/h\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Relative humidity of out coming air and its wet bulb temperature.\n",
+ "Relative humidity of exit air is 100 per cent.\n",
+ "Wet bulb temperture = 20.000 0C\n",
+ "(ii) Capacity of the cooling coil in tonnes of refrigeration\n",
+ "Capacity = 13.678 TR\n",
+ "(iii)Amount of water removed per hour = 24.753 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.9 Page no : 471"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p_vs = 0.0563; \t\t\t#bar\n",
+ "phi = 0.2;\n",
+ "p_v = phi*p_vs;\n",
+ "p_t = 1.0132; \t\t\t#bar\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "W1 = 0.622*p_v/(p_t-p_v);\n",
+ "\n",
+ "print (\"(i) Dew point temperature\")\n",
+ "\t\t\t#\n",
+ "t_dp = 8+(9.-8)*(0.01126-0.01072)/(0.01150-0.01072);\n",
+ "print (\"dew point temperature = %.3f\")% (t_dp), (\"0C\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Relative humidity of the exit air :\")\n",
+ "p_vs_wb = 0.0170; \t\t\t#bar\n",
+ "p_vs = 0.0234; \t\t\t#bar\n",
+ "t_db = 20.; \t\t\t#0C\n",
+ "t_wb = 15.; \t\t\t#0C\n",
+ "\n",
+ "p_v = p_vs_wb - (p_t-p_vs_wb)*(t_db-t_wb)/(1527.4-1.3*t_wb);\n",
+ "W2 = 0.622*p_v/(p_t-p_v);\n",
+ "\n",
+ "RH = p_v/p_vs;\n",
+ "print (\"Relative humidity = %.3f\")% (RH)\n",
+ "\n",
+ "p_v = 0.01126; \t\t\t#bar\n",
+ "R = 287.;\n",
+ "T = 308.; \t\t\t#K\n",
+ "V = 150.;\n",
+ "\n",
+ "m = (p_t-p_v)*V*10**5/R/T;\n",
+ "\n",
+ "\n",
+ "print (\"(iii) Amount of water vapour added to the air per minute\")\n",
+ "amt = m*(W2-W1);\n",
+ "print (\"Amount = %.3f\")% (amt), (\"kg/min\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Dew point temperature\n",
+ "dew point temperature = 8.692 0C\n",
+ "(ii) Relative humidity of the exit air :\n",
+ "Relative humidity = 0.585\n",
+ "(iii) Amount of water vapour added to the air per minute\n",
+ "Amount = 0.261 kg/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.10 Page no : 471"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p_s = 0.0206; \t\t\t#bar\n",
+ "p_t = 1; \t\t\t#bar\n",
+ "p_s1 = 0.03782; \t\t\t#bar\n",
+ "W_2s = 0.622*p_s/(p_t-p_s);\n",
+ "\n",
+ "cp = 1.005;\n",
+ "t_db2 = 18; \t\t\t#0C\n",
+ "t_db1 = 28; \t\t\t#0C\n",
+ "\n",
+ "h_g2 = 2534.4; \t\t\t#kJ/kg\n",
+ "h_f2 = 75.6; \t\t\t#kJ/kg\n",
+ "h_g1 = 2552.6; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "W1 = (cp*(t_db1-t_db2) + W_2s*(h_g2-h_f2))/(h_g1-h_f2);\n",
+ "p_v1 = W1*p_t/(0.622+W1);\n",
+ "RH = p_v1/p_s1; \t\t\t#Relative humidity\n",
+ "\n",
+ "# Results\n",
+ "print (\"Relative humidity %.3f\")% (RH)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Relative humidity 0.705\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.11 Page no : 472"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "t_db1 = 38.; \t\t\t#0C\n",
+ "t_db2 = 18.; \t\t\t#0C\n",
+ "phi_1 = 0.75;\n",
+ "phi_2 = 0.85;\n",
+ "p_t = 1.; \t\t\t#bar\n",
+ "cp = 1.005;\n",
+ "\n",
+ "#At 38 0C\n",
+ "p_vs = 0.0663; \t\t\t#bar\n",
+ "h_g1 = 2570.7; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "p_v = phi_1*p_vs;\n",
+ "W1 = 0.622*p_v/(p_t-p_v);\n",
+ "\n",
+ "#At 18 0C\n",
+ "p_vs = 0.0206; \t\t\t#bar\n",
+ "h_g2 = 2534.4; \t\t\t#kJ/kg\n",
+ "h_f2 = 75.6; \t\t\t#kJ/kg\n",
+ "p_v = phi_2*p_vs;\n",
+ "W2 = 0.622*p_v/(p_t-p_v);\n",
+ "\n",
+ "q = (W2*h_g2 - W1*h_g1) + cp*(t_db2-t_db1) + (W1-W2)*h_f2;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Heat transfer rate = %.3f\")% (q), (\"kJ/kg of dry air\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer rate = -74.052 kJ/kg of dry air\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.12 Page no : 473"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "#At 38 0C\n",
+ "p_vs = 0.0663; \t\t\t#bar\n",
+ "h_g1 = 2570.7; \t\t\t#kJ/kg\n",
+ "phi = 0.25;\n",
+ "p_t = 1.0132;\n",
+ "p_v = phi*p_vs;\n",
+ "cp = 1.005;\n",
+ "\n",
+ "#At 18 0C\n",
+ "h_g2 = 2534.4; \t\t\t#kJ/kg\n",
+ "p_vs = 0.0206; \t\t\t#bar\n",
+ "W1 = 0.622*p_v/(p_t-p_v);\n",
+ "\n",
+ "t_db1 = 38.; \t\t\t#0C\n",
+ "t_db2 = 18.; \t\t\t#0C\n",
+ "\n",
+ "# Results\n",
+ "W2 = (cp*(t_db1-t_db2) + W1*h_g1)/h_g2;\n",
+ "\n",
+ "#amount of water added = amt\n",
+ "amt = W2-W1;\n",
+ "\n",
+ "# Results\n",
+ "print (\"amt = %.5f\")% (amt), (\"kg/kg of dry air\")\n",
+ "\n",
+ "p_v2 = amt*p_t/(0.622+amt);\n",
+ "RH = p_v2/p_vs;\n",
+ "\n",
+ "print (\"Final relative humidity %.3f\")% (RH)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "amt = 0.00808 kg/kg of dry air\n",
+ "Final relative humidity 0.631\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.13 Page no : 474"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "#At 22 0c\n",
+ "p_vs = 0.0264; \t\t\t#bar\n",
+ "phi_3 = 0.55;\n",
+ "p_t = 1.0132; \t\t\t#bar\n",
+ "\n",
+ "p_v3 = phi_3*p_vs;\n",
+ "W3 = 0.622*p_v3/(p_t-p_v3);\n",
+ "\n",
+ "#At 3 0C\n",
+ "p_vs1 = 0.0076; \t\t\t#bar\n",
+ "p_v1 = p_vs1;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "W1 = 0.622*p_v1/(p_t-p_v1);\n",
+ "R = 287.;\n",
+ "T_3 = 295.; \t\t\t#K\n",
+ "v = R*T_3/(p_t-p_v3)/10**5;\n",
+ "m = (W3-W1)/v;\n",
+ "\n",
+ "print (\"(i)Mass of spray water required = %.6f\")% (m), (\"kg moisture/m**3\")\n",
+ "\n",
+ " \n",
+ "t_dp = 12.5; \t\t\t#0C\n",
+ "cp = 1.005;\n",
+ "t_db3 = 22.; \t\t\t#0C\n",
+ "h_g3 = 2524.; \t\t\t#kJ/kg\n",
+ "h_vapour3 = h_g3 + 1.88*(t_db3 - t_dp);\n",
+ "W2 = 0.0047;\n",
+ "h_g2 = 2524; \t\t\t#kJ/kg\n",
+ "h4 = 41.87;\n",
+ "\n",
+ "t_db2 = (cp*t_db3 + W3*h_vapour3 -W2*h_g2 + 1.88*W2*t_dp - (W3-W2)*h4)/(cp-W2*1.88);\n",
+ "print (\"(ii) Temperature to which the air must be heated\"),(\"t_db2 = %.3f\")%(t_db2), (\"0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Mass of spray water required = 0.005122 kg moisture/m**3\n",
+ "(ii) Temperature to which the air must be heated t_db2 = 33.290 0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.14 Page no : 476"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "p_vs = 0.0206; \t\t\t#bar\n",
+ "phi = 0.6;\n",
+ "p_t = 1.013; \t\t\t#bar\n",
+ "\n",
+ "# Calculations and Results\n",
+ "p_v1 = phi*p_vs;\n",
+ "p_a1 = p_t-p_v1;\n",
+ "V = 9.; \t\t\t#m**3\n",
+ "R = 287.;\n",
+ "T = 291.; \t\t\t#K\n",
+ "\n",
+ "m_a = p_a1*10**5*V/R/T;\n",
+ "\n",
+ "m_v1 = 0.0828; \t\t\t#kg/s\n",
+ "\n",
+ "#At exit at 26 0C\n",
+ "p_vs = 0.0336; \t\t\t#bar\n",
+ "phi = 1;\n",
+ "p_v = p_vs;\n",
+ "W2 = 0.622*p_v/(p_t-p_v);\n",
+ "m_v2 = W2*m_a;\n",
+ "m = m_v2-m_v1;\n",
+ "\n",
+ "print (\"(i)Make-up water required = %.3f\")%(m), (\"kg/s\")\n",
+ "\n",
+ "\n",
+ "\n",
+ "m_w1 = 5.5; \t\t\t#kg/s\n",
+ "m_w2 = m_w1-m;\n",
+ "Wi = 4.75; \t\t\t#kJ/s\n",
+ "h_w1 = 184.3; \t\t\t#kJ/kg\n",
+ "h_a1 = 18.09; \t\t\t#kJ/kg\n",
+ "h_v1 = 2534.74; \t\t\t#kJ/kg\n",
+ "h_v2 = 2549; \t\t\t#kJ/kg\n",
+ "h_a2 = 26.13; \t\t\t#kJ/kg\n",
+ "\n",
+ "h_w2 = (Wi + m_w1*h_w1 + m_a*h_a1 + m_v1*h_v1 - m_a*h_a2 - m_v2*h_v2)/m_w2;\n",
+ "\n",
+ "#By interpolation, h_w2 corresponds to t\n",
+ "t = 26.7; \t\t\t#0C\n",
+ "\n",
+ "print (\"(ii)final temperature of water = %.3f\")%(t), (\"0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Make-up water required = 0.147 kg/s\n",
+ "(ii)final temperature of water = 26.700 0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.15 Page no : 478"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m_water = 60000.; \t\t\t#kg/s\n",
+ "c = 4.186;\n",
+ "t1 = 30.; \t\t\t#0C\n",
+ "t2 = 35.; \t\t\t#0C\n",
+ "\n",
+ "# Calculations\n",
+ "Q = m_water*c*(t2-t1);\n",
+ "\n",
+ "h1 = 76.5; \t\t\t#kJ/kg\n",
+ "W1 = 0.016; \t\t\t#kg/kg of air \n",
+ "h2 = 92.5; \t\t\t#kJ/kg \n",
+ "W2 = 0.0246; \t\t\t#kg/kg of air\n",
+ "m_air = Q/(h2-h1);\n",
+ "A = m_air/10; \t\t\t#Quantity of air handled per fan\n",
+ "\n",
+ "# Results\n",
+ "print (\"Quantity of air handled per fan = %.3f\")%(A), (\"kg/h\")\n",
+ "\n",
+ "B = m_air*(W2-W1);\n",
+ "\n",
+ "print (\"Quantity of make up water = %.3f\")% (B),(\"kg/h\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Quantity of air handled per fan = 7848.750 kg/h\n",
+ "Quantity of make up water = 674.992 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.17 Page no : 479"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h1 = 35.4; \t\t\t#kJ/kg\n",
+ "h2 = 45.2; \t\t\t#kJ/kg\n",
+ "v_s1 = 0.8267; \t\t\t#m**3/kg\n",
+ "m_a = 241.9;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "RH = 41; \t\t\t# From chart\n",
+ "print (\"(i) R.H. of heated air = %.3f\")%(RH), (\"%\")\n",
+ "\n",
+ "WBT = 16.1; \t\t\t#0C\n",
+ "print (\"(ii) WBT of heated air = \"), (WBT), (\"\u00baC\")\n",
+ "\n",
+ "Q = m_a*(h2-h1);\n",
+ "print (\"(iii) Heat added to air per minute = \"), (Q), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) R.H. of heated air = 41.000 %\n",
+ "(ii) WBT of heated air = 16.1 \u00baC\n",
+ "(iii) Heat added to air per minute = 2370.62 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.18 Page no : 480"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h1 = 29.3; \t\t\t#kJ/kg\n",
+ "h2 = 42.3; \t\t\t#kJ/kg\n",
+ "h3 = h2;\n",
+ "t_db2 = 24.5; \t\t\t#0C\n",
+ "t_db1 = 12; \t\t\t#0C\n",
+ "v_s1 = 0.817; \t\t\t#m**3/kg\n",
+ "amt = 0.30; \t\t\t#Amount of air circulation m**3/min/person\n",
+ "capacity = 60; \t\t\t#Seating capacity of office\n",
+ "BF = 0.4; \t\t\t#By-pass factor\n",
+ "W3 = 8.6;\n",
+ "W1 = 6.8;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m_a = amt*capacity/v_s1;\n",
+ "\n",
+ "Q = m_a*(h2-h1)/60;\n",
+ "print (\"(i) Heating capacity of the heating coil = %.3f\")%(Q), (\"kW\")\n",
+ "\n",
+ "t_db4 = (t_db2-BF*t_db1)/(1-BF);\n",
+ "print (\"Coil surface temperature = %.3f\")%(t_db4),(\"\u00baC\")\n",
+ "\n",
+ "c = m_a*(W3-W1)/1000*60;\n",
+ "print (\"(ii) The capacity of the humidifier = %.3f\")% (c),(\"kg/h\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Heating capacity of the heating coil = 4.774 kW\n",
+ "Coil surface temperature = 32.833 \u00baC\n",
+ "(ii) The capacity of the humidifier = 2.379 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.19 Page no : 482"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h1 = 82.5; \t\t\t#kJ/kg\n",
+ "h2 = 47.5; \t\t\t#kJ/kg\n",
+ "h3 = 55.7; \t\t\t#kJ/kg\n",
+ "h5 = 36.6; \t\t\t#kJ/kg\n",
+ "W1 = 19.6; \t\t\t#gm/kg\n",
+ "W3 = 11.8; \t\t\t#gm/kg\n",
+ "t_db2 = 17.6; \t\t\t#0C\n",
+ "t_db3 = 25.; \t\t\t#0C\n",
+ "v_s1 = 0.892; \t\t\t#m**3/kg\n",
+ "amt = 250.; \t\t\t#m**3/min\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m_a = amt/v_s1;\n",
+ "capacity = m_a*(h1-h2)*60/14000.;\n",
+ "print (\"(i) The capacity of the cooling coil = %.3f\")%(capacity),(\"TR\")\n",
+ "\n",
+ "BF = (h2-h5)/(h1-h5);\n",
+ "print (\"by-pass factor of the cooling coil = %.3f\")%(BF)\n",
+ "\n",
+ "Q = m_a*(h3-h2)/60.;\n",
+ "print (\"(ii) The heating capacity of the heating coil = %.3f\")%(Q),(\"kW\")\n",
+ "\n",
+ "BF = 0.3;\n",
+ "t_db6 = (t_db3-BF*t_db2)/(1-BF);\n",
+ "print (\"surface temperature of heating coil = %.3f\")% (t_db6), (\"C\")\n",
+ "\n",
+ "m = m_a*(W1-W3)*60/1000.;\n",
+ "print (\"(iii) The mass of water vapour removed per hour = %.3f\")% (m), (\"kg/h\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The capacity of the cooling coil = 42.040 TR\n",
+ "by-pass factor of the cooling coil = 0.237\n",
+ "(ii) The heating capacity of the heating coil = 38.303 kW\n",
+ "surface temperature of heating coil = 28.171 C\n",
+ "(iii) The mass of water vapour removed per hour = 131.166 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch11.ipynb b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch11.ipynb
new file mode 100755
index 00000000..a1619ce6
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch11.ipynb
@@ -0,0 +1,2029 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11 : Chemical Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.1 Page no : 503"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "C = 0.88; \t\t\t#Fraction of carbon in coal\n",
+ "H = 0.042; \t\t\t#Fraction of Hydrogen in coal\n",
+ "w_f = 0.848; \t\t\t#gm\n",
+ "w_fw = 0.027; \t\t\t#gm\n",
+ "w = 1950.; \t\t\t#gm\n",
+ "w_e = 380.; \t\t\t#gm\n",
+ "dt = 3.06; \t\t\t#0C; Observed temperature rise\n",
+ "tc = 0.017; \t\t\t#0C\n",
+ "dt1 = dt+tc; \t\t\t#Corrected temperature rise\n",
+ "Cal = 6700.; \t\t\t#J/gm; Calorific value of fuse wire\n",
+ " \n",
+ "# Calculations\n",
+ "Q_received = (w+w_e)*4.18*dt1; \t\t\t#Heat received by water\n",
+ "Q_rejected = w_fw*Cal; \t\t\t#Heat given out by fuse wire\n",
+ "Q_produced = Q_received - Q_rejected;\n",
+ "HCV = Q_produced/w_f;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Higher calorific value = %.3f\")% (HCV), (\"kJ/kg\")\n",
+ "\n",
+ "LCV = HCV - 2465*9*H;\n",
+ "print (\"Lower Calorific value = %.3f\")% (LCV), (\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Higher calorific value = 35126.455 kJ/kg\n",
+ "Lower Calorific value = 34194.685 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.2 Page no : 505"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 75.882; \t\t\t#cm of Hg\n",
+ "T1 = 286.; \t\t\t#K\n",
+ "V1 = 0.08; \t\t\t#m**3\n",
+ "p2 = 76.; \t\t\t#cm of Hg\n",
+ "T2 = 288.; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "V2 = p1*V1*T2/p2/T1;\n",
+ "m = 28.; \t\t\t#kg\n",
+ "c = 4.18;\n",
+ "t2 = 23.5; \t\t\t#0C\n",
+ "t1 = 10.; \t\t\t#0C\n",
+ "Q_received = m*c*(t2-t1);\n",
+ "HCV = Q_received/V2;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Higher calorific value = %.3f\")% (HCV), (\"kJ/m**3\")\n",
+ "\n",
+ "amt = 0.06/0.08; \t\t\t#Amount of vapour formed per m**3 of gas burnt\n",
+ "LCV = HCV-2465*amt;\n",
+ "print (\"Lower calorific value = %.3f\")% (LCV), (\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Higher calorific value = 19643.843 kJ/m**3\n",
+ "Lower calorific value = 17795.093 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.3 Page no : 508"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "C = 0.85; \t\t\t#Weight of Carbon present\n",
+ "H2 = 0.06; \t\t\t#Weight of Hydrogen present\n",
+ "O2 = 0.06; \t\t\t#Weight of Oxygen present\n",
+ "\n",
+ "# Calculations\n",
+ "w_required = C*8./3 + H2*8; \t\t\t#Weight of O2 required \n",
+ "w_needed = w_required-O2; \t\t\t#Weight of O2 to be supplied\n",
+ "w_air = w_needed*100./23;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Weight of air needed = %.3f\")% (w_air), (\"kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Weight of air needed = 11.681 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.4 Page no : 508"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "C = 0.848; \t\t\t#kg\n",
+ "H2 = 0.152; \t\t\t#kg\n",
+ "O2_used = C*8./3 + H2*8;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Minimum weight of air needed for combustion\")\n",
+ "w_min = O2_used*100/23.;\n",
+ "print (\"Minimum weight of air needed for combustion = %.3f\")%(w_min), (\"kg\")\n",
+ "\n",
+ "w_excess = w_min*0.15; \t\t\t#Excess air supplied\n",
+ "w_O2 = w_excess*23/100; \t\t\t#Weight of O2 in excess air\n",
+ "w_total = w_min + w_excess; \t\t\t#Total air supplied for combustion\n",
+ "w_N2 = w_total*77/100; \t\t\t#Weight of N2 in flue gases\n",
+ "\n",
+ "print (\"(ii) the volumetric composition of the products of combustion\")\n",
+ "\n",
+ "#For CO2\n",
+ "x1 = 3.109;\n",
+ "y1 = 44.;\n",
+ "z1 = x1/y1;\n",
+ "\n",
+ "#For O2\n",
+ "x2 = w_O2;\n",
+ "y2 = 32.;\n",
+ "z2 = x2/y2;\n",
+ "\n",
+ "#For N2\n",
+ "x3 = w_N2;\n",
+ "y3 = 28.;\n",
+ "z3 = x3/y3;\n",
+ "z = z1+z2+z3;\n",
+ "\n",
+ "#For CO2\n",
+ "V1 = z1/z*100;\n",
+ "print (\"volume of CO2 = %.3f\")% (V1), (\"%\")\n",
+ "\n",
+ "#For O2\n",
+ "V2 = z2/z*100;\n",
+ "print (\"volume of O2 = %.3f\")% (V2), (\"%\")\n",
+ "\n",
+ "#For CO2\n",
+ "V3 = z3/z*100;\n",
+ "print (\"volume of N2 = %.3f\")% (V3), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Minimum weight of air needed for combustion\n",
+ "Minimum weight of air needed for combustion = 15.119 kg\n",
+ "(ii) the volumetric composition of the products of combustion\n",
+ "volume of CO2 = 12.504 %\n",
+ "volume of O2 = 2.884 %\n",
+ "volume of N2 = 84.612 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.5 Page no : 509"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "C=0.78;\n",
+ "H2=0.06;\n",
+ "O2=0.03;\n",
+ "\n",
+ "w_O2=C*8./3 + H2*8;\n",
+ "w_min=(w_O2-O2)*100./23; \t\t\t#Minimum wt. of air needed for combustion\n",
+ "\n",
+ "\n",
+ "#For CO2\n",
+ "x1=0.104;\n",
+ "y1=44.;\n",
+ "z1=x1*y1;\n",
+ "\n",
+ "#For CO\n",
+ "x2=0.002;\n",
+ "y2=28.;\n",
+ "z2=x2*y2;\n",
+ "\n",
+ "#For N2\n",
+ "x3=0.816;\n",
+ "y3=28.;\n",
+ "z3=x3*y3;\n",
+ "\n",
+ "#For O2\n",
+ "x4=0.078;\n",
+ "y4=32.;\n",
+ "z4=x4*y4;\n",
+ "\n",
+ "z=z1+z2+z3+z4;\n",
+ "\n",
+ "# Calculations\n",
+ "W_CO2=z1/z; \t\t\t#Weight per kg of flue gas\n",
+ "W_CO=z2/z; \t\t\t#Weight per kg of flue gas\n",
+ "W_N2=z3/z; \t\t\t#Weight per kg of flue gas\n",
+ "W_O2=z4/z; \t\t\t#Weight per kg of flue gas\n",
+ "\n",
+ "amt=3./11*W_CO2 + 3./7*W_CO;\n",
+ "\n",
+ "W=C/amt; \t\t\t#Weight of dry flue gas per kg of fuel\n",
+ "\n",
+ "# Results\n",
+ "print (\"(i)Weight of dry flue gas per kg of fuel = %.3f\")% (W), (\"kg\")\n",
+ "\n",
+ "m_O2=W_O2-4/7*W_CO; \t\t\t#Weight of excess oxygen per kg of flue gas\n",
+ "m_excess=W*m_O2; \t\t\t#Weight of excess O2 per kg of fuel\n",
+ "\n",
+ "w_excess=m_excess*100/23; \t\t\t#Weight of excess air per kg of fuel\n",
+ "print (\"(ii)Weight of excess air per kg of fuel= %.3f\")% (w_excess), (\"kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Weight of dry flue gas per kg of fuel = 18.382 kg\n",
+ "(ii)Weight of excess air per kg of fuel= 6.655 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.6 Page no : 510"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "v_CO = 0.05;\n",
+ "v_CO2 = 0.10;\n",
+ "v_H2 = 0.50;\n",
+ "v_CH4 = 0.25;\n",
+ "v_N2 = 0.10;\n",
+ "V_fuel = 1.;\n",
+ "\n",
+ "# Calculations\n",
+ "V_O2 = v_CO/2+v_H2/2+2*v_CH4; \t\t\t#Volume of O2 needed\n",
+ "V_air = V_O2*100./21; \t\t\t#Volume of air required\n",
+ "V_N2 = V_air*79./100; \t\t\t#Volume of nitrogen in the air\n",
+ "V = v_CO + v_CO2 + v_CH4 + v_N2 + V_N2; \t\t\t#Dry combustion products\n",
+ "O2 = 6.;\n",
+ "V_excess = O2*V/(21-O2);\n",
+ "V_total = V_air+V_excess;\n",
+ "\n",
+ "ratio = V_total/V_fuel;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Air fuel ratio = %.f\")%(ratio)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air fuel ratio = 5\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.7 Page no : 511"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "C = 0.85;\n",
+ "H2 = 0.15;\n",
+ "\n",
+ "#For CO2\n",
+ "x1 = 0.115;\n",
+ "y1 = 44;\n",
+ "z1 = x1*y1;\n",
+ "\n",
+ "#For CO\n",
+ "x2 = 0.012;\n",
+ "y2 = 28;\n",
+ "z2 = x2*y2;\n",
+ "\n",
+ "#For O2\n",
+ "x3 = 0.009;\n",
+ "y3 = 32;\n",
+ "z3 = x3*y3;\n",
+ "\n",
+ "#For N2\n",
+ "x4 = 0.86;\n",
+ "y4 = 28;\n",
+ "z4 = x4*y4;\n",
+ "\n",
+ "# Calculations\n",
+ "z = z1+z2+z3+z4;\n",
+ "\n",
+ "W_CO2 = z1/z; \t\t\t#Weight per kg of flue gas\n",
+ "W_CO = z2/z; \t\t\t#Weight per kg of flue gas\n",
+ "W_O2 = z3/z; \t\t\t#Weight per kg of flue gas\n",
+ "W_N2 = 4/z; \t\t\t#Weight per kg of flue gas\n",
+ "\n",
+ "W_C = 3./11*W_CO2 + 3./7*W_CO; \t\t\t#Weight of carbon per kg of flue gas\n",
+ "\n",
+ "W = C/W_C; \t\t\t#Weight of dry flue gas per kg of fuel\n",
+ "\n",
+ "Vapour = 1.35; \t\t\t#kg; Vapour of combustion\n",
+ "\n",
+ "W_total = W+Vapour; \t\t\t#Total weight of gas\n",
+ "\n",
+ "W_air = W_total-1; \t\t\t#Air supplied\n",
+ "\n",
+ "ratio = W_air/1;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Ratio of air to petrol = %.3f\")% (ratio)\n",
+ "\n",
+ "S_air = (C*8./3 + H2*8)*100./23; \t\t\t#Stoichiometric air\n",
+ "\n",
+ "W_excess = W_air-S_air; \t\t\t#Excess air\n",
+ "\n",
+ "Excess = W_excess/S_air*100; \t\t\t#Percentage excess air\n",
+ "\n",
+ "print (\"Percentage excess air %.3f\")% (Excess),\n",
+ "print (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of air to petrol = 16.951\n",
+ "Percentage excess air 12.461 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.8 Page no : 512"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "C = 0.86;\n",
+ "H2 = 0.08;\n",
+ "S = 0.03;\n",
+ "O2 = 0.02;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "W_O2 = C*8./3 + H2*8 + S*1;\n",
+ "A = W_O2-O2; \t\t\t#Weight of oxygen to be supplied per kg of fuel\n",
+ "W_min = A*100./23;\n",
+ "r_correct = 1./W_min/1; \t\t\t#\u201ccorrect\u201d fuel-air ratio\n",
+ "r_actual = 1./12;\n",
+ "\n",
+ "print (\"(i) Mixture strength\")\n",
+ "s = r_actual/r_correct*100; \t\t\t#Mixture strength\n",
+ "\n",
+ "richness = s-100;\n",
+ "print (\"richness = %.3f\")% (richness), (\"%\")\n",
+ "print (\"This show that mixture is 6.5% rich.\")\n",
+ "\n",
+ "D = 1/r_correct-1/r_actual;\n",
+ "\n",
+ "CO = 0.313; \t\t\t#kg\n",
+ "CO2 = 2.662; \t\t\t#kg\n",
+ "N2 = 9.24; \t\t\t#kg\n",
+ "SO2 = 0.06; \t\t\t#kg\n",
+ "\n",
+ "print (\"(ii) The percentage composition of dry flue gases\")\n",
+ "\n",
+ "#For CO\n",
+ "x1 = 0.313; \t\t\t#kg\n",
+ "y1 = 28.;\n",
+ "z1 = x1/y1;\n",
+ "\n",
+ "#For CO2\n",
+ "x2 = 2.662; \t\t\t#kg\n",
+ "y2 = 44;\n",
+ "z2 = x2/y2;\n",
+ "\n",
+ "#For N2\n",
+ "x3 = 9.24; \t\t\t#kg\n",
+ "y3 = 28;\n",
+ "z3 = x3/y3;\n",
+ "\n",
+ "#For SO2\n",
+ "x4 = 0.06; \t\t\t#kg\n",
+ "y4 = 64;\n",
+ "z4 = x4/y4;\n",
+ "\n",
+ "z = z1+z2+z3+z4;\n",
+ "\n",
+ "#Let percentage volume be denoted by V\n",
+ "V_CO = z1/z*100;\n",
+ "print (\"Percentage volume of CO = %.3f\")% (V_CO), (\"%\")\n",
+ "\n",
+ "V_CO2 = z2/z*100;\n",
+ "print (\"Percentage volume of CO2 = %.3f\")% (V_CO2), (\"%\")\n",
+ "\n",
+ "V_N2 = z3/z*100;\n",
+ "print (\"Percentage volume of N2 = %.3f\")% (V_N2), (\"%\")\n",
+ "\n",
+ "\n",
+ "V_SO2 = z4/z*100;\n",
+ "print (\"Percentage volume of SO2 = %.3f\")% (V_SO2), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Mixture strength\n",
+ "richness = 6.643 %\n",
+ "This show that mixture is 6.5% rich.\n",
+ "(ii) The percentage composition of dry flue gases\n",
+ "Percentage volume of CO = 2.776 %\n",
+ "Percentage volume of CO2 = 15.027 %\n",
+ "Percentage volume of N2 = 81.964 %\n",
+ "Percentage volume of SO2 = 0.233 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.9 Page no :513"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "A = 992./284*100./23; \t\t\t#Air required for complete combustion\n",
+ "B = 13.; \t\t\t#kg/kg of fuel; Air actually supplied\n",
+ "D = A-B; \t\t\t#Deficiency of air\n",
+ "\n",
+ "# Calculations\n",
+ "W_CO2 = 0.466*11./3;\n",
+ "W_CO = 0.379*7./3;\n",
+ "W_H2O = 22./142*9;\n",
+ "W_N2 = 13.*0.77;\n",
+ "\n",
+ "#For CO2\n",
+ "x1 = W_CO2\n",
+ "y1 = 44.;\n",
+ "z1 = x1/y1;\n",
+ "\n",
+ "#For CO\n",
+ "x2 = W_CO;\n",
+ "y2 = 28.;\n",
+ "z2 = x2/y2;\n",
+ "\n",
+ "#For H2O\n",
+ "x3 = W_H2O;\n",
+ "y3 = 18.;\n",
+ "z3 = x3/y3;\n",
+ "\n",
+ "#For N2\n",
+ "x4 = W_N2;\n",
+ "y4 = 28.;\n",
+ "z4 = x4/y4;\n",
+ "\n",
+ "z = z1+z2+z3+z4;\n",
+ "\n",
+ "CO2 = z1/z*100;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Percentage of CO2 = %.3f\")% (CO2), (\"%\")\n",
+ "\n",
+ "CO = z2/z*100;\n",
+ "print (\"Percentage of CO = %.3f\")% (CO), (\"%\")\n",
+ "\n",
+ "H2O = z3/z*100;\n",
+ "print (\"Percentage of H2O = %.3f\")% (H2O), (\"%\")\n",
+ "\n",
+ "N2 = z4/z*100;\n",
+ "print (\"Percentage of N2 = %.3f\")% (N2), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage of CO2 = 7.684 %\n",
+ "Percentage of CO = 6.249 %\n",
+ "Percentage of H2O = 15.328 %\n",
+ "Percentage of N2 = 70.739 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.11 Page no : 515"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "C = 80.;\n",
+ "#Analysis of gas entering the economiser\n",
+ "CO2_1 = 8.3;\n",
+ "CO_1 = 0.;\n",
+ "O2_1 = 11.4;\n",
+ "N2_1 = 80.3;\n",
+ "\n",
+ "\t\t\t#Analysis of gas leaving the economiser\n",
+ "CO2_2 = 7.9;\n",
+ "CO_2 = 0.;\n",
+ "O2_2 = 11.5;\n",
+ "N2_2 = 80.6;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "A1 = N2_1*C/33./(CO2_1 + CO_1); \t\t\t#Air supplied on the basis of conditions at entry to the economiser\n",
+ "A2 = N2_2*C/33./(CO2_2 + CO_2); \t\t\t#Air applied on the basis of conditions at exit\n",
+ "\n",
+ "leakage = A2-A1; \t\t\t#Air leakage\n",
+ "print (\"Air leakege = %.3f\")% (leakage), (\"kg of air per kg of fuel\")\n",
+ "\n",
+ "W_fuel = 0.85; \t\t\t#kg; Weight of fuel pasmath.sing up the chimney\n",
+ "\n",
+ "c = 1.05;\n",
+ "T2 = 410.;\n",
+ "T1 = 0.;\n",
+ "\n",
+ "W = A1+W_fuel; \t\t\t#Total weight of products\n",
+ "Q1 = W*c*(T2-T1); \t\t\t#Heat in flue gases per kg of coal\n",
+ "Q2 = leakage*1.005*(20-0); \t\t\t#Heat in leakage air\n",
+ "t = (Q1+Q2)/(1.005*leakage + W*1.05);\n",
+ "dT = T2-t;\n",
+ "\n",
+ "print (\"Fall in temperature as a result of the air leakage into the economiser %.3f\")%(dT),(\"C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air leakege = 1.280 kg of air per kg of fuel\n",
+ "Fall in temperature as a result of the air leakage into the economiser 18.711 C\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.12 Page no : 516"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "w_O2 = 3.*32./46*100./23; \t\t\t#For complete combustion of 1 kg of C2H6O, oxygen required\n",
+ "\n",
+ "# Calculations and Results\n",
+ "ratio = w_O2;\n",
+ "print (\"A:F ratio = %.3f\")%(ratio)\n",
+ "\n",
+ "w1 = 88.; \t\t\t#kg\n",
+ "w2 = 54.; \t\t\t#kg\n",
+ "\n",
+ "w = w1+w2; \t\t\t#kg\n",
+ "W = 46.; \t\t\t#kg\n",
+ "\n",
+ "w_CO2 = w1/W*100;\n",
+ "print (\"CO2 produced by fuel %.3f\")% (w_CO2), (\"%\")\n",
+ "\n",
+ "w_H2O = w2/W*100;\n",
+ "print (\"H2O produced by fuel %.3f\")% (w_H2O), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A:F ratio = 9.074\n",
+ "CO2 produced by fuel 191.304 %\n",
+ "H2O produced by fuel 117.391 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.13 Page no : 517"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# C2H2+xO2---->aCO2+bH2O\n",
+ "\n",
+ "# Calculations\n",
+ "Amount = 3.076 + 10.12;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Hence amount of theoretical air required for combustion of 1 kg acetylene = \"), (Amount), (\"kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hence amount of theoretical air required for combustion of 1 kg acetylene = 13.196 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.14 Page no : 517"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# C2H2+2.5O2+2.5*(79/21)N2 --> 2CO2+H2O+2.5*(79/21)N2\n",
+ "\n",
+ "# Variables\n",
+ "m_CO2 = 3.38; \t\t\t#kg\n",
+ "m_H2O = 0.69; \t\t\t#kg\n",
+ "m_O2 = 3.07; \t\t\t#kg\n",
+ "m_N2 = 20.25; \t\t\t#kg\n",
+ "\n",
+ "# Calculations\n",
+ "m_total = m_CO2+m_H2O+m_O2+m_N2;\n",
+ "\n",
+ "CO2 = m_CO2/m_total*100;\n",
+ "H2O = m_H2O/m_total*100;\n",
+ "O2 = m_O2/m_total*100;\n",
+ "N2 = m_N2/m_total*100;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Hence the gravimetric analysis of the complete combustion is : \")\n",
+ "print (\"CO2 = %.3f\")%(CO2), (\"%\")\n",
+ "\n",
+ "print (\"H2O = %.3f\")%(H2O), (\"%\")\n",
+ "\n",
+ "print (\"O2 = %.3f\")% (O2), (\"%\")\n",
+ "\n",
+ "print (\"N2 = %.3f\")%(N2), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hence the gravimetric analysis of the complete combustion is : \n",
+ "CO2 = 12.340 %\n",
+ "H2O = 2.519 %\n",
+ "O2 = 11.208 %\n",
+ "N2 = 73.932 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.15 Page no : 518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculations\n",
+ "AF_mole = (12.5+12.5*(79./21))/1;\n",
+ "AF_mass = AF_mole*28.97/(8.*12+1*18);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Air fuel ratio = %.3f\")%(AF_mass), (\"kg air/kg fuel\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air fuel ratio = 15.126 kg air/kg fuel\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.16 Page no : 518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# C8H18+12.5*O2+12.5*(79/21)N2 --> 8CO2+9H2O+12.5*(79/21)*N2\n",
+ "# C8H18 + (2) (12.5) O2 + (2) (12.5)*(79/21)N2-->8CO2 + 9H2O + (1) (12.5) O2 + (2) (12.5)*(79/21)*N2\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m_fuel = 1*(8*12+1*18);\n",
+ "m_air = 2*12.5*(1+79./21)*28.97;\n",
+ "\n",
+ "AF = m_air/m_fuel;\n",
+ "print (\"(i) Air-fuel ratio = %.3f\")%(AF)\n",
+ "\n",
+ "print (\"(ii) Dew point of the products\")\n",
+ "n = 8+9+12.5+2*12.5*(79./21);\n",
+ "\n",
+ "x = 9./n;\n",
+ "p = 100.*x;\n",
+ "\n",
+ "#Hence\n",
+ "t_dp = 39.7; \t\t\t#0C\n",
+ "\n",
+ "print (\"t_dp = %.3f\")%(t_dp),(\"\u00b0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Air-fuel ratio = 30.253\n",
+ "(ii) Dew point of the products\n",
+ "t_dp = 39.700 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.17 Page no : 519"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# C2H6 + 3.5O2 \u2192 2CO2 + 3H2O\n",
+ "\n",
+ "# Calculations\n",
+ "n = 1.3+0.7+0.9*3.5*(79./21);\n",
+ "CO2 = 1.3/n*100;\n",
+ "CO = 0.7/n*100;\n",
+ "N2 = 11.85/n*100;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Volumetric analysis of dry products of combustion is as follows \")\n",
+ "\n",
+ "print (\"CO2 = %.3f\")% (CO2), (\"%\")\n",
+ "\n",
+ "print (\"CO = %.3f\")% (CO), (\"%\")\n",
+ "\n",
+ "print (\"N2 = %.3f\")% (N2), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volumetric analysis of dry products of combustion is as follows \n",
+ "CO2 = 9.386 %\n",
+ "CO = 5.054 %\n",
+ "N2 = 85.560 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.18 Page no : 520"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print (\"(i) Combustion equation\")\n",
+ "\n",
+ "# Variables\n",
+ "z = 87.1;\n",
+ "y = z*(79/21.);\n",
+ "x = 10+0.53;\n",
+ "a = 2*x;\n",
+ "\n",
+ "#10.53 CH4 + 23.16 O2 + 87.1 N2 \u2192 10.0 CO2 + 0.53 CO + 2.37 O2 + 21.06 H2O + 87.1 N2\n",
+ "\n",
+ "print (\"CH4 + 2.2 O2 + 8.27 N2 \u2192 0.95 CO2 + 0.05 CO + 2H2O + 0.225 O2 + 8.27 N2\")\n",
+ "\n",
+ "print (\"(ii) Air-fuel ratio \")\n",
+ "\n",
+ "AF_mole = 2.2+8.27;\n",
+ "print (\"air-fuel ratio on a mole basis = \"), (AF_mole), (\"moles air/mole fuel\")\n",
+ "\n",
+ "AF_mass = AF_mole*28.97/(12+1*4);\n",
+ "print (\"air-fuel ratio on a mass basis = %.3f\")%(AF_mass), (\"air/kg fuel\")\n",
+ "\n",
+ "# CH4 + 2O2 + 2*(79/21)N2 \u2192 CO2 + 2H2O + (2)*(79/21)N2\n",
+ "AF_theor = (2+2*(79./21))*28.97/(12+1*4);\n",
+ "print (\"theoretical air-fuel ratio = %.3f\")% (AF_theor), (\"kg air/kg fuel\")\n",
+ "\n",
+ "theo = AF_mass/AF_theor*100;\n",
+ "print (\"(iii) Percent theoretical air = %.3f\")%(theo), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Combustion equation\n",
+ "CH4 + 2.2 O2 + 8.27 N2 \u2192 0.95 CO2 + 0.05 CO + 2H2O + 0.225 O2 + 8.27 N2\n",
+ "(ii) Air-fuel ratio \n",
+ "air-fuel ratio on a mole basis = 10.47 moles air/mole fuel\n",
+ "air-fuel ratio on a mass basis = 18.957 air/kg fuel\n",
+ "theoretical air-fuel ratio = 17.244 kg air/kg fuel\n",
+ "(iii) Percent theoretical air = 109.935 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.19 Page no : 521"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print (\"(i) The stoichiometric A/F ratio\")\n",
+ "\n",
+ "# Variables\n",
+ "a = 0.82/12; \t\t\t# Carbon balance\n",
+ "b = 0.10/2; \t\t\t#Hydrogen balance\n",
+ "x = (2*a+b)/2; \t\t\t# Oxygen balance\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Stoichiometric_AF_ratio = 2.976/0.233;\n",
+ "\n",
+ "print (\"Stoichiometric AF ratio = %.3f\")%(Stoichiometric_AF_ratio)\n",
+ "\n",
+ "n = a+b+3.76*x;\n",
+ "CO2 = 0.068/n*100;\n",
+ "H2 = 0.05/n*100;\n",
+ "N2 = 3.76*0.093/n*100;\n",
+ "\n",
+ "print (\"the analysis of the products is\")\n",
+ "print (\"CO2 = %.3f\")%(CO2),(\"%\")\n",
+ "\n",
+ "print (\"H2 = %.3f\")%(H2),(\"%\")\n",
+ "\n",
+ "print (\"N2 = %.3f\")%(N2),(\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The stoichiometric A/F ratio\n",
+ "Stoichiometric AF ratio = 12.773\n",
+ "the analysis of the products is\n",
+ "CO2 = 14.491 %\n",
+ "H2 = 10.655 %\n",
+ "N2 = 74.516 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.20 Page no : 522"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "# C + O2 \u2192 CO2\n",
+ "# 2H2 + O2 \u2192 2H2O\n",
+ "# S + O2 \u2192 SO2\n",
+ "\n",
+ "# Variables\n",
+ "O2_req = 2.636; \t\t\t#kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "AF = O2_req/0.233;\n",
+ "print (\"The stoichiometric A/F ratio = %.3f\")%(AF)\n",
+ "\n",
+ "AF_act = AF+0.3*AF;\n",
+ "print (\"(i) Actual A/F ratio = %.3f\")%(AF_act)\n",
+ "\n",
+ "print (\"(ii) Wet and dry analyses of products of combustion by volume\")\n",
+ "\n",
+ "n_wet = 0.5208;\n",
+ "n_dry = 0.5008;\n",
+ "\n",
+ "print (\"Analysis of wet products is as follows :\")\n",
+ "\n",
+ "CO2 = 0.0734/n_wet*100;\n",
+ "print (\"CO2 = %.3f\")%(CO2), (\"%\")\n",
+ "\n",
+ "H2O = 0.0200/n_wet*100;\n",
+ "print (\"H2O = %.3f\")%(H2O), (\"%\")\n",
+ "\n",
+ "SO2 = 0.0002/n_wet*100;\n",
+ "print (\"SO2 = %.3f\")% (SO2), (\"%\")\n",
+ "\n",
+ "O2 = 0.0244/n_wet*100;\n",
+ "print (\"O2 = %.3f\")% (O2), (\"%\")\n",
+ "\n",
+ "N2 = 0.4028/n_wet*100;\n",
+ "print (\"N2 = %.3f\")%(N2), (\"%\")\n",
+ "\n",
+ "print (\"Analysis of dry products is as follows :\")\n",
+ "\n",
+ "CO2 = 0.0734/n_dry*100;\n",
+ "print (\"CO2 = %.3f\")% (CO2), (\"%\")\n",
+ "\n",
+ "SO2 = 0.0002/n_dry*100;\n",
+ "print (\"SO2 = %.3f\")% (SO2), (\"%\")\n",
+ "\n",
+ "O2 = 0.0244/n_dry*100;\n",
+ "print (\"O2 = %.3f\")%(O2),(\"%\")\n",
+ "\n",
+ "N2 = 0.4028/n_dry*100;\n",
+ "print (\"N2 = %.3f\")%(N2),(\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The stoichiometric A/F ratio = 11.313\n",
+ "(i) Actual A/F ratio = 14.707\n",
+ "(ii) Wet and dry analyses of products of combustion by volume\n",
+ "Analysis of wet products is as follows :\n",
+ "CO2 = 14.094 %\n",
+ "H2O = 3.840 %\n",
+ "SO2 = 0.038 %\n",
+ "O2 = 4.685 %\n",
+ "N2 = 77.343 %\n",
+ "Analysis of dry products is as follows :\n",
+ "CO2 = 14.657 %\n",
+ "SO2 = 0.040 %\n",
+ "O2 = 4.872 %\n",
+ "N2 = 80.431 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.21 Page no : 523"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "n_O2 = 0.853; \t\t\t#total moles of O2\n",
+ "\n",
+ "# Calculations and Results\n",
+ "AF = n_O2/0.21;\n",
+ "print (\"(i) Stoichiometric A/F ratio = %.3f\")%(AF)\n",
+ "\n",
+ "print (\"(ii) Wet and dry analyses of the products of combustion if the actual mixture is 30% weak :\")\n",
+ "AF_act = AF+0.3*AF;\n",
+ "n_N2 = 0.79*AF_act;\n",
+ "O2_excess = 0.21*AF_act-n_O2;\n",
+ "\n",
+ "n_wet = 5.899;\n",
+ "n_dry = 4.915;\n",
+ "\n",
+ "print (\"Analysis by volume of wet products is as follows :\")\n",
+ "CO2 = 0.490/n_wet*100;\n",
+ "print (\"CO2 = %.3f\")%(CO2),(\"%\")\n",
+ "\n",
+ "H2O = 0.984/n_wet*100;\n",
+ "print (\"H2O = %.3f\")%(H2O),(\"%\")\n",
+ "\n",
+ "O2 = O2_excess/n_wet*100;\n",
+ "print (\"O2 = %.3f\")%(O2), (\"%\")\n",
+ "\n",
+ "N2 = n_N2/n_wet*100;\n",
+ "print (\"N2 = %.3f\")%(N2),(\"%\")\n",
+ "\n",
+ "print (\"Analysis by volume of dry products is as follows :\")\n",
+ "\n",
+ "CO2 = 0.490/n_dry*100;\n",
+ "print (\"CO2 = %.3f\")%(CO2), (\"%\")\n",
+ "\n",
+ "O2 = O2_excess/n_dry*100;\n",
+ "print (\"O2 = %.3f\")%(O2), (\"%\")\n",
+ "\n",
+ "N2 = n_N2/n_dry*100;\n",
+ "print (\"N2 = %.3f\")%(N2), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Stoichiometric A/F ratio = 4.062\n",
+ "(ii) Wet and dry analyses of the products of combustion if the actual mixture is 30% weak :\n",
+ "Analysis by volume of wet products is as follows :\n",
+ "CO2 = 8.306 %\n",
+ "H2O = 16.681 %\n",
+ "O2 = 4.338 %\n",
+ "N2 = 70.717 %\n",
+ "Analysis by volume of dry products is as follows :\n",
+ "CO2 = 9.969 %\n",
+ "O2 = 5.207 %\n",
+ "N2 = 84.874 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.22 Page no : 525"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Calculations and Results\n",
+ "O2_req = 3*32./46;\n",
+ "AF = O2_req/0.233;\n",
+ "print (\"Stoichiometric A/F ratio = %.3f\")% (AF)\n",
+ "\n",
+ "mix = 0.8; \t\t\t#mixture strength\n",
+ "\n",
+ "AF_actual = AF/mix;\n",
+ "print (\"Actual A/F ratio = %.3f\")%(AF_actual),\n",
+ "\n",
+ "# C2H6O + 1.25*(3 O2 + 3*79/21 N2) \u2192 2CO2 + 3H2O + 0.25*3O2 + 1.25*3*79/21 N2\n",
+ "\n",
+ "n = 2+3+0.75+14.1;\n",
+ "\n",
+ "print (\"Hence wet analysis is\")\n",
+ "\n",
+ "CO2 = 2/n*100.;\n",
+ "print (\"CO2 = %.3f\")%(CO2), (\"%\")\n",
+ "\n",
+ "H2O = 3/n*100.;\n",
+ "print (\"H2O = %.3f\")%(H2O),(\"%\")\n",
+ "\n",
+ "\n",
+ "O2 = 0.75/n*100;\n",
+ "print (\"O2 = %.3f\")%(O2), (\"%\")\n",
+ "\n",
+ "N2 = 14.1/n*100;\n",
+ "print (\"N2 = %.3f\")%(N2),(\"%\")\n",
+ "\n",
+ "nd = 2+0.75+14.1; \t\t\t#total dry moles\n",
+ "\n",
+ "print (\"Hence dry analysis is : \")\n",
+ "\n",
+ "CO2 = 2/nd*100.;\n",
+ "print (\"CO2 = %.3f\")%(CO2),(\"%\")\n",
+ "\n",
+ "O2 = 0.75/nd*100;\n",
+ "print (\"O2 = %.3f\")%(O2),(\"%\")\n",
+ "\n",
+ "N2 = 14.1/nd*100;\n",
+ "print (\"N2 = %.3f\")% (N2), (\"%\")\n",
+ "\n",
+ "mix = 1.3;\n",
+ "AF_act = AF/mix;\n",
+ "print (\"Actual A/F ratio = %.3f\")% (AF_act)\n",
+ "\n",
+ "print \"Hence wet analysis is :\"\n",
+ "CO2 = .614/13.678 * 100\n",
+ "print \"CO2 = %.2f %%\"%CO2\n",
+ "CO = 1.386/13.678 * 100\n",
+ "print \"CO = %.2f %%\" %CO\n",
+ "H2O = 3/13.678 * 100\n",
+ "print \"H2O = %.2f %%\" %H2O\n",
+ "N2 = 8.678/13.678 * 100\n",
+ "print \"N2 = %.2f %%\" %N2\n",
+ "\n",
+ "print \"Hence dry analysis is :\"\n",
+ "CO2 = .614/10.678 * 100\n",
+ "print \"CO2 = %.2f %%\"%CO2\n",
+ "CO = 1.386/10.678 * 100\n",
+ "print \"CO = %.2f %%\" %CO\n",
+ "N2 = 8.678/10.678 * 100\n",
+ "print \"N2 = %.2f %%\" %N2\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stoichiometric A/F ratio = 8.957\n",
+ "Actual A/F ratio = 11.196 Hence wet analysis is\n",
+ "CO2 = 10.076 %\n",
+ "H2O = 15.113 %\n",
+ "O2 = 3.778 %\n",
+ "N2 = 71.033 %\n",
+ "Hence dry analysis is : \n",
+ "CO2 = 11.869 %\n",
+ "O2 = 4.451 %\n",
+ "N2 = 83.680 %\n",
+ "Actual A/F ratio = 6.890\n",
+ "Hence wet analysis is :\n",
+ "CO2 = 4.49 %\n",
+ "CO = 10.13 %\n",
+ "H2O = 21.93 %\n",
+ "N2 = 63.44 %\n",
+ "Hence dry analysis is :\n",
+ "CO2 = 5.75 %\n",
+ "CO = 12.98 %\n",
+ "N2 = 81.27 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.23 Page no : 527"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# C2H6O + 3O2 + 3*79/21 N2 \u2192 2CO2 + 3H2O + 3*79/21 N2\n",
+ "\n",
+ "# Variables\n",
+ "R0 = 8.314*10**3; \t\t\t#kJ/kg K\n",
+ "m = 46.; \t\t\t#kg\n",
+ "\n",
+ "print (\"(i) Volume of reacmath.tants per kg of fuel \")\n",
+ "\n",
+ "n = 1+3+3*79./21;\n",
+ "T = 323.; \t\t\t#K\n",
+ "p = 1.013*10**5; \t\t\t#Pa\n",
+ "\n",
+ "# Calculations\n",
+ "V = n*R0*T/p;\n",
+ "\n",
+ "Vr = V/m;\n",
+ "print (\"Vr = %.3f\")% (Vr), (\"m**3\")\n",
+ "\n",
+ "print (\"(ii) Volume of products per kg of fuel\")\n",
+ "\n",
+ "n = 2+3+3*79./21;\n",
+ "T = 403.; \t\t\t#K\n",
+ "p = 1*10.**5; \t\t\t#Pa\n",
+ "\n",
+ "V = n*R0*T/p;\n",
+ "\n",
+ "Vp = V/m;\n",
+ "print (\"Vp = %.3f\")% (Vp), (\"m**3\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Volume of reacmath.tants per kg of fuel \n",
+ "Vr = 8.809 m**3\n",
+ "(ii) Volume of products per kg of fuel\n",
+ "Vp = 11.862 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.24 Page no : 527"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 0.506H2 + 0.1CO + 0.26CH4 + 0.04C4H8 + 0.004O2 + 0.03CO2 + 0.06N2 + 0.21 \u00d7 7O2 + 0.79 \u00d7 7N2 \u2192 a CO2 + b H2O + c O2 + d N2\n",
+ "\n",
+ "# Variables\n",
+ "a = 0.1*0.26+4*0.04+0.03;\n",
+ "b = (2*0.506+4*0.26+8*0.04)/2;\n",
+ "c = (0.1+2*0.004+2*0.03+0.21*7*2-2*a-b)/2;\n",
+ "d = (2*0.06+2*0.79*7)/2;\n",
+ "n = 0.55+0.411+5.59;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"analysis by volume is\")\n",
+ "CO2 = 0.55/n*100;\n",
+ "print (\"CO2 = %.3f\")%(CO2), (\"%\")\n",
+ "\n",
+ "O2 = 0.411/n*100;\n",
+ "print (\"O2 = %.3f\")%(O2), (\"%\")\n",
+ "\n",
+ "N2 = 5.59/n*100;\n",
+ "print (\"N2 = %.3f\")%(N2), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "analysis by volume is\n",
+ "CO2 = 8.396 %\n",
+ "O2 = 6.274 %\n",
+ "N2 = 85.330 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.25 Page no : 528"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# C_aH_bO_cN_dS_e\n",
+ "\n",
+ "# Variables\n",
+ "a = 60./12;\n",
+ "b = 20.;\n",
+ "c = 5./16;\n",
+ "d = 10./14;\n",
+ "e = 5./32;\n",
+ "p = 5;\n",
+ "q = 20./2;\n",
+ "\n",
+ "# Calculations\n",
+ "r = 0.1562;\n",
+ "x = (2*p+q+2*r-0.3125)/2;\n",
+ "s = (0.7143+2*x*79./21)/2;\n",
+ "air = (9.92*32+x*79./21*28)/100;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Stoichiometric air required = %.3f\")%(air), (\"kg/kg of fuel\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stoichiometric air required = 13.708 kg/kg of fuel\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.26 Page no : 529"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# C_aH_bO_cN_d\n",
+ "\n",
+ "# Variables\n",
+ "a = 84./12;\n",
+ "b = 10.;\n",
+ "c = 3.5/16;\n",
+ "d = 1.5/14;\n",
+ "\n",
+ "# C7 H10 O0.218 N0.107 + x O2 + x*(79/21)N2 \u2192 p CO2 + q H2O + r N2\n",
+ "\n",
+ "p = 7.;\n",
+ "q = 10./2;\n",
+ "x = (2*p+q-c)/2.;\n",
+ "r = (d+2*x*(79./21))/2;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "AF = (x*32+x*79/21*28)/100;\n",
+ "print (\"(i)Stoichiometric A/F ratio = %.3f\")% (AF)\n",
+ "\n",
+ "\n",
+ "\n",
+ "# C7H10O0.218N0.107 + (1.2)(9.39) O2 + (1.2)(9.39)*(79/21)N2 \u2192 7CO2 + 5H2O + (0.2)(9.39) O2 + (1.2)(35.4) N2\n",
+ "\n",
+ "n = 7+0.2*9.39+1.2*35.4;\n",
+ "\n",
+ "print (\"(ii)Percentage composition of dry flue gases by volume is as follows :\")\n",
+ "CO2 = 7/n*100.;\n",
+ "print (\"CO2 = %.3f\")% (CO2), (\"%\")\n",
+ "\n",
+ "O2 = 1.878/n*100;\n",
+ "print (\"O2 = %.3f\")% (O2), (\"%\")\n",
+ "\n",
+ "N2 = 42.48/n*100;\n",
+ "print (\"N2 = %.3f\")% (N2), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Stoichiometric A/F ratio = 12.896\n",
+ "(ii)Percentage composition of dry flue gases by volume is as follows :\n",
+ "CO2 = 13.630 %\n",
+ "O2 = 3.657 %\n",
+ "N2 = 82.714 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.27 Page no : 530"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# a C + b H + c O2 + (79/21)*c N2 = 8CO2 + 0.5CO + 6.3O2 + x H2O + 85.2N2\n",
+ "\n",
+ "# Variables\n",
+ "a = 8+0.5;\n",
+ "c = 85.2/(79./21);\n",
+ "x = 2*(c-8-0.5/2-6.3);\n",
+ "b = 2*x;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\n",
+ "AF = (c*32+(79./21)*c*28)/(a*12+b*1);\n",
+ "print (\"(i) Air-fuel ratio = %.3f\")% (AF), (\"kg of air/kg of fuel\")\n",
+ "\n",
+ "\n",
+ "mf_C = 12*a/(12.*a+b);\n",
+ "mf_H2 = b*1/(12.*a+b);\n",
+ "air = mf_C*8./3*100./23.3 + mf_H2*8*100/23.3; \t\t\t#air required for complete combustion\n",
+ "percent = AF/air*100.;\n",
+ "print (\"(ii)Per cent theoretical air required for combustion = %.3f\")% (percent), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Air-fuel ratio = 23.144 kg of air/kg of fuel\n",
+ "(ii)Per cent theoretical air required for combustion = 136.444 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.28 Page no : 531"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print (\"(i) By a carbon balance\")\n",
+ "\n",
+ "# Calculations and Results\n",
+ "# a C8H18 + 78.1N2 + 78.1*(21/79)O2 \u2192 8.9CO2 + 8.2CO + 4.3H2 + 0.5CH4 + 78.1N2 + x H2O\n",
+ "a = (8.9+8.2+0.5)/8;\n",
+ "AF1 = (78.1*28+78.1*21./79*32)/a/(8*12+1*18);\n",
+ "print (\"Air fuel ratio = %.3f\")% (AF1)\n",
+ "\n",
+ "print (\"(ii) By a hydrogen-oxygen balance \")\n",
+ "\n",
+ "# a C8H18 + b O2 + b*(79/21)N2 \u2192 8.9CO2 + 8.2CO + 4.3H2 + 0.5CH4 + b*(79/21)N2 + x*H2O\n",
+ "\n",
+ "a = (8.9+8.2+0.5)/8;\n",
+ "x = (18*a-4.3*2-4*0.5)/2;\n",
+ "b = (8.9*2+8.2+x)/2;\n",
+ "\n",
+ "AF2 = (b*32+b*(79./21.)*28.)/a/(8.*12+1*18);\n",
+ "print (\"Air fuel ratio = %.3f\")% (AF2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) By a carbon balance\n",
+ "Air fuel ratio = 11.368\n",
+ "(ii) By a hydrogen-oxygen balance \n",
+ "Air fuel ratio = 11.089\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.29 Page no : 532"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# X(0.88/12 C + 0.12/2 H2) + Y O2 + 79/21*Y N2 \u2192 0.12CO2 + a O2 + (0.88 \u2013 a) N2 + b H2O\n",
+ "\n",
+ "# Variables\n",
+ "X = 0.12/(0.88/12);\n",
+ "b = 0.06*X;\n",
+ "a = 0.0513;\n",
+ "Y = 0.2203;\n",
+ "\n",
+ "# Calculations\n",
+ "Air_supplied = 0.2203*32/0.233;\n",
+ "AF = Air_supplied/X;\n",
+ "\n",
+ "# Results\n",
+ "print (\"A/F ratio = %.3f\")% (AF)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A/F ratio = 18.490\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.30 Page no : 532"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# X*(x/12 C + y/2 H2) + Y O2 + 79/21*Y/N2 \u2192 0.15CO2 + 0.03CO + 0.03CH4 + 0.01H2 + 0.02O2 + a H2O + 0.76N2\n",
+ "\n",
+ "# Variables\n",
+ "Y = 0.76/(79./21);\n",
+ "a = 2*(Y-0.15-0.03/2-0.02);\n",
+ "Xx = 12*(0.15+0.03+0.03);\n",
+ "Xy = 2*(2*0.03+0.01+a);\n",
+ "\n",
+ "# Calculations\n",
+ "ratio = Xx/Xy;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Ratio of C to H2 in fuel = %.3f\")% (ratio)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of C to H2 in fuel = 12.109\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.31 Page no : 533"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h_fg0 = 2441.8; \t\t\t#kJ/kg\n",
+ "m = 3.*18;\n",
+ "dH0_liq = -3301000.; \t\t\t#kJ/mole\n",
+ "\n",
+ "# Calculations\n",
+ "dH0_vap = dH0_liq+m*h_fg0;\n",
+ "\n",
+ "# Results\n",
+ "print (\"dH0_vapour = %.3f\")% (dH0_vap), (\"kJ/mole\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dH0_vapour = -3169142.800 kJ/mole\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.32 Page no : 533"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "# C6H6 + 7.5O2 \u2192 6CO2 + 3H2O (vapour)\n",
+ "dH0 = -3169100.; \t\t\t#kJ\n",
+ "n_R = 1+7.5;\n",
+ "n_P = 6+3;\n",
+ "R0 = 8.314;\n",
+ "T0 = 298.; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "dU0 = (dH0-(n_P-n_R)*R0*T0)/(6*12+1*6);\n",
+ "\n",
+ "# Results\n",
+ "print (\"dU0 = %.3f\")% (dU0), (\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dU0 = -40645.369 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.33 Page no : 534"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# CO+1/2 O2 \u2192 CO2\n",
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "H_R0 = 1*9705+1/2*9696; \t\t\t#kJ\n",
+ "H_RT = 1*94080+1/2*99790; \t\t\t#kJ\n",
+ "H_P0 = 1*10760; \t\t\t#kJ\n",
+ "H_PT = 1*149100; \t\t\t#kJ\n",
+ "\n",
+ "# Calculations\n",
+ "dH_T = -(285200+(143975-14553)-(149100-10760));\n",
+ "\n",
+ "# Results\n",
+ "print (\"dH_T = \"), (dH_T), (\"kJ/mole\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dH_T = -276282 kJ/mole\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.34 Page no : 535"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print (\"(i) Higher heating value at consmath.tant pressure\")\n",
+ "\n",
+ "# Variables\n",
+ "m = 4.*18;\n",
+ "h_fg = 2443.; \t\t\t#kJ/kg\n",
+ "LHVp = 2044009.; \t\t\t#kJ/kg\n",
+ "R0 = 8.3143; \t\t\t#kJ/kg K\n",
+ "T = 298.; \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "HHVp = LHVp+m*h_fg;\n",
+ "print (\"HHVp = \"), (HHVp), (\"kJ/kg\")\n",
+ "\n",
+ "print (\"(ii) Higher heating value at consmath.tant volume\")\n",
+ "dn = 3-(1+5.);\n",
+ "\n",
+ "HHVv = HHVp+dn*R0*T;\n",
+ "print (\"HHVv = \"), (HHVv), (\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Higher heating value at consmath.tant pressure\n",
+ "HHVp = 2219905.0 kJ/kg\n",
+ "(ii) Higher heating value at consmath.tant volume\n",
+ "HHVv = 2212472.0158 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.35 Page no : 535"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "HHV = 5494977.; \t\t\t#kJ/kg\n",
+ "m = 9.*18;\n",
+ "u_fg = 2305.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "LHVv = HHV-m*u_fg;\n",
+ "\n",
+ "# Results\n",
+ "print (\"LHVv = \"), (LHVv), (\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "LHVv = 5121567.0 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.36 Page no : 535"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print (\"(i) Air and benzene vapour \")\n",
+ "\n",
+ "# C6H6(g) + 7.5O2(g) + 7.5*(79/21)N2(g) = 6CO2(g) + 3H2O(g) + 7.5*(79/21)*N2(g)\n",
+ "\n",
+ "# Variables\n",
+ "LHVp = 3169500.; \t\t\t#kJ/mole\n",
+ "m = 54.; \t\t\t#kg/kg mole of fuel\n",
+ "h_fg = 2442.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "LHVv = round(LHVp/((12*6+6*1)+(7.5*32)+7.5*(79./21)*28))\n",
+ "\n",
+ "print (\"LHVv per kg of mixture = %d\")% (LHVv), (\"kJ/kg\")\n",
+ "\n",
+ "HHVp = (LHVp+m*h_fg)/(78+240+790);\n",
+ "\n",
+ "print (\"HHVp per kg of mixture = %.0f\")% (HHVp), (\"kJ/kg\")\n",
+ "\n",
+ "print (\"(ii) Air and octane vapour \")\n",
+ "LHVp = 5116200.; \t\t\t#kJ/mole of C8H18\n",
+ "\n",
+ "# C8H18(g) + 12.5O2(g) \uf8e7\u2192 8CO2(g) + 9H2O(g) + 12.5*(79/21)N2(g)\n",
+ "\n",
+ "LHVp1 = LHVp/((12*8+18*1)+12.5*32+12.5*79./21*28);\n",
+ "print (\"LHVp per kg of mixture = %d\")% (LHVp1), (\"kJ/kg\")\n",
+ "\n",
+ "m = 9*18.;\n",
+ "HHVp = LHVp+m*h_fg;\n",
+ "HHVp1 = HHVp/(114.+400+1317);\n",
+ "print (\"HHVp per kg of mixture = %d\")% (HHVp1), (\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Air and benzene vapour \n",
+ "LHVv per kg of mixture = 2861 kJ/kg\n",
+ "HHVp per kg of mixture = 2980 kJ/kg\n",
+ "(ii) Air and octane vapour \n",
+ "LHVp per kg of mixture = 2794 kJ/kg\n",
+ "HHVp per kg of mixture = 3010 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.37 Page no : 537"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m_CO2 = 44./12*0.88; \t\t\t#kg\n",
+ "m_H2O = 18/2*0.12; \t\t\t#kg\n",
+ "u_fg = 2304.; \t\t\t#kJ/kg\n",
+ "h_fg = 2442.; \t\t\t#kJ/kg\n",
+ "HHVv = 45670.; \t\t\t#kJ/kg\n",
+ "R0 = 8.3143; \t\t\t#kJ/kg K\n",
+ "T = 298.; \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\n",
+ "LHVv = HHVv-m_H2O*u_fg;\n",
+ "print (\"(i) (LHV)v = \"), (LHVv), (\"kJ/kg\")\n",
+ "\n",
+ "print (\"(ii) (HHV)p, (LHV)p\")\n",
+ "\n",
+ "#1 mole fuel+x/32 O2-->3.23/44 CO2 + 1.08/18 H2O\n",
+ "\n",
+ "x = 32*(m_CO2/44+m_H2O/18./2.);\n",
+ "\n",
+ "# 1 kg fuel + 3.31 kg O2 = 3.23CO2 + 1.08H2O\n",
+ "dn = (m_CO2/44-x/32);\n",
+ "HHVp = HHVv-dn*R0*T;\n",
+ "\n",
+ "print (\"HHVp = %.3f\")% (HHVp), (\"kJ/kg\")\n",
+ "\n",
+ "LHVp = HHVp-m_H2O*h_fg;\n",
+ "print (\"LHVp = %.3f\")% (LHVp), (\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) (LHV)v = 43181.68 kJ/kg\n",
+ "(ii) (HHV)p, (LHV)p\n",
+ "HHVp = 45744.330 kJ/kg\n",
+ "LHVp = 43106.970 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch12.ipynb b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch12.ipynb
new file mode 100755
index 00000000..842a5adc
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch12.ipynb
@@ -0,0 +1,1743 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12 : Vapour Power Cycles"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.1 Page no : 548"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "p1 = 60.; \t\t\t#bar; Inlet to turbine\n",
+ "p2 = 0.1; \t\t\t#bar; Exit from turbine\n",
+ "p3 = 0.09; \t\t\t#bar; Exit from condenser \n",
+ "p4 = 70.; \t\t\t#bar ; Exit from pump\n",
+ "p5 = 65.; \t\t\t#bar; Exit from boiler\n",
+ "\n",
+ "t1 = 380.; \t\t\t#0C\n",
+ "t5 = 400.; \t\t\t#0C\n",
+ "x2 = 0.9; \t\t\t#Quality at exit from turbine\n",
+ "C = 200.; \t\t\t#m/s; Velocity at the exit from turbine \n",
+ "\n",
+ "# Calculations and Results\n",
+ "\n",
+ "#At 60 bar 380 0C, From steam tables\n",
+ "h1 = 3123.5; \t\t\t#kJ/kg; By interpolation\n",
+ "h_f2 = 191.8; \t\t\t#kJ/kg\n",
+ "h_fg2 = 2392.8; \t\t\t#kJ/kg\n",
+ "x2 = 0.9; \n",
+ "\n",
+ "h2 = h_f2+x2*h_fg2;\n",
+ "m_s = 10000./3600; \t\t\t#Rate of stem flow in kg/s\n",
+ "\n",
+ "P = m_s*(h1-h2);\n",
+ "print (\"(i)Power output of the turbine = %.0f\")% (P), (\"kW\")\n",
+ "\n",
+ "\n",
+ "h_f4 = 1267.4; \t\t\t#kJ/kg\n",
+ "h_a = 3167.6; \t\t\t#kJ/kg\n",
+ "Q1 = 10000*(h_a - h_f4); \n",
+ "print (\"(ii)Heat transfer per hour in the boiler = %.2e\")% (Q1), (\"kJ/h\")\n",
+ "\n",
+ "h_f3 = 183.3; \t\t\t#kJ/kg\n",
+ "Q2 = float(\"%.2e\"%(10000*(h2-h_f3)));\n",
+ "print (\"Heat transfer per hour in the condenser = %.2e\")% (Q2), (\"kJ/h\")\n",
+ "\n",
+ "print (\"(iii) Mass of cooling water circulated per hour in the condenser\")\n",
+ "c_pw = 4.18;\n",
+ "t2 = 30.;\n",
+ "t1 = 20.;\n",
+ "\n",
+ "m_w = Q2/(c_pw*(t2-t1));\n",
+ "print (\"m_w = %.3e\")% (m_w), (\"kg/h\")\n",
+ "print (\"This is the exact answer.\")\n",
+ "\n",
+ "print (\"(iv) Diameter of the pipe connecting turbine with condenser\")\n",
+ "\n",
+ "v_g2 = 14.67; \t\t\t#m**3/kg\n",
+ "\n",
+ "d = math.sqrt(m_s*x2*v_g2*4/math.pi/C)*1000;\n",
+ "print (\"Diameter = %d\")% (d), (\"mm\")\n",
+ "\n",
+ "# Note : Answer for part 3 in book is incorrect."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Power output of the turbine = 2162 kW\n",
+ "(ii)Heat transfer per hour in the boiler = 1.90e+07 kJ/h\n",
+ "Heat transfer per hour in the condenser = 2.16e+07 kJ/h\n",
+ "(iii) Mass of cooling water circulated per hour in the condenser\n",
+ "m_w = 5.167e+05 kg/h\n",
+ "This is the exact answer.\n",
+ "(iv) Diameter of the pipe connecting turbine with condenser\n",
+ "Diameter = 483 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.2 Page no : 550"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 15.; \t\t\t#bar\n",
+ "x1 = 1.;\n",
+ "p2 = 0.4; \t\t\t#bar\n",
+ "\n",
+ "#At 15 bar\n",
+ "t_s1 = 198.3; \t\t\t#0C\n",
+ "h_g1 = 2789.9; \t\t\t#kJ/kg\n",
+ "s_g1 = 6.4406; \t\t\t#kJ/kg K\n",
+ "\n",
+ "#At 0..4 bar\n",
+ "t_s2 = 198.3; \t\t\t#0C\n",
+ "h_f2 = 317.7; \t\t\t#kJ/kg\n",
+ "h_fg2 = 2319.2; \t\t\t#kJ/kg\n",
+ "s_f2 = 1.0261; \t\t\t#kJ/kg K\n",
+ "s_fg2 = 6.6448; \t\t\t#kJ/kg K\n",
+ "T1 = 471.3; \t\t\t#K\n",
+ "T2 = 348.9; \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "n_carnot = (T1-T2)/T1;\n",
+ "print (\"Carnot efficiency = %.3f\")%(n_carnot)\n",
+ "\n",
+ "x2 = (s_g1 - s_f2)/s_fg2;\n",
+ "h2 = h_f2+x2*h_fg2;\n",
+ "\n",
+ "n_rankine = (h_g1-h2)/(h_g1-h_f2);\n",
+ "print (\"Rankine efficiency = %.3f\")%(n_rankine)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Carnot efficiency = 0.260\n",
+ "Rankine efficiency = 0.236\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.3 Page no : 551"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 20.; \t\t\t#bar\n",
+ "p2 = 0.08; \t\t\t#bar\n",
+ "\n",
+ "#At 20 bar, 360 0C\n",
+ "h1 = 3159.3; \t\t\t#kJ/kg\n",
+ "s1 = 6.9917; \t\t\t#kJ/kg K\n",
+ "\n",
+ "#At 0.08 bar\n",
+ "h_f2 = 173.88; \t\t\t#kJ/kg\n",
+ "s_f2 = 0.5926; \t\t\t#kJ/kg K\n",
+ "\n",
+ "h_fg2 = 2403.1; \t\t#kJ/kg\n",
+ "s_g = 8.2287; \t\t\t#kJ/kg K\n",
+ "v_f = 0.001008; \t\t#m**3/kg\n",
+ "s_fg = 7.6361; \t\t\t#kJ/kg K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "x2 = (s1-s_f2)/s_fg;\n",
+ "\n",
+ "h2 = h_f2+x2*h_fg2;\n",
+ "\n",
+ "W_pump = v_f*(p1-p2)*100; \t\t\t#kJ/kg\n",
+ "W_turbine = h1-h2;\n",
+ "\n",
+ "W_net = h1-h2;\n",
+ "print (\"Net work done = %.3f\")% (W_net), (\"kJ/kg\")\n",
+ "\n",
+ "h_f4 = W_pump+h_f2;\n",
+ "Q1 = h1-h_f4;\n",
+ "\n",
+ "n_cycle = W_net/Q1;\n",
+ "print (\"Cycle efficiency = %.3f\")% (n_cycle)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net work done = 971.607 kJ/kg\n",
+ "Cycle efficiency = 0.326\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.4 Page no : 552"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "n_turbine = 0.9;\n",
+ "n_pump = 0.8;\n",
+ "p1 = 80.; \t\t\t#bar\n",
+ "p2 = 0.1; \t\t\t#bar\n",
+ "v_f = 0.0010103; \t\t\t#m**3\n",
+ "\n",
+ "#At 80 bar, 600 0C\n",
+ "h1 = 3642.; \t\t\t#kJ/kg\n",
+ "s1 = 7.0206; \t\t\t#kJ/kg K\n",
+ "s_f2 = 0.6488; \t\t\t#kJ/kg K\n",
+ "s_fg2 = 7.5006; \t\t\t#kJ/kg K\n",
+ "h_f2 = 191.9; \t\t\t#kJ/kg\n",
+ "h_fg2 = 2392.3; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "x2 = (s1-s_f2)/s_fg2;\n",
+ "h2 = h_f2+x2*h_fg2;\n",
+ "\n",
+ "W_turbine = n_turbine*(h1-h2);\n",
+ "W_pump = v_f*(p1-p2)*10**2;\n",
+ "\n",
+ "W_actual = W_pump/n_pump; \t\t\t#Actual pump work\n",
+ "\n",
+ "W_net = W_turbine - W_actual;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Specific work = %.3f\")% (W_net), (\"kJ/kg\")\n",
+ "\n",
+ "h_f4 = h_f2+W_actual;\n",
+ "Q1 = h1-h_f4;\n",
+ "\n",
+ "n_thermal = W_net/Q1; \t\t\t#Thermal efficiency\n",
+ "print (\"Thermal efficiency = %.3f\")% (n_thermal)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific work = 1265.955 kJ/kg\n",
+ "Thermal efficiency = 0.368\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.5 Page no : 553"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 28.; \t\t\t#bar\n",
+ "p2 = 0.06; \t\t\t#bar\n",
+ "\n",
+ "#At 28 bar\n",
+ "h1 = 2802.; \t\t\t#kJ/kg\n",
+ "s1 = 6.2104; \t\t\t#kJ/kg K\n",
+ "\n",
+ "#At 0.06 bar\n",
+ "h_f2 = 151.5; \t\t\t#kJ/kg\n",
+ "h_f3 = h_f2;\n",
+ "h_fg2 = 2415.9; \t\t#kJ/kg\n",
+ "s_f2 = 0.521; \t\t\t#kJ/kg K\n",
+ "s_fg2 = 7.809; \t\t\t#kJ/kg K\n",
+ "v_f = 0.001; \t\t\t#m**3/kg\n",
+ "\n",
+ "# Calculations\n",
+ "x2 = (s1-s_f2)/s_fg2;\n",
+ "h2 = h_f2 + x2*h_fg2;\n",
+ "W_turbine = h1-h2;\n",
+ "W_pump = v_f*(p1-p2)*100; \t\t\t#kJ/kg\n",
+ "h_f4 = h_f2+W_pump;\n",
+ "Q1 = h1-h_f4;\n",
+ "W_net = W_turbine - W_pump;\n",
+ "n_cycle = W_net/Q1;\n",
+ "\n",
+ "# Results\n",
+ "print (\"cyclic efficiency = %.3f\")% (n_cycle)\n",
+ "\n",
+ "ratio = W_net/W_turbine; \t\t\t#Work ratio\n",
+ "print (\"Work ratio = %.3f\")% (ratio)\n",
+ "\n",
+ "S = 3600/W_net; \t\t\t#Specific steam combustion\n",
+ "print (\"Specific steam combustion = %.3f\")% (S), (\"kg/kWh\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "cyclic efficiency = 0.335\n",
+ "Work ratio = 0.997\n",
+ "Specific steam combustion = 4.056 kg/kWh\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.6 Page no : 554"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 35.; \t\t\t#bar\n",
+ "x = 1.;\n",
+ "p2 = 0.2; \t\t\t#bar\n",
+ "m = 9.5; \t\t\t#kg/s\n",
+ "\n",
+ "#At 35 bar\n",
+ "h1 = 2802.; \t\t\t#kJ/kg\n",
+ "h_g1 = h1;\n",
+ "s_g1 = 6.1228; \t\t\t#kJ/kg K\n",
+ "\n",
+ "#At0.26 bar\n",
+ "h_f = 251.5; \t\t\t#kJ/kg\n",
+ "h_fg = 2358.4; \t\t\t#kJ/kg\n",
+ "v_f = 0.001017; \t\t#m**3/kg\n",
+ "s_f = 0.8321; \t\t\t#kJ/kg\n",
+ "s_fg = 7.0773; \t\t\t#kJ/kg K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) The pump work\")\n",
+ "W_pump = v_f*(p1-p2)*100; \t\t\t#kJ/kg\n",
+ "P = m*W_pump; \t\t\t#power required\n",
+ "print (\"Power required to drive the pump %.3f\")% (P), (\"kW\")\n",
+ "\n",
+ "print (\"(ii) The turbine work\")\n",
+ "x2 = (s_g1-s_f)/s_fg;\n",
+ "h2 = h_f+x2*h_fg;\n",
+ "W_turbine = m*(h1-h2);\n",
+ "print (\"Turbine work = %.3f\")% (W_turbine), (\"kW\")\n",
+ "\n",
+ "print (\"(iii) The Rankine efficiency\")\n",
+ "n_rankine = (h1-h2)/(h1-h_f);\n",
+ "print (\"rankine efficiency = %.3f\")% (n_rankine)\n",
+ "\n",
+ "print (\"(iv) The condenser heat flow :\")\n",
+ "Q = m*(h2-h_f);\n",
+ "print (\"The condenser heat flow = %.3f\")% (Q), (\"kW\")\n",
+ "\n",
+ "print (\"(v) The dryness at the end of expansion = %.3f\")% (x2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The pump work\n",
+ "Power required to drive the pump 33.622 kW\n",
+ "(ii) The turbine work\n",
+ "Turbine work = 7480.838 kW\n",
+ "(iii) The Rankine efficiency\n",
+ "rankine efficiency = 0.309\n",
+ "(iv) The condenser heat flow :\n",
+ "The condenser heat flow = 16748.912 kW\n",
+ "(v) The dryness at the end of expansion = 0.748\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.7 Page no : 555"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "dh = 840.; \t\t\t#kJ/kg; Adiabatic enthalpy drop\n",
+ "h1 = 2940.; \t\t\t#/kJ/kg;\n",
+ "p2 = 0.1; \t \t\t#bar\n",
+ "h_f2 = 191.8; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "n_rankine = (dh)/(h1-h_f2)*100;\n",
+ "print (\"rankine efficiency = %.3f\")% (n_rankine)\n",
+ "\n",
+ "S = 3600/dh; \t\t\t#Specific steam combustion\n",
+ "print (\"Specific steam combustion = %.3f\")% (S), (\"kg/kWh\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rankine efficiency = 30.565\n",
+ "Specific steam combustion = 4.286 kg/kWh\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.8 Page no : 555"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "IP = 35.; \t\t\t# Power developed by the engine in kW\n",
+ "S = 284.; \t\t\t#Steam combustion in kg/h\n",
+ "p2 = 0.14; \t\t\t#Condenser pressure in bar\n",
+ "p1 = 15.; \t\t\t#bar\n",
+ "\n",
+ "h1 = 2923.3; \t\t\t#kJ/kg\n",
+ "s1 = 6.709; \t\t\t#kJ/kg K\n",
+ "\n",
+ "h_f = 220.; \t\t\t#kJ/kg\n",
+ "h_fg = 2376.6; \t\t\t#kJ/kg\n",
+ "s_f = 0.737; \t\t\t#kJ/kg K\n",
+ "s_fg = 7.296; \t\t\t#kJ/kg K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "x2 = (s1-s_f)/s_fg;\n",
+ "print (\"(i) Final condition of steam = %.3f\")% (x2)\n",
+ "\n",
+ "h2 = h_f+x2*h_fg;\n",
+ "n_rankine = (h1-h2)/(h1-h_f);\n",
+ "print (\"(ii) Rankine efficiency = %.3f\")% (n_rankine)\n",
+ "\n",
+ "\n",
+ "n_thermal = IP/(S/3600)/(h1-h_f);\n",
+ "\n",
+ "n_relative = n_thermal/n_rankine;\n",
+ "print (\"(iii)relative efficiency = %.3f\")% (n_relative)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Final condition of steam = 0.819\n",
+ "(ii) Rankine efficiency = 0.280\n",
+ "(iii)relative efficiency = 0.585\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.9 Page no : 556"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "P = 5000.; \t\t\t#kW\n",
+ "C = 40000.; \t\t\t#kJ/kg\n",
+ "n_rankine = 0.5;\n",
+ "n_turbine = 0.9;\n",
+ "n_heat_transfer = 0.85;\n",
+ "n_combustion = 0.98;\n",
+ "\n",
+ "# Calculations\n",
+ "m_f = P/n_turbine/(C*n_heat_transfer*n_combustion*n_rankine);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Fuel oil combustion = %.3f\")% (m_f), (\"kg/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fuel oil combustion = 0.333 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.10 Page no : 558"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p2 = 2.; \t\t\t#bar\n",
+ "p3 = 1.1; \t\t\t#bar\n",
+ "IP = 1.;\n",
+ "m = 12.8/3600; \t\t\t#kg/kWs\n",
+ "n_mech = 0.8; \t\t\t#Mechanical efficiency\n",
+ "h1 = 3037.6; \t\t\t#kJ/kg\n",
+ "v1 = 0.169; \t\t\t#m**3/kg\n",
+ "s1 = 6.918; \t\t\t#kJ/kg K\n",
+ "t_s2 = 120.2; \t\t\t#0C\n",
+ "h_f2 = 504.7; \t\t\t#kJ/kg\n",
+ "h_fg2 = 2201.6; \t\t#kJ/kg\n",
+ "s_f2 = 1.5301; \t\t\t#kJ/kg K\n",
+ "s_fg2 = 5.5967; \t\t#kJ/kg K\n",
+ "v_f2 = 0.00106; \t\t#m**3/kg\n",
+ "v_g2 = 0.885; \t\t\t#m**3/kg\n",
+ "t_s3 = 102.3; \t\t\t#0C\n",
+ "h_f3 = 428.8; \t\t\t#kJ/kg\n",
+ "h_fg3 = 2250.8; \t\t#kJ/kg\n",
+ "s_f3 = 1.333; \t\t\t#kJ/kg K\n",
+ "s_fg3 = 5.9947; \t\t#kJ/kg K\n",
+ "v_f3 = 0.001; \t\t\t#m**3/kg\n",
+ "v_g3 = 1.549; \t\t\t#m**3/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "x2 = (s1-s_f2)/s_fg2;\n",
+ "h2 = h_f2+x2*h_fg2;\n",
+ "v2 = x2*v_g2+(1-x2)*v_f2;\n",
+ "\n",
+ "W = (h1-h2) + (p2-p3)*v2*100; \t\t\t#kJ/kg\n",
+ "print (\"(i)Ideal work = %.3f\")% (W), (\"kJ/kg\")\n",
+ "\n",
+ "\n",
+ "n_rankine = W/(h1-h_f3);\n",
+ "print (\"(ii) Rankine engine efficiency = %.3f\")% (n_rankine)\n",
+ "\n",
+ "\n",
+ "print (\"(iii) Indicated and brake work per kg\")\n",
+ "W_indicated = IP/m;\n",
+ "print (\"Indicated worK = %.3f\")% (W_indicated), (\"kJ/kg\")\n",
+ "\n",
+ "W_brake = n_mech*IP/m;\n",
+ "print (\"Brake work = %.3f\")% (W_brake), (\"kJ/kg\")\n",
+ "\n",
+ "n_brake = W_brake/(h1-h_f3);\n",
+ "print (\"(iv) Brake thermal efficiency = %.3f\")% (n_brake)\n",
+ "\n",
+ "\n",
+ "print (\"(v) Relative efficiency :\")\n",
+ "\n",
+ "n1 = W_indicated/W; \t\t\t#on the basis of indicated work\n",
+ "print (\"Relative efficiency on the basis of indicated work = %.3f\")%(n1)\n",
+ "\n",
+ "n2 = W_brake/W; \t\t\t#on the basis of brake work\n",
+ "print (\"Relative efficiency on the basis of brake work = %.3f\")%(n2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Ideal work = 490.119 kJ/kg\n",
+ "(ii) Rankine engine efficiency = 0.188\n",
+ "(iii) Indicated and brake work per kg\n",
+ "Indicated worK = 281.250 kJ/kg\n",
+ "Brake work = 225.000 kJ/kg\n",
+ "(iv) Brake thermal efficiency = 0.086\n",
+ "(v) Relative efficiency :\n",
+ "Relative efficiency on the basis of indicated work = 0.574\n",
+ "Relative efficiency on the basis of brake work = 0.459\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.11 Page no : 560"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p2 = 0.75; \t\t\t#bar\n",
+ "p3 = 0.3; \t\t\t#bar\n",
+ "h1 = 3263.9; \t\t\t#kJ/kg\n",
+ "v1 = 0.307; \t\t\t#m**3/kg\n",
+ "s1 = 7.465; \t\t\t#kJ/kg K\n",
+ "T_s2 = 369.7; \t\t\t#K\n",
+ "h_g2 = 2670.9; \t\t\t#kJ/kg\n",
+ "s_g2 = 7.3954; \t\t\t#kJ/kg K\n",
+ "v_g2 = 1.869; \t\t\t#m**3/kg\n",
+ "h_f3 = 289.3; \t\t\t#kJ/kg\n",
+ "v_g3 = 5.229; \t\t\t#m**3/kg\n",
+ "cp = 2.1;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Quality of steam at the end of expansion\")\n",
+ "T_sup2 = T_s2*(math.e**((s1-s_g2)/cp));\n",
+ "t_sup2 = T_sup2-273;\n",
+ "print (\"t_sup2 = %.3f\")% (t_sup2), (\"\u00b0C\")\n",
+ "\n",
+ "h2 = h_g2+cp*(T_sup2-366.5);\n",
+ "\n",
+ "print (\"(ii) Quality of steam at the end of consmath.tant volume operation, x3 :\")\n",
+ "v2 = v_g2/T_s2*T_sup2;\n",
+ "v3 = v2;\n",
+ "x3 = v3/v_g3;\n",
+ "print (\"x3 = %.3f\")% (x3)\n",
+ "\n",
+ "\n",
+ "print (\"(iii) Power developed\")\n",
+ "P = (h1-h2) + (p2-p3)*v2*100;\n",
+ "print (\"P = %.3f\")%(P), (\"kW\")\n",
+ "\n",
+ "\n",
+ "ssc = 3600./P;\n",
+ "print (\"(iv) Specific steam consumption = %.3f\")% (ssc), (\"kg/kWh\")\n",
+ "\n",
+ "\n",
+ "n_mR = ((h1-h2)+(p2-p3)*v2*100)/(h1-h_f3);\n",
+ "print (\"(v) Modified Rankine cycle efficiency = %.3f\")% (n_mR)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Quality of steam at the end of expansion\n",
+ "t_sup2 = 109.158 \u00b0C\n",
+ "(ii) Quality of steam at the end of consmath.tant volume operation, x3 :\n",
+ "x3 = 0.369\n",
+ "(iii) Power developed\n",
+ "P = 647.057 kW\n",
+ "(iv) Specific steam consumption = 5.564 kg/kWh\n",
+ "(v) Modified Rankine cycle efficiency = 0.218\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.12 Page no : 564"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h1 = 3100.; \t\t\t#kJ/kg\n",
+ "h2 = 2100.; \t\t\t#kJ/kg\n",
+ "h3 = 2500.; \t\t\t#kJ/kg\n",
+ "h_f2 = 570.9; \t\t\t#kJ/kg\n",
+ "h_f5 = 125.; \t\t\t#kJ/kg\n",
+ "h_f2 = 570.9; \t\t\t#kJ/kg\n",
+ "a = 11200.; \t\t\t#Quantity of bled steam in kg/h\n",
+ "\n",
+ "# Calculations\n",
+ "m = (h_f2-h_f5)/(h2-h_f5);\n",
+ "S = a/m; \t\t\t#Steam supplied to the turbine per hour\n",
+ "W_net = (h1-h3) + (1-m)*(h3-h2);\n",
+ "P = W_net*S/3600.; \t\t\t#Power developed by the turbine\n",
+ "\n",
+ "# Results\n",
+ "print (\"Power developed by the turbine = %.3f\")% (P), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power developed by the turbine = 12535.426 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.13 Page no : 565"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "#At 30bar, 400 0C\n",
+ "h1 = 3230.9; \t\t\t#kJ/kg\n",
+ "s1 = 6.921; \t\t\t#kJ/kg\n",
+ "s2 = s1;\n",
+ "s3 = s1;\n",
+ "#At 5 bar\n",
+ "s_f1 = 1.8604;\n",
+ "s_g1 = 6.8192; \t\t\t#kJ/kg K\n",
+ "h_f1 = 640.1; \t\t\t#kJ/kg\n",
+ "t2 = 172. \t\t\t #0C\n",
+ "h2 = 2796.; \t\t\t#kJ/kg\n",
+ "\n",
+ "#At 0.1 bar\n",
+ "s_f3 = 0.649; \t\t\t#kJ/kg K\n",
+ "s_fg3 = 7.501; \t\t\t#kJ/kg K\n",
+ "h_f3 = 191.8; \t\t\t#kJ/kg\n",
+ "h_fg3 = 2392.8; \t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "x3 = (s2-s_f3)/s_fg3;\n",
+ "h3 = h_f3+x3*h_fg3;\n",
+ "\n",
+ "h_f4 = 191.8; \t\t\t#kJ/kg\n",
+ "h_f5 = h_f4;\n",
+ "\n",
+ "h_f6 = 640.1; \t\t\t#kJ/kg\n",
+ "h_f7 = h_f6;\n",
+ "s7 = 1.8604; \t\t\t#kJ/kg K\n",
+ "s4 = 0.649; \t\t\t#kJ/kg K\n",
+ "m = (h_f6-h_f5)/(h2-h_f5);\n",
+ "W_T = (h1-h2) + (1-m)*(h2-h3);\n",
+ "Q1 = h1-h_f6;\n",
+ "\n",
+ "n_cycle = W_T/Q1;\n",
+ "print (\"(i) Efficiency of cycle = %.3f\")% (n_cycle)\n",
+ "\n",
+ "SR = 3600/W_T; \t\t\t#Steam rate\n",
+ "print (\"Steam rate = %.3f\")% (SR), (\"kg/kWh\")\n",
+ "\n",
+ "\n",
+ "T_m1 = (h1-h_f7)/(s1-s7);\n",
+ "\n",
+ "T_m1r = (h1-h_f4)/(s1-s4); \t\t\t#Without regeneration\n",
+ "\n",
+ "dT_m1 = T_m1-T_m1r;\n",
+ "print (\"Increase in T_m1 due to regeneration = %.3f\")% (dT_m1), (\"0C\")\n",
+ "\n",
+ "W_Tr = h1-h3; \t\t\t#Without regeneration\n",
+ "SR1 = 3600/W_Tr; \t\t\t#Steam rate without regeneration\n",
+ "dSR = SR-SR1; \n",
+ "print (\"Increase in steam rate due to regeneration = %.3f\")% (dSR), (\"kg/kWh\")\n",
+ "\n",
+ "n_cycle1 = (h1-h3)/(h1-h_f4); \t\t\t#without regeneration\n",
+ "dn_cycle = n_cycle-n_cycle1;\n",
+ "print (\"Increase in cycle efficiency due to regeneration %.3f\")% (dn_cycle*100), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Efficiency of cycle = 0.361\n",
+ "Steam rate = 3.852 kg/kWh\n",
+ "Increase in T_m1 due to regeneration = 27.405 0C\n",
+ "Increase in steam rate due to regeneration = 0.385 kg/kWh\n",
+ "Increase in cycle efficiency due to regeneration 1.902 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.14 Page no : 567"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "#At 3 bar\n",
+ "t_s1 = 133.5; \t\t\t#0C\n",
+ "h_f1 = 561.4; \t\t\t#kJ/kg\n",
+ "\n",
+ "#At 0.04 bar\n",
+ "t_s2 = 29.; \t\t\t#0C\n",
+ "h_f2 = 121.5; \t\t\t#0C\n",
+ "\n",
+ "h0 = 3231.; \t\t\t#kJ/kg\n",
+ "h1 = 2700.; \t\t\t#kJ/kg\n",
+ "h2 = 2085.; \t\t\t#kJ/kg\n",
+ "\n",
+ "t1 = 130.; \t\t\t#0C\n",
+ "t2 = 27.; \t\t\t#0C\n",
+ "c = 4.186;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Mass of steam used\")\n",
+ "m1 = c*(t1-t2)/(h1-h_f2);\n",
+ "print (\"m1 = %.3f\")% (m1), (\"kg\")\n",
+ "\n",
+ "print (\"(ii) Thermal efficiency of the cycle\")\n",
+ "W = (h0-h1)+(1-m1)*(h1-h2);\n",
+ "Q = h0-c*t1;\n",
+ "\n",
+ "n_thermal = W/Q;\n",
+ "print (\"n_thermal = %.3f\")% (n_thermal)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Mass of steam used\n",
+ "m1 = 0.167 kg\n",
+ "(ii) Thermal efficiency of the cycle\n",
+ "n_thermal = 0.388\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.15 Page no : 569"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h0 = 3115.3; \t\t\t#kJ/kg\n",
+ "h1 = 2720.; \t\t\t#kJ/kg\n",
+ "h2 = 2450.; \t\t\t#kJ/kg\n",
+ "h3 = 2120.; \t\t\t#kJ/kg\n",
+ "\n",
+ "h_f1 = 640.1; \t\t\t#kJ/kg\n",
+ "h_f2 = 417.5; \t\t\t#kJ/kg\n",
+ "h_f3 = 173.9; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m1 = (h_f1-h_f2)/(h1-h_f1);\n",
+ "print (\"m1 = %.3f\")% (m1), (\"kJ/kg\")\n",
+ "\n",
+ "m2 = ((h_f2-h_f3)-m1*(h_f1-h_f3))/(h2-h_f3);\n",
+ "print (\"m2 = %.3f\")% (m2), (\"kJ/kg\")\n",
+ "\n",
+ "W = h0-h1 + (1-m1)*(h1-h2) + (1-m1-m2)*(h2-h3);\n",
+ "Q = h0-h_f1;\n",
+ "\n",
+ "n = W/Q;\n",
+ "print (\"Thermal Efficiency of the cycle = %.3f\")% (n)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "m1 = 0.107 kJ/kg\n",
+ "m2 = 0.085 kJ/kg\n",
+ "Thermal Efficiency of the cycle = 0.365\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.16 Page no : 570"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h0 = 2905.; \t\t\t#kJ/kg\n",
+ "h1 = 2600.; \t\t\t#kJ/kg\n",
+ "h2 = 2430.; \t\t\t#kJ/kg\n",
+ "h3 = 2210.; \t\t\t#kJ/kg\n",
+ "h4 = 2000.; \t\t\t#kJ/kg\n",
+ "\n",
+ "h_f1 = 640.1; \t\t\t#kJ/kg\n",
+ "h_f2 = 467.1; \t\t\t#kJ/kg\n",
+ "h_f3 = 289.3; \t\t\t#kJ/kg\n",
+ "h_f4 = 137.8; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Mass of bled steam\")\n",
+ "m1 = (h_f1-h_f2)/(h1-h_f1);\n",
+ "print (\"m1 = %3f\")% (m1), (\"kJ/kg\")\n",
+ "\n",
+ "m2 = ((h_f2-h_f3) - (m1*(h_f1-h_f2)))/(h2-h_f2);\n",
+ "print (\"m2 = %.3f\")% (m2), (\"kJ/kg\")\n",
+ "\n",
+ "m3 = ((h_f3-h_f4)-(m1+m2)*(h_f2-h_f4))/(h3-h_f4);\n",
+ "print (\"m3 = %.3f\")% (m3), (\"kJ/kg\")\n",
+ "\n",
+ "W = (h0-h1) + (1-m1)*(h1-h2)+(1-m1-m2)*(h2-h3) + (1-m1-m2-m3)*(h3-h4);\n",
+ "Q = h0-h_f1;\n",
+ "\n",
+ "n_thermal = W/Q;\n",
+ "print (\"(ii) Thermal efficiency of the cycle = %.3f\")%(n_thermal)\n",
+ "\n",
+ "n_rankine = (h0-h4)/(h0-h_f4);\n",
+ "print (\"(iii) Thermal efficiency of Rankine cycle = %.3f\")% (n_rankine)\n",
+ "\n",
+ "gain = (n_thermal-n_rankine)/(n_thermal);\n",
+ "print (\"(iv) Theoretical gain due to regenerative feed heating = %.3f\")%(gain)\n",
+ "\n",
+ "S1 = 3600./W;\n",
+ "print (\"(v) Steam consumption with regenerative feed heating = %.3f\")% (S1), (\"kg/kWh\")\n",
+ "\n",
+ "S2 = 3600./(h0-h4);\n",
+ "print (\"Steam consumption without regenerative feed heating = %.3f\")% (S2), (\"kg/kWh\")\n",
+ "\n",
+ "quantity1 = S1*(1-m1-m2-m3)*50000;\n",
+ "print (\"(vi) Quantity of steam passing through the last stage of a 50000 kW turbine with \\\n",
+ "regenerative feed-heating = %.3f\")%(quantity1), (\"kg/h\")\n",
+ "\n",
+ "quantity2 = S2*50000;\n",
+ "print (\"quantity of steam without regeneration = %.3f\")% (quantity2), (\"kg/h\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Mass of bled steam\n",
+ "m1 = 0.088270 kJ/kg\n",
+ "m2 = 0.083 kJ/kg\n",
+ "m3 = 0.046 kJ/kg\n",
+ "(ii) Thermal efficiency of the cycle = 0.356\n",
+ "(iii) Thermal efficiency of Rankine cycle = 0.327\n",
+ "(iv) Theoretical gain due to regenerative feed heating = 0.082\n",
+ "(v) Steam consumption with regenerative feed heating = 4.462 kg/kWh\n",
+ "Steam consumption without regenerative feed heating = 3.978 kg/kWh\n",
+ "(vi) Quantity of steam passing through the last stage of a 50000 kW turbine with regenerative feed-heating = 174693.345 kg/h\n",
+ "quantity of steam without regeneration = 198895.028 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.17 Page no : 573"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h1 = 3460.; \t\t\t#kJ/kg\n",
+ "h2 = 3460.; \t\t\t#kJ/kg\n",
+ "h3 = 3111.5; \t\t\t#kJ/kg\n",
+ "h4 = 3585.; \t\t\t#kJ/kg\n",
+ "h5 = 3207.; \t\t\t#kJ/kg\n",
+ "h6 = 2466.; \t\t\t#kJ/kg\n",
+ "h7 = 137.8; \t\t\t#kJ/kg\n",
+ "h8 = 962.; \t\t\t #kJ/kg\n",
+ "h9 = 670.4; \t\t\t#kJ/kg\n",
+ "h10 = 962.; \t\t\t#kJ/kg\n",
+ "\n",
+ "p1 = 100.; \t\t\t#bar\n",
+ "p2 = 95.; \t\t\t#bar\n",
+ "p3 = 25.; \t\t\t#bar\n",
+ "p4 = 22.; \t\t\t#bar\n",
+ "p5 = 6.; \t\t\t#bar\n",
+ "p6 = 0.05; \t\t\t#bar\n",
+ "n_mech = 0.9;\n",
+ "n_gen = 0.96;\n",
+ "n_boiler = 0.9;\n",
+ "\n",
+ "# Calculations\n",
+ "P = 120.*10**3; \t\t\t#kW\n",
+ "m1 = (h10-h9)/(h3-h8);\n",
+ "m2 = (h9-m1*h8-(1-m1)*h7)/(h5-h7);\n",
+ "W_IP = (1-m1-m2)*(p5-p6)*0.001*10**2;\n",
+ "W_HP = (p1-p5)*0.001*10**2;\n",
+ "W_total = (W_IP+W_HP)/n_mech;\n",
+ "W_indicated = (h2-h3) + (1-m1)*(h4-h5) + (1-m1-m2)*(h5-h6);\n",
+ "Output = (W_indicated - W_total)*n_mech*n_gen; \t\t\t#net electrical output\n",
+ "rate = P*3600/Output;\n",
+ "\n",
+ "amt1 = m1*rate; \t\t\t#Amounts of bled off, surface(high pressure) heater\n",
+ "\n",
+ "# Results\n",
+ "print (\"Amounts of bled off, surface(high pressure) heater = %.3f\")%(amt1),(\"kg/h\")\n",
+ "\n",
+ "amt2 = m2*rate; \t\t\t#Amounts of bled off, surface(low pressure) heater\n",
+ "print (\"Amounts of bled off, surface(low pressure) heater %.3f\")% (amt2), (\"kg/h\")\n",
+ "\n",
+ "\n",
+ "Q_boiler = (h1-h10)/n_boiler;\n",
+ "Q_reheater = (h4-h3)/n_boiler;\n",
+ "\n",
+ "n_overall = Output/(Q_boiler+Q_reheater)*100;\n",
+ "print (\"(iii)Overall thermal efficiency = %.3f\")% (n_overall), (\"%\")\n",
+ "\n",
+ "\n",
+ "ssc = rate/P; \t\t\t#Specific steam consumption\n",
+ "print (\"(iv) Specific steam consumption = %.3f\")% (ssc), (\"kg/kWh\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amounts of bled off, surface(high pressure) heater = 56375.368 kg/h\n",
+ "Amounts of bled off, surface(low pressure) heater 56974.301 kg/h\n",
+ "(iii)Overall thermal efficiency = 31.486 %\n",
+ "(iv) Specific steam consumption = 3.463 kg/kWh\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.18 Page no : 579"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 15.; \t\t\t#bar\n",
+ "p2 = 4.; \t\t\t#bar\n",
+ "p4 = 0.1; \t\t\t#bar\n",
+ "h1 = 2920.; \t\t\t#kJ/kg\n",
+ "h2 = 2660.; \t\t\t#kJ/kg\n",
+ "h3 = 2960.; \t\t\t#kJ/kg\n",
+ "h4 = 2335.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "W = h1-h2+h3-h4;\n",
+ "print (\"work done per kg of steam\"), (W), (\"kJ/kg\")\n",
+ "\n",
+ "h_reheat = h3-h2;\n",
+ "print (\"Amount of heat supplied during reheat = \"), (h_reheat), (\"kJ/kg\")\n",
+ "\n",
+ "h_4a = 2125.; \t\t\t#kJ/kg\n",
+ "\n",
+ "W1 = h1-h_4a;\n",
+ "print (\"Work output without reheat = \"), (W1), (\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "work done per kg of steam 885.0 kJ/kg\n",
+ "Amount of heat supplied during reheat = 300.0 kJ/kg\n",
+ "Work output without reheat = 795.0 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.19 Page no : 580"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h1 = 3450.; \t\t\t#kJ/kg\n",
+ "h2 = 3050.; \t\t\t#kJ/kg\n",
+ "h3 = 3560.; \t\t\t#kJ/kg\n",
+ "h4 = 2300.; \t\t\t#kJ/kg\n",
+ "\n",
+ "h_f4 = 191.8; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#From mollier diagram\n",
+ "x4 = 0.88;\n",
+ "print (\"(i)Quality of steam at turbine exhaust = \"), (x4)\n",
+ "\n",
+ "n_cycle = ((h1-h2) + (h3-h4))/((h1-h_f4) + (h3-h2));\n",
+ "print (\"(ii) Cycle efficiency = %.3f\")%(n_cycle)\n",
+ "\n",
+ "SR = 3600/((h1-h2) + (h3-h4));\n",
+ "print (\"(iii) Steam rate in kg/kWh = %.3f\")% (SR), (\"kg/kWh\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Quality of steam at turbine exhaust = 0.88\n",
+ "(ii) Cycle efficiency = 0.441\n",
+ "(iii) Steam rate in kg/kWh = 2.169 kg/kWh\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.20 Page no : 581"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h1 = 3250.; \t\t\t#kJ/kg\n",
+ "h2 = 2170.; \t\t\t#kJ/kg\n",
+ "h_f2 = 173.9; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "W = h1-h2;\n",
+ "Q = h1-h_f2;\n",
+ "\n",
+ "n_thermal = W/Q;\n",
+ "print (\"Thermal effifciency = %.3f\")% (n_thermal);\n",
+ "\n",
+ "x2 = 0.83; \t\t\t#From mollier chart\n",
+ "print (\"x2 = %.3f\")% (x2)\n",
+ "\n",
+ "\n",
+ "print (\"Second case\")\n",
+ "\n",
+ "h1 = 3250.; \t\t\t#kJ/kg\n",
+ "h2 = 2807.; \t\t\t#kJ/kg\n",
+ "h3 = 3263.; \t\t\t#kJ/kg\n",
+ "h4 = 2426.; \t\t\t#kJ/kg\n",
+ "h_f4 = 173.9; \t\t\t#kJ/kg\n",
+ "W = h1-h2+h3-h4;\n",
+ "Q = h1-h_f4+h3-h2;\n",
+ "\n",
+ "n_thermal = W/Q;\n",
+ "print (\"Thermal effifciency = %.3f\")% (n_thermal);\n",
+ "\n",
+ "x4 = 0.935; \t\t\t#From mollier chart\n",
+ "print (\"x4 = %.3f\")% (x4)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal effifciency = 0.351\n",
+ "x2 = 0.830\n",
+ "Second case\n",
+ "Thermal effifciency = 0.362\n",
+ "x4 = 0.935\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.21 Page no : 582"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print (\"Part (c)\")\n",
+ "\n",
+ "# Variables\n",
+ "h1 = 3580.; \t\t\t#kJ/kg\n",
+ "h2 = 3140.; \t\t\t#kJ/kg\n",
+ "h3 = 3675.; \t\t\t#kJ/kg\n",
+ "h4 = 2335.; \t\t\t#kJ/kg\n",
+ "h5 = 191.8; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "P = 15.*10**3; \t\t\t#kW\n",
+ "a = 0.104; \t\t\t#moisture content in exit from LP turbine\n",
+ "\n",
+ "p = 40.; \t\t\t#bar; From the mollier diagram\n",
+ "print (\"(i)Reheat pressure = \"), (p), (\"bar\")\n",
+ "\n",
+ "\n",
+ "W = h1-h2+h3-h4;\n",
+ "Q = h1-h5+h3-h2;\n",
+ "n_th = W/Q*100; \n",
+ "print (\"(ii) Thermal efficiency\"),(\"n_th = %.3f\")% (n_th), (\"%\")\n",
+ "\n",
+ "sc = P/W;\t\t\t#steam consumption\n",
+ "ssc = sc*3600./P; \t\t\t#specific steam consumption\n",
+ "print (\"(iii)Specific steam consumption = %.3f\")% (ssc), (\"kg/kWh\")\n",
+ "\n",
+ "rate = sc*0.15;\n",
+ "print (\"(iv) Rate of pump work = %.3f\")%(rate),(\"kW\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part (c)\n",
+ "(i)Reheat pressure = 40.0 bar\n",
+ "(ii) Thermal efficiency n_th = 45.371 %\n",
+ "(iii)Specific steam consumption = 2.022 kg/kWh\n",
+ "(iv) Rate of pump work = 1.264 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.22 Page no : 588"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h_l = 355.988; \t\t\t#kJ/kg\n",
+ "s_l = 0.5397; \t\t\t#kJ/kg K \n",
+ "s_f = 0.0808; \t\t\t#kJ/kg K\n",
+ "s_g = 0.6925; \t\t\t#kJ/kg K\n",
+ "h_f = 29.98; \t\t\t#kJ/kg\n",
+ "h_g = 329.85; \t\t\t#kJ/kg\n",
+ "p1 = 4.; \t\t\t #bar\n",
+ "p2 = 0.04; \t\t\t #bar\n",
+ "v_f2 = 76.5*10**(-6); \t#m**3/kg\n",
+ "h1 = 2789.9; \t\t\t#kJ/kg\n",
+ "s1 = 6.4406; \t\t\t#kJ/kg\n",
+ "h_f = 121.5; \t\t\t#kJ/kg\n",
+ "h_fg = 2432.9; \t\t\t#kJ/kg\n",
+ "s_f = 0.432; \t\t\t#kJ/kg K\n",
+ "s_fg2 = 8.052; \t\t\t#kJ/kg K\n",
+ "p4 = 15; \t\t\t #bar\n",
+ "p3 = 0.04; \t\t\t #bar\n",
+ "v_f = 0.0001; \t\t\t#kJ/kg K\n",
+ "h_f4 = 123; \t\t\t#kJ/kg\n",
+ "h_m = 254.88; \t\t\t#kJ/kg\n",
+ "h_fn = 29.98; \t\t\t#kJ/kg\n",
+ "h_fk = 29.988; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m = (h1-h_f4)/(h_m-h_fn); \t#The amount of mercury circulating for 1kg of steam in the bottom cycle\n",
+ "Q1 = m*(h_l-h_fk); \t\t\t#total\n",
+ "x2 = (s1-s_f)/(s_fg2);\n",
+ "h2 = h_f+x2*h_fg;\n",
+ "W_T = m*(h_l-h_m)+(h1-h2); \t\t#total\n",
+ "n_overall = W_T/Q1; \t\t\t#W_P may be neglected\n",
+ "print (\"(i) Overall thermal efficiency \"),(\" = %.3f\")% (n_overall)\n",
+ "\n",
+ "A = 48000.; \t\t\t#kg/h\n",
+ "m_Hg = m*A;\n",
+ "print (\"(ii) Flow through mercury turbine = %.3f\")% (m_Hg), (\"kg/h\")\n",
+ "\n",
+ "\n",
+ "W_total = A*W_T/3600; \n",
+ "print (\"(iii) Useful work in binary vapour cycle = %.3f\")% (W_total), (\"kW\")\n",
+ "\n",
+ "\n",
+ "\n",
+ "n_Hg = 0.84;\n",
+ "n_steam = 0.88;\n",
+ "\n",
+ "W_Hg = n_Hg*101.1;\n",
+ "h_m1 = h_l-W_Hg;\n",
+ "m1 = (h1-h_f4)/(h_m1-h_fn);\n",
+ "\n",
+ "h_g = 3037.6; \t\t\t#kJ/kg\n",
+ "s_g = 6.918; \t\t\t#kJ/kg\n",
+ "s_f2 = 0.423; \t\t\t#kJ/kg K\n",
+ "s_fg2 = 8.052; \t\t\t#kJ/kg K\n",
+ "\n",
+ "Q1 = m1*(h_l - h_fk) + (h_g-h1);\n",
+ "\n",
+ "x2 = (s_g-s_f2)/s_fg2;\n",
+ "h2 = h_f+x2*h_fg;\n",
+ "\n",
+ "W_steam = n_steam*(h_g-h2);\n",
+ "\n",
+ "W_total = m1*W_Hg + W_steam;\n",
+ "\n",
+ "n_overall = W_total/Q1;\n",
+ "print (\"(iv) Overall efficiency under new conditions \"),(\"= %.3f\")% (n_overall)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Overall thermal efficiency = 0.531\n",
+ "(ii) Flow through mercury turbine = 569191.641 kg/h\n",
+ "(iii) Useful work in binary vapour cycle = 27358.201 kW\n",
+ "(iv) Overall efficiency under new conditions = 0.462\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.23 Page no : 591"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 60.; \t\t\t#bar\n",
+ "t1 = 450.; \t\t\t#0C\n",
+ "p2 = 3.; \t\t\t#bar\n",
+ "p3 = 0.07; \t\t\t#bar; p3 = (760-707.5)/760*1.013\n",
+ "n_turbine = 0.87;\n",
+ "n_boiler = 0.86;\n",
+ "n_alt = 0.94;\n",
+ "n_mech = 0.97;\n",
+ "P = 22500.; \t\t\t#kW\n",
+ "h1 = 3300.; \t\t\t#kJ/kg\n",
+ "h2 = 2607.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "h2a = h1-n_turbine*(h1-h2);\n",
+ "h3 = 2165.; \t\t\t#kJ/kg\n",
+ "h3a = h2a-n_turbine*(h2a-h3);\n",
+ "h_f4 = 163.4; \t\t\t#kJ/kg\n",
+ "h_f5 = 561.4; \t\t\t#kJ/kg\n",
+ "\n",
+ "print (\"(i) The steam bled per kg of steam supplied to the turbine\")\n",
+ "m = (h_f5-h_f4)/(h2a-h_f4);\n",
+ "print (\"m = %.3f\")% (m), (\"kJ/kg\")\n",
+ "\n",
+ "print (\"(ii) Steam generated per hour\")\n",
+ "W = (h1-h2a) + (1-m)*(h2a-h3a); \t\t\t#Work developed per kg of steam in the turbine\n",
+ "W_act = P/n_alt/n_mech; \t\t\t#actual work \n",
+ "\n",
+ "steam = W_act/W*3600./1000; \t\t\t#tonnes/h\n",
+ "print (\"Steam generated = %.3f\")%(steam), (\"tonnes/h\")\n",
+ "\n",
+ "print (\"(iii) The overall efficiency of the plant\")\n",
+ "P_avail = P*(1-0.09); \t\t\t#Net power available deducting pump power\n",
+ "Q = steam*1000*(h1-h_f5)/n_boiler/3600.; \t\t\t#kW\n",
+ "\n",
+ "n_overall = P_avail/Q\n",
+ "print (\"n_overall = %.3f\")% (n_overall)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The steam bled per kg of steam supplied to the turbine\n",
+ "m = 0.157 kJ/kg\n",
+ "(ii) Steam generated per hour\n",
+ "Steam generated = 89.451 tonnes/h\n",
+ "(iii) The overall efficiency of the plant\n",
+ "n_overall = 0.259\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.24 Page no : 593"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "t1 = 350.; \t\t\t#0C\n",
+ "t_s = 350.; \t\t#0C\n",
+ "p2 = 7.; \t\t\t#bar\n",
+ "p3 = 7.; \t\t\t#bar\n",
+ "p4 = 0.4; \t\t\t#bar\n",
+ "t3 = 350.; \t\t\t#0C\n",
+ "h1 = 2985.; \t\t\t#kJ/kg\n",
+ "h2 = 2520.; \t\t\t#kJ/kg\n",
+ "h3 = 3170.; \t\t\t#kJ/kg\n",
+ "h4 = 2555.; \t\t\t#kJ/kg\n",
+ "h_f2 = 697.1; \t\t\t#kJ/kg\n",
+ "h_f4 = 317.7; \t\t\t#kJ/kg\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "P = 110.*10**3; \t\t\t#kW\n",
+ "print (\"(i) The ratio of steam bled to steam generated\")\n",
+ "m = (h_f2-h_f4)/(h2-h_f4);\n",
+ "ratio = 1/m;\n",
+ "print (\"ratio = %.3f\")% (ratio)\n",
+ "\n",
+ "m_s = P/(h1-h2+(1-m)*(h3-h4))*3600/1000.; \t\t\t#tonnes/hour\n",
+ "print (\"(ii) The boiler generating capacity = %.3f\")% (m_s), (\"tonnes/hour\")\n",
+ "\n",
+ "n_thermal = ((h1-h2) + (1-m)*(h3-h4))/((h1-h_f2)+(1-m)*(h3-h2));\n",
+ "print (\"(iii) Thermal efficiency of the cycle = %.3f\")%(n_thermal)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The ratio of steam bled to steam generated\n",
+ "ratio = 5.805\n",
+ "(ii) The boiler generating capacity = 406.549 tonnes/hour\n",
+ "(iii) Thermal efficiency of the cycle = 0.345\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.25 Page no : 595"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h1 = 3315.; \t\t\t#kJ/kg\n",
+ "h2 = 2716.; \t\t\t#kJ/kg\n",
+ "h3 = 3165.; \t\t\t#kJ/kg\n",
+ "h4 = 2236.; \t\t\t#kJ/kg\n",
+ "h_f2 = 697.1;\t\t\t#kJ/kg\n",
+ "h_f6 = h_f2;\n",
+ "h_f4 = 111.9; \t\t\t#kJ/kg\n",
+ "h_f5 = h_f4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m = (h_f2-h_f4)/(h2-h_f4);\n",
+ "print (\"(i) Amount of steam bled off for feed heating = %.3f\")% (m), (\"steam bled off is 22.5% of steam generated by the boiler.\")\n",
+ "\n",
+ "\n",
+ "amt = 100-m*100;\n",
+ "print (\"(ii) Amount of steam supplied to L.P. turbine = %.3f\")%(amt), (\"77.5% of the steam generated by the boiler.\")\n",
+ "\n",
+ "print (\"(iii) Heat supplied in the boiler and reheater\")\n",
+ "Q_boiler = h1-h_f6;\n",
+ "print (\"Q_boiler = %.3f\")% (Q_boiler), (\"kJ/kg\")\n",
+ "\n",
+ "Q_reheater = (1-m)*(h3-h2);\n",
+ "print (\"Q_reheater = %.3f\")% (Q_reheater), (\"kJ/kg\")\n",
+ "\n",
+ "Qs = Q_boiler+Q_reheater;\n",
+ "\n",
+ "print (\"(iv) Cycle efficiency\")\n",
+ "W = h1-h2 + (1-m)*(h3-h4);\n",
+ "\n",
+ "n_cycle = W/Qs;\n",
+ "print (\"n_cycle = %.3f\")% (n_cycle)\n",
+ "\n",
+ "print (\"(v) Power developed by the system\")\n",
+ "ms = 50.; \t\t\t#kg/s\n",
+ "Power = ms*W/1000; \t\t\t#MW\n",
+ "print (\"Power = %.3f\")% (Power), (\"MW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Amount of steam bled off for feed heating = 0.225 steam bled off is 22.5% of steam generated by the boiler.\n",
+ "(ii) Amount of steam supplied to L.P. turbine = 77.528 77.5% of the steam generated by the boiler.\n",
+ "(iii) Heat supplied in the boiler and reheater\n",
+ "Q_boiler = 2617.900 kJ/kg\n",
+ "Q_reheater = 348.100 kJ/kg\n",
+ "(iv) Cycle efficiency\n",
+ "n_cycle = 0.445\n",
+ "(v) Power developed by the system\n",
+ "Power = 65.962 MW\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.26 Page no : 597"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h1 = 3578.; \t\t\t#kJ/kg\n",
+ "h2 = 3140.; \t\t\t#kJ/kg\n",
+ "h3 = 3678.; \t\t\t#kJ/kg\n",
+ "h4 = 3000.; \t\t\t#kJ/kg\n",
+ "h5 = 2330.; \t\t\t#kJ/kg\n",
+ "h_f1 = 1611.; \t\t\t#kJ/kg\n",
+ "h_f2 = 1087.4; \t\t\t#kJ/kg\n",
+ "h_f4 = 640.1; \t\t\t#kJ/kg\n",
+ "h_f5 = 191.8; \t\t\t#kJ/kg\n",
+ "h_f6 = h_f5;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Fraction of steam extracted from the turbines at each bled heater = \")\n",
+ "\n",
+ "m1 = (h_f2-h_f4)/(h2-h_f4);\n",
+ "print (\"closed feed heater %.3f\")% (m1), (\"kg/kg of steam supplied by the boiler\")\n",
+ "\n",
+ "\n",
+ "m2 = (1-m1)*(h_f4-h_f5)/(h4-h_f6);\n",
+ "print (\"open feed heater %.3f\")% (m2), (\"kg/kg of steam supplied by the boiler\")\n",
+ "\n",
+ "print (\"(ii) Thermal efficiency of the system\")\n",
+ "\n",
+ "W_total = (h1-h2) + (1-m1)*(h3-h4) + (1-m1-m2)*(h4-h5);\n",
+ "p1 = 150.; \t\t\t#bar\n",
+ "p2 = 40.; \t\t\t#bar\n",
+ "p4 = 5.; \t\t\t#bar\n",
+ "p5 = 0.1; \t\t\t#bar\n",
+ "v_w1 = 1./1000; \t\t\t#m**3/kg\n",
+ "v_w2 = v_w1;\n",
+ "v_w3 = v_w1;\n",
+ "W_P1 = v_w1*(1-m1-m2)*(p4-p5)*100; \t\t#kJ/kg\n",
+ "W_P2 = v_w2*(1-m1)*(p1-p4)*100; \t\t#kJ/kg\n",
+ "W_P3 = v_w3*m1*(p1-p2)*100; \t\t\t#kJ/kg\n",
+ "W_P = W_P1+W_P2+W_P3; \t\t\t #Total pump work\n",
+ "W_net = W_total-W_P;\n",
+ "Q = (1-m1)*h_f1 +m1*(h_f1); \t\t\t#Heat of feed water extering the boiler\n",
+ "Qs1 = h1-Q;\n",
+ "Qs2 = (1-m1)*(h3-h2);\n",
+ "Qst = Qs1+Qs2;\n",
+ "\n",
+ "n_thermal = W_net/Qst*100;\n",
+ "print (\"n_thermal = %.3f\")% (n_thermal), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Fraction of steam extracted from the turbines at each bled heater = \n",
+ "closed feed heater 0.179 kg/kg of steam supplied by the boiler\n",
+ "open feed heater 0.131 kg/kg of steam supplied by the boiler\n",
+ "(ii) Thermal efficiency of the system\n",
+ "n_thermal = 59.898 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 12.27 Page no : 599"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "\n",
+ "p_min = 10.; \t\t\t#bar\n",
+ "print (\"(i) The minimum pressure at which bleeding is necessary = \"), (p_min), (\"bar\")\n",
+ "h1 = 3285.; \t\t\t#kJ/kg\n",
+ "h2 = 2980.; \t\t\t#kJ/kg\n",
+ "h3 = 3280.; \t\t\t#kJ/kg\n",
+ "h4a = 3072.5; \t\t\t#kJ/kg\n",
+ "h5 = 2210.; \t\t\t#kJ/kg\n",
+ "h5a = 2356.6; \t\t\t#kJ/kg\n",
+ "h_f6 = 163.4; \t\t\t#kJ/kg\n",
+ "h_f8 = 762.6; \t\t\t#kJ/kg\n",
+ "h2a = 3045.6; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m = (h_f8-h_f6)/(h4a-h_f6);\n",
+ "print (\"(ii) The quantity of steam bled per kg of flow at the turbine inlet = %.3f\")% (m), (\"kg of steam flow at turbine inlet.\")\n",
+ "\n",
+ "n_cycle = ((h1-h2a)+(h3-h4a)+(1-m)*(h4a-h5a))/((h1-h_f8) + (h3 - h2a))*100;\n",
+ "print (\"(iii) Cycle efficiency = %.3f\")% (n_cycle), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The minimum pressure at which bleeding is necessary = 10.0 bar\n",
+ "(ii) The quantity of steam bled per kg of flow at the turbine inlet = 0.206 kg of steam flow at turbine inlet.\n",
+ "(iii) Cycle efficiency = 36.830 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch13.ipynb b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch13.ipynb
new file mode 100755
index 00000000..74a2f204
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch13.ipynb
@@ -0,0 +1,2797 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 13 : Gas Power Cycles"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.1 Page no : 606"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 671.; \t\t\t#K\n",
+ "T2 = T1;\n",
+ "T3 = 313.; \t\t\t#K\n",
+ "T4 = T3;\n",
+ "W = 130.; \t\t\t#kJ\n",
+ "\n",
+ " \n",
+ " n_th = (T2-T3)/T2;\n",
+ "print (\"(i) Engine thermal efficiency = %.3f\")% (n_th)\n",
+ "\n",
+ "Q = W/n_th;\n",
+ "print (\"(ii) Heat added = %.3f\")% (Q), (\"kJ\")\n",
+ "\n",
+ "\n",
+ "Q_rejected = Q-W;\n",
+ "dS = Q_rejected/T3;\n",
+ "print (\"(iii) The entropy changes during heat rejection process\"),(\" = %.3f\")% (dS), (\"kJ/K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Engine thermal efficiency = 0.534\n",
+ "(ii) Heat added = 243.659 kJ\n",
+ "(iii) The entropy changes during heat rejection process = 0.363 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.2 Page no : 607"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "cv = 0.721; \t\t\t#kJ/kg K\n",
+ "cp = 1.008; \t\t\t#kJ/kg K\n",
+ "m = 0.5; \t\t\t #kg\n",
+ "n_th = 0.5;\n",
+ "Q_isothermal = 40.; \t#kJ\n",
+ "p1 = 7.*10**5; \t\t\t#Pa\n",
+ "V1 = 0.12; \t\t\t #m**3\n",
+ "R = 287.; \t\t\t #J/kg K\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) The maximum and minimum temperatures\")\n",
+ "T1 = p1*V1/m/R;\n",
+ "print (\"Maximun temperature = %.3f\")% (T1), (\"K\")\n",
+ "\n",
+ "T2 = (1-n_th)*T1;\n",
+ "print (\"Minimum temperature = %.3f\")% (T2), (\"K\")\n",
+ "\n",
+ "\n",
+ "V2 = V1*math.e**(Q_isothermal*10**3/m/R/T1);\n",
+ "print (\"(ii) The volume at the end of isothermal expansion = %.3f\")% (V2), (\"m**3\")\n",
+ "\n",
+ "print (\"(iii) The heat transfer for each of the four processes\")\n",
+ "\n",
+ "Q1 = Q_isothermal;\n",
+ "print (\"Isothermal expansion %.3f\")% (Q1), (\"kJ\")\n",
+ "\n",
+ "Q2 = 0;\n",
+ "print (\"Adiabatic reversible expansion\"), (Q2)\n",
+ "\n",
+ "Q3 = -Q_isothermal;\n",
+ "print (\"Isothermal compression\"), (Q3)\n",
+ "\n",
+ "Q4 = 0;\n",
+ "print (\"Adiabatic reversible compression\"), (Q4)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The maximum and minimum temperatures\n",
+ "Maximun temperature = 585.366 K\n",
+ "Minimum temperature = 292.683 K\n",
+ "(ii) The volume at the end of isothermal expansion = 0.193 m**3\n",
+ "(iii) The heat transfer for each of the four processes\n",
+ "Isothermal expansion 40.000 kJ\n",
+ "Adiabatic reversible expansion 0\n",
+ "Isothermal compression -40.0\n",
+ "Adiabatic reversible compression 0\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.3 page no : 608"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "p1 = 18.*10**5; \t#Pa\n",
+ "T1 = 683.; \t\t\t#K\n",
+ "T2 = T1;\n",
+ "r1 = 6.; \t\t\t#ratio V4/V1; Isentropic compression\n",
+ "r2 = 1.5; \t\t\t#ratio V2/V1; Isothermal expansion\n",
+ "y = 1.4;\n",
+ "V1 = 0.18; \t\t\t#m**3\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Temperatures and pressures at the main points in the cycle\")\n",
+ "T4 = T1/(r1)**(y-1);\n",
+ "print (\"T4 = %.1f\")% (T4), (\"K\")\n",
+ "\n",
+ "T3 = T4;\n",
+ "print (\"T3 = %.3f\")% (T3), (\"K\")\n",
+ "\n",
+ "p2 = p1/r2;\n",
+ "print (\"p2 = %.3f\")% (p2/10**5), (\"bar\")\n",
+ "\n",
+ "p3 = p2/(r1)**y;\n",
+ "print (\"p3 = %.3f\")% (p3/10**5), (\"bar\")\n",
+ "\n",
+ "p4 = p1/(r1)**y;\n",
+ "print (\"p4 = %.3f\")% (p4/10**5), (\"bar\")\n",
+ "\n",
+ "\n",
+ "dS = p1*V1/T1/10**3*math.log(r2);\n",
+ "print (\"(ii) Change in entropy = %.3f\")% (dS), (\"kJ/K\")\n",
+ "\n",
+ "print (\"(iii) Mean thermal efficiency of the cycle\")\n",
+ "Qs = T1*(dS);\n",
+ "Qr = T4*(dS);\n",
+ "\n",
+ "n = 1-Qr/Qs;\n",
+ "print (\"n = %.3f\")% (n)\n",
+ "\n",
+ "\n",
+ "pm = (Qs-Qr)/8/V1/100; \t\t\t#bar\n",
+ "print (\"(iv) Mean effective pressure of the cycle = %.3f\")% (pm), (\"bar\")\n",
+ "\n",
+ "\n",
+ "n = 210.; \t\t\t#cycles per minute\n",
+ "P = (Qs-Qr)*n/60; \t\t\t#kW\n",
+ "print (\"(v) Power of the engine = %.3f\")% (P), (\"kW\")\n",
+ "\n",
+ "# answers are slightly different because of rounding error."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Temperatures and pressures at the main points in the cycle\n",
+ "T4 = 333.5 K\n",
+ "T3 = 333.549 K\n",
+ "p2 = 12.000 bar\n",
+ "p3 = 0.977 bar\n",
+ "p4 = 1.465 bar\n",
+ "(ii) Change in entropy = 0.192 kJ/K\n",
+ "(iii) Mean thermal efficiency of the cycle\n",
+ "n = 0.512\n",
+ "(iv) Mean effective pressure of the cycle = 0.467 bar\n",
+ "(v) Power of the engine = 235.251 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.4 page no : 611"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculations\n",
+ "T2 = 1029/0.6;\n",
+ "T1 = 1.2*T2;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Temperature of the source = \"), (T1), (\"K\")\n",
+ "\n",
+ "print (\"Temperature of the math.sink = \"), (T2), (\"K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature of the source = 2058.0 K\n",
+ "Temperature of the math.sink = 1715.0 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.5 page no : 611"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 1990.; \t\t\t#K\n",
+ "T2 = 850.; \t\t\t#K\n",
+ "Q = 32.5/60; \t\t\t#kJ/s\n",
+ "P = 0.4; \t\t\t#kW\n",
+ "\n",
+ "# Calculations\n",
+ "n_carnot = (T1-T2)/T1;\n",
+ "n_th = P/Q;\n",
+ "\n",
+ "# Results\n",
+ "print (\"most efficient engine is one that works on Carnot cycle %.3f\")% (n_carnot)\n",
+ "\n",
+ "print (\"n_thermal = %.3f\")% (n_th)\n",
+ "\n",
+ "print (\"which is not feasible as no engine can be more efficient than that working on Carnot\")\n",
+ "print (\"Hence claims of the inventor is not true.\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "most efficient engine is one that works on Carnot cycle 0.573\n",
+ "n_thermal = 0.738\n",
+ "which is not feasible as no engine can be more efficient than that working on Carnot\n",
+ "Hence claims of the inventor is not true.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.7 page no : 615"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "n = 0.6; \n",
+ "y = 1.5;\n",
+ "\n",
+ "# Calculations\n",
+ "r = (1./(1-n))**(1./(y-1));\n",
+ "\n",
+ "# Results\n",
+ "print (\"Compression ratio = \"), (r)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Compression ratio = 6.25\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.8 page no : 615"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "D = 0.25; \t\t\t#m\n",
+ "L = 0.375; \t\t\t#m\n",
+ "Vc = 0.00263; \t\t#m**3\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "T1 = 323.; \t\t\t#K\n",
+ "p3 = 25.; \t\t\t#bar\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Vs = math.pi/4*D**2*L;\n",
+ "r = (Vs+Vc)/Vc;\n",
+ "y = 1.4;\n",
+ "\n",
+ "n_otto = 1-1/(r**(y-1));\n",
+ "print (\"(i) Air standard efficiency = %.3f\")% (n_otto)\n",
+ "\n",
+ "\n",
+ "\n",
+ "p2 = p1*(r)**(y);\n",
+ "r_p = p3/p2;\n",
+ "\n",
+ "p_m = p1*r*(r**(y-1) - 1)*(r_p - 1)/(y-1)/(r-1);\n",
+ "print (\"(ii)Mean effective pressure = %.3f\")%(p_m), (\"bar\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Air standard efficiency = 0.565\n",
+ "(ii)Mean effective pressure = 1.336 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.9 page no : 617"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "cv = 0.72; \t\t\t#kJ/kg K\n",
+ "y = 1.4;\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "Q = 1500.; \t\t\t#kJ/kg\n",
+ "r = 8.;\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Pressures and temperatures at all points\")\n",
+ "T2 = T1*(r)**(y-1);\n",
+ "print (\"T2 = %.3f\")% (T2), (\"K\")\n",
+ "\n",
+ "p2 = p1*(r)**y;\n",
+ "print (\"p2 = %.3f\")%(p2), (\"bar\")\n",
+ "\n",
+ "T3 = Q/cv + T2;\n",
+ "print (\"T3 = %.3f\")% (T3), (\"K\")\n",
+ "\n",
+ "p3 = p2*T3/T2;\n",
+ "print (\"p3 = %.3f\")% (p3), (\"bar\")\n",
+ "\n",
+ "T4 = T3/r**(y-1);\n",
+ "print (\"T4 = %.3f\")% (T4), (\"K\")\n",
+ "\n",
+ "p4 = p3/r**(y);\n",
+ "print (\"p4 = %.3f\")% (p4), (\"bar\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Specific work and thermal efficiency\")\n",
+ "SW = cv*((T3-T2) - (T4-T1));\n",
+ "print (\"Specific work = %.3f\")% (SW), (\"kJ/kg\")\n",
+ "\n",
+ "n_th = 1-1./r**(y-1);\n",
+ "print (\"Thermal efficiency = %.3f\")% (n_th)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Pressures and temperatures at all points\n",
+ "T2 = 689.219 K\n",
+ "p2 = 18.379 bar\n",
+ "T3 = 2772.552 K\n",
+ "p3 = 73.935 bar\n",
+ "T4 = 1206.824 K\n",
+ "p4 = 4.023 bar\n",
+ "(ii) Specific work and thermal efficiency\n",
+ "Specific work = 847.087 kJ/kg\n",
+ "Thermal efficiency = 0.565\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.10 page no : 618"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "r = 6.; \t\t\t#v1/v2 = v4/v3 = r\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "T3 = 1842.; \t\t#K\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Temperature and pressure after the isentropic expansion\")\n",
+ "p2 = p1*(r)**y;\n",
+ "T2 = T1*r**(y-1);\n",
+ "p3 = p2*(T3/T2);\n",
+ "T4 = T3/r**(y-1);\n",
+ "print (\"T4 = %.3f\")% (T4), (\"K\")\n",
+ "\n",
+ "p4 = p3/(r)**(y);\n",
+ "print (\"p4 = %.3f\")% (p4), (\"bar\")\n",
+ "\n",
+ "print (\"(ii)Process required to complete the cycle is the consmath.tant pressure scavenging. The cycle is called Atkinson cycle\")\n",
+ "print (\"(iii) Percentage improvement/increase in efficiency\")\n",
+ "p5 = 1.; \t\t\t#bar\n",
+ "T5 = T3*(p5/p3)**((y-1)/y);\n",
+ "n_otto = (1-1./r**(y-1))*100;\n",
+ "print (\"n_otto = %.3f\")% (n_otto), (\"%\")\n",
+ "\n",
+ "n_atkinson = (1.-y*(T5-T1)/(T3-T2))*100;\n",
+ "print (\"n_atkinson = %.3f\")% (n_atkinson), (\"%\")\n",
+ "\n",
+ "dn = n_atkinson - n_otto; \t\t\t#Improvement in efficiency\n",
+ "print (\"Improvement in efficiency = %.3f\")% (dn), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Temperature and pressure after the isentropic expansion\n",
+ "T4 = 899.558 K\n",
+ "p4 = 2.999 bar\n",
+ "(ii)Process required to complete the cycle is the consmath.tant pressure scavenging. The cycle is called Atkinson cycle\n",
+ "(iii) Percentage improvement/increase in efficiency\n",
+ "n_otto = 51.164 %\n",
+ "n_atkinson = 59.254 %\n",
+ "Improvement in efficiency = 8.090 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.11 page no : 620"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "T1 = 343.; \t \t\t#K\n",
+ "p2 = 7.; \t\t \t#bar\n",
+ "Qs = 465.; \t\t\t #kJ/kg of air\n",
+ "cp = 1.; \t\t\t #kJ/kg K\n",
+ "cv = 0.706; \t\t\t#kJ/kg K\n",
+ "y = 1.41;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "r = (p2/p1)**(1./y);\n",
+ "print (\"(i) Compression ratio of engine = %.3f\")% (r)\n",
+ "\n",
+ "T2 = T1*(r)**(y-1);\n",
+ "t2 = T2-273;\n",
+ "print (\"(ii) Temperature at the end of compression = %.3f\")% (t2), (\"0C\")\n",
+ "\n",
+ "T3 = Qs/cv+T2;\n",
+ "t3 = T3-273;\n",
+ "print (\"(iii) Temperature at the end of heat addition = %.3f\")% (t3), (\"0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Compression ratio of engine = 3.975\n",
+ "(ii) Temperature at the end of compression = 330.993 0C\n",
+ "(iii) Temperature at the end of heat addition = 989.633 0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.12 page no : 621"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "y = 1.4;\n",
+ "R = 0.287; \t \t\t#kJ/kg K\n",
+ "T1 = 311.; \t\t\t#K\n",
+ "T3 = 2223.; \t\t\t#K\n",
+ "\n",
+ "#p2/p1 = 15\n",
+ "r = 15**(1/1.4);\n",
+ "print (\"(i) Compression ratio = %.3f\")% (r)\n",
+ "\n",
+ "n_th = 1-1./r**(y-1);\n",
+ "print (\"(ii) Thermal efficiency = %.3f\")% (n_th)\n",
+ "\n",
+ "T2 = T1*(r)**(y-1);\n",
+ "T4 = T3/r**(y-1);\n",
+ "cv = R/(y-1);\n",
+ "\n",
+ "Q_supplied = cv*(T3-T2);\n",
+ "Q_rejected = cv*(T4-T1);\n",
+ "\n",
+ "W = Q_supplied-Q_rejected;\n",
+ "print (\"(iii)Work done = %.3f\")% (W), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Compression ratio = 6.919\n",
+ "(ii) Thermal efficiency = 0.539\n",
+ "(iii)Work done = 598.651 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.13 page no : 623"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "V1 = 0.45; \t\t\t#m**3\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "T1 = 303.; \t\t\t#K\n",
+ "p2 = 11.; \t\t\t#bar\n",
+ "Qs = 210.; \t\t\t#kJ\n",
+ "n = 210.; \t\t\t#number of working cycles/min\n",
+ "R = 287.; \t\t\t#J/kg K\n",
+ "cv = 0.71; \t\t\t#kJ/kg K\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Pressures, temperatures and volumes at salient points\")\n",
+ "r = (p2/p1)**(1./y);\n",
+ "\n",
+ "T2 = T1*(r)**(y-1);\n",
+ "print (\"T2 = %.3f\")% (T2), (\"K\")\n",
+ "\n",
+ "V2 = T2/T1*p1/p2*V1;\n",
+ "print (\"V2 = %.3f\")% (V2), (\"m**3\")\n",
+ "\n",
+ "m = p1*10**5*V1/R/T1;\n",
+ "T3 = Qs/m/cv+T2;\n",
+ "print (\"T3 = %.3f\")% (T3), (\"K\")\n",
+ "\n",
+ "p3 = T3/T2*p2;\n",
+ "print (\"p3 = %.3f\")% (p3), (\"bar\")\n",
+ "\n",
+ "V3 = V2;\n",
+ "print (\"V3 = %.3f\")% (V3), (\"m**3\")\n",
+ "\n",
+ "p4 = p3/r**y;\n",
+ "print (\"p4 = %.3f\")%(p4), (\"bar\")\n",
+ "\n",
+ "T4 = T3/r**(y-1);\n",
+ "print (\"T4 = %.3f\")% (T4), (\"K\")\n",
+ "\n",
+ "V4 = V1;\n",
+ "print (\"V4 = %.3f\")%(V4), (\"m**3\")\n",
+ "\n",
+ "Qr = m*cv*(T4-T1);\n",
+ "n_otto = (Qs-Qr)/Qs;\n",
+ "print (\"(iii) Efficiency = %.3f\")% (n_otto)\n",
+ "\n",
+ "\n",
+ "p_m = (Qs-Qr)/(V1-V2)/100; \t\t\t#bar\n",
+ "print (\"(iv) Mean effective pressure = %.3f\")% (p_m), (\"bar\")\n",
+ "\n",
+ "P = (Qs-Qr)*n/60;\n",
+ "print (\"(v) Power developed = %.3f\")% (P), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Pressures, temperatures and volumes at salient points\n",
+ "T2 = 601.151 K\n",
+ "V2 = 0.081 m**3\n",
+ "T3 = 1172.725 K\n",
+ "p3 = 21.459 bar\n",
+ "V3 = 0.081 m**3\n",
+ "p4 = 1.951 bar\n",
+ "T4 = 591.093 K\n",
+ "V4 = 0.450 m**3\n",
+ "(iii) Efficiency = 0.496\n",
+ "(iv) Mean effective pressure = 2.824 bar\n",
+ "(v) Power developed = 364.536 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.14 page no : 625"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "print (\"r = (T3/T1)**(1/2/(y-1))\")\n",
+ "print (\"(b)Change in efficiency\")\n",
+ "T3 = 1220.; \t\t\t#K\n",
+ "T1 = 310. \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "# For air\n",
+ "y = 1.4;\n",
+ "r1 = (T3/T1)**(1./2./(y-1));\n",
+ "n1 = 1-1/r1**(y-1); \t\t\t#air smath.radians(numpy.arcmath.tan(ard Efficiency\n",
+ "print (\"Air standard Efficiency = %.3f\")% (n1)\n",
+ "\n",
+ "#For helium\n",
+ "cp = 5.22; \t\t\t#kJ/kg K\n",
+ "cv = 3.13; \t\t\t#kJ/kg K\n",
+ "y = cp/cv;\n",
+ "r2 = (T3/T1)**(1./2/(y-1));\n",
+ "\n",
+ "n2 = 1-1/r2**(y-1);\n",
+ "print (\"Air standard efficiency for helium = %.3f\")% (n2)\n",
+ "\n",
+ "change = n1-n2;\n",
+ "print (\"Change in efficiency = %.3f\")% (change)\n",
+ "\n",
+ "print (\"Hence change in efficiency is nil\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "r = (T3/T1)**(1/2/(y-1))\n",
+ "(b)Change in efficiency\n",
+ "Air standard Efficiency = 0.496\n",
+ "Air standard efficiency for helium = 0.496\n",
+ "Change in efficiency = -0.000\n",
+ "Hence change in efficiency is nil\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.15 page no : 627"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print (\"(b) Power developed \")\n",
+ "\n",
+ "# Variables\n",
+ "T1 = 310.; \t\t\t#K\n",
+ "T3 = 1450.; \t\t#K\n",
+ "m = 0.38; \t\t\t#kg\n",
+ "cv = 0.71; \t\t\t#kJ/kg K\n",
+ "\n",
+ "# Calculations\n",
+ "T2 = math.sqrt(T1*T3);\n",
+ "T4 = T2;\n",
+ "\n",
+ "W1 = cv*((T3-T2) - (T4-T1)); \t\t\t#Work done\n",
+ "W = m/60*W1; \t\t\t#Work done per second\n",
+ "\n",
+ "# Results\n",
+ "print (\"Power = %.3f\")%(W), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(b) Power developed \n",
+ "Power = 1.885 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.17 page no : 632"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "r = 15.;\n",
+ "y = 1.4;\n",
+ "#V3-V2 = 0.06*(V1-V2)\n",
+ "rho = 1.84; \t\t\t#cut off ratio rho = V3/V2\n",
+ "\n",
+ "# Calculations\n",
+ "n_diesel = 1-1/y/r**(y-1)*((rho**y-1)/(rho-1));\n",
+ "\n",
+ "# Results\n",
+ "print (\"efficiency = %.3f\")% (n_diesel)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "efficiency = 0.612\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.18 page no : 633"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "L = 0.25; \t\t\t#m\n",
+ "D = 0.15; \t\t\t#m\n",
+ "V2 = 0.0004; \t\t#m**3\n",
+ "\n",
+ "# Calculations\n",
+ "Vs = math.pi/4*D**2*L;\n",
+ "V_total = Vs+V2;\n",
+ "y = 1.4;\n",
+ "V3 = V2+5./100*Vs;\n",
+ "rho = V3/V2;\n",
+ "r = (Vs+V2)/V2; \t\t\t#V1 = Vs+V2\n",
+ "n_diesel = 1-1/y/r**(y-1)*((rho**y-1)/(rho-1));\n",
+ "\n",
+ "# Results\n",
+ "print (\"efficiency = %.3f\")%(n_diesel)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "efficiency = 0.593\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.19 page no : 633"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "y = 1.4;\n",
+ "r = 14\n",
+ "\n",
+ "# Calculations\n",
+ "#When the fuel is cut-off at 5%\n",
+ "rho1 = 5./100*(r-1)+1;\n",
+ "n_diesel1 = 1-1./y/r**(y-1)*((rho1**y-1)/(rho1-1));\n",
+ "\n",
+ "#When the fuel is cut-off at 8%\n",
+ "rho2 = 8./100*(r-1)+1;\n",
+ "n_diesel2 = 1-1./y/r**(y-1)*((rho2**y-1)/(rho2-1));\n",
+ "loss = (n_diesel1-n_diesel2)*100;\n",
+ "\n",
+ "# Results\n",
+ "print (\"percentage loss in efficiency due to delay in fuel cut off = %.1f\")% (loss), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "percentage loss in efficiency due to delay in fuel cut off = 2.1 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.20 page no : 634"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "pm = 7.5; \t\t\t#bar\n",
+ "r = 12.5;\n",
+ "p1 = 1; \t\t\t#bar\n",
+ "y = 1.4;\n",
+ "rho = 2.24;\n",
+ "\n",
+ "# Calculations\n",
+ "cutoff = (rho-1)/(r-1)*100;\n",
+ "\n",
+ "# Results\n",
+ "print (\"cutoff = %.3f\")% (cutoff), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "cutoff = 10.783 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.21 page no : 634"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "D = 0.2; \t\t\t#m\n",
+ "L = 0.3; \t\t\t#m\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "R = 287.;\n",
+ "r = 15.;\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Pressures and temperatures at salient points\")\n",
+ "Vs = math.pi/4*D**2*L;\n",
+ "\n",
+ "V1 = r/(r-1)*Vs;\n",
+ "print (\"V1 = %.3f\")% (V1), (\"m**3\")\n",
+ "\n",
+ "m = p1*10**5*V1/R/T1;\n",
+ "\n",
+ "p2 = p1*r**y;\n",
+ "print (\"p2 = %.3f\")% (p2), (\"bar\")\n",
+ "\n",
+ "T2 = T1*r**(y-1);\n",
+ "print (\"T2 = %.3f\")% (T2), (\"K\")\n",
+ "\n",
+ "V2 = Vs/(r-1);\n",
+ "print (\"V2 = %.5f\")% (V2), (\"m**3\")\n",
+ "\n",
+ "rho = 8./100*(r-1) + 1;\n",
+ "V3 = rho*V2;\n",
+ "print (\"V3 = %.5f\")% (V3), (\"m**3\")\n",
+ "\n",
+ "T3 = T2*V3/V2;\n",
+ "print (\"T3 = %.3f\")% (T3), (\"K\")\n",
+ "\n",
+ "p3 = p2;\n",
+ "print (\"p3 = %.3f\")% (p3), (\"bar\")\n",
+ "\n",
+ "p4 = p3*(rho/r)**y;\n",
+ "print (\"p4 = %.3f\")% (p4), (\"bar\")\n",
+ "\n",
+ "T4 = T3*(rho/r)**(y-1);\n",
+ "print (\"T4 = %.3f\")% (T4), (\"K\")\n",
+ "\n",
+ "V4 = V1;\n",
+ "print (\"V4 = %.3f\")% (V4), (\"m**3\")\n",
+ "\n",
+ "print (\"(ii) Theoretical air standard efficiency = \"),\n",
+ "n_diesel = 1-1/y/r**(y-1)*((rho**y-1)/(rho-1));\n",
+ "print (\"efficiency = %.3f\")% (n_diesel)\n",
+ "\n",
+ "\n",
+ "pm = (p1*r**y*(y*(rho-1) - r**(1-y)*(rho**y-1)))/(y-1)/(r-1);\n",
+ "print (\"(iii) Mean effective pressure = %.3f\")% (pm), (\"bar\")\n",
+ "\n",
+ "n = 380; \t\t\t#number of cycles per min\n",
+ "P = n/60.*pm*Vs*100; \t\t\t#kW\n",
+ "print (\"(iv) Power of the engine = %.3f\")% (P), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Pressures and temperatures at salient points\n",
+ "V1 = 0.010 m**3\n",
+ "p2 = 44.313 bar\n",
+ "T2 = 886.253 K\n",
+ "V2 = 0.00067 m**3\n",
+ "V3 = 0.00143 m**3\n",
+ "T3 = 1878.857 K\n",
+ "p3 = 44.313 bar\n",
+ "p4 = 2.863 bar\n",
+ "T4 = 858.997 K\n",
+ "V4 = 0.010 m**3\n",
+ "(ii) Theoretical air standard efficiency = efficiency = 0.598\n",
+ "(iii) Mean effective pressure = 7.417 bar\n",
+ "(iv) Power of the engine = 44.269 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.22 page no : 637"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "r1 = 15.3; \t\t\t#V1/V2\n",
+ "r2 = 7.5; \t\t\t#V4/V3\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "n_mech = 0.8;\n",
+ "C = 42000.; \t\t#kJ/kg\n",
+ "y = 1.4;\n",
+ "R = 287.;\n",
+ "cp = 1.005;\n",
+ "cv = 0.718;\n",
+ "V2 = 1.; \t\t\t\t\t#Assuming V2 = 1 m**3\n",
+ "\n",
+ "# Calculations\n",
+ "T2 = T1*r1**(y-1);\n",
+ "p2 = p1*r1**y;\n",
+ "T3 = r1/r2*T2;\n",
+ "m = p2*10**5*V2/R/T2;\n",
+ "T4 = T3/r2**(y-1);\n",
+ "\n",
+ "Q_added = m*cp*(T3-T2);\n",
+ "Q_rejected = m*cv*(T4-T1);\n",
+ "W = Q_added-Q_rejected;\n",
+ "\n",
+ "pm = W/(r1-1)/V2/100;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Mean effective pressure = %.3f\")% (pm), (\"bar\")\n",
+ "\n",
+ "ratio = p2/pm;\n",
+ "print (\"Ratio of maximum pressure to mean effective pressure = %.3f\")% (ratio)\n",
+ "\n",
+ "n_cycle = W/Q_added;\n",
+ "print (\"Cycle efficiency = %.3f\")% (n_cycle)\n",
+ "\n",
+ "n_thI = 0.5;\n",
+ "n_cycle1 = n_thI*n_cycle;\n",
+ "\n",
+ "n_thB = n_mech*n_cycle1;\n",
+ "\n",
+ "BP = 1;\n",
+ "mf = BP/C/n_thB*3600;\n",
+ "print (\"Fuel consumption per kWh = %.3f \")% (mf), (\"kg/kWh\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mean effective pressure = 7.017 bar\n",
+ "Ratio of maximum pressure to mean effective pressure = 6.493\n",
+ "Cycle efficiency = 0.605\n",
+ "Fuel consumption per kWh = 0.354 kg/kWh\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.23 page no : 642"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "Vs = 0.0053; \t\t\t#m**3\n",
+ "Vc = 0.00035; \t\t\t#m**3\n",
+ "V3 = Vc;\n",
+ "V2 = V3;\n",
+ "p3 = 65.; \t\t\t#bar\n",
+ "p4 = 65.; \t\t\t#bar\n",
+ "T1 = 353.; \t\t\t#K\n",
+ "p1 = 0.9; \t\t\t#bar\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations\n",
+ "r = (Vs+Vc)/Vc;\n",
+ "rho = (5/100*Vs+V3)/V3;\n",
+ "p2 = p1*(r)**y;\n",
+ "B = p3/p2;\n",
+ "n_dual = 1-1/r**(y-1)*((B*rho**y-1)/((B-1)+B*y*(rho-1)));\n",
+ "\n",
+ "# Results\n",
+ "print (\"Efficiency of the cycle = %.3f\")% (n_dual)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Efficiency of the cycle = 0.671\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.24 page no : 643"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "r = 14.;\n",
+ "B = 1.4;\n",
+ "rho = 6./100*(r-1) + 1;\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations\n",
+ "n_dual = 1-1./r**(y-1)*((B*rho**y-1)/((B-1)+B*y*(rho-1)))\n",
+ "\n",
+ "# Results\n",
+ "print (\"Efficiency of the cycle = %.3f\")% (n_dual)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Efficiency of the cycle = 0.614\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.25 page no : 643"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "D = 0.25; \t\t\t#m\n",
+ "r = 9.; \n",
+ "L = 0.3; \t\t\t#m\n",
+ "cv = 0.71; \t\t\t#kJ/kg K\n",
+ "cp = 1.; \t\t\t#kJ/kg K\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "T1 = 303.; \t\t\t#K\n",
+ "p3 = 60.; \t\t\t#bar\n",
+ "p4 = p3;\n",
+ "n = 3.; \t\t\t#number of working cycles/ sec\n",
+ "y = 1.4;\n",
+ "R = 287.;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Air standard efficiency\")\n",
+ "Vs = math.pi/4*D**2*L;\n",
+ "Vc = Vs/(r-1);\n",
+ "V1 = Vs+Vc;\n",
+ "p2 = p1*(r)**y;\n",
+ "T2 = T1*r**(y-1);\n",
+ "T3 = T2*p3/p2;\n",
+ "rho = 4./100*(r-1)+1;\n",
+ "T4 = T3*rho;\n",
+ "T5 = T4*(rho/r)**(y-1);\n",
+ "p5 = p4*(r/rho)**(y);\n",
+ "Qs = cv*(T3-T2)+cp*(T4-T3)\n",
+ "Qr = cv*(T5-T1);\n",
+ "\n",
+ "n_airsard = (Qs-Qr)/Qs;\n",
+ "print (\"efficiency = %.3f\")% (n_airsard)\n",
+ "\n",
+ "print (\"(ii) Power developed by the engine\")\n",
+ "m = p1*10**5*V1/R/T1;\n",
+ "\n",
+ "W = m*(Qs-Qr);\n",
+ "\n",
+ "P = W*n;\n",
+ "print (\"P = %.3f\")% (P), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Air standard efficiency\n",
+ "efficiency = 0.575\n",
+ "(ii) Power developed by the engine\n",
+ "P = 51.392 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.26 page no : 646"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "T1 = 363.; \t\t\t#K\n",
+ "r = 9.; \n",
+ "p3 = 68.; \t\t\t#bar\n",
+ "p4 = 68.; \t\t\t#bar\n",
+ "Q = 1750.; \t\t\t#kJ/kg\n",
+ "y = 1.4;\n",
+ "cv = 0.71;\n",
+ "cp = 1.0;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Pressures and temperatures at salient points\")\n",
+ "p2 = p1*(r)**y;\n",
+ "print (\"p2 = %.3f\")% (p2), (\"bar\")\n",
+ "\n",
+ "T2 = T1*r**(y-1);\n",
+ "print (\"T2 = %.3f\")% (T2), (\"K\")\n",
+ "\n",
+ "print (\"p3 = %.3f\")% (p3), (\"bar\")\n",
+ "\n",
+ "print (\"p4 = %.3f\")% (p4), (\"bar\")\n",
+ "\n",
+ "T3 = T2*(p3/p2);\n",
+ "print (\"T3 = %.3f\")% (T3), (\"K\")\n",
+ "\n",
+ "Q1 = cv*(T3-T2); \t\t\t#heat added at consmath.tant volume\n",
+ "Q2 = Q-Q1; \t \t\t#heat added at consmath.tant pressure\n",
+ "\n",
+ "T4 = Q2/cp+T3;\n",
+ "print (\"T4 = %.3f\")% (T4), (\"K\")\n",
+ "\n",
+ "rho = T4/T3; \t\t\t#V4/V3 = T4/T3\n",
+ "\n",
+ "p5 = p4*(rho/r)**y;\n",
+ "print (\"p5 = %.3f\")% (p5), (\"bar\")\n",
+ "\n",
+ "T5 = T4*(rho/r)**(y-1);\n",
+ "print (\"T5 = %.3f\")% (T5), (\"K\")\n",
+ "\n",
+ "\n",
+ "Qr = cv*(T5-T1);\n",
+ "n_airard = (Q-Qr)/Q;\n",
+ "print (\"(ii) Air standard efficiency = %.3f\")% (n_airard)\n",
+ "\n",
+ "\n",
+ "pm = 1./(r-1)*(p3*(rho-1) + (p4*rho-p5*r)/(y-1) - (p2-p1*r)/(y-1));\n",
+ "print (\"(iii) Mean effective pressure = %.3f\")% (pm), (\"bar\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Pressures and temperatures at salient points\n",
+ "p2 = 21.674 bar\n",
+ "T2 = 874.186 K\n",
+ "p3 = 68.000 bar\n",
+ "p4 = 68.000 bar\n",
+ "T3 = 2742.667 K\n",
+ "T4 = 3166.045 K\n",
+ "p5 = 3.836 bar\n",
+ "T5 = 1392.380 K\n",
+ "(ii) Air standard efficiency = 0.582\n",
+ "(iii) Mean effective pressure = 11.094 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.27 page no : 648"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "r = 15.;\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations\n",
+ "#p3/p1 = 70\n",
+ "T2 = T1*(r)**(y-1);\n",
+ "#p2/p1 = r**y\n",
+ "#p2 = 44.3*p1\n",
+ "T3 = 1400.; \t\t\t#K; T3 = T2*p3/p2\n",
+ "T4 = T3 + (T3-T2)/y;\n",
+ "T5 = 656.9; \t\t\t#K\n",
+ "n_airard = 1-(T5-T1)/((T3-T2) + y*(T4-T3));\n",
+ "\n",
+ "# Results\n",
+ "print (\"Efficiency = %.3f\")% (n_airard)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Efficiency = 0.653\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.28 page no : 650"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 373.; \t\t\t#K\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "p3 = 65.; \t\t\t#bar\n",
+ "p4 = p3;\n",
+ "Vs = 0.0085; \t\t\t#m**3\n",
+ "ratio = 21.; \t\t\t#Air fuel ratio\n",
+ "r = 15.;\n",
+ "C = 43890.; \t\t\t#kJ/kg\n",
+ "cp = 1.;\n",
+ "cv = 0.71;\n",
+ "V2 = 0.0006; \t\t\t#m**3\n",
+ "V1 = 0.009; \t\t\t#m**3\n",
+ "y = 1.41;\n",
+ "V5 = V1;\n",
+ "V3 = V2;\n",
+ "R = 287.;\n",
+ "\n",
+ "# Calculations\n",
+ "p2 = p1*(r)**y;\n",
+ "T2 = T1*r**(y-1);\n",
+ "T3 = T2*p3/p2;\n",
+ "m = p1*10**5*V1/R/T1;\n",
+ "Q1 = m*cv*(T3-T2); \t\t\t#Heat added during consmath.tant volume process 2-3\n",
+ "amt = Q1/C; \t\t\t #Amount of fuel added during the consmath.tant volume process 2-3\n",
+ "total = m/ratio; \t\t\t#Total amount of fuel added\n",
+ "quantity = total-amt; \t\t#Quantity of fuel added during the process 3-4\n",
+ "Q2 = quantity*C; \t\t\t#Heat added during consmath.tant pressure process\n",
+ "T4 = Q2/(m+total)/cp+T3;\n",
+ "V4 = V3*T4/T3;\n",
+ "T5 = T4*(V4/V5)**(y-1);\n",
+ "Q3 = (m+total)*cv*(T5-T1); \t#Heat rejected during consmath.tant volume process 5-1\n",
+ "W = (Q1+Q2) - Q3;\n",
+ "n_th = W/(Q1+Q2);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Thermal efficiency = %.3f\")% (n_th)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal efficiency = 0.618\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.29 page no : 652"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 303.; \t\t\t#K\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "rc = 9.;\n",
+ "re = 5.;\n",
+ "n = 1.25;\n",
+ "D = 0.25; \t\t\t#m\n",
+ "L = 0.4; \t\t\t#m\n",
+ "R = 287.;\n",
+ "cv = 0.71;\n",
+ "cp = 1.;\n",
+ "num = 8.; \t\t\t#no. 0f cycles/sec\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Pressure and temperatures at all salient points = \"),\n",
+ "p2 = p1*(rc)**n;\n",
+ "print (\"p2 = %.3f\")% (p2), (\"bar\")\n",
+ "\n",
+ "T2 = T1*(rc)**(n-1);\n",
+ "print (\"T2 = \"), (T2), (\"K\")\n",
+ "\n",
+ "rho = rc/re;\n",
+ "T3 = 1201.9; \t\t\t#K\n",
+ "print (\"T3 = \"), (T3), (\"K\")\n",
+ "\n",
+ "p3 = p2*T3/T2;\n",
+ "print (\"p3 = \"), (p3), (\"bar\")\n",
+ "\n",
+ "p4 = p3;\n",
+ "print (\"p4 = \"),(p4), (\"bar\")\n",
+ "\n",
+ "T4 = 1.8*T3;\n",
+ "print (\"T4 = \"), (T4), (\"K\")\n",
+ "\n",
+ "p5 = p4*(1./re)**(n);\n",
+ "print (\"p5 = %.3f\")%(p5), (\"bar\")\n",
+ "\n",
+ "T5 = T4*(1./re)**(n-1)\n",
+ "print (\"T5 = %.3f\")%(T5),(\"K\")\n",
+ "\n",
+ "\n",
+ "pm = 1./(rc-1)*(p3*(rho-1)+(p4*rho-p5*rc)/(n-1)-(p2-p1*rc)/(n-1));\n",
+ "print (\"(ii) Mean effective pressure = %.3f\")% (pm), (\"bar\")\n",
+ "\n",
+ "print (\"(iii) Efficiency of the cycle\")\n",
+ "Vs = math.pi/4*D**2*L;\n",
+ "W = pm*10**5*Vs/1000;\n",
+ "\n",
+ "V1 = rc/(rc-1)*Vs\n",
+ "m = p1*10**5*V1/R/T1;\n",
+ "Q = m*(cv*(T3-T2) + cp*(T4-T3));\n",
+ "\n",
+ "Efficiency = W/Q;\n",
+ "print (\"Efficiency = %.3f\")% (Efficiency)\n",
+ "\n",
+ "P = W*num;\n",
+ "print (\"(iv) Power of the engine = %.3f\")% (P), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Pressure and temperatures at all salient points = p2 = 15.588 bar\n",
+ "T2 = 524.811394693 K\n",
+ "T3 = 1201.9 K\n",
+ "p3 = 35.7 bar\n",
+ "p4 = 35.7 bar\n",
+ "T4 = 2163.42 K\n",
+ "p5 = 4.775 bar\n",
+ "T5 = 1446.766 K\n",
+ "(ii) Mean effective pressure = 10.919 bar\n",
+ "(iii) Efficiency of the cycle\n",
+ "Efficiency = 0.585\n",
+ "(iv) Power of the engine = 171.518 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.30 page no : 657"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline\n",
+ "\n",
+ "from numpy import *\n",
+ "from matplotlib.pyplot import *\n",
+ "\n",
+ "v = linspace(10,100,90)\n",
+ "def f(v):\n",
+ " return 1./v**1.4;\n",
+ "\n",
+ "f1 = f(v)\n",
+ "plot(v,f1)\n",
+ "v = [10, 20]\n",
+ "p = [f(10), f(10)]\n",
+ "plot(v,p,'r')\n",
+ "\n",
+ "v = linspace(20,100,80)\n",
+ "def fa(v):\n",
+ " return 2.6515/v**1.4;\n",
+ "f1 = fa(v)\n",
+ "plot(v,f1,'g')\n",
+ "\n",
+ "v = [100, 100]\n",
+ "p = [f(100), fa(100)]\n",
+ "plot(v,p,'--p')\n",
+ "\n",
+ "v = [15, 15]\n",
+ "p = [f(15), 0.040]\n",
+ "plot(v,p,'--')\n",
+ "\n",
+ "v = [20 ,20]\n",
+ "p = [f(20), 0.040]\n",
+ "plot(v,p,'--r')\n",
+ "\n",
+ "s = linspace(10,50,40);\n",
+ "\n",
+ "def fb(s):\n",
+ " return s**2\n",
+ "f1 = fb(s)\n",
+ "plot(s,f1)\n",
+ "\n",
+ "s = linspace(10,50,40)\n",
+ "\n",
+ "def fc(s):\n",
+ " return (s+30)**2\n",
+ "f1 = fc(s)\n",
+ "plot(s,f1,'r')\n",
+ "\n",
+ "s = [12, 12];\n",
+ "T = [fb(12), fc(12)];\n",
+ "plot(s,T,'--p')\n",
+ "\n",
+ "s = [45, 45];\n",
+ "T = [fb(45) ,fc(45)]\n",
+ "plot(s,T,'m')\n",
+ "\n",
+ "s = linspace(10,27,17);\n",
+ "T = 5*(s)**2;\n",
+ "plot(s,T,'g')\n",
+ "\n",
+ "s = linspace(10,20,10);\n",
+ "T = 7*s**2;\n",
+ "plot(s,T,'--r')\n",
+ "\n",
+ "\n",
+ "print (\"Thus, \u03b7diesel > \u03b7dual > \u03b7otto\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Populating the interactive namespace from numpy and matplotlib\n",
+ "Thus, \u03b7diesel > \u03b7dual > \u03b7otto"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAD9CAYAAACx+XApAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcVNX+//EXCqaZ4A0GnbEwARElxQv6KytKwUtJWkai\nCd6qr1aHrG/3TunpJFin0jTqnMIT0Sm07KvWUUTT8R4qamqYkoLCMOAFUURkuKzfH1OTpgIKzB7g\n83w8fET7Nu/NZT6z19p7LSellEIIIUST1UzrAEIIIbQlhUAIIZo4KQRCCNHESSEQQogmTgqBEEI0\ncVIIhBCiiau2EBw8eJDAwEDbPzc3Nz744AMKCgoICQnB19eX0NBQCgsLbfvExMTg4+ODn58fKSkp\ntuVpaWkEBATg4+NDdHR0/ZyREEKIa+J0Lc8RVFZWotfr2b59OwsWLKBjx4688MILzJ07l9OnTxMb\nG0t6ejrjx49nx44dmEwmhg4dSkZGBk5OTgQFBbFw4UKCgoIYOXIkf/nLXxg+fHh9np8QQohqXFPT\n0Nq1a/H29qZLly6sWLGCqKgoAKKioli2bBkAy5cvJyIiAhcXF7y8vPD29iY1NRWz2UxRURFBQUEA\nREZG2vYRQgihnWsqBElJSURERACQn5+PTqcDQKfTkZ+fD0Bubi4Gg8G2j8FgwGQyXbZcr9djMplq\nfQJCCCFqx7mmG1osFr777jvmzp172TonJyecnJzqJFBdHUcIIZqS2owWVOMrglWrVtGvXz/c3d0B\n61VAXl4eAGazGQ8PD8D6ST87O9u2X05ODgaDAb1eT05OziXL9Xr9FV9LKeVQ/9544w3NM0imxpPJ\nUXNJpoabqbZqXAi++uorW7MQQFhYGAkJCQAkJCQwevRo2/KkpCQsFguZmZlkZGQQFBSEp6cnrq6u\npKamopQiMTHRto8QQgjt1KhpqLi4mLVr1/LJJ5/Ylr300kuEh4cTHx+Pl5cXS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7u7O6Dt7/nOnTu5/fbb6dChA87Ozjz44INs27ZN8+/TlClT2LlzJxs2bKBdu3b4\n+vo6xO85XP3n9efntXJycqodm82hCkFYWBgJCQkAJCQk2N6I7UUpxdSpU/H39+eZZ55xiFwnT560\n3Q1QUlLCmjVrCAwM1DTTnDlzyM7OJjMzk6SkJO69914SExM1//mdP3+eoqIiAIqLi0lJSSEgIEDT\nXJ6ennTp0oVDhw4BsHbtWnr27MmoUaM0/V4BfPXVV7ZmIdD299zPz48ff/yRkpISlFKsXbsWf39/\nzb9Px48fB+DYsWN8++23jB8/XvPf899dLUdYWBhJSUlYLBYyMzPJyMiw3UF3VXXdoVFT48aNU506\ndVIuLi7KYDCoRYsWqVOnTqkhQ4YoHx8fFRISok6fPm3XTJs2bVJOTk6qd+/eqk+fPqpPnz5q1apV\nmubau3evCgwMVL1791YBAQHq7bffVkopzb9XvzMajba7hrTOdOTIEdW7d2/Vu3dv1bNnTzVnzhyH\nyLVnzx7Vv39/ddttt6kxY8aowsJCzTOdO3dOdejQQZ09e9a2TOtMc+fOVf7+/qpXr14qMjJSWSwW\nzTPdeeedyt/fX/Xu3VutW7dOKaXN9+la3y/feust1a1bN9W9e3eVnJxc7fEdboYyIYQQ9uVQTUNC\nCCHsTwqBEEI0cVIIhBCiiZNCIIQQTZwUAiGEaOKkEAghRBP3/wHEnpNa62iUgwAAAABJRU5ErkJg\ngg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x3a4a5d0>"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.31 page no : 659"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "cp = 0.92;\n",
+ "cv = 0.75;\n",
+ "y = 1.22; \t\t\t#y = cp/cv\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "p2 = p1;\n",
+ "p3 = 4.; \t\t\t#bar\n",
+ "p4 = 16.; \t\t\t#bar\n",
+ "T2 = 300.; \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "T3 = T2*(p3/p2)**((y-1)/y);\n",
+ "T4 = p4/p3*T3;\n",
+ "T1 = T4/(p4/p1)**((y-1)/y);\n",
+ "\n",
+ "print (\"(i) Work done per kg of gas \")\n",
+ "Q_supplied = cv*(T4-T3);\n",
+ "Q_rejected = cp*(T1-T2);\n",
+ "\n",
+ "W = Q_supplied-Q_rejected;\n",
+ "print (\"W = %.3f\")% (W), (\"kJ/kg\")\n",
+ "\n",
+ "n = W/Q_supplied;\n",
+ "print (\"(ii) Efficiency of the cycle = %.3f\")%(n)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Work done per kg of gas \n",
+ "W = 282.900 kJ/kg\n",
+ "(ii) Efficiency of the cycle = 0.326\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.32 page no : 680"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 101.325; \t\t#kPa\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "rp = 6.;\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations\n",
+ "T2 = T1*rp**((y-1)/y);\n",
+ "T3 = 2.5*(T2-T1)/(1-1/1.668);\n",
+ "\n",
+ "# Results\n",
+ "print (\"(i) Maximum temperature in the cycle = %.3f\")% (T3), (\"K\")\n",
+ "\n",
+ "\n",
+ "T4 = T3/1.668;\n",
+ "\n",
+ "n_cycle = ((T3-T4) - (T2-T1))/(T3-T2);\n",
+ "print (\"(ii)Cycle efficiency = %.3f\")% (n_cycle)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Maximum temperature in the cycle = 1251.956 K\n",
+ "(ii)Cycle efficiency = 0.400\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.33 page no : 681"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline\n",
+ "from numpy import *\n",
+ "from matplotlib.pyplot import *\n",
+ "\n",
+ "# Variables\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "p2 = 5.; \t\t\t#bar\n",
+ "T3 = 1000.; \t\t\t#K\n",
+ "cp = 1.0425; \t\t\t#kJ/kg K\n",
+ "cv = 0.7662; \t\t\t#kJ/kg K\n",
+ "y = cp/cv;\n",
+ "\n",
+ "print (\"(i)Temperature entropy diagram\")\n",
+ "\n",
+ "# Calculations\n",
+ "s = linspace(10,50,40);\n",
+ "def fb(s):\n",
+ " return s**2\n",
+ "\n",
+ "plot(s,fb(s),'--')\n",
+ "\n",
+ "s = linspace(10,50,40);\n",
+ "\n",
+ "def fc(s):\n",
+ " return (s+30)**2\n",
+ "\n",
+ "plot(s,fc(s),'r')\n",
+ "\n",
+ "s = [12, 12];\n",
+ "T = [fb(12), fc(12)];\n",
+ "plot(s,T,'m')\n",
+ "\n",
+ "s = [45 ,45];\n",
+ "T = [fb(45), fc(45)]\n",
+ "plot(s,T,'g')\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print (\"(ii) Power required = \")\n",
+ "T4 = T3*(p1/p2)**((y-1)/y);\n",
+ "P = cp*(T3-T4);\n",
+ "print (\"P = %.3f\")% (P), (\"kW\")\n",
+ "show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Populating the interactive namespace from numpy and matplotlib\n",
+ "(i)Temperature entropy diagram\n",
+ "(ii) Power required = \n",
+ "P = 362.007 kW\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "WARNING: pylab import has clobbered these variables: ['draw_if_interactive', 'new_figure_manager']\n",
+ "`%pylab --no-import-all` prevents importing * from pylab and numpy\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAD9CAYAAABUS3cAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9c1fXd//HHMaj9cFpXk4OdY6MCwqOolKHbqlEKGk1G\n07GoFNO6dulq1qpV17V907YJ1tWWaexqjRqRibZKqCmjH9LPXWio2aL0XEUTDoeTSioqhsLn+8c7\nz1IxAYHz63m/3bhJn3M+57zOJ3n65v15/7BZlmUhIiIRZUCgCxARkf6n8BcRiUAKfxGRCKTwFxGJ\nQAp/EZEIpPAXEYlAJwz/LVu2kJKS4v8aPHgwDz30EM3NzaSnp5OYmEhGRga7du3yn5Ofn09CQgJJ\nSUlUVlb6j9fU1JCcnExCQgLz5s3rm08kIiInZOvOOP+Ojg4cDgfr1q1jyZIlfPOb3+QXv/gFixYt\n4tNPP6WgoIDa2lquueYa1q9fj8fjYeLEibjdbmw2G6mpqSxdupTU1FQyMzP52c9+xuTJk/vy84mI\nSCe61e3z0ksvER8fz7BhwygvLycvLw+AvLw8Vq1aBUBZWRm5ublER0cTFxdHfHw81dXVeL1eWlpa\nSE1NBWDGjBn+c0REpH91K/xLS0vJzc0FwOfzYbfbAbDb7fh8PgAaGxtxOp3+c5xOJx6P55jjDocD\nj8dz0h9ARES6L6qrT2xra+P5559n0aJFxzxms9mw2Wy9UlBvvY6ISCTp7ko9XW75r1mzhgsvvJAh\nQ4YAprXf1NQEgNfrJSYmBjAt+vr6ev95DQ0NOJ1OHA4HDQ0NRxx3OBzH/RDB/HXPPfcEvAbVqTpV\np2o8/NUTXQ7/5cuX+7t8ALKysiguLgaguLiY7Oxs//HS0lLa2tqoq6vD7XaTmppKbGw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vP7660c83pXrGVThb7fbaWpqAsDr9RITExPgijoXExPj\nv7g33HAD69atC3RJABw8eJCpU6cyffp0srOzgeC8pofrvO666/x1Bus1HTx4MFdeeSU1NTVBeS0P\nO1zn22+/HXTX8q233qK8vJxzzjmH3NxcXnnlFaZPnx5017OzOmfMmBF01xNg6NChAAwZMoSrrrqK\ndevWdft6BlX4Z2VlUVxcDEBxcbE/GIKN1+v1f//cc88dMRIoUCzLYvbs2bhcLm655Rb/8WC7pser\nM5iu6Y4dO/y/2re2tvLiiy+SkpISdNfyeHUeDgAI/LUEWLhwIfX19dTV1VFaWsrll19OSUlJ0F3P\nzup84okngurvJsD+/ftpaWkBYN++fVRWVpKcnNz969mrt6C74eqrr7aGDh1qRUdHW06n03rssces\nnTt3WhMmTLASEhKs9PR069NPPw1Uecets6ioyJo+fbqVnJxsjRo1yvrBD35gNTU1BbpM6/XXX7ds\nNps1evRoa8yYMdaYMWOsNWvWBN017azO1atXB9U13bx5s5WSkmKNHj3aSk5Otu677z7Lsqygu5bH\nqzOYruXRqqqq/KNogu16ftHatWv9dV533XVBdT0/+ugja/To0dbo0aOtESNGWAsXLrQsq/vXM+g2\ncxERkb4XVN0+IiLSPxT+IiIRSOEvIhKBFP4iIhFI4S8iEoEU/iIiEej/A3459qeZaRxvAAAAAElF\nTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x2d99350>"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.34 page no : 682"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m = 0.1; \t\t\t#kg/s\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "T4 = 285.; \t\t\t#K\n",
+ "p2 = 4.; \t\t\t#bar\n",
+ "cp = 1.; \t\t\t#kJ/kg K\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "T3 = T4*(p2/p1)**((y-1)/y);\n",
+ "print (\"Temperature at turbine inlet = %.3f\")% (T3), (\"K\")\n",
+ "\n",
+ "P = m*cp*(T3-T4);\n",
+ "print (\"Power developed = %.3f\")% (P), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature at turbine inlet = 423.508 K\n",
+ "Power developed = 13.851 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.35 page no : 682"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "# Variables\n",
+ "y = 1.4;\n",
+ "cp = 1.005; \t\t\t#kJ/kg K\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "T1 = 293.; \t \t\t#K\n",
+ "p2 = 3.5; \t\t \t#bar\n",
+ "T3 = 873.; \t\t\t #K\n",
+ "rp = p2/p1;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "n_cycle = 1-1/rp**((y-1)/y);\n",
+ "print (\"(i) Efficiency of the cycle = %.3f\")% (n_cycle)\n",
+ "\n",
+ "T2 = T1*(p2/p1)**((y-1)/y);\n",
+ "Q1 = cp*(T3-T2);\n",
+ "print (\"(ii) Heat supplied to air = %.3f\")%(Q1),(\"kJ/kg\")\n",
+ "\n",
+ "W = n_cycle*Q1;\n",
+ "print (\"(iii) Work available at the shaft = %.3f\")%(W),(\"kJ/kg\")\n",
+ "\n",
+ "Q2 = Q1-W;\n",
+ "print (\"(iv) Heat rejected in the cooler = %.3f\")%(Q2),(\"kJ/kg\")\n",
+ "\n",
+ "T4 = T3/rp**((y-1)/y);\n",
+ "print (\"(v) Temperature of air leaving the turbine = %.3f\")%(T4), (\"K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Efficiency of the cycle = 0.301\n",
+ "(ii) Heat supplied to air = 456.171 kJ/kg\n",
+ "(iii) Work available at the shaft = 137.253 kJ/kg\n",
+ "(iv) Heat rejected in the cooler = 318.919 kJ/kg\n",
+ "(v) Temperature of air leaving the turbine = 610.332 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.36 page no : 683"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "T1 = 303.; \t\t\t#K\n",
+ "T3 = 1073.; \t\t\t#K\n",
+ "C = 45000.; \t\t\t#kJ/kg\n",
+ "cp = 1.; \t\t\t#kJ/kg K\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations\n",
+ "T2 = math.sqrt(T1*T3);\n",
+ "T4 = T2;\n",
+ "\n",
+ "#W_turbine-W_compressor = m_f*C*n = 100;\n",
+ "\n",
+ "m_f = 100./C/(1-(T4-T1)/(T3-T2));\n",
+ "\n",
+ "# Results\n",
+ "print (\"m_f = %.6f\")%(m_f), (\"kg/s\")\n",
+ "\n",
+ "m_a = (100-m_f*(T3-T4))/(T3-T4-T2+T1);\n",
+ "print (\"m_a = %.3f\")% (m_a), (\"kg/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "m_f = 0.004742 kg/s\n",
+ "m_a = 0.414 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.37 page no : 684"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "rp = 6.25;\n",
+ "T3 = 1073.; \t\t#K\n",
+ "n_comp = 0.8;\n",
+ "n_turbine = 0.8;\n",
+ "cp = 1.005; \t\t#kJ/kg K\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "T2 = T1*(rp)**((y-1)/y);\n",
+ "\n",
+ "#Let T2' = T2a\n",
+ "T2a = (T2-T1)/n_comp + T1;\n",
+ "\n",
+ "W_comp = cp*(T2a-T1);\n",
+ "print (\"Compressor work = %.3f\")% (W_comp), (\"kJ/kg\")\n",
+ "\n",
+ "T4 = T3/rp**((y-1)/y);\n",
+ "T4a = T3-n_turbine*(T3-T4);\n",
+ "\n",
+ "W_turbine = cp*(T3-T4a);\n",
+ "print (\"Turbine work = %.3f\")% (W_turbine), (\"kJ/kg\")\n",
+ "\n",
+ "Q_s = cp*(T3-T2a);\n",
+ "print (\"Heat supplied = %.3f\")% (Q_s), (\"kJ/kg\")\n",
+ "\n",
+ "W_net = W_turbine - W_comp;\n",
+ "\n",
+ "n_cycle = W_net/Q_s*100;\n",
+ "print (\"n_cycle %.3f\")% (n_cycle), (\"%\")\n",
+ "\n",
+ "t4a = T4a-273;\n",
+ "print (\"Turbine exhaust temperature = %.3f\")% (t4a), (\"0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Compressor work = 259.322 kJ/kg\n",
+ "Turbine work = 351.644 kJ/kg\n",
+ "Heat supplied = 517.543 kJ/kg\n",
+ "n_cycle 17.839 %\n",
+ "Turbine exhaust temperature = 450.105 0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.38 page no : 685"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "n_turbine = 0.85;\n",
+ "n_compressor = 0.80;\n",
+ "T3 = 1148.; \t\t#K\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "cp = 1.; \t\t\t#kJ/kg K\n",
+ "y = 1.4;\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "p2 = 4.; \t\t\t#bar\n",
+ "C = 42000.; \t\t#kJ/kg K\n",
+ "n_cc = 0.90;\n",
+ "\n",
+ "# Calculations\n",
+ "T2 = T1*(p2/p1)**((y-1)/y);\n",
+ "T2a = (T2-T1)/n_compressor + T1;\n",
+ "ratio = 0.9*C/cp/(T3-T2a) - 1; \t\t\t#ratio = ma/mf\n",
+ "\n",
+ "# Results\n",
+ "print (\"A/F ratio = %.3f\")% (ratio)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A/F ratio = 55.778\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.39 page no : 686"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "cp = 1.005; \t\t#kJ/kg K\n",
+ "y1 = 1.4;\n",
+ "y2 = 1.333;\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "p4 = p1;\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "p2 = 6.2; \t\t\t#bar\n",
+ "p3 = p2;\n",
+ "n_compressor = 0.88;\n",
+ "C = 44186.; \t\t\t#kJ/kg\n",
+ "ratio = 0.017; \t\t\t#Fuel-air ratio; kJ/kg of air\n",
+ "n_turbine = 0.9; \t\t\n",
+ "cpg = 1.147;\n",
+ "\n",
+ "# Calculations\n",
+ "T2 = T1*(p2/p1)**((y1-1)/y1);\n",
+ "T2a = (T2-T1)/n_compressor + T1; \t\t#T2'\n",
+ "T3 = ratio*C/(1+ratio)/cp + T2a;\n",
+ "T4 = T3*(p4/p3)**((y2-1)/y2);\n",
+ "T4a = T3-n_turbine*(T3-T4);\n",
+ "W_compressor = cp*(T2a-T1);\n",
+ "W_turbine = cpg*(T3-T4a);\n",
+ "W_net = W_turbine-W_compressor;\n",
+ "Qs = ratio*C;\n",
+ "n_th = W_net/Qs*100;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Thermal efficiency = %.3f\")% (n_th), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal efficiency = 32.590 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.40 page no : 688"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "cp = 1.; \t\t\t#kJ/kg K\n",
+ "y = 1.4;\n",
+ "C = 41800.; \t\t#kJ/kg\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "T1 = 293.; \t\t\t#K\n",
+ "p2 = 4.; \t\t\t#bar\n",
+ "p4 = p1;\n",
+ "p3 = p2;\n",
+ "n_compressor = 0.80;\n",
+ "n_turbine = 0.85; \n",
+ "ratio = 90.; \t\t\t#Air-Fuel ratio\n",
+ "m_a = 3.; \t\t\t#kg/s\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i)Power developed \")\n",
+ "T2 = T1*(p2/p1)**((y-1)/y);\n",
+ "T2a = (T2-T1)/n_compressor + T1;\n",
+ "T3 = C/(1+ratio)/cp + T2a;\n",
+ "T4 = T3*(p4/p3)**((y-1)/y);\n",
+ "T4a = T3-n_turbine*(T3-T4);\n",
+ "\n",
+ "W_turbine = (ratio+1)/ratio*cp*(T3-T4a);\n",
+ "W_compressor = cp*(T2a-T1);\n",
+ "W_net = W_turbine-W_compressor;\n",
+ "Qs = 1/ratio*C;\n",
+ "\n",
+ "P = m_a*W_net;\n",
+ "print (\"Power = %.3f\")% (P), (\"kW/kg of air\")\n",
+ "\n",
+ "n_thermal = W_net/Qs;\n",
+ "print (\"(ii) Thermal efficiency of cycle = %.3f\")%(n_thermal), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Power developed \n",
+ "Power = 250.514 kW/kg of air\n",
+ "(ii) Thermal efficiency of cycle = 0.180 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.41 page no : 689"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 288.; \t\t\t#K\n",
+ "T3 = 883.; \t\t\t#K\n",
+ "rp = 6.; \t\t\t#rp = p2/p1\n",
+ "n_compressor = 0.80;\n",
+ "n_turbine = 0.82;\n",
+ "m_a = 16.; \t\t\t#kg/s\n",
+ "cp1 = 1.005; \t\t#kJ/kg K, For compression process\n",
+ "y1 = 1.4; \t\t\t# For compression process\n",
+ "cp2 = 1.11; \t\t#kJ/kg K\n",
+ "y2 = 1.333;\n",
+ "\n",
+ "# Calculations\n",
+ "T2 = T1*(rp)**((y1-1)/y1);\n",
+ "T2a = (T2-T1)/n_compressor + T1;\n",
+ "T4 = T3/rp**((y2-1)/y2);\n",
+ "T4a = T3-n_turbine*(T3-T4);\n",
+ "\n",
+ "W_compressor = cp1*(T2a-T1);\n",
+ "W_turbine = cp2*(T3-T4a);\n",
+ "W_net = W_turbine-W_compressor;\n",
+ "Power = m_a*W_net;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Power = %.3f\")%(Power), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power = 770.306 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.42 page no : 691"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "cp = 1.11;\n",
+ "T3 = 883.; \t\t\t#K\n",
+ "T2a = 529.; \t\t#K\n",
+ "W_turbine = 290.4; \t#kJ/kg\n",
+ "W_net = 48.2; \t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "Qs = cp*(T3-T2a);\n",
+ "n_thermal = W_net/Qs*100;\n",
+ "W_ratio = W_net/W_turbine; \t\t\t#Work ratio = net work output/Gross work output\n",
+ "\n",
+ "# Results\n",
+ "print (\"Thermal efficiency = %.3f\")%(n_thermal),(\"%\")\n",
+ "\n",
+ "print (\"Work ratio = %.3f\")% (W_ratio)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal efficiency = 12.267 %\n",
+ "Work ratio = 0.166\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.43 page no : 691"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "p2 = 5.; \t\t\t#bar\n",
+ "p3 = 4.9; \t\t\t#bar\n",
+ "p4 = 1.; \t\t\t#bar\n",
+ "T1 = 293.; \t\t\t#K\n",
+ "T3 = 953.; \t\t\t#K\n",
+ "n_compressor = 0.85;\n",
+ "n_turbine = 0.80;\n",
+ "n_combustion = 0.85;\n",
+ "y = 1.4;\n",
+ "cp = 1.024; \t\t\t#kJ/kg K\n",
+ "P = 1065.; \t\t\t#kW\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) The quantity of air circulation\")\n",
+ "T2 = T1*(p2/p1)**((y-1)/y);\n",
+ "T2a = (T2-T1)/n_compressor + T1;\n",
+ "T4 = T3*(p4/p3)**((y-1)/y);\n",
+ "T4a = T3-n_turbine*(T3-T4);\n",
+ "\n",
+ "W_compressor = cp*(T2a-T1);\n",
+ "W_turbine = cp*(T3-T4a);\n",
+ "W_net = W_turbine-W_compressor;\n",
+ "\n",
+ "m_a = P/W_net;\n",
+ "print (\"m_a = %.3f\")% (m_a), (\"kg\")\n",
+ "\n",
+ "\n",
+ "Qs = cp*(T3-T2a)/n_combustion;\n",
+ "print (\"(ii) Heat supplied per kg of air circulation = %.3f\")%(Qs), (\"kJ/kg\")\n",
+ "\n",
+ "n_thermal = W_net/Qs*100;\n",
+ "print (\"(iii) Thermal efficiency of the cycle = %.3f\")% (n_thermal), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The quantity of air circulation\n",
+ "m_a = 13.507 kg\n",
+ "(ii) Heat supplied per kg of air circulation = 552.664 kJ/kg\n",
+ "(iii) Thermal efficiency of the cycle = 14.267 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.44 page no : 693"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m_a = 20.; \t\t\t#kg/s\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "T3 = 1000.; \t\t#K\n",
+ "rp = 4.; \t\t\t#rp = p2/p1\n",
+ "cp = 1.; \t\t\t#kJ/kg K\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations\n",
+ "T2 = T1*(rp)**((y-1)/y);\n",
+ "T4 = T3-T2+T1;\n",
+ "r1 = (T3/T4)**(y/(y-1));\n",
+ "\n",
+ "r2 = 1./4*r1;\n",
+ "P_ratio = 1./r2; \t\t\t#Pressure ratio of low pressure turbine\n",
+ "\n",
+ "# Results\n",
+ "print (\"Pressure ratio of low pressure turbine = %.3f\")% (P_ratio)\n",
+ "\n",
+ "T5 = T4/(P_ratio)**((y-1)/y);\n",
+ "print (\"Temperature of the exhaust from the unit = %.3f\")%(T5), (\"K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure ratio of low pressure turbine = 2.304\n",
+ "Temperature of the exhaust from the unit = 672.950 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.45 page no : 694"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 288.; \t\t\t#K\n",
+ "p1 = 1.01; \t\t\t#bar\n",
+ "rp = 7.;\n",
+ "p2 = rp*p1;\n",
+ "p3 = p2;\n",
+ "p5 = p1;\n",
+ "n_compressor = 0.82;\n",
+ "n_turbine = 0.85;\n",
+ "n_turbine = 0.85;\n",
+ "T3 = 883.; \t\t\t#K\n",
+ "cpa = 1.005;\n",
+ "cpg = 1.15;\n",
+ "y1 = 1.4;\n",
+ "y2 = 1.33;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Pressure and temperature of the gases entering the power turbine \")\n",
+ "T2 = T1*rp**((y1-1)/y1);\n",
+ "T2a = (T2-T1)/n_compressor + T1;\n",
+ "W_compressor = cpa*(T2a-T1);\n",
+ "\n",
+ "T4a = (cpg*T3-W_compressor)/cpg;\n",
+ "print (\"Temperature of gases entering the power turbine = %.3f\")% (T4a), (\"K\")\n",
+ "\n",
+ "T4 = T3-(T3-T4a)/n_turbine;\n",
+ "\n",
+ "p4 = p3/(T3/T4)**(y2/(y2-1));\n",
+ "print (\"Pressure of gases entering the power turbine = %.3f\")%(p4),(\"bar\")\n",
+ "\n",
+ "print (\"(ii) Net power developed per kg/s mass flow\")\n",
+ "T5 = T4a/(p4/p5)**((y2-1)/y2);\n",
+ "T5a = T4a-n_turbine*(T4a-T5);\n",
+ "\n",
+ "W_turbine = cpg*(T4a-T5a);\n",
+ "print (\" Net power developed per kg/s mass flow = %.3f\")%(W_turbine), (\"kW\")\n",
+ "\n",
+ "\n",
+ "W_ratio = W_turbine/(W_turbine+W_compressor);\n",
+ "print (\"(iii) Work ratio = %.3f\")% (W_ratio)\n",
+ "\n",
+ "\n",
+ "print (\"(iv) Thermal efficiency of the unit\")\n",
+ "Qs = cpg*(T3-T2a);\n",
+ "n_thermal = W_turbine/Qs*100;\n",
+ "print (\"n_thermal = %.3f\")% (n_thermal), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Pressure and temperature of the gases entering the power turbine \n",
+ "Temperature of gases entering the power turbine = 654.751 K\n",
+ "Pressure of gases entering the power turbine = 1.640 bar\n",
+ "(ii) Net power developed per kg/s mass flow\n",
+ " Net power developed per kg/s mass flow = 72.519 kW\n",
+ "(iii) Work ratio = 0.216\n",
+ "(iv) Thermal efficiency of the unit\n",
+ "n_thermal = 18.890 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.46 page no : 696"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 288.; \t\t\t#K\n",
+ "rp = 4.; \t\t\t#rp = p2/p1 = p3/p4\n",
+ "n_compressor = 0.82;\n",
+ "e = 0.78; \t\t\t#Effectiveness of the heat exchanger\n",
+ "n_turbine = 0.70;\n",
+ "T3 = 873.; \t\t\t#K\n",
+ "y = 1.4;\n",
+ "R = 0.287;\n",
+ "\n",
+ "# Calculations\n",
+ "T2 = T1*(rp)**((y-1)/y);\n",
+ "T2a = (T2-T1)/n_compressor + T1;\n",
+ "T4 = T3/rp**((y-1)/y);\n",
+ "T4a = T3-n_turbine*(T3-T4);\n",
+ "\n",
+ "cp = R*y/(y-1);\n",
+ "W_compressor = cp*(T2a-T1);\n",
+ "W_turbine = cp*(T3-T4a);\n",
+ "W_net = W_turbine-W_compressor;\n",
+ "\n",
+ "T5 = e*(T4a-T2a) + T2a;\n",
+ "Qs = cp*(T3-T5);\n",
+ "\n",
+ "n_cycle = W_net/Qs*100;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Efficiency = %.3f\")% (n_cycle), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Efficiency = 11.808 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.47 page no : 698"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p2 = 4.; \t\t\t#bar\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "T1 = 293.;\n",
+ "n_compressor = 0.8;\n",
+ "n_turbine = 0.85;\n",
+ "ratio = 90.; \t\t\t#Air Fuel ratio\n",
+ "C = 41800.; \t\t\t#kJ/kg\n",
+ "cp = 1.024;\n",
+ "p4 = 1.01; \t\t\t#bar\n",
+ "p3 = 3.9; \t\t\t#bar\n",
+ "y = 1.4;\n",
+ "e = 0.72; \t\t\t#thermal ratio\n",
+ "\n",
+ "# Calculations and Results\n",
+ "T2 = T1*(p2/p1)**((y-1)/y);\n",
+ "T2a = (T2-T1)/n_compressor + T1;\n",
+ "T3 = C/cp/(ratio+1)+471;\n",
+ "T4 = T3*(p4/p3)**((y-1)/y);\n",
+ "T4a = T3-n_turbine*(T3-T4);\n",
+ "n_thermal1 = ((T3-T4a)-(T2a-T1))/(T3-T2a)*100;\n",
+ "\n",
+ "print (\"Thermal efficiency of simple cycle = %.3f\")% (n_thermal1), (\"%\")\n",
+ "\n",
+ "\n",
+ "T2a = 471.; \t\t\t# K (as for simple cycle)\n",
+ "T3 = 919.5; \t\t\t# K (as for simple cycle)\n",
+ "p3 = 4.04-0.14-0.05; \t\t\t#bar\n",
+ "p4 = 1.01+0.05; \t\t\t#bar\n",
+ "\n",
+ "T4 = T3*(p4/p3)**((y-1)/y);\n",
+ "T4a = T3-n_turbine*(T3-T4);\n",
+ "T5 = e*(T4a-T2a) + T2a;\n",
+ "n_thermal2 = ((T3-T4a) - (T2a-T1))/(T3-T5)*100;\n",
+ "\n",
+ "print (\"Thermal efficiency of heat exchanger cycle = %.3f\")%(n_thermal2), (\"%\")\n",
+ "\n",
+ "dn = n_thermal2-n_thermal1;\n",
+ "print (\"Increase in thermal efficiency = %.3f\")% (dn), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal efficiency of simple cycle = 16.120 %\n",
+ "Thermal efficiency of heat exchanger cycle = 21.038 %\n",
+ "Increase in thermal efficiency = 4.918 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.48 page no : 700"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 293.; \t\t\t#K\n",
+ "T6 = 898.; \t\t\t#K\n",
+ "T8 = T6;\n",
+ "n_c = 0.8; \t\t\t#Efficiency of each compressor stage\n",
+ "n_t = 0.85; \t\t\t#Efficiency of each turbine stage\n",
+ "n_mech = 0.95;\n",
+ "e = 0.8;\n",
+ "cpa = 1.005; \t\t\t#kJ/kg K\n",
+ "cpg = 1.15; \t\t\t#kJ/kg K\n",
+ "y1 = 1.4;\n",
+ "y2 = 1.333;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Thermal efficiency\")\n",
+ "T3 = T1;\n",
+ "\n",
+ "# p2/p1 = math.sqrt(9) = 3\n",
+ "T2 = T1*(3)**((y1-1)/y1);\n",
+ "T2a = (T2-T1)/n_c + T1;\n",
+ "T4a = T2a;\n",
+ "W_c = cpa*(T2a-T1); \t\t\t#Work input per compressor stage\n",
+ "W_t = 2*W_c/n_mech; \t\t\t#Work output of H.P. turbine\n",
+ "T7a = T6-W_t/cpg;\n",
+ "T7 = T6-(T6-T7a)/n_t;\n",
+ "\n",
+ "T9 = T8/(1.86)**((y2-1)/y2);\n",
+ "T9a = T8-n_t*(T8-T9);\n",
+ "\n",
+ "W = cpg*(T8-T9a)*n_mech; \t\t\t#Net work output\n",
+ "T5 = e*(T9a-T4a)+T4a;\n",
+ "\n",
+ "Q = cpg*(T6-T5)+cpg*(T8-T7a); \t\t\t#Heat supplied\n",
+ "n_thermal = W/Q*100;\n",
+ "\n",
+ "print (\"n_thermal = %.3f\")% (n_thermal), (\"%\")\n",
+ "\n",
+ "print (\"(ii) Work ratio\")\n",
+ "Gross_work = W_t+W/n_mech;\n",
+ "W_ratio = W/Gross_work;\n",
+ "print (\"Work ratio = %.3f\")% (W_ratio)\n",
+ "\n",
+ "m = 4500./W;\n",
+ "print (\"(iii) Mass flow rate = %.3f\")%(m), (\"kg/s\")\n",
+ "\n",
+ "# Note : answers are different because of rounding error.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Thermal efficiency\n",
+ "n_thermal = 24.209 %\n",
+ "(ii) Work ratio\n",
+ "Work ratio = 0.291\n",
+ "(iii) Mass flow rate = 37.576 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 13.49 page no : 704"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "T1 = 293.; \t\t\t#K\n",
+ "T5 = 1023.; \t\t#K\n",
+ "T7 = T5;\n",
+ "p1 = 1.5; \t\t\t#bar\n",
+ "p2 = 6.; \t\t\t#bar\n",
+ "n_c = 0.82;\n",
+ "n_t = 0.82;\n",
+ "e = 0.70;\n",
+ "P = 350.; \t\t\t#kW\n",
+ "cp = 1.005; \t\t#kJ/kg K\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations\n",
+ "T3 = T1;\n",
+ "px = math.sqrt(p1*p2);\n",
+ "T2 = T1*(px/p1)**((y-1)/y);\n",
+ "T2a = T1+(T2-T1)/n_c;\n",
+ "T4a = T2a;\n",
+ "p5 = p2;\n",
+ "T6 = T5/(p5/px)**((y-1)/y);\n",
+ "T6a = T5-n_t*(T5-T6);\n",
+ "T8a = T6a;\n",
+ "Ta = T4a+e*(T8a-T4a);\n",
+ "W_net = 2*cp*((T5-T6a)-(T2a-T1));\n",
+ "Q1 = cp*(T5-T4a)+cp*(T7-T6a); \t\t\t#Without regenerator\n",
+ "Q2 = cp*(T5-Ta)+cp*(T7-T6a);\n",
+ "\n",
+ "# Results\n",
+ "n1 = W_net/Q1*100;\n",
+ "print (\"n_thermal without regenerator = %.3f\")%(n1), (\"%\")\n",
+ "\n",
+ "n2 = W_net/Q2*100;\n",
+ "print (\"n_thermal woth regenerator = %.3f\")% (n2), (\"%\")\n",
+ "\n",
+ "m = P/W_net;\n",
+ "print (\"(iii) Mass of fluid circulated = %.3f\")% (m), (\"kg/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "n_thermal without regenerator = 18.059 %\n",
+ "n_thermal woth regenerator = 32.079 %\n",
+ "(iii) Mass of fluid circulated = 2.403 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch14.ipynb b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch14.ipynb
new file mode 100755
index 00000000..7a0c3298
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch14.ipynb
@@ -0,0 +1,1470 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 14 : Refrigeration Cycles"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.1 page no : 717"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T2 = 235; \t\t\t#K\n",
+ "P = 1.3; \t\t\t#kW\n",
+ "\n",
+ "# Calculations and Results\n",
+ "COP = 14000./P/60./60.;\n",
+ "print (\"(i) C.O.P. of Carnot refrigerator = %.3f\")% (COP)\n",
+ "\n",
+ "T1 = T2/COP + T2;\n",
+ "t1 = T1-273;\n",
+ "print (\"(ii) Higher temperature of the cycle = %.3f\")% (t1), (\"0C\")\n",
+ "\n",
+ "print (\"(iii) Heat delivered as heat pump\")\n",
+ "Qabs = 14000./60; \t\t\t#Heat absorbed\n",
+ "W = P*60;\n",
+ "Q = Qabs+W;\n",
+ "print (\"Q = %.3f\")% (Q), (\"kJ/min\")\n",
+ "\n",
+ "COP = Q/W;\n",
+ "print (\"COP of heat pump = %.3f\")% (COP)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) C.O.P. of Carnot refrigerator = 2.991\n",
+ "(ii) Higher temperature of the cycle = 40.557 0C\n",
+ "(iii) Heat delivered as heat pump\n",
+ "Q = 311.333 kJ/min\n",
+ "COP of heat pump = 3.991\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.2 page no : 718"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 308.; \t\t \t #K\n",
+ "T2 = 258.; \t\t\t #K\n",
+ "capacity = 12.; \t\t\t#tonne\n",
+ "\n",
+ "# Calculations and Results\n",
+ "COP = T2/(T1-T2);\n",
+ "print (\"(i) Co-efficient of performance = \"), (COP)\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Heat rejected from the system per hour\")\n",
+ "W = capacity*14000./5.16;\n",
+ "Q = capacity*14000.+W;\n",
+ "print (\"Q = %.3f\")% (Q), (\"kJ/h\")\n",
+ "\n",
+ "P = W/60./60.;\n",
+ "print (\"(iii) Power required = %.3f\")% (P),(\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Co-efficient of performance = 5.16\n",
+ "(ii) Heat rejected from the system per hour\n",
+ "Q = 200558.140 kJ/h\n",
+ "(iii) Power required = 9.044 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.3 page no : 718"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T2 = 268.; \t\t\t#K\n",
+ "T1 = 308.; \t\t\t#K\n",
+ "Q = 29.; \t\t\t#Heat leakage from the surroundings into the cold storage in kW\n",
+ "\n",
+ "# Calculations\n",
+ "COP_ideal = T2/(T1-T2);\n",
+ "COP_actual = 1./3*COP_ideal;\n",
+ "W = Q/COP_actual;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Power required = %.3f\")%(W), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power required = 12.985 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.4 page no : 719"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 293.; \t\t\t#K\n",
+ "T2 = 265.; \t\t\t#K\n",
+ "T0 = 273.; \t\t\t#K\n",
+ "L = 335.; \t\t\t#Latent heat of ice in kJ/kg\n",
+ "cpw = 4.18;\n",
+ "\n",
+ "# Calculations\n",
+ "COP = T2/(T1-T2);\n",
+ "Rn = cpw*(T1-T0)+L;\n",
+ "m_ice = COP*3600./Rn;\n",
+ "\n",
+ "# Results\n",
+ "print (\"ice formed per kWh = %.3f\")% (m_ice), (\"kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ice formed per kWh = 81.394 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.5 page no : 719"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 291.; \t\t\t#K\n",
+ "T2 = 265.; \t\t\t#K\n",
+ "T0 = 273.; \t\t\t#K\n",
+ "cpw = 4.18; \t\t#kJ/kg\n",
+ "cpi = 2.09; \t\t#kJ/kg\n",
+ "L = 334.; \t\t\t#kJ/kg\n",
+ "m = 400.; \t\t\t#kg\n",
+ "\n",
+ "# Calculations\n",
+ "COP = T2/(T1-T2);\n",
+ "Rn = cpw*(T1-T0) + L + cpi*(T0-T2);\n",
+ "W = Rn*m/COP/3600; \t\t\t#kJ/s\n",
+ "\n",
+ "# Results\n",
+ "print (\"Least power = %.3f\")% (W), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Least power = 4.644 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.6 page no : 720"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "cpw = 4.18; \t\t\t#kJ/kg\n",
+ "\n",
+ "print (\"(i) Quantity of ice produced\")\n",
+ "t = 20.; \t\t\t#0C\n",
+ "L = 335.; \t\t\t#kJ/kg\n",
+ "capacity = 280.; \t#tonnes\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Q1 = cpw*t + L; \t\t\t#Heat to be extracted per kg of water (to form ice at 0\u00b0C)\n",
+ "Rn = capacity*14000; \t\t#kJ/h\n",
+ "m_ice = Rn*24./Q1/1000;\n",
+ "\n",
+ "print (\"Quantity of ice produced in 24 hours = %.3f\")% (m_ice), (\"tonnes\")\n",
+ "\n",
+ "print (\"(ii) Minimum power required = \"),\n",
+ "T1 = 298.; \t\t\t#K\n",
+ "T2 = 263.; \t\t\t#K\n",
+ "\n",
+ "COP = T2/(T1-T2);\n",
+ "W = Rn/COP/3600.; \t\t\t#kJ/s\n",
+ "print (\"Power required = %.3f\")% (W), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Quantity of ice produced\n",
+ "Quantity of ice produced in 24 hours = 224.749 tonnes\n",
+ "(ii) Minimum power required = Power required = 144.909 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.7 page no : 720"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "cp1 = 1.25; \t\t\t#kJ/kg 0C\n",
+ "cp2 = 2.93; \t\t\t#kJ/kg 0C\n",
+ "L = 232. \t\t\t#kJ/kg\n",
+ "T1 = -3. \t \t\t#0C\n",
+ "T2 = -8. \t\t \t#0C\n",
+ "T3 = 25. \t\t\t #0C\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Q1 = cp2*(T3-T1) + L + cp1*(T1-T2); \t\t\t#Heat removed in 8 hours from each kg of fish\n",
+ "Q = Q1*20*1000./8 \t\t\t#Heat removed by the plant /min\n",
+ "\n",
+ "capacity = Q/14000.; \t\t\t#tonnes\n",
+ "print (\"(i) Capacity of the refrigerating plant = %.3f\")% (capacity), (\"tonnes\")\n",
+ "\n",
+ "print (\"(ii) Carnot cycle C.O.P. between this temperature range.\")\n",
+ "T1 = 298.; \t\t\t#K\n",
+ "T2 = 265.; \t\t\t#K\n",
+ "\n",
+ "COP = T2/(T1-T2);\n",
+ "print (\"COP of reversed carnot cycle = %.3f\")% (COP)\n",
+ "\n",
+ "\n",
+ "print (\"(iii) Power required\")\n",
+ "COP_actual = 1./3*COP;\n",
+ "W = Q/COP_actual/3600; \t\t\t#kJ/s\n",
+ "\n",
+ "print (\"Power = %.3f\")% (W), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Capacity of the refrigerating plant = 57.195 tonnes\n",
+ "(ii) Carnot cycle C.O.P. between this temperature range.\n",
+ "COP of reversed carnot cycle = 8.030\n",
+ "(iii) Power required\n",
+ "Power = 83.094 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.8 page no : 721"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 1273.; \t\t#K\n",
+ "T2 = 298.; \t\t\t#K\n",
+ "T3 = 268.; \t\t\t#K\n",
+ "T4 = 298.; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "#Let Q2/Q1 = r1, r2 = Q3/Q4;\n",
+ "r1 = 298./1273; \t\t#Q2/Q1\n",
+ "r2 = 268./298; \t\t\t#Q3/Q4\n",
+ "\n",
+ "#Let Q4/Q1 = r\n",
+ "r = (1.-r1)/(1-r2);\n",
+ "\n",
+ "# Results\n",
+ "print (\"The ratio in which the heat pump and heat engine share the heating load = %.3f\")% (r)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ratio in which the heat pump and heat engine share the heating load = 7.608\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.9 page no : 724"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "y = 1.4;\n",
+ "n = 1.35;\n",
+ "cp = 1.003; \t\t#kJ/kg K\n",
+ "p2 = 1.; \t\t\t#bar\n",
+ "p1 = 8.; \t\t\t#bar\n",
+ "T3 = 282.; \t\t\t#K\n",
+ "T4 = 302.; \t\t\t#K\n",
+ "T1 = T4;\n",
+ "\n",
+ "# Calculations\n",
+ "T4 = T3*(p1/p2)**((n-1)/n);\n",
+ "T2 = T1*(p2/p1)**((n-1)/n);\n",
+ "Q1 = cp*(T3-T2); \t\t\t#Heat extracted from cold chamber per kg of air\n",
+ "Q2 = cp*(T4-T1); \t\t\t#Heat rejected in the cooling chamber per kg of air\n",
+ "cv = cp/y;\n",
+ "R = cp-cv;\n",
+ "W = n/(n-1)*R*((T4-T3) - (T1-T2));\n",
+ "COP = Q1/W;\n",
+ "\n",
+ "# Results\n",
+ "print (\"COP = %.3f\")% (COP)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "COP = 1.270\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.10 page no : 726"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 1000.; \t\t\t#kPa\n",
+ "p2 = 100. \t\t\t#kPa\n",
+ "p4 = p1;\n",
+ "p3 = p2;\n",
+ "E = 2000. \t\t\t# Refrigerating effect produced in kJ/min \n",
+ "T3 = 268.; \t \t\t#K\n",
+ "T1 = 303.; \t\t \t#K\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Mass of air circulated per minute\")\n",
+ "T2 = T1*(p2/p1)**((y-1)/y);\n",
+ "e = cp*(T3-T2); \t\t\t#Refrigerating effect per kg; kJ/kg\n",
+ "\n",
+ "m = E/e;\n",
+ "print (\"m = %.3f\")% (m), (\"kg/min\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Compressor work (Wcomp.), expander work (Wexp.) and cycle work (Wcycle)\")\n",
+ "T4 = T3*(p4/p3)**((y-1)/y);\n",
+ "\n",
+ "Wcomp = y/(y-1)*m*R*(T4-T3);\n",
+ "print (\"Compressor work = %.3f\")% (Wcomp), (\"kJ/min\")\n",
+ "\n",
+ "Wexp = y/(y-1)*m*R*(T1-T2);\n",
+ "print (\"Expander work = %.3f\")% (Wexp), (\"kJ/min\")\n",
+ "\n",
+ "W_cycle = Wcomp-Wexp;\n",
+ "print (\"Wcycle = %.3f\")% (W_cycle), (\"kJ/min\")\n",
+ "\n",
+ "\n",
+ "print (\"(iii) C.O.P. and power required\")\n",
+ "COP = E/W_cycle;\n",
+ "print (\"COP = %.3f\")% (COP)\n",
+ "\n",
+ "P = W_cycle/60;\n",
+ "print (\"Power required = %.3f\")% (P), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Mass of air circulated per minute\n",
+ "m = 17.954 kg/min\n",
+ "(ii) Compressor work (Wcomp.), expander work (Wexp.) and cycle work (Wcycle)\n",
+ "Compressor work = 4491.675 kJ/min\n",
+ "Expander work = 2630.279 kJ/min\n",
+ "Wcycle = 1861.395 kJ/min\n",
+ "(iii) C.O.P. and power required\n",
+ "COP = 1.074\n",
+ "Power required = 31.023 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.11 page no : 727"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "y = 1.4;\n",
+ "cp = 1.003; \t\t#kJ/kg K\n",
+ "T3 = 289.; \t\t\t#K\n",
+ "T1 = 314.; \t\t\t#K\n",
+ "p1 = 5.2; \t\t\t#bar\n",
+ "p2 = 1.; \t\t\t#bar\n",
+ "capacity = 6.; \t\t#tonnes\n",
+ "R = 287.; \t\t\t#J/kg K\n",
+ "l = 0.2; \t\t\t#m\n",
+ "\n",
+ "# Calculations and Results\n",
+ "T4 = T3*(p1/p2)**((y-1)/y);\n",
+ "T2 = T1*(p2/p1)**((y-1)/y);\n",
+ "\n",
+ "COP = T2/(T1-T2);\n",
+ "print (\"(i) C.O.P. = %.3f\")%(COP)\n",
+ "\n",
+ "e = cp*(T3-T2); \t\t\t#Refrigerating effect per kg of air\n",
+ "E = capacity*14000; \t\t#Refrigerating effect produced by the refrigerating machine in kJ/h\n",
+ "\n",
+ "m = E/e/60;\n",
+ "print (\"(ii)mass of air in circulation = %.3f\")%(m),(\"kg/min\")\n",
+ "\n",
+ "\n",
+ "V3 = m*R*T3/p2/10**5;\n",
+ "print (\"(iii)Piston displacement of compressor\"),(\" = %.2f\")%(V3),(\"m^3/min\")\n",
+ "\n",
+ "V_swept = V3/2/240;\n",
+ "\n",
+ "\n",
+ "V2 = m*R*T2/p2/10**5;\n",
+ "V_swept = V2/2/240;\n",
+ "print (\"Piston displacement of expander\"),(\" = %.3f\")%(V2),(\"m^3/min\")\n",
+ "\n",
+ "d_c = math.sqrt(V_swept/l/math.pi*4);\n",
+ "print (\"(iv)Diameter or bore of the expander cylinder = %.0f\")%(d_c*1000), (\"mm\")\n",
+ "\n",
+ "d_c = math.sqrt(V_swept/l/math.pi*4);\n",
+ "print (\"Diameter or bore of the compressor cylinder = %.0f\")%(d_c*1000),(\"mm\")\n",
+ "\n",
+ "W = capacity*14000/COP/3600;\n",
+ "print (\"(v) Power required to drive the unit\"),(\" = %.3f\")%(W),(\"kW\")\n",
+ "\n",
+ "# Answers are slightly different because of rounding error."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) C.O.P. = 1.662\n",
+ "(ii)mass of air in circulation = 15.016 kg/min\n",
+ "(iii)Piston displacement of compressor = 12.45 m^3/min\n",
+ "Piston displacement of expander = 8.449 m^3/min\n",
+ "(iv)Diameter or bore of the expander cylinder = 335 mm\n",
+ "Diameter or bore of the compressor cylinder = 335 mm\n",
+ "(v) Power required to drive the unit = 14.039 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.12 page no : 744"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m = 6.; \t\t\t#kg/min\n",
+ "n_relative = 0.50; \n",
+ "cpw = 4.187; \t\t\t#kJ/kg K\n",
+ "L = 335.; \t\t\t#kJ/kg\n",
+ "\n",
+ "h_f2 = 31.4; \t\t\t#kJ/kg\n",
+ "h_fg2 = 154.; \t\t\t#kJ/kg\n",
+ "h_f3 = 59.7; \t\t\t#kJ/kg\n",
+ "h_fg3 = 138.; \t\t\t#kJ/kg\n",
+ "h_f4 = 59.7; \t\t\t#kJ/kg\n",
+ "x2 = 0.6;\n",
+ "s_f3 = 0.2232; \t\t\t#kJ/kg K\n",
+ "s_f2 = 0.1251; \t\t\t#kJ/kg K\n",
+ "T2 = 268.; \t\t\t#K\n",
+ "T3 = 298.; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "h2 = h_f2+x2*h_fg2;\n",
+ "x3 = ((s_f2-s_f3)+x2*(h_fg2/T2))*T3/h_fg3;\n",
+ "h3 = h_f3+x3*h_fg3;\n",
+ "h1 = h_f4;\n",
+ "COP_th = (h2-h1)/(h3-h2); \t\t\t#Theoritical COP\n",
+ "COP = n_relative*COP_th;\n",
+ "Q = cpw*(20-0) + L; \t\t\t#Heat extracted from 1 kg of water at 20\u00b0C for the formation of 1 kg of ice at 0\u00b0C\n",
+ "m_ice = COP*m*(h3-h2)/Q*60*24/1000; \t\t\t#in 24 hours\n",
+ "\n",
+ "# Results\n",
+ "print (\"m_ice = %.3f\")%(m_ice), (\"tonnes\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "m_ice = 0.661 tonnes\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.13 page no : 745"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "L = 335.; \t\t\t #kJ/kg\n",
+ "h3 = 1319.22; \t\t\t#kJ/kg\n",
+ "h1 = 100.04; \t\t\t#kJ/kg\n",
+ "h4 = h1;\n",
+ "s_f2 = -2.1338; \t\t#kJ/kg K\n",
+ "s_g2 = 5.0585; \t\t\t#kJ/kg K\n",
+ "s_g3 = 4.4852; \t\t\t#kJ/kg K\n",
+ "h_f2 = -54.56; \t\t\t#kJ/kg\n",
+ "h_g2 = 1304.99; \t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "x2 = (s_g3-s_f2)/(s_g2-s_f2);\n",
+ "h2 = h_f2+x2*(h_g2-h_f2);\n",
+ "COP_theoritical = (h2-h1)/(h3-h2);\n",
+ "COP_actual = 0.62*COP_theoritical;\n",
+ "RE = COP_actual*(h3-h2); \t\t\t#Actual refrigerating effect per kg\n",
+ "Q = 28.*1000.*L/24./3600; \t\t\t#Heat to be extracted per second\n",
+ "m = Q/RE; \t\t\t#Mass of refrigerant circulated per second\n",
+ "W = m*(h3-h2);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Power required = %.3f\")%(W), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power required = 19.577 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.14 page no : 747"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h_f2 = 158.2; \t\t\t#kJ/kg\n",
+ "x2 = 0.62;\n",
+ "h_fg2 = 1280.8;\n",
+ "h1 = 298.9; \t\t\t#kJ/kg\n",
+ "h_f4 = h1;\n",
+ "s_f2 = 0.630; \t\t\t#kJ/kg K\n",
+ "T2 = 268.; \t\t\t #K\n",
+ "T3 = 298.; \t\t\t #K\n",
+ "s_f3 = 1.124; \t\t\t#kJ/kg K\n",
+ "h_fg3 = 1167.1; \t\t#kJ/kg\n",
+ "m = 6.4; \t\t\t #kg/min\n",
+ "cp = 4.187;\n",
+ "L = 335.; \t\t\t #kJ/kg\n",
+ "h_f3 = 298.9; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "h2 = h_f2+x2*h_fg2;\n",
+ "x3 = ((s_f2-s_f3)+x2*h_fg2/T2)/h_fg3*T3;\n",
+ "h3 = h_f3+x3*h_fg3;\n",
+ "COP_theoritical = (h2-h1)/(h3-h2);\n",
+ "COP_actual = 0.55*COP_theoritical;\n",
+ "W1 = 81.87 #h3-h2; \t\t\t#Work done per kg of refrigerant\n",
+ "\n",
+ "W = m*W1/60; \t\t\t#Work done per second kJ/s\n",
+ "Q = round(15*cp+L,1);\n",
+ "m_ice = W*3600.*24/Q;\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print (\"Amount of ice formed in 24 hours = %.3f\")% (m_ice), (\"kg\")\n",
+ "\n",
+ "# Note : Answer is slightly different because of rounding error."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amount of ice formed in 24 hours = 1896.717 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.15 page no : 748"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "RE = 5*14000./3600; \t#Total refrigeration produced in kg/s\n",
+ "h2 = 183.19; \t\t\t#kJ/kg\n",
+ "h3 = 209.41; \t\t\t#kJ/kg\n",
+ "h4 = 74.59; \t\t\t#kJ/kg\n",
+ "h1 = h4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "RE_net = h2-h1; \t\t\t#Net refrigerating effect produced per kg\n",
+ "m = RE/RE_net; \n",
+ "print (\"(i) The refrigerant flow rate\"),(\" = %.3f\")% (m), (\"kg/s\")\n",
+ "\n",
+ "\n",
+ "COP = (h2-h1)/(h3-h2);\n",
+ "print (\"(ii) The C.O.P. = %.3f\")% (COP)\n",
+ "\n",
+ "\n",
+ "P = m*(h3-h2);\n",
+ "print (\"(iii) The power required to drive the compressor = %.3f\")%(P), (\"kW\")\n",
+ "\n",
+ "rate = m*(h3-h4);\n",
+ "print (\"(iv) The rate of heat rejection to the condenser = %.3f\")%(rate),(\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The refrigerant flow rate = 0.179 kg/s\n",
+ "(ii) The C.O.P. = 4.142\n",
+ "(iii) The power required to drive the compressor = 4.695 kW\n",
+ "(iv) The rate of heat rejection to the condenser = 24.139 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.16 page no : 749"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print (\"(iii)\")\n",
+ "\n",
+ "# Variables\n",
+ "h2 = 344.927; \t\t\t#kJ/kg\n",
+ "h4 = 228.538; \t\t\t#kJ/kg\n",
+ "h1 = h4;\n",
+ "cpv = 0.611; \t\t\t#/kJ/kg0C\n",
+ "# s2 = s3\n",
+ "t3 = 39.995; \t\t\t#0C\n",
+ "\n",
+ "# Calculations\n",
+ "h3 = 363.575+cpv*(t3-30);\n",
+ "Rn = h2-h1;\n",
+ "W = h3-h2;\n",
+ "COP = Rn/W;\n",
+ "\n",
+ "# Results\n",
+ "print (\"COP = %.3f\")% (COP)\n",
+ "\n",
+ "cp = 2.0935; \t\t\t#kJ/kg 0C\n",
+ "Q = 2400./24./3600*(4.187*(15-0)+335+cp*(0-(-5)))\n",
+ "\n",
+ "W = Q/COP;\n",
+ "print (\"Work required = %.3f\")% (W), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(iii)\n",
+ "COP = 4.702\n",
+ "Work required = 2.412 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.17 page no : 751"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h2 = 352.; \t\t\t#kJ/kg\n",
+ "h3 = 374.; \t\t\t#kJ/kg\n",
+ "h4 = 221.; \t\t\t#kJ/kg\n",
+ "h1 = h4;\n",
+ "v2 = 0.08; \t\t\t#m**3/kg\n",
+ "rpm = 500.;\n",
+ "D = 0.2;\n",
+ "L = 0.15;\n",
+ "n_vol = 0.85;\n",
+ "\n",
+ "# Calculations\n",
+ "RE = h2-h1;\n",
+ "V = math.pi/4*D**2*L*rpm*2*n_vol;\n",
+ "m = V/v2;\n",
+ "\n",
+ "# Results\n",
+ "print (\"(ii)Mass of refrigerant circulated per minute = %.3f\")% (m), (\"kg/min\")\n",
+ "\n",
+ "cc = 50.*(h2-h1)*60./14000.;\n",
+ "print (\"(iii) Cooling capacity in tonnes of refrigeration = %.3f\")%(cc), (\"TR\")\n",
+ "\n",
+ "COP = (h2-h1)/(h3-h2);\n",
+ "print (\"(iv)COP = %.3f\")% (COP)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(ii)Mass of refrigerant circulated per minute = 50.069 kg/min\n",
+ "(iii) Cooling capacity in tonnes of refrigeration = 28.071 TR\n",
+ "(iv)COP = 5.955\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.18 page no : 751"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "te = -10.; \t\t\t#0C\n",
+ "tc = 40.; \t\t\t#0C\n",
+ "h3 = 220.; \t\t\t#kJ/kg\n",
+ "h2 = 183.1; \t\t\t#kJ/kg\n",
+ "h1 = 74.53; \t\t\t#kJ/kg\n",
+ "h_f4 = 26.85; \t\t\t#kJ/kg\n",
+ "m = 1.; \t\t\t#kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "COP = (h2-h1)/(h3-h2);\n",
+ "print (\"(i) The C.O.P. the cycle = %.3f\")%(COP)\n",
+ "\n",
+ "RC = m*(h2-h1);\n",
+ "print (\"(ii) Refrigerating capacity = %.3f\")%(RC),(\"kJ/min\")\n",
+ "\n",
+ "CP = m*(h3-h2)/60;\n",
+ "print (\"Compressor power = %.3f\")% (CP), (\"kJ/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The C.O.P. the cycle = 2.942\n",
+ "(ii) Refrigerating capacity = 108.570 kJ/min\n",
+ "Compressor power = 0.615 kJ/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.19 page no : 752"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "h2 = 178.61; \t\t\t#kJ/kg\n",
+ "h3a = 203.05; \t\t\t#kJ/kg\n",
+ "h_f4 = 74.53; \t\t\t#kJ/kg\n",
+ "h1 = h_f4;\n",
+ "s3a = 0.682; \t\t\t#kJ/kg K\n",
+ "s2 = 0.7082; \t\t\t#kJ/kg K\n",
+ "cp = 0.747; \t\t\t#kJ/kg K\n",
+ "T3a = 313.; \t\t\t#K\n",
+ "CE = 20.; \t\t\t #Cooling effect\n",
+ "C = 0.03;\n",
+ "v_g = 0.1088;\n",
+ "p_d = 9.607;\n",
+ "p_s = 1.509;\n",
+ "n = 1.13;\n",
+ "\n",
+ "# Calculations\n",
+ "m = CE/(h2-h1);\n",
+ "T3 = T3a*math.e**((s2-s3a)/cp)\n",
+ "h3 = h3a+cp*(T3-T3a);\n",
+ "P = m*(h3-h2);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Power required by the machine = %.3f\")%(P), (\"kW\")\n",
+ "\n",
+ "n_vol = 1+C-C*(p_d/p_s)**(1./n); \t\t\t#Volumetric efficiency\n",
+ "V1 = m*v_g; \t\t\t #volume of refrigerant at the intake conditions\n",
+ "V_swept = V1/n_vol;\n",
+ "\n",
+ "V = V_swept*60./300;\n",
+ "print (\"Piston print lacement = %.5f\")% (V), (\"m**3\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power required by the machine = 6.300 kW\n",
+ "Piston print lacement = 0.00478 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.20 page no : 754"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "h2 = 1450.22; \t\t\t#kJ/kg\n",
+ "h3a = 1488.57; \t\t\t#kJ/kg\n",
+ "h_f4 = 366.072; \t\t#kJ/kg\n",
+ "cpl2 = 4.556; \t\t\t#kJ/kg K\n",
+ "cpv1 = 2.492; \t\t\t#kJ/kg K\n",
+ "cpv2 = 2.903; \t\t\t#kJ/kg K\n",
+ "T1 = 303.; \t\t\t #K\n",
+ "T2 = 308.; \t\t\t #K\n",
+ "s3a = 5.2086; \t\t\t#kJ/kg K\n",
+ "s2 = 5.755; \t\t\t#kJ/kg K\n",
+ "T3a = 308.; \t\t\t#K\n",
+ "N = 1000.;\n",
+ "\n",
+ "# Calculations\n",
+ "h_f4a = h_f4-cpl2*(T2-T1);\n",
+ "h1 = h_f4a;\n",
+ "T3 = T3a*math.e**((s2-s3a)/cpv2);\n",
+ "h3 = h3a+cpv2*(T3-T3a);\n",
+ "m = 50./(h2-h1);\n",
+ "\n",
+ "# Results\n",
+ "P = m*(h3-h2);\n",
+ "print (\"(i) Power required = %.3f\")%(P), (\"kW\")\n",
+ "\n",
+ "print (\"(ii) Cylinder dimensions \")\n",
+ "D = (m*4*60/math.pi/1.2/N/0.417477)**(1./3);\n",
+ "print (\"Diameter of cylinder = %.3f\")% (D), (\"m\")\n",
+ "\n",
+ "L = 1.2*D;\n",
+ "print (\"Length of the cylinder = %.3f\")% (L), (\"m\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Power required = 10.096 kW\n",
+ "(ii) Cylinder dimensions \n",
+ "Diameter of cylinder = 0.190 m\n",
+ "Length of the cylinder = 0.228 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.21 page no : 756"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "cooling_load = 150.; #W\n",
+ "n_vol = 0.8;\n",
+ "N = 720.; \t\t\t#rpm\n",
+ "h2 = 183.; \t\t\t#kJ/kg\n",
+ "h1 = 74.5; \t\t\t#kJ/kg\n",
+ "v2 = 0.08; \t\t\t#m**3/kg\n",
+ "\n",
+ "# Calculations\n",
+ "m = cooling_load/(108.5*1000);\n",
+ "d = m*v2/n_vol;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Mass flow rate of the refrigerant = %.6f\")% (m),(\"kJ/s\")\n",
+ "\n",
+ "print (\"Displacement volume of the compressor = %6f\")% (d), (\"m**3/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flow rate of the refrigerant = 0.001382 kJ/s\n",
+ "Displacement volume of the compressor = 0.000138 m**3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.22 page no : 757"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h2 = 183.2; \t\t\t#kJ/kg\n",
+ "h3 = 222.6; \t\t\t#kJ/kg\n",
+ "h4 = 84.9 \t\t\t#kJ/kg\n",
+ "v2 = 0.0767; \t\t\t#m**3/kg\n",
+ "v3 = 0.0164; \t\t\t#m**3/kg\n",
+ "v4 = 0.00083; \t\t\t#m**3/kg\n",
+ "\n",
+ "# Calculations\n",
+ "V = 1.5*1000*10**(-6); \t\t\t#Piston print lacement volume m**3/revolution\n",
+ "n_vol = 0.80;\n",
+ "\n",
+ "print (\"(i) Power rating of the compressor (kW)\")\n",
+ "discharge = V*1600*n_vol; \t\t\t#Compressor discharge\n",
+ "m = discharge/v2;\n",
+ "\n",
+ "P = m/60*(h3-h2); \t\t\t#kW\n",
+ "print (\"Power = %.3f\")% (P), (\"kW\")\n",
+ "\n",
+ "\n",
+ "RE = m/60*(h2-h4);\n",
+ "print (\"(ii) Refrigerating effect = %.3f\")% (RE), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Power rating of the compressor (kW)\n",
+ "Power = 16.438 kW\n",
+ "(ii) Refrigerating effect = 41.012 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.23 page no : 757"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "COP = 6.5;\n",
+ "W = 50.; \t\t\t#kW\n",
+ "h3a = 201.45; \t\t\t#kJ/kg\n",
+ "h_f4 = 69.55; \t\t\t#kJ/kg\n",
+ "h1 = h_f4;\n",
+ "h2 = 187.53; \t\t\t#kJ/kg\n",
+ "cp = 0.6155; \t\t\t#kJ/kg\n",
+ "t3a = 35.; \t\t\t#0C\n",
+ "\n",
+ "# Calculations\n",
+ "RC = W*COP; \t\t\t#Refrigerating capacity\n",
+ "Q1 = h2-h_f4; \t\t\t#Heat extracted per kg of refrigerant\n",
+ "rate = RC/Q1; \t\t\t#Refrigerant flow rate\n",
+ "Q2 = W/rate; \t\t\t#Heat input per kg\n",
+ "h = h2+Q2; \t\t\t#Enthalpy of vapour after compression\n",
+ "Q = h-h3a; \t\t\t#Superheat\n",
+ "\n",
+ "t3 = Q/cp+t3a;\n",
+ "\n",
+ "# Results\n",
+ "print (\"The refrigerant temperature = %.3f\")% (t3), (\"\u00b0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The refrigerant temperature = 41.874 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.24 page no : 758"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "Q1 = 500.; \t\t\t#total heating requirement of 500 kJ/min\n",
+ "n_compressor = 0.8;\n",
+ "s1 = 0.7035; \t\t\t#kJ/kg K\n",
+ "s2 = 0.6799; \t\t\t#kJ/kg K\n",
+ "T2 = 322.31; \t\t\t#K\n",
+ "cp = 0.7; \t\t\t #kJ/kg K\n",
+ "h_v2 = 206.24; \t\t\t#kJ/kg\n",
+ "h_l2 = 84.21; \t\t\t#kJ/kg\n",
+ "h_v1 = 182.07 \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "Q2 = Q1/n_compressor; \t\t\t#Heat rejected by the cycle\n",
+ "\n",
+ "#Entropy of dry saturated vapour at 2 bar = Entropy of superheated vapour at 12 bar\n",
+ "T = T2*math.e**((s1-s2)/cp);\n",
+ "\n",
+ "H = h_v2+cp*(T-T2); \t\t\t#Enthalpy of superheated vapour at 12 bar\n",
+ "Q3 = H-h_l2; \t\t\t#Heat rejected per cycle\n",
+ "m = Q2/Q3; \t\t\t#kg/min\n",
+ "W = m*(H-h_v1)/60; \t\t\t#kW\n",
+ "W_actual = W/n_compressor;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Power = %.3f\")% (W_actual), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power = 3.201 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.25 page no : 759"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "h2a = 183.2; \t\t\t#kJ/kg K\n",
+ "cpv = 0.733; \t\t\t#Vapour specific heat in kJ/kg K\n",
+ "cpl = 1.235; \t\t\t#Liquid specific heat in kJ/kg K\n",
+ "s2a = 0.7020; \t\t\t#Entropy of vapour in kJ/kg K\n",
+ "s3a = 0.6854; \t\t\t#Entropy of vapour in kJ/kg K\n",
+ "T2 = 270.; \t\t\t #K\n",
+ "T2a = 263.; \t\t\t#K\n",
+ "T3a = 303.; \t\t\t#K\n",
+ "h3a = 199.6; \t\t\t#kJ/kg\n",
+ "h_f4 = 64.6; \t\t\t#kJ/kg\n",
+ "dT4 = 6.; \t\t\t #dT4 = T4-T4a\n",
+ "v2a = 0.0767;\n",
+ "n = 2.; \t\t\t #number of cylinder\n",
+ "\n",
+ "# Calculations and Results\n",
+ "h2 = h2a+cpv*(T2-T2a);\n",
+ "s2 = s2a+cpv*math.log(T2/T2a);\n",
+ "T3 = T3a*math.e**((s2-s3a)/cpv);\n",
+ "h3 = h3a+cpv*(T3-T3a);\n",
+ "h_f4a = h_f4-cpl*dT4;\n",
+ "h1 = h_f4a;\n",
+ "v2 = v2a/T2a*T2;\n",
+ "\n",
+ "RE = h2-h1;\n",
+ "print (\"(i) Refrigerating effect per kg = \"), (RE), (\"kJ/kg\")\n",
+ "\n",
+ "m = 2400/RE;\n",
+ "print (\"(ii) Mass of refrigerant to be circulated per minute = %.3f\")% (m), (\"kg/min\")\n",
+ "\n",
+ "v = m*v2;\n",
+ "print (\"(iii) Theoretical piston print lacement per minute = %.3f\")%(v), (\"m**3/min\")\n",
+ "\n",
+ "P = m/60*(h3-h2);\n",
+ "print (\"(iv) Theoretical power required to run the compressor = %.3f\")% (P), (\"kW\")\n",
+ "\n",
+ "Q = m*(h3-h_f4a);\n",
+ "print (\"(v) Heat removed through the condenser per min = %.3f\")% (Q), (\"kJ/min\")\n",
+ "\n",
+ "print (\"(vi) Theoretical bore (d) and stroke (l)\")\n",
+ "d = (v/n/math.pi*4/1.25/1000)**(1./3)*1000;\n",
+ "print (\"Theroritical bore = %.3f\")% (d), (\"mm\")\n",
+ "\n",
+ "l = 1.25*d;\n",
+ "print (\"stroke = %.3f\")% (l), (\"mm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Refrigerating effect per kg = 131.141 kJ/kg\n",
+ "(ii) Mass of refrigerant to be circulated per minute = 18.301 kg/min\n",
+ "(iii) Theoretical piston print lacement per minute = 1.441 m**3/min\n",
+ "(iv) Theoretical power required to run the compressor = 6.833 kW\n",
+ "(v) Heat removed through the condenser per min = 2809.995 kJ/min\n",
+ "(vi) Theoretical bore (d) and stroke (l)\n",
+ "Theroritical bore = 90.202 mm\n",
+ "stroke = 112.752 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.26 page no : 761"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "h2 = 1597.; \t\t\t#kJ/kg\n",
+ "h3 = 1790.; \t\t\t#kJ/kg\n",
+ "h4 = 513.; \t\t\t#kJ/kg\n",
+ "h1 = h4;\n",
+ "t3 = 58.; \t\t\t#0C\n",
+ "x1 = 0.13;\n",
+ "tc = 27.; \t\t\t#0C\n",
+ "capacity = 10.5; \t\t\t#tonnes\n",
+ "\n",
+ "# Calculations and Results\n",
+ "t = t3-tc;\n",
+ "print (\"(i) Condition of the vapour at the outlet of the compressor = \"), (t), (\"C\")\n",
+ "\n",
+ "print (\"(ii) Condition of vapour at entrance to evaporator = \"), (x1)\n",
+ "\n",
+ "COP = (h2-h1)/(h3-h2);\n",
+ "print (\"(iii)COP = %.3f\") %(COP)\n",
+ "\n",
+ "P = capacity*14000./COP/3600;\n",
+ "print (\"(iv) Power required = %.3f\")% (P), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Condition of the vapour at the outlet of the compressor = 31.0 C\n",
+ "(ii) Condition of vapour at entrance to evaporator = 0.13\n",
+ "(iii)COP = 5.617\n",
+ "(iv) Power required = 7.270 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 14.27 page no : 762"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "h2 = 615.; \t\t\t#kJ/kg\n",
+ "h3 = 664.; \t\t\t#kJ/kg\n",
+ "h4 = 446.; \t\t\t#kJ/kg\n",
+ "h1 = h4;\n",
+ "v2 = 0.14; \t\t\t#m**3/kg\n",
+ "capacity = 20.; \t#tonnes\n",
+ "n = 6.; \t\t\t#number of cylinder\n",
+ "\n",
+ "# Calculations and Results\n",
+ "RE = h2-h1;\n",
+ "print (\"(i) Refrigerating effect per kg = \"), (RE), (\"kJ/kg\")\n",
+ "\n",
+ "m = capacity*14000./RE/60.;\n",
+ "print (\"(ii) Mass of refrigerant to be circulated per minute = %.3f\")% (m), (\"kg/min\")\n",
+ "\n",
+ "v = v2*m;\n",
+ "print (\"(iii) Theoretical piston print lacement = %.3f\")% (v), (\"m**3/min\")\n",
+ "\n",
+ "P = m/60*(h3-h2);\n",
+ "print (\"(iv) Theoretical power = %.3f\")% (P), (\"kW\")\n",
+ "\n",
+ "COP = (h2-h1)/(h3-h2);\n",
+ "print (\"(v)COP = %.3f\")% (COP)\n",
+ "\n",
+ "Q = m*(h3-h4);\n",
+ "print (\"(vi) Heat removed through the condenser = %.3f\")% (Q), (\"kJ/min\")\n",
+ "\n",
+ "print (\"(vii) Theoretical print lacement per minute per cylinder\")\n",
+ "\n",
+ "d = (v/n*4/math.pi/950.)**(1./3)*1000.;\n",
+ "print (\"Diameter of cylinder = %.3f\")% (d), (\"mm\")\n",
+ "\n",
+ "l = d;\n",
+ "print (\"Stroke length = %.3f\")% (l), (\"mm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Refrigerating effect per kg = 169.0 kJ/kg\n",
+ "(ii) Mass of refrigerant to be circulated per minute = 27.613 kg/min\n",
+ "(iii) Theoretical piston print lacement = 3.866 m**3/min\n",
+ "(iv) Theoretical power = 22.551 kW\n",
+ "(v)COP = 3.449\n",
+ "(vi) Heat removed through the condenser = 6019.724 kJ/min\n",
+ "(vii) Theoretical print lacement per minute per cylinder\n",
+ "Diameter of cylinder = 95.227 mm\n",
+ "Stroke length = 95.227 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch15.ipynb b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch15.ipynb
new file mode 100755
index 00000000..b5b9114b
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch15.ipynb
@@ -0,0 +1,1519 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 15 : Heat Transfer"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.1 page no : 792"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "t1 = 60.; \t\t\t#0C\n",
+ "t2 = 35.; \t\t\t#0C\n",
+ "L = 0.22; \t\t\t#m\n",
+ "k = 0.51; \t\t\t#W/m 0C\n",
+ "\n",
+ "# Calculations\n",
+ "q = k*(t1-t2)/L;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Rate of heat transfer per m**2 = %.3f\")% (q), (\"W/m**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat transfer per m**2 = 57.955 W/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.2 page no : 792"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "t1 = 1325.; \t\t\t#0C\n",
+ "t2 = 1200.; \t\t\t#0C\n",
+ "t3 = 25.; \t\t\t #0C\n",
+ "L = 0.32; \t\t\t #m\n",
+ "k_A = 0.84; \t\t\t#W/m 0C\n",
+ "k_B = 0.16; \t\t\t#W/m 0C\n",
+ "\n",
+ "# Calculations and Results\n",
+ "L_A = (t1-t2)*k_A/k_B*L/((t1-t3)-(t1-t2)*k_A/k_A+(t1-t2)*k_A/k_B); \t\t\t#m\n",
+ "print (\"(i)L_A = %.3f\")% (L_A*1000), (\"mm\")\n",
+ "\n",
+ "L_B = 0.32-L_A; \t\t\t#m\n",
+ "print (\"L_B %.3f\")% (L_B*1000), (\"mm\")\n",
+ "\n",
+ "q = (t1-t2)/L_A*k_A;\n",
+ "print (\"(ii) Heat loss per unit area = %.3f\")% (q), (\"W/m**2\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)L_A = 114.676 mm\n",
+ "L_B 205.324 mm\n",
+ "(ii) Heat loss per unit area = 915.625 W/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.3 page no : 793"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "L_A = 0.1; \t\t\t#m\n",
+ "L_B = 0.04; \t\t#m\n",
+ "k_A = 0.7; \t\t\t#W/m 0C\n",
+ "k_B = 0.48; \t\t#W/m 0C\n",
+ "k_C = 0.065; \t\t#W/m 0C\n",
+ "\n",
+ "# Calculations\n",
+ "#Q2 = 0.2*Q1\n",
+ "L_C = 0.8*((L_A/k_A) + (L_B/k_B))*k_C/0.2;\n",
+ "\n",
+ "# Results\n",
+ "print (\"thickness of rock wool insulation = %.3f\")% (L_C*1000), (\"mm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "thickness of rock wool insulation = 58.810 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.4 page no : 794"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "L_A = 0.2; \t\t\t#m\n",
+ "L_C = 0.006; \t\t#m\n",
+ "L_D = 0.1; \t\t\t#m\n",
+ "t1 = 1150.; \t\t#0C\n",
+ "t2 = 40.; \t\t\t#0C\n",
+ "dt = t1-t2;\n",
+ "k_A = 1.52; \t\t#W/m 0C\n",
+ "k_B = 0.138; \t\t#W/m 0C\n",
+ "k_D = 0.138; \t\t#W/m 0C\n",
+ "k_C = 45.; \t\t\t#W/m 0C\n",
+ "q = 400.; \t\t\t#W/m**2\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) The value of x = (L_C): \")\n",
+ "L_B = ((t1-t2)/q - (L_A/k_A+L_C/k_C+L_D/k_D))*k_B*1000;\n",
+ "print (\"L_B = %.3f\")% (L_B), (\"mm\")\n",
+ "\n",
+ "\n",
+ "t_so = q*L_D/k_D + t2;\n",
+ "print (\"(ii) Temperature of the outer surface of the steel plate t_so = %.3f\")% (t_so), (\"0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The value of x = (L_C): \n",
+ "L_B = 264.774 mm\n",
+ "(ii) Temperature of the outer surface of the steel plate t_so = 329.855 0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.5 page no : 795"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "k_A = 150.; \t\t\t#W/m 0C\n",
+ "k_B = 30.; \t\t\t#W/m 0C\n",
+ "k_C = 65.; \t\t\t#W/m 0C\n",
+ "k_D = 50.; \t\t\t#W/m 0C\n",
+ "L_A = 0.03; \t\t\t#m\n",
+ "L_B = 0.08; \t\t\t#m\n",
+ "L_C = L_B;\n",
+ "L_D = 0.05; \t\t\t#m\n",
+ "A_A = 0.01; \t\t\t#m**2\n",
+ "A_B = 0.003; \t\t\t#m**2\n",
+ "A_C = 0.007; \t\t\t#m**2\n",
+ "A_D = 0.01; \t\t\t#m**2\n",
+ "t1 = 400.; \t\t\t#0C\n",
+ "t4 = 60.; \t\t\t#0C\n",
+ "\n",
+ "# Calculations\n",
+ "R_thA = L_A/k_A/A_A;\n",
+ "R_thB = L_B/k_B/A_B;\n",
+ "R_thC = L_C/k_C/A_C;\n",
+ "R_thD = L_D/k_D/A_D;\n",
+ "\n",
+ "R_th_eq = R_thB*R_thC/(R_thB+R_thC);\n",
+ "R_th_total = R_thA+R_th_eq+R_thD;\n",
+ "Q = (t1-t4)/R_th_total;\n",
+ "\n",
+ "# Results\n",
+ "print (\"heat flow rate = %.3f\")% (Q), (\"W\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "heat flow rate = 1274.415 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.6 page no : 796"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "L = 0.012; \t\t\t#m\n",
+ "t_hf = 95.; \t\t\t#0C\n",
+ "t_cf = 15.; \t\t\t#0C\n",
+ "k = 50.; \t\t\t#W/m 0C\n",
+ "h_hf = 2850.; \t\t\t#W/m**2 0C\n",
+ "h_cf = 10.; \t\t\t#W/m**2 0C\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Rate of heat loss per m**2 of the tank surface area\")\n",
+ "U = 1./(1./h_hf + L/k + 1./h_cf);\n",
+ "A = 1.; \t\t\t #m**2\n",
+ "q = U*A*(t_hf-t_cf);\n",
+ "print (\"q = %.3f\")% (q), (\"W/m**2\")\n",
+ "\n",
+ "t2 = q/h_cf+t_cf;\n",
+ "print (\"(ii) Temperature of the outside surface of the tank = %.3f\")% (t2), (\"0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Rate of heat loss per m**2 of the tank surface area\n",
+ "q = 795.301 W/m**2\n",
+ "(ii) Temperature of the outside surface of the tank = 94.530 0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.7 page no : 797"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "L_A = 0.003; \t\t\t#m\n",
+ "L_B = 0.05; \t\t\t#m\n",
+ "L_C = L_A;\n",
+ "k_A = 46.5; \t\t\t#W/m 0C\n",
+ "k_B = 0.046; \t\t\t#W/m 0C\n",
+ "k_C = k_A;\n",
+ "h0 = 11.6; \t\t\t#W/m**2 0C\n",
+ "hi = 14.5; \t\t\t#W/m**2 0C\n",
+ "t0 = 25.; \t\t\t#0C\n",
+ "ti = 6.; \t\t\t#0C\n",
+ "\n",
+ "# Calculations and Results\n",
+ "A = 0.5*0.5*2+0.5*1*4; \t\t\t#m**2\n",
+ "\n",
+ "Q = A*(t0-ti)/(1/h0 + L_A/k_A + L_B/k_B + L_C/k_C + 1/hi);\n",
+ "print (\"(i) The rate of removal of heat = %.3f\")% (Q), (\"W\")\n",
+ "\n",
+ "t1 = t0-Q/h0/A;\n",
+ "print (\"(ii) The temperature at the outer surface of the metal sheet = %.3f\")% (t1), (\"0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The rate of removal of heat = 38.237 W\n",
+ "(ii) The temperature at the outer surface of the metal sheet = 23.681 0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.8 page no : 798"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Varaible Declaration\n",
+ "L_A = 0.25; \t\t#m\n",
+ "import math \n",
+ "L_B = 0.1; \t\t\t#m\n",
+ "L_C = 0.15; \t\t#m\n",
+ "k_A = 1.65; \t\t#W/m \u00b0C\n",
+ "k_C = 9.2; \t\t\t#W/m \u00b0C\n",
+ "t_hf = 1250.; \t\t#\u00b0C\n",
+ "t1 = 1100.; \t\t\t#\u00b0C\n",
+ "t_cf = 25.; \t\t\t#\u00b0C\n",
+ "h_hf = 25.; \t\t\t#W/m**2 \u00b0C\n",
+ "h_cf = 12.; \t\t\t#W/m**2 \u00b0C\n",
+ "\n",
+ "\n",
+ "#Calculations and Results\n",
+ "q = h_hf*(t_hf-t1);\n",
+ "l = 0.0355\n",
+ "k_B = L_B/l #((t_hf-t_cf)/q-1/h_hf-L_A/k_A-L_C/k_C-1/h_cf);\n",
+ "print (\" (i)Thermal conductivity,k = %.3f\")% (k_B), (\"W/m**2 \u00b0C\")\n",
+ "\n",
+ "\n",
+ "R_th_total = 1./h_hf+L_A/k_A+L_B/k_B+L_C/k_C+1./h_cf;\n",
+ "U = 1/R_th_total\n",
+ "print (\"(ii) The overall transfer coefficient = %.2f\")% (U), (\"W/m**2 \u00b0C\")\n",
+ "\n",
+ "\n",
+ "print (\"(iii) All surface temperature \")\n",
+ "\n",
+ "print (\"t1 = %.3f\")% (t1),(\"\u00b0C\")\n",
+ "\n",
+ "t2 = t1-q*L_A/k_A;\n",
+ "print (\"t2 = %.3f\")% (t2), (\"\u00b0C\")\n",
+ "\n",
+ "t3 = t2-q*L_B/k_B;\n",
+ "print (\"t3 = %.3f\")% (t3), (\"\u00b0C\")\n",
+ "\n",
+ "t4 = t3-q*L_C/k_C;\n",
+ "print (\"t4 = %.3f\")% (t4), (\"\u00b0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " (i)Thermal conductivity,k = 2.817 W/m**2 \u00b0C\n",
+ "(ii) The overall transfer coefficient = 3.06 W/m**2 \u00b0C\n",
+ "(iii) All surface temperature \n",
+ "t1 = 1100.000 \u00b0C\n",
+ "t2 = 531.818 \u00b0C\n",
+ "t3 = 398.693 \u00b0C\n",
+ "t4 = 337.552 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.9 page no : 802"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "r1 = 0.01; \t\t\t#m\n",
+ "r2 = 0.02; \t\t\t#m\n",
+ "r3 = 0.05; \t\t\t#m\n",
+ "t1 = 600.; \t\t\t#0C\n",
+ "t3 = 1000.; \t\t#0C\n",
+ "k_B = 0.2; \t\t\t#W/m 0C\n",
+ "\n",
+ "# Calculations\n",
+ "q = 2*math.pi*(t1-t3)/(math.log(r3/r2)/k_B);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Heat transfer per metre of length = %.3f\")% (q), (\"W/m\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer per metre of length = -548.576 W/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.10 page no : 803"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "r1 = 0.06; \t\t\t#m\n",
+ "r2 = 0.12; \t\t\t#m\n",
+ "r3 = 0.16; \t\t\t#m\n",
+ "k_A = 0.24; \t\t\t#W/m 0C\n",
+ "k_B = 0.4; \t\t\t#W/m 0C\n",
+ "h_hf = 60.; \t\t\t#W/m**2 0C\n",
+ "h_cf = 12.; \t\t\t#W/m**2 0C\n",
+ "t_hf = 65.; \t\t\t#0C\n",
+ "t_cf = 20.; \t\t\t#0C\n",
+ "L = 60.; \t\t\t#m\n",
+ "\n",
+ "# Calculations\n",
+ "Q = 2*math.pi*L*(t_hf-t_cf)/(1/h_hf/r1 + math.log(r2/r1)/k_A + math.log(r3/r2)/k_B + 1/h_cf/r3);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Rate of heat loss = %.3f\")% (Q), (\"W\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat loss = 3850.402 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.11 page no : 804"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "r1 = 0.06; \t\t\t#m\n",
+ "r2 = 0.08; \t\t\t#m\n",
+ "k_A = 42.; \t\t\t#W/m 0C\n",
+ "k_B = 0.8; \t\t\t#W/m 0C\n",
+ "t_hf = 150.; \t\t\t#0C\n",
+ "t_cf = 20.; \t\t\t#0C\n",
+ "h_hf = 100.; \t\t\t#W/m**2 0C\n",
+ "h_cf = 30.; \t\t\t#W/m**2 0C\n",
+ "r3 = 0.105; \t\t\t#m\n",
+ "\n",
+ "# Calculations\n",
+ "thickness = (r3-r2)*1000; \t\t\t#mm\n",
+ "\n",
+ "# Results\n",
+ "print (\"Thickness of insulation = \"), (thickness), (\"mm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of insulation = 25.0 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.12 page no : 807"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "r2 = 0.7; \t\t\t#m\n",
+ "r1 = 0.61; \t\t\t#m\n",
+ "dt = 220.; \t\t\t#dt = t1-t2; 0C\n",
+ "k = 0.083; \t\t\t#W/m 0C\n",
+ "\n",
+ "# Calculations\n",
+ "Q = dt/((r2-r1)/(4*math.pi*k*r1*r2));\n",
+ "\n",
+ "# Results\n",
+ "print (\"Rate of heat leakage = %.3f\")% (Q), (\"W\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat leakage = 1088.669 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.13 page no : 811"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "r1 = 0.001; \t\t\t#m\n",
+ "r2 = 0.0018; \t\t\t#m\n",
+ "k = 0.12; \t\t\t#W/m 0C\n",
+ "h0 = 35.; \t\t\t#W/m**2 0C\n",
+ "\n",
+ "# Calculations\n",
+ "rc = k/h0;\n",
+ "thickness = (rc-r1)*10**3; \t\t\t#mm\n",
+ "increase = (1/(math.log(rc/r1)/k + 1/h0/rc)-1/(math.log(r2/r1)/k + 1/h0/r2))/(1/(math.log(r2/r1)/k + 1/h0/r2))*100;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Critical thickness of insulation = %.3f\")% (thickness), (\"mm\")\n",
+ "\n",
+ "print (\"Percentage change in heat transfer rate = %.3f\")% (increase), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical thickness of insulation = 2.429 mm\n",
+ "Percentage change in heat transfer rate = 11.666 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.14 page no : 813"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "A = 1*1.5; \t\t\t#m**2\n",
+ "ts = 300.; \t\t\t#0C\n",
+ "tf = 20.; \t\t\t#0C\n",
+ "h = 20.; \t\t\t#W/m**2 0C\n",
+ "\n",
+ "# Calculations\n",
+ "Q = h*A*(ts-tf)/10**3; \t\t\t#kW\n",
+ "\n",
+ "# Results\n",
+ "print (\"Rate of heat transfer = \"), (Q), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat transfer = 8.4 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.15 page no : 813"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "d = 0.0015; \t\t\t#m\n",
+ "l = 0.15; \t\t\t#m\n",
+ "A = math.pi*d*l;\n",
+ "ts = 120.; \t\t\t#0C\n",
+ "tf = 100.; \t\t\t#0C\n",
+ "h = 4500.; \t\t\t#W/m**2 0C\n",
+ "\n",
+ "# Calculations\n",
+ "Q = h*A*(ts-tf);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Electric power to be supplied = %.3f\")% (Q), (\"W\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Electric power to be supplied = 63.617 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.16 page no : 814"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "D = 0.045; \t\t\t#m\n",
+ "l = 3.2; \t\t\t#m\n",
+ "u = 0.78; \t\t\t#m/s\n",
+ "k = 0.66; \t\t\t#W/m K\n",
+ "v = 0.478*10**(-6); \t\t\t#m**2/s\n",
+ "Pr = 2.98;\n",
+ "tw = 70.; \t\t\t#0C\n",
+ "tf = 50.; \t\t\t#0C\n",
+ "\n",
+ "# Calculations\n",
+ "A = math.pi*D*l;\n",
+ "Re = D*u/v;\n",
+ "h = 0.023*(Re)**0.8*(Pr)**0.4/D*k;\n",
+ "Q = h*A*(tw-tf)/10**3;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Heat transfer co-efficient = %.3f\")% (h), (\"W/m**2 K\")\n",
+ "\n",
+ "print (\"Rate of heat transfer = %.3f\")% (Q), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transfer co-efficient = 4078.018 W/m**2 K\n",
+ "Rate of heat transfer = 36.897 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.17 page no : 814"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "rho = 983.2; \t\t\t#kg/m**2\n",
+ "cp = 4.187; \t\t\t#kJ/kg K\n",
+ "k = 0.659; \t\t\t#W/m 0C\n",
+ "v = 0.478*10**(-6); \t\t\t#m**2/s\n",
+ "m = 0.5/60; \t\t\t#kg/s\n",
+ "D = 0.02; \t\t\t#m\n",
+ "ti = 20.; \t\t\t#0C\n",
+ "t0 = 50.; \t\t\t#0C\n",
+ "ts = 85.; \t\t\t#surface temperature in 0C\n",
+ "\n",
+ "# Calculations\n",
+ "tf = 1./2*(ts+(ti+t0)/2);\n",
+ "A = math.pi/4*D**2;\n",
+ "u = m/rho/A;\n",
+ "Re = D*u/v;\n",
+ "\n",
+ "#Since Re < 2000, hence the flow is laminar.\n",
+ "Nu = 3.65;\n",
+ "h = Nu*k/D;\n",
+ "tb = (t0+ti)/2;\n",
+ "L = m*cp*10**3*(t0-ti)/(ts-tb)/h/D/math.pi;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Length of the tube required for fully developed flow = %.3f\")% (L), (\"m\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Length of the tube required for fully developed flow = 2.770 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.18 page no : 825"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m_h = 0.2; \t\t\t#kg/s\n",
+ "m_c = 0.5; \t\t\t#kg/s\n",
+ "t_h1 = 75.; \t\t\t#0C\n",
+ "t_h2 = 45.; \t\t\t#0C\n",
+ "t_c1 = 20.; \t\t\t#0C\n",
+ "hi = 650.; \t\t\t#W/m**2 0C\n",
+ "h0 = hi;\n",
+ "cph = 4.187;\n",
+ "cpc = cph\n",
+ "\n",
+ "# Calculations\n",
+ "Q = m_h*cph*(t_h1-t_h2);\n",
+ "t_c2 = m_h*cph/cpc*(t_h1-t_h2)/m_c+t_c1;\n",
+ "theta = ((t_h1-t_c1)- (t_h2-t_c2))/math.log((t_h1-t_c1)/(t_h2-t_c2)); \t\t\t#Logarithmic mean temperature difference\n",
+ "U = hi*h0/(hi+h0);\n",
+ "A = Q*10**3/U/theta;\n",
+ "\n",
+ "# Results\n",
+ "print (\"The area of heat exchanger = %.3f\")% (A), (\"m**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The area of heat exchanger = 2.655 m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.19 page no : 827"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "t_c1 = 25.; \t\t\t#0C\n",
+ "t_c2 = 65.; \t\t\t#0C\n",
+ "cph = 1.45; \t\t\t#kJ/kg K\n",
+ "m_h = 0.9; \t\t \t#kg/s\n",
+ "t_h1 = 230.; \t\t\t#0C\n",
+ "t_h2 = 160.; \t\t\t#0C\n",
+ "U = 420.; \t \t\t#W/m**2 0C\n",
+ "cpc = 4.187; \t\t\t#kJ/kg K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Q = m_h*cph*(t_h1-t_h2);\n",
+ "print (\"(i) The rate of heat transfer = \"), (Q), (\"kJ/s\")\n",
+ "\n",
+ "m_c = Q/cpc/(t_c2-t_c1);\n",
+ "print (\"(ii) The mass flow rate of water = %.3f\")% (m_c), (\"kg/s\")\n",
+ "\n",
+ "\n",
+ "print (\"(iii) The surface area of heat exchanger = \")\n",
+ "LMTD = ((t_h1-t_c2)- (t_h2-t_c1))/math.log((t_h1-t_c2)/(t_h2-t_c1)); \t\t\t#math.logarithmic mean temperature difference\n",
+ "A = Q*10**3/U/LMTD;\n",
+ "print (\"A = %.3f\")% (A), (\"m**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The rate of heat transfer = 91.35 kJ/s\n",
+ "(ii) The mass flow rate of water = 0.545 kg/s\n",
+ "(iii) The surface area of heat exchanger = \n",
+ "A = 1.455 m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.20 page no : 828"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m_s = 800./60; \t\t\t#kg/s\n",
+ "m_c = m_s;\n",
+ "m_g = 1350./60; \t\t\t#kg/s\n",
+ "m_h = m_g;\n",
+ "t_h1 = 650.; \t\t\t#0C\n",
+ "t_c1 = 180.; \t\t\t#0C\n",
+ "t_c2 = 350.; \t\t\t#0C\n",
+ "d = 0.03; \t\t\t#m\n",
+ "L = 3.; \t\t\t#m\n",
+ "cph = 1.; \t\t\t#kJ/kg K\n",
+ "cpc = 2.71; \t\t\t#kJ/kg K\n",
+ "h_g = 250.;\n",
+ "h_s = 600.;\n",
+ "\n",
+ "# Calculations\n",
+ "t_h2 = round(t_h1-(m_c*cpc*(t_c2-t_c1)/cph/m_h));\n",
+ "U = round(h_g*h_s/(h_g+h_s),1);\n",
+ "Q = round(m_h*(cph*10**3)*(t_h1-t_h2),1);\n",
+ "theta = ((t_h1-t_c2)- (t_h2-t_c1))/math.log((t_h1-t_c2)/(t_h2-t_c1));# logarithmic mean temperature differenceN = Q/U/theta/(math.pi*d*L);\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print (\"%.1f\")% (theta), (\"C\")\n",
+ "\n",
+ "N = (6142.5 * 10**3)/(U * 0.2827* theta)\n",
+ "print \"number of tubes required = %.0f\" % N\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "244.9 C\n",
+ "number of tubes required = 503\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.21 page no : 829"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "di = 0.0296; \t\t\t#m\n",
+ "d0 = 0.0384; \t\t\t#m\n",
+ "U = 4000.; \t\t\t#W/m**2 0C\n",
+ "V = 3.; \t\t\t#m/s\n",
+ "t_c1 = 24.; \t\t\t#0C\n",
+ "x = 0.9;\n",
+ "ps = (760-660.)/760*1.0133; \t\t\t#bar\n",
+ "t_h1 = 51.; \t\t\t#0C\n",
+ "t_h2 = 51.; \t\t\t#0C\n",
+ "h_fg = 2592.; \t\t\t#kJ/kg\n",
+ "t_c2 = 47.; \t\t\t#0C\n",
+ "P = 15.; \t\t\t#MW\n",
+ "ssc = 5.; \t\t\t#specific steam consumption in kg/kWh\n",
+ "cpc = 4.187; \t\t\t#kJ?kg K\n",
+ "rho = 1000.;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m_s = P*10.**3*ssc/60; \t\t\t#kg/min\n",
+ "m_w = m_s*x*h_fg/cpc/(t_c2-t_c1);\n",
+ "print (\"(i) Mass of cooling water circulated per minute = %.3f\")% (m_w), (\"kg/min\")\n",
+ "\n",
+ "\n",
+ "Q = m_s*x*h_fg*10**3/60.;\n",
+ "\n",
+ "theta = ((t_h1-t_c1)- (t_h2-t_c2))/math.log((t_h1-t_c1)/(t_h2-t_c2)); \t\t\t#Logarithmic mean temperature difference\n",
+ "A = Q/U/theta;\n",
+ "print (\"(ii) Condenser surface area %.3f\")% (A), (\"m**2\")\n",
+ "\n",
+ "Np = m_w/60*4/math.pi/di**2/V/rho;\n",
+ "print (\"(iii) Number of tubes required per pass = %.3f\")% (Np)\n",
+ "\n",
+ "L = A/math.pi/d0/(2*Np);\n",
+ "print (\"(iv) Tube length = %.3f\")% (L), (\"m\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Mass of cooling water circulated per minute = 30280.059 kg/min\n",
+ "(ii) Condenser surface area 1008.737 m**2\n",
+ "(iii) Number of tubes required per pass = 244.462\n",
+ "(iv) Tube length = 17.102 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.22 page no : 831"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "cp = 4.187; \t\t\t#kJ/kg \u00b0C\n",
+ "u = 0.596*10**(-3); \t#Ns/m**2\n",
+ "k = 0.635; \t\t\t #W/m \u00b0C\n",
+ "Pr = 3.93; \n",
+ "d = 0.020; \t\t\t#m\n",
+ "l = 2.; \t\t\t#m\n",
+ "m_c = 10.; \t\t\t#kg/s\n",
+ "t_c1 = 17.; \t\t#/\u00b0C\n",
+ "t_h1 = 100.; \t\t#\u00b0C\n",
+ "t_h2 = 100.; \t\t#\u00b0C\n",
+ "rho = 1000.;\n",
+ "N = 200.;\n",
+ "Np = N/l;\n",
+ "h0 = 10.*10**3;\n",
+ "\n",
+ "# Calculations\n",
+ "V = m_c*4/math.pi/d**2/rho/Np;\n",
+ "Re = rho*V*d/u;\n",
+ "hi = k/d*0.023*(Re)**0.8*(Pr)**0.33;\n",
+ "U = hi*h0/(hi+h0);\n",
+ "t_c2 = (U*math.pi*d*l*N*91.5 + m_c*cp*10**3*t_c1)/(m_c*cp*10**3 + U*math.pi*d*l*N*0.5);\n",
+ "\n",
+ "# Results\n",
+ "print (\"water exit temperature = %.3f\")% (t_c2), (\"\u00b0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "water exit temperature = 71.043 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.23 page no : 842"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "A = 0.12; \t\t\t#m**2\n",
+ "T = 800.; \t\t\t#K\n",
+ "a = 5.67*10**(-8);\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Eb = a*A*T**4;\n",
+ "print (\"(i) The total rate of energy emission = %.3f\")% (Eb),(\"W\")\n",
+ "\n",
+ "Ibn = a*T**4/math.pi;\n",
+ "print (\"(ii) The intensity of normal radiation = %.3f\")% (Ibn), (\"W/m**2.sr\")\n",
+ "\n",
+ "wavelength = 2898/T;\n",
+ "print (\"(iii) The wavelength of maximum monochromatic emissive power = %.3f\")%(wavelength), (\"\u03bcm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The total rate of energy emission = 2786.918 W\n",
+ "(ii) The intensity of normal radiation = 7392.531 W/m**2.sr\n",
+ "(iii) The wavelength of maximum monochromatic emissive power = 3.623 \u03bcm\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.24 page no : 842"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "wavelength = 0.49; \t\t\t#\u03bcm\n",
+ "a = 5.67*10**(-8);\n",
+ "\n",
+ "# Calculations and Results\n",
+ "T = 2898/wavelength;\n",
+ "print (\"(i) The surface temperature of the sun %.3f\")% (T), (\"K\")\n",
+ "\n",
+ "E_sun = a*T**4;\n",
+ "print (\"(ii) The heat flux at the surface of the sun = %.3f\")% (E_sun/1E+7), (\"*10^7 W/m**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The surface temperature of the sun 5914.286 K\n",
+ "(ii) The heat flux at the surface of the sun = 6.937 *10^7 W/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.25 page no : 843"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "T = 2773. \t\t\t#K\n",
+ "lambda_ = 1.2 * 10**-6\n",
+ "e = 0.9;\n",
+ "a = 5.67*10**(-8);\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Monochromatic emissive power at 1.2 \u03bcm length\")\n",
+ "C1 = 0.3742*10**(-15); \t\t\t#W.m**4/m**2\n",
+ "C2 = 1.4388*10**(-4); \t\t\t#mK\n",
+ "E_lambda_b = C1*lambda_**(-5)/((math.exp(C2/lambda_/T)-1));\n",
+ "\n",
+ "print (\"E_lambda_b = %.2e\")% (E_lambda_b)\n",
+ "\n",
+ "lambda_max = 2898/T;\n",
+ "print (\"(ii) Wavelength at which the emission is maximum = %.3f\")% (lambda_max), (\"\u03bcm\")\n",
+ "\n",
+ "E_lambda_b_max = 1.285*10.**(-5)*T**5;\n",
+ "print (\"(iii) Maximum emissive power = %.3f\")% (E_lambda_b_max/1E+12), (\"*10^12 W/m**2 per metre length\")\n",
+ "\n",
+ "Eb = a*T**4;\n",
+ "print (\"(iv) Total emissive power = %.3f\")% (Eb/1E+6), (\"*10^6 W/m**2\")\n",
+ "\n",
+ "E = e*a*T**4;\n",
+ "print (\"(v) Total emissive power = %.3f\")% (E/1E+6), (\"*10^6 W/m**2\")\n",
+ "\n",
+ "# Book answers are wrong. Please calculate them manually."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Monochromatic emissive power at 1.2 \u03bcm length\n",
+ "E_lambda_b = 3.40e+15\n",
+ "(ii) Wavelength at which the emission is maximum = 1.045 \u03bcm\n",
+ "(iii) Maximum emissive power = 2.107 *10^12 W/m**2 per metre length\n",
+ "(iv) Total emissive power = 3.353 *10^6 W/m**2\n",
+ "(v) Total emissive power = 3.017 *10^6 W/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.26 page no : 845"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 1273.; \t\t\t#K\n",
+ "T2 = 773.; \t\t\t#K\n",
+ "e1 = 0.42;\n",
+ "e2 = 0.72;\n",
+ "a = 5.67*10**(-8);\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) When the body is grey with \u03b51 = 0.42\")\n",
+ "q = e1*a*(T1**4-T2**4)/10**3; \t\t\t#kW\n",
+ "print (\"Heat loss per m2 by radiation = %.3f\")% (q), (\"kW\")\n",
+ "print (\"(ii) When the body is not grey\")\n",
+ "E_emitted = e1*a*T1**4;\n",
+ "E_absorbed = e2*a*(T2)**4;\n",
+ "q = (E_emitted-E_absorbed)/10**3;\n",
+ "print (\"Heat loss per m2 by radiation = %.3f\")% (q), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) When the body is grey with \u03b51 = 0.42\n",
+ "Heat loss per m2 by radiation = 54.036 kW\n",
+ "(ii) When the body is not grey\n",
+ "Heat loss per m2 by radiation = 47.962 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.27 page no : 846"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "d = 0.022; \t\t\t#m\n",
+ "di = 0.18; \t\t\t#m\n",
+ "e1 = 0.62;\n",
+ "e2 = 0.82;\n",
+ "rho = 7845.; \t\t\t#kg/m**3\n",
+ "T1a = 693.; \t\t\t#K; For caseI\n",
+ "T1b = 813.; \t\t\t#K; For caseII\n",
+ "T2 = 1373.; \t\t\t#K\n",
+ "l = 1.; \t\t\t#m\n",
+ "a = 5.67*10**(-8); \n",
+ "cp = 0.67; \t\t\t#kJ/kg K\n",
+ "\n",
+ "# Calculations\n",
+ "A1 = math.pi*d*l;\n",
+ "A2 = math.pi*di*l;\n",
+ "Qi = A1*a*(T1a**4-T2**4)/(1/e1+A1/A2*(1/e2 - 1));\n",
+ "Qe = A1*a*(T1b**4-T2**4)/(1/e1+A1/A2*(1/e2 - 1));\n",
+ "Qav = -(Qi+Qe)/2;\n",
+ "t_h = math.pi/4*d**2*rho*cp*(T1b-T1a)*10**3/Qav;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Time required for the heating operation %.3f\")% (t_h),(\"s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time required for the heating operation 31.157 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.28 page no : 847"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "r1 = 0.05; \t\t\t#m\n",
+ "r2 = 0.1; \t\t\t#m\n",
+ "T1 = 400.; \t\t\t#K\n",
+ "T2 = 300.; \t\t\t#K\n",
+ "e1 = 0.5;\n",
+ "e2 = 0.5;\n",
+ "F_12 = 1.;\n",
+ "\n",
+ "# Calculations\n",
+ "a = 5.67*10**(-8);\n",
+ "#A1/A2 = r1/r2\n",
+ "Q = a*(T1**4-T2**4)/((1-e1)/e1+1/F_12+(1-e2)/e2*r1/r2);\n",
+ "\n",
+ "# Results\n",
+ "print (\"heat transfer rate per m2 area by radiation\"), (Q), (\"W/m**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "heat transfer rate per m2 area by radiation 396.9 W/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.29 page no : 847"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "r1 = 0.05; \t\t\t#m\n",
+ "r2 = 0.1; \t\t\t#m\n",
+ "r3 = 0.15; \t\t\t#m\n",
+ "T1 = 1000.; \t\t\t#K\n",
+ "T3 = 500.; \t\t\t#K\n",
+ "e1 = 0.05;\n",
+ "e2 = e1;\n",
+ "e3 = e1;\n",
+ "a = 5.67*10**(-8);\n",
+ "F_12 = 1.;\n",
+ "F_23 = 1.;\n",
+ "T2 = 770.; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "Q1 = a*(T1**4-T2**4)/(((1-e1)/e1) + 1/F_12 + ((1-e2)/e2)*r1/r2);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Heat flow per m2 area of cylinder 1 = %.3f\")% (Q1), (\"W\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat flow per m2 area of cylinder 1 = 1246.381 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.30 page no : 848"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "r1 = 0.105; \t\t\t#m\n",
+ "r2 = 0.15; \t\t\t#m\n",
+ "T1 = 120.; \t\t\t#K\n",
+ "T2 = 300.; \t\t\t#K\n",
+ "e1 = 0.03;\n",
+ "e2 = 0.03;\n",
+ "h_fg = 209.35; \t\t\t#kJ/kg\n",
+ "a = 5.67*10**(-8);\n",
+ "F_12 = 1.;\n",
+ "\n",
+ "# Calculations\n",
+ "Q = 4*math.pi*r1**2*a*(T1**4-T2**4)/( ((1-e1)/e1) + 1./F_12 + ((1-e2)/e2)*r1**2/r2**2);\n",
+ "rate = -Q*3600./h_fg/1000;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Rate of evaporation = %.3f\")% (rate), (\"kg/h\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of evaporation = 0.022 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.31 page no : 849"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "T1 = 91.; \t\t\t#K\n",
+ "T2 = 303.; \t\t\t#K\n",
+ "e1 = 0.03;\n",
+ "e2 = 0.03;\n",
+ "d1 = 0.3; \t\t\t#m\n",
+ "d2 = 0.45; \t\t\t#m\n",
+ "a = 5.67*10**(-8);\n",
+ "F_12 = 1.;\n",
+ "\n",
+ "# Calculations\n",
+ "Q = 4*math.pi*(d1/2)**2*a*(T1**4-T2**4)/( ((1-e1)/e1) + 1/F_12 + ((1-e2)/e2)*d1**2/d2**2);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Rate of heat flow = %.3f\")% (Q), (\"W\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat flow = -2.810 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 15.32 page no : 850"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "e1 = 0.3;\n",
+ "e2 = 0.8;\n",
+ "e3 = 0.04;\n",
+ "A1 = 1.; \t\t\t#m**2\n",
+ "A2 = A1;\n",
+ "A3 = A1;\n",
+ "\n",
+ "# Calculations\n",
+ "reduction = 1-0.131*0.52;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Percentage reduction in heat flow due to shield = %.3f\")% (reduction), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage reduction in heat flow due to shield = 0.932 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch16.ipynb b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch16.ipynb
new file mode 100755
index 00000000..97fdf57d
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch16.ipynb
@@ -0,0 +1,957 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 16 : Compressible Flow"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.1 page no : 859"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "V1 = 300.; \t\t\t#m/s\n",
+ "p1 = 78.; \t\t\t#kN/m**2\n",
+ "T1 = 313.; \t\t\t#K\n",
+ "p2 = 117.; \t\t\t#kN/m**2\n",
+ "R = 287.; \t\t\t#J/kg K\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations\n",
+ "#Let r1 = p1/rho1\n",
+ "r1 = R*T1;\n",
+ "V2 = math.sqrt(2*(y/(y-1)*r1*(1-(p2/p1)**((y-1)/y)) + V1**2/2));\n",
+ "\n",
+ "# Results\n",
+ "print (\"Velocity of gas at section 2 = %.3f\")% (V2), (\"m/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity of gas at section 2 = 112.987 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.2 page no : 861"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 35.; \t\t\t#kN/m**2\n",
+ "V1 = 30.; \t\t\t#m/s\n",
+ "T1 = 423.; \t\t\t#K\n",
+ "V2 = 150.; \t\t\t#m/s\n",
+ "R = 290.; \t\t\t#J/kg K\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations\n",
+ "#Let r1 = p2/p1\n",
+ "r1 = R*T1; \n",
+ "p2 = p1*(1-((V2**2/2-V1**2/2)*(y-1)/y/r1))**(y/(y-1));\n",
+ "print (\"pressure = %.3f\")% (p2), (\"kN/m**2\")\n",
+ "\n",
+ "T2 = T1*(p2/p1)**((y-1)/y);\n",
+ "t2 = T2-273;\n",
+ "print (\"temperature = %.3f\")% (t2), (\"\u00b0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "pressure = 32.014 kN/m**2\n",
+ "temperature = 139.360 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.3 page no : 866"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "SG = 0.8;\n",
+ "rho_oil = 800.; \t\t\t#kg/m**3\n",
+ "K_oil = 1.5*10**9; \t\t\t#N/m**2; crude oil\n",
+ "K_Hg = 27*10.**9; \t\t\t#N/m**2; Mercury\n",
+ "rho_Hg = 13600.; \t\t\t#kg/m**3\n",
+ "\n",
+ "# Calculations and Results\n",
+ "C_oil = math.sqrt(K_oil/rho_oil);\n",
+ "print (\"Sonic velocity of crude oil = %.3f\")% (C_oil), (\"m/s\")\n",
+ "\n",
+ "C_Hg = math.sqrt(K_Hg/rho_Hg)\n",
+ "print (\"Sonic velocity of Mercury = %.3f\")% (C_Hg), (\"m/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sonic velocity of crude oil = 1369.306 m/s\n",
+ "Sonic velocity of Mercury = 1409.005 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.4 page no : 866"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "T = 228.; \t\t\t#K\n",
+ "M = 2.;\n",
+ "R = 287.; \t\t\t#Jkg K\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations\n",
+ "C = math.sqrt(y*R*T);\n",
+ "V = M*C*3600./1000;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Velocity of the plane = %.3f\")% (V), (\"km/h\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity of the plane = 2179.239 km/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.5 page no : 868"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "a = 40*math.pi/180; \t\t\t#Mach angle in radians\n",
+ "y = 1.4;\n",
+ "R = 287.; \t\t\t#J/kg K\n",
+ "T = 288.; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "C = math.sqrt(y*R*T);\n",
+ "V = C/math.sin(a);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Velocity of bullet = %.3f\")% (V), (\"m/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity of bullet = 529.217 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.6 page no : 868"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "p = 88.3; \t\t\t#kN/m**2\n",
+ "T = 271.; \t\t\t#K\n",
+ "M = 40.*math.pi/180;\n",
+ "y = 1.4;\n",
+ "R = 287.; \t\t\t#J/kg K\n",
+ "\n",
+ "# Calculations\n",
+ "C = math.sqrt(y*R*T);\n",
+ "V = C/math.sin(M);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Velocity of the projectile = %.3f\")% (V), (\"m/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity of the projectile = 513.360 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.7 page no : 868"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "h = 1800.; \t\t\t#m\n",
+ "T = 277.; \t\t\t#K\n",
+ "t = 4.; \t\t\t#s\n",
+ "y = 1.4;\n",
+ "R = 287.; \t\t\t#J/kg K\n",
+ "\n",
+ "# Calculations\n",
+ "C = math.sqrt(y*R*T);\n",
+ "a = (math.cos(C/h*t));\n",
+ "V = C/math.sin(a)*3600/1000;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Speed of the aircraft = %.3f\")% (V), (\"km/h\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Speed of the aircraft = 1785.959 km/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.8 page no : 873"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "R = 287.; \t\t\t#J/kg K\n",
+ "y = 1.4;\n",
+ "V0 = 1000.*1000/3600; \t\t\t#m/s\n",
+ "p0 = 78.5; \t\t\t#kN/m**2\n",
+ "T0 = 265.; \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "C0 = math.sqrt(y*R*T0);\n",
+ "M0 = V0/C0;\n",
+ "\n",
+ "ps = p0*(1+((y-1)/2*M0**2))**(y/(y-1));\n",
+ "print (\"(i) Stagnation pressure = %.3f\")%(ps), (\"kN/m**2\")\n",
+ "\n",
+ "Ts = T0*(1+((y-1)/2*M0**2));\n",
+ "print (\"(ii) Stagnation temperature = %.3f\")% (Ts), (\"K\")\n",
+ "\n",
+ "rho_s = ps*10**3/R/Ts;\n",
+ "print (\"(iii) Stagnation density = %.3f\")%(rho_s), (\"kg/m**3\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Stagnation pressure = 126.067 kN/m**2\n",
+ "(ii) Stagnation temperature = 303.407 K\n",
+ "(iii) Stagnation density = 1.448 kg/m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.9 page no : 874"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "V0 = 1000.*1000./3600; \t\t\t#m/s\n",
+ "T0 = 320.; \t\t\t#K\n",
+ "p_atm = 98.1; \t\t\t#kN/m**2\n",
+ "p = 9.81; \t\t\t#kN/m**2\n",
+ "p0 = 98.1-p;\n",
+ "R = 287.; \t\t\t#J/kg K\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "C0 = math.sqrt(y*R*T0);\n",
+ "M0 = V0/C0;\n",
+ "\n",
+ "ps = p0*(1+((y-1)/2*M0**2))**(y/(y-1));\n",
+ "print (\"Stagnation pressure = %.3f\")% (ps), (\"kN/m**2\")\n",
+ "\n",
+ "Ts = T0*(1+((y-1)/2*M0**2));\n",
+ "print (\"Stagnation temperature = %.1f\")% (Ts), (\"K\")\n",
+ "\n",
+ "rho_s = ps*10**3/R/Ts;\n",
+ "print (\"Stagnation density = %.3f\")% (rho_s), (\"kg/m**3\")\n",
+ "\n",
+ "M = 0.8;\n",
+ "\n",
+ "CF = 1+(M0**2./4)+((2-y)/24.*M0**4);\n",
+ "print (\"Compressibility factor %.2f\")% (CF)\n",
+ "\n",
+ "#Note : Answers are slightly different because of rounding error."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stagnation pressure = 131.282 kN/m**2\n",
+ "Stagnation temperature = 358.4 K\n",
+ "Stagnation density = 1.276 kg/m**3\n",
+ "Compressibility factor 1.16\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.10 page no : 875"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "R = 287.; \t\t\t#J/kg K\n",
+ "y = 1.4;\n",
+ "p0 = 220.*10**3; \t#N/m**2\n",
+ "T0 = 300.; \t\t\t#K\n",
+ "V0 = 200.; \t\t\t#m/s\n",
+ "\n",
+ "# Calculations and Results\n",
+ "C0 = math.sqrt(y*R*T0);\n",
+ "rho_0 = p0/R/T0;\n",
+ "print (\"Stagnation pressure = \")\n",
+ "\n",
+ "print (\"(i) Compressibility is neglected\")\n",
+ "ps = (p0+rho_0*V0**2/2)/10**3;\n",
+ "print (\"ps = %.3f\")% (ps), (\"kN/m**2\")\n",
+ "\n",
+ "print (\"(ii) Compressibility is accounted for\")\n",
+ "M0 = V0/C0;\n",
+ "\n",
+ "ps = (p0+rho_0*V0**2/2*(1+M0**2./4+(2-y)/24*M0**4))/10**3;\n",
+ "print (\"ps = %.3f\")% (ps), (\"kN/m**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stagnation pressure = \n",
+ "(i) Compressibility is neglected\n",
+ "ps = 271.103 kN/m**2\n",
+ "(ii) Compressibility is accounted for\n",
+ "ps = 275.484 kN/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.11 page no : 875"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "p0 = 35.*10**3; \t\t\t#Pa\n",
+ "T0 = 235.; \t\t\t#K\n",
+ "ps = 65.4*10**3; \t\t\t#N/m**2\n",
+ "R0 = 8314.; \t\t\t#Nm/mole K\n",
+ "M = 28.;\n",
+ "\n",
+ "# Calculations\n",
+ "R = R0/M;\n",
+ "rho_0 = p0/R/T0;\n",
+ "Va = math.sqrt(2*(ps-p0)/rho_0);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Speed of the aircraft = %.3f\")% (Va), (\"m/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Speed of the aircraft = 348.159 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.12 page no : 885"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "p0 = 30.*10**3; \t\t\t#N/m**2\n",
+ "V0 = 152.; \t\t\t#m/s\n",
+ "y = 1.4;\n",
+ "rho_0 = 1.224; \t\t\t#kg/m**3\n",
+ "ps = p0+rho_0*V0**2/2;\n",
+ "\n",
+ "# Calculations\n",
+ "rho_0 = 0.454; \t\t\t#kg/m**3\n",
+ "V0 = math.sqrt(2*(ps-p0)/rho_0);\n",
+ "C0 = math.sqrt(y*p0/rho_0);\n",
+ "M = V0/C0;\n",
+ "ccf = (1+M**2/4); \t\t\t#Compressibility correction factor\n",
+ "V = V0/math.sqrt(ccf); \t\t\t#True speed of aircraft\n",
+ "\n",
+ "# Results\n",
+ "print (\"True speed of aircraft = %.3f\")% (V), (\"m/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "True speed of aircraft = 230.900 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.13 page no : 886"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "M = 3.; \t\t\t#Mach number\n",
+ "d = 0.2; \t\t\t#m\n",
+ "p_nozzle = 7.85; \t\t\t#kN/m**2\n",
+ "T_nozzle = 200.; \t\t\t#K\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "A = math.pi/4*d**2;\n",
+ "p_res = p_nozzle*(1+((y-1)/2*M**2))**(y/(y-1));\n",
+ "print (\"Reservoir pressure = %.3f\")% (p_res), (\"kN/m**2\")\n",
+ "\n",
+ "T_res = T_nozzle*(1+((y-1)/2*M**2));\n",
+ "print (\"Reservoir temperature = %.3f\")% (T_res), (\"K\")\n",
+ "\n",
+ "Ac = A*M/((2+(y-1)*M**2)/(y+1))**((y+1)/2/(y-1));\n",
+ "print (\"Throat area (critical) = %.5f\")% (Ac), (\"m**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reservoir pressure = 288.352 kN/m**2\n",
+ "Reservoir temperature = 560.000 K\n",
+ "Throat area (critical) = 0.00742 m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.14 page no : 887"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "R = 287.; \t\t\t#J/kg K\n",
+ "y = 1.4;\n",
+ "p_atm = 100.; \t\t\t#kN/m**2\n",
+ "p1 = 284. + p_atm; \t\t\t#kN/m**2\n",
+ "T1 = 297.; \t \t\t#K\n",
+ "D = 0.02; \t\t \t#m\n",
+ "\n",
+ "# Calculations\n",
+ "A2 = math.pi/4*D**2;\n",
+ "rho_1 = p1*10**3/R/T1;\n",
+ "m_max = 0.685*A2*math.sqrt(p1*10**3*rho_1);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Maximum flow rate = %.3f\")% (m_max), (\"kg/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum flow rate = 0.283 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.15 page no : 888"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "R = 287.; \t\t\t#J/kg K\n",
+ "y = 1.4;\n",
+ "p1 = 2500.*10**3; \t#N/m**2\n",
+ "T1 = 293.; \t\t\t#K\n",
+ "p2 = 1750.*10**3; \t#N/m**2\n",
+ "\n",
+ "# Calculations\n",
+ "rho_1 = p1/R/T1;\n",
+ "V2 = math.sqrt(2*y/(y-1)*p1/rho_1*(1-(p2/p1)**((y-1)/y)));\n",
+ "\n",
+ "# Results\n",
+ "print (\"Velocity of air = %.3f\")% (V2),(\"m/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity of air = 238.812 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.16 page no : 889"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "R = 287.; \t \t\t#J/kg K\n",
+ "y = 1.4;\n",
+ "p_atm = 10.**5; \t\t#N/m**2\n",
+ "T1 = 293. \t\t\t#K\n",
+ "D2 = 0.025; \t\t\t#m\n",
+ "p1 = 140.*10**3; \t\t#N/m**2\n",
+ "\n",
+ "# Calculations and Results\n",
+ "A2 = math.pi/4*D2**2;\n",
+ "\n",
+ "print (\"(i) Mass rate of flow of air when pressure in the math.tank is 140 kN/m2 (abs.)\")\n",
+ "rho_1 = p1/R/T1;\n",
+ "p2 = 10**5; \t\t\t#N/m**2\n",
+ "\n",
+ "m = A2*math.sqrt(2*y/(y-1)*p1*rho_1*((p2/p1)**(2/y) - (p2/p1)**((y+1)/y)));\n",
+ "print (\"m = %.3f\")% (m), (\"kg/s\")\n",
+ "\n",
+ "print (\"(ii) Mass rate of flow of air when pressure in the math.tank is 300 kN/m2 (abs.)\")\n",
+ "p1 = 300.*10**3; \t\t\t#N/m**2\n",
+ "p2 = 10.**5; \t\t\t#N/m**2\n",
+ "rho_1 = p1/R/T1;\n",
+ "\n",
+ "print (\"The pressure ratio p2/p1 being less than the critical ratio 0.528, the flow in the nozzle will be sonic\");\n",
+ "\n",
+ "m_max = 0.685*A2*math.sqrt(p1*rho_1);\n",
+ "print (\"m_max = %.3f\")% (m_max), (\"kg/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Mass rate of flow of air when pressure in the math.tank is 140 kN/m2 (abs.)\n",
+ "m = 0.149 kg/s\n",
+ "(ii) Mass rate of flow of air when pressure in the math.tank is 300 kN/m2 (abs.)\n",
+ "The pressure ratio p2/p1 being less than the critical ratio 0.528, the flow in the nozzle will be sonic\n",
+ "m_max = 0.348 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.17 page no : 890"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "p1 = 200.; \t\t\t#kN/m**2\n",
+ "V1 = 170.; \t\t\t#m/s\n",
+ "T1 = 473.; \t\t\t#K\n",
+ "A1 = 0.001; \t\t#m**2\n",
+ "R = 287.; \t\t\t#J/kg K\n",
+ "cp = 1000.; \t\t#J/kg K\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Stagnation temperature (Ts) and stagnation pressure (ps)\")\n",
+ "\n",
+ "Ts = T1+V1**2/2/cp;\n",
+ "print (\"Ts = %.3f\")% (Ts), (\"K\")\n",
+ "\n",
+ "ps = p1*(Ts/T1)**(y/(y-1));\n",
+ "print (\"ps = %.3f\")% (ps), (\"kN/m**2\")\n",
+ "\n",
+ "print (\"(ii) Sonic velocity and Mach number at this section\")\n",
+ "\n",
+ "C1 = math.sqrt(y*R*T1);\n",
+ "print (\"Sonic velocity = %.3f\")% (C1), (\"m/s\")\n",
+ "\n",
+ "M1 = V1/C1;\n",
+ "print (\"Mach number = %.3f\")% (M1)\n",
+ "\n",
+ "print (\"(iii) Velocity, Mach number and flow area at outlet section where pressure is 110 kN/m2\")\n",
+ "p2 = 110.; \t\t\t#kN/m**2\n",
+ "M2 = math.sqrt(2/(y-1)*((ps/p2)**((y-1)/y) - 1));\n",
+ "print (\"M2 = %.3f\")% (M2)\n",
+ "\n",
+ "T2 = Ts*(p2/ps)**((y-1)/y);\n",
+ "C2 = math.sqrt(y*R*T2);\n",
+ "V2 = M2*C2;\n",
+ "print (\"V2 = %.3f\")% (V2), (\"m/s\")\n",
+ "\n",
+ "A2 = (p1*A1*V1*T2/T1/p2/V2)*10**6;\n",
+ "print (\"A2 = %.3f\")% (A2), (\"mm**2\")\n",
+ "\n",
+ "\n",
+ "print (\"(iv) Pressure (pt), temperature (Tt), velocity (Vt), and flow area (At) at throat of the nozzle\")\n",
+ "Mt = 1.;\n",
+ "Tt = Ts/(1+(y-1)/2*Mt**2);\n",
+ "print (\"Tt = %.3f\")% (Tt), (\"K\")\n",
+ "\n",
+ "pt = ps*(Tt/Ts)**(y/(y-1));\n",
+ "print (\"pt = %.3f\")% (pt), (\"kN/m**2\")\n",
+ "\n",
+ "Ct = math.sqrt(y*R*Tt);\n",
+ "Vt = Mt*Ct;\n",
+ "\n",
+ "At = (p1*A1*V1*Tt/T1/pt/Vt)*10**6;\n",
+ "print (\"At = %.3f\")% (At), (\"mm**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Stagnation temperature (Ts) and stagnation pressure (ps)\n",
+ "Ts = 487.450 K\n",
+ "ps = 222.214 kN/m**2\n",
+ "(ii) Sonic velocity and Mach number at this section\n",
+ "Sonic velocity = 435.949 m/s\n",
+ "Mach number = 0.390\n",
+ "(iii) Velocity, Mach number and flow area at outlet section where pressure is 110 kN/m2\n",
+ "M2 = 1.055\n",
+ "V2 = 422.183 m/s\n",
+ "A2 = 617.168 mm**2\n",
+ "(iv) Pressure (pt), temperature (Tt), velocity (Vt), and flow area (At) at throat of the nozzle\n",
+ "Tt = 406.208 K\n",
+ "pt = 117.392 kN/m**2\n",
+ "At = 615.673 mm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.18 page no : 893"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "y = 1.4;\n",
+ "p1 = 26.5; \t\t\t#kN/m**2\n",
+ "rho_1 = 0.413; \t\t\t#kg/m**3\n",
+ "M1 = 2.;\n",
+ "R = 287.;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "M2 = math.sqrt(((y-1)*M1**2 + 2)/(2*y*M1**2 - (y-1)));\n",
+ "print (\"Mach number M2 = %.3f\")% (M2)\n",
+ "\n",
+ "p2 = p1*(2*y*M1**2 - (y-1))/(y+1);\n",
+ "print (\"p2 = %.3f\")% (p2), (\"kN/m**2\")\n",
+ "\n",
+ "rho_2 = rho_1*((y+1)*M1**2)/((y-1)*M1**2 + 2);\n",
+ "print (\"density, rho_2 = %.3f\")% (rho_2), (\"kg/m**3\")\n",
+ "\n",
+ "T1 = p1*10**3/rho_1/R;\n",
+ "print (\"T1 = %.3f\")% (T1), (\"K\")\n",
+ "\n",
+ "T2 = T1*((y-1)*M1**2 + 2)*(2*y*M1**2 - (y-1))/((y+1)**2*M1**2);\n",
+ "print (\"T2 = %.3f\")% (T2), (\"K\")\n",
+ "\n",
+ "C1 = math.sqrt(y*R*T1);\n",
+ "V1 = M1*C1;\n",
+ "print (\"V1 = %.3f\")% (V1), (\"m/s\")\n",
+ "\n",
+ "C2 = math.sqrt(y*R*T2);\n",
+ "V2 = M2*C2;\n",
+ "print (\"V2 = %.3f\")% (V2), (\"m/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mach number M2 = 0.577\n",
+ "p2 = 119.250 kN/m**2\n",
+ "density, rho_2 = 1.101 kg/m**3\n",
+ "T1 = 223.570 K\n",
+ "T2 = 377.275 K\n",
+ "V1 = 599.435 m/s\n",
+ "V2 = 224.788 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 16.19 page no : 895"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "M1 = 1.5;\n",
+ "p1 = 170.; \t\t\t#kN/m**2\n",
+ "T1 = 296.; \t\t\t#K\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Pressure, temperature and Mach number downstream of the shock\")\n",
+ "p2 = p1*(2*y*M1**2 - (y-1))/(y+1);\n",
+ "print (\"p2 = %.3f\")% (p2), (\"kN/m**2\")\n",
+ "\n",
+ "T2 = T1*((y-1)*M1**2 + 2)*(2*y*M1**2 - (y-1))/(y+1)**2/M1**2;\n",
+ "print (\"T2 = %.3f\")% (T2), (\"K\")\n",
+ "\n",
+ "M2 = math.sqrt(((y-1)*M1**2 + 2)/(2*y*M1**2 - (y-1)));\n",
+ "print (\"M2 = %.3f\")% (M2)\n",
+ "\n",
+ "strength = p2/p1 - 1;\n",
+ "print (\"Strength of stock = %.3f\")% (strength)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Pressure, temperature and Mach number downstream of the shock\n",
+ "p2 = 417.917 kN/m**2\n",
+ "T2 = 390.784 K\n",
+ "M2 = 0.701\n",
+ "Strength of stock = 1.458\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch2.ipynb b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch2.ipynb
new file mode 100755
index 00000000..72dc2069
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch2.ipynb
@@ -0,0 +1,915 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2 : Basic Concepts Of Thermodynamicsm"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.1 Page no : 41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "rho_Hg = 13596.; \t\t\t#kg/m**3\n",
+ "g = 9.806; \t\t\t#m/s**2\n",
+ "h = 0.76; \t\t\t#m\n",
+ "\n",
+ "# Calculations and Results\n",
+ "P = rho_Hg*g*h/1000; \t\t\t#kPa\n",
+ "\n",
+ "\n",
+ "h1 = 0.80; \t\t\t#m\n",
+ "P1 = h1/h*P;\n",
+ "print \"(i) Pressure of 80 cm of Hg %.3f kPa\"%P1\n",
+ "\n",
+ "\n",
+ "print (\"(ii) 30 cm Hg vacuum\")\n",
+ "H2 = 0.30; \t\t\t#cm Hg vacuum\n",
+ "h2 = h-H2; \t\t\t#cm of Hg absolute\n",
+ "\n",
+ "P2 = h2/h*P;\n",
+ "print \"Pressure due to 46 cm of Hg %.3f kPa\"%P2\n",
+ "\n",
+ "rho_H2O = 1000; \t\t\t#kg/m**3\n",
+ "h3 = 1.35; \t\t\t#m\n",
+ "P3 = rho_H2O*g*h3/1000;\n",
+ "print \"(iii) Pressure due to 1.35 m H2O gauge %.3f kPa\"%(P3)\n",
+ "\n",
+ "\n",
+ "P4 = 4.2*10**2;\n",
+ "print \"(iv) 4.2 bar %.3f kPa\"%(P4),\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Pressure of 80 cm of Hg 106.658 kPa\n",
+ "(ii) 30 cm Hg vacuum\n",
+ "Pressure due to 46 cm of Hg 61.328 kPa\n",
+ "(iii) Pressure due to 1.35 m H2O gauge 13.238 kPa\n",
+ "(iv) 4.2 bar 420.000 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.2 page no : 42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "d = 0.1; \t\t\t#m\n",
+ "F = 1000.; \t\t\t#N\n",
+ "\n",
+ "# Calculations\n",
+ "A = math.pi/4*d**2; \t\t\t#m**2\n",
+ "P = F/A/10**3;\n",
+ "\n",
+ "# Results\n",
+ "print \"Pressure on the piston = %.3f kN/m**2\"%(P),\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure on the piston = 127.324 kN/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.3 page no : 42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "SG = 0.9;\n",
+ "h = 1.2; \t\t\t#m\n",
+ "g = 9.81; \t\t\t#m/s**2\n",
+ "rho_w = 1000.; \t\t\t#kg/m**3\n",
+ "\n",
+ "# Calculations\n",
+ "rho = SG*rho_w; \t\t\t#kg/m**3\n",
+ "P = rho*g*h/10**3;\n",
+ "\n",
+ "# Results\n",
+ "print \"Gauge pressure P = %.3f kN/m**2\"%(P)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gauge pressure P = 10.595 kN/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.4 page no : 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "Vacuum_recorded = 740.; \t\t\t#mm of Hg\n",
+ "Barometric_reading = 760.; \t\t\t#mm of Hg\n",
+ "\n",
+ "# Calculations\n",
+ "Absolute_pressure = (Barometric_reading-Vacuum_recorded)*133.4;\n",
+ "\n",
+ "# Results\n",
+ "print \"Absolute pressure in the condenser = %.3f Pa\"%(Absolute_pressure),\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Absolute pressure in the condenser = 2668.000 Pa\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.5 page no : 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "d = 0.5; \t\t\t#m\n",
+ "h = 0.75; \t\t\t#m\n",
+ "m = 4.; \t\t\t#kg\n",
+ "Manometer_reading = 620.; \t\t\t#mm of Hg above atmosphere\n",
+ "Barometer_reading = 760.; \t\t\t#mm of Hg\n",
+ "V = math.pi/4*d**2*h; \t\t\t#m**3\n",
+ "print (\"(i) Total pressure in the vessel\")\n",
+ "\n",
+ "# Calculations and Results\n",
+ "P = (Barometer_reading+Manometer_reading)*133.4/10**5; \t\t\t#bar\n",
+ "print \"P = %.3f bar\"%(P)\n",
+ "\n",
+ "print (\"(ii) Specific volume and density\")\n",
+ "SV = V/m; \n",
+ "print \"Specific volume = %.3f m**3/kg\"%(SV)\n",
+ "\n",
+ "D = m/V;\n",
+ "print \"Density = %.3f kg/m**3\"%(D),\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Total pressure in the vessel\n",
+ "P = 1.841 bar\n",
+ "(ii) Specific volume and density\n",
+ "Specific volume = 0.037 m**3/kg\n",
+ "Density = 27.162 kg/m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.6 page no : 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h0 = .761; \t\t\t#m\n",
+ "h = .55; \t\t\t#m\n",
+ "g = 9.79; \t\t\t#m/s**2\n",
+ "rho = 13640.; \t\t\t#kg/m**3\n",
+ "\n",
+ "# Calculations\n",
+ "P = rho*g*(h0+h); \t\t\t#N/m**2\n",
+ "\n",
+ "# Results\n",
+ "print \"Gas pressure = %.3f bar\"%(P/10**5),\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gas pressure = 1.751 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.7 page no : 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h_H2O = 34.; \t\t\t#mm of Hg\n",
+ "g = 9.81; \t\t\t#m/s**2\n",
+ "rho = 13600.; \t\t\t#kg/m**3\n",
+ "P_Hg = 97.5; \t\t\t#mm of Hg\n",
+ "P_atm = 760.; \t\t\t#mm of Hg\n",
+ "\n",
+ "# Calculations\n",
+ "P_H2O = h_H2O/13.6; \t\t\t#mm of Hg\n",
+ "Pabs = rho*g*(P_Hg+P_atm-P_H2O)/10**8; \t\t\t#bar\n",
+ "\n",
+ "# Results\n",
+ "print \"absolute pressure = %.3f bar\"%(Pabs)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "absolute pressure = 1.141 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.8 page no : 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "SG = 0.8;\n",
+ "rho_H2O = 1000.; \t\t\t#kg/m**3\n",
+ "g = 9.81; \t\t\t#ms**2\n",
+ "h = 0.17; \t\t\t#m\n",
+ "Patm = 1.01325; \t\t\t#bar\n",
+ "\n",
+ "# Calculations\n",
+ "rho = SG*rho_H2O; \t\t\t#kg/m**3\n",
+ "P_liq = rho*g*h/10**5; \t\t\t#bar\n",
+ "P_gas = Patm - P_liq;\n",
+ "\n",
+ "# Results\n",
+ "print \"gas pressure = %.3f bar\"%(P_gas),\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gas pressure = 1.000 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.9 page no : 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "d = 0.2; \t\t\t#m\n",
+ "g = 9.81; \t\t\t#m/s**2\n",
+ "h = 0.117; \t\t\t#m\n",
+ "rho = 13600.; \t\t\t#kg/m**3\n",
+ "\n",
+ "# Calculations\n",
+ "p = rho*g*h;\n",
+ "m = (p*math.pi/4*d**2)/g;\n",
+ "\n",
+ "# Results\n",
+ "print \"mass = %.3f kg\"%(m),\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mass = 49.989 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.10 page no : 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "v = 800.; \t\t\t#m/s\n",
+ "g = 9.; \t\t\t#m/s**2\n",
+ "F = 3600.; \t\t\t#N\n",
+ "\n",
+ "# Calculations\n",
+ "m = F/g;\n",
+ "KE = 1./2*m*v**2./10**6;\n",
+ "\n",
+ "# Results\n",
+ "print \"Kinetic Energy = %.3f MJ\"%(KE),\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Kinetic Energy = 128.000 MJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.11 page no : 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "m = 6.; \t\t\t#kg\n",
+ "T1 = 25.; \t\t\t#0C\n",
+ "T2 = 125.; \t\t\t#0C\n",
+ "\n",
+ "print (\"(i) Heat transferred\")\n",
+ "\n",
+ "# Calculations and Results\n",
+ "def f18(T): \n",
+ "\t return m*(0.4+0.004*T)\n",
+ "\n",
+ "Q = quad(f18,T1,T2)[0]\n",
+ "\n",
+ "print \"heat tranferred = %.3f kJ\"%(Q)\n",
+ "\n",
+ "print (\"(ii) Mean specific heat of the gas\")\n",
+ "c_n = Q/m/(T2-T1);\n",
+ "print \"Mean specific heat = %.3f kJ/kg.0C\"%(c_n),\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Heat transferred\n",
+ "heat tranferred = 420.000 kJ\n",
+ "(ii) Mean specific heat of the gas\n",
+ "Mean specific heat = 0.700 kJ/kg.0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.12 page no : 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import *\n",
+ "# Variables\n",
+ "Ice_point = 0.;\n",
+ "Steam_point = 100.;\n",
+ "\n",
+ "# Calculations\n",
+ "P = [[math.log(1.5),1],[math.log(7.5),1]];\n",
+ "Q = [0,100];\n",
+ "X = linalg.inv(P)*Q;\n",
+ "\n",
+ "a = X[0,1];\n",
+ "b = X[1,1];\n",
+ "p = 3.5;\n",
+ "t = a*math.log(p)+b;\n",
+ "\n",
+ "# Results\n",
+ "print (\"The value of temperature is given by %.3f\")%(t),(\"\u00b0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of temperature is given by 52.646 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.13 page no : 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "def func(t): \n",
+ "\t return 0.20*t-5*10**(-4)*t**2\n",
+ "# Variables # Calculations\n",
+ "t1 = 0; \t\t\t#0C\n",
+ "e1 = func(t1);\n",
+ "t2 = 100; \t\t\t#0C\n",
+ "e2 = func(t2);\n",
+ "t3 = 70; \t\t\t#0C\n",
+ "e3 = func(t3);\n",
+ "t = e3*(t2-t1)/e2-e1;\n",
+ "\n",
+ "# Results\n",
+ "print \"thermocouple will read\",t,\"\u00b0C\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "thermocouple will read 77.0 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.15 page no : 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "p = 101.325; \t\t#kPa\n",
+ "V2 = 0.6; \t\t\t#m**3\n",
+ "V1 = 0; \t\t\t#m**3\n",
+ "\n",
+ "# Calculations\n",
+ "W = p*(V2-V1);\n",
+ "\n",
+ "# Results\n",
+ "print (\"work done by atmosphere = \"),(-W),\"kJ\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "work done by atmosphere = -60.795 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.16 page no : 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from scipy import integrate\n",
+ "\n",
+ "# Variables\n",
+ "#p = 1.013*10**5; \t#N/m**2\n",
+ "p = lambda x: 1.013*10**5\n",
+ "V1 = 1.5; \t\t\t#m**3\n",
+ "V2 = 0; \t\t\t#m**3\n",
+ "\n",
+ "# Calculations\n",
+ "integ, err = integrate.quad(p,V1,V2)\n",
+ "\n",
+ "# Results\n",
+ "print (\"W = \"),(integ/10**3),\"kJ\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "W = -151.95 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.17 page no : 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "T = 1.25; \t\t\t#N.m\n",
+ "N = 9500.;\n",
+ "p = 101.3; \t\t\t#kPa\n",
+ "d = 0.65; \t\t\t#m\n",
+ "L = 0.6; \t\t\t#m\n",
+ "\n",
+ "# Calculations\n",
+ "W1 = 2*math.pi*N*T/1000; \t#kJ\n",
+ "A = math.pi/4*d**2; #m**2\n",
+ "W2 = p*A*L; \t\t#kJ\n",
+ "Wnet = (-W1)+W2;\n",
+ "\n",
+ "# Results\n",
+ "print \"The net work transfer for the system = %.3f\"%(Wnet),\"kJ\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The net work transfer for the system = -54.444 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.18 page no : 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "A = 45.*10**(-4); \t #m**2\n",
+ "P = 0.9*10**5; \t\t #N/m**2\n",
+ "Patm = 1.013*10**5; #N/m**2\n",
+ "L = 0.05; \t\t\t #m\n",
+ "\n",
+ "# Calculations\n",
+ "dV = 300.*10**(-6); \t\t\t#m**3\n",
+ "W = P*A*L-Patm*dV;\n",
+ "\n",
+ "# Results\n",
+ "print (\"net work done = \"),(W),\"J\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "net work done = -10.14 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.19 page no : 54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "p1 = 1.5; \t\t\t#bar\n",
+ "p2 = 7.5; \t\t\t#bar\n",
+ "V1 = 3/p1;\n",
+ "V2 = 3/p2;\n",
+ "\n",
+ "# Calculations\n",
+ "def f19( V): \n",
+ "\t return 3./V*10**2\n",
+ "\n",
+ "W = quad(f19, V1, V2)[0]\n",
+ "\n",
+ "# Results\n",
+ "print \"Work done = %.3f\"%(W),\"kJ\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done = -482.831 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.20 page no : 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "W = 150; \t\t\t#kJ\n",
+ "V1 = 0.6; \t\t\t#m**3\n",
+ "\n",
+ "# Calculations and Results\n",
+ "V2 = (8-math.sqrt(64-4*2*2.58))/4; \t\t\t#m**3\n",
+ "print (\"Final volume = %.3f\")%V2,\"m**3\"\n",
+ "\n",
+ "p2 = 8-4*V2;\n",
+ "print \"Final pressure = %.2f\"%p2,\"bar\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final volume = 0.354 m**3\n",
+ "Final pressure = 6.58 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.21 page no : 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "p1 = 3.*10**5; \t\t\t#Pa\n",
+ "v1 = 0.18; \t\t\t#m**3/kg\n",
+ "p2 = 0.6*10**5; \t\t\t#Pa\n",
+ "\n",
+ "# Calculations\n",
+ "C = p1*v1**2;\n",
+ "v2 = math.sqrt(C/p2);\n",
+ "\n",
+ "def f17( v): \n",
+ " return C/v**2\n",
+ "\n",
+ "W = quad(f17, v1,v2)[0]\n",
+ "\n",
+ "# Results\n",
+ "print (\"Work done = %d\")%(W),(\"Nm/kg\")\n",
+ "\n",
+ "# Note : output would be differ as rounding error is there. v2 has rounding off error."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done = 29850 Nm/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 2.22 page no : 57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "m = 1.; \t\t\t#kg\n",
+ "p1 = 20.*10**5; \t#Pa\n",
+ "V1 = 0.05; \t\t\t#m**3\n",
+ "\n",
+ "# Calculations\n",
+ "V2 = 2*V1;\n",
+ "p2 = p1*(V1/V2)**2;\n",
+ "C = p1*V1**2;\n",
+ "V3 = V1;\n",
+ "\n",
+ "def f20( V): \n",
+ "\t return C/V**2\n",
+ "\n",
+ "W_12 = quad(f20, V1,V2)[0]\n",
+ "W_23 = p2*(V2-V3);\n",
+ "W_net = W_12-W_23;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Net work done = \"),(W_net),(\"Nm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net work done = 25000.0 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch3.ipynb b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch3.ipynb
new file mode 100755
index 00000000..c24f76eb
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch3.ipynb
@@ -0,0 +1,1384 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3 : Properties of Pure Substances"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.1 page no : 76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m_s = 50. \t\t\t#kg\n",
+ "m_w = 1.5; \t\t\t#kg\n",
+ "\n",
+ "# Calculations\n",
+ "x = m_s/(m_s+m_w);\n",
+ "\n",
+ "# Results\n",
+ "print (\"dryness fraction = %.3f\")%(x)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dryness fraction = 0.971\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.2 page no : 76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "V = 0.6; \t\t\t#m**3\n",
+ "m = 3.0; \t\t\t#kg\n",
+ "p = 5.; \t\t\t#bar\n",
+ "v = V/m;\n",
+ "\n",
+ "# At 5 bar: From steam tables\n",
+ "v_g = 0.375; \t\t\t#m**3/kg\n",
+ "v_f = 0.00109; \t\t\t#m**3/kg\n",
+ "\n",
+ "# Calculations\n",
+ "v_fg = v_g - v_f;\n",
+ "x = 1-((v_g - v)/v_fg);\n",
+ "\n",
+ "# Results\n",
+ "print (\"(i) Mass and volume of liquid\")\n",
+ "m_liq = m*(1-x);\n",
+ "print (\"mass of liquid = %.3f\")%(m_liq),(\"kg\")\n",
+ "V_liq = m_liq*v_f;\n",
+ "print (\"volume of liquid = %.3f\")%(V_liq),(\"m**3\")\n",
+ "\n",
+ "print (\"(ii) Mass and volume of vapour\")\n",
+ "m_vap = m*x;\n",
+ "print (\"mass of vapour = %.3f\")%(m_vap),(\"kg\")\n",
+ "V_vap = m_vap*v_g;\n",
+ "print (\"volume of vapour = %.3f\")%(V_vap),(\"m**3\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Mass and volume of liquid\n",
+ "mass of liquid = 1.404 kg\n",
+ "volume of liquid = 0.002 m**3\n",
+ "(ii) Mass and volume of vapour\n",
+ "mass of vapour = 1.596 kg\n",
+ "volume of vapour = 0.598 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.3 page no : 76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "V = 0.05; \t\t\t#m**3\n",
+ "m_f = 10.; \t\t\t#kg\n",
+ "# From steam tables corresponding to 245 0C\n",
+ "p_sat = 36.5; \t\t\t#bar\n",
+ "v_f = 0.001239; \t\t\t#m**3/kg\n",
+ "v_g = 0.0546; \t\t\t#m**3/kg\n",
+ "h_f = 1061.4; \t\t\t#kJ/kg\n",
+ "h_fg = 1740.2; \t\t\t#kJ/kg\n",
+ "s_f = 2.7474; \t\t\t#kJ/kg.K\n",
+ "s_fg = 3.3585; \t\t\t#kJ/kg.K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) The pressure = \"),(p_sat),(\"bar\")\n",
+ "\n",
+ "print (\"(ii) The mass\")\n",
+ "V_f = m_f*v_f;\n",
+ "V_g = V - V_f;\n",
+ "m_g = V_g/v_g;\n",
+ "m = m_f+m_g;\n",
+ "print (\"The total mass of mixture = %.3f\")%(m),(\"kg\")\n",
+ "\n",
+ "print (\"(iii) The specific volume\")\n",
+ "v_fg = v_g-v_f;\n",
+ "x = m_g/(m_g+ m_f);\n",
+ "v = v_f+x*v_fg;\n",
+ "print (\"specific volume = %.3f\")%(v),(\"m**3/kg\")\n",
+ "\n",
+ "print (\"(iv)The specific enthalpy\")\n",
+ "h = h_f+x*h_fg;\n",
+ "print (\"specific enthalpy = %.3f\")%(h),(\"kJ/kg\")\n",
+ "\n",
+ "print (\"(v)The specific entropy\")\n",
+ "s = s_f+x*s_fg;\n",
+ "print (\"specific entropy = %.3f\")%(s),(\"kJ/kg.K\")\n",
+ "\n",
+ "print (\"(vi)The specific internal enegy\")\n",
+ "u = h-(p_sat*v*10**2); \t\t\t#kJ/kg\n",
+ "print (\"specific internal energy = %.3f\")%(u),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The pressure = 36.5 bar\n",
+ "(ii) The mass\n",
+ "The total mass of mixture = 10.689 kg\n",
+ "(iii) The specific volume\n",
+ "specific volume = 0.005 m**3/kg\n",
+ "(iv)The specific enthalpy\n",
+ "specific enthalpy = 1173.545 kJ/kg\n",
+ "(v)The specific entropy\n",
+ "specific entropy = 2.964 kJ/kg.K\n",
+ "(vi)The specific internal enegy\n",
+ "specific internal energy = 1156.471 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.4 page no : 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m_w = 2.; \t\t\t#kg\n",
+ "t_w = 25.; \t\t\t#0C\n",
+ "p = 5.; \t\t\t#bar\n",
+ "x = 0.9;\n",
+ "c_pw = 4.18;\n",
+ "# at 5 bar; from steam tables\n",
+ "h_f = 640.1; \t\t\t#kJ/kg\n",
+ "h_fg = 2107.4; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "h = h_f+x*h_fg;\n",
+ "\n",
+ "Qw = c_pw*(t_w-0);\n",
+ "print (\"Sensible heat associated with 1kg of water, Qw = %.3f\")%(Qw),(\"kJ\")\n",
+ "\n",
+ "Q = h-Qw;\n",
+ "print (\"Net quantity of heat to be supplies per kg of water, Q = %.3f\")%(Q),(\"kJ\")\n",
+ "\n",
+ "Q_total = m_w*Q;\n",
+ "print (\"Total amount of heat supplied, Q_total = \"),(Q_total),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sensible heat associated with 1kg of water, Qw = 104.500 kJ\n",
+ "Net quantity of heat to be supplies per kg of water, Q = 2432.260 kJ\n",
+ "Total amount of heat supplied, Q_total = 4864.52 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.5 page no : 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m = 4.4; \t\t\t#kg\n",
+ "p = 6.; \t\t\t#bar\n",
+ "t_sup = 250.; \t\t\t#0C\n",
+ "t_w = 30.; \t\t\t#0C\n",
+ "c_ps = 2.2; \t\t\t#kJ/kg\n",
+ "c_pw = 4.18;\n",
+ "# At 6 bar, 250 0C; From steam tables\n",
+ "t_s = 158.8; \t\t\t#0C\n",
+ "h_f = 670.4; \t\t\t#kJ/kg\n",
+ "h_fg = 2085; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "h_sup = h_f+h_fg+ c_ps*(t_sup-t_s);\n",
+ "\n",
+ "Qw = c_pw*(t_w-0);\n",
+ "print (\"Amount of heat added per kg of water, Qw = \"),(Qw)\n",
+ "\n",
+ "Q = h_sup-Qw;\n",
+ "print (\"Net amount of heat required to be supplied per kg, Q = \"),(Q)\n",
+ "\n",
+ "Q_total = m*Q;\n",
+ "print (\"Total amount of heat required, Q_total = \"),(Q_total),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amount of heat added per kg of water, Qw = 125.4\n",
+ "Net amount of heat required to be supplied per kg, Q = 2830.64\n",
+ "Total amount of heat required, Q_total = 12454.816 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.6 page no : 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "v = 0.15; \t\t\t#m**3\n",
+ "p = 4.; \t\t\t#bar\n",
+ "x = 0.8;\n",
+ "# At 4 bar: From steam tables\n",
+ "v_g = 0.462; \t\t\t#m**3/kg\n",
+ "h_f = 604.7; \t\t\t#kJ/kg\n",
+ "h_fg = 2133.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "density = 1/x/v_g;\n",
+ "\n",
+ "m = v*density;\n",
+ "print (\"mass of 0.15 m**3 steam, m = %.3f\")%(m),(\"kg\")\n",
+ "\n",
+ "Q = density*(h_f+x*h_fg);\n",
+ "print (\"Total heat of 1 m3 of steam which has a mass of 2.7056 kg, Q = %.3f\")%(Q),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mass of 0.15 m**3 steam, m = 0.406 kg\n",
+ "Total heat of 1 m3 of steam which has a mass of 2.7056 kg, Q = 6252.976 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.7 page no : 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m = 1000.; \t\t\t#kJ/kg.K\n",
+ "p = 16.; \t\t\t#bar\n",
+ "x = 0.9;\n",
+ "T_sup = 653.; \t\t\t#K\n",
+ "T_w = 30.; \t\t\t#0C\n",
+ "c_ps = 2.2; \t\t\t#kJ/kg\n",
+ "c_pw = 4.18;\n",
+ "# At 16 bar:From steam tables\n",
+ "T_s = 474.4; \t\t\t#K\n",
+ "h_f = 858.6; \t\t\t#kJ/kg\n",
+ "h_fg = 1933.2; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "H = m*((h_f+x*h_fg)-c_pw*(T_w-0));\n",
+ "print (\"(i) Heat supplied to feed water per hour to produce wet steam is given by\"),(H),(\"kJ\")\n",
+ "\n",
+ "Q = m*((1-x)*h_fg+c_ps*(T_sup-T_s));\n",
+ "print (\"(ii) Heat absorbed by superheater per hour, Q = \"),(Q),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Heat supplied to feed water per hour to produce wet steam is given by 2473080.0 kJ\n",
+ "(ii) Heat absorbed by superheater per hour, Q = 586240.0 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.8 page no : 79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print (\"(i) at 0.75 bar, between 100\u00b0C and 150\u00b0C\")\n",
+ "\n",
+ "# Variables\n",
+ "# At 100 \u00b0C\n",
+ "T1 = 100.; \t\t\t#\u00b0C\n",
+ "h_sup1 = 2679.4; \t\t\t#kJ/kg\n",
+ "# At 150 \u00b0C\n",
+ "T2 = 150.; \t\t\t#\u00b0C\n",
+ "h_sup2 = 2778.2; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "c_ps = (h_sup2-h_sup1)/(T2-T1);\n",
+ "print (\"mean specific heat = \"),(c_ps)\n",
+ "\n",
+ "print (\"(ii) at 0.5 bar, between 300\u00b0C and 400\u00b0C\")\n",
+ "T1 = 300; \t\t\t#\u00b0C\n",
+ "h_sup1 = 3075.5; \t#kJ/kg\n",
+ "T2 = 400; \t\t\t#\u00b0C\n",
+ "h_sup2 = 3278.9; \t#kJ/kg\n",
+ "\n",
+ "c_ps = (h_sup2-h_sup1)/(T2-T1);\n",
+ "print (\"mean specific heat c_ps = \"),(c_ps)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) at 0.75 bar, between 100\u00b0C and 150\u00b0C\n",
+ "mean specific heat = 1.976\n",
+ "(ii) at 0.5 bar, between 300\u00b0C and 400\u00b0C\n",
+ "mean specific heat c_ps = 2.034\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.9 page no : 79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m = 1.5; \t\t\t#kg\n",
+ "p = 5.; \t\t\t#bar\n",
+ "x1 = 1.;\n",
+ "x2 = 0.6;\n",
+ "p1 = 5.*10**5; \t\t\t#N/m\n",
+ "# At 5 bar: From steam tables\n",
+ "t_s = 151.8; \t\t\t#0C\n",
+ "h_f = 640.1; \t\t\t#kJ/kg\n",
+ "h_fg = 2107.4; \t\t\t#kJ/kg\n",
+ "v_g = 0.375; \t\t\t#m**3/kg\n",
+ "v_g1 = 0.375*10**(-3);\n",
+ "\n",
+ "# Calculations and Results\n",
+ "h1 = h_f+h_fg;\n",
+ "V = m*v_g;\n",
+ "u1 = h1-p1*v_g1;\n",
+ "v_g2 = V/m/x2; \t\t\t#m**3/kg\n",
+ "\n",
+ "# From steam table corresponding to 0.625 m**3/kg\n",
+ "p2 = 2.9; \t\t\t#bar\n",
+ "print (\"Pressure at new state = \"),(p2),(\"bar\")\n",
+ "\n",
+ "t_s = 132.4; \t\t\t#0C\n",
+ "print (\"Temperature at new state = \"),(t_s),(\"\u00b0C\")\n",
+ "h_f2 = 556.5; \t\t\t#kJ/kg\n",
+ "h_fg2 = 2166.6; \t\t\t#kJ/kg\n",
+ "u2 = (h_f2+x2*h_fg2)-p2*x2*v_g2*10**2;\n",
+ "\n",
+ "Q = u2-u1; \t\t\t#heat transferred at consmath.tant volume per kg\n",
+ "\n",
+ "Q_total = m*Q;\n",
+ "print (\"Total heat transfered,Q_total = \"),(Q_total),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure at new state = 2.9 bar\n",
+ "Temperature at new state = 132.4 \u00b0C\n",
+ "Total heat transfered,Q_total = -1218.435 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.10 page no : 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "V = 0.9; \t\t\t#m**3\n",
+ "p1 = 8.; \t\t\t#bar\n",
+ "x1 = 0.9;\n",
+ "p2 = 4.; \t\t\t#bar\n",
+ "p3 = 3.; \t\t\t#bar\n",
+ "v_g1 = 0.24; \t\t#m**3/kg\n",
+ "\n",
+ "print (\"(i) The mass of steam blown off :\")\n",
+ "m1 = V/x1/v_g1;\n",
+ "h_f1 = 720.9; \t\t\t#kJ/kg\n",
+ "h_fg1 = 2046.5; \t\t#kJ/kg\n",
+ "h_f2 = 604.7; \t\t\t#kJ/kg\n",
+ "h_fg2 = 2133; \t\t\t#kJ/kg\n",
+ "v_g2 = 0.462; \t\t\t#m**3/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "h1 = h_f1+x1*h_fg1; \t\t\t#The enthalpy of steam before blowing off\n",
+ "h2 = h1;\n",
+ "x2 = (h1-h_f2)/h_fg2;\n",
+ "m2 = x1/(x2*v_g2);\n",
+ "\n",
+ "m = m1-m2;\n",
+ "print (\"Mass of steam blown off = %.3f\")%(m),(\"kg\")\n",
+ "\n",
+ "print (\"(ii) Dryness fraction of steam in the vessel after cooling\")\n",
+ "v_g3 = 0.606; \t\t\t#m**3/kg\n",
+ "x3 = x2*v_g2/v_g3;\n",
+ "print (\"dryness fraction = %.4f\")%(x3)\n",
+ "x3 = 0.699\n",
+ "\n",
+ "print (\"(iii) Heat lost during cooling\")\n",
+ "h_f3 = 561.4; \t\t\t #kJ/kg\n",
+ "h_fg3 = 2163.2; \t\t\t#kJ/kg\n",
+ "h3 = h_f3+x3*h_fg3;\n",
+ "u2 = h2-p2*x2*v_g2*10**2; \t\t\t#kJ/kg\n",
+ "u3 = h3-p3*x3*v_g3*10**2; \t\t\t#kJ/kg\n",
+ "Q = m*(u3-u2);\n",
+ "print (\"Heat lost during cooling = %.3f\")%(-Q),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The mass of steam blown off :\n",
+ "Mass of steam blown off = 2.045 kg\n",
+ "(ii) Dryness fraction of steam in the vessel after cooling\n",
+ "dryness fraction = 0.6998\n",
+ "(iii) Heat lost during cooling\n",
+ "Heat lost during cooling = 913.322 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.11 page no : 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p = 8*10**5; \t\t\t#Pa\n",
+ "x = 0.8; \n",
+ "v_g = 0.240; \t\t\t#m**3/kg\n",
+ "h_fg = 2046.5; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) External work done during evaporation\")\n",
+ "W = p*x*v_g/10**3; \t\t\t#kJ\n",
+ "print (\"W = \"),(W),(\"kJ\")\n",
+ "\n",
+ "print (\"(ii) Internal latent heat\")\n",
+ "Q = x*h_fg-W;\n",
+ "print (\"Q = \"),(Q),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) External work done during evaporation\n",
+ "W = 153.6 kJ\n",
+ "(ii) Internal latent heat\n",
+ "Q = 1483.6 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.12 page no : 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "p1 = 10; \t\t\t#bar\n",
+ "import math \n",
+ "p2 = 10; \t\t\t#bar\n",
+ "x1 = 0.85;\n",
+ "V1 = 0.15; \t\t\t#m**3\n",
+ "t_sup2 = 300; \t\t\t#0C\n",
+ "t_sup1 = 179.9; \t\t\t#0C\n",
+ "c_ps = 2.2; \t\t\t#kJ/kg.K\n",
+ "v_g1 = 0.194; \t\t\t#m**3/kg\n",
+ "m = V1/(x1*v_g1);\n",
+ "h_fg1 = 2013.6; \t\t\t#kJ/kg\n",
+ "Q = (1-x1)*h_fg1+c_ps*(t_sup2-t_sup1);\n",
+ "Q_total = m*Q;\n",
+ "\n",
+ "print (\"Total heat supplied = %.3f\")%(Q_total),(\"kJ\")\n",
+ "\n",
+ "v_sup2 = v_g1*(t_sup2+273)/(t_sup1+273)\n",
+ "W = p1*(v_sup2 - (x1*v_g1))*10**2;\n",
+ "Percentage = W/Q*100;\n",
+ "\n",
+ "print (\"Percentage of total heat supplied = %.3f\")%(Percentage),(\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total heat supplied = 515.094 kJ\n",
+ "Percentage of total heat supplied = 14.224 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.13 page no : 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p = 18.; \t\t\t#bar\n",
+ "x = 0.85;\n",
+ "h_f = 884.6; \t\t\t#kJ/kg\n",
+ "h_fg = 1910.3; \t\t\t#kJ/kg\n",
+ "v_g = 0.110; \t\t\t#m**3/kg\n",
+ "u_f = 883.; \t\t\t#kJ/kg\n",
+ "u_g = 2598.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "v = x*v_g;\n",
+ "print (\"Specific volume of wet steam = \"),(v),(\"m**3/kg\")\n",
+ "\n",
+ "h = h_f+x*h_fg;\n",
+ "print (\"Specific enthalpy of wet steam = \"),(h),(\"kJ/kg\")\n",
+ "u = (1-x)*u_f+ x*u_g;\n",
+ "print (\"Specific internal energy of wet steam = \"),(u),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific volume of wet steam = 0.0935 m**3/kg\n",
+ "Specific enthalpy of wet steam = 2508.355 kJ/kg\n",
+ "Specific internal energy of wet steam = 2340.75 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.14 page no : 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p = 7.; \t\t\t#bar\n",
+ "h = 2550.; \t\t\t#kJ/kg\n",
+ "h_f = 697.1; \t\t\t#kJ/kg\n",
+ "h_fg = 2064.9; \t\t\t#kJ/kg\n",
+ "v_g = 0.273; \t\t\t#m**3/kg\n",
+ "u_f = 696.; \t\t\t#kJ/kg\n",
+ "u_g = 2573.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "x = (h-h_f)/h_fg;\n",
+ "print (\"(i) Dryness fraction = %.3f\")%(x)\n",
+ "\n",
+ "v = x*v_g;\n",
+ "print (\"(ii) Specific volume of wet steam = %.3f\")%(v),(\"m**3/kg\")\n",
+ "\n",
+ "u = (1-x)*u_f+ x*u_g;\n",
+ "print (\"(iii) Specific internal energy of wet steam = %.3f\")%(u),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Dryness fraction = 0.897\n",
+ "(ii) Specific volume of wet steam = 0.245 m**3/kg\n",
+ "(iii) Specific internal energy of wet steam = 2380.291 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.15 page no : 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "p = 120.; \t\t\t#bar\n",
+ "v = 0.01721; \t\t\t#m**3/kg\n",
+ "\n",
+ "T = 350.; \t\t\t#\u00b0C\n",
+ "print (\"Temperature = \"), (T),(\"\u00b0C\")\n",
+ "\n",
+ "h = 2847.7; \t\t\t#kJ/kg\n",
+ "print (\"specific enthalpy = \"), (h),(\"kJ/kg\")\n",
+ "\n",
+ "u = h-p*v*10**2; \t\t\t#kJ/kg\n",
+ "print (\"Internal energy = \"), (u),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature = 350.0 \u00b0C\n",
+ "specific enthalpy = 2847.7 kJ/kg\n",
+ "Internal energy = 2641.18 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.16 page no : 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p = 140.; \t\t\t#bar\n",
+ "h = 3001.9; \t\t\t#kJ/kg\n",
+ "T = 400; \t\t\t#0C\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"Temperature = \"),(T), (\"\u00b0C\")\n",
+ "\n",
+ "v = 0.01722; \t\t\t#m**3/kg\n",
+ "print (\"The specific volume %.3f\")%(v), (\"m**3/kg\")\n",
+ "\n",
+ "u = h-p*v*10**2;\n",
+ "print (\"specific internal energy = \"),(u),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature = 400 \u00b0C\n",
+ "The specific volume 0.017 m**3/kg\n",
+ "specific internal energy = 2760.82 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.17 page no : 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# At 10 bar: From steam table for superheated steam\n",
+ "\n",
+ "# Variables\n",
+ "h_sup = 3051.2; \t\t\t#kJ/kg\n",
+ "T_sup = 573; \t\t\t#K\n",
+ "T_s = 452.9; \t\t\t#K\n",
+ "v_g = 0.194; \t\t\t#m**3/kg\n",
+ "v_sup = v_g*T_sup/T_s;\n",
+ "p = 10.; \t\t\t#bar\n",
+ "\n",
+ "# Calculations and Results\n",
+ "u1 = h_sup-p*v_sup*10**2; \t\t\t#kJ/kg\n",
+ "print (\"Internal energy of superheated steam at 10 bar = %.3f\")%(u1), (\"kJ/kg\")\n",
+ "\n",
+ "# At 1.4 bar: From steam tables\n",
+ "p = 1.4; \t\t\t#bar\n",
+ "h_f = 458.4; \t\t\t#kJ/kg\n",
+ "h_fg = 2231.9; \t\t\t#kJ/kg\n",
+ "v_g = 1.236; \t\t\t#m**3/kg\n",
+ "x = 0.8;\n",
+ "h = h_f+x*h_fg;\n",
+ "u2 = h-p*x*v_g*10**2; \t\t\t#kJ\n",
+ "du = u2-u1;\n",
+ "print (\"Change in internal energy = %.3f\")%(du),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Internal energy of superheated steam at 10 bar = 2805.755 kJ/kg\n",
+ "Change in internal energy = -700.267 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.18 page no : 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m = 1.; \t\t\t#kg\n",
+ "p = 20.; \t\t\t#bar\n",
+ "T_sup = 400.; \t\t\t#0C\n",
+ "x = 0.9;\n",
+ "c_ps = 2.3; \t\t\t#kJ/kg.K\n",
+ "\n",
+ "print (\"(i) Internal energy of 1 kg of superheated steam\")\n",
+ "# At 20 bar: From steam tables\n",
+ "T_s = 212.4; \t\t\t#0C\n",
+ "h_f = 908.6; \t\t\t#kJ/kg\n",
+ "h_fg = 1888.6; \t\t\t#kJ/kg\n",
+ "v_g = 0.0995; \t\t\t#m**3/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "h_sup = h_f+h_fg+c_ps*(T_sup-T_s);\n",
+ "v_sup = v_g*(T_sup+273)/(T_s+273);\n",
+ "u = h_sup-p*v_sup*10**2;\n",
+ "print (\"Internal energy = %.3f\")%(u),(\"kJ/kg\")\n",
+ "\n",
+ "print (\"(ii) Internal energy of 1 kg of wet steam\")\n",
+ "h = h_f+x*h_fg;\n",
+ "u = h-p*x*v_g*10**2;\n",
+ "print (\"Internal energy = %.3f\")%(u),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Internal energy of 1 kg of superheated steam\n",
+ "Internal energy = 2952.769 kJ/kg\n",
+ "(ii) Internal energy of 1 kg of wet steam\n",
+ "Internal energy = 2429.240 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.19 page no : 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h_g1 = 2797.2; \t\t\t#kJ/kg\n",
+ "c_ps = 2.25;\n",
+ "T_sup = 350.; \t\t\t#0C\n",
+ "T_s = 212.4; \t\t\t#0C\n",
+ "\n",
+ "# Calculations\n",
+ "h1 = h_g1+c_ps*(T_sup-T_s);\n",
+ "h_f2 = 908.6; \t\t\t#kJ/kg\n",
+ "h_fg2 = 1888.6; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Main:20 bar, 250 0C\n",
+ "T_sup = 250.; \t\t\t#0C\n",
+ "Q = 2*(h_g1+c_ps*(T_sup-T_s));\n",
+ "x2 = (Q-h1-h_f2)/h_fg2;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Quality of steam %.3f\")%(x2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Quality of steam 0.926\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.20 page no : 87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "m = 1.; \t\t\t#kg\n",
+ "p = 6.; \t\t\t#bar\n",
+ "x = 0.8;\n",
+ "T_s = 473.; \t\t\t#K\n",
+ "h_fg = 2085.; \t\t\t#kJ/kg\n",
+ "c_pw = 4.18;\n",
+ "\n",
+ "# Calculations\n",
+ "s_wet = c_pw*math.log(T_s/273)+x*h_fg/T_s;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Entropy of wet steam = %.3f\")%(s_wet),(\"kJ/kg.K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy of wet steam = 5.824 kJ/kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.21 page no : 87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 10.; \t\t\t#bar\n",
+ "t_sup = 400.; \t\t#0C\n",
+ "p2 = 0.2; \t\t\t#bar\n",
+ "x2 = 0.9;\n",
+ "h_sup = 3263.9; \t\t\t#kJ/kg\n",
+ "s_sup = 7.465; \t\t\t#kJ/kg\n",
+ "h1 = 3263.9; \t\t\t#kJ/kg\n",
+ "s1 = s_sup;\n",
+ "h_f2 = 251.5; \t\t\t#kJ/kg\n",
+ "h_fg2 = 2358.4; \t\t#kJ/kg\n",
+ "s_f2 = 0.8321; \t\t\t#kJ/kg.K\n",
+ "s_g2 = 7.9094; \t\t\t#kJ/kg.K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "s_fg2 = s_g2-s_f2;\n",
+ "h2 = h_f2+x2*h_fg2;\n",
+ "s2 = s_f2+x2*s_fg2;\n",
+ "\n",
+ "print (\"(i) Drop in enthalpy\")\n",
+ "dh = h1-h2;\n",
+ "print (\"Drop in enthalpy = %.3f\")%(dh),(\"kJ/kg\")\n",
+ "\n",
+ "print (\"(ii) Change in entropy\")\n",
+ "ds = s1-s2;\n",
+ "print (\"Change in entropy = %.3f\")%(ds),(\"kJ/kg.K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Drop in enthalpy\n",
+ "Drop in enthalpy = 889.840 kJ/kg\n",
+ "(ii) Change in entropy\n",
+ "Change in entropy = 0.263 kJ/kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.22 page no : 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m = 1.; \t\t \t #kg\n",
+ "p = 12.; \t\t \t#bar\n",
+ "T_sup = 523.; \t\t\t#K\n",
+ "c_ps = 2.1; \t\t\t#kJ/kg.K\n",
+ "T_s = 461.; \t\t\t#K\n",
+ "h_fg = 1984.3; \t\t\t#kJ/kg\n",
+ "c_pw = 4.18;\n",
+ "\n",
+ "# Calculations\n",
+ "s_sup = c_pw*math.log(T_s/273)+h_fg/T_s+c_ps*math.log(T_sup/T_s);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Entropy = %.3f\")%(s_sup),(\"kJ/kg.K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy = 6.759 kJ/kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.23 page no : 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m = 3.; \t\t\t#kg\n",
+ "v1 = 0.75; \t\t\t#m**3/kg\n",
+ "v2 = 1.2363; \t\t\t#m**3/kg\n",
+ "x = v1/v2;\n",
+ "h_f = 458.4; \t\t\t#kJ/kg\n",
+ "h_fg = 2231.9; \t\t\t#kJ/kg\n",
+ "h_s = m*(h_f+x*h_fg); \t\t\t#kJ\n",
+ "v_sup = 1.55; \t\t\t#m**3/kg\n",
+ "p = 2; \t\t\t#bar\n",
+ "t_s = 120.2; \t\t\t#0C\n",
+ "t_sup = 400; \t\t\t#0C\n",
+ "h = 3276.6; \t\t\t#kJ/kg\n",
+ "U = 1708.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Degree = t_sup-t_s;\n",
+ "h_sup = m*h;\n",
+ "\n",
+ "Q_added = h_sup - h_s;\n",
+ "print (\"Heat added = %.3f\")%(Q_added),(\"kJ\")\n",
+ "\n",
+ "U_s = m*U;\n",
+ "U_sup = m*(h-p*v_sup*10**2);\n",
+ "dU = U_sup - U_s;\n",
+ "W = Q_added - dU;\n",
+ "print (\"work done = %.3f\")%(W),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat added = 4392.661 kJ\n",
+ "work done = 616.861 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.24 page no : 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p = 5.; \t\t\t#bar\n",
+ "m = 50.; \t\t\t#kg\n",
+ "T1 = 20.; \t\t\t#0C\n",
+ "m_s = 3.; \t\t\t#kg\n",
+ "T2 = 40.; \t\t\t#0C\n",
+ "m_eq = 1.5; \t\t\t#kg\n",
+ "h_f = 640.1; \t\t\t#kJ/kg\n",
+ "h_fg = 2107.4; \t\t\t#kJ/kg\n",
+ "c_pw = 4.18;\n",
+ "\n",
+ "# Calculations\n",
+ "m_w = m+m_eq;\n",
+ "x = ((m_w*c_pw*(T2-T1))/m_s + c_pw*T2 - h_f)/h_fg;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Dryness fraction of steam %.3f\")%(x)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dryness fraction of steam 0.457\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.25 page no : 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p = 1.1; \t\t\t#bar\n",
+ "x = 0.95;\n",
+ "c_pw = 4.18;\n",
+ "m1 = 90.; \t\t\t#kg\n",
+ "m2 = 5.25; \t\t\t#kg\n",
+ "T1 = 25.; \t\t\t#0C\n",
+ "T2 = 40.; \t\t\t#0C\n",
+ "\n",
+ "# Calculations\n",
+ "m = m1+m2;\n",
+ "h_f = 428.8; \t\t\t#kJ/kg\n",
+ "h_fg = 2250.8; \t\t\t#kJ/kg\n",
+ "m_s = (m*c_pw*(T2-T1))/((h_f + x*h_fg) - c_pw*T2)\n",
+ "\n",
+ "# Results\n",
+ "print (\"Mass of steam condensed = %.3f\")%(m_s),(\"kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of steam condensed = 2.489 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.26 page no : 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 8.; \t\t\t#bar\n",
+ "p2 = 1.; \t\t\t#bar\n",
+ "T_sup2 = 115.; \t\t#0C\n",
+ "T_s2 = 99.6; \t\t#0C\n",
+ "h_f1 = 720.9; \t\t#kJ/kg\n",
+ "h_fg1 = 2046.5; \t#kJ/kg\n",
+ "h_f2 = 417.5; \t\t#kJ/kg\n",
+ "h_fg2 = 2257.9; \t#kJ/kg\n",
+ "c_ps = 2.1;\n",
+ "\n",
+ "# Calculations\n",
+ "x1 = (h_f2+h_fg2+c_ps*(T_sup2-T_s2)-h_f1)/h_fg1;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Dryness fraction of the steam in the main = %.3f\")%(x1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dryness fraction of the steam in the main = 0.971\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.27 page no : 94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m_w = 2.; \t\t\t#kg\n",
+ "m_s = 20.5; \t\t#kg\n",
+ "t_sup = 110.; \t\t#0C\n",
+ "p1 = 12.; \t\t\t#bar\n",
+ "p3 = 1.; \t\t\t#bar\n",
+ "p2 = p1;\n",
+ "h_f2 = 798.4; \t\t#kJ/kg\n",
+ "h_fg2 = 1984.3; \t#kJ/kg\n",
+ "T_s = 99.6; \t\t#0C\n",
+ "h_f3 = 417.5; \t\t#kJ/kg\n",
+ "h_fg3 = 2257.9; \t#kJ/kg\n",
+ "T_sup = 110.; \t\t#0C\n",
+ "c_ps = 2.; \t\t\t#kJ/kg.K\n",
+ "\n",
+ "# Calculations\n",
+ "x2 = (h_f3+h_fg3 + c_ps*(T_sup-T_s) - h_f2)/h_fg2;\n",
+ "x1 = x2*m_s/(m_w+m_s);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Quality of steam supplied = %.3f\")%(x1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Quality of steam supplied = 0.871\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.28 page no : 95"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 15.; \t\t\t#bar\n",
+ "p2 = p1;\n",
+ "p3 = 1.; \t\t\t#bar\n",
+ "t_sup3 = 150.; \t\t#0C\n",
+ "m_w = 0.5; \t\t\t#kg/min\n",
+ "m_s = 10.; \t\t\t#kg/min\n",
+ "h_f2 = 844.7; \t\t#kJ/kg\n",
+ "h_fg2 = 1945.2; \t#kJ/kg\n",
+ "h_sup3 = 2776.4; \t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "x2 = (h_sup3 - h_f2)/h_fg2;\n",
+ "x1 = x2*m_s/(m_s + m_w);\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print (\"Quality of steam supplied = %.3f\")%(x1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Quality of steam supplied = 0.946\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch4.ipynb b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch4.ipynb
new file mode 100755
index 00000000..b6621911
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch4.ipynb
@@ -0,0 +1,3240 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4 : First Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.1 page no : 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "Q = -50.; \t\t\t#kJ/kg\n",
+ "W = -100.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "dU = Q-W;\n",
+ "\n",
+ "# Results\n",
+ "print (\"gain in internal energy = \"),(dU),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain in internal energy = 50.0 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.2 page no : 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "u1 = 450.; \t\t\t#kJ/kg\n",
+ "u2 = 220; \t\t\t#kJ/kg\n",
+ "W = 120; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "Q = (u2-u1) + W;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Heat rejected by air = \"),(-Q),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat rejected by air = 110.0 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.3 page no : 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m = 0.3; \t\t\t#kg\n",
+ "cv = 0.75; \t\t\t#kJ/kg.K\n",
+ "T1 = 313.; \t\t\t#K\n",
+ "T2 = 433.; \t\t\t#K\n",
+ "W = -30.; \t\t\t#kJ\n",
+ "\n",
+ "# Calculations\n",
+ "dU = m*cv*(T2-T1);\n",
+ "Q = dU + W;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Heat rejected during the process = \"),(-Q),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat rejected during the process = 3.0 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.4 page no : 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 105.; \t\t\t#kPa\n",
+ "V1 = 0.4; \t\t\t#m**3\n",
+ "p2 = p1;\n",
+ "V2 = 0.20; \t\t\t#m**3\n",
+ "Q = -42.5; \t\t\t#kJ\n",
+ "\n",
+ "# Calculations\n",
+ "W = p1*(V2-V1);\n",
+ "dU = Q-W;\n",
+ "\n",
+ "# Results\n",
+ "print (\"change in internal energy = \"),(dU),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in internal energy = -21.5 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.6 Page no :121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "p1 = 10.**5 # Pa\n",
+ "T1 = 25 + 273 # K\n",
+ "p2 = 5 * 10**5 # Pa\n",
+ "T2 = T1 \n",
+ "\n",
+ "# Calculations and Result\n",
+ "print \"(i) For isothermal process :\"\n",
+ "W12 = -p1 * (1.8)* math.log(p1/p2)\n",
+ "print \"Work done on the air = %.3e kJ/kg.\"%W12\n",
+ "\n",
+ "print \"(ii) Since temperature is constant,\"\n",
+ "print \"u2 \u2013 u1 = 0\"\n",
+ "print \"Change in internal energy = zero.\"\n",
+ "\n",
+ "print \"(iii) Again,\"\n",
+ "Q12 = 0 + W12\n",
+ "print \"Heat rejected = %.3e kJ/kg.\"%Q12\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) For isothermal process :\n",
+ "Work done on the air = 2.897e+05 kJ/kg.\n",
+ "(ii) Since temperature is constant,\n",
+ "u2 \u2013 u1 = 0\n",
+ "Change in internal energy = zero.\n",
+ "(iii) Again,\n",
+ "Heat rejected = 2.897e+05 kJ/kg.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.7 page no : 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "W_12 = -82.; \t\t\t#kJ\n",
+ "Q_12 = -45.; \t\t\t#kJ\n",
+ "dU_12 = Q_12 - W_12;\n",
+ "W_21 = 100.; \t\t\t#kJ\n",
+ "dU_21 = -dU_12;\n",
+ "\n",
+ "# Calculations\n",
+ "Q_21 = dU_21 + W_21;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Heat added to the system = \"),(Q_21),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat added to the system = 63.0 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.8 page no : 123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "Q2 = 9000.; \t\t\t#kJ\n",
+ "Q1 = 3000.; \t\t\t#kJ\n",
+ "Q = Q1-Q2; \n",
+ "W = 0;\n",
+ "\n",
+ "# Calculations\n",
+ "dU = W-Q;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Work done = \"),(W)\n",
+ "\n",
+ "print (\"Change in internal energy = \"),(dU),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done = 0\n",
+ "Change in internal energy = 6000.0 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.9 page no : 124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m = 20.; \t\t\t#kg\n",
+ "g = 9.81; \t\t\t#m/s**2\n",
+ "z2 = 0.;\n",
+ "z1 = 15.;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) When the stone is about to enter the water\")\n",
+ "Q = 0\n",
+ "W = 0\n",
+ "dU = 0\n",
+ "PE = m*g*(z2-z1)\n",
+ "KE = -PE\n",
+ "print \"\u2206 PE = %.3f\"%KE,\"J\"\n",
+ "\n",
+ "print (\"(ii) When the stone dips into the math.tank and comes to rest\")\n",
+ "Q = 0\n",
+ "W = 0\n",
+ "KE = 0\n",
+ "PE = m*g*(z2-z1)\n",
+ "dU = -PE\n",
+ "print \"\u2206U = %.3f\"%dU\n",
+ "\n",
+ "print (\"(iii) When the water and stone come to their initial temperature\")\n",
+ "W = 0\n",
+ "KE = 0\n",
+ "Q = -dU\n",
+ "print \"Q = %.3f\"%Q\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) When the stone is about to enter the water\n",
+ "\u2206 PE = 2943.000 J\n",
+ "(ii) When the stone dips into the math.tank and comes to rest\n",
+ "\u2206U = 2943.000\n",
+ "(iii) When the water and stone come to their initial temperature\n",
+ "Q = -2943.000\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.10 page no : 125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "Q_lqm = 168.; \t\t\t#kJ\n",
+ "W_lqm = 64.; \t\t\t#kJ\n",
+ "dU_lm = Q_lqm - W_lqm;\n",
+ "W_lnm = 21.; \t\t\t#kJ\n",
+ "W_ml = -42.; \t\t\t#kJ\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Q_lnm = dU_lm + W_lnm;\n",
+ "print (\"(i)Q_lnm = \"),(Q_lnm), (\"kJ\")\n",
+ "\n",
+ "Q_ml = W_ml - dU_lm;\n",
+ "print (\"(ii)Q_ml = \"),(Q_ml),(\"kJ\")\n",
+ "\n",
+ "W_ln = 21.; \t\t\t#kJ\n",
+ "dU_ln = 84.; \t\t\t#kJ\n",
+ "Q_ln = dU_ln + W_ln;\n",
+ "Q_nm = Q_lnm-Q_ln;\n",
+ "print (\"(iii)Q_nm = \"), (Q_nm), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Q_lnm = 125.0 kJ\n",
+ "(ii)Q_ml = -146.0 kJ\n",
+ "(iii)Q_nm = 20.0 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.11 page no : 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "T1 = 55.; \t\t\t#0C\n",
+ "T2 = 95.; \t\t\t#0C\n",
+ "\n",
+ "# Calculations\n",
+ "def f1( T): \n",
+ "\t return 200\n",
+ "W = quad(f1, T1, T2)[0]\n",
+ "\n",
+ "\n",
+ "def f2( T): \n",
+ "\t return 160\n",
+ "Q = quad(f2, T1, T2)[0]\n",
+ "dU = Q-W;\n",
+ "\n",
+ "# Results\n",
+ "print (\"change in internal energy = \"),(dU/10**3),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in internal energy = -1.6 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.12 page no : 127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "Q = -340.; \t\t\t#kJ\n",
+ "n = 200.; \t\t\t#cycles/min\n",
+ "\n",
+ "#For Process 1-2\n",
+ "W_12 = 4340.; \t\t\t#kJ/min\n",
+ "Q_12 = 0.;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "dE_12 = Q_12-W_12;\n",
+ "print (\"dE_12 = \"),(dE_12),(\"kJ/min\")\n",
+ "\n",
+ "#For process 2-3\n",
+ "Q_23 = 42000.; \t\t\t#kJ/min\n",
+ "W_23 = 0;\n",
+ "\n",
+ "dE_23 = Q_23-W_23;\n",
+ "print (\"dE_23 = \"),(dE_23),(\"kJ/min\")\n",
+ "\n",
+ "#For process 3-4\n",
+ "Q_34 = -4200.; \t\t\t#kJ/min\n",
+ "dE_34 = -73200.; \t\t\t#kJ/min\n",
+ "\n",
+ "W_34 = Q_34-dE_34;\n",
+ "print (\"W_34 = \"), (W_34), (\"kJ/min\")\n",
+ "\n",
+ "#For process 4-1\n",
+ "Q_41 = Q*n-Q_12-Q_23-Q_34;\n",
+ "print (\"Q_41 = \"), (Q_41), (\"kJ/min\")\n",
+ "\n",
+ "dE_41 = 0-dE_12-dE_23-dE_34;\n",
+ "print (\"dE_41 = \"), (dE_41), (\"kJ/min\")\n",
+ "\n",
+ "W_41 = Q_41-dE_41;\n",
+ "print (\"W_41 = \"), (W_41), (\"kJ/min\")\n",
+ "\n",
+ "print \"Since sum(Q) = sum(W), \"\n",
+ "print \"Rate of work output = -68000 KJ/min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dE_12 = -4340.0 kJ/min\n",
+ "dE_23 = 42000.0 kJ/min\n",
+ "W_34 = 69000.0 kJ/min\n",
+ "Q_41 = -105800.0 kJ/min\n",
+ "dE_41 = 35540.0 kJ/min\n",
+ "W_41 = -141340.0 kJ/min\n",
+ "Since sum(Q) = sum(W), \n",
+ "Rate of work output = -68000 KJ/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.13 page no : 128"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "P = 1200.; \t\t\t#kW\n",
+ "Qin = 3360.; \t\t\t#kJ/kg\n",
+ "Qout = 2520.; \t\t\t#kJ/kg\n",
+ "F = 6.; \t\t\t#kW\n",
+ "\n",
+ "# Calculations\n",
+ "dQ = Qin - Qout;\n",
+ "dW = P-F; \t\t\t#kJ/s\n",
+ "m = dW/dQ;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Steam flow round the cycle %.3f\")%(m), (\"kg/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Steam flow round the cycle 1.421 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.14 page no : 129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "dT = 25.; \t\t\t#0C\n",
+ "Q = 30.; \t\t\t#kJ\n",
+ "cv = 1.2; \t\t\t#kJ/kg.0C\n",
+ "m = 2.5; \t\t\t#kg\n",
+ "\n",
+ "# Calculations\n",
+ "dU = m*cv*dT;\n",
+ "\n",
+ "# Results\n",
+ "print (\"change in internal energy = \"),(dU), (\"kJ\")\n",
+ "\n",
+ "W = Q - dU;\n",
+ "print (\"Work done = \"),(W),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in internal energy = 75.0 kJ\n",
+ "Work done = -45.0 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.15 page no : 129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "Q = 50.; \t\t\t#kJ\n",
+ "dV = 0.14; \t\t\t#m**3\n",
+ "p = 1.2*10**5; \t\t#N/m**2\n",
+ "m = 90.; \t\t\t#kg\n",
+ "d = 5.5; \t\t\t#m\n",
+ "g = 9.8; \t\t\t#m/s**2\n",
+ "W_adb = -110.; \t#kJ\n",
+ "Wnet = m*g*d/1000; \t#kJ\n",
+ "\n",
+ "# Calculations and Results\n",
+ "W = p*dV/1000 + Wnet; \t\t\t#kJ\n",
+ "dE = Q-W;\n",
+ "print (\"(i)Change in internal energy %.3f kJ\")%(dE)\n",
+ "\n",
+ "Q = 0;\n",
+ "dE = -W_adb;\n",
+ "print (\"(ii) Adiabatic process %.3f kJ\")%(dE)\n",
+ "\n",
+ "\n",
+ "Q = 50.; \t\t\t#kJ\n",
+ "dE = Q - (W_adb+W);\n",
+ "print (\"(iii)Change in internal energy %.3f kJ\")%(dE)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Change in internal energy 28.349 kJ\n",
+ "(ii) Adiabatic process 110.000 kJ\n",
+ "(iii)Change in internal energy 138.349 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.16 page no : 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "V1 = 0.15; \t\t\t#m**3\n",
+ "V2 = 0.05; \t\t\t#m**3\n",
+ "Q = -45.; \t\t\t#kJ\n",
+ "p1 = (5./V1+1.5)*10**5; \t\t\t#N/m**2\n",
+ "p2 = (5./V2+1.5)*10**5; \t\t\t#N/m**2\n",
+ "\n",
+ "# Calculations\n",
+ "def f0( V): \n",
+ "\t return (5/V+1.5)*10**2\n",
+ "\n",
+ "W = quad(f0, V1, V2)[0]\n",
+ "\n",
+ "dU = Q-W;\n",
+ "print (\"(i)Change in internal energy = %.3f kJ\")%(dU)\n",
+ "\n",
+ "dH = (dU*10**3+(p2*V2-p1*V1))/10**3;\n",
+ "print (\"(ii) Change in enthalpy = %.3f kJ\")%(dH)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Change in internal energy = 519.306 kJ\n",
+ "(ii) Change in enthalpy = 504.306 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.17 page no : 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "V1 = 0.25; \t\t\t#m**3\n",
+ "p1 = 500.; \t\t\t#kPa\n",
+ "p2 = 100.; \t\t\t#kPa\n",
+ "\n",
+ "# Calculations and Results\n",
+ "V2 = V1*(p1/p2)**(1/1.25)\n",
+ "n = 1.25\n",
+ "dU = 3.64*(p2*V2 - p1*V1)\n",
+ "\n",
+ "print (\"(i) If the expansion is quasi-static\")\n",
+ "W = (p1*V1-p2*V2)/(n-1);\n",
+ "Q = dU+W\n",
+ "print (\"Heat transfered = %.3f\")%(Q),(\"kJ\")\n",
+ "\n",
+ "print (\"(ii) In another process\")\n",
+ "Q = 32; \t\t\t#kJ\n",
+ "W = Q-dU;\n",
+ "print (\"Work done = %.3f\")%(W),(\"kJ\")\n",
+ "\n",
+ "print (\"(iii)The difference\")\n",
+ "print (\" The work in (ii) is not equal to \u222b p dV math.since the process is not quasi-static.\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) If the expansion is quasi-static\n",
+ "Heat transfered = 12.385 kJ\n",
+ "(ii) In another process\n",
+ "Work done = 157.225 kJ\n",
+ "(iii)The difference\n",
+ " The work in (ii) is not equal to \u222b p dV math.since the process is not quasi-static.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.18 page no : 132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "v1 = 0.3; \t\t\t#m**3/kg\n",
+ "T1 = 20.; \t\t\t#0C\n",
+ "v2 = 0.55; \t\t\t#m**3/kg\n",
+ "T2 = 260; \t\t\t#0C\n",
+ "p = 1.6*10**5; \t\t\t#Pa\n",
+ "\n",
+ "print (\"(i)Heat added per kg = \")\n",
+ "\n",
+ "# Calculations and Results\n",
+ "def f5( T): \n",
+ "\t return 1.5 + 75/(T+45)\n",
+ "\n",
+ "Q = quad(f5, T1,T2)[0]\n",
+ "\n",
+ "print (\"Q = %.3f\")%(Q), (\"kJ/kg\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii)The work done per kg of fluid\")\n",
+ "W = p*(v2-v1)/1000; \t\t\t#kJ/kg\n",
+ "print (\"W = %.3f\")%(W),(\"kJ/kg\")\n",
+ "\n",
+ "\n",
+ "print (\"(iii)Change in internal energy\")\n",
+ "dU = Q-W;\n",
+ "print (\"dU = %.3f\")%(dU),(\"kJ/kg\")\n",
+ "\n",
+ "\n",
+ "print (\"(iv)Change in enthalpy\")\n",
+ "dH = Q;\n",
+ "print (\"dH = %.3f\")%(dH),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Heat added per kg = \n",
+ "Q = 475.944 kJ/kg\n",
+ "(ii)The work done per kg of fluid\n",
+ "W = 40.000 kJ/kg\n",
+ "(iii)Change in internal energy\n",
+ "dU = 435.944 kJ/kg\n",
+ "(iv)Change in enthalpy\n",
+ "dH = 475.944 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.19 page no : 133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m = 1.; \t\t\t#kg\n",
+ "du = -42000.; \t\t\t#J\n",
+ "cp = 840.; \t\t\t#J/kg.0C\n",
+ "cv = 600.; \t\t\t#J/kg.0C\n",
+ "\n",
+ "# Calculations\n",
+ "dT = du/m/cv;\n",
+ "Q = m*cp*dT;\n",
+ "W = (Q-du)/10**3;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Work done = \"),(W),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done = -16.8 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ " Example 4.20 page no : 133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import *\n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "p1 = 190.; \t\t\t#kPa\n",
+ "V1 = 0.035; \t\t\t#m**3\n",
+ "p2 = 420.; \t\t\t#kPa\n",
+ "V2 = 0.07; \t\t\t#m**3\n",
+ "dU = 3.6*(p2*V2-p1*V1);\n",
+ "p = [[1,0.035],[1,0.07]]\n",
+ "q = [190,420];\n",
+ "#X = linalg.inv(p)*q;\n",
+ "X = linalg.solve(p,q)\n",
+ "a = X[0]\n",
+ "b = X[1]\n",
+ "\n",
+ "# Calculations\n",
+ "def f4( V): \n",
+ "\t return a+b*V\n",
+ "\n",
+ "W = quad(f4, V1, V2)[0]\n",
+ "\n",
+ "# Results\n",
+ "print (\"Work done by the system = \"),(W),(\"kJ\")\n",
+ "\n",
+ "\n",
+ "Q = dU+W;\n",
+ "print (\"Heat transfer into the system = \"),(Q),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done by the system = 10.675 kJ\n",
+ "Heat transfer into the system = 92.575 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.21 page no : 134"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "Qv = 90.; \t\t\t#kJ\n",
+ "Qp = -95; \t\t\t#kJ\n",
+ "W = -18; \t\t\t#kJ\n",
+ "U_l = 105; \t\t\t#kJ\n",
+ "W_lm = 0;\n",
+ "Q_lm = 90;\n",
+ "\n",
+ "# Calculations\n",
+ "U_m = U_l+90;\n",
+ "dU_mn = Qp-W;\n",
+ "U_n = U_m+dU_mn;\n",
+ "dQ = Qv+Qp;\n",
+ "dW = dQ;\n",
+ "W_nl = dW-W;\n",
+ "\n",
+ "# Results\n",
+ "print (\"W_nl(in kJ) = \"),(W_nl)\n",
+ "\n",
+ "print (\"U_l in kJ = \"),(U_l)\n",
+ "\n",
+ "print (\"U_m in kJ = \"),(U_m)\n",
+ "print (\"U_n in kJ\"), (U_n)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "W_nl(in kJ) = 13.0\n",
+ "U_l in kJ = 105\n",
+ "U_m in kJ = 195\n",
+ "U_n in kJ 118\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.23 page no : 136"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "V1 = 0.2; \t\t\t#m**3\n",
+ "p1 = 4.*10**5; \t\t#N/m**2\n",
+ "T1 = 403.; \t\t\t#K\n",
+ "p2 = 1.02*10**5; \t#N/m**2\n",
+ "dH = 72.5; \t\t\t#kJ\n",
+ "Q_23 = dH;\n",
+ "cp = 1.; \t\t\t#kJ/kg\n",
+ "cv = 0.714; \t\t#kJ/kg\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations\n",
+ "V2 = round(V1*(p1/p2)**(1/y),2);\n",
+ "T2 = round(T1*((p2/p1)**((y-1)/y)),1);\n",
+ "R = (cp-cv)*1000; \t\t\t#J/kg.K\n",
+ "m = round(p1*V1/R/T1,3);\n",
+ "T3 = round(Q_23/(m*cp) +T2);\n",
+ "V3 = 0.732 # round(V2*T3/T2,2);\n",
+ "W_12 = (p1*V1 - p2*V2)/(y-1);\n",
+ "W_23 = p2*(V3-V2);\n",
+ "W_123 = W_12+W_23;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Total work done = %.3f\")%(W_123),(\"J\")\n",
+ "\n",
+ "print (\"(ii) Index of expansion, n\")\n",
+ "p3 = p2;\n",
+ "n = (p1*V1-p3*V3)/W_123 + 1;\n",
+ "print (\"value of index = %.3f\")%(n)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total work done = 85454.000 J\n",
+ "(ii) Index of expansion, n\n",
+ "value of index = 1.062\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.25 page no : 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "d = 0.15; \t\t\t#m\n",
+ "T = 303.; \t\t\t#K\n",
+ "p = 3.*10**5; \t\t#N/m**2\n",
+ "l = 0.085; \t\t\t#m\n",
+ "Q = -4000.; \t\t#J\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Workdone by the system\")\n",
+ "dv = math.pi/4*d**2*l;\n",
+ "W = p*dv;\n",
+ "print (\"W = %.3f\")%(W/10**3),(\"kJ\")\n",
+ "\n",
+ "print (\"(ii) Decrease in internal energy of the system\")\n",
+ "dU = (Q-W)/10**3;\n",
+ "print (\"Decrease in internal energy = %.3f\")%(-dU),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Workdone by the system\n",
+ "W = 0.451 kJ\n",
+ "(ii) Decrease in internal energy of the system\n",
+ "Decrease in internal energy = 4.451 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.27 page no : 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "y = 1.4\n",
+ "R = 294.2; \t\t\t#J/kg.0C\n",
+ "p1 = 1.*10**5; \t\t#N/m**2\n",
+ "T1 = 353.; \t\t\t#K\n",
+ "V1 = 0.45; \t\t\t#m**3\n",
+ "V2 = 0.13; \t\t\t#m**3\n",
+ "p2 = 5.*10**5; \t\t#N/m**2\n",
+ "\n",
+ "# Calculations and Results\n",
+ "cv = R/(y-1);\n",
+ "print (\"(i) The mass of gas\")\n",
+ "m = p1*V1/R/T1;\n",
+ "print (\"m = %.3f\")%(m),(\"kg\")\n",
+ "\n",
+ "print (\"(ii) The value of index \u2018n\u2019 for compression\")\n",
+ "n = math.log(p2/p1)/math.log(V1/V2);\n",
+ "print (\"n = %.3f\")%(n)\n",
+ "\n",
+ "print (\"(iii) The increase in internal energy of the gas\")\n",
+ "T2 = T1*(V1/V2)**(n-1);\n",
+ "dU = m*cv*(T2-T1)/10**3;\n",
+ "print (\"dU = %.3f\")%(dU),(\"kJ\")\n",
+ "\n",
+ "print (\"(iv) The heat received or rejected by the gas during compression.\")\n",
+ "W = m*R*(T1-T2)/(n-1)/10**3;\n",
+ "Q = dU+W;\n",
+ "print (\"Q = %.3f\")%(Q),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The mass of gas\n",
+ "m = 0.433 kg\n",
+ "(ii) The value of index \u2018n\u2019 for compression\n",
+ "n = 1.296\n",
+ "(iii) The increase in internal energy of the gas\n",
+ "dU = 50.000 kJ\n",
+ "(iv) The heat received or rejected by the gas during compression.\n",
+ "Q = -17.535 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.28 page no : 141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 1.02*10**5; \t#Pa\n",
+ "T1 = 295.; \t\t\t#K\n",
+ "V1 = 0.015; \t\t#m**3\n",
+ "p2 = 6.8*10**5; \t#Pa\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Final temperature\")\n",
+ "T2 = T1*(p2/p1)**((y-1)/y);\n",
+ "t2 = T2-273; \n",
+ "print (\"t2 = %.3f\")%(t2),(\"\u00b0C\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Final volume :\")\n",
+ "V2 = V1*(p1/p2)**(1/y);\n",
+ "print (\"V2 = %.3f\")%(V2),(\"m**3\")\n",
+ "\n",
+ "\n",
+ "print (\"(iii)Work done\")\n",
+ "R = 287;\n",
+ "m = p1*V1/R/T1;\n",
+ "W = m*R*(T1-T2)/(y-1)/10**3;\n",
+ "print (\"W = %.3f\")%(W),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Final temperature\n",
+ "t2 = 234.253 \u00b0C\n",
+ "(ii) Final volume :\n",
+ "V2 = 0.004 m**3\n",
+ "(iii)Work done\n",
+ "W = -2.752 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.29 page no : 142"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import *\n",
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "m = 0.44; \t\t\t#kg\n",
+ "T1 = 453.; \t\t\t#K\n",
+ "ratio = 3.; \t\t#ratio = V2/V1\n",
+ "T2 = 288.; \t\t\t#K\n",
+ "W_12 = 52.5; \t\t#kJ\n",
+ "\n",
+ "# Calculations\n",
+ "y = math.log(T2/T1)/ math.log(1/ratio) + 1;\n",
+ "R = W_12*(y-1)/m/(T1-T2);\n",
+ "M = [[1,-1],[1,-y]];\n",
+ "N = [R,0];\n",
+ "X = linalg.inv(M)*N;\n",
+ "cp = X[0][0];\n",
+ "cv = X[1][0];\n",
+ "\n",
+ "# Results\n",
+ "print (\"cp = %.3f\")%(cp),(\"kJ/kg.K\")\n",
+ "\n",
+ "print (\"cv = %.3f\")%(cv),(\"kJ/kg.K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "cp = 1.021 kJ/kg.K\n",
+ "cv = 0.723 kJ/kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.30 page no : 143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "n = 1.3;\n",
+ "m = 1; \t\t\t#kg\n",
+ "p1 = 1.1; \t\t\t#bar\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "p2 = 6.6; \t\t\t#bar\n",
+ "R0 = 8314.;\n",
+ "M = 30.;\n",
+ "cp = 1.75; \t\t\t#kJ/kg.K\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "R = R0/M/1000; \t\t\t#kJ/kg.K\n",
+ "cv = cp - R;\n",
+ "y = cp/cv;\n",
+ "T2 = T1 *(p2/p1)**((n-1)/n);\n",
+ "W = R*(T1-T2)/(n-1);\n",
+ "Q = ((y-n)/(y-1))*W;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Heat supplied = %.3f\")%(Q),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat supplied = 84.352 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.31 page no : 144"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "cp = 14.3; \t\t\t#kJ/kg.K\n",
+ "cv = 10.2; \t\t\t#kJ/kg.K\n",
+ "V1 = 0.1; \t\t\t#m**3\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "p2 = 8.; \t\t\t#bar\n",
+ "y = cp/cv;\n",
+ "R = cp-cv;\n",
+ "V2 = V1*(p1/p2)**(1/y);\n",
+ "V3 = V2;\n",
+ "T2 = T1*(p2/p1)**((y-1)/y);\n",
+ "p3 = p1*V1/V3;\n",
+ "T3 = 300.; \t\t\t#K\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Pressure at the end of consmath.tant volume cooling = %.3f\")%(p3),(\"bar\")\n",
+ "\n",
+ "print (\"(ii) Change in internal energy during consmath.tant volume process\")\n",
+ "m = p1*V1/R/T1*10**2; \t\t\t#kg\n",
+ "\n",
+ "dU_23 = m*cv*(T3-T2);\n",
+ "print (\"dU_23 = %.3f\")%(dU_23),(\"kJ\")\n",
+ "\n",
+ "print (\"(iii) Net work done and heat transferred during the cycle\")\n",
+ "W_12 = m*R*(T1-T2)/(y-1);\n",
+ "W_23 = 0;\n",
+ "W_31 = p3*V3*math.log(V1/V3)*10**2; \t\t\t#kJ\n",
+ "Wnet = W_12+W_23+W_31;\n",
+ "print (\"Net work done = %.3f\")%(Wnet),(\"kJ\")\n",
+ "Qnet = Wnet;\n",
+ "print (\"Heat transferred during the complete cycle = %.3f\")%(Qnet),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Pressure at the end of consmath.tant volume cooling = 4.407 bar\n",
+ "(ii) Change in internal energy during consmath.tant volume process\n",
+ "dU_23 = -20.281 kJ\n",
+ "(iii) Net work done and heat transferred during the cycle\n",
+ "Net work done = -5.449 kJ\n",
+ "Heat transferred during the complete cycle = -5.449 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.32 page no : 145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "V1 = 0.15; \t\t\t#m**3\n",
+ "p1 = 15.; \t\t\t#bar\n",
+ "T1 = 550.; \t\t\t#K\n",
+ "T2 = T1;\n",
+ "r = 4.; \t\t\t#r = V2/V1\n",
+ "V2 = r*V1;\n",
+ "T3 = 290.; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "p2 = p1*V1/V2;\n",
+ "W_12 = p1*V1*math.log(V2/V1)*10**2; \t\t\t#kJ\n",
+ "V3 = V2;\n",
+ "p3 = p2*T3/T2;\n",
+ "W_23 = 0;\n",
+ "n = math.log(p1/p3)/math.log(V3/V1);\n",
+ "W_31 = (p3*V3-p1*V1)/(n-1)*10**2; \t\t\t#kJ\n",
+ "\n",
+ "# Results\n",
+ "\n",
+ "Wnet = W_12+W_23+W_31\n",
+ "print (\"net work done = %.3f\")%Wnet , (\"kJ\")\n",
+ "\n",
+ "Qnet = Wnet;\n",
+ "print (\"Heat transferred during the cycle = %.3f\")%(Qnet),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "net work done = 81.537 kJ\n",
+ "Heat transferred during the cycle = 81.537 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.33 page no : 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline\n",
+ "\n",
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "from matplotlib.pyplot import *\n",
+ "from numpy import *\n",
+ "\n",
+ "# Variables\n",
+ "m = 1; \t\t\t#kg\n",
+ "p1 = 5; \t\t\t#bar\n",
+ "V1 = 0.02; \t\t\t#m**3\n",
+ "V2 = 0.08; \t\t\t#m**3\n",
+ "p2 = 1.5; \t\t\t#bar\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "def f(V):\n",
+ " return a+b*V;\n",
+ "\n",
+ "A = [[1,0.02],[1,0.08]]\n",
+ "B = [5,1.5];\n",
+ "#X = linalg.inv(A)*B;\n",
+ "X = linalg.solve(A,B)\n",
+ "a = X[0]\n",
+ "b = X[1]\n",
+ "\n",
+ "print (\"(i) p-V diagram\")\n",
+ "\n",
+ "V = linspace(0.02,0.08,80);\n",
+ "p = a+b*V;\n",
+ "plot(V,p,'b')\n",
+ "\n",
+ "V = [0.0667 ,0.08];\n",
+ "p = [1.5 ,1.5];\n",
+ "plot(V,p,'g')\n",
+ "\n",
+ "V = linspace(0.02,0.0667,447)\n",
+ "def fa(V):\n",
+ " return 0.1/V;\n",
+ "f = fa(V)\n",
+ "plot(V,f,'r')\n",
+ "suptitle(\"p-V diagram\")\n",
+ "\n",
+ "V = [0.0667, 0.0667];\n",
+ "p = [1.5, 0];\n",
+ "plot(V,p,'--')\n",
+ "xlabel(\"V(m)**3\")\n",
+ "ylabel(\"P(bar)\")\n",
+ "text(.04,4,'Reversible Expansion')\n",
+ "text(0.04,2.3,\"pV = C\")\n",
+ "text(0.07,1.2,\"p = C\")\n",
+ "\n",
+ "print (\"(ii) Work done and heat transfer\")\n",
+ "\n",
+ "\n",
+ "def f7(V): \n",
+ "\t return (a+b*V)*10**2\n",
+ "\n",
+ "W_12 = quad(f7,V1,V2)[0]\n",
+ "\n",
+ "print (\"Work done by the system = \"),(W_12), (\"kJ\")\n",
+ "\n",
+ "p3 = p2;\n",
+ "V3 = round(p1*V1/p3,4);\n",
+ "W_23 = p2*(V3-V2)*10**2; \t\t\t#kJ\n",
+ "\n",
+ "W_31 = round(p3*V3*math.log(V1/V3)*10**2,2); \t\t\t#kJ\n",
+ "print (\"Work done on the system = %.3f\")% (W_31), (\"kJ\")\n",
+ "\n",
+ "W_net = W_12+W_23+W_31;\n",
+ "print (\"Net work done = %.3f\")% (W_net), (\"kJ\")\n",
+ "\n",
+ "Q_net = W_net;\n",
+ "print (\"Heat transferred during the complete cycle = %.3f\")% (Q_net),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Populating the interactive namespace from numpy and matplotlib\n",
+ "(i) p-V diagram"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "(ii) Work done and heat transfer"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Work done by the system = 19.5 kJ\n",
+ "Work done on the system = -12.050 kJ\n",
+ "Net work done = 5.455 kJ\n",
+ "Heat transferred during the complete cycle = 5.455 kJ\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEhCAYAAACXwKDgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVNX6B/DvAJoX1ATvlxwzQIEBRhBFCaG0vJGaKGFp\nZmqWdEHNS+ZBs/KG59hRT1iW2qmOmubxkpqmB7VEUQFFTVFzTNT8eUURUYH1+2M1E1cFZvZcv5/n\nmScZ9uy1NtC7917r3e9SCSEEiIjIoThZugNERGR+DP5ERA6IwZ+IyAEx+BMROSAGfyIiB8TgT0Tk\ngBj8yaZMnz4d7733XrH30tPT4e3t/cDPJSUlITIyEgCwYcMGzJ49W7E+EtkCBn+yKYMHD8bKlSuL\nvbdixQoMHjy4wvuIjIzExIkTje6LEAJ8TIZsFYM/WQ2dToe2bdti6NCh8PX1RZ8+fZCbm1tsGw8P\nD9SvXx8pKSmG97777jvExMSU2t+6devg4eGBjh07Yu3atYb3ly1bhjfffBMAsH79enTs2BEajQZh\nYWG4ePEiAODSpUsIDQ1FQEAARo0aBbVajWvXrkGn08HLywvDhg1DQEAAsrKyMHr0aHTo0AGenp6Y\nNGmSoR21Wo0pU6YgKCgIQUFBSE1NRc+ePaFWq7FgwQ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dERERgVdeecWwUlOrVq3w\nxx9/GLZ50DRXye9dvHgRarW6Un3Q6XSGfa1fvx4ajaZSnycyBwZ/sjsxMTHIyMgwrEXbpEkTw5qm\ngBz2KXo1X/LfRb9OS0tDSEhIhdsWQmDw4MGGVM+LFy+We2dAZEnM9iGHMG3aNLRr1w7R0dEV/kxm\nZibGjx+P9evXK9gzIsvglT85hDFjxmD58uWV+kxiYiImTJigUI+ILItX/kREDohX/kREDojBn4jI\nATH4ExE5IAZ/IiIHxOBPROSAGPyJiBzQ/wNTN0khb0PDfQAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x1dbbbd0>"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.34 page no : 147"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "cv = 0.71; \t\t\t#kJ/kg.K\n",
+ "R = 0.287; \t\t\t#kJ/kg.K\n",
+ "d = 8.; \t\t\t#cm\n",
+ "l = 3.5; \t\t\t#cm\n",
+ "S = 150.; \t\t\t#N/cm\n",
+ "p1 = 30.; \t\t\t#N/cm\n",
+ "V1 = 45.; \t\t\t#cm**3\n",
+ "T1 = 293.; \t\t\t#K\n",
+ "cv = 0.71; \t\t\t#kJ/kg.K\n",
+ "R = 0.287; \t\t\t#kJ/kg.K\n",
+ "\n",
+ "# Calculations\n",
+ "A = math.pi/4*d**2;\n",
+ "C = p1-S/A**2*V1;\n",
+ "dV = l*A;\n",
+ "V2 = V1+dV;\n",
+ "p2 = S/A**2*V2 + C;\n",
+ "\n",
+ "def f3( p): \n",
+ "\t return A**2/S*p/100\n",
+ "\n",
+ "W = quad(f3, p1, p2)[0]\n",
+ "\n",
+ "T2 = p2*V2*T1/p1/V1;\n",
+ "m = p1*V1/R/T1/10**5; \t\t\t#kg\n",
+ "dU = m*cv*(T2-T1);\n",
+ "Q_12 = dU + W*10**(-3);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Amount of heat added to the system = %.3f\")% (Q_12), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amount of heat added to the system = 0.250 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.35 page no : 164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "r = 10.; \t\t\t#kg/min\n",
+ "p1 = 1.5*10**5; \t\t\t#N/m**2\n",
+ "rho1 = 26.; \t\t\t#kg/m**3\n",
+ "C1 = 110.; \t\t\t#m/s\n",
+ "u1 = 910.; \t\t\t#kJ/kg\n",
+ "p2 = 5.5*10**5; \t\t\t#N/m**2\n",
+ "rho2 = 5.5; \t\t\t#kg/m**3\n",
+ "C2 = 190.; \t\t\t#m/s\n",
+ "u2 = 710.; \t\t\t#kJ/kg\n",
+ "Q = 55.; \t\t\t#kJ/s\n",
+ "h = 55.; \t\t\t#m\n",
+ "g = 9.81; \t\t\t#m/s**2\n",
+ "v2 = 1/rho2;\n",
+ "v1 = 1/rho1;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\n",
+ "dh = u2-u1+ (p2*v2-p1*v1)/10**3;\n",
+ "print (\"(i) Change in enthalpy %.3f\")%(dh), (\"kJ/kg\")\n",
+ "\n",
+ "print (\"(ii) Work done during the process (W).\")\n",
+ "\n",
+ "Q = 330.; \t\t\t#kJ/kg\n",
+ "KE = (C2**2-C1**2)/2/10**3; \t\t\t#kJ\n",
+ "PE = g*h/10**3; \t\t\t#kJ\n",
+ "W = -Q-KE-PE-dh;\n",
+ "print (\"Work done = %.3f\")%(W),(\"kJ\")\n",
+ "\n",
+ "\n",
+ "P = W*10/60.;\n",
+ "print (\"Work done per second = %.3f\")%(P),(\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Change in enthalpy -105.769 kJ/kg\n",
+ "(ii) Work done during the process (W).\n",
+ "Work done = -236.770 kJ\n",
+ "Work done per second = -39.462 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.36 page no : 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "\n",
+ "import math \n",
+ "\n",
+ "m = 15.; \t\t\t#kg/s\n",
+ "v = 0.45; \t\t\t#m**3/kg\n",
+ "P = 12000.; \t\t#kW\n",
+ "W = P/m; \t\t\t#kJ/kg\n",
+ "h1 = 1260.; \t\t#kJ/kg\n",
+ "h2 = 400.; \t\t\t#kJ/kg\n",
+ "C1 = 50.; \t\t\t#m/s\n",
+ "C2 = 110.; \t\t\t#m/s\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Heat rejected = \"),\n",
+ "Q = h2-h1+(C2**2-C1**2)/2/10**3 +W;\n",
+ "Qnet = m*Q;\n",
+ "print (\"Qnet = %.3f\")%(-Qnet),(\"kW\")\n",
+ "\n",
+ "print (\"(ii) Inlet area\")\n",
+ "A = v*m/C1;\n",
+ "print (\"A = %.3f\")%(A),(\"m**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Heat rejected = Qnet = 828.000 kW\n",
+ "(ii) Inlet area\n",
+ "A = 0.135 m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.37 page no : 167"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m = 0.5; \t\t\t#kg/s\n",
+ "C1 = 6.; \t\t\t#m/s\n",
+ "C2 = 5.; \t\t\t#m/s\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "p2 = 7.; \t\t\t#bar\n",
+ "v1 = 0.85; \t\t\t#m**3/kg\n",
+ "v2 = 0.16; \t\t\t#m**3/kg\n",
+ "du = 90.; \t\t\t#kJ/kg\n",
+ "Q = -120.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Power required to drive the compressor\")\n",
+ "W = -du+(C1**2-C2**2)/2/1000 + (p1*v1 - p2*v2)*10**2 + Q;\n",
+ "Power = m*W; \n",
+ "print (\"Power = %.3f\")%(-Power),(\"kW\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Inlet and outlet pipe cross-sectional areas\")\n",
+ "A1 = m*v1/C1;\n",
+ "A2 = m*v2/C2;\n",
+ "print (\"Inlet crosssectional area = %.3f\")% (A1), (\"m**2\")\n",
+ "\n",
+ "print (\"Outlet crossectional area = %.3f\")%(A2), (\"m**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Power required to drive the compressor\n",
+ "Power = 118.497 kW\n",
+ "(ii) Inlet and outlet pipe cross-sectional areas\n",
+ "Inlet crosssectional area = 0.071 m**2\n",
+ "Outlet crossectional area = 0.016 m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.38 page no : 168"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h1 = 800.; \t\t\t#kJ/kg\n",
+ "C1 = 5.; \t\t\t#m/s\n",
+ "h2 = 2520.; \t\t\t#kJ/kg\n",
+ "C2 = 50.; \t\t\t#m/s\n",
+ "dZ = 4.; \t\t\t#m\n",
+ "g = 9.81; \t\t\t#m/s**2\n",
+ "Q = 2180.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "W = h1-h2+(C1**2 - C2**2)/2/1000 +dZ*g/1000+Q;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Power developed = %.3f\")%(W), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power developed = 458.802 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.39 page no : 169"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "g = 9.8; \t\t\t#m/s**2\n",
+ "m = 4500./3600; \t#kg/s\n",
+ "C1 = 2800./60; \t\t#m/s\n",
+ "Z1 = 5.5; \t\t\t#m\n",
+ "h1 = 2800.; \t\t#kJ/g\n",
+ "C2 = 5600./60; \t\t#m/s\n",
+ "Z2 = 1.5; \t\t\t#m\n",
+ "h2 = 2300.; \t\t#kJ/kg\n",
+ "Q = -16000./3600; \t#kJ/s\n",
+ "\n",
+ "# Calculations\n",
+ "W = Q-m*((h1-h2) + (C2**2 - C1**2)/2/1000 + (Z2-Z1)*g/1000);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Power output of the turbine = %.3f\")% (-W),(\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power output of the turbine = 633.479 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.40 page no : 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 6.87; \t\t\t#bar\n",
+ "C1 = 50.; \t\t\t#m/s\n",
+ "p2 = 1.37; \t\t\t#bar\n",
+ "C2 = 500.; \t\t\t#m/s\n",
+ "print (\"From steam table corresponding to p1\")\n",
+ "h1 = 2850.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "h2 = h1 - (C2**2-C1**2)/2/1000;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Final enthalpy of steam = \"), (h2),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "From steam table corresponding to p1\n",
+ "Final enthalpy of steam = 2726.25 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.41 page no : 171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m = 220./60; \t\t\t#kg/s\n",
+ "C1 = 320.; \t\t\t#m/s\n",
+ "p1 = 6*10.**5; \t\t\t#N/m**2\n",
+ "u1 = 2000.*10**3; \t\t\t#J/kg\n",
+ "v1 = 0.36; \t\t\t#m**3/kg\n",
+ "C2 = 140.; \t\t\t#m/s\n",
+ "p2 = 1.2*10**5; \t\t\t#N/m**2\n",
+ "u2 = 1400.*10**3; \t\t\t#J/kg\n",
+ "v2 = 1.3; \t\t\t#m**3/kg\n",
+ "Q = 100*10.**3; \t\t\t#J/s\n",
+ "\n",
+ "# Calculations\n",
+ "W = (m*((u1-u2)+ (p1*v1 - p2*v2) + (C1**2-C2**2)/2) -Q)/10**6;\n",
+ "\n",
+ "# Results\n",
+ "print (\"power capacity of the system = %.3f\")% (W),(\"MW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "power capacity of the system = 2.472 MW\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.42 page no : 172"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 7.5*10**5; \t\t\t#N/m**2\n",
+ "C1 = 140.; \t\t\t#m/s\n",
+ "h1 = 950.*10**3; \t\t\t#J/kg\n",
+ "p2 = 2*10.**5; \t\t\t#N/m**2\n",
+ "C2 = 280.; \t\t\t#m/s\n",
+ "h2 = 650.*10**3; \t\t\t#J/kg\n",
+ "m = 5.; \t\t\t#kg/s\n",
+ "\n",
+ "# Calculations\n",
+ "W = (h1-h2)+(C1**2-C2**2)/2\n",
+ "Power = m*W/1000;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Power capacity of turbine = \"), (Power), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power capacity of turbine = 1353.0 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.43 page no : 173"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "C1 = 12.; \t\t\t#m/s\n",
+ "p1 = 1.*10**5; \t\t\t#N/m**2\n",
+ "v1 = 0.5; \t\t\t#m**3/kg\n",
+ "C2 = 90.; \t\t\t#m/s\n",
+ "p2 = 8.*10**5; \t\t\t#N/m**2\n",
+ "v2 = 0.14; \t\t\t#m**3/kg\n",
+ "dh = 150.; \t\t\t#kJ/kg\n",
+ "Q = -11.67; \t\t\t#kJ/s\n",
+ "m = 0.2; \t\t\t#kg/s\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Motor power required to drive the compressor\")\n",
+ "W = m*(-dh + (C1**2-C2**2)/2/1000) +Q;\n",
+ "print (\"Power = %.3f\")% (-W), (\"kW\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii)Ratio of inlet to outlet pipi diameter\")\n",
+ "ratio = math.sqrt(C2/C1*v1/v2);\n",
+ "print (\"ratio = %.3f\")% (ratio)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Motor power required to drive the compressor\n",
+ "Power = 42.466 kW\n",
+ "(ii)Ratio of inlet to outlet pipi diameter\n",
+ "ratio = 5.175\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.44 page no : 175"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "W = -175.; \t\t\t #kJ/kg\n",
+ "dh = 70.; \t\t \t#kJ/kg\n",
+ "Q_water = -92.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "Q = dh+W;\n",
+ "Q_atm = Q-Q_water;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Heat transferred to the atmosphere = \"),(-Q_atm), (\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transferred to the atmosphere = 13.0 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.45 page no : 176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "h1 = 2800.*10**3; \t\t\t#J/kg\n",
+ "C1 = 50.; \t\t\t#m/s\n",
+ "A1 = 900.*10**(-4); \t\t\t#m**2\n",
+ "v1 = 0.187; \t\t\t#m**3/kg\n",
+ "h2 = 2600.*10**3; \t\t\t#J/kg\n",
+ "v2 = 0.498; \t\t\t#m**3/kJ\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Velocity at exit of the nozzle\")\n",
+ "C2 = math.sqrt(2*((h1-h2) + C1**2/2));\n",
+ "\n",
+ "print (\"C2 = %.3f\")% (C2),(\"m/s\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Mass flow rate\")\n",
+ "m = A1*C1/v1;\n",
+ "print (\"m = %.3f\")% (m), (\"kg/s\")\n",
+ "\n",
+ "\n",
+ "print (\"(iii) Area at the exit\")\n",
+ "A2 = m*v2/C2*10**4;\n",
+ "print (\"A2 = %.3f\")%(A2), (\"cm**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Velocity at exit of the nozzle\n",
+ "C2 = 634.429 m/s\n",
+ "(ii) Mass flow rate\n",
+ "m = 24.064 kg/s\n",
+ "(iii) Area at the exit\n",
+ "A2 = 188.894 cm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.46 page no : 177"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h1 = 240.; \t\t\t#kJ/kg\n",
+ "h2 = 192.; \t\t\t#kJ/kg\n",
+ "dZ = 20.; \t\t\t#m\n",
+ "g = 9.81; \t\t\t#m/s**2\n",
+ "\n",
+ "# Calculations\n",
+ "Q = (h2-h1)+dZ*g/1000;\n",
+ "\n",
+ "# Results\n",
+ "print (\"heat transfer = %.3f\")% (-Q), (\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "heat transfer = 47.804 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.47 page no : 178"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "p1 = 2.; \t\t\t#bar\n",
+ "C1 = 300.; \t\t\t#m/s\n",
+ "Q = 0.;\n",
+ "h1 = 915.*10**3; \t\t\t#J/kg\n",
+ "h2 = 800.*10**3; \t\t\t#J/kg\n",
+ "\n",
+ "# Calculations\n",
+ "C2 = math.sqrt(2*(h1-h2 + C1**2/2));\n",
+ "\n",
+ "# Results\n",
+ "print (\"Relative velocity of gas leaving the pipe = %.3f\")% (C2), (\"m/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Relative velocity of gas leaving the pipe = 565.685 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.48 page no : 179"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "mw = 50; \t\t\t#kg/s\n",
+ "p1 = 10.**5; \t\t\t#N/m**2\n",
+ "p2 = 4.2*10**5; \t\t\t#N/m**2\n",
+ "h = 10.7; \t\t\t#m\n",
+ "d1 = 0.2; \t\t\t#m\n",
+ "d2 = 0.1; \t\t\t#m\n",
+ "v1 = 1./1000;\n",
+ "v2 = 1./1000;\n",
+ "g = 9.81; \t\t\t#m/s**2\n",
+ "\n",
+ "# Calculations\n",
+ "C1 = mw*4/math.pi/d1**2*v1;\n",
+ "C2 = mw*4/math.pi/d2**2*v2;\n",
+ "W = mw*((p1*v1-p2*v2) + (g*(0-h))+(C1**2-C2**2)/2)/10**3;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Capacity of electric motor %.3f\")%(-W), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacity of electric motor 22.198 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ " Example 4.49 page no : 180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "Ca = 250.; \t\t\t#m/s\n",
+ "t = -14.; \t\t\t#0C\n",
+ "ha = 250.; \t\t\t#kJ/kg\n",
+ "hg = 900.; \t\t\t#kJ/kg\n",
+ "ratio = 0.0180;\n",
+ "Ef = 45.*10**3; \t\t\t#kJ/kg\n",
+ "Q = -21.; \t\t\t#kJ/kg\n",
+ "ma = 1.; \t\t\t#kg\n",
+ "mg = 1.018; \t\t\t#kg\n",
+ "mf = 0.018; \t\t\t#kg\n",
+ "\n",
+ "#Calculations\n",
+ "Eg = 0.06*mf/mg*Ef;\n",
+ "Cg = math.sqrt(2000*((ma*(ha+Ca**2/2/1000) + mf*Ef + Q)/mg -hg-Eg));\n",
+ "\n",
+ "# Results\n",
+ "print (\"velocity of exhaust gas jet = %.3f\")%(Cg),(\"m/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "velocity of exhaust gas jet = 455.160 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.50 page no : 181"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "t1 = 20.; \t\t\t#0C\n",
+ "C1 = 40.; \t\t\t#m/s\n",
+ "t2 = 820.; \t\t\t#0C\n",
+ "C2 = 40.; \t\t\t#m/s\n",
+ "t3 = 620.; \t\t\t#0C\n",
+ "C3 = 55.; \t\t\t#m/s\n",
+ "t4 = 510.; \t\t\t#0C\n",
+ "m = 2.5; \t\t\t#kg/s\n",
+ "cp = 1.005; \t\t\t#kJ/kg.0C\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Heat exchanger\")\n",
+ "Q_12 = m*cp*(t2-t1);\n",
+ "print (\"rate of heat transfer = \"),(Q_12), (\"kJ/s\")\n",
+ "\n",
+ "print (\"(ii) Turbine\")\n",
+ "W_23 = m*((cp*(t2-t3))+(C2**2-C3**2)/2/1000);\n",
+ "print (\"Power output of turbine = %.3f\")%(W_23), (\"kW\")\n",
+ "\n",
+ "print (\"(iii) Nozzle\")\n",
+ "C4 = math.sqrt(2*1000*(cp*(t3-t4)+C3**2/2/1000));\n",
+ "print (\"Velocity at exit from the nozzle = %.3f\")%(C4), (\"m/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Heat exchanger\n",
+ "rate of heat transfer = 2010.0 kJ/s\n",
+ "(ii) Turbine\n",
+ "Power output of turbine = 500.719 kW\n",
+ "(iii) Nozzle\n",
+ "Velocity at exit from the nozzle = 473.418 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.51 page no : 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "V = 0.028; \t\t\t#m**3\n",
+ "p1 = 80.; \t\t\t#bar\n",
+ "t = 350.; \t\t\t#0C\n",
+ "p2 = 50.; \t\t\t#bar\n",
+ "v1 = 0.02995; \t\t\t#m**3/kg\n",
+ "h1 = 2987.3; \t\t\t#kJ/kg\n",
+ "v2 = 0.02995; \t\t\t#m**3/kg\n",
+ "vg2 = 0.0394; \t\t\t#m**3/kg\n",
+ "uf2 = 1149.; \t\t\t#kJ/kg\n",
+ "ug2 = 2597.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m = V/v1;\n",
+ "u1 = h1 - (p1*v1*10**2); \t\t\t#kJ/kg\n",
+ "\n",
+ "print (\"(i) State of steam after cooling\")\n",
+ "x2 = v2/vg2;\n",
+ "print (\"dryness fraction = %.3f\")%(x2)\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Heat rejected by the steam\")\n",
+ "u2 = (1-x2)*uf2 + x2*ug2;\n",
+ "Q = m*(u2-u1);\n",
+ "print (\"Heat rejected = %.3f\")% (-Q), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) State of steam after cooling\n",
+ "dryness fraction = 0.760\n",
+ "(ii) Heat rejected by the steam\n",
+ "Heat rejected = 465.575 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.52 page no : 188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m = 0.08; \t\t\t#kg\n",
+ "p = 2.*10**5; \t\t\t#Pa\n",
+ "V = 0.10528; \t\t\t#m**3\n",
+ "h1 = 2706.3; \t\t\t#kJ/kg\n",
+ "h2 = 3071.8; \t\t\t#kJ/kg\n",
+ "v1 = 0.885; \t\t\t#m**3/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "v2 = V/m; \t\t\t#m**3/kg\n",
+ "\n",
+ "print (\"(i) Heat supplied\")\n",
+ "Q = m*(h2-h1);\n",
+ "print (\"Q = \"),(Q), (\"kJ\")\n",
+ "\n",
+ "\n",
+ "W = p*(v2-v1);\n",
+ "W_total = m*W/10**3;\n",
+ "print (\"(ii)Total work done = \"), (W_total), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Heat supplied\n",
+ "Q = 29.24 kJ\n",
+ "(ii)Total work done = 6.896 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.53 page no : 189"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import *\n",
+ "from matplotlib.pyplot import *\n",
+ "\n",
+ "# Variables\n",
+ "m = 1.; \t\t\t#kg\n",
+ "p = 8.; \t\t\t#bar\n",
+ "s1 = 6.55; \t\t\t#kJ/kg.K\n",
+ "T = 200.; \t\t\t#0C\n",
+ "s_f1 = 2.0457; \t\t\t#kJ/kg.K\n",
+ "s_fg1 = 4.6139; \t\t\t#kJ/kg.K\n",
+ "h_f1 = 720.9; \t\t\t#kJ/kg\n",
+ "h_fg1 = 2046.5; \t\t\t#kJ/kg\n",
+ "h2 = 2839.3; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "x1 = (s1-s_f1)/s_fg1;\n",
+ "h1 = h_f1+x1*h_fg1;\n",
+ "Q = h2-h1;\n",
+ "print (\"Heat supplied = %.3f\")%(Q), (\"kJ/kg\")\n",
+ "\n",
+ "# For T-s diagram\n",
+ "\n",
+ "s = linspace(0,.10,10);\n",
+ "T = (-(s-5)**2+298);\n",
+ "plot(s,T)\n",
+ "\n",
+ "T = [295.44 ,295.44];\n",
+ "s = [6.6 ,3.45];\n",
+ "plot(s,T,'g')\n",
+ "\n",
+ "s = [6.6 ,7];\n",
+ "T = [295.44, 300];\n",
+ "plot(s,T,'g')\n",
+ "\n",
+ "s = [6.55 ,6.55];\n",
+ "T = [270 ,295.44];\n",
+ "plot(s,T,'r')\n",
+ "\n",
+ "s = [6.6, 6.6];\n",
+ "T = [270 ,295.44];\n",
+ "plot(s,T,'--r')\n",
+ "\n",
+ "s = [6.66, 6.66];\n",
+ "T = [270, 295.44];\n",
+ "plot(s,T,'r')\n",
+ "\n",
+ "\t\t\t#The area in red represents the heat flow and it goes upto x-axis\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat supplied = 120.513 kJ/kg\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 50,
+ "text": [
+ "[<matplotlib.lines.Line2D at 0x3e9d150>]"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAD9CAYAAABDaefJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGRdJREFUeJzt3XtQVHee9/FPM5BdDUadioKC9RBBIg2DtBfUlE6aicZY\nUQIFMcEoJuKkjFoWSayxsjUbr6tmRs3gjNZqKjqZdSuglY2YxBh0FUWTDGbo5HEgG3nWJtPgJTEz\nOOCtEc7zh5teGRUa7At95v2q6iq6+5zz+56U+XD8nd/5ajEMwxAAwBTCgl0AAMB3CHUAMBFCHQBM\nhFAHABMh1AHARAh1ADCRDkP96tWrGjt2rNLS0mS1WvXKK69Ikv785z9r8uTJSkxM1KOPPqrGxkbP\nPmvXrtWwYcM0fPhwlZWV+bd6AEA7ls7WqV++fFm9e/fW9evXNWHCBK1fv1579+7V/fffr5/97Gd6\n7bXX9Je//EXr1q1TTU2NZs6cqRMnTqihoUGTJk3SqVOnFBbGXwgAIBA6TdvevXtLktxut1pbW9W/\nf3/t3btXc+bMkSTNmTNHe/bskSSVlpYqLy9PERERiouLU0JCgiorK/1YPgDgZp2Geltbm9LS0hQV\nFaWMjAwlJyfr/PnzioqKkiRFRUXp/PnzkqQzZ84oNjbWs29sbKwaGhr8VDoA4G+Fd7ZBWFiYPv/8\nc128eFFTpkzR4cOH231vsVhksVjuuP/tvutoewDAnXXW2cXrye6+ffvq8ccf1x/+8AdF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Gxio2N1ZgxYyRJubm5\n7Z6vCRUffvihRo0apQEDBnS4XcBCffTo0aqtrVVdXZ3cbrdKSkqUmZkZqOH/7hkdPHMQCi5cuKDG\nxkZJ0pUrV3TgwIF23UF7ujVr1sjlcsnpdKq4uFg/+clP9Lvf/S7YZXnt8uXLampqkiRdunRJZWVl\n+tGPfhTkqrwTHR2tIUOG6NSpU5JuzEsnJycHuaque/vtt29ZRn47nT5R6ivh4eH6zW9+oylTpqi1\ntVUFBQVKSkoK1PA+kZeXpyNHjui7777TkCFDtHLlSj333HPBLssrHT1zEArOnj2rOXPmqK2tTW1t\nbZo9e7YeeeSRYJfVbaE2HXn+/HllZ2dLujGd8cwzz+jRRx8NclXe+/Wvf61nnnlGbrdb8fHx2rFj\nR7BL6pJLly7p4MGDXt3LCMo/kgEA8I/QvA0PALgtQh0ATIRQBwATIdQBwEQIdQAwEUIdAEzk/wOv\n7sf4EZKFzwAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x319ff90>"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.54 page no : 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 7.*10**5; \t\t\t#Pa\n",
+ "p2 = 1.5*10**5; \t\t\t#Pa\n",
+ "Q = 420.; \t\t\t#kJ/kg\n",
+ "uf = 696.; \t\t\t#kJ/kg\n",
+ "x = 0.95;\n",
+ "ug = 2573.; \t\t\t#kJ/kg\n",
+ "u_f2 = 2580.; \t\t\t#kJ/kg\n",
+ "u_g2 = 2856.; \t\t\t#kJ/kg\n",
+ "x2 = 15./50;\n",
+ "h_f1 = 697.1; \t\t\t#kJ/kg\n",
+ "h_fg1 = 2064.9; \t\t\t#kJ.kg\n",
+ "h_f2 = 2772.6; \t\t\t#kJ/kg\n",
+ "h_g2 = 2872.9; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Change of internal energy\")\n",
+ "u1 = (1-x)*uf + x*ug;\n",
+ "u2 = 2602.8; \t\t\t#kJ/kg\n",
+ "du = u2-u1;\n",
+ "print (\"du = \"),(du), (\"kJ/kg\")\n",
+ "\n",
+ "print (\"(ii) Change in enthalpy\")\n",
+ "h1 = h_f1+x*h_fg1;\n",
+ "h2 = h_f2+x2*(h_g2-h_f2);\n",
+ "dh = h2-h1;\n",
+ "print (\"dh = \"), (dh), (\"kJ/kg\")\n",
+ "\n",
+ "print (\"(iii) Work done \")\n",
+ "W = Q-du;\n",
+ "print (\"W = \"), (W), (\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Change of internal energy\n",
+ "du = 123.65 kJ/kg\n",
+ "(ii) Change in enthalpy\n",
+ "dh = 143.935 kJ/kg\n",
+ "(iii) Work done \n",
+ "W = 296.35 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.55 page no : 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "\n",
+ "p1 = 5.5*10**5; \t\t\t#Pa\n",
+ "x1 = 1.;\n",
+ "p2 = 0.75*10**5; \t\t\t#Pa\n",
+ "v1 = 0.3427; \t\t\t#m**3/kg\n",
+ "v2 = p1*v1/p2;\n",
+ "\n",
+ "# Since v2 > vg (at 0.75 bar), therefore, the steam is superheated at state 2.\n",
+ "u2 = 2567.25; \t\t\t#kJ/kg\n",
+ "u1 = 2565.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "du = u2-u1; \t\t\t#kJ/kg\n",
+ "C = p1*v1;\n",
+ "\n",
+ "print (\"Work done \"),\n",
+ "\n",
+ "def f6( v): \n",
+ "\t return C/v\n",
+ "\n",
+ "W = quad(f6, v1,v2)[0]\n",
+ "\n",
+ "print (\"W =\"),(W), (\"N-m/kg\")\n",
+ "\n",
+ "\n",
+ "\n",
+ "Q = du+W/10**3;\n",
+ "\n",
+ "print (\"Heat supplied = %.3f\")%(Q),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done W = 375543.199592 N-m/kg\n",
+ "Heat supplied = 377.793 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.56 page no : 195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 100.; \t\t\t#bar\n",
+ "p2 = 10.; \t\t\t#bar\n",
+ "s1 = 5.619; \t\t\t#kJ/kg.K\n",
+ "T = 584.; \t\t\t#K\n",
+ "s2 = 7.163; \t\t\t#kJ/kg.K\n",
+ "u1 = 2545.; \t\t\t#kJ/kg\n",
+ "u2 = 2811.8; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i)Heat supplied \")\n",
+ "Q = T*(s2-s1);\n",
+ "print (\"Q = \"),(Q),(\"kJ/kg\")\n",
+ "\n",
+ "print (\"(ii) Work done\")\n",
+ "W = Q-(u2-u1);\n",
+ "print (\"W = \"), (W), (\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Heat supplied \n",
+ "Q = 901.696 kJ/kg\n",
+ "(ii) Work done\n",
+ "W = 634.896 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.57 page no : 198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m = 1.; \t\t\t#kg\n",
+ "p1 = 120.*10**5; \t#N/m**2\n",
+ "t1 = 400.; \t\t\t#0C\n",
+ "p2 = 38.; \t\t\t#bar\n",
+ "h1 = 3051.3; \t\t#kJ/kg\n",
+ "v1 = 0.02108; \t\t#m**3/kg\n",
+ "\n",
+ "# Calculations\n",
+ "u1 = h1-p1*v1/10**3; \t#kJ/kg\n",
+ "u2 = 2602; \t\t\t #kJ/kg\n",
+ "\n",
+ "# Results\n",
+ "W = u1-u2; \n",
+ "print (\"Work done = %.3f\")%(W),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done = 196.340 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.58 page no : 201 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 7.*10**5; \t\t\t#N/m**2\n",
+ "x1 = 0.98;\n",
+ "p2 = 0.34*10**5; \t\t#N/m**2\n",
+ "vg = 0.273; \t\t\t#m**3/kg\n",
+ "n = 1.1;\n",
+ "v_g2 = 4.65; \t\t\t#m**3/kg\n",
+ "u_f1 = 696.; \t\t\t#kJ/kg\n",
+ "u_g1 = 2573.; \t\t\t#kJ/kg\n",
+ "u_f2 = 302.; \t\t\t#kJ/kg\n",
+ "u_g2 = 2472.; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "v1 = x1*vg;\n",
+ "v2 = v1*(p1/p2)**(1/n);\n",
+ "x2 = v2/v_g2;\n",
+ "\n",
+ "\n",
+ "print (\"(i) Work done by the steam during the process\")\n",
+ "W = (p1*v1-p2*v2)/(n-1)/10**3; \t\t\t#kJ/kg\n",
+ "print (\"W = %.3f\")%(W), (\"kJ/kg\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Heat transferred\")\n",
+ "u1 = (1-x1)*u_f1+x1*u_g1;\n",
+ "u2 = (1-x2)*u_f2+x2*u_g2;\n",
+ "Q = u2-u1 + W;\n",
+ "print (\"Q = %.3f\")%(Q), (\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Work done by the steam during the process\n",
+ "W = 450.232 kJ/kg\n",
+ "(ii) Heat transferred\n",
+ "Q = 169.289 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.59 page no : 203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 15.; \t\t\t#bar\n",
+ "t1 = 350.; \t\t\t#0C\n",
+ "C1 = 60.; \t\t\t#m/s\n",
+ "p2 = 1.2; \t\t\t#bar\n",
+ "C2 = 180.; \t\t\t#m/s\n",
+ "s1 = 7.102; \t\t\t#kJ/kg\n",
+ "s_f2 = 1.3609; \t\t\t#kJ/kg\n",
+ "s_g2 = 7.2884; \t\t\t#kJ/kg\n",
+ "h_f2 = 439.4; \t\t\t#kJ/kg\n",
+ "h_fg2 = 2241.1; \t\t\t#kJ/kg\n",
+ "h1 = 3147.5; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "x2 = (s1 - s_f2)/(s_g2-s_f2);\n",
+ "h2 = h_f2+x2*h_fg2;\n",
+ "W = (h1-h2) + (C1**2 - C2**2)/2/1000;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Work done = %.3f\")%(W),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done = 523.075 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.60 page no : 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 10.; \t\t\t#bar\n",
+ "t1 = 200.; \t\t\t#0C\n",
+ "C1 = 60.; \t\t\t#m/s**2\n",
+ "c2 = 650.; \t\t\t#m/s\n",
+ "p2 = 1.5; \t\t\t#bar\n",
+ "h1 = 2827.9; \t\t\t#kJ/kg\n",
+ "h_f2 = 467.1; \t\t\t#kJ/kg\n",
+ "h2 = 2618.45; \t\t\t#kJ/kg\n",
+ "h_g2 = 2693.4; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "x2 = (h2-h_f2)/(h_g2-h_f2);\n",
+ "\n",
+ "# Results\n",
+ "print (\"quality of steam leaving the nozzle = %.3f\")%(x2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "quality of steam leaving the nozzle = 0.966\n"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.61 page no : 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h1 = 2776.4; \t\t\t#kJ/kg\n",
+ "h2 = h1;\n",
+ "h_f1 = 884.6; \t\t\t#kJ/kg\n",
+ "h_fg1 = 1910.3; \t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "x1 = (h1-h_f1)/h_fg1;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Initial dryness fraction = %.3f\")%(x1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Initial dryness fraction = 0.990\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.62 page no : 207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 10.; \t\t\t#bar\n",
+ "x1 = 0.9; \t\t\t#bar\n",
+ "p2 = 2.; \t\t\t#bar\n",
+ "\n",
+ "# Calculations\n",
+ "# Umath.sing Mollier chart, we get\n",
+ "x2 = 0.94;\n",
+ "\n",
+ "# Results\n",
+ "print (\"x2 = \"),(x2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "x2 = 0.94\n"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.63 Page no :208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "print (\"(a)From steam tables\")\n",
+ "\n",
+ "# Variables\n",
+ "p1 = 15*10**5; \t\t\t#Pa\n",
+ "p2 = 7.5*10**5; \t\t\t#Pa\n",
+ "h_f1 = 844.7; \t\t\t#kJ/kg\n",
+ "ts1 = 198.3; \t\t\t#0C\n",
+ "s_f1 = 2.3145; \t\t\t#kJ/kg.K\n",
+ "s_g1 = 6.4406; \t\t\t#kJ/kg.K\n",
+ "v_g1 = 0.132; \t\t\t#m**3/kg\n",
+ "h_fg1 = 1945.2; \t\t\t#kJ/kg\n",
+ "x1 = 0.95;\n",
+ "h_f2 = 709.3; \t\t\t#kJ/kg\n",
+ "h_fg2 = 2055.55; \t\t\t#kJ/kg\n",
+ "s_f2 = 2.0195; \t\t\t#kJ/kg\n",
+ "s_g2 = 6.6816; \t\t\t#kJ/kg.K\n",
+ "v_g2 = 0.255; \t\t\t#m**3/kg\n",
+ "x2 = 0.9;\n",
+ "x3 = 1;\n",
+ "s_f3 = 0.521; \t\t\t#kJ/kg K\n",
+ "s_g3 = 8.330; \t\t\t#kJ/kg K\n",
+ "\n",
+ "# Calculations\n",
+ "h2 = h_f2+x2*h_fg2;\n",
+ "h1 = h_f1 + x1*h_fg1;\n",
+ "s1 = s_f1 + x1*(s_g1-s_f1);\n",
+ "s2 = s1;\n",
+ "ds_12 = s2-s1;\n",
+ "\n",
+ "s3 = s_f3+x3*(s_g3-s_f3);\n",
+ "ds_23 = s3-s2;\n",
+ "\n",
+ "ds = 709.3 + 0.9 * 2055.55\n",
+ "\n",
+ "# Results\n",
+ "print (\"(i) Change in entropy = %.3f\")% (ds), (\"kJ/kg K\")\n",
+ "\n",
+ "h3 = h2;\n",
+ "\n",
+ "dh = h2-h1;\n",
+ "print (\"(ii) Change in enthalpy %.2f\")%(dh), (\"kJ/kg\")\n",
+ "\n",
+ "\n",
+ "print (\"(iii) Change in internal energy\"),\n",
+ "u1 = h1-p1*x1*v_g1/10**3;\n",
+ "u2 = h2-p2*x2*v_g2/10**3;\n",
+ "du = u2-u1;\n",
+ "print (\"du = %.3f\")% (du), (\"kJ/kg\")\n",
+ "\n",
+ "\n",
+ "\t\t\t# Only the expansion of steam from point 1 to 2 (i.e., isentropic expansion) is reversible because of unresisted flow whereas the expansion from point 2 to point 3 (i.e., throttling expansion) is irreversible because of frictional resismath.tance to flow. Increase of entropy also shows that expansion from point 2 to point 3 is irreversible.\n",
+ "\n",
+ "\n",
+ "print (\"(b) Using Mollier chart\")\n",
+ "h1 = 2692; \t\t\t#kJ/kg\n",
+ "h2 = 2560; \t\t\t#kJ/kg\n",
+ "s1 = 6.23; \t\t\t#kJ/kg K\n",
+ "s2 = s1;\n",
+ "s3 = 8.3; \t\t\t#kJ/kg K\n",
+ "\n",
+ "ds = s3-s1;\n",
+ "print (\"(i) Change in entropy = %.3f\")%(ds), (\"kJ/kg K\")\n",
+ "\n",
+ "\n",
+ "dh = h2-h1;\n",
+ "print (\"(ii) Change in enthalpy = %.3f\")%(dh),(\"kJ/kg\")\n",
+ "\n",
+ "u3=u2-u1\n",
+ "print (\"(iii) Change in internal energy =%.3f\")%(u3),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)From steam tables\n",
+ "(i) Change in entropy = 2559.295 kJ/kg K\n",
+ "(ii) Change in enthalpy -133.35 kJ/kg\n",
+ "(iii) Change in internal energy du = -117.370 kJ/kg\n",
+ "(b) Using Mollier chart\n",
+ "(i) Change in entropy = 2.070 kJ/kg K\n",
+ "(ii) Change in enthalpy = -132.000 kJ/kg\n",
+ "(iii) Change in internal energy =-117.370 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.64 Page no :212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "V1 = 5.5; \t\t\t#m**3\n",
+ "p1 = 16.*10**5; \t\t\t#Pa\n",
+ "T1 = 315.; \t\t\t#K\n",
+ "V2 = V1;\n",
+ "p2 = 12.*10**5; \t\t\t#Pa\n",
+ "R = 0.287*10**3;\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations\n",
+ "m1 = p1*V1/R/T1;\n",
+ "T2 = T1*(p2/p1)**((y-1)/y);\n",
+ "m2 = p2*V2/R/T2;\n",
+ "\n",
+ "# Results\n",
+ "m = m1-m2;\n",
+ "print (\"Mass of air which left the receiver = %.3f\")% (m), (\"kg\")\n",
+ "\n",
+ "# Note : Rounding error is there."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of air which left the receiver = 18.081 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.65 Page no :213"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "cp = 1.; \t\t\t#kJ/kg.K\n",
+ "cv = 0.711; \t\t\t#kJ/kg.K\n",
+ "V1 = 1.6; \t\t\t#m**3\n",
+ "V2 = V1;\n",
+ "p1 = 5.*10**5; \t\t\t#Pa\n",
+ "T1 = 373.; \t\t\t#K\n",
+ "p2 = 1.*10**5; \t\t\t#Pa\n",
+ "R = 287.;\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations\n",
+ "m1 = round(p1*V1/R/T1,2);\n",
+ "T2 = round(T1*(p2/p1)**((y-1)/y),2);\n",
+ "m2 = round(p2*V2/R/T2,3);\n",
+ "KE = (m1*cv*T1)-(m2*cv*T2)-(m1-m2)*cp*T2;\n",
+ "\n",
+ "# Results\n",
+ "print \"Kinetic energy of discharge air = %.3f\"% (KE), (\"kJ\")\n",
+ "print (\"This is the exact answer when using proper value of cv\")\n",
+ "\n",
+ "# Book answer is wrong."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Kinetic energy of discharge air = 382.910 kJ\n",
+ "This is the exact answer when using proper value of cv\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.66 Page no :214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#For oxygen\n",
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "cpa = 0.88; \t\t\t#kJ/kg K\n",
+ "Ra = 0.24; \t\t\t#kJ/kg K\n",
+ "V1a = 0.035; \t\t\t#m**3\n",
+ "p1a = 4.5; \t\t\t#bar\n",
+ "T1a = 333.; \t\t\t#K\n",
+ "V2a = 0.07; \t\t\t#m**3\n",
+ "\n",
+ "#For methane\n",
+ "V1b = 0.07; \t\t\t#m**3\n",
+ "V2b = 0.035; \t\t\t#m**3\n",
+ "p1b = 4.5; \t\t\t#bar\n",
+ "T1b = 261; \t\t\t#K\n",
+ "cpb = 1.92; \t\t\t#kJ/kg K\n",
+ "Rb = 0.496; \t\t\t#kJ/kg K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "yb = cpb/(cpb-Rb); \t\t\t#for methane\n",
+ "cva = cpa-Ra; \t\t\t#for oxygen\n",
+ "\n",
+ "print (\"(i) Final state condition\")\n",
+ "\n",
+ "p2b = p1b*(V1b/V2b)**yb;\n",
+ "print (\"p2 for methane = %.3f\")% (p2b), (\"bar\")\n",
+ "\n",
+ "T2b = p2b*V2b*T1b/p1b/V1b;\n",
+ "print (\"T2 for methane = %.3f\")% (T2b), (\"K\")\n",
+ "\n",
+ "p2a = p2b;\n",
+ "\n",
+ "T2a = p2a*V2a/p1a/V1a*T1a;\n",
+ "print (\"T2 for oxygen = %.3f\")% (T2a), (\"K\")\n",
+ "\n",
+ "Wb = (p1b*V1b - p2b*V2b)/(yb-1)*100; \t\t\t#kJ\n",
+ "\n",
+ "print (\"(ii)The piston will be in virtual equilibrium and hence zero work is effected by the piston.\")\n",
+ "\n",
+ "Wa = -Wb;\n",
+ "\n",
+ "ma = p1a*V1a/Ra/T1a*10**2;\n",
+ "\n",
+ "Q = ma*cva*(T2a-T1a) + Wa;\n",
+ "print \"(iii) Heat transferred to oxygen = %.3f\"% (Q), (\"kJ\")\n",
+ "\n",
+ "# Rouding error is there."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Final state condition\n",
+ "p2 for methane = 11.458 bar\n",
+ "T2 for methane = 332.272 K\n",
+ "T2 for oxygen = 1695.733 K\n",
+ "(ii)The piston will be in virtual equilibrium and hence zero work is effected by the piston.\n",
+ "(iii) Heat transferred to oxygen = 196.572 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch5.ipynb b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch5.ipynb
new file mode 100755
index 00000000..82caf09b
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch5.ipynb
@@ -0,0 +1,2525 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Chapter 5 : Second Law of Thermodynamics and Entropy"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.1 Page no : 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "Q1 = 1500./60; \t\t#kJ/s\n",
+ "W = 8.2; \t\t\t#kW\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Thermal efficiency\")\n",
+ "n = W/Q1;\n",
+ "print (\"n = \"),(n)\n",
+ "\n",
+ "print (\"(ii) Rate of heat rejection\")\n",
+ "Q2 = Q1-W; \n",
+ "print (\"Q2 = \"),(Q2), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Thermal efficiency\n",
+ "n = 0.328\n",
+ "(ii) Rate of heat rejection\n",
+ "Q2 = 16.8 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.2 Page no : 238"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "Q_12 = 30.; \t\t#kJ\n",
+ "W_12 = 60; \t\t\t#kJ\n",
+ "\n",
+ "# Calculations\n",
+ "dU_12 = Q_12-W_12;\n",
+ "Q_21 = 0;\n",
+ "W_21 = Q_21+dU_12;\n",
+ "\n",
+ "# Results\n",
+ "print (\"W_21 = \"),(W_21)\n",
+ "print (\"Thus 30 kJ work has to be done on the system to restore it to original state, by adiabatic process.\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "W_21 = -30.0\n",
+ "Thus 30 kJ work has to be done on the system to restore it to original state, by adiabatic process.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.3 Page no : 239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "Q2 = 12000.; \t\t\t#kJ/h\n",
+ "W = 0.75*60*60; \t\t#kJ/h\n",
+ "\n",
+ "# Calculations and Results\n",
+ "COP = Q2/W;\n",
+ "print (\"Coefficient of performance %.3f\")%(COP)\n",
+ "\n",
+ "Q1 = Q2+W;\n",
+ "print (\"heat transfer rate = %.3f\")%(Q1), (\"kJ/h\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Coefficient of performance 4.444\n",
+ "heat transfer rate = 14700.000 kJ/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.4 Page no : 239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T2 = 261.; \t\t\t#K\n",
+ "T1 = 308.; \t\t\t#K\n",
+ "Q2 = 2.; \t\t\t#kJ/s\n",
+ "\n",
+ "# Calculations\n",
+ "Q1 = Q2*(T1/T2);\n",
+ "W = Q1-Q2;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Least power required to pump the heat continuosly %.3f\")%(W),(\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Least power required to pump the heat continuosly 0.360 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.5 Page no :239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "Q1 = 2*10**5; \t\t\t#kJ/h\n",
+ "W = 3*10**4; \t\t\t#kJ/h\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Q2 = Q1-W;\n",
+ "print (\"Heat abstracted from outside = \"),(Q2), (\"kJ/h\")\n",
+ "\n",
+ "\n",
+ "COP_hp = Q1/(Q1-Q2);\n",
+ "print (\"Co-efficient of performance = %.2f\")%(COP_hp)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat abstracted from outside = 170000 kJ/h\n",
+ "Co-efficient of performance = 6.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.6 Page no : 240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 2373; \t\t\t#K\n",
+ "T2 = 288.; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "n_max = 1-T2/T1;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Highest possible theoritical efficiency = %.3f\")% (n_max*100), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Highest possible theoritical efficiency = 87.863 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.7 Page no : 240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 523.; \t\t\t#K\n",
+ "T2 = 258.; \t\t\t#K\n",
+ "Q1 = 90.; \t\t\t#kJ\n",
+ "\n",
+ "# Calculations and Results\n",
+ "n = 1-T2/T1;\n",
+ "print (\"(i) Efficiency of the system %.3f\")%(n*100), (\"%\")\n",
+ "\n",
+ "W = n*Q1;\n",
+ "print (\"(ii) The net work transfer\"),(\"W = %.3f\")%(W),(\"kJ\")\n",
+ " \n",
+ "Q2 = Q1-W;\n",
+ "print (\"(iii) Heat rejected to the math.sink\"),(\"Q2 = %.3f\")%(Q2),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Efficiency of the system 50.669 %\n",
+ "(ii) The net work transfer W = 45.602 kJ\n",
+ "(iii) Heat rejected to the math.sink Q2 = 44.398 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.8 Page no : 241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 1023.; \t\t#K\n",
+ "T2 = 298.; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "n_carnot = 1-T2/T1;\n",
+ "W = 75*1000*60*60;\n",
+ "Q = 3.9*74500*1000;\n",
+ "n_thermal = W/Q;\n",
+ "\n",
+ "# Results\n",
+ "print (\"n_carnot = %.3f\")%(n_carnot)\n",
+ "\n",
+ "print (\"n_thermal = %.3f\")%(n_thermal)\n",
+ "\n",
+ "print (\"Since \u03b7thermal > \u03b7carnot, therefore claim of the inventor is not valid (or possible)\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "n_carnot = 0.709\n",
+ "n_thermal = 0.929\n",
+ "Since \u03b7thermal > \u03b7carnot, therefore claim of the inventor is not valid (or possible)\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.9 Page no : 241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 1273.; \t\t#K\n",
+ "T2 = 313.; \t\t\t#K\n",
+ "n_max = 1-T2/T1;\n",
+ "Wnet = 1.;\n",
+ "\n",
+ "# Calculations\n",
+ "Q1 = Wnet/n_max;\n",
+ "Q2 = Q1-Wnet;\n",
+ "\n",
+ "# Results\n",
+ "print (\"the least rate of heat rejection = %.3f\")%(Q2), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the least rate of heat rejection = 0.326 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.10 Page no : 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "one_ton_of_refrigeration = 210.; \t\t\t#kJ/min\n",
+ "Cooling_required = 40*(one_ton_of_refrigeration); \t\t\t#kJ/min\n",
+ "T1 = 303.; \t\t\t#K\n",
+ "T2 = 238.; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "COP_refrigerator = T2/(T1-T2);\n",
+ "COP_actual = 0.20*COP_refrigerator;\n",
+ "W = Cooling_required/COP_actual/60;\n",
+ "\n",
+ "# Results\n",
+ "print (\"power required = %.1f\")% (W), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "power required = 191.2 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.11 Page no : 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "E = 12000.; \t\t#kJ/min\n",
+ "T2 = 308.; \t\t\t#K\n",
+ "# Source 1\n",
+ "T1 = 593.; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "n1 = 1-T2/T1;\n",
+ "# Source 2\n",
+ "T1 = 343.; \t\t\t#K\n",
+ "n2 = 1-T2/T1;\n",
+ "W1 = E*n1;\n",
+ "\n",
+ "# Results\n",
+ "print (\"W1 = %.3f\")% (W1),(\"kJ/min\")\n",
+ "\n",
+ "W2 = E*n2;\n",
+ "print (\"W2 = %.3f\")% (W2),(\"kJ/min\")\n",
+ "\n",
+ "print (\"Thus, choose source 2.\")\n",
+ "print (\"The source 2 is selected even though efficiency in this case is lower, because the criterion for selection is the larger output.\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "W1 = 5767.285 kJ/min\n",
+ "W2 = 1224.490 kJ/min\n",
+ "Thus, choose source 2.\n",
+ "The source 2 is selected even though efficiency in this case is lower, because the criterion for selection is the larger output.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ " Example 5.12 Page no : 243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 973.; \t\t\t#K\n",
+ "T2 = 323.; \t\t\t#K\n",
+ "T3 = 248.; \t\t\t#K\n",
+ "\n",
+ "Q1 = 2500.; \t\t\t#kJ\n",
+ "W = 400.; \t\t\t#kJ\n",
+ "\n",
+ "# Calculations and Results\n",
+ "n_max = 1-T2/T1;\n",
+ "W1 = n_max*Q1;\n",
+ "COP_max = T3/(T2-T3);\n",
+ "W2 = W1-W;\n",
+ "Q4 = COP_max*W2;\n",
+ "COP1 = round(Q4/W2,3);\n",
+ "Q3 = Q4+W2;\n",
+ "Q2 = Q1-W1;\n",
+ "print (\"Heat rejection to the 50\u00b0C reservoir = %.3f\")%(Q2+Q3), (\"kJ\")\n",
+ "\n",
+ "\n",
+ "n = 0.45*n_max;\n",
+ "W1 = n*Q1;\n",
+ "W2 = W1-W;\n",
+ "COP2 = 0.45*COP1;\n",
+ "Q4 = W2*COP2;\n",
+ "Q3 = Q4+W2;\n",
+ "Q2 = Q1-W1;\n",
+ "\n",
+ "print (\"Heat rejected to 50\u00b0C reservoir = %.3f\")% (Q2+Q3), (\"kJ\")\n",
+ "\n",
+ "# Note : Answers are slightly different then book because of Rounding Error."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat rejection to the 50\u00b0C reservoir = 6299.773 kJ\n",
+ "Heat rejected to 50\u00b0C reservoir = 2623.147 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.13 Page no : 244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 298.; \t\t\t#K\n",
+ "T2 = 273.; \t\t\t#K\n",
+ "Q1 = 24.; \t\t\t#kJ/s\n",
+ "T3 = 653.; \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "COP = T1/(T1-T2);\n",
+ "print (\"(i) determine COP and work input required\")\n",
+ "\n",
+ "print (\"Coefficient of performance = \"),(COP)\n",
+ "\n",
+ "COP_ref = T2/(T1-T2);\n",
+ "W = Q1/COP_ref;\n",
+ "print (\"Work input required = %.3f\")%(W),(\"kW\")\n",
+ "\n",
+ " \n",
+ "Q4 = T1*W/(T3-T1);\n",
+ "Q3 = Q4+W;\n",
+ "Q2 = Q1+W;\n",
+ "COP = Q1/Q3;\n",
+ "print (\"(ii)Determine overall COP of the system \"),(\"COP = %.3f\")%(COP)\n",
+ "\n",
+ "COP_overall = (Q2+Q4)/Q3;\n",
+ "print (\"Overall COP = %.3f\")%(COP_overall)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) determine COP and work input required\n",
+ "Coefficient of performance = 11.92\n",
+ "Work input required = 2.198 kW\n",
+ "(ii)Determine overall COP of the system COP = 5.937\n",
+ "Overall COP = 6.937\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.14 Page no : 245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T_e1 = 493.; \t\t\t#K\n",
+ "T_e2 = 298.; \t\t\t#K\n",
+ "T_p1 = 298.; \t\t\t#K\n",
+ "T_p2 = 273.; \t\t\t#K\n",
+ "Amt = 15.; \t\t \t#tonnes produced per day\n",
+ "h = 334.5; \t\t\t #kJ/kg\n",
+ "Q_abs = 44500.; \t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Q_p2 = Amt*10**3*h/24/60;\n",
+ "COP_hp = T_p2/(T_p1-T_p2);\n",
+ "W = Q_p2/COP_hp/60;\n",
+ "print (\"(i)Power developed by the engine = %.3f\")%(W),(\"kW\")\n",
+ "\n",
+ "print (\"(ii) Fuel consumed per hour\")\n",
+ "n_carnot = 1-(T_e2/T_e1);\n",
+ "Q_e1 = W/n_carnot*3600; \t\t\t#kJ/h\n",
+ "fuel_consumed = Q_e1/Q_abs;\n",
+ "print (\"Quantity of fuel consumed/hour = %.3f\")%(fuel_consumed),(\"kg/h\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Power developed by the engine = 5.318 kW\n",
+ "(ii) Fuel consumed per hour\n",
+ "Quantity of fuel consumed/hour = 1.088 kg/h\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.15 Page no : 247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 550.; \t\t\t#K\n",
+ "T3 = 350.; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "T2 = (T1+T3)/2;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Intermediate temperature = \"), (T2),(\"K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Intermediate temperature = 450.0 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.16 Page no : 247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 600.; \t\t\t#K\n",
+ "T2 = 300.; \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "T3 = 2*T1/(T1/T2+1);\n",
+ "print (\"(i) When Q1 = Q2\"),(\"T3 = \"),(T3),(\"K\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Efficiency of Carnot engine and COP of carnot refrigerator\")\n",
+ "n = (T1-T3)/T1; \t\t\t#carnot engine\n",
+ "COP = T2/(T3-T2); \t\t\t#refrigerator\n",
+ "\n",
+ "print (\"Efficiency of carnot engine = %.3f\")% (n)\n",
+ "\n",
+ "print (\"COP of carnot refrigerator = \"), (COP)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) When Q1 = Q2 T3 = 400.0 K\n",
+ "(ii) Efficiency of Carnot engine and COP of carnot refrigerator\n",
+ "Efficiency of carnot engine = 0.333\n",
+ "COP of carnot refrigerator = 3.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.17 Page no : 249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T3 = 278.; \t\t\t#K\n",
+ "T2 = 350.; \t\t\t#K\n",
+ "T4 = T2;\n",
+ "T1 = 1350.; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "Q1 = 100/(((T4/T1)*(T1-T2)/(T4-T3))+T2/T1) \t#Q4+Q2 = 100; Q4 = Q1*((T4/T1)*(T1-T2)/(T4-T3)); Q2 = T2/T1*Q1;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Q1 = %.3f\")%(Q1),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q1 = 25.906 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.18 Page no : 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "Q1 = 300.; \t\t\t#kJ/s\n",
+ "T1 = 290.; \t\t\t#0C\n",
+ "T2 = 8.5; \t\t\t#0C\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"let \u03a3dQ/T = A\")\n",
+ "\n",
+ "print (\"(i) 215 kJ/s are rejected\")\n",
+ "Q2 = 215.; \t\t\t#kJ/s\n",
+ "A = Q1/(T1+273) - Q2/(T2+273)\n",
+ "print (\"Since, A<0, Cycle is irreversible.\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) 150 kJ/s are rejected\")\n",
+ "Q2 = 150; \t\t\t#kJ/s\n",
+ "A = Q1/(T1+273) - Q2/(T2+273)\n",
+ "print (\"Since A = 0, cycle is reversible\")\n",
+ "\n",
+ "\n",
+ "print (\"(iii) 75 kJ/s are rejected.\")\n",
+ "Q2 = 75; \t\t\t#kJ/s\n",
+ "A = Q1/(T1+273) - Q2/(T2+273)\n",
+ "print (\"Since A>0, cycle is impossible\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "let \u03a3dQ/T = A\n",
+ "(i) 215 kJ/s are rejected\n",
+ "Since, A<0, Cycle is irreversible.\n",
+ "(ii) 150 kJ/s are rejected\n",
+ "Since A = 0, cycle is reversible\n",
+ "(iii) 75 kJ/s are rejected.\n",
+ "Since A>0, cycle is impossible\n"
+ ]
+ }
+ ],
+ "prompt_number": 65
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.19 Page no : 251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "P1 = 0.124*10**5; \t\t\t#N/m**2\n",
+ "T1 = 433; \t\t\t#K\n",
+ "T2 = 323; \t\t\t#K\n",
+ "h_f1 = 687; \t\t\t#kJ/kg\n",
+ "h2 = 2760; \t\t\t#kJ/kg\n",
+ "h3 = 2160; \t\t\t#kJ/kg\n",
+ "h_f4 = 209; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Q1 = h2-h_f1;\n",
+ "Q2 = h_f4-h3;\n",
+ "print (\"Let A = \u03a3dQ/T\")\n",
+ "A = Q1/T1+Q2/T2;\n",
+ "print (A)\n",
+ "print (\"A<0. Hence classius inequality is verified\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Let A = \u03a3dQ/T\n",
+ "-3\n",
+ "A<0. Hence classius inequality is verified\n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.20 Page no :251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "T1 = 437.; \t\t\t#K\n",
+ "T2 = 324.; \t \t\t#K\n",
+ "h2 = 2760.; \t\t\t#kJ/kg\n",
+ "h1 = 690.; \t\t \t#kJ/kg\n",
+ "h3 = 2360.; \t\t\t#kJ/kg\n",
+ "h4 = 450.; \t\t\t #kJkg\n",
+ "\n",
+ "# Calculations\n",
+ "Q1 = h2-h1;\n",
+ "Q2 = h4-h3;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Let A = \u03a3dQ/T\")\n",
+ "A = Q1/T1 + Q2/T2;\n",
+ "print \"%.3f\"%(A)\n",
+ "print (\"Since A<0, Classius inequality is verified\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Let A = \u03a3dQ/T\n",
+ "-1.158\n",
+ "Since A<0, Classius inequality is verified\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.21 Page no : 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "T0 = 273.; \t\t\t#K\n",
+ "T1 = 673.; \t\t\t#K\n",
+ "T2 = 298.; \t\t\t#K\n",
+ "m_w = 10.; \t\t\t#kg\n",
+ "T3 = 323.; \t\t\t#K\n",
+ "c_pw = 4186.; \t\t#kJ/kg.K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"Let C = mi*cpi\")\n",
+ "C = m_w*c_pw*(T3-T2)/(T1-T3);\n",
+ "S_iT1 = C*math.log(T1/T0); \t\t\t# Entropy of iron at 673 K\n",
+ "S_wT2 = m_w*c_pw*math.log(T2/T0); \t#Entropy of water at 298 K\n",
+ "S_iT3 = C*math.log(T3/T0); \t\t\t#Entropy of iron at 323 K\n",
+ "S_wT3 = m_w*c_pw*math.log(T3/T0); \t#Entropy of water at 323 K\n",
+ "\n",
+ "dS_i = S_iT3 - S_iT1;\n",
+ "dS_w = S_wT3 - S_wT2; \n",
+ "dS_net = dS_i + dS_w\n",
+ "\n",
+ "print (\"Since dS>0, process is irreversible\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Let C = mi*cpi\n",
+ "Since dS>0, process is irreversible\n"
+ ]
+ }
+ ],
+ "prompt_number": 68
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.23 Page no : 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "T1 = 293.; \t\t\t#K\n",
+ "V1 = 0.025; \t\t\t#m**3\n",
+ "V3 = V1;\n",
+ "p1 = 1.05*10**5; \t\t\t#N/m**2\n",
+ "p2 = 4.5*10**5; \t\t\t#N/m**2\n",
+ "R = 0.287*10**3; \n",
+ "cv = 0.718;\n",
+ "cp = 1.005;\n",
+ "T3 = 293.; \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m = p1*V1/R/T1;\n",
+ "T2 = p2/p1*T1;\n",
+ "Q_12 = m*cv*(T2-T1);\n",
+ "Q_23 = m*cp*(T3-T2)\n",
+ "\n",
+ "Q_net = Q_12+Q_23;\n",
+ "print (\"Net heat flow = \"),(Q_net), (\"kJ\")\n",
+ "\n",
+ "\n",
+ "dS_32 = m*cp*math.log(T2/T1);\n",
+ "dS_12 = m*cv*math.log(T2/T1);\n",
+ "dS_31 = dS_32 - dS_12;\n",
+ "print (\"Decrease in entropy = %.3f\")% (dS_31), (\"kJ/K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net heat flow = -8.625 kJ\n",
+ "Decrease in entropy = 0.013 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.24 Page no : 269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline\n",
+ "\n",
+ "from matplotlib.pyplot import *\n",
+ "from numpy import *\n",
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "p1 = 1.05*10**5; \t#N/m**2\n",
+ "V1 = 0.04; \t\t\t#m**3\n",
+ "T1 = 288.; \t\t\t#K\n",
+ "p2 = 4.8*10**5;\n",
+ "T2 = T1;\n",
+ "R0 = 8314.;\n",
+ "M = 28.;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "R = R0/M;\n",
+ "m = p1*V1/R/T1;\n",
+ "dS = m*R*math.log(p1/p2)\n",
+ "print (\"Decrease in entropy = %.3f\")% (-dS), (\"J/K\")\n",
+ "\n",
+ "\n",
+ "print \n",
+ "Q = T1*(-dS);\n",
+ "print (\"(ii)Heat rejected = \"),(\"Q = %.3f\")%(Q),(\"J\")\n",
+ "\n",
+ "\n",
+ "W = Q;\n",
+ "print (\"Work done = %.3f\")% (W), (\"J\")\n",
+ "\n",
+ "V2 = p1*V1/p2;\n",
+ "v1 = V1/m; \t\t\t#specific volume\n",
+ "v2 = V2/m; \t\t\t#specific volume\n",
+ "\n",
+ "v = linspace(v2,0.8081571,64);\n",
+ "\n",
+ "\n",
+ "def f(v):\n",
+ " return p1*v1/v\n",
+ "plot(v,f(v))\n",
+ "\n",
+ "p = []\n",
+ "for i in range(len(v)):\n",
+ " p.append(p1)\n",
+ "plot(v,p,'--')\n",
+ "\n",
+ "p = [0 ,p2]\n",
+ "v = [v2 ,v2]\n",
+ "plot(v,p,'--')\n",
+ "\n",
+ "p = [0 ,p1]\n",
+ "v = [v1 ,v1]\n",
+ "plot(v,p,'--')\n",
+ "\n",
+ "T = [288, 288]\n",
+ "s = [10 ,(10-dS)]\n",
+ "plot(s,T)\n",
+ "\n",
+ "s = [10 ,10]\n",
+ "T = [0 ,288]\n",
+ "plot(s,T,'--')\n",
+ "\n",
+ "s = [(10-dS), (10-dS)]\n",
+ "T = [0 ,288]\n",
+ "plot(s,T,'--')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Populating the interactive namespace from numpy and matplotlib\n",
+ "Decrease in entropy = 22.164 J/K\n",
+ "\n",
+ "(ii)Heat rejected = Q = 6383.268 J\n",
+ "Work done = 6383.268 J\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 13,
+ "text": [
+ "[<matplotlib.lines.Line2D at 0x2c3da90>]"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEACAYAAABCl1qQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHfdJREFUeJzt3W9MVHe+P/D3zOhW7WivBQYtw5WWtgrHGZnVatTa0ApB\nIMX+sYG0sInuJv3tXQrbB31w22wZ2m39bdst16ybjblZrC7t3frbYtwUOpHdltjU24mirtrNvdla\nhTljlQGkjFL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BdXR0AoK6uDgUFBSYnmpyRhww++OCDab3/RQQ//vGP\nkZmZGb2aBYifz2Cs/PHyGXR2diIcDgMAvv32WzQ1NcHlcsXF/h8reygUir5mQvt+6s+7f38aGxtF\n0zTJyMiQ119/3ew4k/LVV1+J2+2WZcuWyX333Se/+MUvzI40rpKSElm4cKHMnDlTnE6n1NbWSmdn\np+Tk5IjL5ZLc3Fy5cOGC2THHdG3+3//+91JaWiput1uWLFkieXl5ouu62THH9Omnn4rFYpFly5ZJ\nVlaWZGVlyUcffRQ3n8GN8jc2NsbNZ3D8+HHJysqSZcuWyeLFi6W6ulpEJC72/1jZJ7vveVMeERHF\nFLeHoYiI6PvDsiAiophYFkREFBPLgoiIYmJZEBFRTCwLIiKKiWVBREQxsSyIiCim/w93T0cbP4g9\nZgAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x2124290>"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.25 Page no : 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "R = 287.; \t\t\t#kJ/kg.K\n",
+ "dU = 0;\n",
+ "W = 0;\n",
+ "Q = dU+W;\n",
+ "\n",
+ "# Calculations\n",
+ "dS = R*math.log(2); \t\t\t#v2/v1 = 2\n",
+ "\n",
+ "# Results\n",
+ "print (\"Change in entropy = %.3f\")%(dS),(\"kJ/kg.K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy = 198.933 kJ/kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.26 Page no : 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m = 0.04; \t\t\t#kg\n",
+ "p1 = 1*10.**5; \t\t\t#N/m**2\n",
+ "T1 = 293.; \t\t\t#K\n",
+ "p2 = 9*10.**5; \t\t\t#N/m**2\n",
+ "V2 = 0.003; \t\t\t#m**3\n",
+ "cp = 0.88; \t\t\t#kJ/kg.K\n",
+ "R0 = 8314.;\n",
+ "M = 44.;\n",
+ "\n",
+ "# Calculations\n",
+ "R = R0/M;\n",
+ "T2 = p2*V2/m/R;\n",
+ "ds_2A = R/10**3*math.log(p2/p1);\n",
+ "ds_1A = cp*math.log(T2/T1);\n",
+ "ds_21 = ds_2A - ds_1A;\n",
+ "dS_21 = m*ds_21;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Decrease in entropy = %.3f\")% (dS_21),(\"kJ/K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Decrease in entropy = 0.010 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.27 Page no : 272"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "p1 = 7.*10**5; \t\t\t#N/m**2\n",
+ "T1 = 873.; \t\t\t#K\n",
+ "p2 = 1.05*10**5; \t\t\t#N/M62\n",
+ "n = 1.25;\n",
+ "m = 1.; \t\t\t#kg\n",
+ "R = 0.287;\n",
+ "cp = 1.005;\n",
+ "\n",
+ "# Calculations\n",
+ "T2 = T1*(p2/p1)**((n-1)/n);\n",
+ "\n",
+ "# At constant temperature from 1 to A\n",
+ "ds_1A = R*math.log(p1/p2);\n",
+ "# At constant pressure from A to 2\n",
+ "ds_2A = cp*math.log(T1/T2);\n",
+ "ds_12 = ds_1A - ds_2A;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Increase in entropy = %.3f\")% (ds_12), (\"kJ/kg.K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Increase in entropy = 0.163 kJ/kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.28 Page no : 274"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "p1 = 7*10**5; \t\t#Pa\n",
+ "T1 = 733.; \t\t\t#K\n",
+ "p2 = 1.012*10**5; \t#Pa\n",
+ "T2a = 433.; \t\t#K\n",
+ "y = 1.4;\n",
+ "cp = 1.005;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) To prove that the process is irreversible\")\n",
+ "T2 = T1*(p2/p1)**((y-1)/y);\n",
+ "print (\"T2 = %.3f\")% (T2)\n",
+ "print (\"But the actual temperature is 433K at th epressure of 1.012 bar, Hence the process is irreversible. Proved.\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Change of entropy per kg of air\")\n",
+ "ds = cp*math.log(T2a/T2);\n",
+ "print (\"Increase of entropy = %.3f\")% (ds), (\"kJ/kg.K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) To prove that the process is irreversible\n",
+ "T2 = 421.820\n",
+ "But the actual temperature is 433K at th epressure of 1.012 bar, Hence the process is irreversible. Proved.\n",
+ "(ii) Change of entropy per kg of air\n",
+ "Increase of entropy = 0.026 kJ/kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.29 Page no : 275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "V1 = 0.3; \t\t\t#m**3\n",
+ "p1 = 4*10**5; \t\t#N/m**2\n",
+ "V2 = 0.08; \t\t\t#m**3\n",
+ "n = 1.25; \n",
+ "\n",
+ "# Calculations and Results\n",
+ "p2 = p1*(V1/V2)**n;\n",
+ "\n",
+ "dH = n*(p2*V2-p1*V1)/(n-1)/10**3;\n",
+ "print (\"(i) Change in enthalpy\"), (\"dH = %.3f\")% (dH), (\"kJ\")\n",
+ "\n",
+ "dU = dH-(p2*V2 - p1*V1)/10**3;\n",
+ "print (\"(ii) Change in internal energy\"),(\"dU = %.3f\")% (dU), (\"kJ\")\n",
+ "\n",
+ "dS = 0;\n",
+ "print (\"(iii) Change in entropy\"),(\"dS\"), (dS)\n",
+ "\n",
+ "Q = 0;\n",
+ "print (\"(iv)Heat transfer\"),(\"Q = \"), (Q)\n",
+ "\n",
+ "W = Q-dU;\n",
+ "print (\"(v) Work transfer\"),(\"W = %.3f\")%(W),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Change in enthalpy dH = 234.947 kJ\n",
+ "(ii) Change in internal energy dU = 187.958 kJ\n",
+ "(iii) Change in entropy dS 0\n",
+ "(iv)Heat transfer Q = 0\n",
+ "(v) Work transfer W = -187.958 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.30 Page no : 277"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m = 20.; \t\t\t#kg\n",
+ "p1 = 4.*10**5; \t\t\t#Pa\n",
+ "p2 = 8.*10**5; \t\t\t#Pa\n",
+ "V1 = 4.; \t\t\t#m**3\n",
+ "V2 = V1;\n",
+ "cp = 1.04; \t\t\t#kJ/kg.K\n",
+ "cv = 0.7432; \t\t\t#kJ/kg.K\n",
+ "R = cp-cv;\n",
+ "T1 = p1*V1/R/1000.; \t\t\t#kg.K; T = mass*temperature\n",
+ "T2 = p2*V2/R/1000.; \t\t\t#kg.K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "dU = cv*(T2-T1);\n",
+ "print (\"(i) Change in internal energy\"),(\"dU = %.3f\")% (dU), (\"kJ\")\n",
+ "\n",
+ "Q = 0;\n",
+ "W = Q-dU;\n",
+ "print (\"(ii) Work done\"),(\"W %.3f\")% (W), (\"kJ\")\n",
+ "\n",
+ "print (\"(iii) Heat transferred = \"), (Q)\n",
+ "\n",
+ "dS = m*cv*math.log(T2/T1);\n",
+ "print (\"(iv) Change in entropy = %.3f\")%(dS), (\"kJ/K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Change in internal energy dU = 4006.469 kJ\n",
+ "(ii) Work done W -4006.469 kJ\n",
+ "(iii) Heat transferred = 0\n",
+ "(iv) Change in entropy = 10.303 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.31 Page no : 278"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from matplotlib.pyplot import *\n",
+ "%pylab inline\n",
+ "\n",
+ "# Variables\n",
+ "V1 = 5.; \t\t\t#m**3\n",
+ "p1 = 2.*10**5; \t\t\t#Pa\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "p2 = 6.*10**5; \t\t\t#Pa\n",
+ "p3 = 2.*10**5; \t\t\t#Pa\n",
+ "R = 287.;\n",
+ "n = 1.3;\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m = p1*V1/R/T1;\n",
+ "T2 = T1*(p2/p1)**((n-1)/n);\n",
+ "T3 = T2*(p3/p2)**((y-1)/y);\n",
+ "W_12 = m*R*(T1-T2)/(n-1)/1000; \t\t\t#polytropic compression\n",
+ "W_23 = m*R*(T2-T3)/(y-1)/1000; \t\t\t#Adiabatic expansion\n",
+ "\n",
+ "\n",
+ "W_net = W_12+W_23;\n",
+ "print (\"Net work done on the air = %.3f\")%(-W_net), (\"kJ\")\n",
+ "\n",
+ "T = [T1, 310, 320, 330, 340, 350, 360, 370, 380, T2];\n",
+ "def f(T):\n",
+ " return (y-n)/(y-1)/(1-n)*R/10**3*math.log(T);\n",
+ "\n",
+ "s = [f(T1), f(310), f(320), f(330), f(340), f(350), f(360), f(370), f(380), f(T2)]\n",
+ "\n",
+ "plot(s,T)\n",
+ "\n",
+ "T = [T2, T3];\n",
+ "s = [f(T2), f(T2)];\n",
+ "plot(s,T,'r')\n",
+ "\n",
+ "# Answers are slightly diffferent because of rounding error."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Populating the interactive namespace from numpy and matplotlib\n",
+ "Net work done on the air = 94.023 kJ\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "WARNING: pylab import has clobbered these variables: ['f', 'draw_if_interactive']\n",
+ "`%pylab --no-import-all` prevents importing * from pylab and numpy\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 9,
+ "text": [
+ "[<matplotlib.lines.Line2D at 0x2aa0d90>]"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAD9CAYAAABazssqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X1c1fX9//HHITBklWkqLpjRAsWDF2AK2s8KFbQ0SavR\ncPllX21bdrWcadLF0iyhtLVso75u+c22vpHuQqw5B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/bs4aGHHmLu3LkBlf+Ip59+utP/\n3YJ/szc2NnLgwAG2b9/OypUryczMbP3NTr71qm1aatvKyckx0dHRJiYmxgwaNMhERESYOXPmfO24\nf//73yYhIcHfUY+rI/n/+7//21xwwQWmoaGhq+Ieo6M/e6f6BNpy/ZbyDx061Ozbt88YY8zevXvN\n0KFDuyzz0drz87vnnnvMypUrv/b8O++8Y5KTkzs7Wpu0N/+qVauMMcacfvrpzc/7fD5zxhln+CVf\nazry8z98+LCJjIw0NTU1/orXopPNfskllxiPx9P82nnnnWf279/f4vld0g5gTvCb2ooVK6iqqqKy\nspKCggImTZrEk08+CdjbmiMKCwubh6c64WTyb9myhZUrV1JYWEh4eHhXxj3GyWRvy/ld5WTyZ2Rk\nsG7dOgDWrVvXPMHRCSfKv3//furq6gBoaGiguLi4+e/4hx9+CNhb/nvvvZf58+d3TdjjaE/+I2uM\nnWgOkRNO5ucP8PzzzzNs2DDOPvvsLsl5PCeTfebMmWzduhWA8vJyvF4vZ511VqsX8os//OEPJjo6\n2oSHh5vIyEhzySWXGGOMqampMdOmTfva8R6P55gRHldeeaUZPny4GTVqlLniiitMbW2tv6IeV0fz\nx8bGmsGDBzcPNZs/f37AZD/R+V2lo/k/+ugjM3nyZMeGiLYl/xtvvGGSkpLMqFGjzIgRI8wDDzzQ\nfP7DDz9shgwZYoYMGWJycnK6NHtn5N+xY0fzEMZx48aZXbt2BVR+Y4z5/ve/b/7rv/6rS3N3Rnav\n12uuueYaM3z4cDN69GjzwgsvtHpNlzFaw0FEJFgF5rAQERHpFCoCIiJBTEVARCSIqQiIiAQxFQER\nkSCmIiAiEsT+P3S/G55r8UZJAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x2aa0bd0>"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.32 Page no : 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "V1 = 0.004; \t\t\t#m**3\n",
+ "p1 = 1.*10**5; \t\t\t#Pa\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "T2 = 400.; \t\t\t#K\n",
+ "y = 1.4;\n",
+ "M = 28.;\n",
+ "R0 = 8.314;\n",
+ "R = R0/M;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) The heat supplied\")\n",
+ "m = p1*V1/R/1000/T1; \t\t\t#kg\n",
+ "cv = R/(y-1);\n",
+ "Q = m*cv*(T2-T1);\n",
+ "print (\"Q %.3f\")%(Q), (\"kJ\")\n",
+ "\n",
+ "print (\"(ii) The entropy change\")\n",
+ "dS = m*cv*math.log(T2/T1);\n",
+ "print (\"dS = %.8f\")%(dS), (\"kJ/kg.K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The heat supplied\n",
+ "Q 0.333 kJ\n",
+ "(ii) The entropy change\n",
+ "dS = 0.00095894 kJ/kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.33 Page no : 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "V1 = 0.05; \t\t\t#m**3\n",
+ "p1 = 1.*10**5; \t\t\t#Pa\n",
+ "T1 = 280.; \t\t\t#K\n",
+ "p2 = 5.*10**5; \t\t\t#Pa\n",
+ "\n",
+ "# Calculations\n",
+ "print (\"(i) Change in entropy\")\n",
+ "R0 = 8.314;\n",
+ "M = 28.;\n",
+ "R = R0/M;\n",
+ "m = p1*V1/R/T1/1000;\n",
+ "dS = m*R*math.log(p1/p2);\n",
+ "\n",
+ "# Results\n",
+ "print (\"dS = %.3f\")%(dS), (\"kJ/K\")\n",
+ "\n",
+ "print (\"(ii)Work done\")\n",
+ "Q = T1*dS;\n",
+ "print (\"Q = %.3f\")%(Q),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Change in entropy\n",
+ "dS = -0.029 kJ/K\n",
+ "(ii)Work done\n",
+ "Q = -8.047 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.34 Page no : 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "R = 0.287; \t\t\t#kJ/kg.K\n",
+ "m = 1.; \t\t\t#kg\n",
+ "p1 = 8.*10**5; \t\t\t#Pa\n",
+ "p2 = 1.6*10**5; \t\t\t#Pa\n",
+ "T1 = 380.; \t\t\t#K\n",
+ "n = 1.2;\n",
+ "y = 1.4;\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Final specific volume and temperature\")\n",
+ "v1 = R*T1/p1*10**3; \t\t\t#m**3/kg\n",
+ "v2 = v1*(p1/p2)**(1/n);\n",
+ "T2 = T1*(p2/p1)**((n-1)/n);\n",
+ "\n",
+ "print (\"v2 = %.3f\")%(v2), (\"m**3/kg\")\n",
+ "print (\"T2 = %.3f\")% (T2),(\"K\")\n",
+ "\n",
+ "print (\"(ii) Change of internal energy, work done and heat interaction\")\n",
+ "dU = R/(y-1)*(T2-T1);\n",
+ "print (\"dU = %.3f\")%(dU), (\"kJ/kg\")\n",
+ "\n",
+ "W = R*(T1-T2)/(n-1);\n",
+ "print (\"W = %.3f\")%(W), (\"kJ/kg\")\n",
+ "\n",
+ "Q = dU + W;\n",
+ "print (\"Q = %.3f\")%(Q),(\"kJ/kg\")\n",
+ "\n",
+ "print (\"(iii) Change in entropy\")\n",
+ "dS = R/(y-1)*math.log(T2/T1) + R*math.log(v2/v1)\n",
+ "print (\"dS = %.3f\")%(dS),(\"kJ/kg.K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Final specific volume and temperature\n",
+ "v2 = 0.521 m**3/kg\n",
+ "T2 = 290.595 K\n",
+ "(ii) Change of internal energy, work done and heat interaction\n",
+ "dU = -64.148 kJ/kg\n",
+ "W = 128.296 kJ/kg\n",
+ "Q = 64.148 kJ/kg\n",
+ "(iii) Change in entropy\n",
+ "dS = 0.192 kJ/kg.K\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.35 Page no : 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%pylab inline\n",
+ "import math\n",
+ "from matplotlib.pyplot import *\n",
+ "\n",
+ "# Variables\n",
+ "y = 1.4;\n",
+ "cv = 0.718; \t\t#kJ/kg.K\n",
+ "m = 1.; \t\t\t #kg\n",
+ "T1 = 290.; \t\t\t#K\n",
+ "n = 1.3;\n",
+ "r = 16.;\n",
+ "y = 1.4;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "T2 = T1*(r)**(n-1);\n",
+ "\n",
+ "print (\"(a)\")\n",
+ "\n",
+ "T = [T1, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, 630, 640, 650, 660, T2];\n",
+ "def f(T):\n",
+ " return (y-n)*cv/(1-n)/10**3*math.log(T);\n",
+ "\n",
+ "s = [f(T1),f(300),f(310),f(320),f(330),f(340),f(350),f(360),f(370),f(380),f(390),f(400),f(410),f(420),f(430),f(440),f(450),f(460),f(470),f(480),f(490),f(500),f(510),f(520),f(530),f(540),f(550),f(560),f(570),f(580),f(590),f(600),f(610),f(620),f(630),f(640),f(650),f(660), f(T2)];\n",
+ "plot(s,T)\n",
+ "\n",
+ "T = [0, T2];\n",
+ "s = [f(T2), f(T2)];\n",
+ "plot(s,T,'r--')\n",
+ "\n",
+ "T = [0 ,T1];\n",
+ "s = [f(T1),f(T1)];\n",
+ "plot(s,T,'r--')\n",
+ "\n",
+ "T = [T1 ,T2];\n",
+ "s = [f(T1), f(T2)];\n",
+ "plot(s,T,'r--' )\n",
+ "suptitle(\"T-S diagram\")\n",
+ "xlabel(\"S\")\n",
+ "ylabel(\"T\")\n",
+ "text(-0.00150,400,\"pV**n = C\")\n",
+ "\n",
+ "print (\"(b)Entropy change\")\n",
+ "dS = cv*((n-y)/(n-1))*math.log(T2/T1);\n",
+ "print (\"dS = %.3f\")%(dS), (\"kJ/kg.K\")\n",
+ "print (\"There is decrease in entropy\")\n",
+ "\n",
+ "Q = cv*((y-n)/(n-1))*(T1-T2);\n",
+ "Tmean = (T1+T2)/2;\n",
+ "dS_app = Q/Tmean;\n",
+ "\n",
+ "error = ((-dS) - (-dS_app))/(-dS) * 100;\n",
+ "print (\"age error = %.3f\")%(error), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Populating the interactive namespace from numpy and matplotlib\n",
+ "(a)\n",
+ "(b)Entropy change"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "dS = -0.199 kJ/kg.K\n",
+ "There is decrease in entropy\n",
+ "age error = 5.393 %\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAZoAAAEhCAYAAABGC2bVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlclXX6//EXoOZeJqAFpg2NCwiKC2aSkUUYLpNtYknN\npJXNaJk538rKJX/ptJjaMqM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daPP/5ode/e3YqJibESExOt/Px8y7JMhcYtt9xitW3b1uratavncV/x1bmIjIy0\nvv/+e+vgwYNWhw4drHbt2lm///3vrSFDhlhHjx61LMuyHn74YSs2NtaKjo62unXrZuXl5fnoLPz2\na/HHuQiU98XJ/0aOy8/PL1NpFSjvi/Kci0B5Xxz/N7Jjxw6rU6dOVrt27ayWLVtaQ4cOtYqLiy3L\nOrf3hSZsioiIrRzVvVlERKofJRoREbGVEo2IiNhKiUZERGylRCMiIrZSohEREVsp0Yh4wRNPPEGr\nVq1o164d7dq1Iycnx98hiTiGo1bYFKmKsrOz+fzzz8nLy6NmzZrs27ePQ4cO+TssEcdQohGpJLfb\nTVhYGDVr1gSgYcOGNGzY0M9RiTiHOgOIVNK+ffvo1q0bxcXFJCUlcfPNN3PNNdf4OywRx9A9GpFK\natiwIStXruTll1+mSZMmDBw4kFdeecXfYYk4hkY0Il42a9YsXnnlFT799FN/hyLiCBrRiFTSxo0b\nyyyUtWLFijIrHYoEOhUDiFTS/v37+fOf/8zBgwcpLi7msssu06UzkZPo0pmIiNhKl85ERMRWSjQi\nImIrJRoREbGVEo2IiNhKiUZERGylRCMiIrZSohEREVsp0YiIiK3+P0qnzwUjczFJAAAAAElFTkSu\nQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x3b860d0>"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.36 Page no : 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from matplotlib.pyplot import *\n",
+ "from numpy import *\n",
+ "# Variables\n",
+ "cp = 1.005; \t\t\t#kJ/kg.K\n",
+ "R = 0.287; \t\t\t#kJ/kg.K\n",
+ "V1 = 1.2; \t\t\t#m**3\n",
+ "p1 = 1.*10**5; \t\t\t#Pa\n",
+ "p2 = p1;\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "T2 = 600.; \t\t\t#K\n",
+ "T3 = T1;\n",
+ "p1 = 1.*10**5; \t\t\t#Pa\n",
+ "cv = cp-R;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) The net heat flow\")\n",
+ "m = p1*V1/R/1000/T1; \t\t\t#kg\n",
+ "Q = m*R*(T2-T1);\n",
+ "print (\"Q = \"), (Q), (\"kJ\")\n",
+ "\n",
+ "print (\"(ii) The overall change in entropy\")\n",
+ "dS_12 = m*cp*math.log(T2/T1);\n",
+ "dS_23 = m*(cp-R)*math.log(T3/T2); \t\t\t#cv = cp-R\n",
+ "dS_overall = dS_12+dS_23;\n",
+ "print (\"Overall change in entropy = %.3f\")%(dS_overall),(\"kJ/K\")\n",
+ "\n",
+ "s = linspace(math.sqrt(300),math.sqrt(600),100);\n",
+ "T = s**2;\n",
+ "plot(s,T)\n",
+ "\n",
+ "s = linspace(22.18,math.sqrt(600),100)\n",
+ "T = 10*(s-16.725)**2;\n",
+ "plot(s,T,'r')\n",
+ "\n",
+ "s = [17, 25];\n",
+ "T = [600, 600];\n",
+ "plot(s,T,'--')\n",
+ "\n",
+ "s = [17 ,25];\n",
+ "T = [300 ,300];\n",
+ "plot(s,T,'--')\n",
+ "\n",
+ "suptitle(\"T-s diagram \")\n",
+ "xlabel(\"S\")\n",
+ "ylabel(\"T\")\n",
+ "text(24,400,\"v = C\")\n",
+ "text(20,450,\"p = C\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The net heat flow\n",
+ "Q = 120.0 kJ\n",
+ "(ii) The overall change in entropy\n",
+ "Overall change in entropy = 0.277 kJ/K\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 2,
+ "text": [
+ "<matplotlib.text.Text at 0x4787450>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEhCAYAAACU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1cuVK1bt3b6Oi2VyaMT09XYWGhqrAwEA1ffp01aRJEwPTlVdYWKiCg4PVZ599ppSyLwau\nUhwKCwtV586dbTkvcLXiUFnOl156SQ0cONCgVPYqy6mUUjExMerRRx81IFV5F2c8ffq06tq1qzpx\n4oRSSheHX3/91eCE2qW/y9zcXFVWVqbKysrUjBkz1PDhwy/7/FpZHM6dO6datGihsrOzDUpl79Kc\nN9xwg+3zsrKycl8bpbJCe+F7HTt2rOFEFato4eSf//xnlZubq5RS6vjx41Ve0OMMl1vg6UrFobKc\nH3zwgerevbs6c+aMQcnK+6MFsz/99JNq165dDacq79KMe/fuVV5eXqply5aqZcuW6pprrlG+vr7q\n2LFjLpXzUhcvPq6MS485VOarr77Cz8+P2267zegolfL19WXz5s0AbNy4kVatWhmcyN6FGSpKKWbP\nns2oUaMMTqSzPPbYY/j7+zNx4kTb42FhYcTFxQEQFxdHWFiYURGBynNeeo3RKsu5bt06XnvtNVav\nXs11111nYEKtspyZmZm2z7/44otys+1qWkUZg4KCOHbsGJmZmWRmZmIymdi1a5dtka+r5AS9+PiC\nVatWERAQ8Ic3clkRERHq1ltvVQ0bNlQmk0ktXbpUKaXUo48+qmJjYw1O918XcjZo0MCW85tvvlEd\nOnRQ/v7+ymKxqO3bt7tUxiVLlqj58+er9u3bq8DAQDVt2jRD812wdetW5ebmpjp06KA6duyoOnbs\nqNauXavy8vJU7969VVBQkOrTp4/hfc8V5UxMTFSfffaZMplM6rrrrlMtWrRQ999/v0vmbNOmjbr9\n9tttjz3xxBMumTM8PFyZzWbl5+enwsLC1NGjR10u48VatWpl+JhDZTkjIyOV2WxW7du3V3379lVW\nq/Wy95FFcEIIIezUym4lIYQQziXFQQghhB0pDkIIIexIcRBCCGFHioMQQgg7UhyEEELYkeIghAO8\n8MILtGvXjg4dOtChQwe2b99udCQhqsWpJ8EJUR8kJSWxYcMG0tPTadCgASdPnqSoqMjoWEJUixQH\nIaopNzeX5s2b2460bdKkCU2aNDE4lRDVIyukhaimkydP0qNHD0pKSggNDWXQoEHce++9RscSolpk\nzEGIamrSpAm7d+9m8eLFtGjRgsjISN5//32jYwlRLdJyEMLBVq1axfvvv8/atWuNjiLEVZOWgxDV\ndPDgQY4cOWL7OjU1FR8fH+MCCeEAMiAtRDUVFhby5JNPcvr0aUpKSmjTpo10K4laT7qVhBBC2JFu\nJSGEEHakOAghhLAjxUEIIYQdKQ5CCCHsSHEQQghhR4qDEEIIO1IchBBC2JHiIIQQws7/A7QEHj3e\nWXM+AAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x46d17d0>"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.37 Page no : 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from matplotlib.pyplot import *\n",
+ "\n",
+ "# Variables\n",
+ "cv = 0.718; \t\t\t#kJ/kg.K\n",
+ "R = 0.287 \t\t\t#kJ/kg.K\n",
+ "p1 = 1.*10**5; \t\t\t#Pa\n",
+ "T1 = 300. \t\t\t#K\n",
+ "V1 = 0.018; \t\t\t#m**3\n",
+ "p2 = 5.*10**5 \t\t\t#Pa\n",
+ "T3 = T1;\n",
+ "cp = cv+R;\n",
+ "p3 = p2;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m = p1*V1/R/T1/1000; \t\t\t#kg\n",
+ "T2 = T1*p2/p1;\n",
+ "\n",
+ "print (\"(i) constant volume process\")\n",
+ "dS_12 = m*cv*math.log(T2/T1);\n",
+ "print (\"dS = %.3f\")%(dS_12), (\"kJ/K\")\n",
+ "\n",
+ "print (\"(ii) Constant prssure process \")\n",
+ "dS_23 = m*cp*math.log(T3/T2);\n",
+ "print (\"dS = %.3f\")%(dS_23), (\"kJ/K\")\n",
+ "\n",
+ "print (\"(iii) Isothermal process\")\n",
+ "dS_31 = m*R*math.log(p3/p1);\n",
+ "print (\"dS = %.5f\")%(dS_31),(\"kJ/K\")\n",
+ "\n",
+ "print (\"T-s diagram\")\n",
+ "s = linspace(math.sqrt(300),math.sqrt(600),72);\n",
+ "T = s**2;\n",
+ "#plot(s,T)\n",
+ "\n",
+ "s = linspace(22.18,math.sqrt(600),24)\n",
+ "T = 10*(s-16.725)**2;\n",
+ "#plot(s,T,'r')\n",
+ "\n",
+ "s = [math.sqrt(300), 22.18];\n",
+ "T = [300 ,300];\n",
+ "#plot(s,T,'g')\n",
+ "\n",
+ "print (\"p-V diagram\")\n",
+ "\n",
+ "V = [0.018, 0.018];\n",
+ "p = [1 ,5];\n",
+ "#plot(V,p)\n",
+ "\n",
+ "p = [5 ,5];\n",
+ "V = [0.0036, 0.018];\n",
+ "#plot(V,p,'r')\n",
+ "\n",
+ "V = linspace(0.0036,0.018,145)\n",
+ "\n",
+ "def f():\n",
+ " return 1*0.018/V;\n",
+ "f1 = f()\n",
+ "\n",
+ "plot(V,f1,'g')\n",
+ "suptitle(\"p-V diagram\")\n",
+ "xlabel(\"V\")\n",
+ "ylabel(\"p\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) constant volume process\n",
+ "dS = 0.024 kJ/K\n",
+ "(ii) Constant prssure process \n",
+ "dS = -0.034 kJ/K\n",
+ "(iii) Isothermal process\n",
+ "dS = 0.00966 kJ/K\n",
+ "T-s diagram\n",
+ "p-V diagram\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 3,
+ "text": [
+ "<matplotlib.text.Text at 0x4047ad0>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEdCAYAAAASHSDrAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlUFGfCNfDbgKiAikRBBFQEFZC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w+fbpgaWkpGBoaCtbW1sJ3330n\nCMKzj8cOGTJErR+PFSOnuvcjMTI+TxP2odpyato+VFvO+u5DGn3jIiIikp60N3YlIiKNx6IgIqI6\nsSiIiKhOLAoiIqoTi4LoJfn6+uLQoUNVnvvss8+wcOFCiRIRNQ4WBdFL8vf3R3h4eJXndu3a9cpX\nBCDSdPx4LNFLunv3LhwdHZGXlwcDAwNkZWVh0KBBuHHjhtTRiETFEQXRSzIzM0Pv3r0RFRUFAAgP\nD8e0adMkTkUkPhYFUT08P/20a9cu+Pv7S5yISHyceiKqh4cPH8LOzg4xMTGYPn06rl69KnUkItFx\nREFUDyYmJhg8eDDmzp3Lg9jUZLAoiOrJ398fycnJnHaiJoNTT0REVCeOKIiIqE4sCiIiqhOLgoiI\n6sSiICKiOrEoiIioTiwKIiKq0/8HJIEAIIPDm7IAAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x4232ad0>"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.39 Page no : 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "m = 4; \t\t\t #kg\n",
+ "T1 = 400; \t\t\t#K\n",
+ "T2 = 500; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "def f12( T): \n",
+ "\t return m*(0.48+0.0096*T)/T\n",
+ "\n",
+ "dS = quad(f12, T1,T2)[0]\n",
+ "\n",
+ "# Results\n",
+ "print (\"dS = %.3f\")%(dS), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dS = 4.268 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.40 Page no : 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "p1 = 1*10**5; \t\t\t#Pa\n",
+ "T1 = 273; \t\t\t#K\n",
+ "p2 = 25*10**5; \t\t\t#Pa\n",
+ "T2 = 750; \t\t\t#K\n",
+ "R = 0.29; \t\t\t#kJ/kg.K ; cp = 0.85+0.00025*T; cv = 0.56+0.00025*T; R = cp-cv;\n",
+ "\n",
+ "# Calculations\n",
+ "v2 = R*T2/p2;\n",
+ "v1 = R*T1/p1;\n",
+ "\n",
+ "def f8( T): \n",
+ "\t return (0.56+0.00025*T)/T\n",
+ "\n",
+ "def f9(v):\n",
+ " return R/v\n",
+ "ds = quad(f8, T1, T2)[0] + quad(f9,v1,v2)[0]\n",
+ "\n",
+ "# Results\n",
+ "print (\"ds = %.3f\")%(ds),(\"kJ/kg K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ds = 0.045 kJ/kg K\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.41 Page no : 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "cv = 0.715; \t\t\t#kJ/kg K\n",
+ "R = 0.287; \t\t\t#kJ/kg K\n",
+ "V_A = 0.25; \t\t\t#m**3\n",
+ "p_Ai = 1.4; \t\t\t#bar\n",
+ "T_Ai = 290; \t\t\t#K\n",
+ "V_B = 0.25; \t\t\t#m**3\n",
+ "p_Bi = 4.2; \t\t\t#bar\n",
+ "T_Bi = 440; \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Final equilibrium temperature\")\n",
+ "m_A = p_Ai * 10**5 * V_A / R / 1000/ T_Ai; \t\t\t#kg\n",
+ "m_B = p_Bi * 10**5 * V_B / R / 1000/ T_Bi; \t\t\t#kg\n",
+ "\n",
+ "T_f = (m_B * T_Bi + m_A * T_Ai)/(m_A + m_B);\n",
+ "print (\"T_f = %.3f\")% (T_f), (\"K\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Final pressure on each side of the diaphragm\")\n",
+ "p_Af = p_Ai*T_f/T_Ai;\n",
+ "print (\"p_Af = %.3f\")%(p_Af),(\"bar\")\n",
+ "\n",
+ "p_Bf = p_Bi*T_f/T_Bi;\n",
+ "print (\"p_Bf = %.3f\")%(p_Bf),(\"bar\")\n",
+ "\n",
+ "\n",
+ "print (\"(iii) Entropy change of the system\")\n",
+ "dS_A = m_A*cv*math.log(T_f/T_Ai);\n",
+ "dS_B = m_B*cv*math.log(T_f/T_Bi);\n",
+ "dS_net = dS_A+dS_B;\n",
+ "print (\"Net change of entropy = %.3f\")%(dS_net), (\"kJ/K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Final equilibrium temperature\n",
+ "T_f = 389.618 K\n",
+ "(ii) Final pressure on each side of the diaphragm\n",
+ "p_Af = 1.881 bar\n",
+ "p_Bf = 3.719 bar\n",
+ "(iii) Entropy change of the system\n",
+ "Net change of entropy = 0.016 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.42 Page no : 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "cv = 1.25; \t\t\t#kJ/kg.K\n",
+ "T1 = 530.; \t\t\t#K\n",
+ "v1 = 0.0624; \t\t\t#m**3/kg\n",
+ "v2 = 0.186; \t\t\t#m**3/kg\n",
+ "dT_31 = 25.; \t\t\t#K\n",
+ "T3 = T1-dT_31; \t\t\t#K\n",
+ "dT_21 = 165.; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "T2 = T1-dT_21; \t\t\t#K\n",
+ "# Path 1-2 : Reversible adiabatic process\n",
+ "ds_12 = 0;\n",
+ "v3 = 0.186; \t\t\t#m**3/kg\n",
+ "v3 = v2;\n",
+ "ds_13 = cv*math.log(T3/T2);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Chang in entropy = %.4f\")%(ds_13), (\"kJ/kgK\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Chang in entropy = 0.4058 kJ/kgK\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.44 Page no : 289"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import *\n",
+ "\n",
+ "# Variables\n",
+ "T1 = 500.; \t\t\t#K\n",
+ "T2 = 400.; \t\t\t#K\n",
+ "T3 = 300.; \t\t\t#K\n",
+ "Q1 = 1500.; \t\t\t#kJ/min\n",
+ "W = 200.; \t\t\t#kJ/min\n",
+ "\n",
+ "# Calculations and Results\n",
+ "A = [[1,-1],[(1./400),(-1./300)]];\n",
+ "B = [(-1300),(-3)];\n",
+ "X = linalg.solve(A,B)\n",
+ "\n",
+ "Q2 = X[0];\n",
+ "print (\"Q2 = \"), (Q2), (\"kJ/min\")\n",
+ "\n",
+ "Q3 = X[1];\n",
+ "print (\"Q3 = \"), (Q3), (\"kJ/min\")\n",
+ "\n",
+ "print (\"(ii) Entropy change \")\n",
+ "dS1 = (-Q1)/T1;\n",
+ "print (\"Entropy change of source 1 = \"), (dS1), (\"kJ/K\")\n",
+ "\n",
+ "dS2 = (-Q2)/T2;\n",
+ "print (\"Entropy change of math.sink 2 = \"), (dS2), (\"kJ/K\")\n",
+ "\n",
+ "dS3 = Q3/T3;\n",
+ "print (\"Entropy change of source 3 = \"),(dS3), (\"kJ/K\")\n",
+ "\n",
+ "\n",
+ "print (\"(iii) Net change of the entropy\")\n",
+ "dSnet = dS1 + dS2 + dS3;\n",
+ "print (\"dSnet = %d\")% (dSnet)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q2 = -1600.0 kJ/min\n",
+ "Q3 = -300.0 kJ/min\n",
+ "(ii) Entropy change \n",
+ "Entropy change of source 1 = -3.0 kJ/K\n",
+ "Entropy change of math.sink 2 = 4.0 kJ/K\n",
+ "Entropy change of source 3 = -1.0 kJ/K\n",
+ "(iii) Net change of the entropy\n",
+ "dSnet = 0\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.45 Page no : 291"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "T1 = 250; \t\t\t#K\n",
+ "T2 = 125; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "#cv = 0.0045*T**2\n",
+ "def f10( T): \n",
+ "\t return 0.045*T**2\n",
+ "\n",
+ "Q1 = quad(f10, T1, T2)[0]\n",
+ "\n",
+ "def f11( T): \n",
+ "\t return 0.045*T\n",
+ "\n",
+ "dS_system = quad(f11, T1, T2)[0]\n",
+ "\n",
+ "dS_universe = 0;\n",
+ "\n",
+ "W_max = ((-Q1) -T2*(dS_universe-dS_system))/1000;\n",
+ "\n",
+ "# Results\n",
+ "print (\"W_max = %.3f\")%(W_max), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "W_max = 73.242 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.46 Page no : 292"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "cp = 1.005; \t\t\t#kJ/kg K\n",
+ "T_A = 333.; \t\t\t#K\n",
+ "T_B = 288.; \t\t\t#K\n",
+ "p_A = 140.; \t\t\t#kPa\n",
+ "p_B = 110.; \t\t\t#kPa\n",
+ "#h = cp*T\n",
+ "#v/T = 0.287/p\n",
+ "\n",
+ "# Calculations\n",
+ "def f9( T): \n",
+ "\t return cp/T\n",
+ "\n",
+ "def f10(p):\n",
+ " return 0.287/p\n",
+ " \n",
+ "ds_system = quad(f9, T_B, T_A)[0] + quad(f10,p_A,p_B)[0]\n",
+ "ds_surr = 0;\n",
+ "ds_universe = ds_system+ds_surr;\n",
+ "\n",
+ "# Results\n",
+ "print (\"change in entropy of universe = -%.4f\")% (ds_universe), (\"kJ/kgK\")\n",
+ "print (\"Since change in entropy of universe from A to B is -ve\")\n",
+ "print (\"The flow is from B to A\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in entropy of universe = -0.0767 kJ/kgK\n",
+ "Since change in entropy of universe from A to B is -ve\n",
+ "The flow is from B to A\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.47 Page no : 292"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m1 = 3.; \t\t\t#kg\n",
+ "m2 = 4.; \t\t\t#kg\n",
+ "T0 = 273.; \t\t\t#K\n",
+ "T1 = 80.+273; \t\t\t#K\n",
+ "T2 = 15.+273; \t\t\t#K\n",
+ "c_pw = 4.187; \t\t\t#kJ/kgK\n",
+ "\n",
+ "# Calculations\n",
+ "tm = (m1*T1 + m2*T2)/(m1+m2);\n",
+ "Si = m1*c_pw*math.log(T1/T0) + m2*c_pw*math.log(T2/T0);\n",
+ "Sf = (m1+m2)*c_pw*math.log(tm/T0);\n",
+ "dS = Sf-Si;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Net change in entropy = %.3f\")%(dS),(\"kJ/K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net change in entropy = 0.150 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.49 Page no : 294"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m = 1.; \t\t\t#kg\n",
+ "T1 = 273.; \t\t\t#K\n",
+ "T2 = 363.; \t\t\t#K\n",
+ "c = 4.187;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(a)\")\n",
+ "ds_water = m*c*math.log(T2/T1);\n",
+ "print (\"(i) Entropy of water = %.3f\")%(ds_water), (\"kJ/kgK\")\n",
+ "\n",
+ "print (\"(ii) Entropy change of the reservoir \")\n",
+ "Q = m*c*(T2-T1);\n",
+ "ds_reservoir = -Q/T2;\n",
+ "print (\"ds_reservoir = %.3f\")% (ds_reservoir), (\"kJ/K\")\n",
+ "\n",
+ "ds_universe = ds_water+ds_reservoir;\n",
+ "print (\"(iii) Entropy change of universe = %.3f\")% (ds_universe), (\"kJ/K\")\n",
+ "\n",
+ "print (\"(b)\")\n",
+ "T3 = 313; \t\t\t#K\n",
+ "ds_water = m*c*(math.log(T3/T1) + math.log(T2/T3));\n",
+ "ds_res1 = -m*c*(T3-T1)/T3;\n",
+ "ds_res2 = -m*c*(T2-T3)/T2;\n",
+ "\n",
+ "ds_universe = ds_water+ds_res1+ds_res2;\n",
+ "print (\"(iii) Entropy change of universe = %.3f\")%(ds_universe), (\"kJ/K\")\n",
+ "\n",
+ "print (\"(c) The entropy change of universe would be less and less, if the water is heated in more and more stages, by bringing\")\n",
+ "print (\"the water in contact successively with more and more heat reservoirs, each succeeding reservoir being at a higher temperature\") \n",
+ "print (\"than the preceding one.\")\n",
+ "\n",
+ "print (\"When water is heated in infinite steps, by bringing in contact with an infinite number of reservoirs in succession, so that\") \n",
+ "print (\"at any insmath.tant the temperature difference between the water and the reservoir in contact is infinitesimally small, then\") \n",
+ "print (\"the entropy change of the universe would be zero and the water would be reversibly heated.\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)\n",
+ "(i) Entropy of water = 1.193 kJ/kgK\n",
+ "(ii) Entropy change of the reservoir \n",
+ "ds_reservoir = -1.038 kJ/K\n",
+ "(iii) Entropy change of universe = 0.155 kJ/K\n",
+ "(b)\n",
+ "(iii) Entropy change of universe = 0.081 kJ/K\n",
+ "(c) The entropy change of universe would be less and less, if the water is heated in more and more stages, by bringing\n",
+ "the water in contact successively with more and more heat reservoirs, each succeeding reservoir being at a higher temperature\n",
+ "than the preceding one.\n",
+ "When water is heated in infinite steps, by bringing in contact with an infinite number of reservoirs in succession, so that\n",
+ "at any insmath.tant the temperature difference between the water and the reservoir in contact is infinitesimally small, then\n",
+ "the entropy change of the universe would be zero and the water would be reversibly heated.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 5.50 Page no : 295"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "cp = 2.093; \t\t\t#kJ/kg0C\n",
+ "c = 4.187;\n",
+ "Lf = 333.33; \t\t\t#kJ/kg\n",
+ "m = 1.; \t\t\t#kg\n",
+ "T0 = 273.; \t\t\t#K\n",
+ "T1 = 268.; \t\t\t#K\n",
+ "T2 = 298.; \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "Q_s = m*cp*(T0-T1);\n",
+ "Q_f = m*Lf;\n",
+ "Q_l = m*c*(T2-T0);\n",
+ "Q = Q_s+Q_f+Q_l;\n",
+ "\n",
+ "print (\"(i) Entropy increase of the universe\")\n",
+ "ds_atm = -Q/T2;\n",
+ "ds_sys1 = m*cp*math.log(T0/T1);\n",
+ "ds_sys2 = Lf/T0;\n",
+ "ds_sys3 = m*c*math.log(T2/T0);\n",
+ "ds_total = ds_sys1+ds_sys2+ds_sys3;\n",
+ "ds_universe = ds_total+ds_atm;\n",
+ "\n",
+ "print (\"Entropy increase of universe = %.3f\")%(ds_universe), (\"kJ/K\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Minimum amount of work necessary to convert the water back into ice at \u2013 5\u00b0C, Wmin.\")\n",
+ "dS_refrigerator = 0;\n",
+ "\n",
+ "dS_system = -1.6263; \t\t\t#kJ/kg K\n",
+ "T = 298; \t\t\t#K\n",
+ "#For minimum work \n",
+ "W_min = T*(-dS_system)-Q;\n",
+ "\n",
+ "print (\"Minimum work done = %.3f\")% (W_min), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Entropy increase of the universe\n",
+ "Entropy increase of universe = 0.122 kJ/K\n",
+ "(ii) Minimum amount of work necessary to convert the water back into ice at \u2013 5\u00b0C, Wmin.\n",
+ "Minimum work done = 36.167 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch6.ipynb b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch6.ipynb
new file mode 100755
index 00000000..4a7535ce
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch6.ipynb
@@ -0,0 +1,1173 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6 : Availability and Irreversibility"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.1 Page no : 313"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "T0 = 293.; \t\t\t#K\n",
+ "T1 = 300.; \t\t\t#K\n",
+ "T2 = 370.; \t\t\t#K\n",
+ "cv = 0.716;\n",
+ "cp = 1.005;\n",
+ "R = 0.287;\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "p2 = 6.8; \t\t\t#bar\n",
+ "m = 1.; \t\t\t#kg\n",
+ "\n",
+ "# Calculations\n",
+ "Wmax = -(cv*(T2-T1) - T0*(cp*math.log(T2/T1)-R*math.log(p2/p1)));\n",
+ "n = 1/(1-(math.log(T2/T1)/math.log(p2/p1)));\n",
+ "Wact = m*R*(T1-T2)/(n-1);\n",
+ "I = Wmax - Wact;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Irreversibility = %.3f\")%(I),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Irreversibility = 13.979 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.2 Page no : 313"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 1000.; \t\t\t#K\n",
+ "T2 = 500.; \t\t\t#K\n",
+ "T0 = 300.; \t\t\t#K\n",
+ "Q = 7200.; \t\t\t#kJ/min\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Net change of entropy :\")\n",
+ "dS_source = -Q/T1;\n",
+ "dS_system = Q/T2;\n",
+ "dS_net = dS_source+dS_system;\n",
+ "print (\"dS_net = \"), (dS_net), (\"kJ/min.K\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Decrease in available energy :\")\n",
+ "AE_source = (T1-T0)*(-dS_source); \t\t\t#Available energy with the source\n",
+ "AE_system = (T2-T0)*dS_system; \t\t\t#Available energy with the system\n",
+ "dAE = AE_source - AE_system; \t\t\t#Decrease in available energy\n",
+ "print (\"dAE = \"), (dAE), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Net change of entropy :\n",
+ "dS_net = 7.2 kJ/min.K\n",
+ "(ii) Decrease in available energy :\n",
+ "dAE = 2160.0 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.3 Page no : 315"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m = 8.; \t\t\t#kg\n",
+ "T1 = 650.; \t\t\t#K\n",
+ "p1 = 5.5*10**5; \t\t\t#Pa\n",
+ "p0 = 1*10.**5; \t\t\t#Pa\n",
+ "T0 = 300.; \t\t\t#K\n",
+ "cp = 1.005; \t\t\t#kJ/kg.K\n",
+ "cv = 0.718;\n",
+ "R = 0.287;\n",
+ "#p1*v1/T1 = p0*v0/T0\n",
+ "#Let r = v1/v0 = 1/2.54\n",
+ "r = 1/2.54;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Change in available energy(for bringing the system to dead state) = \")\n",
+ "ds = cv*math.log(T1/T0) + R*math.log(r);\n",
+ "dAE = m*(cv*(T1-T0) - T0*ds);\n",
+ "#dAE is the change in available energy in kJ\n",
+ "V1 = m*R*10**3*T1/p1;\n",
+ "V0 = V1/r;\n",
+ "L = p0*(V0 - V1)/10**3;\n",
+ "print (\"Loss of availability, L = \"), (L), (\"kJ\")\n",
+ "\n",
+ "print (\"(ii) Available Energy and Effectiveness\")\n",
+ "Q = m*cp*(T1-T0);\n",
+ "ds = m*cp*math.log(T1/T0);\n",
+ "Unavailable_energy = T0*ds;\n",
+ "Available_energy = Q - Unavailable_energy;\n",
+ "print (\"Available energy = %.3f\")% (Available_energy), (\"kJ\")\n",
+ "\n",
+ "Effectiveness = Available_energy/dAE;\n",
+ "print (\"Effectiveness = %.3f\")% (Effectiveness)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Change in available energy(for bringing the system to dead state) = \n",
+ "Loss of availability, L = 417.872 kJ\n",
+ "(ii) Available Energy and Effectiveness\n",
+ "Available energy = 949.066 kJ\n",
+ "Effectiveness = 0.719\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.4 Page no : 316"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "c_pg = 1.; \t\t\t#kJ/kgK\n",
+ "h_fg = 1940.7; \t\t\t#kJ/kg\n",
+ "Ts = 473.; \t \t\t#K ; Temperature of saturation of steam\n",
+ "T1 = 1273.; \t\t\t#K ; Initial temperature of gases\n",
+ "T2 = 773.; \t\t \t#K ; Final temperature of gases\n",
+ "T0 = 293.; \t\t\t #K ; atmospheric temperature\n",
+ "\n",
+ "# Calculations\n",
+ "#Heat lost by gases = Heat gained by 1 kg saturated water when it is converted to steam at 200 0C\n",
+ "m_g = h_fg/c_pg/(T1-T2);\n",
+ "dS_g = m_g*c_pg*math.log(T2/T1);\n",
+ "dS_w = h_fg/Ts;\n",
+ "dS_net = dS_g + dS_w;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Net change in entropy = %.3f\")% (dS_net), (\"kJ/K\")\n",
+ "\n",
+ "E = T0*dS_net; \t\t\t#Increase in unavailable energy due to hea transfer\n",
+ "print (\"Increase in unavailable energy = %.3f\")%(E), (\"kJ per kg of steam formed\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net change in entropy = 2.167 kJ/K\n",
+ "Increase in unavailable energy = 634.847 kJ per kg of steam formed\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.5 Page no : 317"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "m_g = 3.; \t\t\t#kg\n",
+ "p1 = 2.5; \t\t\t#bar\n",
+ "T1 = 1200.; \t\t\t#K; Temperature of infinite source\n",
+ "T1a = 400.; \t\t\t#K; Initial temperature\n",
+ "Q = 600.; \t\t\t#kJ\n",
+ "cv = 0.81; \t\t\t#kJ/kg.K\n",
+ "T0 = 290.; \t\t\t#K; Surrounding Temperature\n",
+ "\n",
+ "# Calculations\n",
+ "#final temperature = T2a\n",
+ "T2a = Q/m_g/cv + T1a;\n",
+ "AE = (T1-T0)*Q/T1; \t\t\t#Available energy with the source\n",
+ "dS = m_g*cv*math.log(T2a/T1a); \t\t\t#Change in entropy of the gas\n",
+ "UAE = T0*dS; \t\t\t#Unavailability of the gas \n",
+ "A = Q-UAE; \t\t\t#Available energy with the gas\n",
+ "loss = AE-A;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Loss in available energy due to heat transfer = %.3f\")%(loss),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loss in available energy due to heat transfer = 193.783 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.6 Page no : 318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "m = 60.; \t\t\t#kg\n",
+ "T1 = 333.; \t\t\t#K\n",
+ "T0 = 279.; \t\t\t#K\n",
+ "p = 1.; \t\t\t#atm\n",
+ "cp = 4.187;\n",
+ "\n",
+ "# Calculations\n",
+ "def f16( T): \n",
+ "\t return m*cp*(1-T0/T)\n",
+ "\n",
+ "Wmax = quad(f16, T0, T1)[0]\n",
+ "Q1 = m*cp*(T1-T0);\n",
+ "#Let unavailable energy = E\n",
+ "E = Q1-Wmax;\n",
+ "\n",
+ "# Results\n",
+ "print (\"unavailable energy = %.3f\")%(E), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "unavailable energy = 12401.141 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.7 Page no : 319"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m = 15.; \t\t\t#kg\n",
+ "T1 = 340.; \t\t\t#K\n",
+ "T0 = 300.; \t\t\t#K\n",
+ "cp = 4.187; \t\t\t#kJ/kgK\n",
+ "\n",
+ "# Calculations\n",
+ "#Work added during churning = Increase in enthalpy of water\n",
+ "W = m*cp*(T1-T0);\n",
+ "ds = cp*math.log(T1/T0);\n",
+ "AE = m*(cp*(T1-T0)-T0*ds);\n",
+ "AE_loss = W-AE; \t\t\t#Loss in availability\n",
+ "\n",
+ "# Results\n",
+ "print (\"Loss in availability %.3f\")% (AE_loss), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loss in availability 2358.261 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.8 Page no : 320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m = 5.; \t\t\t#kg\n",
+ "T1 = 550.; \t\t\t#K\n",
+ "p1 = 4*10.**5; \t\t\t#Pa\n",
+ "T2 = 290.; \t\t\t#K\n",
+ "T0 = T2;\n",
+ "p2 = 1.*10**5; \t\t\t#Pa\n",
+ "p0 = p2;\n",
+ "cp = 1.005; \t\t\t#kJ/kg K\n",
+ "cv = 0.718; \t\t\t#kJ/kg K\n",
+ "R = 0.287; \t\t\t#kJ/kg K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Availability of the system :\")\n",
+ "ds = cp*math.log(T1/T0) - R*math.log(p1/p0);\n",
+ "Availability = m*(cv*(T1-T0) - T0*ds);\n",
+ "print (\"Availability of the system = %.3f\")% (Availability), (\"kJ\")\n",
+ "\n",
+ "print (\"(ii) Available energy and Effectiveness\")\n",
+ "Q = m*cp*(T1-T0);\n",
+ "dS = m*cp*math.log(T1/T0);\n",
+ "E = T0*dS; \t\t\t#Unavailable energy\n",
+ "AE = Q-E;\n",
+ "print (\"Available Energy = %.3f\")%(AE), (\"kJ\")\n",
+ "\n",
+ "Effectiveness = AE/Availability;\n",
+ "print (\"Effectiveness = %.3f\")%(Effectiveness)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Availability of the system :\n",
+ "Availability of the system = 577.612 kJ\n",
+ "(ii) Available energy and Effectiveness\n",
+ "Available Energy = 373.806 kJ\n",
+ "Effectiveness = 0.647\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.9 Page no : 321"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "R = 0.287; \t\t\t#kJ/kgK\n",
+ "cp = 1.005; \t\t\t#kJ/kgK\n",
+ "m = 25./60; \t\t\t#kg/s\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "p2 = 2.; \t\t\t#bar\n",
+ "T1 = 288.; \t\t\t#K\n",
+ "T0 = T1;\n",
+ "T2 = 373.; \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "W_act = cp*(T2-T1); \t\t\t#W_actual\n",
+ "W_total = m*W_act;\n",
+ "\n",
+ "print (\"Total actual power required = %.3f\")%(W_total), (\"kW\")\n",
+ "\n",
+ "ds = cp*math.log(T2/T1) - R*math.log(p2/p1);\n",
+ "Wmin = cp*(T2-T1) - T0*(ds);\n",
+ "\n",
+ "\n",
+ "W = m*Wmin;\n",
+ "print (\"Minimuumm work required = %.3f\")%(W), (\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total actual power required = 35.594 kW\n",
+ "Minimuumm work required = 28.276 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.10 Page no : 322"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m_O2 = 1.; \t\t\t#kg\n",
+ "m_H2 = 1.; \t\t\t#kg\n",
+ "p = 1*10.**5; \t\t\t#Pa\n",
+ "T_O2 = 450.; \t\t\t#K\n",
+ "T_H2 = 450.; \t\t\t#K\n",
+ "T0 = 290.; \t\t\t#K\n",
+ "R0 = 8.314;\n",
+ "M_O2 = 32.;\n",
+ "M_H2 = 2.;\n",
+ "\n",
+ "# Calculations\n",
+ "R_O2 = R0/M_O2;\n",
+ "v_O2 = m_O2*R_O2*T_O2/p;\n",
+ "R_H2 = R0/M_H2;\n",
+ "v_H2 = m_H2*R_H2*T_H2/p;\n",
+ "v_f = v_O2 + v_H2; \t\t\t#total volume after mixing\n",
+ "dS_O2 = R_O2*math.log(v_f/v_O2);\n",
+ "dS_H2 = R_H2*math.log(v_f/v_H2);\n",
+ "dS_net = dS_O2 + dS_H2;\n",
+ "#Let E be the loss in availability \n",
+ "E = T0*dS_net;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Loss in availability = %.3f\")% (E), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loss in availability = 286.555 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.11 Page no : 323"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "T0 = 283.; \t\t\t#K\n",
+ "cp = 4.18; \t\t\t#kJ/kgK\n",
+ "m1 = 20.; \t\t\t#kg\n",
+ "T1 = 363.; \t\t\t#K\n",
+ "m2 = 30.; \t\t\t#kg\n",
+ "T2 = 303.; \t\t\t#K\n",
+ "T3 = 327.; \t\t\t#K\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "def f13( T): \n",
+ "\t return m1*cp*(1-T0/T)\n",
+ "\n",
+ "AE1 = quad(f13, T0, T1)[0]\n",
+ "\n",
+ "def f14( T): \n",
+ "\t return m2*cp*(1-T0/T)\n",
+ "\n",
+ "AE2 = quad(f14, T0, T2)[0]\n",
+ "AE_total = AE1 + AE2; \t\t\t#before mixing\n",
+ "#If T K is the final temperature after mixing\n",
+ "T = (m1*T1+m2*T2)/(m1+m2);\n",
+ "m_total = m1+m2;\n",
+ "\n",
+ "#Available energy of 50kg of water at 54 0C\n",
+ "AE3 = m_total*cp*((T3-T0) - T0*math.log(T3/T0));\n",
+ "\n",
+ "#Decrease in available energy due to mixing dAE\n",
+ "dAE = AE_total - AE3;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Decrease in avialble energy = %.3f\")% (dAE), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Decrease in avialble energy = 234.184 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.12 Page no : 324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "T_w1 = 323.; \t\t\t#K\n",
+ "T_w2 = 343.; \t\t\t#K\n",
+ "T_o1 = 513.; \t\t\t#K\n",
+ "T_o2 = 363.; \t\t\t#K\n",
+ "SG_oil = 0.82;\n",
+ "c_po = 2.6; \t\t\t#kJ/kg K\n",
+ "c_pw = 4.18; \t\t\t#kJ/kg K\n",
+ "T0 = 300.; \t\t\t#K\n",
+ "m_o = 1.; \t\t\t#kg\n",
+ "\n",
+ "# Calculations\n",
+ "#Heat lost by oil = Heat gained by water\n",
+ "m_w = (m_o*c_po*(T_o1-T_o2))/(c_pw*(T_w2-T_w1));\n",
+ "dS_w = m_w*c_pw*math.log(T_w2/T_w1);\n",
+ "dS_o = m_o*c_po*math.log(T_o2/T_o1);\n",
+ "dAE_w = m_w*(c_pw*(T_w2-T_w1))-T0*dS_w;\n",
+ "dAE_o = m_o*(c_po*(T_o2-T_o1))-T0*dS_o;\n",
+ "\n",
+ "# Loss in availability E = \n",
+ "E = dAE_w+dAE_o;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Loss in availability = %.3f\")%(E),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loss in availability = -81.676 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.13 Page no : 325"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m_i = 1.; \t\t\t#kg\n",
+ "T_i = 273.; \t\t\t#K\n",
+ "m_w = 12.; \t\t\t#kg\n",
+ "T_w = 300.; \t\t\t#K\n",
+ "T0 = 288.; \t\t\t#K\n",
+ "c_pw = 4.18; \t\t\t#kJ/kg K\n",
+ "c_pi = 2.1; \t\t\t#kJ/kg K\n",
+ "L_i = 333.5; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations\n",
+ "Tc = (m_w*c_pw*T_w + m_i*c_pw*T_i - L_i)/(m_w*c_pw + m_i*c_pw);\n",
+ "dS_w = m_w*c_pw*math.log(Tc/T_w);\n",
+ "dS_i = m_i*c_pw*math.log(Tc/T_i) + L_i/T_i;\n",
+ "dS_net = dS_w+dS_i;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Increase in entropy = %.3f\")% (dS_net), (\"kJ/K\")\n",
+ "\n",
+ "dAE = T0*dS_net;\n",
+ "print (\"Increase in unavailable energy = %.3f\")% (dAE),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Increase in entropy = 0.107 kJ/K\n",
+ "Increase in unavailable energy = 30.878 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.14 Page no : 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "T1 = 673.; \t\t\t#K\n",
+ "T2 = 473.; \t\t\t#K\n",
+ "T0 = 303.; \t\t\t#K\n",
+ "T1a = T2;\n",
+ "\n",
+ "# Calculations\n",
+ "UAE = T0*(T1-T1a)/T1a/(T1-T0);\n",
+ "\n",
+ "# Results\n",
+ "print (\"the fraction of energy that becomes unavailable = %.3f\")%(UAE)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the fraction of energy that becomes unavailable = 0.346\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.15 Page no : 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "T1 = 293.; \t\t\t#K\n",
+ "T2 = 353.; \t\t\t#K\n",
+ "Tf = 1773.; \t\t\t#K\n",
+ "T0 = 288.; \t\t\t#K\n",
+ "c_pl = 6.3; \t\t\t#kJ/kg K\n",
+ "\n",
+ "# Calculations\n",
+ "dAE = c_pl*(T2-T1) - T0*c_pl*math.log(T2/T1);\n",
+ "n = (1-T0/Tf); \t\t\t#efficiency\n",
+ "E = c_pl*(T2-T1)*n;\n",
+ "Effectiveness = dAE/E;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Effectiveness of the heating process = %.3f\")%(Effectiveness)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Effectiveness of the heating process = 0.126\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.16 Page no : 328"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "T0 = 293.; \t\t\t#K\n",
+ "T1 = 293.; \t\t\t#K\n",
+ "T2 = 373.; \t\t\t#K\n",
+ "T3 = 323.; \t\t\t#K\n",
+ "cp = 1.005;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) The ratio of mass flow\")\n",
+ "x = (T3-T1)/(T2-T3);\n",
+ "print (\"x = \"), (x)\n",
+ "\n",
+ "ds_13 = cp*math.log(T3/T1);\n",
+ "ds_32 = cp*math.log(T2/T3);\n",
+ "A = cp*(T3-T1) - T1*ds_13; \t \t\t#Increase of availability of system\n",
+ "B = x*(cp*(T2-T3)-T0*(ds_32));\t\t\t# Loss of availability of surroundings\n",
+ "Effectiveness = A/B;\n",
+ "print (\"Effectiveness of heating process = %.3f\")%(Effectiveness)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The ratio of mass flow\n",
+ "x = 0.6\n",
+ "Effectiveness of heating process = 0.306\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.17 Page no : 329"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m = 2.5; \t\t\t#kg\n",
+ "p1 = 6.*10**5; \t\t\t#Pa\n",
+ "r = 2.; \t\t\t#r = V2/V1\n",
+ "cv = 0.718; \t\t\t#kJ/kg K\n",
+ "R = 0.287; \t\t\t#kJ/kg K\n",
+ "T1 = 363.; \t\t\t#K\n",
+ "p2 = 1.*10**5; \t\t\t#Pa\n",
+ "T2 = 278.; \t\t\t#K\n",
+ "V1 = m*R*T1/p1;\n",
+ "V2 = 2*V1;\n",
+ "T0 = 278.; \t\t\t#K\n",
+ "p0 = 1.*10**5; \t\t\t#Pa\n",
+ "Q = 0.; \t\t\t#adiabatic process\n",
+ "\n",
+ "# Calculations and Results\n",
+ "dS = m*cv*math.log(T2/T1) + m*R*math.log(V2/V1);\n",
+ "Wmax = m*(cv*(T1-T2)) + T0*(cv*math.log(T2/T1) + R*math.log(V2/V1));\n",
+ "print (\"(i)The maximum work\"),(\"Wmax = %.3f\")% (Wmax), (\"kJ\")\n",
+ "\n",
+ "dA = Wmax+p0*(V1-V2);\n",
+ "print (\"(ii)Change in availability = %.3f\")%(dA), (\"kJ\")\n",
+ "\n",
+ "I = T0*m*(cv*math.log(T2/T1)+R*math.log(V2/V1));\n",
+ "print (\"(iii)Irreversibility = %.3f\")% (I),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)The maximum work Wmax = 154.628 kJ\n",
+ "(ii)Change in availability = 111.219 kJ\n",
+ "(iii)Irreversibility = 5.132 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.18 Page no : 330"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m = 1.; \t\t\t#kg\n",
+ "p1 = 7.*10**5; \t\t\t#Pa\n",
+ "T1 = 873.; \t\t\t#K\n",
+ "p2 = 1.*10**5; \t\t\t#Pa\n",
+ "T2 = 523.; \t\t\t#K\n",
+ "T0 = 288.; \t\t\t#K\n",
+ "Q = -9.; \t\t\t#kJ/kg\n",
+ "cp = 1.005; \t\t\t#kJ/kg K\n",
+ "R = 0.287; \t\t\t#kJ/kg K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) The decrease in availability \")\n",
+ "dA = cp*(T1-T2) - T0*(R*math.log(p2/p1) - cp*math.log(T2/T1));\n",
+ "print (\"dA = %.3f\")%(dA), (\"kJ/kg\")\n",
+ "\n",
+ "print (\"(ii) The maximum work\")\n",
+ "Wmax = dA; \t\t\t#change in availability\n",
+ "print (\"Wmax %.3f\")% (Wmax), (\"kJ/kg\")\n",
+ "\n",
+ "\n",
+ "W = cp*(T1-T2) + Q;\n",
+ "I = Wmax - W;\n",
+ "print (\"(iii)Irreversibility = %.3f\")%(I), (\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The decrease in availability \n",
+ "dA = 364.295 kJ/kg\n",
+ "(ii) The maximum work\n",
+ "Wmax 364.295 kJ/kg\n",
+ "(iii)Irreversibility = 21.545 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.19 Page no : 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "cp = 1.005; \t\t\t#kJ/kg K\n",
+ "cv = 0.718; \t\t\t#kJ/kg K\n",
+ "R = 0.287; \t\t\t#kJ/kg K\n",
+ "m = 1.; \t\t\t#kg\n",
+ "T1 = 290.; \t\t\t#K\n",
+ "T0 = 290.; \t\t\t#K\n",
+ "T2 = 400.; \t\t\t#K\n",
+ "p1 = 1.; \t\t\t#bar\n",
+ "p0 = 1.; \t\t\t#bar\n",
+ "p2 = 6.; \t\t\t#bar\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#Wrev = change in internal energy - T0*change in entropy\n",
+ "Wrev = -(cv*(T2-T1) - T0*(cp*math.log(T2/T1) - R*math.log(p2/p1)));\n",
+ "n = (1./(1-math.log(T2/T1)/math.log(p2/p1)));\n",
+ "Wact = m*R*(T1-T2)/(n-1);\n",
+ "\n",
+ "I = Wrev-Wact;\n",
+ "print (\"(i)Irreversibility = %.3f\")% (I), (\"kJ\")\n",
+ "\n",
+ "effectiveness = Wrev/Wact*100;\n",
+ "print (\"(ii)The effectiveness = %.3f\")%(effectiveness), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Irreversibility = 9.945 kJ\n",
+ "(ii)The effectiveness = 93.109 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.20 Page no : 333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "I = 0.62; \t\t\t#kg/m**2\n",
+ "N1 = 2500.; \t\t\t#rpm\n",
+ "w1 = 2*math.pi*N1/60; \t\t\t#rad/s\n",
+ "m = 1.9; \t\t\t#kg; Water equivalent of shaft bearings\n",
+ "cp = 4.18;\n",
+ "T0 = 293.; \t\t\t#K\n",
+ "t0 = 20.; \t\t\t#0C\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i)Rise in temperature of bearings\")\n",
+ "KE = 1./2*I*w1**2/1000; \t\t\t#kJ\n",
+ "dT = KE/(m*cp); \t\t\t#rise in temperature of bearings\n",
+ "print (\"dT = %.3f\")% (dT), (\"0C\")\n",
+ "\n",
+ "t2 = t0+dT;\n",
+ "print (\"Final temperature of the bearings = %.3f\")% (t2), (\"0C\")\n",
+ "\n",
+ "T2 = t2+273;\n",
+ "print (\"(ii)Final r.p.m. of the flywheel\")\n",
+ "def f15( T): \n",
+ "\t return m*cp*(1-T0/T)\n",
+ "\n",
+ "AE = quad(f15, T0, T2)[0]\n",
+ "UE = KE - AE;\n",
+ "\n",
+ "print (\"Available energy = %.3f\")% (AE), (\"kJ\")\n",
+ "\n",
+ "UAE = KE-AE;\n",
+ "print (\"Unavailable energy = %.3f\")%(UAE), (\"kJ\")\n",
+ "\n",
+ "w2 = math.sqrt(AE*10**3*2/I);\n",
+ "N2 = w2*60/2/math.pi;\n",
+ "print (\"Final rpm of the flywheel = %.3f\")%(N2), (\"rpm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Rise in temperature of bearings\n",
+ "dT = 2.675 0C\n",
+ "Final temperature of the bearings = 22.675 0C\n",
+ "(ii)Final r.p.m. of the flywheel\n",
+ "Available energy = 0.096 kJ\n",
+ "Unavailable energy = 21.151 kJ\n",
+ "Final rpm of the flywheel = 168.407 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 6.21 Page no : 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "p1 = 8.; \t\t\t#bar\n",
+ "T1 = 453.; \t\t\t#K\n",
+ "p2 = 1.4; \t\t\t#bar\n",
+ "T2 = 293.; \t\t\t#K\n",
+ "T0 = T2;\n",
+ "p0 = 1.; \t\t\t#bar\n",
+ "m = 1.; \t\t\t#kg\n",
+ "C1 = 80.; \t\t\t#m/s\n",
+ "C2 = 40.; \t\t\t#m/s\n",
+ "cp = 1.005; \t\t\t#kJ/kg K\n",
+ "R = 0.287; \t\t\t#kJ/kg K \n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Reversible work and actual work \")\n",
+ "A1 = cp*(T1-T0)-T0*(cp*math.log(T1/T0)-R*math.log(p1/p0))+C1**2/2/10**3; \t\t\t#Availability at the inlet\n",
+ "A2 = cp*(T2-T0)-T0*(cp*math.log(T2/T0)-R*math.log(p2/p0))+C2**2/2/10**3; \t\t\t#Availability at the exit\n",
+ "\n",
+ "W_rev = A1-A2;\n",
+ "print (\"W_rev = %.3f\")%(W_rev), (\"kJ/kg\")\n",
+ "\n",
+ "W_act = cp*(T1-T2) + (C1**2-C2**2)/2/10**3;\n",
+ "print (\"W_act = %.3f\")%(W_act),(\"kJ/kg\")\n",
+ "\n",
+ "print (\"(ii) Irreversibilty and effectiveness = \")\n",
+ "\n",
+ "I = W_rev-W_act;\n",
+ "print (\"Irreversibilty = %.3f\")% (I), (\"kJ/kg\")\n",
+ "\n",
+ "Effectiveness = W_act/W_rev*100;\n",
+ "print (\"Effectiveness = %.3f\")%(Effectiveness),(\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Reversible work and actual work \n",
+ "W_rev = 181.464 kJ/kg\n",
+ "W_act = 163.200 kJ/kg\n",
+ "(ii) Irreversibilty and effectiveness = \n",
+ "Irreversibilty = 18.264 kJ/kg\n",
+ "Effectiveness = 89.935 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ " Example 6.22 Page no : 335 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 20.; \t\t\t#bar\n",
+ "t1 = 400.; \t\t\t#0C\n",
+ "p2 = 4.; \t\t\t#bar\n",
+ "t2 = 250.; \t\t\t#0C\n",
+ "t0 = 20.; \t\t\t#0C\n",
+ "T0 = t0+273;\n",
+ "h1 = 3247.6; \t\t\t#kJ/kg\n",
+ "s1 = 7.127; \t\t\t#kJ/kg K\n",
+ "#let h2' = h2a and s2' = s2a\n",
+ "h2a = 2964.3; \t\t\t#kJ/kg\n",
+ "s2a = 7.379; \t\t\t#kJ/kg K\n",
+ "s2 = s1;\n",
+ "s1a = s1;\n",
+ "#By interpolation, we get\n",
+ "h2 = 2840.8; \t\t\t#kJ/kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "n_isen = (h1-h2a)/(h1-h2);\n",
+ "print (\"(i)Isentropic efficiency = %.3f\")%(n_isen)\n",
+ "\n",
+ "A = h1-h2a + T0*(s2a-s1a);\n",
+ "print (\"(ii)Loss of availability = %.3f\")%(A), (\"kJ/kg\")\n",
+ "\n",
+ "Effectiveness = (h1-h2a)/A;\n",
+ "print (\"(iii)Effectiveness = %.3f\")% (Effectiveness)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Isentropic efficiency = 0.696\n",
+ "(ii)Loss of availability = 357.136 kJ/kg\n",
+ "(iii)Effectiveness = 0.793\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch7.ipynb b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch7.ipynb
new file mode 100755
index 00000000..401bf5af
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch7.ipynb
@@ -0,0 +1,189 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7 : Thermodynamic Relations"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.17 Page no : 370"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "B = 5.*10**(-5); \t\t\t# /K\n",
+ "K = 8.6*10**(-12); \t\t\t# m**2/N\n",
+ "v = 0.114*10**(-3); \t\t\t#m**3/kg\n",
+ "p2 = 800.*10**5; \t\t\t#Pa\n",
+ "p1 = 20.*10**5; \t\t\t#Pa\n",
+ "T = 288.; \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "W = -v*K/2*(p2**2-p1**2);\n",
+ "print (\"(i) Work done on the copper = %.3f\")%(W),(\"J/kg\")\n",
+ "\n",
+ "ds = -v*B*(p2-p1);\n",
+ "print (\"(ii) Change in entropy = %.3f\")% (ds), (\"J/kg K\")\n",
+ "\n",
+ "Q = T*ds;\n",
+ "print (\"(iii) The heat transfer = %.3f\")%(Q), (\"J/kg\")\n",
+ "\n",
+ "du = Q-W;\n",
+ "print (\"(iv) Change in internal energy = %.3f\")%(du),(\"J/kg\")\n",
+ "\n",
+ "R = B**2*T*v/K;\n",
+ "print (\"(v) cp \u2013 cv = %.3f\")%(R),(\"J/kg K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Work done on the copper = -3.135 J/kg\n",
+ "(ii) Change in entropy = -0.445 J/kg K\n",
+ "(iii) The heat transfer = -128.045 J/kg\n",
+ "(iv) Change in internal energy = -124.909 J/kg\n",
+ "(v) cp \u2013 cv = 9.544 J/kg K\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.18 Page no : 371"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "vg = 0.1274; \t\t\t#m**3/kg\n",
+ "vf = 0.001157; \t\t\t#m**3/kg\n",
+ "# dp/dT = 32; \t\t\t#kPa/K\n",
+ "T3 = 473; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "h_fg = 32*10**3*T3*(vg-vf)/10**3;\n",
+ "\n",
+ "# Results\n",
+ "print (\" enthalpy of vapourisation = %.3f\")%(h_fg),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " enthalpy of vapourisation = 1910.814 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.19 Page no : 372"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "h_fg = 334.; \t\t\t#kJ/kg\n",
+ "v_liq = 1.; \t\t\t#m**3/kg\n",
+ "v_ice = 1.01; \t\t\t#m**3/kg\n",
+ "T1 = 273.; \t\t\t#K\n",
+ "T2 = 263.; \t\t\t#K\n",
+ "p1 = 1.013*10**5; \t\t\t#Pa\n",
+ "\n",
+ "# Calculations\n",
+ "p2 = (p1+h_fg*10**3/(v_ice-v_liq)*math.log(T1/T2))/10**5;\n",
+ "\n",
+ "# Results\n",
+ "print (\"pressure = %.3f\")%(p2),(\"bar\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "pressure = 13.477 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 7.20 Page no : 372"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "h_fg = 294.54; \t\t\t#kJ/kg\n",
+ "p = 0.1; \t\t\t#bar\n",
+ "T = 523; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "vg = h_fg*10**3/T/(2.302*3276.6*p*10**5/T**2 - 0.652*p*10**5/T);\n",
+ "\n",
+ "# Results\n",
+ "print (\"specific volume = %.3f\")%(vg),(\"m**3/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "specific volume = 2.139 m**3/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch8.ipynb b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch8.ipynb
new file mode 100755
index 00000000..ebb2f9ca
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch8.ipynb
@@ -0,0 +1,880 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8 : Ideal and Real Gases"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.1 Page no : 392"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "R = 287.; \t\t\t#J/kg K\n",
+ "V1 = 40.; \t\t\t#m**3\n",
+ "V2 = 40.; \t\t\t#m**3\n",
+ "p1 = 1.*10**5; \t\t\t#Pa\n",
+ "p2 = 0.4*10**5; \t\t\t#Pa\n",
+ "T1 = 298.; \t\t\t#K\n",
+ "T2 = 278.; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "m1 = p1*V1/R/T1;\n",
+ "m2 = p2*V2/R/T2;\n",
+ "#Let mass of air removed be m\n",
+ "m = m1-m2;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Mass of air removed = %.3f\")% (m),(\"kg\")\n",
+ "\n",
+ "V = m*R*T1/p1;\n",
+ "print (\"Volume of gas removed = %.3f\")% (V), (\"m**3\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of air removed = 26.716 kg\n",
+ "Volume of gas removed = 22.849 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.2 Page no : 393"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "V = 0.04; \t\t\t#m**3\n",
+ "p = 120.*10**5; \t\t\t#Pa\n",
+ "T = 293.; \t\t\t#K\n",
+ "R0 = 8314.; \n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) kg of nitrogen the flask can hold\")\n",
+ "M = 28; \t\t\t#molecular weight of Nitrogen\n",
+ "R = R0/M;\n",
+ "\n",
+ "m = p*V/R/T;\n",
+ "print (\"kg of nitrogen = %.3f\")% (m), (\"kg\")\n",
+ "\n",
+ "print (\"(ii) Temperature at which fusible plug should melt\")\n",
+ "p = 150.*10**5; \t\t\t#Pa\n",
+ "T = p*V/R/m; \t\t\t#K\n",
+ "t = T-273; \t\t\t#0C\n",
+ "print (\"Temperature = %.3f\")% (t),(\"\u00b0C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) kg of nitrogen the flask can hold\n",
+ "kg of nitrogen = 5.517 kg\n",
+ "(ii) Temperature at which fusible plug should melt\n",
+ "Temperature = 93.250 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.3 Page no : 393"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "p1 = 1.*10**5; \t\t\t#Pa\n",
+ "T1 = 293.; \t\t\t#K\n",
+ "d = 6.; \t\t\t#m; diameter of the spherical balloon\n",
+ "p2 = 0.94*p1;\n",
+ "T2 = T1;\n",
+ "cv = 10400.; \t\t\t#J/kg K\n",
+ "R = 8314/2.;\n",
+ "r = 3.; \t\t\t#m\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Mass of original gas escaped\")\n",
+ "\n",
+ "mass_escaped = (p1-p2)/p1*100;\n",
+ "print (\"%mass_escaped = \"), (mass_escaped), (\"%\")\n",
+ "\n",
+ "print (\"(ii)Amount of heat to be removed \")\n",
+ "T2 = 0.94*T1;\n",
+ "m = p1*4/3*math.pi*r**3/R/T1;\n",
+ "\n",
+ "Q = m*cv*(T1-T2)/10**6;\n",
+ "print (\"Q = %.3f\")% (Q),(\"MJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Mass of original gas escaped\n",
+ "%mass_escaped = 6.0 %\n",
+ "(ii)Amount of heat to be removed \n",
+ "Q = 1.698 MJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.4 Page no : 394"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import *\n",
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m = 28.; \t\t\t#kg\n",
+ "V1 = 3.; \t\t\t#m**3\n",
+ "T1 = 363.; \t\t\t#K\n",
+ "R0 = 8314.;\n",
+ "M = 28.; \t\t\t#Molecular mass of N2\n",
+ "R = R0/m;\n",
+ "V2 = V1;\n",
+ "T2 = 293.; \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Pressure (p1) and specific volume (v1) of the gas\")\n",
+ "\n",
+ "p1 = m*R*T1/V1/10**5; \t\t\t#bar\n",
+ "print (\"Pressure = %.3f\")% (p1), (\"bar\")\n",
+ "\n",
+ "v1 = V1/m;\n",
+ "print (\"specific volume = %.3f\")% (v1), (\"m**3/kg\")\n",
+ "\n",
+ "\n",
+ "#cp-cv = R/1000;\n",
+ "#cp-1.4cv = 0;\n",
+ "#solving the above two eqns \n",
+ "A = [[1,-1],[1,-1.4]];\n",
+ "B = [R/1000,0];\n",
+ "X = linalg.inv(A)*B;\n",
+ "cp = X[0,0]\n",
+ "print (\"cp = %.3f\")% (cp), (\"kJ/kg K\")\n",
+ "\n",
+ "cv = X[1][0];\n",
+ "print (\"cv = %.3f\")% (cv),(\"kJ/kg K\")\n",
+ "\n",
+ "print (\"(iii) Final pressure of the gas after cooling to 20\u00b0C\")\n",
+ "p2 = p1*T2/T1;\n",
+ "print (\"p2 = %.3f\")% (p2), (\"bar\")\n",
+ "\n",
+ "\n",
+ "du = cv*(T2-T1);\n",
+ "print (\"Increase in specific internal energy = %.3f\")% (du), (\"kJ/kg\")\n",
+ "\n",
+ "dh = cp*(T2-T1);\n",
+ "print (\"Increase in specific Enthalpy = %.3f\")%(dh), (\"kJ/kg\")\n",
+ "\n",
+ "v2 = v1;\n",
+ "ds = cv*math.log(T2/T1) + R*math.log(v2/v1);\n",
+ "print (\"Increase in specific entropy = %.3f\")%(ds),(\"kJ/kg K\")\n",
+ "\n",
+ "W = 0; \t\t\t#constant volume process\n",
+ "Q = m*du+W;\n",
+ "print (\"Heat transfer = %.3f\")%(Q), (\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Pressure (p1) and specific volume (v1) of the gas\n",
+ "Pressure = 10.060 bar\n",
+ "specific volume = 0.107 m**3/kg\n",
+ "cp = 1.039 kJ/kg K\n",
+ "cv = 0.742 kJ/kg K\n",
+ "(iii) Final pressure of the gas after cooling to 20\u00b0C\n",
+ "p2 = 8.120 bar\n",
+ "Increase in specific internal energy = -51.963 kJ/kg\n",
+ "Increase in specific Enthalpy = -72.748 kJ/kg\n",
+ "Increase in specific entropy = -0.159 kJ/kg K\n",
+ "Heat transfer = -1454.950 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.5 Page no : 396"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "print (\"Part (a)\")\n",
+ "# Variables\n",
+ "R = 0.287; \t\t\t#kJ/kg K\n",
+ "y = 1.4;\n",
+ "m1 = 1.; \t\t\t#kg\n",
+ "p1 = 8.*10**5; \t\t\t#Pa\n",
+ "T1 = 373.; \t\t\t#K\n",
+ "p2 = 1.8*10**5; \t\t\t#Pa\n",
+ "cv = 0.717; \t\t\t#kJ/kg K\n",
+ "n = 1.2;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#pv**1.2 = consmath.tant\n",
+ "print (\"(i) The final specific volume, temperature and increase in entropy\")\n",
+ "\n",
+ "v1 = R*10**3*T1/p1;\n",
+ "v2 = v1*(p1/p2)**(1./n);\n",
+ "print (\"v2 = %.3f\")%(v2), (\"m**3/kg\")\n",
+ "\n",
+ "T2 = p2*v2/R/10**3; \t\t\t#K\n",
+ "t2 = T2-273; \t\t\t#0C\n",
+ "print (\"Final temperature = %.3f\")% (t2), (\"0C\")\n",
+ "\n",
+ "ds = cv*math.log(T2/T1) + R*math.log(v2/v1);\n",
+ "print (\"ds = %.3f\")%(ds), (\"kJ/kg K\")\n",
+ "\n",
+ "\n",
+ "W = R*(T1-T2)/(n-1);\n",
+ "print (\"Work done = %.3f\")% (W), (\"kJ/kg\")\n",
+ "\n",
+ "Q = cv*(T2-T1) + W;\n",
+ "print (\"Heat transfer = %.3f\")%(Q),(\"kJ/kg\")\n",
+ "\n",
+ "print (\"Part (b)\")\n",
+ "\n",
+ "print (\"(i) Though the process is assumed now to be irreversible and adiabatic, the end states are given to be the same as in (a). Therefore, all the properties at the end of the process are the same as in (a).\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Adiabatic process\")\n",
+ "Q = 0;\n",
+ "print (\"Heat transfer = %.3f\")%(Q), (\"kJ/kg\")\n",
+ "\n",
+ "W = -cv*(T2-T1);\n",
+ "print (\"Work done = %.3f\")%(W),(\"kJ/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part (a)\n",
+ "(i) The final specific volume, temperature and increase in entropy\n",
+ "v2 = 0.464 m**3/kg\n",
+ "Final temperature = 17.897 0C\n",
+ "ds = 0.179 kJ/kg K\n",
+ "Work done = 117.818 kJ/kg\n",
+ "Heat transfer = 58.950 kJ/kg\n",
+ "Part (b)\n",
+ "(i) Though the process is assumed now to be irreversible and adiabatic, the end states are given to be the same as in (a). Therefore, all the properties at the end of the process are the same as in (a).\n",
+ "(ii) Adiabatic process\n",
+ "Heat transfer = 0.000 kJ/kg\n",
+ "Work done = 58.868 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.6 Page no : 397"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "d = 2.5; \t\t\t#m; diameter\n",
+ "V1 = 4./3*math.pi*(d/2)**3; \t\t\t#volume of each sphere\n",
+ "T1 = 298.; \t\t\t#K\n",
+ "T2 = 298.; \t\t\t#K\n",
+ "m1 = 16.; \t\t\t#kg\n",
+ "m2 = 8.; \t\t\t#kg\n",
+ "V = 2.*V1; \t\t\t#total volume\n",
+ "m = m1+m2;\n",
+ "R = 287.; \t\t\t#kJ/kg K\n",
+ "\n",
+ "# Calculations\n",
+ "p = m*R*T1/V/10**5; \t\t\t#bar\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print (\"pressure in the spheres when the system attains equilibrium = %.3f\")%(p),(\"bar\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "pressure in the spheres when the system attains equilibrium = 1.254 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.7 Page no : 398"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m = 6.5/60; \t\t\t#kg/s\n",
+ "import math \n",
+ "cv = 0.837; \t\t\t#kJ/kg K\n",
+ "p1 = 10*10**5; \t\t\t#Pa\n",
+ "p2 = 1.05*10**5; \t\t\t#Pa\n",
+ "T1 = 453; \t\t\t#K\n",
+ "R0 = 8.314;\n",
+ "M = 44.; \t\t\t#Molecular mass of CO2\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "R = R0/M;\n",
+ "cp = cv+R;\n",
+ "y = cp/cv;\n",
+ "\n",
+ "T2 = T1*(p2/p1)**((y-1)/y);\n",
+ "print T2\n",
+ "t2 = T2-273;\n",
+ "print (\"Final temperature = %.3f\")%(t2),(\"0C\")\n",
+ "\n",
+ "v2 = R*10**3*T2/p2; \t\t\t#m**3/kg\n",
+ "print (\"final specific volume = %.3f\")%(v2), (\"m**3/kg\")\n",
+ "\n",
+ "ds = 0; \t\t\t#Reversible and adiabatic process\n",
+ "print (\"Increase in entropy = \"), (ds)\n",
+ "\n",
+ "Q = 0; \t\t\t#Adiabatic process\n",
+ "print (\"Heat transfer rate from turbine = \"), (Q)\n",
+ "\n",
+ "W = m*cp*(T1-T2);\n",
+ "print (\"Power delivered by the turbine = %.3f\")% (W), (\"kW\")\n",
+ "\n",
+ "\n",
+ "# Note : answers wont match with the book because of the rounding error."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "299.106840283\n",
+ "Final temperature = 26.107 0C\n",
+ "final specific volume = 0.538 m**3/kg\n",
+ "Increase in entropy = 0\n",
+ "Heat transfer rate from turbine = 0\n",
+ "Power delivered by the turbine = 17.104 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.8 Page no : 400"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "p1 = 8.*10**5; \t\t\t#Pa\n",
+ "V1 = 0.035; \t\t\t#m**3\n",
+ "T1 = 553.; \t\t\t#K\n",
+ "p2 = 8.*10**5; \t\t\t#Pa\n",
+ "V2 = 0.1; \t\t\t#m**3\n",
+ "n = 1.4;\n",
+ "R = 287.; \t\t\t#J/kg K\n",
+ "T3 = 553.; \t\t\t#K\n",
+ "cv = 0.71; \t\t\t#kJ/kg K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "m = p1*V1/R/T1;\n",
+ "T2 = p2*V2/m/R;\n",
+ "p3 = p2/((T2/T3)**(n/(n-1)));\n",
+ "V3 = m*R*T3/p3;\n",
+ "\n",
+ "print (\"(i) The heat received in the cycle\")\n",
+ "\n",
+ "#constant pressure process 1-2\n",
+ "W_12 = p1*(V2-V1)/10**3; \t\t\t#kJ\n",
+ "Q_12 = m*cv*(T2-T1) + W_12; \t\t\t#kJ\n",
+ "\n",
+ "#polytropic process 2-3\n",
+ "W_23 = m*R/10**3*(T2-T3)/(n-1);\n",
+ "Q_23 = m*cv*(T3-T2) + W_23;\n",
+ "\n",
+ "Q_received = Q_12 + Q_23;\n",
+ "print (\"Total heat received in the cycle = \"),(Q_received), (\"kJ\")\n",
+ "\n",
+ "print (\"(ii) The heat rejected in the cycle\")\n",
+ "\n",
+ "#Isothermal process 3-1\n",
+ "W_31 = p3*V3*math.log(V1/V3)/10**3; \t\t\t#kJ\n",
+ "Q_31 = m*cv*(T3-T1) + W_31;\n",
+ "print (\"Heat rejected in the cycle = %.3f\")% (-Q_31), (\"kJ\")\n",
+ "\n",
+ "\n",
+ "n = (Q_received - (-Q_31))/Q_received*100;\n",
+ "print (\"Efficiency of the cycle = %.3f\")% (n), (\"%\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The heat received in the cycle\n",
+ "Total heat received in the cycle = 182.0 kJ\n",
+ "(ii) The heat rejected in the cycle\n",
+ "Heat rejected in the cycle = 102.883 kJ\n",
+ "Efficiency of the cycle = 43.471 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.9 Page no : 424"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "v = 44.; \t\t\t#m**3/kg-mol\n",
+ "T = 373.; \t\t\t#K\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Using Van der Waals\u2019 equation\")\n",
+ "a = 362850.; \t\t\t#N*m**4/(kg-mol)**2\n",
+ "b = 0.0423; \t\t\t#M**3/kg-mol\n",
+ "R0 = 8314.; \t\t\t#J/kg K\n",
+ "\n",
+ "p = ((R0*T/(v-b)) - a/v**2);\n",
+ "print (\"Pressure umath.sing Van der Waals equation = %.3f\")%(p), (\"N/m**2\")\n",
+ "\n",
+ "print (\"(ii) Using perfect gas equation\")\n",
+ "\n",
+ "p = R0*T/v;\n",
+ "print (\"Pressure using perfect gas equation = %.3f\")% (p), (\"N/m**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Using Van der Waals\u2019 equation\n",
+ "Pressure umath.sing Van der Waals equation = 70360.445 N/m**2\n",
+ "(ii) Using perfect gas equation\n",
+ "Pressure using perfect gas equation = 70480.045 N/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.10 Page no : 425"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "V = 3.; \t\t\t#m**3\n",
+ "m = 10.; \t\t\t#kg\n",
+ "T = 300.; \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "R0 = 8314.;\n",
+ "M = 44.; \n",
+ "R = R0/M;\n",
+ "p = m*R*T/V;\n",
+ "print (\"Pressure Using perfect gas equation = %.3f\")% (p),(\"N/m**2\")\n",
+ "\n",
+ "a = 362850; \t\t\t#Nm**4/(kg-mol)**2\n",
+ "b = 0.0423; \t\t\t#m**3/(kg-mol)\n",
+ "v = 13.2; \t\t\t #m**3/kg-mol\n",
+ "\n",
+ "p = R0*T/(v-b) - a/v**2;\n",
+ "print (\"Pressure Using Van der Waals\u2019 equation = %.3f\")%(p), (\"N/m**2\")\n",
+ "\n",
+ "\n",
+ "A0 = 507.2836;\n",
+ "a = 0.07132;\n",
+ "B0 = 0.10476;\n",
+ "b = 0.07235;\n",
+ "C = 66*10**4;\n",
+ "A = A0*(1-a/v);\n",
+ "B = B0*(1-b/v);\n",
+ "e = C/v/T**3;\n",
+ "\n",
+ "p = R0*T*(1-e)/v**2*(v+B) - A/v**2;\n",
+ "print (\"Pressure Using Beattie Bridgeman equation = %.3f\")%(p), (\"N/m**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure Using perfect gas equation = 188954.545 N/m**2\n",
+ "Pressure Using Van der Waals\u2019 equation = 187479.533 N/m**2\n",
+ "Pressure Using Beattie Bridgeman equation = 190090.365 N/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.11 Page no : 404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# Variables\n",
+ "a = 139250; \t\t\t#Nm**4/(kg-mol)**2\n",
+ "b = 0.0314; \t\t\t#m**3/kg-mol\n",
+ "R0 = 8314; \t\t\t#Nm/kg-mol K\n",
+ "v1 = 0.2*32; \t\t\t#m**3/kg-mol\n",
+ "v2 = 0.08*32; \t\t\t#m**3/kg-mol\n",
+ "T = 333; \t\t\t#K\n",
+ "print (\"(i) Work done during the process\")\n",
+ "\n",
+ "# Calculations\n",
+ "def f21( v): \n",
+ "\t return R0*T/(v-b) - a/v**2\n",
+ "\n",
+ "W = quad(f21, v1, v2)[0]\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print (\"W = %.3f\")% (W),(\"Nm/kg-mol\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) The final pressure\")\n",
+ "p2 = R0*T/(v2-b) - a/v2**2;\n",
+ "print (\"p2 = %.3f\")%(p2), (\"N/m**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Work done during the process\n",
+ "W = -2524722.415 Nm/kg-mol\n",
+ "(ii) The final pressure\n",
+ "p2 = 1073651.290 N/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.12 Page no : 404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "pr = 20;\n",
+ "Z = 1.25;\n",
+ "Tr = 8.0;\n",
+ "Tc = 282.4; \t\t\t#K\n",
+ "\n",
+ "# Calculations\n",
+ "T = Tc*Tr;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Temperature = %.3f\")%(T),(\"K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature = 2259.200 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.13 Page no : 405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p = 260.*10**5; \t\t\t#Pa\n",
+ "T = 288.; \t\t\t#K\n",
+ "pc = 33.94*10**5; \t\t\t#Pa\n",
+ "Tc = 126.2; \t\t\t#K\n",
+ "R = 8314./28;\n",
+ "\n",
+ "# Calculations\n",
+ "pr = p/pc;\n",
+ "Tr = T/Tc;\n",
+ "Z = 1.08;\n",
+ "rho = p/Z/R/T;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Density of N2 = %.3f\")% (rho), (\"kg/m**3\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Density of N2 = 281.517 kg/m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.14 Page no : 405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "p = 200.*10**5; \t\t\t#Pa\n",
+ "pc = 73.86*10**5; \t\t\t#Pa\n",
+ "Tc = 304.2; \t\t\t#K\n",
+ "pr = p/pc;\n",
+ "Z = 1;\n",
+ "Tr = 2.48;\n",
+ "\n",
+ "# Calculations\n",
+ "T = Tr*Tc;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Temperature = \"), (T), (\"K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature = 754.416 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.15 Page no : 405"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "d = 12.; \t\t\t#m; diameter of spherical balloon\n",
+ "V = 4./3*math.pi*(d/2)**3;\n",
+ "T = 303.; \t\t\t#K\n",
+ "p = 1.21*10**5; \t\t\t#Pa\n",
+ "pc = 12.97*10**5; \t\t\t#Pa\n",
+ "Tc = 33.3; \t\t\t#K\n",
+ "R = 8314./2;\n",
+ "\n",
+ "# Calculations\n",
+ "pr = p/pc;\n",
+ "Tr = T/Tc;\n",
+ "Z = 1;\n",
+ "m = p*V/Z/R/T;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Mass of H2 in the balloon = %.3f\")% (m), (\"kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of H2 in the balloon = 86.917 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.16 Page no : 406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculations\n",
+ "Z_cp = 3./2-9./8;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Z_cp = \"),(Z_cp)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Z_cp = 0.375\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch9.ipynb b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch9.ipynb
new file mode 100755
index 00000000..318bc359
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/ch9.ipynb
@@ -0,0 +1,1533 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9 : Gases and Vapour Mixtures"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.1 Page no : 420"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "V = 0.35; \t\t\t#m**3\n",
+ "import math \n",
+ "m_CO = 0.4; \t\t\t#kg\n",
+ "m_air = 1; \t\t\t#kg\n",
+ "m_O2 = 0.233; \t\t\t#kg\n",
+ "m_N2 = 0.767; \t\t\t#kg\n",
+ "T = 293.; \t\t\t#K\n",
+ "R0 = 8.314; \t\t\t#kJ/kg K\n",
+ "M_O2 = 32.; \t\t\t#Molecular mass of O2\n",
+ "M_N2 = 28.; \t\t\t#Molecular mass of N2\n",
+ "M_CO = 28.; \t\t\t#Molecular mass of CO\n",
+ "\n",
+ "# Calculations and Results\n",
+ "\n",
+ "p_O2 = m_O2*R0*10**3*T/M_O2/V/10**5; \t\t\t#bar\n",
+ "print (\"partial pressure for p_O2 %.3f\")% (p_O2), (\"bar\")\n",
+ "\n",
+ "p_N2 = m_N2*R0*10**3*T/M_N2/V/10**5; \t\t\t#bar\n",
+ "print (\"partial pressure for p_N2 %.3f\")% (p_N2), (\"bar\")\n",
+ "\n",
+ "p_CO = m_CO*R0*10**3*T/M_CO/V/10**5; \t\t\t#bar\n",
+ "print (\"partial pressure for p_CO %.3f\")%(p_CO), (\"bar\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Total pressure in the vessel\")\n",
+ "p = p_O2+p_N2+p_CO;\n",
+ "print (\"p = %.3f\")% (p), (\"bar\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "partial pressure for p_O2 0.507 bar\n",
+ "partial pressure for p_N2 1.907 bar\n",
+ "partial pressure for p_CO 0.994 bar\n",
+ "(ii) Total pressure in the vessel\n",
+ "p = 3.408 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.2 Page no : 421"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "R0 = 8.314;\n",
+ "M_O2 = 32.;\n",
+ "M_N2 = 28.;\n",
+ "M_Ar = 40.;\n",
+ "M_CO2 = 44.;\n",
+ "\n",
+ "# Calculations\n",
+ "R_O2 = R0/M_O2; \t\t\t#kJ/kg K\n",
+ "R_N2 = R0/M_N2; \t\t\t#kJ/kg K\n",
+ "R_Ar = R0/M_Ar; \t\t\t#kJ/kg K\n",
+ "R_CO2 = R0/M_CO2; \t\t\t#kJ/kg K\n",
+ "\n",
+ "O2 = 0.2314;\n",
+ "N2 = 0.7553;\n",
+ "Ar = 0.0128;\n",
+ "CO2 = 0.0005;\n",
+ "\n",
+ "# Results\n",
+ "print (\"(i) Gas constant for air\")\n",
+ "R = O2*R_O2 + N2*R_N2 + Ar*R_Ar + CO2*R_CO2;\n",
+ "print (\"R = %.3f\")%(R), (\"kJ/kg K\")\n",
+ "\n",
+ "print (\"(ii) Apparent molecular weight.\")\n",
+ "M = R0/R;\n",
+ "print (\"M = %.3f\")%(M)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Gas constant for air\n",
+ "R = 0.287 kJ/kg K\n",
+ "(ii) Apparent molecular weight.\n",
+ "M = 28.954\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.3 Page no : 422"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p = 1.; \t\t\t#bar\n",
+ "#For oxygen\n",
+ "m_O2 = 0.2314;\n",
+ "M_O2 = 32;\n",
+ "n_O2 = m_O2/M_O2;\n",
+ "#For Nitrogen\n",
+ "m_N2 = 0.7553;\n",
+ "M_N2 = 28.;\n",
+ "n_N2 = m_N2/M_N2;\n",
+ "#For Argon\n",
+ "m_Ar = 0.0128;\n",
+ "M_Ar = 40;\n",
+ "n_Ar = m_Ar/M_Ar;\n",
+ "\n",
+ "#For CO2\n",
+ "m_CO2 = 0.0005;\n",
+ "M_CO2 = 44;\n",
+ "n_CO2 = m_CO2/M_CO2;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "n = n_O2 + n_N2 + n_Ar + n_CO2;\n",
+ "\n",
+ "#Let Vi/V be A\n",
+ "A_O2 = n_O2/n * 100;\n",
+ "print (\"Vi/V of O2 = %.3f\")%(A_O2),(\"%\")\n",
+ "\n",
+ "A_N2 = n_N2/n * 100;\n",
+ "print (\"Vi/V of N2 = %.3f\")%(A_N2), (\"%\")\n",
+ "\n",
+ "A_Ar = n_Ar/n *100;\n",
+ "print (\"Vi/V of Ar %.3f\")% (A_Ar), (\"%\")\n",
+ "\n",
+ "A_CO2 = n_CO2/n * 100;\n",
+ "print (\"Vi/V of CO2 = %.3f\")% (A_CO2), (\"%\")\n",
+ "\n",
+ "\n",
+ "P_O2 = n_O2/n*p;\n",
+ "print (\"Partial pressure of O2 = %.3f\")% (P_O2), (\"bar\")\n",
+ "\n",
+ "P_N2 = n_N2/n*p;\n",
+ "print (\"Partial pressure of N2 = %.3f\")% (P_N2), (\"bar\")\n",
+ "\n",
+ "P_Ar = n_Ar/n*p;\n",
+ "print (\"Partial pressure of Ar = %.3f\")% (P_Ar), (\"bar\")\n",
+ "\n",
+ "P_CO2 = n_CO2/n*p;\n",
+ "print (\"Partial pressure of CO2 = %.4f\")% (P_CO2), (\"bar\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vi/V of O2 = 20.937 %\n",
+ "Vi/V of N2 = 78.103 %\n",
+ "Vi/V of Ar 0.927 %\n",
+ "Vi/V of CO2 = 0.033 %\n",
+ "Partial pressure of O2 = 0.209 bar\n",
+ "Partial pressure of N2 = 0.781 bar\n",
+ "Partial pressure of Ar = 0.009 bar\n",
+ "Partial pressure of CO2 = 0.0003 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.4 Page no : 423"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p = 1.*10**5; \t\t\t#Pa\n",
+ "T = 293.; \t\t\t#K\n",
+ "n_CO2 = 1.; \t\t\t#moles of CO2\n",
+ "n = 4.; \t\t\t#moles of air\n",
+ "M_CO2 = 44.;\n",
+ "M_N2 = 28.;\n",
+ "M_O2 = 32.;\n",
+ "\n",
+ "#Let A be the volumeetric analysis\n",
+ "A_O2 = 0.21;\n",
+ "A_N2 = 0.79;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "n_O2 = A_O2*n;\n",
+ "n_N2 = A_N2*n;\n",
+ "\n",
+ "print (\"(i) The masses of CO2, O2 and N2, and the total mass\")\n",
+ "\n",
+ "m_CO2 = n_CO2*M_CO2;\n",
+ "print (\"Mass of CO2 = %.3f\")%(m_CO2),(\"kg\")\n",
+ "\n",
+ "m_O2 = n_O2*M_O2;\n",
+ "print (\"Mass of O2 = %.3f\")%(m_O2),(\"kg\")\n",
+ "\n",
+ "m_N2 = n_N2*M_N2;\n",
+ "print (\"Mass of N2 = %.3f\")%(m_N2),(\"kg\")\n",
+ "\n",
+ "m = m_CO2 + m_O2 + m_N2;\n",
+ "print (\"Total mass = %.3f\")% (m), (\"kg\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) The percentage carbon content by mass\")\n",
+ "#Since the molecular weight of carbon is 12, therefore, there are 12 kg of carbon present for every mole of CO2\n",
+ "m_C = 12; \t\t\t#kg\n",
+ "\n",
+ "C = m_C/m*100;\n",
+ "print (\"Percentage carbon in mixture %.3f\")%(C),(\"%\")\n",
+ "\n",
+ "\n",
+ "print (\"(iii) The apparent molecular weight and the gas consmath.tant for the mixture\")\n",
+ "n = n_CO2 + n_O2 + n_N2;\n",
+ "M = n_CO2/n*M_CO2 + n_O2/n*M_O2 + n_N2/n*M_N2;\n",
+ "print (\"Apparent Molecular weight %.3f\")%(M)\n",
+ "\n",
+ "R0 = 8.314;\n",
+ "R = R0/M;\n",
+ "print (\"Gas constant for the mixture = %.3f\")%(R),(\"kJ/kg K\")\n",
+ "\n",
+ "\n",
+ "print (\"(iv) The specific volume of the mixture\")\n",
+ "v = R*10**3*T/p;\n",
+ "print (\"specific volume = %.3f\")%(v),(\"m**3/kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The masses of CO2, O2 and N2, and the total mass\n",
+ "Mass of CO2 = 44.000 kg\n",
+ "Mass of O2 = 26.880 kg\n",
+ "Mass of N2 = 88.480 kg\n",
+ "Total mass = 159.360 kg\n",
+ "(ii) The percentage carbon content by mass\n",
+ "Percentage carbon in mixture 7.530 %\n",
+ "(iii) The apparent molecular weight and the gas consmath.tant for the mixture\n",
+ "Apparent Molecular weight 31.872\n",
+ "Gas constant for the mixture = 0.261 kJ/kg K\n",
+ "(iv) The specific volume of the mixture\n",
+ "specific volume = 0.764 m**3/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.5 Page no : 424"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p = 1.*10**5; \t\t\t#Pa\n",
+ "T = 298.; \t\t\t#K\n",
+ "M_H2 = 2.;\n",
+ "M_O2 = 32.;\n",
+ "R0 = 8314.;\n",
+ "# ratio = V_H2/V_O2 = 2;\n",
+ "ratio = 2;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) The mass of O2 required\")\n",
+ "\t\t\t#Let the mass of O2 per kg of H2 = x kg\n",
+ "m_H2 = 1; \t\t\t#kg\n",
+ "n_H2 = m_H2/M_H2;\n",
+ "\n",
+ "# n_O2 = x/M_O2\n",
+ "x = M_O2*n_H2/ratio;\n",
+ "print (\"Mass of O2 per kg of H2 = %.3f\")%(x), (\"kg\")\n",
+ "\n",
+ "print (\"(ii) The volume of the container\")\n",
+ "n_O2 = x/M_O2;\n",
+ "n = n_H2 + n_O2;\n",
+ "V = n*R0*T/p;\n",
+ "print (\"V = %.3f\")%(V), (\"m**3\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The mass of O2 required\n",
+ "Mass of O2 per kg of H2 = 8.000 kg\n",
+ "(ii) The volume of the container\n",
+ "V = 18.582 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.6 Page no : 424"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Let composition of mixture by volume be denoted by c1\n",
+ "#Let Final composition desired be denoted by c2\n",
+ "\n",
+ "# Variables\n",
+ "c1_H2 = 0.78;\n",
+ "c1_CO = 0.22;\n",
+ "c2_H2 = 0.52;\n",
+ "c2_CO = 0.48;\n",
+ "M_H2 = 2.;\n",
+ "M_CO = 28.;\n",
+ "\n",
+ "# Calculations\n",
+ "M = c1_H2*M_H2 + c1_CO*M_CO;\n",
+ "# Let x kg of mixture be removed and y kg of CO be added.\n",
+ "x = (c1_H2 - c2_H2)/c1_H2*M;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Mass of mixture removed = %.3f\")%(x), (\"kg\")\n",
+ "\n",
+ "y = M_CO/M*x;\n",
+ "print (\"Mass of CO added = %.3f\")%(y),(\"kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of mixture removed = 2.573 kg\n",
+ "Mass of CO added = 9.333 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.7 Page no : 425"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "ratio = 1./8; \t\t\t#volume ratio; v1/v2\n",
+ "T1 = 1223.; \t\t\t#K\n",
+ "cp_CO2 = 1.235; \t\t\t#kJ/kg K\n",
+ "cp_O2 = 1.088; \t\t\t#kJ/kg K\n",
+ "cp_N2 = 1.172; \t\t\t#kJ/kg K\n",
+ "n_CO2 = 0.13;\n",
+ "n_O2 = 0.125;\n",
+ "n_N2 = 0.745;\n",
+ "M_CO2 = 44.;\n",
+ "M_O2 = 32.;\n",
+ "M_N2 = 28.;\n",
+ "\n",
+ "\n",
+ "# Calculations\n",
+ "m_CO2 = M_CO2*n_CO2;\n",
+ "m_O2 = M_O2*n_O2;\n",
+ "m_N2 = M_N2*n_N2;\n",
+ "m = m_CO2 + m_O2 + m_N2;\n",
+ "\n",
+ "# Let Fraction by mass be denoted by F\n",
+ "F_CO2 = m_CO2/m;\n",
+ "F_O2 = m_O2/m;\n",
+ "F_N2 = m_N2/m;\n",
+ "cp = F_CO2*cp_CO2 + F_O2*cp_O2 + F_N2*cp_N2;\n",
+ "R0 = 8.314;\n",
+ "R = F_CO2*R0/M_CO2 + F_O2*R0/M_O2 + F_N2*R0/M_N2;\n",
+ "\n",
+ "cv = cp - R;\n",
+ "n = 1.2;\n",
+ "\n",
+ "print (\"(i) The workdone\")\n",
+ "T2 = T1*(ratio)**(n-1);\n",
+ "W = R*(T1-T2)/(n-1);\n",
+ "print (\"W = %.3f\")%(W), (\"kJ/kg\")\n",
+ "\n",
+ "print (\"(ii) The heat flow\")\n",
+ "du = cv*(T2-T1);\n",
+ "Q = du + W;\n",
+ "print (\"Q = %.3f\")%(Q), (\"kJ/kg\")\n",
+ "\n",
+ "\n",
+ "print (\"(iii) Change of entropy per kg of mixture\")\n",
+ "ds_1A = R*math.log(1/ratio); \t\t\t#isothermal process\n",
+ "ds_2A = cv*math.log(T1/T2);\n",
+ "\n",
+ "ds_12 = ds_1A - ds_2A;\n",
+ "print (\"change of entropy = %.3f\")% (ds_12), (\"kJ/kg K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The workdone\n",
+ "W = 565.669 kJ/kg\n",
+ "(ii) The heat flow\n",
+ "Q = 190.777 kJ/kg\n",
+ "(iii) Change of entropy per kg of mixture\n",
+ "change of entropy = 0.191 kJ/kg K\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.8 Page no : 427"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "M_CO2 = 44.;\n",
+ "M_H2 = 2.;\n",
+ "M_N2 = 28.;\n",
+ "M_CH4 = 16.;\n",
+ "M_CO = 28.;\n",
+ "\n",
+ "# Let volumetric analysis be denoted by V\n",
+ "V_CO = 0.28;\n",
+ "V_H2 = 0.13;\n",
+ "V_CH4 = 0.04;\n",
+ "V_CO2 = 0.04;\n",
+ "V_N2 = 0.51;\n",
+ "Cp_CO = 29.27; \t\t\t#kJ/mole K\n",
+ "Cp_H2 = 28.89; \t\t\t#kJ/mole K\n",
+ "Cp_CH4 = 35.8; \t\t\t#kJ/mole K\n",
+ "Cp_CO2 = 37.22; \t\t\t#kJ/mole K\n",
+ "Cp_N2 = 29.14; \t\t\t#kJ/mole K\n",
+ "R0 = 8.314; \n",
+ "\n",
+ "# Calculations and Results\n",
+ "Cp = V_CO*Cp_CO + V_H2*Cp_H2 + V_CO2*Cp_CO2 + V_CH4*Cp_CH4 + V_N2*Cp_N2;\n",
+ "print (\"Cp = %.3f\")%(Cp), (\"kJ/mole K\")\n",
+ "\n",
+ "Cv = Cp-R0;\n",
+ "print (\"Cv = %.3f\")% (Cv), (\"kJ/mole K\")\n",
+ "\n",
+ "M = V_CO*M_CO + V_H2*M_H2 + V_CO2*M_CO2 + V_CH4*M_CH4 + V_N2*M_N2;\n",
+ "\n",
+ "cp = Cp/M;\n",
+ "print (\"cp = %.3f\")%(cp), (\"kJ/kg K\")\n",
+ "\n",
+ "cv = Cv/M;\n",
+ "print (\"cv %.3f\")% (cv), (\"kJ/kg K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cp = 29.733 kJ/mole K\n",
+ "Cv = 21.419 kJ/mole K\n",
+ "cp = 1.200 kJ/kg K\n",
+ "cv 0.864 kJ/kg K\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.9 Page no : 427"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "p = 1.3 \t\t\t#bar\n",
+ "R0 = 8.314;\n",
+ "M_CO2 = 44.;\n",
+ "M_O2 = 32.;\n",
+ "M_N2 = 28.;\n",
+ "M_CO = 28.;\n",
+ "m_O2 = 0.1;\n",
+ "m_N2 = 0.7;\n",
+ "m_CO2 = 0.15;\n",
+ "m_CO = 0.05;\n",
+ "#Considering 1 kg of mixture\n",
+ "m = 1; \t\t\t#kg\n",
+ "\n",
+ "# Calculations\n",
+ "#let moles be denoted by n\n",
+ "n_O2 = m_O2/M_O2;\n",
+ "n_N2 = m_N2/M_N2;\n",
+ "n_CO2 = m_CO2/M_CO2;\n",
+ "n_CO = m_CO/M_CO;\n",
+ "M = 1/(m_O2/M_O2 + m_N2/M_N2 + m_CO2/M_CO2 + m_CO/M_CO);\n",
+ "n = m/M;\n",
+ "x_O2 = n_O2/n;\n",
+ "x_N2 = n_N2/n;\n",
+ "x_CO2 = n_CO2/n;\n",
+ "x_CO = n_CO/n;\n",
+ "\n",
+ "# Results\n",
+ "print (\"(i) Partial pressures of the constituents\")\n",
+ "P_O2 = x_O2*p;\n",
+ "print (\"Partial pressure of O2 = %.3f\")% (P_O2), (\"bar\")\n",
+ "\n",
+ "P_N2 = x_N2*p;\n",
+ "print (\"Partial pressure of N2 = %.3f\")% (P_N2), (\"bar\")\n",
+ "\n",
+ "P_CO2 = x_CO2*p;\n",
+ "print (\"Partial pressure of CO2 = %.3f\")% (P_CO2), (\"bar\")\n",
+ "\n",
+ "P_CO = x_CO*p;\n",
+ "print (\"Partial pressure of CO = %.3f\")% (P_CO), (\"bar\")\n",
+ "\n",
+ "R_mix = R0/M;\n",
+ "print (\"Gas constant of mixture = %.3f\")%(R_mix), (\"kJ/kg K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Partial pressures of the constituents\n",
+ "Partial pressure of O2 = 0.122 bar\n",
+ "Partial pressure of N2 = 0.975 bar\n",
+ "Partial pressure of CO2 = 0.133 bar\n",
+ "Partial pressure of CO = 0.070 bar\n",
+ "Gas constant of mixture = 0.277 kJ/kg K\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.10 Page no : 428"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p = 4.*10**5; \t\t \t#Pa\n",
+ "import math \n",
+ "T = 293.; \t\t\t #K\n",
+ "R0 = 8.314;\n",
+ "\n",
+ "m_N2 = 4.; \t \t\t #kg\n",
+ "m_CO2 = 6.; \t\t\t #kg\n",
+ "\n",
+ "M_N2 = 28.; \t\t \t #Molecular mass\n",
+ "M_CO2 = 44.; \t\t\t #Molecular mass\n",
+ "\n",
+ "n_N2 = m_N2/M_N2; \t\t\t#moles of N2\n",
+ "n_CO2 = m_CO2/M_CO2; \t\t\t#moles of CO2\n",
+ "\n",
+ "x_N2 = n_N2/(n_N2+n_CO2);\n",
+ "print (\"x_N2 = %.3f\")% (x_N2)\n",
+ "\n",
+ "x_CO2 = n_CO2/(n_CO2+n_N2);\n",
+ "print (\"x_CO2 = %.3f\")% (x_CO2)\n",
+ "\n",
+ "\n",
+ "print (\"(ii) The equivalent molecular weight of the mixture\")\n",
+ "M = x_N2*M_N2 + x_CO2*M_CO2;\n",
+ "print (\"M = %.3f\")%(M), (\"kg/kg-mole\")\n",
+ "\n",
+ "print (\"(iii) The equivalent gas consmath.tant of the mixture\")\n",
+ "m = m_N2+m_CO2;\n",
+ "Rmix = (m_N2*(R0/M_N2) + m_CO2*(R0/M_CO2))/m;\n",
+ "print (\"Rmix = %.3f\")% (Rmix), (\"kJ/kg K\")\n",
+ "\n",
+ "print (\"(iv) The partial pressures and partial volumes\")\n",
+ "P_N2 = x_N2*p/10**5;\n",
+ "print (\"P_N2 = %.3f\")% (P_N2), (\"bar\")\n",
+ "\n",
+ "P_CO2 = x_CO2*p/10**5;\n",
+ "print (\"P_CO2 = %.3f\")% (P_CO2), (\"bar\")\n",
+ "\n",
+ "V_N2 = m_N2*R0/M_N2*T/p*10**3;\n",
+ "print (\"V_N2 %.3f\")% (V_N2), (\"m**3\")\n",
+ "\n",
+ "V_CO2 = m_CO2*R0/M_CO2*T/p*10**3;\n",
+ "print (\"V_CO2 %.3f\")% (V_CO2), (\"m**3\")\n",
+ "\n",
+ "print (\"(v) The volume and density of the mixture\")\n",
+ "\n",
+ "V = m*Rmix*10**3*T/p;\n",
+ "print (\"V = %.3f\")% (V), (\"m**3\")\n",
+ "\n",
+ "rho_mix = m/V;\n",
+ "print (\"Density of mixture = %.3f\")% (rho_mix), (\"kg/m**3\")\n",
+ "\n",
+ "\n",
+ "print (\"(vi) cp and cv of the mixture\")\n",
+ "\n",
+ "y_N2 = 1.4;\n",
+ "cv_N2 = (R0/M_N2)/(y_N2 - 1);\n",
+ "cp_N2 = cv_N2*y_N2;\n",
+ "\n",
+ "y_CO2 = 1.286;\n",
+ "cv_CO2 = (R0/M_CO2)/(y_CO2 - 1);\n",
+ "cp_CO2 = cv_CO2*y_CO2;\n",
+ "\n",
+ "cp = (m_N2*cp_N2 + m_CO2*cp_CO2)/(m_N2+m_CO2);\n",
+ "print (\"cp = %.3f\")%(cp),(\"kJ/kg K\")\n",
+ "\n",
+ "cv = (m_N2*cv_N2 + m_CO2*cv_CO2)/(m_N2+m_CO2);\n",
+ "print (\"cv = %.3f\")%(cv),(\"kJ/kg K\")\n",
+ "\n",
+ "T1 = 293.; \t\t\t#K\n",
+ "T2 = 323.; \t\t\t#K\n",
+ "dU = m*cv*(T2-T1);\n",
+ "print (\"Change in internal energy = %.3f\")% (dU), (\"kJ\")\n",
+ "\n",
+ "dH = m*cp*(T2-T1);\n",
+ "print (\"Change in enthalpy = %.3f\")% (dH), (\"kJ\")\n",
+ "\n",
+ "dS = m*cv*math.log(T2/T1); \t\t\t#Consmath.tant volume process\n",
+ "print (\"Change in entropy = %.3f\")% (dS), (\"kJ/kg K\")\n",
+ "\n",
+ "\n",
+ "print (\"When the mixture is heated at constant pressure\")\n",
+ "\n",
+ "print (\"If the mixture is heated at constant pressure \u0394U and \u0394H will remain the same\")\n",
+ "\n",
+ "dS = m*cp*math.log(T2/T1);\n",
+ "print (\"Change in entropy = %.3f\")% (dS), (\"kJ/kg K\")\n",
+ "\n",
+ "\n",
+ "# Note : Answers are slightly different because of rounding error."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "x_N2 = 0.512\n",
+ "x_CO2 = 0.488\n",
+ "(ii) The equivalent molecular weight of the mixture\n",
+ "M = 35.814 kg/kg-mole\n",
+ "(iii) The equivalent gas consmath.tant of the mixture\n",
+ "Rmix = 0.232 kJ/kg K\n",
+ "(iv) The partial pressures and partial volumes\n",
+ "P_N2 = 2.047 bar\n",
+ "P_CO2 = 1.953 bar\n",
+ "V_N2 0.870 m**3\n",
+ "V_CO2 0.830 m**3\n",
+ "(v) The volume and density of the mixture\n",
+ "V = 1.700 m**3\n",
+ "Density of mixture = 5.881 kg/m**3\n",
+ "(vi) cp and cv of the mixture\n",
+ "cp = 0.925 kJ/kg K\n",
+ "cv = 0.693 kJ/kg K\n",
+ "Change in internal energy = 208.001 kJ\n",
+ "Change in enthalpy = 277.644 kJ\n",
+ "Change in entropy = 0.676 kJ/kg K\n",
+ "When the mixture is heated at constant pressure\n",
+ "If the mixture is heated at constant pressure \u0394U and \u0394H will remain the same\n",
+ "Change in entropy = 0.902 kJ/kg K\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.11 Page no : 430"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "Cv_O2 = 21.07; \t\t\t#kJ/mole K\n",
+ "Cv_CO = 20.86; \t\t\t#kJ/mole K\n",
+ "p_O2 = 8*10**5; \t\t\t#Pa\n",
+ "p_CO = 1*10**5; \t\t\t#Pa\n",
+ "V_O2 = 1.8; \t\t\t#m**3\n",
+ "V_CO = 3.6; \t\t\t#m**3\n",
+ "T_O2 = 323.; \t\t\t#K\n",
+ "T_CO = 293.; \t\t\t#K\n",
+ "R0 = 8314.;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "n_O2 = p_O2*V_O2/R0/T_O2;\n",
+ "n_CO = p_CO*V_CO/R0/T_CO;\n",
+ "n = (n_O2+n_CO);\n",
+ "V = (V_O2+V_CO);\n",
+ "\n",
+ "print (\"(i) Final temperature (T) and pressure (p) of the mixture\")\n",
+ "\n",
+ "#Before mixing\n",
+ "U1 = n_O2*Cv_O2*T_O2 + n_CO*Cv_CO*T_CO;\n",
+ "\n",
+ "T = U1/(n_O2*Cv_O2 + n_CO*Cv_CO);\n",
+ "t = T-273;\n",
+ "\n",
+ "print (\"Final temperature = %.3f\")% (t), (\"\u00b0C\")\n",
+ "\n",
+ "p = n*R0*T/V/10**5;\n",
+ "print (\"Final pressure = %.3f\")% (p), (\"bar\")\n",
+ "\n",
+ "\n",
+ "#For oxygen\n",
+ "dS_O1A = n_O2*R0*math.log(V/V_O2); \t\t\t#isothermal process\n",
+ "dS_O2A = n_O2*Cv_O2*math.log(T_O2/T); \t\t\t#consmath.tant volume process\n",
+ "dS_O12 = dS_O1A - dS_O2A; \t\t\t# Change of entropy of O2\n",
+ "\n",
+ "#For CO\n",
+ "dS_CO12 = n_CO*R0*math.log(V/V_CO) + n_CO*Cv_CO*math.log(T/T_CO); \t\t\t#Change of entropy of CO\n",
+ "dS = (dS_O12 + dS_CO12)/10**3;\n",
+ "print (\"(ii)Change of entropy of system = %.3f\")% (dS), (\"kJ/K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Final temperature (T) and pressure (p) of the mixture\n",
+ "Final temperature = 43.569 \u00b0C\n",
+ "Final pressure = 3.334 bar\n",
+ "(ii)Change of entropy of system = 5.396 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.12 Page no : 432"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "p_A = 16.*10**5; \t\t\t#Pa\n",
+ "p_B = 6.4*10**5; \t\t\t#Pa\n",
+ "\n",
+ "T_A = 328.; \t\t\t#K\n",
+ "T_B = 298.; \t\t\t#K\n",
+ "\n",
+ "n_A = 0.6 \t\t\t#kg-mole\n",
+ "m_B = 3; \t \t\t#kg\n",
+ "\n",
+ "R0 = 8314.;\n",
+ "M_A = 28.; \n",
+ "y = 1.4;\n",
+ "\n",
+ "V_A = n_A*R0*T_A/p_A;\n",
+ "m_A = n_A*M_A;\n",
+ "R = R0/M_A;\n",
+ "V_B = m_B*R*T_B/p_B;\n",
+ "V = V_A+V_B;\n",
+ "m = m_A+m_B;\n",
+ "T = 303.; \t\t\t#K\n",
+ "\n",
+ "print (\"(a) (i) Final equilibrium pressure, p\")\n",
+ "p = m*R*T/V/10**5;\n",
+ "print (\"p = %.3f\")% (p), (\"bar\")\n",
+ "\n",
+ "cv = R/10**3/(y-1);\n",
+ "\n",
+ "print (\"(ii) Amount of heat transferred, Q :\")\n",
+ "\n",
+ "U1 = cv*(m_A*T_A + m_B*T_B);\n",
+ "U2 = m*cv*T;\n",
+ "Q = U2-U1;\n",
+ "print (\"Q = %.3f\")% (Q),(\"kJ\")\n",
+ "\n",
+ "print (\"(b) If the vessel were insulated :\")\n",
+ "\n",
+ "print (\"(i) Final temperature,\")\n",
+ "\n",
+ "T = cv*(m_A*T_A + m_B*T_B)/(m*cv);\n",
+ "t = T-273;\n",
+ "print (\"T = %.3f\")% (t), (\"\u00b0C\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) Final pressure\")\n",
+ "\n",
+ "p = m*R*T/V/10**5;\n",
+ "print (\"p = %.3f\")% (p), (\"bar\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a) (i) Final equilibrium pressure, p\n",
+ "p = 12.393 bar\n",
+ "(ii) Amount of heat transferred, Q :\n",
+ "Q = -300.640 kJ\n",
+ "(b) If the vessel were insulated :\n",
+ "(i) Final temperature,\n",
+ "T = 50.455 \u00b0C\n",
+ "(ii) Final pressure\n",
+ "p = 13.230 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.13 Page no : 434"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "m_O2 = 3.; \t\t\t#kg\n",
+ "M_O2 = 32.;\n",
+ "m_N2 = 9.; \t\t\t#kg\n",
+ "M_N2 = 28.;\n",
+ "R0 = 8.314;\n",
+ "\n",
+ "# Calculations\n",
+ "R_O2 = R0/M_O2;\n",
+ "R_N2 = R0/M_N2;\n",
+ "x_O2 = (m_O2/M_O2)/((m_O2/M_O2) + (m_N2/M_N2));\n",
+ "x_N2 = (m_N2/M_N2)/((m_O2/M_O2) + (m_N2/M_N2));\n",
+ "dS = -m_O2*R_O2*math.log(x_O2) -m_N2*R_N2*math.log(x_N2);\n",
+ "\n",
+ "# Results\n",
+ "print (\"Change in entropy = %.3f\")% (dS),(\"kJ/kg K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy = 1.844 kJ/kg K\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.14 Page no : 434"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "m_N2 = 2.5; \t\t\t#kg \n",
+ "M_N2 = 28.;\n",
+ "p_N2 = 15.; \t\t\t#bar\n",
+ "p_total = 20.; \t\t\t#bar\n",
+ "\n",
+ "# Calculations\n",
+ "n_N2 = m_N2/M_N2;\n",
+ "p_O2 = p_total-p_N2;\n",
+ "n_O2 = p_O2/p_N2*n_N2;\n",
+ "M_O2 = 32;\n",
+ "m_O2 = n_O2*M_O2;\n",
+ "\n",
+ "# Results\n",
+ "print (\"Mass of O2 added = %.3f\")% (m_O2), (\"kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of O2 added = 0.952 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.15 Page no : 435"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "n_O2 = 1.;\n",
+ "M_N2 = 28.;\n",
+ "M_O2 = 32.;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Moles of N2 per mole of O2 :\")\n",
+ "n_N2 = n_O2*0.79/0.21;\n",
+ "print (\"n_N2 = %.3f\")%(n_N2),(\"moles\")\n",
+ "\n",
+ "n = n_O2+n_N2;\n",
+ "print (\"(ii)\")\n",
+ "p = 1; \t\t\t#atm\n",
+ "\n",
+ "p_O2 = n_O2/n*p;\n",
+ "print (\"p_O2 = %.3f\")% (p_O2), (\"atm\")\n",
+ "\n",
+ "p_N2 = n_N2/n*p;\n",
+ "print (\"p_N2 = %.3f\")% (p_N2), (\"atm\")\n",
+ "\n",
+ "\n",
+ "x = n_N2*M_N2/(n_N2*M_N2+n_O2*M_O2);\n",
+ "print (\"(iii) The kg of nitrogen per kg of mixture = %.3f\")% (x), (\"kg N2/kg mix\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Moles of N2 per mole of O2 :\n",
+ "n_N2 = 3.762 moles\n",
+ "(ii)\n",
+ "p_O2 = 0.210 atm\n",
+ "p_N2 = 0.790 atm\n",
+ "(iii) The kg of nitrogen per kg of mixture = 0.767 kg N2/kg mix\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.16 Page no : 436"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "V = 0.6; \t\t\t#m**3\n",
+ "p1 = 12.*10**5; \t\t\t#Pa\n",
+ "p2 = 18.*10**5; \t\t\t#Pa\n",
+ "T = 298.; \t\t\t#K\n",
+ "R0 = 8.314;\n",
+ "x_O2 = 0.23;\n",
+ "x_N2 = 0.77;\n",
+ "\n",
+ "n = p1*V/R0/10**3/T;\n",
+ "#Considering 100 kg of air\n",
+ "m_O2 = 23.; \t\t\t#kg\n",
+ "m_N2 = 77.; \t\t\t#kg\n",
+ "M_O2 = 32.;\n",
+ "M_N2 = 28.;\n",
+ "m = 100.; \t\t\t#kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "R = (m_O2/M_O2 + m_N2/M_N2)*R0/m; \t\t\t#for air\n",
+ "M = R0/R \t \t\t#for air\n",
+ "\n",
+ "m = p1*V/R/T/10**3;\n",
+ "\n",
+ "m_O2 = x_O2*m;\n",
+ "print (\"Mass of O2 = %.3f\")% (m_O2), (\"kg\")\n",
+ "\n",
+ "m_N2 = x_N2*m;\n",
+ "print (\"Mass of N2 = %.3f\")% (m_N2), (\"kg\")\n",
+ "\n",
+ "#After adding CO2 in the vessel\n",
+ "p2 = 18.*10**5; \t\t\t#Pa;\n",
+ "\n",
+ "p_CO2 = 6.*10**5; \t\t\t#Pa\n",
+ "M_CO2 = 44.;\n",
+ "R_CO2 = R0/M_CO2;\n",
+ "\n",
+ "m_CO2 = p_CO2*V/(R_CO2*10**3*T);\n",
+ "print (\"Mass of CO2 = %.3f\")% (m_CO2), (\"kg\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of O2 = 1.927 kg\n",
+ "Mass of N2 = 6.451 kg\n",
+ "Mass of CO2 = 6.393 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.17 Page no : 437"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "V = 6; \t\t \t#m**3\n",
+ "A = 0.45; \n",
+ "B = 0.55;\n",
+ "R_A = 0.288; \t\t\t#kJ/kg K\n",
+ "R_B = 0.295; \t\t\t#kJ/kg K\n",
+ "m = 2. \t\t\t#kg\n",
+ "T = 303. \t\t\t #K\n",
+ "\n",
+ "# Calculations\n",
+ "print (\"(i) The partial pressures\")\n",
+ "m_A = A*m;\n",
+ "m_B = B*m;\n",
+ "\n",
+ "p_A = m_A*R_A*10**3*T/V/10**5; \t\t\t#bar\n",
+ "print (\"p_A = %.3f\")% (p_A), (\"bar\")\n",
+ "\n",
+ "p_B = m_B*R_B*10**3*T/V/10**5; \t\t\t#bar\n",
+ "print (\"p_B = %.3f\")% (p_B), (\"bar\")\n",
+ "\n",
+ "\n",
+ "print (\"(ii) The total pressure\")\n",
+ "p = p_A+p_B;\n",
+ "print (\"p = %.3f\")% (p), (\"bar\")\n",
+ "\n",
+ "\n",
+ "print (\"(iii) The mean value of R for the mixture\")\n",
+ "Rm = (m_A*R_A + m_B*R_B)/(m_A + m_B);\n",
+ "print (\"Rm = %.3f\")% (Rm), (\"kJ/kg K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The partial pressures\n",
+ "p_A = 0.131 bar\n",
+ "p_B = 0.164 bar\n",
+ "(ii) The total pressure\n",
+ "p = 0.295 bar\n",
+ "(iii) The mean value of R for the mixture\n",
+ "Rm = 0.292 kJ/kg K\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.18 Page no : 438"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "m_O2 = 4.; \t\t\t#kg\n",
+ "m_N2 = 6.; \t\t\t#kg\n",
+ "p = 4.*10**5; \t\t\t#Pa\n",
+ "T = 300.; \t\t\t#K\n",
+ "M_O2 = 32.;\n",
+ "M_N2 = 28.;\n",
+ "m = 10.; \t\t\t#kg\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) The mole fraction of each component\")\n",
+ "n_O2 = m_O2/M_O2;\n",
+ "n_N2 = m_N2/M_N2;\n",
+ "\n",
+ "x_O2 = n_O2/(n_O2+n_N2);\n",
+ "print (\"x_O2 = %.3f\")% (x_O2)\n",
+ "\n",
+ "x_N2 = n_N2/(n_N2+n_O2);\n",
+ "print (\"x_N2 = %.3f\")% (x_N2)\n",
+ "\n",
+ "\n",
+ "print (\"(ii) The average molecular weight\")\n",
+ "M = (n_O2*M_O2 + n_N2*M_N2)/(n_O2 + n_N2);\n",
+ "print (\"M = %.3f\")%(M)\n",
+ "\n",
+ "print (\"(iii) The specific gas consmath.tant\")\n",
+ "R0 = 8.314;\n",
+ "R = R0/M;\n",
+ "print (\"R = %.3f\")% (R), (\"kJ/kg K\")\n",
+ "\n",
+ "print (\"(iv) The volume and density\")\n",
+ "V = m*R*T*10**3/p;\n",
+ "print (\"V = %.3f\")%(V), (\"m**3\")\n",
+ "\n",
+ "rho = (m_O2/V) + (m_N2/V);\n",
+ "print (\"density = %.3f\")% (rho), (\"kg/m**3\")\n",
+ "\n",
+ "\n",
+ "print (\"(v) The partial pressures and partial volumes\")\n",
+ "p_O2 = n_O2*R0*10**3*T/V/10**5; \t\t\t#bar\n",
+ "print (\"p_O2 = %.3f\")%(p_O2), (\"bar\")\n",
+ "\n",
+ "p_N2 = n_N2*R0*10**3*T/V/10**5; \t\t\t#bar\n",
+ "print (\"p_N2 = %.3f\")% (p_N2), (\"bar\")\n",
+ "\n",
+ "V_O2 = x_O2*V;\n",
+ "print (\"V_O2 = %.3f\")% (V_O2), (\"m**3\")\n",
+ "\n",
+ "V_N2 = x_N2*V;\n",
+ "print (\"V_N2 = %.3f\")% (V_N2), (\"m**3\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) The mole fraction of each component\n",
+ "x_O2 = 0.368\n",
+ "x_N2 = 0.632\n",
+ "(ii) The average molecular weight\n",
+ "M = 29.474\n",
+ "(iii) The specific gas consmath.tant\n",
+ "R = 0.282 kJ/kg K\n",
+ "(iv) The volume and density\n",
+ "V = 2.116 m**3\n",
+ "density = 4.727 kg/m**3\n",
+ "(v) The partial pressures and partial volumes\n",
+ "p_O2 = 1.474 bar\n",
+ "p_N2 = 2.526 bar\n",
+ "V_O2 = 0.779 m**3\n",
+ "V_N2 = 1.336 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.19 Page no : 439"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "cp_CO2 = 0.85; \t\t\t#kJ/kg K\n",
+ "cp_N2 = 1.04; \t\t\t#kJ/kg K\n",
+ "m_CO2 = 4.; \t\t\t#kg\n",
+ "T1_CO2 = 313.; \t\t\t#K\n",
+ "m_N2 = 8.; \t\t\t#kg\n",
+ "T1_N2 = 433.; \t\t\t#K\n",
+ "p2 = 0.7; \t\t\t#bar\n",
+ "p1_CO2 = 1.4; \t\t\t#bar\n",
+ "p1_N2 = 1.;\n",
+ "R = 8.314;\n",
+ "M_CO2 = 44.;\n",
+ "M_N2 = 28.;\n",
+ "R_CO2 = R/M_CO2;\n",
+ "R_N2 = R/M_N2;\n",
+ "\n",
+ "# Calculations and Results\n",
+ "print (\"(i) Final temperature, T2\")\n",
+ "T2 = (m_CO2*cp_CO2*T1_CO2 + m_N2*cp_N2*T1_N2)/(m_CO2*cp_CO2 + m_N2*cp_N2);\n",
+ "print (\"T2 = %.3f\")%(T2),(\"K\")\n",
+ "\n",
+ "print (\"(ii) Change in entropy\")\n",
+ "n_CO2 = 0.0909;\n",
+ "n_N2 = 0.2857;\n",
+ "n = n_CO2 + n_N2;\n",
+ "x_CO2 = n_CO2/n;\n",
+ "x_N2 = n_N2/n;\n",
+ "p2_CO2 = x_CO2*p2;\n",
+ "p2_N2 = x_N2*p2;\n",
+ "\n",
+ "dS = m_CO2*cp_CO2*math.log(T2/T1_CO2) - m_CO2*R_CO2*math.log(p2_CO2/p1_CO2) + m_N2*cp_N2*math.log(T2/T1_N2) - m_N2*R_N2*math.log(p2_N2/p1_N2);\n",
+ "print (\"dS = %.3f\")%(dS), (\"kJ/K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Final temperature, T2\n",
+ "T2 = 398.188 K\n",
+ "(ii) Change in entropy\n",
+ "dS = 3.223 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.20 Page no : 440"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "cv_O2 = 0.39; \t\t\t#kJ/kg K\n",
+ "cv_N2 = 0.446; \t\t\t#kJ/kg K\n",
+ "n_O2 = 1.;\n",
+ "n_N2 = 2.;\n",
+ "M_O2 = 32.;\n",
+ "M_N2 = 28.;\n",
+ "m_O2 = 32.; \t\t\t#kg\n",
+ "m_N2 = 2*28.; \t\t\t#kg\n",
+ "T_O2 = 293.; \t\t\t#K\n",
+ "T_N2 = 301.; \t\t\t#K\n",
+ "R0 = 8.314;\n",
+ "\n",
+ "# Calculations\n",
+ "p_O2 = 2.5*10**5; \t\t\t#Pa\n",
+ "p_N2 = 1.5*10**5; \t\t\t#Pa\n",
+ "T2 = (m_O2*cv_O2*T_O2 + m_N2*cv_N2*T_N2)/(m_O2*cv_O2 + m_N2*cv_N2);\n",
+ "V_O2 = n_O2*R0*10**5*T_O2/p_O2;\n",
+ "V_N2 = n_N2*R0*10**5*T_N2/p_N2;\n",
+ "V = V_O2+V_N2;\n",
+ "dS = m_O2*(cv_O2*math.log(T2/T_O2) + R0/M_O2*math.log(V/V_O2)) + m_N2*(cv_N2*math.log(T2/T_N2) + R0/M_N2*math.log(V/V_N2));\n",
+ "\n",
+ "# Results\n",
+ "print (\"Entropy change in the mixing process = %.3f\")%(dS),(\"kJ\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy change in the mixing process = 16.627 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.21 Page no : 421"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "cv_N2 = 0.744; \t\t\t#kJ/kg K\n",
+ "cv_H2 = 10.352; \t\t\t#kJ/kg K\n",
+ "cp_N2 = 1.041; \t\t\t#kJ/kg K\n",
+ "cp_H2 = 14.476; \t\t\t#kJ/kg K\n",
+ "V = 0.45; \t\t\t#m**3\n",
+ "V_H2 = 0.3; \t\t\t#m**3\n",
+ "V_N2 = 0.15; \t\t\t#m**3\n",
+ "p_H2 = 3.*10**5; \t\t\t#Pa\n",
+ "p_N2 = 6.*10**5; \t\t\t#Pa\n",
+ "T_H2 = 403.; \t\t\t#K\n",
+ "T_N2 = 303.; \t\t\t#K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "R_H2 = 8.314/2;\n",
+ "R_N2 = 8.314/28;\n",
+ "\n",
+ "print (\"(i) Temperature of equilibrium mixture\")\n",
+ "\n",
+ "m_H2 = p_H2*V_H2/(R_H2*10**3)/T_H2;\n",
+ "m_N2 = p_N2*V_N2/(R_N2*10**3)/T_N2;\n",
+ "T2 = (m_H2*cv_H2*T_H2 + m_N2*cv_N2*T_N2)/(m_H2*cv_H2 + m_N2*cv_N2);\n",
+ "print (\"T2 = %.3f\")%(T2),(\"K\")\n",
+ "\n",
+ "print (\"(ii) Pressure of the mixture\")\n",
+ "p2_H2 = m_H2*R_H2*10**3*T2/V;\n",
+ "p2_N2 = m_N2*R_N2*10**3*T2/V;\n",
+ "\n",
+ "p2 = p2_H2+p2_N2;\n",
+ "print (\"p2 = %.3f\")%(p2/10**5),(\"bar\")\n",
+ "\n",
+ "print (\"(iii) Change in entropy :\")\n",
+ "\n",
+ "dS_H2 = m_H2*(cp_H2*math.log(T2/T_H2) - R_H2*math.log(p2_H2/p_H2));\n",
+ "print (\"Change in entropy of H2 = %.3f\")%(dS_H2),(\"kJ/K\")\n",
+ "\n",
+ "dS_N2 = m_N2*(cp_N2*math.log(T2/T_N2) - R_N2*math.log(p2_N2/p_N2));\n",
+ "print (\"Change in entropy of N2 = %.3f\")%(dS_N2),(\"kJ/K\")\n",
+ "\n",
+ "dS = dS_H2+dS_N2;\n",
+ "\n",
+ "print (\"Total change in entropy = %.3f\")%(dS),(\"kJ/K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Temperature of equilibrium mixture\n",
+ "T2 = 345.767 K\n",
+ "(ii) Pressure of the mixture\n",
+ "p2 = 3.998 bar\n",
+ "(iii) Change in entropy :\n",
+ "Change in entropy of H2 = 0.006 kJ/K\n",
+ "Change in entropy of N2 = 0.425 kJ/K\n",
+ "Total change in entropy = 0.430 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.22 Page no : 443"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "cv_N2 = 0.745; \t\t\t#kJ/kg K\n",
+ "cv_CO2 = 0.653; \t\t#kJ/kg K\n",
+ "cp_N2 = 1.041; \t\t\t#kJ/kg K\n",
+ "cp_CO2 = 0.842; \t\t#kJ/kg K\n",
+ "m_N2 = 4.; \t\t\t#kg\n",
+ "m_CO2 = 6.; \t\t#kg\n",
+ "pmix = 4.; \t\t \t#bar\n",
+ "m = m_N2+m_CO2;\n",
+ "\n",
+ "T1 = 298.; \t\t\t #K\n",
+ "T2 = 323.; \t\t\t #K\n",
+ "\n",
+ "# Calculations and Results\n",
+ "cv_mix = (m_N2*cv_N2 + m_CO2*cv_CO2)/(m_N2+m_CO2);\n",
+ "print (\"cv_mix = %.3f\")% (cv_mix), (\"kJ/kg K\")\n",
+ "\n",
+ "cp_mix = (m_N2*cp_N2 + m_CO2*cp_CO2)/(m_N2+m_CO2);\n",
+ "print (\"cp_mix = %.3f\")% (cp_mix), (\"kJ/kg K\")\n",
+ "\n",
+ "dU = m*cv_mix*(T2-T1);\n",
+ "print (\"Change in internal energy = %.3f\")% (dU), (\"kJ\")\n",
+ "\n",
+ "dH = m*cp_mix*(T2-T1);\n",
+ "print (\"Change in enthalpy = %.3f\")% (dH), (\"kJ\")\n",
+ "\n",
+ "dS = m_N2*cv_N2*math.log(T2/T1) + m_CO2*cv_CO2*math.log(T2/T1);\n",
+ "print (\"Change in entropy = %.3f\")% (dS), (\"kJ/K\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "cv_mix = 0.690 kJ/kg K\n",
+ "cp_mix = 0.922 kJ/kg K\n",
+ "Change in internal energy = 172.450 kJ\n",
+ "Change in enthalpy = 230.400 kJ\n",
+ "Change in entropy = 0.556 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/screenshots/ch13.png b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/screenshots/ch13.png
new file mode 100755
index 00000000..fa8b923f
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/screenshots/ch13.png
Binary files differ
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/screenshots/ch4.png b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/screenshots/ch4.png
new file mode 100755
index 00000000..d68325c7
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/screenshots/ch4.png
Binary files differ
diff --git a/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/screenshots/ch9.png b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/screenshots/ch9.png
new file mode 100755
index 00000000..bb59b8fd
--- /dev/null
+++ b/Engineering_Thermodynamics:_A_Computer_Approach_(SI_Units_Version)/screenshots/ch9.png
Binary files differ