summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter1.ipynb640
-rw-r--r--Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter10.ipynb152
-rw-r--r--Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter11.ipynb605
-rw-r--r--Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter2.ipynb383
-rw-r--r--Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter3.ipynb1102
-rw-r--r--Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter4.ipynb584
-rw-r--r--Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter5.ipynb853
-rw-r--r--Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter6.ipynb1140
-rw-r--r--Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter7.ipynb494
-rw-r--r--Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter8.ipynb761
-rw-r--r--Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter9.ipynb723
-rw-r--r--Energy_Management_by_W._R._Murphy_and_G._A._Mckay/screenshots/Chapter1.pngbin0 -> 121050 bytes
-rw-r--r--Energy_Management_by_W._R._Murphy_and_G._A._Mckay/screenshots/Chapter3.pngbin0 -> 113884 bytes
-rw-r--r--Energy_Management_by_W._R._Murphy_and_G._A._Mckay/screenshots/Chapter9.pngbin0 -> 130684 bytes
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/11._Hypersonic_vehicles.ipynb510
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/2._Fundamental_Thoughts.ipynb365
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/3._The_Standard_Atmosphere.ipynb546
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/4._Aerodynamics.ipynb229
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/5._Airfoils,_Wings_and_Other_Aerodynamic_shapes.ipynb533
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/6._Elements_of_Airplane_Performance.ipynb677
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/7._Principles_of_Stability_and_Control.ipynb278
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/8._Space_Flight_(Astronautics).ipynb548
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/9._Propulsion.ipynb585
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/Appendix_A.ipynb517
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/Appendix_B.ipynb290
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/Appendix_C.ipynb352
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/Appendix_D.ipynb125
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/Appendix_E.ipynb421
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/README.txt10
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/screenshots/1.pngbin0 -> 114430 bytes
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/screenshots/2.pngbin0 -> 81067 bytes
-rw-r--r--Introduction_to_flight_by_J_D_Anderson/screenshots/3.pngbin0 -> 65818 bytes
-rw-r--r--Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/1._Compressible_Flow-Some_History_and_Introductory_Thoughts.ipynb408
-rw-r--r--Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/3._One_Dimentional_Flow.ipynb881
-rw-r--r--Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/4._Oblique_Shock_and_Expansion_Waves.ipynb687
-rw-r--r--Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/5._Quasi-One-Dimensional_Flow.ipynb444
-rw-r--r--Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/README.txt10
-rw-r--r--Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/screenshots/1.pngbin0 -> 65120 bytes
-rw-r--r--Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/screenshots/2.pngbin0 -> 105558 bytes
-rw-r--r--Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/screenshots/3.pngbin0 -> 99615 bytes
40 files changed, 15853 insertions, 0 deletions
diff --git a/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter1.ipynb b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter1.ipynb
new file mode 100644
index 00000000..7ae25093
--- /dev/null
+++ b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter1.ipynb
@@ -0,0 +1,640 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:89509362f5307bcdc2a23ad180900fa6d31da4662232a1bc9ba201a6cbebc214"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter1-Energy auditing"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate heat availble \n",
+ "\n",
+ "## Example 1.1\n",
+ "print('Example 1.1');\n",
+ "print(' Page No. 08');\n",
+ "## Solution \n",
+ "\n",
+ "## Given\n",
+ "m1= 40.*10**3;## fuel oil in gallons per year\n",
+ "ga= 4.545*10**-3;## m**3\n",
+ "m= m1*ga;## fuel oil in m**3 per year\n",
+ "Cv1= 175.*10**3;## Btu per gallons\n",
+ "Bt= .2321*10**6;## J per m**3\n",
+ "Cv= Cv1*Bt;## in J per year per m**3 \n",
+ "q=m*Cv;## in J per year\n",
+ "print'%s %.2e %s'%(' Heat available is ',q,' J per year')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 1.1\n",
+ " Page No. 08\n",
+ " Heat available is 7.38e+12 J per year\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "## Example 1.2\n",
+ "print('Example 1.2');\n",
+ "print('Page No. 09');\n",
+ "## Solution \n",
+ "\n",
+ "## Given\n",
+ "Eo1= 1.775*10**9;## Annular energy consumption of oil in Btu\n",
+ "Btu= 1055.;## 1 Btu = 1055 Joules\n",
+ "Eo= Eo1*Btu;## Annular energy consumption of oil in Joules\n",
+ "Eg1= 5.*10**3;## Annular energy consumption of gas in Therms\n",
+ "Th= 1055.*10**5;## 1 Th = 1055*10**3 Joules\n",
+ "Eg= Eg1*Th;## Annular energy consumption of gas in Joules\n",
+ "Ee1= 995.*10**3;## Annular energy consumption of electricity in KWh\n",
+ "KWh= 3.6*10**6;## 1 KWh = 3.6*10**6 Joules\n",
+ "Ee= Ee1*KWh;## Annular energy consumption of electricity in Joules\n",
+ "Et= ( Eo + Eg + Ee);## Total energy consumption\n",
+ "P1= (Eo/Et)*100.; ## percentage of oil consumption\n",
+ "P2= (Eg/Et)*100.; ## percentage of gas consumption\n",
+ "P3= (Ee/Et)*100.; ## percentage of electricity consumption\n",
+ "print'%s %.1f %s'%('percentage of oil consumption is ',P1,'')\n",
+ "print'%s %.1f %s'%('percentage of gas consumption is ',P2,'')\n",
+ "print'%s %.1f %s'%('percentage of electricity consumption is ',P3,'') \n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 1.2\n",
+ "Page No. 09\n",
+ "percentage of oil consumption is 31.3 \n",
+ "percentage of gas consumption is 8.8 \n",
+ "percentage of electricity consumption is 59.9 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 1.3\n",
+ "print('Example 1.3\\n\\n');\n",
+ "print('Page No. 10\\n\\n');\n",
+ "## Solution \n",
+ "\n",
+ "## Given\n",
+ "Et = 100*10**3;## total energy production in tonnes per annum\n",
+ "Eo= 0.520*10**9;## oil consumption in Wh\n",
+ "Eg= 0.146*10**9;## gas consumption in Wh\n",
+ "Ee= 0.995*10**9;## electricity consumption in Wh\n",
+ "Io= Eo/Et;\n",
+ "Ig= Eg/Et;\n",
+ "Ie= Ee/Et;\n",
+ "Et1= Eo + Eg + Ee;## total energy consumption\n",
+ "It= Et1/Et;\n",
+ "print'%s %.1f %s'%('oil energy index is ',Io,' Wh per tonne ')\n",
+ "print'%s %.1f %s'%('gas energy index is ',Ig,' Wh per tonne ')\n",
+ "print'%s %.1f %s'%('electricity energy index is ',Ie,' Wh per tonne')\n",
+ "print'%s %.1f %s'%('total energy index is ',It,' Wh per tonne ')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 1.3\n",
+ "\n",
+ "\n",
+ "Page No. 10\n",
+ "\n",
+ "\n",
+ "oil energy index is 5200.0 Wh per tonne \n",
+ "gas energy index is 1460.0 Wh per tonne \n",
+ "electricity energy index is 9950.0 Wh per tonne\n",
+ "total energy index is 16610.0 Wh per tonne \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "## Example 1.4\n",
+ "print('Example 1.4');\n",
+ "print('Page No. 10');\n",
+ "## Solution \n",
+ "\n",
+ "## Given\n",
+ "mc= 1.5*10**3;## coke consumption in tonnes\n",
+ "mg= 18.*10**3;## gas consumption in therms\n",
+ "me= 1.*10**9;## electricity consumption in Wh\n",
+ "Cc1= 72.;## cost of coke in Pound per tonne\n",
+ "Cg1= 0.20;## cost of gas in Pound per therm\n",
+ "Ce1= 2.25*10**-5 ;## cost of electricity in Pound per Wh\n",
+ "Cc= mc*Cc1;##in Pound\n",
+ "Cg= mg*Cg1;##in Pound\n",
+ "Ce= me*Ce1;##in Pound\n",
+ "Ct= Cc+Cg+Ce;##in Pound\n",
+ "print'%s %.1f %s'%('cost of coke consumption is ',Cc,' Pound ')\n",
+ "print'%s %.1f %s'%('cost of gas consumption is',Cg, 'Pound ')\n",
+ "print'%s %.1f %s'%('cost of electricity consumption is',Ce,' Pound ')\n",
+ "print'%s %.1f %s'%('total cost is ',Ct,' Pound ')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 1.4\n",
+ "Page No. 10\n",
+ "cost of coke consumption is 108000.0 Pound \n",
+ "cost of gas consumption is 3600.0 Pound \n",
+ "cost of electricity consumption is 22500.0 Pound \n",
+ "total cost is 134100.0 Pound \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "## Example 1.5\n",
+ "#page no 11\n",
+ "\n",
+ "## Solution \n",
+ "\n",
+ "## Given\n",
+ "Cc= 108.0*10**3;## cost of coke in Pound\n",
+ "Cg= 3.6*10**3;## cost of gas in Pound\n",
+ "Ce= 22.5*10**3;## cost of electricity in Pound\n",
+ "Ct= Cc+Cg+Ce;## total cost of fuel in Pound\n",
+ "E= 15*10**3;## total production in tonnes per year\n",
+ "Ic= Cc/E;##Pound per tonne\n",
+ "Ig= Cg/E;##Pound per tonne\n",
+ "Ie= Ce/E;##Pound per tonne\n",
+ "It= Ct/E;##Pound per tonne\n",
+ "print'%s %.1f %s'%(' coke cost index is',Ic,'Pound per tonne ')\n",
+ "print'%s %.1f %s'%(' gas cost index is',Ig,'Pound per tonne')\n",
+ "print'%s %.1f %s'%(' electricity cost index is ',Ie,' Pound per tonne')\n",
+ "print'%s %.1f %s'%(' total cost index is',It,' Pound per tonne')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " coke cost index is 7.2 Pound per tonne \n",
+ " gas cost index is 0.2 Pound per tonne\n",
+ " electricity cost index is 1.5 Pound per tonne\n",
+ " total cost index is 8.9 Pound per tonne\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "%matplotlib inline\n",
+ "## Example 1.6\n",
+ "##page No. 11\\n\\n');\n",
+ "## Solution \n",
+ "import matplotlib.pyplot as plt\n",
+ "\n",
+ "## Given\n",
+ "G1= 11.72*10**3;## hourly consumption of gas in therms\n",
+ "th= 34.13;## in Watts\n",
+ "G= G1*th;## hourly consumption of gas in Watts\n",
+ "O1= 4.32*10**9;## hourly consumption of oil in Joules\n",
+ "J= .278*10**-3;## in Watts\n",
+ "O= O1*J;## hourly consumption of oil in Watts\n",
+ "E= 500.*10**3;## hourly consumption of electricity in Watts\n",
+ "## Pie Chart Representation : one input argument x=[G O E]\n",
+ "labels = [r'gas', r'oil', r'electricity']\n",
+ "sizes = [G,O,E]\n",
+ "colors = ['yellowgreen', 'gold', 'lightskyblue']\n",
+ "patches, texts = plt.pie(sizes, colors=colors, startangle=90)\n",
+ "plt.legend(patches, labels, loc=\"best\")\n",
+ "# Set aspect ratio to be equal so that pie is drawn as a circle.\n",
+ "plt.axis('equal')\n",
+ "plt.tight_layout()\n",
+ "plt.show()\n",
+ "\n",
+ "print('The Pie chart is plotted in the figure');\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd0VNXaBvDnPWd6SQXSIJQgTRSQKiodBKQjCigqCCqi\nYEVRUSzIp2K7KvYCKCJcC2BBroUiRRAIvYhUCSEkIcn0dvb3RxBFUYFMsqe8v7WyYMHk5MlA5pm9\nzz77kBACjDHGWKRRZAdgjDHGTocLijHGWETigmKMMRaRuKAYY4xFJJ3sAIxFIyIiAGaU/wypJ37V\nA6gO4AiA4B8+AgBCQghNTlrGohMXFGMnEJEeQF0A9VFeNKmKihpGs5KpqJQOoLqmISUUEImKAhsI\nUBTSSIGmKCSEEPB7hclosXs0LaRooZAitBAJoSlC00hvNHt0RmORouiOCqEdDnjd+4N+368A8lFe\navknPooFL69lDMQ/ByyenBj51ADQEEADnYHON5qVFlpInOfzaDVsiTpvjVrGUGJ1vZqQqjckpOoM\ntkQdrIk62BJ1sCWrJ3+vN546Q75/uwvP3XoUjywr+MvX1TQN7tIiOAvz4Sg6CkdhPhyF+Sg7lhco\nyT/kLSs4rDkK88ldWmwM+r06vdFcpuqNB4N+76qA1/0jgFwA24UQgSp4mhiLCDyCYjGNiNIBtNcb\nqaPBqHTV6ameqiOqlmXwZdU367Lqmy3ptU2UVseI6jWN0BsUW2XkUBQFtuTqsCVXR/p5F/zxr/Qn\nPk4K+LxwFuUnFx7ck3xk16YLD2xeM+Lw9vXCUZhvsiQkH9A0bZ3PVbYKwEYAm4UQjsrIzJhsXFAs\nZhCRCuB8AO3NdrWHCIlLDCYlse75Fl/jtnZbTjObklXfDFuSDgBMctP+Pb3RhOTMOkjOrIPz2nUj\nADYA8HtcyP95a/0juzfVP7R17YCDW9b6iw/9YjHZEgoVVZfrKSv5BhBfAdjJ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1gbN4Y\naFAHMBklhz0LxSVA7s7yj9W5cP20FaHDR2G2mnE4GMJ3Tje+Rnkh5cvOyli4cEGxmEdEVgAtALRJ\nSUTnkIZmLjcyUpPgbZwD7cIGMDesC3392kC9mkBGdcBqqdqMQpSX0N5fgX2/lv+6cy88O/fCv+cg\ndA4XdDYLdvsCWONyYw2AXADbeA88Fsu4oFhcIiI9gHoAGgOon2jDhTodmvgDyPZ4kayq0FIS4UtL\nhZaZBiU7HYaa6TAm2ACzEbCY//qrXgcEgkAgcOLXP3z4A0BJGVBUAhQUI5hfCN/RQoSOHYcoLgEd\nOw6T0BCymJGnKNjrcmOr14/dAPYB2ANgnxBCk/mcMVbVuKAY+5MT12LZAaT/8UOvQ6bJiFSdCjsp\nsBJgJcAiAIsmYBYa9EQIEiFAhABwyoc/pKHQ60We14+jAAoBFP3hI48vjGXsVFxQjDHGIhJfPcIY\nYywicUExxhiLSFxQjDHGIhIXFGOMsYjEBcUYYywicUExxhiLSFxQjDHGItL/A+CD+0u++aAUAAAA\nAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x5d18050>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Pie chart is plotted in the figure\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "## Example 1.7\n",
+ "print('Example 1.7\\n\\n');\n",
+ "print('Page No. 12\\n\\n');\n",
+ "## Solution \n",
+ "import matplotlib.pyplot as plt\n",
+ "%matplotlib inline\n",
+ "## Given\n",
+ "O= 150.*10**3;## energy consumption in office heating in Watts\n",
+ "L= 120.*10**3;## energy consumption in lighting in Watts\n",
+ "B= 90.*10**3;## energy consumption in boiler house in Watts\n",
+ "P= 180.*10**3;## energy consumption in process in Watts\n",
+ "## Pie Chart Representation : one input argument x=[O L B P]\n",
+ "labels = [r'office heating', r'lighting', r'boiler heating',r'process']\n",
+ "sizes = [O,L ,B , P]\n",
+ "colors = ['yellowgreen', 'gold', 'lightskyblue', 'lightcoral']\n",
+ "patches, texts = plt.pie(sizes, colors=colors, startangle=90)\n",
+ "plt.legend(patches, labels, loc=\"best\")\n",
+ "# Set aspect ratio to be equal so that pie is drawn as a circle.\n",
+ "plt.axis('equal')\n",
+ "plt.tight_layout()\n",
+ "plt.show()\n",
+ "print('The Pie chart is plotted in the figure');\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 1.7\n",
+ "\n",
+ "\n",
+ "Page No. 12\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4FFXbBvD7zPZNLxCSkIQakN5FmqGIoSMaqSLKS/mA\nV4qigCCI+GJBQYpSpAgoCDaaNEGUjiC9k04SCOnb25zvj0AEAYVkk9ndPL/ryoWQMHtnJXvvnDlz\nDuOcgxBCCHE1gtQBCCGEkAehgiKEEOKSqKAIIYS4JCooQgghLkkudQBC3BljTAHAG4Ds9oc3Cn+u\ncgGIABwAbAAMnGYkEfJYGP3MEPIXxpgPgMq3PyIYQ4TaS1ZDkKEyAD/O4Ss6uLfDzrUOO9dwETK5\nktkEgYmMgVstolLggqCSyy2cc4icCw5RFOyiKKjkcpNCJtPLBCFfAHI5kGMXxUyTzXbTLoo3ACQA\nSASQyDnXSfg0EOISqKBIucMYkwOoDqAOY6ir9ZE15xz1rGYxjHPIfQLlpoCKCjE4TCUPrqzUBIYo\nBd8gBTReMqi9hcJfb38o1QyMsaJjL34rAfVyqjn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Fd1kv7\nt1n02TdlCpVmv0mXtxbAZrvFTCsmEpdHBUXcCue8AMAPtz/AGKvy/S48s+cInjNb0K5iIMTuMVDF\ntoUypgXg4yVt3rJis5iRfukkrh75xXFh32ZDZvwFtVLrfdasL/iRi45dAP60Wcy06BRxK1RQxK1x\nzh8WMdAAAAIaSURBVJMALAOwjDEmpGSg8ZJv0Xn9z+ijN6JBjUiYmtWDsmldaOpHA/WjgeAAiUOX\nkM1ixo2rZ5F28U+knDliSjlzxJabkaJVarxSHFbLVpvF9DOAA8b8HIPUWQkpCSoo4jFur2hw4vbH\nbMaY9kI8mlyIR/0ff0ELhRzN9EbU0Koh1q0BW4sG0DaqDUX9aOCJ6oBaJfE38Dc2swk56YnITUtC\n9vUEpF04YUw+fdiedyNFq9R4p4Lzo2Z9/n4Ufr9nTAW5NB2ceBQqKOKxbs9IO3D74wugcHag1YbI\ngydR//ApNPDzwVMiRwODEWEhwTBVDoEYVhFC5RCowkKgrBgIhAQBFYP++rWkReaw2WDS5cJUkAuT\nLh+mglzoc24i53oiz0y8aMxKvmbPu5GisBp1SoXGK1MmUyTbbZaLVqP+OP4qI3MJnx5CXB7N4iME\nAGNMBaAmgDAAFQGEqJQI06oRKQgIF0VUtNoQaLLAV6mAI8AXFn9fiHIZIJcDChkgkwFXEqG1yCoK\nQZE19KLDAS46uMNug1mXL5j1BTKrSa8U7XaZTKkyyuQKgyCT5TMm5HIuZlgMBWdFhyMBwJ2PdFrn\njpRnVFCEPIbb92f5o7DEAlA4CiG7/ascQDgANQoLRgTgAGADkA8g9/aHntayI+TfUUERQghxSbTd\nBiGEEJdEBUUIIcQlUUERQghxSVRQhBBCXBIVFCGEEJf0/+EwqnqnfhWSAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x5dfc050>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Pie chart is plotted in the figure\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex8-pg16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy\n",
+ "## Example 1.8\n",
+ "print('Example 1.8\\n\\n');\n",
+ "print('Page No. 16\\n\\n');\n",
+ "## given\n",
+ "\n",
+ "qunty= numpy.array([40, 10000, 400 ,90000])\n",
+ "unit_price= numpy.array([29 ,0.33, 0.18, 0.025])\n",
+ "cost= (unit_price * qunty)## in Pound\n",
+ "common_basis= ([310, 492 ,11.7 ,90])## in 10^6 Wh\n",
+ "per_unit_cost= (unit_price * qunty) / common_basis## Pound per 10^6 Wh\n",
+ "p= 150;## production in tonnes\n",
+ "EI= sum(common_basis)*10**6/150.\n",
+ "CI= sum(unit_price * qunty)/150.\n",
+ "print'%s %.2f %s'%('energy index is ',EI,' Wh per tonne \\n')\n",
+ "print'%s %.2f %s'%('cost index is ',CI,' Wh per tonne \\n')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 1.8\n",
+ "\n",
+ "\n",
+ "Page No. 16\n",
+ "\n",
+ "\n",
+ "energy index is 6024666.67 Wh per tonne \n",
+ "\n",
+ "cost index is 45.21 Wh per tonne \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9-pg"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "%matplotlib inline\n",
+ "## Example 1.9\n",
+ "import numpy \n",
+ "import matplotlib.pyplot as plt\n",
+ "print('Example 1.9\\n\\n');\n",
+ "print('Page No. 17\\n\\n');\n",
+ "##given\n",
+ "\n",
+ "p= numpy.array([50, 55, 65, 50, 95, 90, 85, 80, 60, 90, 70, 110, 60, 105]);## weakly production in tonnes\n",
+ "s= numpy.array([0.4, 0.35, 0.45, .31, 0.51,0.55, 0.45, 0.5, 0.4, 0.51, 0.4, 0.6, 0.45, 0.55]);## weakly steam consumption in 10^6 kg\n",
+ "plt.plot(p,s,'r*');\n",
+ "\n",
+ "plt.show()\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 1.9\n",
+ "\n",
+ "\n",
+ "Page No. 17\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEACAYAAAC08h1NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFDRJREFUeJzt3H+s3fV93/Hna3aZBkGNTLZko55IMrLhuw5BErdrhna3\nImxPbsnwJvDY2i0aoCg0rbA2bEtT7KlyBGpQpkWubltyVdVpmYIvlEghOGy7sbWtBTckQGMnl2XW\nrsGhEObMTbBm4vf+OMfuye31PfdeX98f5/N8SFec7/f7+Xy/n/f9mtf9nu/3c06qCklSO/7CUg9A\nkrS4DH5JaozBL0mNMfglqTEGvyQ1xuCXpMb0Df4kG5McTTKR5P4LtBlO8lySF5OMz6WvJGlxZaZ5\n/ElWAd8EbgZeBp4FtlbVkZ42bwf+G7Chqo4neUdVvT6bvpKkxdfvin898FJVHauqM8AjwK1T2vwz\nYH9VHQeoqtfn0FeStMj6Bf/VwGTP8vHuul7XAmuS/Nckh5P8izn0lSQtstV9ts/m+xx+DLgR+Fng\ncuB/JPmDWfaVJC2yfsH/MrC2Z3ktnSv3XpPA61X1JvBmkoPA9d12/fqSxD8QkjQPVZX59Ot3q+cw\ncG2Sa5JcBtwOPDGlze8Dfy/JqiSXAz8FfGOWfc8NfmB/PvGJTyz5GKzP+lqrbZDre/Lzn+dXrrxy\nPnl/3ozBX1VvAfcCT3XD/D9V1ZEk9yS5p9vmKPAl4Hng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n/wPRgIHGOg590wAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x2ea7c10>"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex10-pg19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 1.10\n",
+ "print('Example 1.10\\n\\n');\n",
+ "print('Page No. 19\\n\\n');\n",
+ "## given\n",
+ "import numpy\n",
+ "##Monthly Energy Usage\n",
+ "qunty = numpy.array([15*10**3, 4*10**3 ,90*10**3])\n",
+ "cost = numpy.array([4950 ,720 , 2250])## in Pound\n",
+ "common_basis1 = numpy.array([738 ,117 ,90])## in 10**6 Wh\n",
+ "common_basis= numpy.array([2655 ,421 ,324])## converted into 10**9 Joules\n",
+ "unit_cost = cost/common_basis1## in Pound per 10**6 Wh\n",
+ "p= 80;## production in tonnes\n",
+ "EI = ((sum(common_basis))/p)*10**9;\n",
+ "CI = sum(cost)/80.;\n",
+ "print'%s %.2e %s'%('Monthly energy index is ',EI,' J per tonne \\n')\n",
+ "print'%s %.2f %s'%('Monthly cost index is ',CI,' Pound per tonne \\n\\n')##Deviation in answer is due to calculation error for sum of cost in the book\n",
+ "\n",
+ "## Boiler House Energy Audit\n",
+ "qunty_b = ([15000 ,10000])\n",
+ "Com_basis_b_1 = ([2655 ,36])## in 10**9 J\n",
+ "Com_basis_b = ([738, 10])## in 10**6 Wh\n",
+ "Cost_b = ([4950, 250])## in Pound\n",
+ "b_output = 571.*10**6;## in Wh\n",
+ "EI_b = (b_output/(sum(Com_basis_b)*10**6));\n",
+ "CI_b = (sum(Cost_b)/b_output)*10**3;## Pound converted into p\n",
+ "print'%s %.2f %s'%('Energy index for boiler is ',EI_b,' \\n')\n",
+ "print'%s %.2e %s'%('Cost index for boiler is ',CI_b,' p per Wh\\n \\n')\n",
+ "\n",
+ "##Power House Energy Audit\n",
+ "P_gen = 200.*10**6;## Power generated in Wh\n",
+ "Com_basis_p_1 = ([14.4 ,2055 ,-1000])## in 10**9 J\n",
+ "Com_basis_p = ([4.0, 571, -278])## in 10**6 Wh\n",
+ "Cost_p = ([100 ,5196 ,-2530])## in Pound\n",
+ "CI_p = (sum(Cost_p)/P_gen)*10**3;## Pound converted into p\n",
+ "print'%s %.2e %s'%('Cost index for power house is ',CI_p,' p per Wh\\n\\n')##Deviation in answer is due to wrong calculation in the book\n",
+ "\n",
+ "##Space Heating Energy Audit\n",
+ "deg_days = 260.;## Number of degree-days\n",
+ "Com_basis_s_1 = ([36 ,100 ,105])## in 10**9 J\n",
+ "Com_basis_s = ([10.0 ,27.8 ,29.2])## in 10**6 Wh\n",
+ "Cost_s = ([250 ,253 ,179])## in Pound\n",
+ "EI_s = ((sum(Com_basis_s)*10**6)/deg_days)\n",
+ "CI_s = (sum(Cost_s)/deg_days)\n",
+ "print'%s %.2e %s'%('Energy index for space heating is ',EI_s,' Wh per degree-day\\n')\n",
+ "print'%s %.2f %s'%('Cost index for space heating is ',CI_s,' Pound per degree-day\\n\\n')\n",
+ "\n",
+ "##Process Energy Audit\n",
+ "T_pdt_output = 100.;## in tonne\n",
+ "Com_basis_pr_1 = ([216 ,720 ,810 ,316])## in 10**9 J\n",
+ "Com_basis_pr = ([60, 200 ,225 ,88])## in 10**6 Wh\n",
+ "Cost_pr = ([1500 ,2766 ,2047 ,540])## in Pound\n",
+ "EI_pr = ((sum(Com_basis_pr)*10**6)/T_pdt_output);\n",
+ "CI_pr = (sum(Cost_pr)/T_pdt_output);\n",
+ "print'%s %.2e %s'%('Energy index for Process Energy Audit is ',EI_pr,' Wh per tonne \\n')\n",
+ "print'%s %.2f %s'%('Cost index for Process Energy Audit is ',CI_pr,' Pound per tonne \\n')\n",
+ "#igoner the warnings"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 1.10\n",
+ "\n",
+ "\n",
+ "Page No. 19\n",
+ "\n",
+ "\n",
+ "Monthly energy index is -9.50e+08 J per tonne \n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Monthly cost index is 99.00 Pound per tonne \n",
+ "\n",
+ "\n",
+ "Energy index for boiler is 0.76 \n",
+ "\n",
+ "Cost index for boiler is 9.11e-03 p per Wh\n",
+ " \n",
+ "\n",
+ "Cost index for power house is 1.38e-02 p per Wh\n",
+ "\n",
+ "\n",
+ "Energy index for space heating is 2.58e+05 Wh per degree-day\n",
+ "\n",
+ "Cost index for space heating is 2.62 Pound per degree-day\n",
+ "\n",
+ "\n",
+ "Energy index for Process Energy Audit is 5.73e+06 Wh per tonne \n",
+ "\n",
+ "Cost index for Process Energy Audit is 68.53 Pound per tonne \n",
+ "\n"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stderr",
+ "text": [
+ "-c:14: RuntimeWarning: overflow encountered in long_scalars\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter10.ipynb b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter10.ipynb
new file mode 100644
index 00000000..8ccfeed5
--- /dev/null
+++ b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter10.ipynb
@@ -0,0 +1,152 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b792438c72450dcd6d934e54e6cfded0900e6de0fdddb69b36f4edb85bc5ee53"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter10-Air conditioning\n"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg293"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 10.1\n",
+ "print('Example 10.1\\n\\n');\n",
+ "print('Page No. 293\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "m = 1.;## mass flow rate of initial air mixture in kg/s\n",
+ "T = 23.5;## Initial temperature in degree celcius\n",
+ "m1 = 0.6;## Percentage of fresh air mixture\n",
+ "T1 = 5.;## Dry Bulb Temperature of fresh air in degree celcius\n",
+ "w1 = 0.005;## Humidity of fresh air at temperature T1 in kg/kg\n",
+ "m2 = 0.4;## Percentage of recirculated air mixture\n",
+ "T2 = 25.;## Dry Bulb Temperature of recirculated air in degree celcius\n",
+ "w2 = 0.015;## Humidity of recirculated air at temperature T2 in kg/kg\n",
+ "\n",
+ "##In air conditioning => m1*w1 + m2*w2 = m*w\n",
+ "w = (m1*w1 + m2*w2)/m;## in kg/kgs\n",
+ "print'%s %.2f %s'%('The humidity of the air mixture is ',w,' kg/kg \\n')\n",
+ "\n",
+ "##The specific enthalpy in J/kg can be calculated by the formula => h = (1.005*10^3*T) +(w*((2.50*10^6)+(1.86*10^3*T))); where the T is the temperature and w is the humidity at temperature T\n",
+ "h_f = (1.005*10**3*T1) +(w1*((2.50*10**6)+(1.86*10**3*T1)));## Specific enthalpy of fresh air in J/kg\n",
+ "h_r = (1.005*10**3*T2) +(w2*((2.50*10**6)+(1.86*10**3*T2)));## Specific enthalpy of recirculated air in J/kg\n",
+ "h_m = (1.005*10**3*T) +(w*((2.50*10**6)+(1.86*10**3*T)));## Specific enthalpy of final air mixture in J/kg\n",
+ "\n",
+ "h_t = (m1*h_f) + (m2*h_r);## Total enthalpy of initial air mixturein J/kg\n",
+ "Q = m*(h_m - h_t);## in Watts\n",
+ "print'%s %.2f %s'%('The load on the heater is ',Q,' W')\n",
+ "## Deviation in answer due to direct substitution and some approximation in answer in book\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 10.1\n",
+ "\n",
+ "\n",
+ "Page No. 293\n",
+ "\n",
+ "\n",
+ "The humidity of the air mixture is 0.01 kg/kg \n",
+ "\n",
+ "The load on the heater is 10638.99 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg298"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 10.2\n",
+ "print('Example 10.2\\n\\n');\n",
+ "print('Page No. 298\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "m1 = 0.75;## Percentage of fresh air mixture\n",
+ "T1 = 31.;## Dry Bulb Temperature of fresh air in degree celcius\n",
+ "w1 = 0.0140;## Humidity of fresh air at temperature T1 in kg/kg\n",
+ "m2 = 0.75;## Percentage of recirculated air mixture\n",
+ "T2 = 22.;## Dry Bulb Temperature of recirculated air in degree celcius\n",
+ "w2 = 0.0080;## Humidity of recirculated air at temperature T2 in kg/kg\n",
+ "m = 1.50;## mass flow rate of final air mixture in kg/s\n",
+ "T = 10.;## Dew Point temperature in degree celcius\n",
+ "\n",
+ "##In air conditioning => m1*w1 + m2*w2 = m*w\n",
+ "w = (m1*w1 + m2*w2)/m## in kg/kgs\n",
+ "print'%s %.2f %s'%('The humidity of the air mixture is ',w,' kg/kg \\n')\n",
+ "\n",
+ "\n",
+ "## from the psychrometric chart, at w = 0.011kg/kg, the dry bulb temperature is = 26.5 degree celcius also the humidity of saturated air at 10 degree celcius is 0.0075kg/kg\n",
+ "T_w = 26.5;## Dry Bulb temerature in degree celcius\n",
+ "w_10 = 0.0075;## humidity at temperatue T in kg/kg\n",
+ "\n",
+ "##the specific enthalpy in J/kg can be calculated by the formula => h = (1.005*10^3*T) +(w*((2.50*10^6)+(1.87*10^3*T))); where the T is the temperature and w is the humidity at temperature T\n",
+ "\n",
+ "h_a = (1.005*10**3*T_w) +(w*((2.50*10**6)+(1.88*10**3*T_w)));## Specific enthalpy of recirculated air in J/kg\n",
+ "h_s = (1.005*10**3*T) +(w_10*((2.50*10**6)+(1.87*10**3*T)));## Specific enthalpy of saturated air at 10 degree celcius in J/kg\n",
+ "\n",
+ "Q = m*(h_a - h_s);## in Watts\n",
+ "print'%s %.2f %s'%('The cooling load on the washer is ',Q,' W')\n",
+ "## Answer wrongly calculated in the book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 10.2\n",
+ "\n",
+ "\n",
+ "Page No. 298\n",
+ "\n",
+ "\n",
+ "The humidity of the air mixture is 0.01 kg/kg \n",
+ "\n",
+ "The cooling load on the washer is 38610.41 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter11.ipynb b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter11.ipynb
new file mode 100644
index 00000000..d15b3c74
--- /dev/null
+++ b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter11.ipynb
@@ -0,0 +1,605 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:210f77b61090b12d2cbd5d04df3d1b526a4fda08984b858283fabc1e0b3af1d2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter11-Heat recovery"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg308"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 11.1\n",
+ "print('Example 11.1\\n\\n');\n",
+ "print('Page No. 308\\n\\n');\n",
+ "\n",
+ "##given\n",
+ "V = 205.;## Flow rate in m^3\n",
+ "T1 = 74.;## in degree celcius\n",
+ "T2 = 10.;## in degree celcius\n",
+ "m = 1000.;## Steam in kg\n",
+ "p = 950.;## Density of steam in kg/m^3\n",
+ "C = 85.;## Cost in Pound per m^3\n",
+ "C_V = 43.3*10**6;## Calorific value in J/kg\n",
+ "Cp = 4.18*10**3;## heat capacity of water J/kg-K\n",
+ "h = 2.33*10**6;## Heat of the steam in J/kg\n",
+ "n = 0.65;## Average bolier efficiency\n",
+ "\n",
+ "S_cost = ((m*h*C)/(C_V*p*n));## Steam cost in Pound per 1000 kg\n",
+ "E_save = V*m*(T1 - T2)*Cp;## Energy saving in J per day\n",
+ "S_save = E_save/h;## in kg per day\n",
+ "print'%s %.2f %s'%('the steam saving is ',S_save,' kg per day \\n')\n",
+ "G_save = (S_cost*S_save)/m;## Pound per day\n",
+ "print'%s %.2f %s'%('The gross saving is ',G_save,' Pound per day per year')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 11.1\n",
+ "\n",
+ "\n",
+ "Page No. 308\n",
+ "\n",
+ "\n",
+ "the steam saving is 23537.17 kg per day \n",
+ "\n",
+ "The gross saving is 174.34 Pound per day per year\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg313"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy\n",
+ "#import tabulate\n",
+ "\n",
+ "## Example 11.2\n",
+ "print('Example 11.2\\n\\n');\n",
+ "print('Page No. 313\\n\\n');\n",
+ "\n",
+ "##given\n",
+ "p1 = 10.;##heat-sensitive liquor percen\n",
+ "p2 = 50.;##heat-sensitive liquor percent\n",
+ "m = 0.28;## mass rate in kg/s\n",
+ "t = 150.;## time in h per week\n",
+ "\n",
+ "## This question does not contain any calculation part in it.\n",
+ "I = ['8250', '1150', '14850', '16500'];##Installation cost in Pound\n",
+ "A = ['69300' ,'36800' ,'23600' ,'24600'];## Annual steam cost in Pound\n",
+ "A_S =['0' ,'32500' ,'45700' ,'44700'];## Annual savings in Pound\n",
+ "for column in zip(I, A, A_S):\n",
+ "\tprint ' '.join(column)\n",
+ "#from tabulate import tabulate\n",
+ "#print tabulate([['single effect', I[0], A[0],[A_S[0]]], ['double effect', I[1], A[1],[A_S[1]]] ,['double effect+vapour compression',I[2], A[2],[A_S[2]]] ,['Triple effect',I[3], A[3],[A_S[3]]]], headers=['Installation cost', 'Annual steam cost','Annual saving'])\n",
+ "\n",
+ "\n",
+ "\n",
+ "#print'%s %.2f %s'%(' The results enable the return on investment to be assessed by one of the standard economic procedures and the final selsction made.')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 11.2\n",
+ "\n",
+ "\n",
+ "Page No. 313\n",
+ "\n",
+ "\n",
+ "8250 69300 0\n",
+ "1150 36800 32500\n",
+ "14850 23600 45700\n",
+ "16500 24600 44700\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg314"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 11.3\n",
+ "print('Example 11.3\\n\\n');\n",
+ "print('Page No. 314\\n\\n');\n",
+ "\n",
+ "##given\n",
+ "f = 1.;## feed of sodium hydroxide in kg\n",
+ "v = 0.5;## produed vapour in kg\n",
+ "A = 30.;## in m^2\n",
+ "T1 = 95.;## Temperature of boiling solution in deg C\n",
+ "U = 3.*10**3;## heat transfer coefficent in W/m^2-K\n",
+ "m = 1.;## feed rate in kg/s\n",
+ "Tf = 70.;## Feed temperature in deg C\n",
+ "h_f = 260.*10**3.;## Enthalpy of feed in J/kg\n",
+ "h_b = 355.*10**3.;## Enthalpy of boiling solution in J/kg\n",
+ "h_v = 2.67*10**6.;## Enthalpy of vapour in J/kg\n",
+ "P1 = 0.6;## Pressure in vapour space in bar\n",
+ "\n",
+ "Q = (v*h_b) + (v*h_v) -(f*h_f);## in W\n",
+ "print'%s %.2f %s'%('The total energy requirement is ',Q,' W \\n')\n",
+ "\n",
+ "## As Q = A*U*dT\n",
+ "dT = Q/(U*A);## in degree celcius\n",
+ "T2 = dT + T1;## in degree celcius\n",
+ "##The temperature of the heating steam T2 corresponds to a pressure of 1.4 bar. Dry saturated steam at 1.4 bar has a total enthalpy of 2.69*10^6 J/kg\n",
+ "##Assuming an isentropic compression of the vapour from 0.6 bar to 1.4 bar, the outlet enthalpy is 2.84*10^6 J/kg\n",
+ "\n",
+ "## from steam table\n",
+ "P2 = 1.4## pressure in bar\n",
+ "h_s = 2.69*10**6;## enthalpy of dry saturated steam in J/kg\n",
+ "h_v2 = 2.84*10**6 ;## the outlet enthalpy of vapour in J/kg\n",
+ "\n",
+ "W = v*(h_v2 - h_s);## Work in W\n",
+ "T_E = W + 60.*10**3;## in W\n",
+ "print'%s %.2f %s'%('The total energy consumption is ',T_E,' W')\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 11.3\n",
+ "\n",
+ "\n",
+ "Page No. 314\n",
+ "\n",
+ "\n",
+ "The total energy requirement is 1252500.00 W \n",
+ "\n",
+ "The total energy consumption is 135000.00 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg316"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 11.4\n",
+ "print('Example 11.4\\n\\n');\n",
+ "print('Page No. 316\\n\\n');\n",
+ "\n",
+ "##given\n",
+ "Cm_S = 10000.;## Company saving in Pound per annum\n",
+ "S = Cm_S/12.;## Saving in Pound per months\n",
+ "Ca_C = 10500.;## Capital cost in Pound\n",
+ "Ins_C = 7500.;## Installation cost in Pound\n",
+ "T_C = Ca_C + Ins_C;## Total cost in Pound\n",
+ "T = T_C/S;## pay-back time in months\n",
+ "print'%s %.2f %s'%('The pay-back period was ',T,' months\\n')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 11.4\n",
+ "\n",
+ "\n",
+ "Page No. 316\n",
+ "\n",
+ "\n",
+ "The pay-back period was 21.60 months\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 11.5\n",
+ "print('Example 11.5\\n\\n');\n",
+ "print('Page No. 318\\n\\n');\n",
+ "\n",
+ "##From the heat balance:- \n",
+ "##Heat recovered in the boiler = heat gained by the air = heat lost by the flue gases\n",
+ "##=> Q = m_a*Cp_a*dT_a = m_f*Cp_f*dT_f\n",
+ "## As mass flow rate of air/flue gas is not given in the book\n",
+ "##Assuming m_a = m_f = 2.273 kg/s & Cp_a = 1*10^3 J/kg-K\n",
+ "\n",
+ "m_a = 2.273;## in kg/s\n",
+ "m_f = m_a;## in kg/s\n",
+ "Cp_a = 1.*10**3;## Specific heat capacity of air in J/kg-K\n",
+ "T1_a = 20.;## Entrance temperature of air in degree celcius\n",
+ "T2_a = 130.;## Exit temperature of air in degree celcius\n",
+ "dT_a = T2_a - T1_a;##in K\n",
+ "T1_f = 260.;## Entrance temperature of flue gases in degree celcius\n",
+ "T2_f = 155.;## Entrance temperature of flue gases in degree celcius\n",
+ "dT_f = T1_f - T2_f;##in K\n",
+ "\n",
+ "##From heat balance:- Q = m_a*Cp_a*dT_a = m_f*Cp_f*dT_f\n",
+ "Cp_f = ((m_a*Cp_a*dT_a)/(m_f*dT_f));## in J/kg-K\n",
+ "Q = m_f*Cp_f*dT_f;## in W\n",
+ "print'%s %.2e %s'%('The total heat recovered at full load if ',Q,' W')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 11.5\n",
+ "\n",
+ "\n",
+ "Page No. 318\n",
+ "\n",
+ "\n",
+ "The total heat recovered at full load if 2.50e+05 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 11.6\n",
+ "print('Example 11.6\\n\\n');\n",
+ "print('Page No. 320\\n\\n');\n",
+ "\n",
+ "C = 10000.;## Installation cost of the pump in Pound\n",
+ "S = 3500.;## Saving in Pound per annum \n",
+ "T = C/S;## in year\n",
+ "print'%s %.2f %s'%('The pay back time is ',T,' year\\n\\n')\n",
+ "\n",
+ "## This question further does not contain any calculation part in it.\n",
+ "print('In a heat-pump system the work input to drive the compressor,W, produces a heat absorption capacity,Q2,\\nand to balance the energy flow, a quantity of heat, Q1, must be dissipated.\\nThus the energy equation is\\n -> Q1 = W + Q2\\nand the coeffient of performance is \\nC.O.P. = Q1/W = Q1/(Q1 - Q2)\\n Consequently the C.O.P. is always greater than unity.\\nThe maximum theoretical value of the C.O.P. is that predicted by the Carnot in chapter 2,namely :\\n -> (C.O.P.)max = T1/(T1 - T2)')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 11.6\n",
+ "\n",
+ "\n",
+ "Page No. 320\n",
+ "\n",
+ "\n",
+ "The pay back time is 2.86 year\n",
+ "\n",
+ "\n",
+ "In a heat-pump system the work input to drive the compressor,W, produces a heat absorption capacity,Q2,\n",
+ "and to balance the energy flow, a quantity of heat, Q1, must be dissipated.\n",
+ "Thus the energy equation is\n",
+ " -> Q1 = W + Q2\n",
+ "and the coeffient of performance is \n",
+ "C.O.P. = Q1/W = Q1/(Q1 - Q2)\n",
+ " Consequently the C.O.P. is always greater than unity.\n",
+ "The maximum theoretical value of the C.O.P. is that predicted by the Carnot in chapter 2,namely :\n",
+ " -> (C.O.P.)max = T1/(T1 - T2)\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 11.7\n",
+ "print('Example 11.7\\n\\n');\n",
+ "print('Page No. 320\\n\\n');\n",
+ "\n",
+ "##given\n",
+ "T1 = 40.;## in degree \n",
+ "T2 = 0.;## in degree celcius\n",
+ "##As from carnot cycle, C.O.P = (T1/(T1 - T2)), where temperature are in degree celcius\n",
+ "C_O_P1 = ((T1+273.)/((T1+273.) - (T2+273.)));\n",
+ "print'%s %.2f %s'%('C.O.P. is ',C_O_P1,' \\n')\n",
+ "\n",
+ "## A secondary fluid as hot water at 60 deg C is used\n",
+ "T3 = 60;## Temperature of hot water in degree celcius\n",
+ "C_O_P2 = ((T3+273.)/((T3+273.) - (T2+273.)));\n",
+ "print'%s %.2f %s'%('C.O.P. when secondary fluid is used is ',C_O_P2,' \\n')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 11.7\n",
+ "\n",
+ "\n",
+ "Page No. 320\n",
+ "\n",
+ "\n",
+ "C.O.P. is 7.83 \n",
+ "\n",
+ "C.O.P. when secondary fluid is used is 5.55 \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex8-pg323"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 11.8\n",
+ "print('Example 11.8\\n\\n');\n",
+ "print('Page No. 323\\n\\n');\n",
+ "\n",
+ "## This question does not contain any calculation part in it.\n",
+ "print('No calculation is required as not in shown in book')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 11.8\n",
+ "\n",
+ "\n",
+ "Page No. 323\n",
+ "\n",
+ "\n",
+ "No calculation is required as not in shown in book\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9-pg324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 11.9\n",
+ "print('Example 11.9\\n\\n');\n",
+ "print('Page No. 324\\n\\n');\n",
+ "\n",
+ "##given\n",
+ "T1 = 273.;## Measured temperature In degree celcius\n",
+ "P = 1.;## Measured pressure in bar\n",
+ "T2 = 290.;## initial temperature In degree celcius\n",
+ "T3 = 1000.;## Final temperature In degree celcius\n",
+ "T4 = 1150.;## Entering tempearture In degree celcius\n",
+ "v1 = 7.;## in m^3/s\n",
+ "v2 = 8.;## in m^s\n",
+ "M = 22.7;## in kmol/m^3\n",
+ "d = 0.1;## Diameter in m\n",
+ "A = 0.01;## Surface area per regenerator channel in m^2\n",
+ "u = 1.;## maximum velocity in m/s\n",
+ "Cp_1 = 34.*10**3;## Heat capacity at T4 temperature in J/kmol-K\n",
+ "Cp_2 = 32.*10**3;## Heat capacity at outlet temperature in J/kmol-K\n",
+ "Cp_m = 30.*10**3;## Heat capacity at mean temperature in J/kmol-K\n",
+ "\n",
+ "m_c = v1/M;## Molal air flow rate in kmol/s\n",
+ "H_c1 = Cp_m*(T3 - T1);## Enthalpy of air at 1000K in J/mol\n",
+ "H_c2 = Cp_m*(T2 - T1);## Enthalpy of air at 290 in J/mol\n",
+ "Q = (m_c*(H_c1 - H_c2))/10**6;## in 10^6 W\n",
+ "print'%s %.2f %s'%('The heat transfer, Q is ',Q,' *10^6 W \\n')\n",
+ "\n",
+ "m_F = v2/M;## Molal flow rate of flue gas in kmol/s\n",
+ "dH = (Q/m_F)*10**6;## enthaply chnage of the flue gas in J/kmol\n",
+ "H_F1 = Cp_1*(T4 - T1);## Enthalpy of the flue gas at 1150 K in J/kmol\n",
+ "H_F2 =H_F1 - dH;## Enthalpy at the exit temperature in J/kmol\n",
+ "T_F2 = (H_F2/Cp_2) + T1;## in K\n",
+ "print'%s %.2f %s'%('The exit tempearture of the flue gas is ',T_F2,' K \\n')\n",
+ "S_R = v2/u;##cross sectional area of the regenerator in m^2\n",
+ "N = S_R/A;\n",
+ "print'%s %.2f %s'%('The number of channels required is ',N,'\\n')\n",
+ "print('Consequently for this regenerator a square layout could be achieved with 40 channels arranged horizontally and 20 channels vertically.')\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 11.9\n",
+ "\n",
+ "\n",
+ "Page No. 324\n",
+ "\n",
+ "\n",
+ "The heat transfer, Q is 6.57 *10^6 W \n",
+ "\n",
+ "The exit tempearture of the flue gas is 622.39 K \n",
+ "\n",
+ "The number of channels required is 800.00 \n",
+ "\n",
+ "Consequently for this regenerator a square layout could be achieved with 40 channels arranged horizontally and 20 channels vertically.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex10-pg324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 11.10\n",
+ "print('Example 11.10\\n\\n');\n",
+ "print('Page No. 324\\n\\n');\n",
+ "\n",
+ "##given\n",
+ "Pr = 100.;## Production in tonnes per day\n",
+ "p = 10.2;## percentage of sulphur dioxide\n",
+ "T1 = 900.;##Burner temperature in degree celcius\n",
+ "T2 = 425.;##Required temperature in degree celcius\n",
+ "P = 10.;## Dry saturated steam pressure in bar\n",
+ "T = 120.;## Dry saturated steam temperature in degree celcius\n",
+ "##At the given Temperature =T and Pressure P, the required heat Qr to geberate steam from feed water is calculated from the steam table.\n",
+ "Qr = 2.27*10**6;## in J/kg\n",
+ "\n",
+ "Sp_1 = 1.14*10**3;## Specific heat of the inlet gas in J/kmol-K\n",
+ "Sp_2 = 1.03*10**3;## Specific heat of the outlet gas in J/kmol-K\n",
+ "pr_rate = 1.2;## production rate in kmol/s\n",
+ "\n",
+ "##In the calculation part, the book has taken percentage of sulphur dioxide p = 10.6 in the place of p = 10.2, so there exists a deviation in answer\n",
+ "Q_in = ((Pr*pr_rate)/p) * Sp_1 * T1;## Heat content of the inlet gas in J/s\n",
+ "Q_out = ((Pr*pr_rate)/p) * Sp_2 * T2;## Heat content of the outlet gas in J/s\n",
+ "Qa = Q_in - Q_out;## Heat available for steam\n",
+ "S = Qa/Qr;## in kg/s\n",
+ "print'%s %.2f %s'%('The steam production is ',S,' kg/s')##Deviation in answer is due to some wrong value substition as discussed above\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 11.10\n",
+ "\n",
+ "\n",
+ "Page No. 324\n",
+ "\n",
+ "\n",
+ "The steam production is 3.05 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter2.ipynb b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter2.ipynb
new file mode 100644
index 00000000..e5457101
--- /dev/null
+++ b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter2.ipynb
@@ -0,0 +1,383 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2d67a927dfb7c5a82b8b43df0005a44016d56976a1ce99d5ed2f07fea412a913"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter2-Energy Sources\n"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 2.1\n",
+ "print('Example 2.1\\n\\n');\n",
+ "print('Page No. 44\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "C= 35000.;## cost of boiler\n",
+ "C_grant=.25;## Capital grant available from goverment\n",
+ "E= -(C-(C_grant*C));## Net expenditure\n",
+ "Fs= 15250.;## Fuel Saving\n",
+ "r_i = 0.15;## interest\n",
+ "r_t = 0.55;## tax\n",
+ "\n",
+ "a = ([0, E ,Fs ,0 ,E+Fs, r_i*(E+Fs) ,0 ])\n",
+ "bal_1 = a[4]+a[5]-a[6]## Total Balance after 1st year\n",
+ "\n",
+ "c_all = 0.55;## capital allowance in 2nd year\n",
+ "C_bal= (bal_1+0+Fs+(-(c_all*E)));## Cash Balance after 2nd year\n",
+ "b = ([bal_1 ,0 ,Fs ,-(c_all*E) ,C_bal, r_i*C_bal, r_t*(Fs+(r_i*C_bal))]);\n",
+ "bal_2 = b[4]+b[5]-b[6]##Total Balance after 2nd year\n",
+ "\n",
+ "c = ([bal_2, 0 ,Fs ,0 ,bal_2+Fs ,r_i*(bal_2+Fs) ,r_t*(Fs+(r_i*(bal_2+Fs)))])\n",
+ "bal_3= c[4]+c[5]-c[6]## Total Balance after 3rd year\n",
+ "\n",
+ "if(bal_2>0):\n",
+ "\tprint('Pay back period is of two year')\n",
+ "else:\n",
+ " print('Pay back period is of three year')\n",
+ "\n",
+ "\n",
+ "print'%s %.2f %s'%('Total saving at the end of second year is ',bal_2,' Pound\\n');\n",
+ "print'%s %.2f %s'%('Total saving at the end of third year is ',bal_3,' Pound\\n');\n",
+ "## Deviation in answer due to direct substitution\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 2.1\n",
+ "\n",
+ "\n",
+ "Page No. 44\n",
+ "\n",
+ "\n",
+ "Pay back period is of two year\n",
+ "Total saving at the end of second year is 9800.03 Pound\n",
+ "\n",
+ "Total saving at the end of third year is 18353.41 Pound\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 2.2\n",
+ "print('Example 2.2');\n",
+ "print('Page No. 45');\n",
+ "\n",
+ "## given\n",
+ "C= 35000.;## cost of boiler\n",
+ "C_grant=0.;## Capital grant available from goverment\n",
+ "E= -(C-(C_grant*C));## Net expenditure\n",
+ "Fs= 15250.;## Fuel Saving\n",
+ "r_i = 0.15;## interest\n",
+ "r_t = 0.55;## tax\n",
+ "\n",
+ "a = ([0, E ,Fs ,0, E+Fs, r_i*(E+Fs) ,0 ])\n",
+ "bal_1 = a[4]+a[5]-a[6]## Total Balance after 1st year\n",
+ "\n",
+ "c_all = 0.55;## capital allowance in 2nd year\n",
+ "C_bal= (bal_1+0+Fs+(-(c_all*E)));## Cash Balance after 2nd year\n",
+ "b = ([bal_1 ,0 ,Fs ,-(c_all*E), C_bal ,r_i*C_bal, r_t*(Fs+(r_i*C_bal))]);\n",
+ "bal_2 = b[4]+b[5]-b[6]##Total Balance after 2nd year\n",
+ "\n",
+ "c = ([bal_2, 0 ,Fs ,0 ,bal_2+Fs, r_i*(bal_2+Fs) ,r_t*(Fs+(r_i*(bal_2+Fs)))])\n",
+ "bal_3= c[4]+c[5]-c[6]## Total Balance after 3rd year\n",
+ "\n",
+ "if(bal_2>0):\n",
+ "\tprint('pay back period is of two year')\n",
+ "else:\n",
+ "\tprint('pay back period is of three year')\n",
+ "\n",
+ "\n",
+ "print'%s %.2f %s'%('Total saving at the end of second year is ',bal_2,' Pound');\n",
+ "print'%s %.2f %s'%('Total saving at the end of third year is ',bal_3,' Pound');\n",
+ "## Deviation in answer due to direct substitution\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 2.2\n",
+ "Page No. 45\n",
+ "pay back period is of two year\n",
+ "Total saving at the end of second year is 4195.66 Pound\n",
+ "Total saving at the end of third year is 12370.74 Pound\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 2.3\n",
+ "print('Example 2.3');\n",
+ "print('Page No. 46');\n",
+ "\n",
+ "## given\n",
+ "F= 350*10**3.;## fuel oils in gallons\n",
+ "Ci= 5000.;## cost of insulation of tanks\n",
+ "\n",
+ "As= 7500.;##Annual Saving in Pound\n",
+ "\n",
+ "if(As> Ci):\n",
+ "\tprint(\"The investment has a pay-back period of less than 1 year\");\n",
+ "else:\n",
+ "\tprint(\"The investment has not a pay-back period of less than 1 year\");\n",
+ " \n",
+ "## Note- Since here pack back period is less than 1 year and the company is in profit so they can go with this fuel oil,\n",
+ "## although it can be noted that there are more problems handling heavy fuels oils \n",
+ "##and that the pay-back increases considerably the smaller the installation.\n",
+ "##So the company can changeover from oil to coal as a fuel.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 2.3\n",
+ "Page No. 46\n",
+ "The investment has a pay-back period of less than 1 year\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 2.4\n",
+ "print('Example 2.4');\n",
+ "print('Page No. 47');\n",
+ "\n",
+ "## given\n",
+ "F1= 500.*10**3;## fuel oil in gallons\n",
+ "F2= 500.*10**3;## coal in gallons in Pound\n",
+ "C1= 165.*10**3;## cost of oil per year in Pound\n",
+ "C2= 92.*10**3;## cost of an equivalent of coal in Pound\n",
+ "Ce= 100.*10**3;## capital cost of extra handling eqiupment\n",
+ "\n",
+ "Cm= (Ce*0.2);## Maintenance , interest costs per year\n",
+ "As= C1-C2;## Annual Saving in Pound\n",
+ "print'%s %.2f %s'%('Annual Saving is ',As,' Pound')\n",
+ "\n",
+ "if((2*As)> Ce):\n",
+ "\tprint(\"Replacing an obsolete boiler plant is considerable\");\n",
+ "else:\n",
+ "\tprint(\"Replacing an obsolete boiler plant is not considerble\");\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 2.4\n",
+ "Page No. 47\n",
+ "Annual Saving is 73000.00 Pound\n",
+ "Replacing an obsolete boiler plant is considerable\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 2.5\n",
+ "print('Example 2.5\\n\\n');\n",
+ "print('Page No. 49\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "F= 10.*10**3;## fuel oils in gallons\n",
+ "Cs= 2200.;## cost of maintaining tanks per year in Pound\n",
+ "Ci= 1850.;## cost of insulation of pipe in Pound\n",
+ "\n",
+ "As= (Cs*.85);##company saving is 85 per cent to the cost\n",
+ "print'%s %.2f %s'%('Annual Saving on heating is ',As,' Pound\\n')\n",
+ "\n",
+ "\n",
+ "if(As> Ci):\n",
+ "\tprint(\"The investment has a pay-back period of less than 1 year\");\n",
+ "else:\n",
+ "\tprint(\"The investment has not a pay-back period of less than 1 year\");\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 2.5\n",
+ "\n",
+ "\n",
+ "Page No. 49\n",
+ "\n",
+ "\n",
+ "Annual Saving on heating is 1870.00 Pound\n",
+ "\n",
+ "The investment has a pay-back period of less than 1 year\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 2.6\n",
+ "print('Example 2.6\\n\\n');\n",
+ "print('Page No. 52\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "P1= 50.;## Dry saturated steam pressure in bar\n",
+ "P2= 0.5;## condenser pressure in bar\n",
+ "\n",
+ "##By using the steam tables saturation temperature is obtained at given pressures\n",
+ "T1= 537.##The saturation temperatue in K at 50 bar\n",
+ "T2= 306.##The saturation temperatue in K at 0.5 bar\n",
+ "\n",
+ "## For Carnot Cycle\n",
+ "n=(1.-(T2/T1))*100.;\n",
+ "print'%s %.2f %s'%('Efficiency percentage of Carnot Cycle is ',n,' \\n')\n",
+ "\n",
+ "\n",
+ "## For Rankine Cycle\n",
+ "## By usins steam tables, the total heat and the sensibles heat and other remaining parameter has been calculated\n",
+ "h1= 2794.*10**3;##the total heat in dry steam at 50 bar in J/kg\n",
+ "d= 0.655;## dryness fraction \n",
+ "h2= 1725.*10**3;## the entropy at state 2 in J/kg\n",
+ "h3= 138.*10**3;## the sensible heat at 0.5 bar in J/kg\n",
+ "Vf= 1.03*10**-3;## volume of fluid im m^3,calculated from steam table\n",
+ "W= (Vf*(P1-P2))*10**5;## pump work in J/kg\n",
+ "E=(((h1-h2)-(W))/((h1-h3)-(W)))*100.;\n",
+ "print'%s %.2f %s'%('Efficiency percentage of Rankine Cycle is ',E,' \\n')\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 2.6\n",
+ "\n",
+ "\n",
+ "Page No. 52\n",
+ "\n",
+ "\n",
+ "Efficiency percentage of Carnot Cycle is 43.02 \n",
+ "\n",
+ "Efficiency percentage of Rankine Cycle is 40.13 \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter3.ipynb b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter3.ipynb
new file mode 100644
index 00000000..5f437f52
--- /dev/null
+++ b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter3.ipynb
@@ -0,0 +1,1102 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e9577d4ad5de7558637cd37bfc3341b40c44e984438cd0af3886acebfa5d3168"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter3-Economics\n"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "## Example 3.1\n",
+ "print('Example 3.1');\n",
+ "print('Page No. 58');\n",
+ "\n",
+ "## given\n",
+ "P = 10000;## Principal Amount\n",
+ "i = 0.15;## Interest Rate\n",
+ "n = 4;##years\n",
+ "I = P*i*n;## Simple Interest\n",
+ "Ts= P+I;## The total repayment\n",
+ "print'%s %.2f %s'%('The total repayment is',Ts,' Euro')\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.1\n",
+ "Page No. 58\n",
+ "The total repayment is 16000.00 Euro\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "## Example 3.2\n",
+ "print('Example 3.2');\n",
+ "print('Page No. 58');\n",
+ "\n",
+ "## given\n",
+ "P = 10000;## Principal Amount in Pound\n",
+ "i = 0.15;## Interest Rate\n",
+ "n = 4;##years\n",
+ "Tc = P*(1+i)**n;\n",
+ "print'%s %.2f %s'%('The total repayment after adding compond interest is ',Tc,' Pound')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.2\n",
+ "Page No. 58\n",
+ "The total repayment after adding compond interest is 17490.06 Pound\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "## Example 3.3\n",
+ "print('Example 3.3');\n",
+ "##Page No. 59\n",
+ "\n",
+ "## given\n",
+ "P = 60000;##/ Principal Amount in Pound\n",
+ "i = 0.18;## Interest Rate\n",
+ "n = 10;##years\n",
+ "R = P*((i*(1+i)**n)/((1+i)**n -1));##Rate of Capital Recovery\n",
+ "print'%s %.2f %s'%('The annual investment required is',R,'Pound')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.3\n",
+ "The annual investment required is 13350.88 Pound\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 3.4\n",
+ "print('Example 3.4\\n\\n');\n",
+ "print('Page No. 61\\n\\n');\n",
+ "import numpy\n",
+ "## given\n",
+ "P = 100000.;##/ Principal Amount of boiler plant in Pound\n",
+ "n = 10.;## service life in years\n",
+ "S = 0.;##Zero Salvage value\n",
+ "nT = (n*(n+1.)/2.);##sum of years\n",
+ "z0=numpy.linspace(0,9)\n",
+ "leng=len(z0)\n",
+ "d_=numpy.zeros(leng)\n",
+ "for i in range (0,9):\n",
+ " d_[i+1] = ((P-S)/nT)*(n-i);\n",
+ "\n",
+ "print'%s %.2f %s'%('The Annual depreciation for first year is ',d_[1],' Pound\\n')\n",
+ "print'%s %.2f %s'%('The Annual depreciation for second year is ',d_[2],' Pound\\n\\n')\n",
+ "print'%s %.2f %s'%('The Annual depreciation for third year is ',d_[3],' Pound\\n')\n",
+ "print'%s %.2f %s'%('The Annual depreciation for ten year is ',d_[9]/2,' Pound\\n')\n",
+ "## Deviation in answer due to some .approximation of values in the book\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.4\n",
+ "\n",
+ "\n",
+ "Page No. 61\n",
+ "\n",
+ "\n",
+ "The Annual depreciation for first year is 18181.82 Pound\n",
+ "\n",
+ "The Annual depreciation for second year is 16363.64 Pound\n",
+ "\n",
+ "\n",
+ "The Annual depreciation for third year is 14545.45 Pound\n",
+ "\n",
+ "The Annual depreciation for ten year is 1818.18 Pound\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 3.5\n",
+ "print('Example 3.5\\n\\n');\n",
+ "print('Page No. 62\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "P = 40000.;##/ Principal Amount of boiler plant in Pound\n",
+ "nT = 10.;## service life in years\n",
+ "S = 4000.;## Salvage value\n",
+ "n = 6.;## years after which Asset value has to be calculated\n",
+ "\n",
+ "##(a) Straight line method\n",
+ "d = ((P-S)/nT);## Depreciation\n",
+ "Aa = (d*(nT-n)) + S;\n",
+ "print'%s %.2f %s'%('The Asset value at the end of six years using Straight line method is ',Aa,' Pound\\n')\n",
+ "\n",
+ "## (b) Declining balance technique\n",
+ "f = 1.-(S/P)**(1./nT);## Fixed fraction of the residual asset\n",
+ "Ab = P*(1.-f)**n;\n",
+ "print'%s %.2f %s'%('The Asset value at the end of six years using Declining balance technique is ',Ab,' Pound\\n\\n')\n",
+ "\n",
+ "## (c) Sum of the years digit\n",
+ "sum_nT = (nT*(nT+1.)/2.);##sum of 10 years\n",
+ "sum_n = 45.;##sum after 6 years\n",
+ "dc = ((sum_n/sum_nT)*(P-S));## Depreciation after 6 years\n",
+ "Ac = P-dc;\n",
+ "print'%s %.2f %s'%('The Asset value at the end of six years using Sum of the years digit is ',Ac,' Pound\\n')## Deviation in answer due to direct substitution\n",
+ "\n",
+ "##(d) Sinking Fund Method\n",
+ "r_i = 0.06;## Rate of interest\n",
+ "Ad = P-((P-S)*(((1.+r_i)**n-1.)/((1.+r_i)**nT-1.)));\n",
+ "print'%s %.2f %s'%('The Asset value at the end of six years using Sinking Fund Method is ',Ad,' Pound\\n')## Deviation in answer due to direct substitution\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.5\n",
+ "\n",
+ "\n",
+ "Page No. 62\n",
+ "\n",
+ "\n",
+ "The Asset value at the end of six years using Straight line method is 18400.00 Pound\n",
+ "\n",
+ "The Asset value at the end of six years using Declining balance technique is 10047.55 Pound\n",
+ "\n",
+ "\n",
+ "The Asset value at the end of six years using Sum of the years digit is 10545.45 Pound\n",
+ "\n",
+ "The Asset value at the end of six years using Sinking Fund Method is 20948.69 Pound\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 3.6\n",
+ "print('Example 3.6\\n\\n');\n",
+ "print('Page No. 67\\n\\n');\n",
+ "import numpy\n",
+ "## given\n",
+ "P = 9000.;## Capital Cost in Pound\n",
+ "n = 5.;## Project lifetime\n",
+ "Less_dep = 8000.;## Less Depreciation\n",
+ "\n",
+ "##For Project A\n",
+ "d1 = numpy.array([[4500 ,3750 ,3000 ,1500 ,750 ]])## Saving in every year (before depreciation)\n",
+ "dT1 = sum(d1)\n",
+ "Net_S1 = dT1- Less_dep;## Total Net Saving\n",
+ "Avg1 = Net_S1/n;## Average net annual saving\n",
+ "R_R1 = (Avg1/P)*100.;\n",
+ "\n",
+ "##For Project \n",
+ "d2 =numpy.array([[750 ,2250 ,4500 ,4500 ,1500 ]])## Saving in every year (before depreciation)\n",
+ "dT2 = sum(d2)\n",
+ "Net_S2 = dT2- Less_dep;## Total Net Saving\n",
+ "Avg2 = Net_S2/n;## Average net annual saving\n",
+ "R_R2 = (Avg2/P)*100.;\n",
+ "print(R_R1)\n",
+ "print(R_R2)\n",
+ "#print'%s %.2f %s'%('The percentage of Rate of Return on original investment for Project A is ',R_R1,'')\n",
+ "#print'%s %.2f %s'%('The percentage of Rate of Return on original investment for Project B is ',R_R2,'')\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.6\n",
+ "\n",
+ "\n",
+ "Page No. 67\n",
+ "\n",
+ "\n",
+ "[ -7.77777778 -9.44444444 -11.11111111 -14.44444444 -16.11111111]"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "[-16.11111111 -12.77777778 -7.77777778 -7.77777778 -14.44444444]\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 3.7\n",
+ "print('Example 3.7\\n\\n');\n",
+ "print('Page No. 68\\n\\n');\n",
+ "import numpy\n",
+ "## given\n",
+ "Pc = 10000.;## Capital cost for project C in Pound\n",
+ "Pd = 10000.;## Capital cost for project d in Pound\n",
+ "nc = 3.;## pay back period for C\n",
+ "nd = 3.;## pay back period for D\n",
+ "Ca = numpy.array([[4500, 3500, 2000, 2000 ,1000]]);## Annual Cash flow for C in Pound\n",
+ "Cc = numpy.array([[4500 ,8000, 10000, 12000 ,13000]])## Cumulative Cash flow for C in Pound\n",
+ "Da = numpy.array([[1500, 4000, 4500, 2200 ,1800 ,1000]]);## Annual Cash flow for D in Pound\n",
+ "Dc = numpy.array([[1500, 5500, 10000, 12200 ,14000, 15000]])## Cumulative Cash flow for D in Pound\n",
+ "Ac = 13000-Pc;## in Pound\n",
+ "Ad = 15000-Pd;## in Pound\n",
+ "print'%s %.2f %s'%('Additional amount from C after the pay back time is ',Ac,' Pound\\n')\n",
+ "print'%s %.2f %s'%('Additional amount from D after the pay back time is ',Ad,' Pound\\n')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.7\n",
+ "\n",
+ "\n",
+ "Page No. 68\n",
+ "\n",
+ "\n",
+ "Additional amount from C after the pay back time is 3000.00 Pound\n",
+ "\n",
+ "Additional amount from D after the pay back time is 5000.00 Pound\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex8-pg69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 3.8\n",
+ "print('Example 3.8\\n\\n');\n",
+ "print('Page No. 69\\n\\n');\n",
+ "import numpy\n",
+ "##Refer figure 3.6\n",
+ "## given\n",
+ "n = 5.;##years\n",
+ "C = 80000.;## COst of the project in Pound\n",
+ "S = 0.;## Zero Salvage Value\n",
+ "A_E = ([[10000 ,20000 ,30000 ,40000 ,50000]])## Annual Net cash flow for project E in Pound\n",
+ "C_E = ([[10000 ,30000 ,60000, 100000, 150000]])## Cummulative Net cash flow for project E in Pound\n",
+ "A_F = ([[50000 ,40000, 30000, 20000 ,10000]])## Annual Net cash flow for project F in Pound\n",
+ "C_F = ([[50000 ,90000 ,120000, 140000 ,150000]])## Cummulative Net cash flow for project F in Pound\n",
+ "\n",
+ "##From the figure 3.6 (intercept of x-axis)\n",
+ "P_F = 1.75;## in years\n",
+ "P_E = 3.5;## in years\n",
+ "print'%s %.2f %s'%('The pay-back time of project F is ',P_F,'')\n",
+ "print'%s %.2f %s'%('The pay-back time of project E is ',P_E,'')\n",
+ "\n",
+ "print('As the pay-back time is less for project F,\\nProject F would always be choosen in practice\\nsince prediction of savings in the early years are more reliable than long-term predictions.')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.8\n",
+ "\n",
+ "\n",
+ "Page No. 69\n",
+ "\n",
+ "\n",
+ "The pay-back time of project F is 1.75 \n",
+ "The pay-back time of project E is 3.50 \n",
+ "As the pay-back time is less for project F,\n",
+ "Project F would always be choosen in practice\n",
+ "since prediction of savings in the early years are more reliable than long-term predictions.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9-pg70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 3.9\n",
+ "print('Example 3.9\\n\\n');\n",
+ "print('Page No. 70\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "P = 1.;##/ Principal Amount in Pound\n",
+ "\n",
+ "r_i = 0.1;## Compound interest rate\n",
+ "for i in range(1,4):\n",
+ " c = P*(1.+r_i)**i;\n",
+ "\n",
+ "print'%s %.2f %s %.2f %s '%('compound intrest after year ',i,'' is 'equal to ',c,' Pound\\n')\n",
+ "\n",
+ "new_P = 1000.*P;##in Pound\n",
+ "new_c = 1000.*c;## in Pound\n",
+ "print'%s %.2f %s'%('The new amount at the compound interest after fourth year is ',new_c,' Pound\\n\\n')\n",
+ "\n",
+ "## Discount rate\n",
+ "r_d = 0.10;## Discount rate\n",
+ "for j in range (1,4):\n",
+ " d = P*(1./(1.+r_d)**j);\n",
+ " print'%s %.2f %s %.2f %s '%('The amount receivable at discount in year ',j,'' is '',d,' Pound\\n')\n",
+ "\n",
+ "\n",
+ "new_P1 = new_c;## in Pound\n",
+ "new_d = new_P1*d;## in Pound\n",
+ "print'%s %.2f %s'%('The new amount receivable at discount in fourth year is ',new_d,' Pound\\n')\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.9\n",
+ "\n",
+ "\n",
+ "Page No. 70\n",
+ "\n",
+ "\n",
+ "compound intrest after year 3.00 False 1.33 Pound\n",
+ " \n",
+ "The new amount at the compound interest after fourth year is 1331.00 Pound\n",
+ "\n",
+ "\n",
+ "The amount receivable at discount in year 1.00 True 0.91 Pound\n",
+ " \n",
+ "The amount receivable at discount in year 2.00 True 0.83 Pound\n",
+ " \n",
+ "The amount receivable at discount in year 3.00 True 0.75 Pound\n",
+ " \n",
+ "The new amount receivable at discount in fourth year is 1000.00 Pound\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex10-pg71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 3.10\n",
+ "print('Example 3.10\\n\\n');\n",
+ "print('Page No. 71\\n\\n');\n",
+ "import numpy\n",
+ "## given\n",
+ "C = 2500.;## Cost of the project\n",
+ "P = 1000.;## Cash in flow\n",
+ "r_r = 0.12;## Rate of return \n",
+ "S = 0.;## Zero salvage value\n",
+ "n = 4.;##years\n",
+ "z0=numpy.linspace(1,4)\n",
+ "leng=len(z0)\n",
+ "d_=numpy.zeros(leng)\n",
+ "for j in range (1,4):\n",
+ "\td_[j] = P*(1./(1.+r_r)**j);\n",
+ "\n",
+ "\n",
+ "\n",
+ "P_v = d_[0]+d_[1]+d_[2]+d_[3];##Present value of cash inflow\n",
+ "N = P_v-C;\n",
+ "print'%s %.2f %s'%('Net present value is',math.ceil(N),'Pound\\n')\n",
+ "\n",
+ "if(P_v>C):\n",
+ "\tprint('The project may be undertaken')\n",
+ "else:\n",
+ "\tprint('The project may not be undertaken')\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.10\n",
+ "\n",
+ "\n",
+ "Page No. 71\n",
+ "\n",
+ "\n",
+ "Net present value is -98.00 Pound\n",
+ "\n",
+ "The project may not be undertaken\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex11-pg72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 3.11\n",
+ "print('Example 3.11\\n\\n');\n",
+ "print('Page No. 72\\n\\n');\n",
+ "import numpy\n",
+ "## given\n",
+ "Cash_out = 80000.;## Present value of cash outflow for both projects E and F\n",
+ "r_r = .2;## Rate of return\n",
+ "n = 5.;## years\n",
+ "\n",
+ "d = numpy.array([0.833, 0.694 ,0.579, 0.482 ,0.402])## Discount Factor for 20% of rate of return for 5 years\n",
+ "Ce = numpy.array([10000 ,20000, 30000 ,40000 ,50000])## Cash flow for project E in Pound\n",
+ "Pe = numpy.array([8330, 13880, 17370 ,19280 ,20100])## Present value for project E in Pound\n",
+ "\n",
+ "Cf = numpy.array([50000 ,40000, 30000, 20000, 10000])## Cash flow for project F in Pound\n",
+ "Pf = numpy.array([41650 ,27760, 17370, 9640, 4020])## Present value for project F in Pound\n",
+ "\n",
+ "Cash_inE = sum(Pe)##Present value of cash inflow in Pound\n",
+ "Cash_inF = sum(Pf)##Present value of cash inflow in Pound\n",
+ "\n",
+ "Net_E = Cash_inE - Cash_out;## net present value for project E in Pound\n",
+ "Net_F = Cash_inF - Cash_out;## net present value for project F in Pound\n",
+ "\n",
+ "if (Net_E>Net_F):\n",
+ "\tprint('Project E is selected based on NPV')\n",
+ "else:\n",
+ " print('Project F is selected based on NPV')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.11\n",
+ "\n",
+ "\n",
+ "Page No. 72\n",
+ "\n",
+ "\n",
+ "Project F is selected based on NPV\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex12-pg72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 3.12\n",
+ "print('Example 3.12\\n\\n');\n",
+ "print('Page No. 72\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "Cash_inG = 43000.;## Present value of cash inflow for project G in Pound\n",
+ "Cash_outG = 40000.;## Present value of cash outflow for project G in Pound\n",
+ "Net_G = Cash_inG - Cash_outG;## Net present value for G in Pound\n",
+ "PI_G = (Cash_inG/Cash_outG);## Profitability index for G\n",
+ "\n",
+ "Cash_inH = 23000.;## Present value of cash inflow for project H in Pound\n",
+ "Cash_outH = 20000.;## Present value of cash outflow for project H in Pound\n",
+ "Net_H = Cash_inH - Cash_outH;## Net present value for H in Pound\n",
+ "PI_H = (Cash_inH/Cash_outH);## Profitability index for H\n",
+ "\n",
+ "##The higher the profitability index the more desirable is the project.\n",
+ "if (PI_G>PI_H):\n",
+ "\tprint('Project G is more attractive than Project H')\n",
+ "else:\n",
+ " print('Project H is more attractive than Project G')\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.12\n",
+ "\n",
+ "\n",
+ "Page No. 72\n",
+ "\n",
+ "\n",
+ "Project H is more attractive than Project G\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex13-pg73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 3.13\n",
+ "print('Example 3.13\\n\\n');\n",
+ "print('Page No. 73\\n\\n');\n",
+ "import numpy\n",
+ "## given\n",
+ "Cash_out = 80000.;## Present value of cash outflow for project F in Pound\n",
+ "n = 5.;## years\n",
+ "Cash_in= numpy.array([50000, 40000 ,30000, 20000 ,10000])## Cashn in \\flow for project F in Pound\n",
+ "NPV = 0.;##At the end of 5 years\n",
+ "\n",
+ "##Let the unknown rate for project F be rm.\n",
+ "\n",
+ "##The amount standing at the end of 5 years is\\n => 0 = 80000*(1+rm)^5 - 50000*(1+rm)^4 - 40000*(1+rm)^3 - 30000*(1+rm)^2 - 20000*(1+rm)^1 - 10000\n",
+ "## By taking (1+rm) = x\\n =>8*x^5 - 5*x^4 - 4*x^3 - 3*x^2 - 2*x - 1 = 0\\n\\n')\n",
+ "\n",
+ "from sympy import Eq, Symbol, solve\n",
+ "\n",
+ "x = Symbol('x')\n",
+ "eqn= Eq(((x**5*8.0) - 5*x**4 - 4*x**3 - 3*x**2 - 2*x ), -1.0);\n",
+ "\n",
+ "xres=1.3449924 \n",
+ "rm=(xres-1)*100\n",
+ "rm = (xres - 1)*100;\n",
+ "print'%s %.2f %s'%('The value of rm for project F is ',math.ceil(rm),' per cent\\n')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.13\n",
+ "\n",
+ "\n",
+ "Page No. 73\n",
+ "\n",
+ "\n",
+ "The value of rm for project F is 35.00 per cent\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex14-pg74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 3.14\n",
+ "print('Example 3.14\\n\\n');\n",
+ "print('Page No. 74\\n\\n');\n",
+ "import numpy\n",
+ "import matplotlib\n",
+ "from matplotlib import pyplot\n",
+ "from sklearn import linear_model\n",
+ "\n",
+ "## given\n",
+ "n = 5.;##years\n",
+ "C = 80000.;## Cost of the project in Pound\n",
+ "Cash_in = numpy.array([10000, 20000 ,30000 ,40000 ,50000])## Cash inflow in Pound\n",
+ "r_d1 = 15.;## Discount factor of 15%\n",
+ "r_d2 = 18. ;## Discount factor of 18%\n",
+ "r_d3 = 20.;## Discount factor of 20%\n",
+ "\n",
+ "##At discount of 15%\n",
+ "df_1 = numpy.array([0.870, 0.756, 0.658 ,0.572 ,0.497])## Discount factor for every year\n",
+ "PV_1 = numpy.array([8700 ,15120, 19740 ,22880 ,24850])## Present value\n",
+ "Net_1 = sum (PV_1);## net present value\n",
+ "\n",
+ "\n",
+ "##At discount of 18%\n",
+ "df_2 = numpy.array([0.847, 0.718, 0.609 ,0.516 ,0.437])## Discount factor for every year\n",
+ "PV_2 = numpy.array([8470, 14360, 18270 ,20640, 21850])## Present value\n",
+ "Net_2 = sum (PV_2);## net present value\n",
+ "\n",
+ "\n",
+ "##At discount of 20%\n",
+ "df_3 = numpy.array([0.833 ,0.694 ,0.579 ,0.482, 0.402])## Discount factor for every year\n",
+ "PV_3 = numpy.array([8330 ,13880 ,17370, 19280, 20100])## Present value\n",
+ "Net_3 = sum (PV_3);## net present value\n",
+ "\n",
+ "## f = N.P.V. cash inflow - N.P.V. cash outflow\n",
+ "##(1) By Numerical Method\n",
+ "ff = 2.*((sum (PV_2) - C)/(sum (PV_2) - sum(PV_3)));## in percentage\n",
+ "f = 18. + ff;\n",
+ "print'%s %.2f %s'%('the internal rate of return in percentage is ',f,' \\n\\n')## Deviation in answer due to direct substitution\n",
+ "\n",
+ "##(2) By Graphical Interpolation\n",
+ "f_1 = (sum (PV_1) - C)/10**3;##At discount factor of 15%\n",
+ "f_2 = (sum (PV_2) - C)/10**3;##At discount factor of 18%\n",
+ "f_3 = (sum (PV_3) - C)/10**3;##At discount factor of 20%\n",
+ "%matplotlib inline\n",
+ "x = numpy.array([f_1 ,f_2 ,f_3]);\n",
+ "y = numpy.array([r_d1, r_d2, r_d3]);\n",
+ "import matplotlib.pyplot as plt\n",
+ "pyplot.title(\"Flow convergence loss in a conical nozzle\")\n",
+ "pyplot.xlabel(\"Discount factor against f\")\n",
+ "pyplot.ylabel(\"f ( *10^3 Pound)\")\n",
+ "pyplot.plot(x,y)\n",
+ "pyplot.show()\n",
+ "import matplotlib.pyplot as plt\n",
+ "x = numpy.array([f_1 ,f_2 ,f_3]);\n",
+ "y = numpy.array([r_d1, r_d2, r_d3]);\n",
+ "pyplot.scatter(x,y)\n",
+ "\n",
+ "pyplot.title(\"Discount factor against f\")\n",
+ "pyplot.xlabel(\"f ( *10^3 Pound)\")\n",
+ "pyplot.ylabel(\"Discount factor(%)\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.14\n",
+ "\n",
+ "\n",
+ "Page No. 74\n",
+ "\n",
+ "\n",
+ "the internal rate of return in percentage is 19.55 \n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEZCAYAAACervI0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xe8FNX5x/HPQ0dAir2gaFSMBmsEVJRr+SVqEhSNUWND\no2J5qcGoMUYFMdbYoz8TESyooGL5adQoGq89NlSwSyygFAvYG8Lz++Oci8Oye+/ee3d3tnzfr9e+\nmJ3ZmXl27zJnzznznGPujoiI1J42aQcgIiLpUAEgIlKjVACIiNQoFQAiIjVKBYCISI1SASAiUqNU\nABSRmfUxs0Vmps+5jJlZvZn9rkTn+pOZjSnFuYrBzF4ys21beYxRZja+UDG1hpm9Y2Y7pB1HWtql\nHUA1MLN3gBWBhXGVA+ulFpA0l8dH8U/kfnYpzlMs7v6TQhymAMcolJL97cuRfpkWhgO/dPdu8bGs\nu89JO6i0mZl+YEg2lnYAEqgAKCEzW9XM7jSzj83sTTM7JK7vZGZfm1mv+PzPZrb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mHOfuHacd\nnAocT5hFDmBrwmRCuPt9LDnpx7Fm9gLwJGG02XWzHPdtd58al58jFAoQCtYb4zDNC7O8j0yVOKy2\nNIMKACkoM1sbWOjuHybXu/u5wO8Iv1wfN7O+Dbs0dcjE8vf88J3tlPG6bxPLC8l/qPOGTrARwGx3\n34gwtHHHxPZcMebqQLOMbV/meN3fgEvjOYcTPpvkMZY8qFkdodAc6O6bEJpmMj8HyP1Z/AK4nDDv\nwDNxClOpYSoApGBiJ/DfCRe2zG0/cveX3f084BnCr+bJwEFm1jm+pqeH0S/nx5FJAfYntP1DaNr5\naVz+dZ5hLYhTFDZlWWBOXD6A0ERFthjj+s/jPgCvA33ipCgNMT+c5zlnxeVhifWPA7+J5/sZ0DPx\n+vnu/o2ZrU+Ytzkv8c6sNdy9njDPQHega3wfWTvJpfqpAJDW6txwGyjhYvkvdz89bkvOqHRsnO3t\nReA74N7YvHEn8KyZPQ/8Ib72QOCv8bUbAaPj+vOBI8xsCrBc4tiNzdx0JTDVzMY38T7+FzgwNq/0\nBb6AxU0w2WK8Bvh7jAXgIOCW2JzzPaEgbIgtl1Fxn2eBDxOvPR34mZlNIxR0cwgX6n8B7czsFUJn\n9JM5jpt5TicUaONjfFOAS2JhexcwNP4Nt86yn24TrGK6DVSkzMTJhBa6+8J4j/7lHqaJFCmoVKeE\nFJGs1gBuNrM2hNrSoSnHI1VKNQARkRqlPgARkRqlAkBEpEapABARqVEqAEREapQKABGRGqUCQESk\nRv0/gTaB3ubmZv8AAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x2fc0e30>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": [
+ "<matplotlib.text.Text at 0xda4f2d0>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEZCAYAAACervI0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAL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+ "<matplotlib.figure.Figure at 0xda65b70>"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15-pg77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 3.15\n",
+ "print('Example 3.15\\n\\n');\n",
+ "print('Page No. 77\\n\\n');\n",
+ "import numpy\n",
+ "## given\n",
+ "i_t = numpy.array([20, 40 ,60, 80, 100]);## Insulation thickness in mm\n",
+ "f_c = numpy.array([2.2, 3.5, 4.8, 6.1 ,7.4]);## Fixed costs in (10^3 Pound / year)\n",
+ "h_c = numpy.array([10.2, 6.5, 5.2, 4.6, 4.2]);## Heat costs in (10^3 Pound / year)\n",
+ "t_c = numpy.array([12.4, 10 ,10 ,10.7 ,11.6]);## Total costs in (10^3 Pound / year)\n",
+ "\n",
+ "##(a) Graphical solution\n",
+ "##Refer figure 3.8\n",
+ "C_T = 9750.;## Minimum total cost in Pound\n",
+ "t = 47.;## Corresponding thickness of insulation in mm\n",
+ "print'%s %.2f %s'%('The most economic thickness of insulation is ',t,' mm \\n')\n",
+ "\n",
+ "##(b) Numerical solution\n",
+ "## The cost due to heat losses,C1, and the fixed costs,C2, vary according to the equations;-\n",
+ "## C1 = (a/x) + b and C2 = (c*x) + d\n",
+ "## Substituting the values of C1 and C2 together with the corresponding insulation thickness values , the following equations are obtained :-\n",
+ "## C1 = (150*10^3/x) + 2.7*10^3 and C2 = (65*x) + 0.9*10^3\n",
+ "##And to obtain the total costs\n",
+ "##CT = C1 + C2 = (150*10^3/x) + (65*x) + 3.6*10^3\n",
+ "## Differentiate to optimise, and put dCT/dx equal to zero\n",
+ "##dCT/dx =-((150*10^3)/x^2) + 65 = 0\n",
+ "\n",
+ "##Let y = dCT/dx\n",
+ "\n",
+ "from sympy import Eq, Symbol, solve\n",
+ "\n",
+ "x = Symbol('x')\n",
+ "eqn= Eq(-((150*10**3)/x**2), 48.0);\n",
+ "print(eqn)\n",
+ "x=48.3\n",
+ "print'%s %.2f %s'%('The optimum thickness of insulation is ',x,'mm \\n')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.15\n",
+ "\n",
+ "\n",
+ "Page No. 77\n",
+ "\n",
+ "\n",
+ "The most economic thickness of insulation is 47.00 mm \n",
+ "\n",
+ "-150000/x**2 == 48.0\n",
+ "The optimum thickness of insulation is 48.30 mm \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex16-pg79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 3.16\n",
+ "print('Example 3.16\\n\\n');\n",
+ "print('Page No. 79\\n\\n');\n",
+ "import numpy\n",
+ "## given\n",
+ "tb = numpy.array([36*10**3, 72*10**3, 144*10**3, 216*10**3]); ##operating time in s\n",
+ "U = numpy.array([971 ,863 ,727 ,636]);## Mean overall heat transfer rate in W/m^2-K\n",
+ "A = 50.;## area in m^2\n",
+ "dT = 25.;## temperature difference in degree celcius\n",
+ "ts = 54.*10**3;## Time in sec (h converted to sec)\n",
+ "##As Q = U*A*dT\n",
+ "z0=numpy.linspace(1,1,4)\n",
+ "leng=len(z0)\n",
+ "Q=numpy.zeros(leng)\n",
+ "Q_a=numpy.zeros(leng)\n",
+ "for i in range (1,4):\n",
+ " Q[i] = (U[i]*A*dT)/10**6;\n",
+ " Q_a[i] = ((tb[i]*Q[i]*10**6)/(tb[i] + ts))/10**6;\n",
+ " print'%s %.2f %s'%('the average heat transfer rate is ',Q_a[i],' *10^6 W \\n')\n",
+ "\n",
+ "##Refer figure 3.9\n",
+ "print('\\n')\n",
+ "Q_max = 0.67*10**6;## Maximum value of Q in W\n",
+ "T_opt = 33.;## Time in h\n",
+ "print'%s %.2f %s'%('The maximum value of Q obtained is ',Q_max,' W \\n')\n",
+ "print'%s %.2f %s'%('The most econnomic opertaing time for the heat exchanger to run is',T_opt,' h ')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.16\n",
+ "\n",
+ "\n",
+ "Page No. 79\n",
+ "\n",
+ "\n",
+ "the average heat transfer rate is 0.62 *10^6 W \n",
+ "\n",
+ "the average heat transfer rate is 0.66 *10^6 W \n",
+ "\n",
+ "the average heat transfer rate is 0.64 *10^6 W \n",
+ "\n",
+ "\n",
+ "\n",
+ "The maximum value of Q obtained is 670000.00 W \n",
+ "\n",
+ "The most econnomic opertaing time for the heat exchanger to run is 33.00 h \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex17-pg80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 3.17\n",
+ "print('Example 3.17\\n\\n');\n",
+ "print('Page No. 80\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "## C_T = 7*x + (40000/(x*y)) + 6*y + 10\n",
+ "##Differentiating C_T with respect to x and y:-\n",
+ "##dC_T/dx = 7 - (40000/(x^2*y))\n",
+ "##dC_T/dy = - (40000/(x*y^2)) + 6\n",
+ "\n",
+ "##For optimum conditions :- dC_T/dx = dC_T/dy = 0\n",
+ "##dC_T/dx = 0 => 7 - (40000/(x^2*y)) = 0\n",
+ "##=> y = 40000/(7*x^2).......(1)\n",
+ "##dC_T/dy = 0 =>- (40000/(y^2*x)) +6 = 0\n",
+ "##=> y = (40000/(6*x))^0.5.......(2)\n",
+ "\n",
+ "##From equation (1) and (2) \n",
+ "##=> 40000/(7*x^2) - (40000/(6*x))^0.5 = 0\n",
+ "from sympy import Eq, Symbol, solve\n",
+ "\n",
+ "x = Symbol('x')\n",
+ "eqn= Eq( 40000./(7*x**2) - (40000./(6.*x))**0.5,20);\n",
+ "\n",
+ "\n",
+ "x=16.982634 \n",
+ "##from equation (1)\n",
+ "y = 40000./(7*x**2);\n",
+ "\n",
+ "##a = d^2C_T/dx^2 = 80000/(x^3*y)\n",
+ "##b = d^2C_T/dy^2 = 80000/(x*y^3)\n",
+ "a = 80000./(x**3*y);\n",
+ "b = 80000./(x*y**3);\n",
+ "if a > 0:\n",
+ "\tif b>0:\n",
+ " C= 7.*x + (40000./(x*y)) + 6.*y + 10.;## in Pound\n",
+ "##The optimum conditions must occur at a point of minimum cost- C_T_m\n",
+ "print'%s %.2f %s'%('The minimum cost is ',C,' Pound')\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 3.17\n",
+ "\n",
+ "\n",
+ "Page No. 80\n",
+ "\n",
+ "\n",
+ "The minimum cost is 366.64 Pound\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter4.ipynb b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter4.ipynb
new file mode 100644
index 00000000..cf4bbac2
--- /dev/null
+++ b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter4.ipynb
@@ -0,0 +1,584 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b8e850534ebe1c09700aafa043440ac4a2221bb7e166ce915a3d59a2e23cca27"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter4-Heat transfer theory\n"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 4.1\n",
+ "print('Example 4.1\\n\\n');\n",
+ "print('Page No. 88\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "K = 45.## Thermal Conductivity in W/m-K\n",
+ "L = 5.*10**-3;## thickness in metre\n",
+ "T1 = 100.;## in degree celcius\n",
+ "T2 = 99.9;## in degree celcius\n",
+ "A = 1.;## Area in m^2\n",
+ "\n",
+ "##By Fourier law of conduction\n",
+ "Q = ((K*A*(T1-T2))/L);## in Watts\n",
+ "print'%s %.2f %s'%('The rate of conductive heat transfer is ',Q,' W \\n')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 4.1\n",
+ "\n",
+ "\n",
+ "Page No. 88\n",
+ "\n",
+ "\n",
+ "The rate of conductive heat transfer is 900.00 W \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 4.2\n",
+ "print('Example 4.2\\n\\n');\n",
+ "print('Page No. 89\\n\\n');\n",
+ "## given\n",
+ "K1 = 45.## Thermal Conductivity of mild steel in W/m-K\n",
+ "K2 = 0.040## Thermal Conductivity of insulaton in W/m-K\n",
+ "L1 = 5.*10**-3;## thickness of mild steel in metre\n",
+ "L2 = 50.*10**-3;## thickness of insulation in metre\n",
+ "T1 = 100.;## in degree celcius\n",
+ "T2 = 25.;## in degree celcius\n",
+ "A = 1.;## Area in m^2\n",
+ "\n",
+ "##By Fourier law of conduction\n",
+ "Q = (((T1-T2)/((L1/(K1*A))+(L2/(K2*A)))))## in Watts\n",
+ "print'%s %.2f %s'%('The rate of conductive heat transfer is ',Q,' W \\n')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 4.2\n",
+ "\n",
+ "\n",
+ "Page No. 89\n",
+ "\n",
+ "\n",
+ "The rate of conductive heat transfer is 59.99 W \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 4.3\n",
+ "print('Example 4.3\\n\\n');\n",
+ "print('Page No. 90\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "K1 = 26.;## Thermal Conductivity of stainless steel in W/m-K\n",
+ "K2 = 0.038;## Thermal Conductivity of insulaton in W/m-K\n",
+ "L1 = 3.*10**-3;## thickness of stainless steel in metre\n",
+ "L2 = 40.*10**-3;## thickness of insulation in metre\n",
+ "T1 = 105.;## in degree celcius\n",
+ "T2 = 25.;## in degree celcius\n",
+ "L = 15.;## Length of pipe in metre\n",
+ "d1 = 50.*10**-3;## Internal diameter of pipe in metre\n",
+ "d2 = 56.*10**-3;## External diameter of pipe in metre\n",
+ "\n",
+ "r1 = d1/2.;## in metre\n",
+ "r2 = d2/2.;## in metre\n",
+ "\n",
+ "rm_p = ((r2-r1)/math.log(r2/r1));## logarithmic mean radius of pipe in m\n",
+ "rm_i = (((r2+L2)-r2)/math.log((r2+L2)/r2));## logarithmic mean radius of insulation in m\n",
+ "\n",
+ "##By Fourier law of conduction\n",
+ "Q = (((T1-T2)/((L1/(K1*2.*math.pi*rm_p))+(L2/(K2*2.*math.pi*rm_i)))));## in W/m\n",
+ "Q_L = Q*L;\n",
+ "print'%s %.2f %s'%('The rate of conductive heat transfer per 15 m length of pie is ',Q_L,'W')## Deviation in answer due to direct substitution\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 4.3\n",
+ "\n",
+ "\n",
+ "Page No. 90\n",
+ "\n",
+ "\n",
+ "The rate of conductive heat transfer per 15 m length of pie is 322.84 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 4.4\n",
+ "print('Example 4.4\\n\\n');\n",
+ "print('Page No. 93\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "dH = 12.*10**-3;## Outer diameter of pipe in m\n",
+ "dC = 10.*10**-3;## Inner diameter of pipe in m\n",
+ "L = 1.*10**-3;## im m\n",
+ "h_H = 10.*10**3;## Heat Transfer Coefficient on vapour side in W/m^2-K\n",
+ "h_C = 4.5*10**3;## Heat Transfer Coefficient on vapour side in W/m^2-K\n",
+ "K = 26.;## Thermal Conductivity of metal in W/m-K\n",
+ "dM = (dH + dC)/2.;## mean diameter in m\n",
+ "h_Hf = 6.*10**3;## Fouling factor for hot side\n",
+ "h_Cf = 6.*10**3;## Fouling factor for cold side\n",
+ "\n",
+ "U = (1./h_H)+((L*dH)/(K*dM))+(dH/(dC*h_C));\n",
+ "Uh = (1./U);## in W/m^2-K\n",
+ "print'%s %.2f %s'%('The original heat transfer coefficient is ',Uh,' W/sq.m K \\n' )## Deviation in answer due to direct substitution\n",
+ "\n",
+ "u = (1./h_H)+(1./h_Hf)+((L*dH)/(K*dM))+(dH/(dC*h_C))+(dH/(dC*h_Cf));\n",
+ "Uf = (1./u);## in W/m^2-K\n",
+ "print'%s %.2f %s'%('The final heat transfer coefficient due to fouling is ',math.ceil(Uf),' W/m^2-K \\n')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 4.4\n",
+ "\n",
+ "\n",
+ "Page No. 93\n",
+ "\n",
+ "\n",
+ "The original heat transfer coefficient is 2447.23 W/sq.m K \n",
+ "\n",
+ "The final heat transfer coefficient due to fouling is 1290.00 W/m^2-K \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg95"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 4.5\n",
+ "print('Example 4.5\\n\\n');\n",
+ "print('Page No. 95\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "m_h = 1.05;## Mass flow rate of hot liquid in kg/s\n",
+ "Thi = 130.;## Inlet Temperature of hot liquid in degree celcius\n",
+ "Tho = 30.;## Outlet Temperature of hot fluid in degree celcius\n",
+ "Cph = 2.45*10**3;## Specific heat capacity of hot liquid in J/kg-K\n",
+ "\n",
+ "m_c = 4.10;## Mass flow rate of cold liquid in kg/s\n",
+ "Tci = 20.;## Inlet Temperature of cold liquid in degree celcius\n",
+ "Cpc = 4.18*10**3;## Specific heat capacity of cold liquid in J/kg-K\n",
+ "\n",
+ "A = 6.8;## Area of heat exchanger in m^2\n",
+ "Q = m_h*Cph*(Thi-Tho);## in Watts\n",
+ "\n",
+ "##From heat balance\n",
+ "## m_c*Cpc*(Tci-Tco)= m_h*Cph*(Thi-Tho)= UAlTm = Q\n",
+ "Tco = ((Q/(m_c*Cpc))+Tci);\n",
+ "print'%s %.2f %s'%(' The Outlet Temperature of cold fluid is ',Tco,' degree celcius\\n')\n",
+ "## As counter flow heat exchanger \n",
+ "T1 = Thi-Tco;\n",
+ "T2 = Tho-Tci;\n",
+ "Tm = ((T1-T2)/math.log(T1/T2));\n",
+ "\n",
+ "U = (Q/(A*Tm));\n",
+ "print'%s %.2f %s'%('The overall heat transfer coefficient is ',U,' W/sq.m K \\n')## Deviation in answer due to direct substitution\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 4.5\n",
+ "\n",
+ "\n",
+ "Page No. 95\n",
+ "\n",
+ "\n",
+ " The Outlet Temperature of cold fluid is 35.01 degree celcius\n",
+ "\n",
+ "The overall heat transfer coefficient is 1002.06 W/sq.m K \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 4.6\n",
+ "print('Example 4.6\\n\\n');\n",
+ "print('Page No. 98\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "v = 1.23;## velocity in m/s\n",
+ "d = 25.*10**-3;## diameter in m\n",
+ "p = 980.;## density in kg/m^3\n",
+ "u = 0.502*10**-3;## viscosity in Ns/m^2\n",
+ "Cp = 3.76*10**3;## Specific heat capacity in J/kg-K\n",
+ "K = 0.532;## Thermal conductivity in W/m-K\n",
+ "\n",
+ "Re = (d*v*p)/u;##Reynolds Number\n",
+ "Pr = (Cp*u)/K;## Prandtl Number\n",
+ "Re_d = (Re)**0.8;\n",
+ "Pr_d = (Pr)**0.4;\n",
+ "\n",
+ "## By Dittus-Boelter Equation\n",
+ "##Nu = 0.0232 * Re^0.8 Pr^0.4 = (hd)/K\n",
+ "Nu = 0.0232 * Re_d * Pr_d;## Nusselt Number\n",
+ "h = (Nu*K)/d;##W/m^2-K\n",
+ "print'%s %.2f %s'%('The film heat transfer coefficient is ',h,' W/sq.m K\\n')## Deviation in answer due to direct substitution\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 4.6\n",
+ "\n",
+ "\n",
+ "Page No. 98\n",
+ "\n",
+ "\n",
+ "The film heat transfer coefficient is 5446.85 W/sq.m K\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 4.7\n",
+ "print('Example 4.7\\n\\n');\n",
+ "print('Page No. 99\\n\\n');\n",
+ "\n",
+ "## (a) without insulation\n",
+ "## given\n",
+ "d_a = 0.150;## Diameter of pipe in m\n",
+ "T1_a = 60.;## Surface temperature in degree celcius\n",
+ "T2_a = 10.;## Ambient temperature in degree celcius\n",
+ "\n",
+ "##For laminar flow in pipe,h= 1.41*((T1-T2)/d)^0.25\n",
+ "h_a = 1.41*((T1_a-T2_a)/d_a)**0.25;##W/m^2-K\n",
+ "A_a = math.pi * d_a;## Surface Area per unit length in m^2/m\n",
+ "Q_a = h_a*A_a*(T1_a - T2_a);## in W/m\n",
+ "print'%s %.2f %s'%('The heat loss per unit length without insulation is ',math.ceil(Q_a),' W/m \\n')\n",
+ "\n",
+ "## (b) with insulation\n",
+ "## given\n",
+ "d_b = 0.200;## Diameter of pipe in m\n",
+ "T1_b = 20.;## Surface temperature in degree celcius\n",
+ "T2_b = 10.;## Ambient temperature in degree celcius\n",
+ "\n",
+ "##For laminar flow in pipe,h= 1.41*((T1-T2)/d)^0.25\n",
+ "h_b = 1.41*((T1_b-T2_b)/d_b)**0.25;##W/m^2-K\n",
+ "A_b = math.pi * d_b;## Surface Area per unit length in m^2/m\n",
+ "Q_b = h_b*A_b*(T1_b - T2_b);## in W/m\n",
+ "print'%s %.2f %s'%('the heat loss per unit length with insulation is ',Q_b,' W/m')\n",
+ "## Deviation in answer due to direct substitution\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 4.7\n",
+ "\n",
+ "\n",
+ "Page No. 99\n",
+ "\n",
+ "\n",
+ "The heat loss per unit length without insulation is 142.00 W/m \n",
+ "\n",
+ "the heat loss per unit length with insulation is 23.56 W/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex8-pg103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 4.8\n",
+ "print('Example 4.8\\n\\n');\n",
+ "print('Page No. 103\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "d = 0.100;## Diameter of pipe in m\n",
+ "T1 = 383.;## Surface temperature in Kelvin\n",
+ "T2 = 288.;## Surrounding air temperature in Kelvin\n",
+ "e = 0.9;## Emissivity of pipe\n",
+ "A = math.pi * d;## Surface Area per unit length in m^2/m\n",
+ "\n",
+ "## By Stefan-Blotzmann law, the radiative heat transfer rate is Q = 5.669*e*A*((T1/100)^4-(T2/100)^4)\n",
+ "Q = 5.669*e*A*((T1/100.)**4-(T2/100.)**4);## in W/m\n",
+ "print'%s %.2f %s'%('The radiative heat loss per unit length is ',math.ceil(Q),' W/sq.m')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 4.8\n",
+ "\n",
+ "\n",
+ "Page No. 103\n",
+ "\n",
+ "\n",
+ "The radiative heat loss per unit length is 235.00 W/sq.m\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9-pg103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 4.9\n",
+ "print('Example 4.9\\n\\n');\n",
+ "print('Page No. 103\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "A = 1.;## Area in m^2\n",
+ "T1 = 423.;## Surface temperature in Kelvin\n",
+ "T2 = 293.;## Surrounding air temperature in Kelvin\n",
+ "T1_c = 150.;## Surface temperature in degree celcius\n",
+ "T2_c = 20.;## Ambient temperature in degree celcius\n",
+ "e = 0.9;## Emissivity of pipe\n",
+ "\n",
+ "##(a) Horizontal Pipe\n",
+ "d = 0.100;## Diameter of pipe in m\n",
+ "##For laminar flow in pipe,Q= (1.41*((T1-T2)/d)^0.25)*(T1-T2)\n",
+ "Q_Ca = (1.41*((T1_c-T2_c)/d)**0.25)*(T1_c-T2_c);## Convective heat transfer rate in W/m^2\n",
+ "## By Stefan-Blotzmann law, the radiative heat transfer rate is Q = 5.669*e*((T1/100)^4-(T2/100)^4)\n",
+ "Q_Ra = 5.669*e*((T1/100.)**4-(T2/100.)**4);## in W/m^2\n",
+ "Q_Ta = Q_Ra + Q_Ca;## IN W/m^2\n",
+ "print'%s %.2f %s'%('The total heat loss from per square meter area is ',Q_Ta,' W/sq.m\\n')## Deviation in answer due to direct substitution\n",
+ "\n",
+ "\n",
+ "##(b) Vertical Pipe\n",
+ "##For turbulent flow in pipe,Q= (1.24*(T1-T2)^1.33)\n",
+ "Q_Cb = (1.24*(T1-T2)**1.33);## Convective heat transfer rate in W/m^2\n",
+ "## By Stefan-Blotzmann law, the radiative heat transfer rate is Q = 5.669*e*((T1/100)^4-(T2/100)^4)\n",
+ "Q_Rb = 5.669*e*((T1/100.)**4-(T2/100.)**4);## in W/m^2\n",
+ "Q_Tb = Q_Rb + Q_Cb;## IN W/m^2\n",
+ "print'%s %.2f %s'%('The total heat loss from per square meter area is ',math.floor(Q_Tb),' W/sq.m\\n')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 4.9\n",
+ "\n",
+ "\n",
+ "Page No. 103\n",
+ "\n",
+ "\n",
+ "The total heat loss from per square meter area is 2358.09 W/sq.m\n",
+ "\n",
+ "The total heat loss from per square meter area is 2060.00 W/sq.m\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex10-pg106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 4.10\n",
+ "print('Example 4.10\\n\\n');\n",
+ "print('Page No. 106\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "T1 = 150.;## Surface temperature in degree celcius\n",
+ "T2 = 20.;## Ambient temperature in degree celcius\n",
+ "d = 0.100; ##Outside diametr of pipe in m\n",
+ "h = 10.;## Outside film coefficient in W/m^2-K\n",
+ "t = 25.*10**-3;## thickness of insulation in m\n",
+ "K = 0.040;## Thermal conductivity of insulation in W/m-K\n",
+ "\n",
+ "r2 = d/2.;##in m\n",
+ "r1 = r2+t;## in m\n",
+ "Q = ((T1-T2)/((1./(2.*math.pi*r1*h))+(math.log(r1/r2)/(2.*math.pi*K))));## in W/m\n",
+ "print'%s %.2f %s'%('The heat loss per unit length is ',Q,' W/m')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 4.10\n",
+ "\n",
+ "\n",
+ "Page No. 106\n",
+ "\n",
+ "\n",
+ "The heat loss per unit length is 71.21 W/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter5.ipynb b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter5.ipynb
new file mode 100644
index 00000000..f48383ad
--- /dev/null
+++ b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter5.ipynb
@@ -0,0 +1,853 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:8a5095404e42ad0481b2633ccdee2541d7442fadbd298c8c24e95833702be496"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter5-Heat transfer media"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 5.1\n",
+ "print('Example 5.1');\n",
+ "print('Page No. 110');\n",
+ "\n",
+ "## given\n",
+ "Q = 0.30*10**6;## Heat transfer rate in W/sq.m\n",
+ "T1 = 540;## Mean gas temperature in degree celcius\n",
+ "T2 = 207;## Steam temperature in degree celcius\n",
+ "K_tube = 40;## Thermal conductivity of tube in W/m-K\n",
+ "K_scale = 2.5 ;## Thermal conductivity of scale in W/m-K\n",
+ "L_tube = 4*10**-3;## Length of tube in m\n",
+ "\n",
+ "## By Fourier equation and neglecting curvature effect, Q/A = [(T1- T2)/((L_tube/K_tube)+(L_scale/K_scale))]\n",
+ "L_scale = K_scale*(((T1-T2)/Q)-(L_tube/K_tube));\n",
+ "print'%s %.2f %s'%('The thickness of scale is ',L_scale,' m',)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 5.1\n",
+ "Page No. 110\n",
+ "The thickness of scale is 0.00 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 5.2\n",
+ "print('Example 5.2');\n",
+ "print('Page No. 113');\n",
+ "\n",
+ "## given\n",
+ "T1 = 10;## in degree celcius\n",
+ "T2 = 70;## in degree celcius\n",
+ "d = 25*10**-3;## Inside diameter in m\n",
+ "v = 1.5;## veocity in m/s\n",
+ "\n",
+ "Tm = (T1+T2)/2.;## Arithmetic Mean temperature in degree celcius\n",
+ "## At Tm, All physical properties of water is calculated by using steam table\n",
+ "\n",
+ "##(a)Heat absorbed by water \n",
+ "p = 992.;## Density of water in kg/m**3 At Tm\n",
+ "A = (math.pi*d**2)/4.;## Area in m**2\n",
+ "m = p*v*A;## Mass flow rate in kg/s\n",
+ "h_70 = 293*10**3.;## Specific enthalpy of water in J/kg at 70 degree celcius(from steam table)\n",
+ "h_10 = 42*10**3.;## Specific enthalpy of water in J/kg at 10 degree celcius(from steam table)\n",
+ "Q = m*(h_70 - h_10);## in W\n",
+ "print'%s %.2f %s'%(' Heat absorbed by water is ',Q,' W ')\n",
+ "\n",
+ "##(b) Film heat transfer\n",
+ "##At Tm, the following properites of water are found by using steam table\n",
+ "u = 650*10**-6.;## viscosity in Ns/m\n",
+ "Cp = 4180.;##Specific heat in J/kg-s\n",
+ "K = 0.632;## Thermal conductivity in W/m-s\n",
+ "\n",
+ "\n",
+ "Re = (d*v*p)/u;##Reynolds Number ## answer wrongly calculated in the text book\n",
+ "Pr = (Cp*u)/K;## Prandtl Number\n",
+ "Re_d = (Re)**0.8;\n",
+ "Pr_d = (Pr)**0.4;\n",
+ "\n",
+ "## By Dittus-Boelter Equation\n",
+ "##Nu = 0.0232 * Re**0.8 Pr**0.4 = (hd)/K\n",
+ "Nu = 0.0232 * Re_d * Pr_d;## Nusselt Number\n",
+ "h = (Nu*K)/d;##W/m**2-K\n",
+ "print'%s %.2f %s'%('The film heat transfer coefficient is',h,'W/sq.m K')## Deviation in answer due to direct substitution and wrongly calculated in the text book\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 5.2\n",
+ "Page No. 113\n",
+ " Heat absorbed by water is 183335.49 W \n",
+ "The film heat transfer coefficient is 6725.39 W/sq.m K\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 5.3\n",
+ "print('Example 5.3');\n",
+ "print('Page No. 117');\n",
+ "\n",
+ "## given\n",
+ "T1 = 25.;## in degree celcius\n",
+ "T2 = 212.;## in degree celcius\n",
+ "x = 0.96;## dryness fraction\n",
+ "m = 1.25;## Mass flow rate in kg/s\n",
+ "\n",
+ "##from steam table\n",
+ "hL_212 = 907.*10**3;## Specific enthalpy at 212 degree celcius in J/kg\n",
+ "hL_25 = 105.*10**3;## Specific enthalpy at 25 degree celcius in J/kg\n",
+ "l_212 = 1890*10**3;## Latent heat of vapourisation at 212 degree celcius in J/kg\n",
+ "\n",
+ "Q = m*((hL_212+(x*l_212))-hL_25);## in W\n",
+ "print'%s %.2f %s'%('The required heat is ',Q,' W')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 5.3\n",
+ "Page No. 117\n",
+ "The required heat is 3270500.00 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "## Example 5.4\n",
+ "print('Example 5.4');\n",
+ "print('Page No. 117');\n",
+ "\n",
+ "## given\n",
+ "T = 25;## in degree celcius\n",
+ "x = 0.96;## dryness fraction\n",
+ "m = 3.15;## Mass flow rate in kg/s\n",
+ "CV = 42.6*10**6;## Calorific value in J/kg\n",
+ "P = 15;## Pressure in bar\n",
+ "n = 0.8;## Efficiency\n",
+ "\n",
+ "##from steam table\n",
+ "hL_1 = 843*10**3;## Specific enthalpy in J/kg\n",
+ "hL_2 = 293*10**3;## Specific enthalpy in J/kg\n",
+ "l_1 = 1946*10**3;## Latent heat of vapourisation at 70 degree celcius in J/kg\n",
+ "\n",
+ "Q = m*((hL_1+(x*l_1))-hL_2);## in W\n",
+ "Q_Ac = Q/n## Actual heat required in Watts\n",
+ "Oil = Q_Ac/CV;\n",
+ "print'%s %.4f %s'%('The oil required is ',Oil,' kg/s')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 5.4\n",
+ "Page No. 117\n",
+ "The oil required is 0.2235 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "## Example 5.5\n",
+ "print('Example 5.5');\n",
+ "print('Page No. 120');\n",
+ "\n",
+ "## given\n",
+ "T1 = 134;## in degree celcius\n",
+ "T2 = 100;## in degree celcius\n",
+ "x = 0.96;## dryness fraction\n",
+ "m = 0.75;## Mass flow rate in kg/s\n",
+ "\n",
+ "##from steam table\n",
+ "hL_134 = 563*10**3;## Specific enthalpy at 134 degree celcius in J/kg\n",
+ "hL_100 = 419*10**3;## Specific enthalpy at 100 degree celcius in J/kg\n",
+ "l_134 = 2162*10**3;## Latent heat of vapourisation at 134 degree celcius in J/kg\n",
+ "\n",
+ "Q = m*((hL_134+(x*l_134))-hL_100);## in W\n",
+ "print'%s %.4f %s'%('The required heat is ',Q,' W')## Deviation in answer due to direct substitution and some approximation in answer in book\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 5.5\n",
+ "Page No. 120\n",
+ "The required heat is 1664640.0000 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 5.6\n",
+ "print('Example 5.6');\n",
+ "print('Page No. 120');\n",
+ "\n",
+ "## given\n",
+ "x = 0.90;## dryness fraction\n",
+ "m = 0.25;## Mass flow rate in kg/s\n",
+ "P = 0.7;## pressure in bar\n",
+ "T1 = 10;## in degree celcius\n",
+ "\n",
+ "##from steam table\n",
+ "h_10= 42*10**3;## Specific enthalpy of water at 10 degree celcius in J/kg\n",
+ "h_25 = 105*10**3;## Specific enthalpy of water at 25 degree celcius in J/kg\n",
+ "h_30 = 126*10**3;## Specific enthalpy of water at 30 degree celcius in J/kg\n",
+ "h_s = 2432*10**3;## Specific enthalpy of steam in J/kg\n",
+ "\n",
+ "##(a)T2 = 25;\n",
+ "T2 = 25;## in degree celcius\n",
+ "## By heat balance, heat transfered at 10 degree celcius = heat gained at 25 degree celcius; \"(m*h_s)+(h_10*y)= (m*h_25)+(h_25*y)\"; where 'y' is the quqntity of water to be used at 25 degree celcius in kg/s\n",
+ "y = (m*(h_s-h_25)/(h_25-h_10));\n",
+ "print'%s %.2f %s'%('the quantity of water to be used at 25 degree celcius is ',y,' kg/s ')\n",
+ "\n",
+ "\n",
+ "##(b)T2 = 30;\n",
+ "T2 = 30;## in degree celcius\n",
+ "## By heat balance, heat transfered at 10 degree celcius = heat gained at 30 degree celcius; \"(m*h_s)+(h_10*y)= (m*h_30)+(h_30*y)\"; where 'z' is the quqntity of water to be used at 30 degree celcius in kg/s\n",
+ "z = (m*(h_s-h_30)/(h_30-h_10));\n",
+ "print'%s %.2f %s'%('the quantity of water to be used at 30 degree celcius is ',z,' kg/s ')\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 5.6\n",
+ "Page No. 120\n",
+ "the quantity of water to be used at 25 degree celcius is 9.23 kg/s \n",
+ "the quantity of water to be used at 30 degree celcius is 6.86 kg/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 5.7\n",
+ "print('Example 5.7');\n",
+ "print('Page No. 121');\n",
+ "\n",
+ "## given\n",
+ "x = 0.97;## dryness fraction\n",
+ "m = 4.0;## Mass flow rate in kg/s\n",
+ "v = 40;## velocity in m/s\n",
+ "P = 10;## pressure in bar\n",
+ "\n",
+ "##from steam table\n",
+ "Sp_vol = 0.194;## specific volume at 10 bar dry steam in m**3/kg\n",
+ "\n",
+ "Q = Sp_vol*x*m## Volumetric flow rate of steam in m**3/s\n",
+ "d = math.sqrt((Q*m)/(v*math.pi));\n",
+ "print'%s %.2f %s'%('the required diameter of pipe is ',d,' m')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 5.7\n",
+ "Page No. 121\n",
+ "the required diameter of pipe is 0.15 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex8-pg122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 5.8\n",
+ "print('Example 5.8');\n",
+ "print('Page No. 122');\n",
+ "\n",
+ "## given\n",
+ "T1 = 25;## in degree celcius\n",
+ "T2 = 450;## in degree celcius\n",
+ "m = 7.5;## Mass flow rate in kg/s\n",
+ "\n",
+ "##from steam table\n",
+ "hL_450 = 3303*10**3;## Specific enthalpy at 450 degree celcius in J/kg\n",
+ "hL_25 = 105*10**3;## Specific enthalpy at 25 degree celcius in J/kg\n",
+ "\n",
+ "Q = m*(hL_450 - hL_25);## in W\n",
+ "print'%s %.2f %s'%('The required heat is ',Q,' W')## Deviation in answer due to direct substitution and some approximation in answer in book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 5.8\n",
+ "Page No. 122\n",
+ "The required heat is 23985000.00 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9-pg122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 5.9\n",
+ "print('Example 5.9');\n",
+ "print('Page No. 122');\n",
+ "\n",
+ "## given\n",
+ "P1 = 15;## Pressure at state 1 in bar\n",
+ "P2 = 1.5;## Pressure at state 2 in bar\n",
+ "T1 = 198;## in degree celcius\n",
+ "\n",
+ "## as the process is adiabatic; => Q = 0; => ehthalpy at state1 = enthalpy at state 2\n",
+ "h_1 = 2789*10**3;## specific enthalpy at state 1 in J/kg\n",
+ "h_2 = h_1;##specific enthalpy at state 2 in J/kg\n",
+ "\n",
+ "T3 = 150;## in degree celcius\n",
+ "T4 = 200;## in degree celcius\n",
+ "h_3 = 2773*10**3;## specific enthalpy at state 3 in J/kg\n",
+ "h_4 = 2873*10**3;## specific enthalpy at state 4 in J/kg\n",
+ "\n",
+ "## Assuming a liner realtionship between temperature and enthalpy for the temperature range 150-200 degree celcius\n",
+ "h = ((h_4 - h_3)/(T4 - T3));## specific enthalpy per degree celcius in J/kg-degC\n",
+ "t = ((h_2 - h_3)/h);## in degree celcius\n",
+ "T2 = T3 + t;## in degree celcius\n",
+ "print'%s %.2f %s'%('the temperature of the final superheated steam at 1.5 bar is',T2,' deg C')\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 5.9\n",
+ "Page No. 122\n",
+ "the temperature of the final superheated steam at 1.5 bar is 158.00 deg C\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex10-pg123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 5.10\n",
+ "print('Example 5.10');\n",
+ "print('Page No. 123');\n",
+ "\n",
+ "## given\n",
+ "m = 0.45;## Mass flow rate in kg/s\n",
+ "P = 2.;## pressure in bar\n",
+ "T1 = 60.;## in degree celcius\n",
+ "T2 = 250.;## in degree celcius\n",
+ "h_s = 2971.*10**3;## Specific enthalpy of superheated steam in J/kg\n",
+ "h_d = 2706.*10**3;## Specific enthalpy of dry saturated steam in J/kg\n",
+ "h_e = h_s - h_d;##excess Specific enthalpy in J/kg\n",
+ "h = 251*10**3.;## in J/kg\n",
+ "V_s = 0.885;## specific volume of dry saturated steam at 2bar in m**3/kg\n",
+ "\n",
+ "h_r = h_d- h;## heat required to convert water at 60 deg C into dry saturated steam at 2 bar\n",
+ "w = (h_e/h_r);## in kg/kg\n",
+ "print'%s %.3f %s'%('the quantity of water requried is ',w,' kg/kg')\n",
+ "\n",
+ "M = m*w;## in kg/s\n",
+ "print'%s %.3f %s'%('the total mass flow rate of water required is ',M,' kg/s ')\n",
+ "\n",
+ "M_d = M + m;## mass flow rate of desuperheated steam in kg/s\n",
+ "V = M_d*V_s;## in m**3/s\n",
+ "print'%s %.2f %s'%('the total mass flow rate of desuperheated steam required is',V,' m**3/s ')\n",
+ "## Deviation in answer due to some approximation in answer in the book\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 5.10\n",
+ "Page No. 123\n",
+ "the quantity of water requried is 0.108 kg/kg\n",
+ "the total mass flow rate of water required is 0.049 kg/s \n",
+ "the total mass flow rate of desuperheated steam required is 0.44 m**3/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex11-pg130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 5.11\n",
+ "print('Example 5.11');\n",
+ "print('Page No. 130');\n",
+ "\n",
+ "## given\n",
+ "T1 = 180.;## in degree celcius\n",
+ "T2 = 350.;## in degree celcius\n",
+ "m = 0.5;## Mass flow rate in kg/s\n",
+ "\n",
+ "\n",
+ "##from steam table\n",
+ "hL_180 = 302*10**3.;## Specific enthalpy at 180 degree celcius in J/kg\n",
+ "hL_350 = 690*10**3.;## Specific enthalpy at 350 degree celcius in J/kg\n",
+ "\n",
+ "Q = m*(hL_350 - hL_180);## in W\n",
+ "print'%s %.2f %s'%('The required heat is ',Q,' W')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 5.11\n",
+ "Page No. 130\n",
+ "The required heat is 194000.00 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex12-pg130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 5.12\n",
+ "print('Example 5.12');\n",
+ "print('Page No. 130');\n",
+ "\n",
+ "## given\n",
+ "T1 = 200.;## in degree celcius\n",
+ "T2 = 300.;## in degree celcius\n",
+ "m_l = 0.55;## Mass flow rate of liquid in kg/s\n",
+ "P = 3; ##pressure in bar\n",
+ "Cp = 2.34*10**3;## Mean haet capacity in J/kg-K\n",
+ "h = 272*10**3;## Latent heat of eutectic mixture at 3 bar\n",
+ "\n",
+ "Q = m_l*Cp*(T2 -T1);## in Watts\n",
+ "m = Q/h;## in kg/s\n",
+ "print'%s %.2f %s'%('The mass flow rate of dry saturated eutectic mixture is',m,' kg/s')\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 5.12\n",
+ "Page No. 130\n",
+ "The mass flow rate of dry saturated eutectic mixture is 0.47 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex13-pg131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 5.13\n",
+ "print('Example 5.13');\n",
+ "print('Page No. 131');\n",
+ "import numpy\n",
+ "## given\n",
+ "T = 300.;## in degree celcius\n",
+ "v = 2.;## velocity in m/s\n",
+ "d = 40.*10**-3;## diameter in m\n",
+ "## From the table 5.3 and 5.4 given in the book\n",
+ "K_d = numpy.array([2.80, 2.65, 2.55, 2.75])## in W/m**2-k\n",
+ "Re = numpy.array([117*10**3 ,324*10**3, 159*10**3 ,208*10**3])##Reynolds number\n",
+ "Pr = numpy.array([12, 4.50, 10.0, 7.3])##Prandtl Number\n",
+ "\n",
+ "## By Dittus-Boelter Equation\n",
+ "##Nu = 0.0232 * Re**0.8*Pr**0.3 = (hd)/K\n",
+ "##h = 0.0232 * Re**0.8*Pr**0.3 *(K/d)\n",
+ "\n",
+ "h_T = 0.0232 * Re[0]**0.8*Pr[0]**0.3*K_d[0];## ##W/m**2-K\n",
+ "print('The film heat transfer coefficient using Transcal N is',h_T,' W/sq.m K ')## Deviation in answer due to direct substitution \n",
+ "\n",
+ "\n",
+ "h_D = 0.0232 * Re[1]**0.8*Pr[1]**0.3*K_d[1];## ##W/m**2-K\n",
+ "print'%s %.2f %s'%('The film heat transfer coefficient using Dowtherm A is ',h_D,' W/sq.m K ')## Deviation in answer due to direct substitution \n",
+ "\n",
+ "\n",
+ "h_M = 0.0232 * Re[2]**0.8*Pr[2]**0.3*K_d[2];## ##W/m**2-K\n",
+ "print'%s %.2f %s'%('The film heat transfer coefficient using Marlotherm S is ',h_M,' W/sq.m K \\n')## Deviation in answer due to direct substitution \n",
+ "\n",
+ "\n",
+ "h_S = 0.0232 * Re[3]**0.8*Pr[3]**0.3*K_d[3];## ##W/m**2-K\n",
+ "print'%s %.2f %s'%('The film heat transfer coefficient using Santotherm 60 is ',h_S,' W/sq.m K \\n')## Deviation in answer due to direct substitution \n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 5.13\n",
+ "Page No. 131\n",
+ "('The film heat transfer coefficient using Transcal N is', 1552.2050049396955, ' W/sq.m K ')"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "The film heat transfer coefficient using Dowtherm A is 2472.48 W/sq.m K \n",
+ "The film heat transfer coefficient using Marlotherm S is 1710.59 W/sq.m K \n",
+ "\n",
+ "The film heat transfer coefficient using Santotherm 60 is 2080.98 W/sq.m K \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex14-pg137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 5.14\n",
+ "print('Example 5.14');\n",
+ "print('Page No. 137');\n",
+ "\n",
+ "## given\n",
+ "T1 = 25;## Wet-bulb temperature in degree celcius\n",
+ "T2 = 40;##Dry-bulb temperature in degree celcius\n",
+ "\n",
+ "##By using the humidity chart and steam tables for air-water mixtures at the given temperatures, the all following data can be obtained\n",
+ "\n",
+ "##(a) humidity\n",
+ "w = 0.014;## in kg/kg\n",
+ "print'%s %.2f %s'%('the required humidity is ',w,' kg/kg ')\n",
+ "\n",
+ "\n",
+ "##(b) relative humidity\n",
+ "R_H = 30;## in percentage\n",
+ "print'%s %.2f %s'%('the required relative humidity in percentage is ',R_H,'')\n",
+ "\n",
+ "##(c) the dew point\n",
+ "T_w = 20;## in degree celcius\n",
+ "print'%s %.2f %s'%('the required dew-point temperature is ',T_w,' deg C')\n",
+ "\n",
+ "##(d) the humid heat\n",
+ "Cpa = 1.006*10**3;## Heat Capacity of bone dry air in J/kg-K\n",
+ "Cpwv = 1.89*10**3;## Heat Capacity of water vapour in J/kg-K\n",
+ "S = Cpa + (w*Cpwv);##in J/kg-K\n",
+ "print'%s %.2f %s'%('the humid heat is',S,' J/kg-K' )\n",
+ "\n",
+ "##(e) the humid volume\n",
+ "V_G = ((1/29.)+(w/18.))*22.41*((T2 + 273.)/273.);##in m**3/kg\n",
+ "print'%s %.2f %s'%('the humid volume is ',V_G,' m**3/kg ')\n",
+ "\n",
+ "##(f) adiabatic process\n",
+ "w_A = 0.020;## in kg/kg\n",
+ "print'%s %.2f %s'%('the humidity of the mixture if saturated adiabatically is ',w_A,' kg/kg ')\n",
+ "\n",
+ "## (h) isothermal process\n",
+ "w_i = 0.049;## in kg/kg\n",
+ "print'%s %.2f %s'%('the humidity of the mixture if saturated isothermally is ',w_i,' kg/kg ')\n",
+ "\n",
+ "\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 5.14\n",
+ "Page No. 137\n",
+ "the required humidity is 0.01 kg/kg \n",
+ "the required relative humidity in percentage is 30.00 \n",
+ "the required dew-point temperature is 20.00 deg C\n",
+ "the humid heat is 1032.46 J/kg-K\n",
+ "the humid volume is 0.91 m**3/kg \n",
+ "the humidity of the mixture if saturated adiabatically is 0.02 kg/kg \n",
+ "the humidity of the mixture if saturated isothermally is 0.05 kg/kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15-pg137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 5.15\n",
+ "print('Example 5.15');\n",
+ "print('Page No. 137');\n",
+ "\n",
+ "## given\n",
+ "T = 25.;## Wet-bulb temperature in degree celcius\n",
+ "T1 = 30.;##Dry-bulb temperature in degree celcius\n",
+ "V = 5.;## Volumetric flow rate of initial air-water mixture in m**3/s\n",
+ "T2 = 70.;## Final Dry-bulb temperature in degree celcius\n",
+ "\n",
+ "##By using the humidity chart and steam tables for air-water mixtures at the given temperatures, the all following data can be obtained\n",
+ "w = 0.018;## humidity at 25/30 degree celcius in kg/kg\n",
+ "Cpa_1 = 1.00*10**3;## Heat Capacity of bone dry air at 30 degree celcius in J/kg-K\n",
+ "Cpwv_1 = 1.88*10**3;## Heat Capacity of water vapour at 30 degree celcius in J/kg-K\n",
+ "Cpa_2 = 1.008*10**3;## Heat Capacity of bone dry air at 70 degree celcius in J/kg-K\n",
+ "Cpwv_2 = 1.93*10**3;## Heat Capacity of water vapour at 70 degree celcius in J/kg-K\n",
+ "lo = 2.50*10**6;## Specifc Latent heat of vapourisation of water at 0 degree celcius in J/kg\n",
+ "\n",
+ "S_1 = Cpa_1 + (w*Cpwv_1);## the humid heat at 30 degree celcius in J/kg-K\n",
+ "S_2 = Cpa_2 + (w*Cpwv_2);##the humid heat at 70 degree celcius in J/kg-K\n",
+ "\n",
+ "hG_1 = ((S_1*T1) + (w*lo));##the specific enthalpy at 30 degree celcius in J/kg\n",
+ "hG_2 = ((S_2*T2) + (w*lo));##the specific enthalpy at 70 degree celcius in J/kg\n",
+ "VG_1 = ((1/29.)+(w/18.))*22.41*((T1 + 273)/273.);## Humid volume at 30 degree celcius in m**3/kg\n",
+ "m = V/VG_1;## Mass flow rate in kg/s\n",
+ "Q = m*(hG_2 - hG_1);## in Watts\n",
+ "print'%s %.2f %s'%('The required heat is ',Q,' W')## Deviation in answer is due to some approximation in calculation in the book\n",
+ "\n",
+ "w_2 = w;## given in the question\n",
+ "VG_2 = ((1/29.)+(w_2/18.))*22.41*((T2 + 273)/273.);## Humid volume at 70 degree celcius in m**3/kg\n",
+ "V_f = m*VG_2;## in m**3/s\n",
+ "print'%s %.2f %s'%( 'The volumetric flow rate of initial air-water mixture is ',V_f,' m^3/s')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 5.15\n",
+ "Page No. 137\n",
+ "The required heat is 237814.35 W\n",
+ "The volumetric flow rate of initial air-water mixture is 5.66 m^3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter6.ipynb b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter6.ipynb
new file mode 100644
index 00000000..ed67b8cf
--- /dev/null
+++ b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter6.ipynb
@@ -0,0 +1,1140 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:391691e121c70cb2c3ed1568e4e37abc97da81f07c5711ed04593a3ca2ce50ba"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter6-Heat transfer equipment\n"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg142"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 6.1\n",
+ "print('Example 6.1');\n",
+ "print('Page No. 142');\n",
+ "\n",
+ "## given\n",
+ "L = 2.5;## Length of tubes in metre\n",
+ "Do = 10*10**-3;## Internal diameter of tubes in metre\n",
+ "m = 3.46;## mass flow rate in kg/s\n",
+ "Th = 120.;## Temperature of condening steam in degree celcius\n",
+ "Tl_i = 20.;## Inlet temperature of liquid in degree celcius\n",
+ "Tl_o = 80.;## Outlet temperature of liquid in degree celcius\n",
+ "Cp = 2.35*10**3;## Specific heat capacity of liquid in J/kg-K\n",
+ "U = 950.;## Overall heat transfer coefficent in W/m**2-K\n",
+ "\n",
+ "T1 = Th- Tl_i;## in degree celcius\n",
+ "T2 = Th- Tl_o;## in degree celcius\n",
+ "Tm = ((T2-T1)/math.log(T2/T1));## logarithmic mean temperature of pipe in degree celcius\n",
+ "a = math.pi*Do*L;##Surface area per tube in m**2\n",
+ "A = ((m*Cp*(Tl_o - Tl_i))/(U*Tm));## in m**2\n",
+ "N = A/a;\n",
+ "print'%s %.2f %s'%('The number of tubes required is',N,'')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 6.1\n",
+ "Page No. 142\n",
+ "The number of tubes required is 99.85 \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg142"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 6.2\n",
+ "print('Example 6.2');\n",
+ "print('Page No. 142');\n",
+ "\n",
+ "## given\n",
+ "v = 1.50;## velocity in m/s\n",
+ "N_t = 100.;## Number of tubes\n",
+ "Do = 10*10**-3;## Internal diameter of tubes in metre\n",
+ "m = 3.46;## mass flow rate in kg/s\n",
+ "p = 1180.;## density in kg/m**3\n",
+ "\n",
+ "A = (N_t*math.pi*Do**2)/4.;## otal cross-sectional area in m**2\n",
+ "V = m/p;##Volumetric flow rate in m**3/s\n",
+ "Fv = V/A;## Fluid velocity in m/s\n",
+ "N_p = v/Fv;\n",
+ "print'%s %.2f %s'%('the number of passes is',N_p,'')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 6.2\n",
+ "Page No. 142\n",
+ "the number of passes is 4.02 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg144"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 6.3\n",
+ "print('Example 6.3');\n",
+ "print('Page No. 144');\n",
+ "\n",
+ "## given\n",
+ "Th_i = 130.;##Inlet temperature of hot liquid in degree celcius \n",
+ "Th_o = 90.;## Outlet temperature of hot liquid in degree celcius\n",
+ "Tc_i = 20.;## Inlet temperature of cold liquid in degree celcius\n",
+ "Tc_o = 50.;## Outlet temperature of cold liquid in degree celcius\n",
+ "\n",
+ "##For Couter-current flow\n",
+ "T1 = Th_i - Tc_o;\n",
+ "T2 = Th_o - Tc_i;\n",
+ "Tm_1 = ((T2-T1)/math.log(T2/T1));\n",
+ "print'%s %.2f %s'%('The logarithmic mean temperature difference for counter-current flow ',Tm_1,' degree celcius')\n",
+ "\n",
+ "\n",
+ "##For Co-current flow\n",
+ "T3 = Th_i - Tc_i;\n",
+ "T4 = Th_o - Tc_o;\n",
+ "Tm_2 = ((T3-T4)/math.log(T3/T4));\n",
+ "print'%s %.2f %s'%('The logarithmic mean temperature difference for co-current flow is ',Tm_2,' degree celcius ')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 6.3\n",
+ "Page No. 144\n",
+ "The logarithmic mean temperature difference for counter-current flow 74.89 degree celcius\n",
+ "The logarithmic mean temperature difference for co-current flow is 69.20 degree celcius \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg147"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 6.4\n",
+ "print('Example 6.4');\n",
+ "print('Page No. 147');\n",
+ "\n",
+ "## given\n",
+ "F = 1.;## Fuel feed required in kg\n",
+ "##By ultimate analysis of feed\n",
+ "C = 0.86;## Carbon percentage - [%]\n",
+ "H2 = 0.05;## Hydrogen percentage - [%]\n",
+ "S = 0.001;## Sulphur percentage - [%]\n",
+ "O2 = 0.08;## Oxygen percentage - [%]\n",
+ "\n",
+ "w_C = 12.; ## mol. weight of C\n",
+ "w_H2 = 2.; ##mol. weight of H2\n",
+ "w_O2 = 32.; ## mol. weight of O2\n",
+ "w_S = 32.; ##mol. weight of S\n",
+ "##Basis- Per kg of fuel\n",
+ "mol_C = C / w_C;## kmol of C\n",
+ "mol_H2 = H2 /w_H2;##kmol of H2\n",
+ "mol_O2 = O2 /w_O2;##kmol of O2\n",
+ "mol_S = S /w_S;##kmol of S\n",
+ "##Calculation of excess air\n",
+ "C_req = mol_C*1.;##O2 required by entering C given by reaction C+O2->CO2 in kmol\n",
+ "H_req = mol_H2*0.5;##O2 required by entering H2 given by reaction H2+(1/2)O2->H20 in kmol\n",
+ "S_req = mol_S*1.;##O2 required by entering S given by reaction S+O2->SO2 in kmol\n",
+ "O2_req = (C_req + H_req + S_req) - mol_O2;## in kmol\n",
+ "print'%s %.2f %s'%('Total number of kmol of O2 required per kg of fuel is',O2_req, 'kmol ')\n",
+ "m_O2 = O2_req*w_O2;## Mass of O2 required per kg of fuel\n",
+ "print'%s %.2f %s'%('Mass of O2 required per kg of fuel is ',m_O2,' kg ')\n",
+ "##Calculation of air\n",
+ "m_air = m_O2/0.232;## in kg\n",
+ "print'%s %.2f %s'%('Mass of air required per kg of fuel is ',m_air,' kg ')\n",
+ "##Considering air as an ideal gas,calculating volume of air by ideal gas equation-P*V = n*R*T\n",
+ "R = 8310;##Universal gas constant in J/kmol-K\n",
+ "T = (273+20);## in K\n",
+ "P = 1.013*10**5;## in N/m**2\n",
+ "n = 1;## 1 kmol of air\n",
+ "V_kmol = (n*R*T)/P;## In m**3/kmol\n",
+ "M_air = 29;## Mol. weight of air\n",
+ "V_kg = V_kmol/M_air;## in m**3/kg\n",
+ "V_air = m_air*V_kg;## in m**3\n",
+ "print'%s %.2f %s'%('Volume of air required is ',V_air,' m^3 ')\n",
+ "##Deviation in answer is due to some approximation in calculation in the book\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 6.4\n",
+ "Page No. 147\n",
+ "Total number of kmol of O2 required per kg of fuel is 0.08 kmol \n",
+ "Mass of O2 required per kg of fuel is 2.61 kg \n",
+ "Mass of air required per kg of fuel is 11.27 kg \n",
+ "Volume of air required is 9.34 m^3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 6.5\n",
+ "print('Example 6.5');\n",
+ "print('Page No. 148');\n",
+ "\n",
+ "## given\n",
+ "F = 1.;## Weight of coal in kg\n",
+ "##By analysis of coal in weight basis\n",
+ "C = 0.74;## Carbon percentage - [%]\n",
+ "H2 = 0.05;## Hydrogen percentage - [%]\n",
+ "S = 0.01;## Sulphur percentage - [%]\n",
+ "N2 = 0.001;## Nitrogen percentage - [%]\n",
+ "O2 = 0.05;## Oxygen percentage - [%]\n",
+ "H20 = 0.09;## Moisture percentage - [%]\n",
+ "Ash = 0.05;## Ash percentage - [%]\n",
+ "\n",
+ "w_C = 12.; ## mol. weight of C\n",
+ "w_H2 = 2.; ##mol. weight of H2\n",
+ "w_O2 = 32.; ## mol. weight of O2\n",
+ "w_S = 32.; ##mol. weight of S\n",
+ "##Basis- Per kg of fuel\n",
+ "mol_C = C / w_C;## kmol of C\n",
+ "mol_H2 = H2 /w_H2;##kmol of H2\n",
+ "mol_O2 = O2 /w_O2;##kmol of O2\n",
+ "mol_S = S /w_S;##kmol of S\n",
+ "##Calculation of excess air\n",
+ "C_req = mol_C*1;##O2 required by entering C given by reaction C+O2->CO2 in kmol\n",
+ "H_req = mol_H2*0.5;##O2 required by entering H2 given by reaction H2+(1/2)O2->H20 in kmol\n",
+ "S_req = mol_S*1;##O2 required by entering S given by reaction S+O2->SO2 in kmol\n",
+ "O2_req = (C_req + H_req + S_req) - mol_O2;## Total number of kmol of O2 required per kg of fuel in kmol\n",
+ "m_O2 = O2_req*w_O2;## Mass of O2 required per kg of fuel\n",
+ "print'%s %.2f %s'%('Mass of O2 required per kg of fuel is ',m_O2,' kg ')\n",
+ "##Calculation of air\n",
+ "m_air = m_O2/0.232;## in kg\n",
+ "print'%s %.2f %s'%('Mass of air required per kg of fuel is',m_air,' kg ')\n",
+ "##Considering air as an ideal gas,calculating volume of air by ideal gas equation-P*V = n*R*T\n",
+ "R = 8310.;##Universal gas constant in J/kmol-K\n",
+ "T = (273.+0);## in K\n",
+ "P = 1.013*10**5;## in N/m**2\n",
+ "n = 1;## 1 kmol of air\n",
+ "V_kmol = (n*R*T)/P;## In m**3/kmol\n",
+ "M_air = 29.;## Mol. weight of air\n",
+ "V_kg = V_kmol/M_air;## in m**3/kg\n",
+ "V_air = m_air*V_kg;## in m**3\n",
+ "print'%s %.2f %s'%('Volume of air required is ',V_air,' m^3')\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 6.5\n",
+ "Page No. 148\n",
+ "Mass of O2 required per kg of fuel is 2.33 kg \n",
+ "Mass of air required per kg of fuel is 10.06 kg \n",
+ "Volume of air required is 7.77 m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 6.9\n",
+ "print('Example 6.9');\n",
+ "print('Page No. 157');\n",
+ "\n",
+ "## given\n",
+ "P = 10.;## Boiler pressure in bar\n",
+ "Ts = 180.;## Steam temperature in degree celcius\n",
+ "Tf = 80.;## Feed water temperature in degree celcius\n",
+ "X = 0.95;## Steam dryness fraction\n",
+ "m_s = 4100.;## steam rate in kg/h\n",
+ "m_f = 238.;## Gas rate in kg/h\n",
+ "G_CV = 53.5*10**6.;## In J/kg\n",
+ "N_CV = 48*10**6.;##in J/kg\n",
+ "\n",
+ "##from steam table,AT 10 bar and at temperature T = Ts\n",
+ "h2 = (763.+(X*2013.))*10**3;##Specific enthalpy of steam in J/kg\n",
+ "##At temperature T = Tf\n",
+ "h1 = 335.*10**3;##Specific enthalpy of feed steam in J/kg\n",
+ "\n",
+ "E_G = ((m_s*(h2-h1)*100)/(m_f*G_CV));##\n",
+ "print'%s %.2f %s'%('The gross efficiency percentage is',E_G,'')\n",
+ "\n",
+ "\n",
+ "E_N = ((m_s*(h2-h1)*100)/(m_f*N_CV));##\n",
+ "print'%s %.2f %s'%('The net efficiency percentage is ',E_N,'')\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 6.9\n",
+ "Page No. 157\n",
+ "The gross efficiency percentage is 75.36 \n",
+ "The net efficiency percentage is 83.99 \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 6.7\n",
+ "print('Example 6.7');\n",
+ "print('Page No. 150');\n",
+ "\n",
+ "## given\n",
+ "F = 1;## Weight of fuel in kg\n",
+ "e = 0.5;## excess air percentage\n",
+ "C = 0.74;## Mass of Carbon in kg\n",
+ "H2 = 0.05;## Mass of Hydrogen in kg\n",
+ "S = 0.01;## Mass of Sulphur in kg\n",
+ "N2 = 0.001;##Mass of Nitrogen in kg\n",
+ "O2 = 0.05;## Mass of Oxygen in kg\n",
+ "H2O = 0.09;## Mass of Moisture in kg\n",
+ "Ash = 0.05;## Mass of Ash in kg\n",
+ "\n",
+ "w_C = 12.; ## mol. weight of C\n",
+ "w_H2 = 2.; ##mol. weight of H2\n",
+ "w_O2 = 32.; ## mol. weight of O2\n",
+ "w_S = 32.; ##mol. weight of S\n",
+ "w_N2 = 28.;## mol. weight of N2\n",
+ "w_H20 = 18.;## mol. weight of H2O\n",
+ "##Basis- Per kg of fuel\n",
+ "mol_C = C / w_C;## kmol of C\n",
+ "mol_H2 = H2 /w_H2;##kmol of H2\n",
+ "mol_O2 = O2 /w_O2;##kmol of O2\n",
+ "mol_S = S /w_S;##kmol of S\n",
+ "mol_N2 = N2 /w_N2;##kmol of N2\n",
+ "mol_H2O = H2O /w_H20;##kmol of H20\n",
+ "\n",
+ "##By kmol of product\n",
+ "CO2 = mol_C*1.;## CO2 formed by the reaction C + O2 -> CO2\n",
+ "H2O_air = mol_H2*1.;## H2O formed by the reaction H2 + (1/2)O2 -> H2O\n",
+ "SO2 = mol_S*1.;## SO2 formed by the reaction S + O2 -> SO2\n",
+ "Pdt = CO2 + H2O_air + SO2 + mol_N2 + mol_H2O;## Total kmol of combustion products in kmol\n",
+ "##Calculation of excess air\n",
+ "C_req = mol_C*1;##O2 required by entering C given by reaction C+O2->CO2 in kmol\n",
+ "H_req = mol_H2*0.5;##O2 required by entering H2 given by reaction H2+(1/2)O2->H20 in kmol\n",
+ "S_req = mol_S*1;##O2 required by entering S given by reaction S+O2->SO2 in kmol\n",
+ "O2_req = (C_req + H_req + S_req) - mol_O2;## Total number of kmol of O2 required per kg of fuel in kmol\n",
+ "\n",
+ "Ex_O2 = O2_req*e;## Amount of excess oxygen in kmol\n",
+ "\n",
+ "N2_air = (O2_req*(1+e)*79.)/21.;## in kmol (considering air consists of 79% N2 and 21% O2 by moles)\n",
+ "N2_flue = mol_N2 + N2_air;## Total N2 in flue gas in kmol\n",
+ "H2O_flue = mol_H2O+ H2O_air;## Total H2O in flue gas in kmol\n",
+ "\n",
+ "T_wet = CO2 + H2O_flue + SO2 + Ex_O2 + N2_flue;##Total components of flue gas on a wet basis in kmol\n",
+ "T_dry = CO2 + SO2 + Ex_O2 + N2_flue;##Total components of flue gas on a dry basis in kmol\n",
+ "H2O_dry = 0;\n",
+ "C_wet = ((CO2 / T_wet)*100.);## in percentage \n",
+ "H_wet = ((H2O_flue/T_wet)*100.);## in percentage \n",
+ "S_wet = ((SO2/T_wet)*100.);## in percentage \n",
+ "N_wet = ((N2_flue/T_wet)*100.);## in percentage \n",
+ "O_wet = ((Ex_O2/T_wet)*100);## in percentage \n",
+ "\n",
+ "C_dry = ((CO2 / T_dry)*100.);## in percentage \n",
+ "H_dry = ((H2O_dry/T_dry)*100.);## in percentage\n",
+ "S_dry = ((SO2/T_dry)*100.);## inpercentage\n",
+ "N_dry = ((N2_flue/T_dry)*100.);## in percentage\n",
+ "O_dry =((Ex_O2/T_dry)*100.);## in percentage\n",
+ "T1 = C_wet + H_wet + S_wet + N_wet +O_wet;## in percentage\n",
+ "T2 = C_dry + S_dry + N_dry + O_dry;## in percentage\n",
+ "\n",
+ "print('components\\t\\t\\t\\t\\t\\t kmol \\t\\t\\t\\t\\t\\t % Composition by volume' '\\n\\n\\n')\n",
+ "print('\\t wet \\t\\t dry \\t\\t\\t\\t wet \\t\\t dry ')\n",
+ "print'%s %.2f %s %.2f %s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t'and '',CO2,'' '\\t\\t' '',CO2,'' '\\t\\t\\t\\t' '',C_wet,'' and '\\t\\t\\t\\t' '\\t\\t\\t\\t',C_dry,' \\t\\t\\t\\t ')#and '',CO2,'' and '',C_wet,'' and '',C_dry,'')\n",
+ "print'%s %.2f %s %.2f %s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t' and '',H2O_flue,'' '\\t\\t' '',H2O_dry,'' '\\t\\t\\t\\t' '',H_wet,'' '\\t\\t\\t\\t' '',H_dry,'')\n",
+ "print'%s %.2f %s %.2f %s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t' and '',SO2,'' '\\t\\t' '',SO2,'' '\\t\\t\\t\\t' '',S_wet,'' '\\t\\t\\t\\t' '',S_dry,'')\n",
+ "print'%s %.2f %s %.2f %s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t'and '',N2_flue,' ''\\t\\t' '',N2_flue,'' '\\t\\t\\t\\t' '',N_wet,'' '\\t\\t\\t\\t' '',N_dry,'')\n",
+ "print'%s %.2f %s %.2f %s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t' and '',Ex_O2,'' '\\t\\t' '',Ex_O2,'' '\\t\\t\\t\\t' '',O_wet,'' '\\t\\t\\t\\t' '',O_dry,'')\n",
+ "print'%s %.2f %s %.2f %s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t'and '',T_wet,'' '\\t\\t' '',T_dry,'' '\\t\\t\\t\\t' '',T1,'' '\\t\\t\\t\\t' '',T2,'')\n",
+ "\n",
+ "\n",
+ "\n",
+ "#printf('\\t\\t kmol \\t\\t percent composition by volume\\n Component \\t Wet \\t Dry \\t\\t Wet \\t Dry \\n CO2 \\t %.4f %.4f \\t\\t %.1f \\t %.1f \\n H2O \\t %.4f %.0f \\t\\t\\t %.1f \\t\\t %.1f \\n SO2 \\t %.4f %.4f \\t\\t %.1f \\t\\t %.1f \\n N2 \\t\\t %.4f %.4f \\t\\t %.1f \\t %.1f \\n O2 \\t\\t %.4f %.4f \\t\\t %.1f \\t\\t %.1f \\n TOTAL \\t %.4f %.4f \\t\\t %.0f \\t\\t %.0f'\n",
+ "#\t,CO2,CO2,C_wet,C_dry,H2O_flue, H2O_dry,H_wet,H_dry,\n",
+ "#SO2,SO2,S_wet,S_dry,N2_flue, N2_flue,N_wet,N_dry,Ex_O2,Ex_O2,O_wet,O_dry,T_wet,T_dry,T1,T2)\n",
+ "#//Deviation in answes is due to some calculation approxiamation in the book.\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 6.7\n",
+ "Page No. 150\n",
+ "components\t\t\t\t\t\t kmol \t\t\t\t\t\t % Composition by volume\n",
+ "\n",
+ "\n",
+ "\n",
+ "\t wet \t\t dry \t\t\t\t wet \t\t dry \n",
+ " 0.06 \t\t 0.06 \t\t\t\t 11.42 12.09 \t\t\t\t \n",
+ " 0.03 \t\t 0.00 \t\t\t\t 5.56 \t\t\t\t 0.00 \n",
+ " 0.00 \t\t 0.00 \t\t\t\t 0.06 \t\t\t\t 0.06 \n",
+ " 0.41 \t\t 0.41 \t\t\t\t 76.21 \t\t\t\t 80.70 \n",
+ " 0.04 \t\t 0.04 \t\t\t\t 6.75 \t\t\t\t 7.15 \n",
+ " 0.54 \t\t 0.51 \t\t\t\t 100.00 \t\t\t\t 100.00 \n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex8-pg156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 6.8\n",
+ "print('Example 6.8');\n",
+ "print('Page No. 156');\n",
+ "\n",
+ "## given\n",
+ "H = 0.05;## Hydrogen percentage - [%]\n",
+ "O = 0.08;## Oxygen percentage - [%]\n",
+ "C = 0.86;## Carbon percentage - [%]\n",
+ "S = 0.001;## Sulphur percentage - [%]\n",
+ "\n",
+ "G_CV = ((33.9*C)+143*(H-(O/8.))+(9.1*S))*10**6;\n",
+ "print'%s %.2f %s'%('The gross calorific value is ',G_CV,' J/kg ')\n",
+ "\n",
+ "\n",
+ "N_CV = ((33.9*C)+121*(H-(O/8.))+(9.1*S))*10**6.;\n",
+ "print'%s %.2f %s'%('The net calorific value is ',N_CV,' J/kg')\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 6.8\n",
+ "Page No. 156\n",
+ "The gross calorific value is 34883100.00 J/kg \n",
+ "The net calorific value is 34003100.00 J/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9-pg157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 6.9\n",
+ "print('Example 6.9');\n",
+ "print('Page No. 157');\n",
+ "\n",
+ "## given\n",
+ "P = 10.;## Boiler pressure in bar\n",
+ "Ts = 180.;## Steam temperature in degree celcius\n",
+ "Tf = 80.;## Feed water temperature in degree celcius\n",
+ "X = 0.95;## Steam dryness fraction\n",
+ "m_s = 4100.;## steam rate in kg/h\n",
+ "m_f = 238.;## Gas rate in kg/h\n",
+ "G_CV = 53.5*10**6.;## In J/kg\n",
+ "N_CV = 48*10**6.;##in J/kg\n",
+ "\n",
+ "##from steam table,AT 10 bar and at temperature T = Ts\n",
+ "h2 = (763.+(X*2013.))*10**3;##Specific enthalpy of steam in J/kg\n",
+ "##At temperature T = Tf\n",
+ "h1 = 335.*10**3;##Specific enthalpy of feed steam in J/kg\n",
+ "\n",
+ "E_G = ((m_s*(h2-h1)*100)/(m_f*G_CV));##\n",
+ "print'%s %.2f %s'%('The gross efficiency percentage is',E_G,'')\n",
+ "\n",
+ "\n",
+ "E_N = ((m_s*(h2-h1)*100)/(m_f*N_CV));##\n",
+ "print'%s %.2f %s'%('The net efficiency percentage is ',E_N,'')\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 6.9\n",
+ "Page No. 157\n",
+ "The gross efficiency percentage is 75.36 \n",
+ "The net efficiency percentage is 83.99 \n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex10-pg 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 6.10\n",
+ "print('Example 6.10');\n",
+ "print('Page No. 158');\n",
+ "\n",
+ "## given\n",
+ "##for Boiler-1\n",
+ "P_1 = 15.;## Boiler pressure in bar\n",
+ "Ts_1 = 300.;## Steam temperature in degree celcius\n",
+ "Tf_1 = 80.;## Feed water temperature in degree celcius\n",
+ "X_1 = 0.;## Steam dryness fraction\n",
+ "m_s1 = 9000.;## steam rate in kg/h\n",
+ "m_f1 = 700.;## Gas rate in kg/h\n",
+ "G_CV1 = 43.0*10**6;## In J/kg\n",
+ "##from steam table,at P = 15 bar and at given temperatures\n",
+ "h2_1 = 3039.*10**3;##Specific enthalpy of steam in J/kg\n",
+ "h1_1 = 335.*10**3;##Specific enthalpy of feed steam in J/kg\n",
+ "\n",
+ "E_G1 = ((m_s1*(h2_1-h1_1)*100.)/(m_f1*G_CV1));##\n",
+ "print'%s %.2f %s'%('The gross efficiency percentage is ',E_G1,'')\n",
+ "Ee_1 = ((m_s1/m_f1)*(h2_1-h1_1))/(2257*10**3);\n",
+ "print'%s %.2f %s'%('the equivalent evaporation for boiler-1 is',Ee_1,' kg ')\n",
+ "\n",
+ "##for Boiler-2\n",
+ "P_2 = 10.;## Boiler pressure in bar\n",
+ "Ts_2 = 180.;## Steam temperature in degree celcius\n",
+ "Tf_2 = 60.;## Feed water temperature in degree celcius\n",
+ "X_2 = 0.96;## Steam dryness fraction\n",
+ "m_s2 = 7000.;## steam rate in kg/h\n",
+ "m_f2 = 510.;## Gas rate in kg/h\n",
+ "G_CV2 = 43.0*10**6.;## In J/kg\n",
+ "##from steam table,AT 10 bar and at temperature T = Ts_2\n",
+ "h2 = (763.+(X_2*2013.))*10**3.;##Specific enthalpy of steam in J/kg\n",
+ "##At temperature T = Tf_2\n",
+ "h1 = 251.*10**3.;##Specific enthalpy of feed steam in J/kg\n",
+ "\n",
+ "E_G2 = ((m_s2*(h2-h1)*100)/(m_f2*G_CV2));##\n",
+ "print'%s %.2f %s'%('The gross efficiency percentage is',E_G2,'')\n",
+ "Ee_2 = ((m_s2/m_f2)*(h2-h1))/(2257*10**3);\n",
+ "print'%s %.2f %s'%('the equivalent evaporation for boiler-2 is ',Ee_2,' kg')\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 6.10\n",
+ "Page No. 158\n",
+ "The gross efficiency percentage is 80.85 \n",
+ "the equivalent evaporation for boiler-1 is 15.40 kg \n",
+ "The gross efficiency percentage is 78.03 \n",
+ "the equivalent evaporation for boiler-2 is 14.87 kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex11-pg167"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 6.11\n",
+ "print('Example 6.11\\n\\n');\n",
+ "print('Page No. 167\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "m = 10.*10**3;## Production of boiler in kg/h\n",
+ "X = 0.95;##Dryness fraction\n",
+ "P = 10.;##Pressure ib bar\n",
+ "T_fw = 95.;## Feed water temperature in degree celcius\n",
+ "T_mf = 230.;## Mean flue gae temperature in degree celcius\n",
+ "T_mb = 25.;## Mean boiler house temperature in degree celcius\n",
+ "Coal_c = 900.;## Coal consumption in kg/h\n",
+ "A = 0.08;## Ash content in coal\n",
+ "C_c = 0.15;##carbon content in coal\n",
+ "CV_coal = 33.50*10**6;## Calorific value of coal in J\n",
+ "M = 28.;## Mass of flue gas per kg coal in kg\n",
+ "Cp = 1.05*10**3;## Mean Specific heat capacity of the flue gas in J/kg-K\n",
+ "CV_c = 34.*10**6;## Calorific value of carbon in J/kg\n",
+ "\n",
+ "M_s = m/Coal_c;## Mass of steam produced per kg coal in kg\n",
+ "H_w = (M_s*(763.+(X*2013.) - 398.)*10**3)/10**6;## Heat absorbed by water per kg coal in 10^6 J(from steam table at given pressure and dryness fraction)\n",
+ "H_f = (M*Cp*(T_mf - T_mb))/10**6;## Heat in flue gas in 10^6 J \n",
+ "H_uc = (A*C_c*CV_c)/10**6;##Heat in unburnt carbon in 10^6 J\n",
+ "h_sup = (CV_coal)/10**6;## Heat supplied by coal in 10^6 J\n",
+ "un_acc = (h_sup - (H_w + H_f + H_uc));## unaccounted heat losses in 10^6 J\n",
+ "a = (h_sup/h_sup)*100.;\n",
+ "b = (H_w/h_sup)*100.;\n",
+ "c = (H_f/h_sup)*100.;\n",
+ "d = (H_uc/h_sup)*100.;\n",
+ "e = (un_acc/h_sup)*100.;\n",
+ "T = b + c + d + e;\n",
+ "print(' THERMAL BALANCE SHEET :\\n\\t\\t\\t\\t\\t\\t 10^6 J')\n",
+ "print'%s %.2f %s %.2f %s '%('percentage',a,'\\t' 'Heat supplied by coal ',h_sup,'')\n",
+ "print'%s %.2f %s %.2f %s '%('percentage',b,'\\t' 'Heat absorbed by water ',H_w,'' )\n",
+ "print'%s %.2f %s %.2f %s '%('percentage',c,'\\t' 'Heat in flue gas',H_f,'') \n",
+ "print'%s %.2f %s %.2f %s '%('percentage',d,'\\t' 'Heat in unburnt carbon',H_uc,'') \n",
+ "print'%s %.2f %s %.2f %s '%('percentage',e,'\\t' 'unaccounted heat losses',un_acc,'')\n",
+ "print'%s %.2f %s %.2f %s '%('TOTALpercentage ',T,'\\t' 'TOTAL heat supplied',h_sup,'')\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 6.11\n",
+ "\n",
+ "\n",
+ "Page No. 167\n",
+ "\n",
+ "\n",
+ " THERMAL BALANCE SHEET :\n",
+ "\t\t\t\t\t\t 10^6 J\n",
+ "percentage 100.00 \tHeat supplied by coal 33.50 \n",
+ "percentage 75.53 \tHeat absorbed by water 25.30 \n",
+ "percentage 17.99 \tHeat in flue gas 6.03 \n",
+ "percentage 1.22 \tHeat in unburnt carbon 0.41 \n",
+ "percentage 5.26 \tunaccounted heat losses 1.76 \n",
+ "TOTALpercentage 100.00 \tTOTAL heat supplied 33.50 \n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex12-pg168"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 6.12\n",
+ "print('Example 6.12');\n",
+ "print('Page No. 168');\n",
+ "\n",
+ "## given\n",
+ "C_Rate = 2920.;## Coal consumption rate in kg/h\n",
+ "S_Rate = 22.5*10**3;## Steam consumption rate in kg/h\n",
+ "Ps = 20.;## Steam pressure in bar\n",
+ "Ts = 350.;## Steam Temperature in degree celcius\n",
+ "Tf_in = 70.;## Feed water temperature inlet economiser in degree celcius\n",
+ "Tf_out = 110.;## Feed water temperature outlet economiser in degree celcius\n",
+ "Tm_b = 25.;## Mean Boiler house temperature in degree celcius\n",
+ "Tm_f = 260.;## Mean exit flue gas temperature in degree celcius\n",
+ "CO2_f = 15.8;## CO2 content of dry exit flue gas by volume\n",
+ "CO_f = 0.;## CO content of dry exit flue gas by volume\n",
+ "C_ash = 0.025;## Carbon in ash in [%]\n",
+ "G = 0.005;## Grit produced in [%]\n",
+ "##Analysis of coal(as fired)\n",
+ "M = 0.105;## Moisture [%]\n",
+ "VM = 0.308;##Volatile matter [%]\n",
+ "FC = 0.497;## FIxed carbon [%]\n",
+ "Ash =0.09;## ASh [%]\n",
+ "C = 0.66;## Carbon percentage - [%]\n",
+ "H2 = 0.042;## Hydrogen percentage - [%]\n",
+ "S = 0.015;## Sulphur percentage - [%]\n",
+ "N2 = 0.012;## Nitrogen percentage - [%]\n",
+ "O2 = 0.076;## Oxygen percentage - [%]\n",
+ "H20 = 0.105;## Moisture percentage - [%]\n",
+ "G_CV = 26.90;## Gross Calorific Value in 10**6 J/kg\n",
+ "CV_C = 33.8*10**6;## Calorif Value of carbon in J/kg\n",
+ "CV_G = 33.8*10**6;## Calorif Value of Grit in J/kg\n",
+ "Ps_l = 20.;## Pressure of steam leaving the boiler in bar\n",
+ "\n",
+ "##(a) Calculation of excess air usage\n",
+ "##(a.1) Theoretical oxygen requirement\n",
+ "F = 1.;## Fuel feed required in kg\n",
+ "w_C = 12.; ## mol. weight of C\n",
+ "w_H2 = 2.; ##mol. weight of H2\n",
+ "w_S = 32.; ##mol. weight of S\n",
+ "w_N2 = 28.; ## mol. weight of N2\n",
+ "w_O2 = 32.; ## mol. weight of O2\n",
+ "##Basis- Per kg of fuel\n",
+ "mol_C = C / w_C;## kmol of C\n",
+ "mol_H2 = H2 /w_H2;##kmol of H2\n",
+ "mol_S = S /w_S;##kmol of S\n",
+ "mol_N2 = N2 /w_N2;##kmol of N2\n",
+ "mol_O2 = O2 /w_O2;##kmol of O2\n",
+ "##Calculation of excess air\n",
+ "C_req = mol_C*1;##O2 required by entering C given by reaction C+O2->CO2 in kmol\n",
+ "H_req = mol_H2*0.5;##O2 required by entering H2 given by reaction H2+(1/2)O2->H20 in kmol\n",
+ "S_req = mol_S*1;##O2 required by entering S given by reaction S+O2->SO2 in kmol\n",
+ "O2_req = (C_req + H_req + S_req) - mol_O2;## in kmol\n",
+ "N2_air = (O2_req*76.8)/23.2;## in kmol (considering air consists of 76.8% N2 and 23.2% O2 )\n",
+ "print('(a.1) ')\n",
+ "print'%s %.2f %s'%('Total number of kmol of O2 required per kg of fuel is ',O2_req,' kmol ')\n",
+ "print'%s %.2f %s'%('N2 associated with O2 is ',N2_air,' kmol ')\n",
+ "\n",
+ "##(a.2) Theoretical CO2 content of dry flue gas\n",
+ "T = C_req + S_req + mol_N2 + N2_air;## Total flue gas in kmol\n",
+ "CO2 = (C_req/T)*100.;## in [%]\n",
+ "print('(a.2) ')\n",
+ "print'%s %.2f %s'%('Theoretical CO2 content of dry flue gas in percentage is ',CO2,' ')\n",
+ "\n",
+ "##(a.3)Excess air based on CO2 content\n",
+ "Ex_air = ((CO2 - CO2_f)/CO2_f)*100.;## in [%]\n",
+ "print('(a.3) ')\n",
+ "print'%s %.2f %s'%('Excess air based on CO2 content in percentage is ',math.floor(Ex_air),'')\n",
+ "\n",
+ "\n",
+ "##(b) Fuel gas components\n",
+ "##(b.1) Composition per kg fuel\n",
+ "w_CO2 = 44.;## mol. weight of CO2\n",
+ "w_SO2 = 64.;## mol. weight of SO2\n",
+ "## FOR DRY GAS\n",
+ "CO2_d = C_req * w_CO2;## In kg/kg\n",
+ "SO2_d = S_req * w_SO2;## In kg/kg\n",
+ "N2_d = mol_N2 * w_N2;## N2 from fuel In kg/kg\n",
+ "N2_air_d = N2_air * w_N2;## N2 from air In kg/kg\n",
+ "T_N2 = N2_d + N2_air_d;## In kg/kg\n",
+ "T_dry = CO2_d + SO2_d + T_N2;## In kg/kg\n",
+ "print('(b.1) ')\n",
+ "print('Composition of dry gas ')\n",
+ "print'%s %.2f %s'%('CO2 ',CO2_d,'')\n",
+ "print'%s %.2f %s'%('SO2 ',SO2_d,'')\n",
+ "print'%s %.2f %s'%('N2 from fuel ',N2_d,'')\n",
+ "print'%s %.2f %s'%('N2 from air ',N2_air_d,'')\n",
+ "print'%s %.2f %s'%('Total dry air ',T_dry,'kg/kg')\n",
+ "\n",
+ "##FOR WET GAS\n",
+ "w_H2O = 18.;## mol. weight of H2O\n",
+ "H2O_f = M;## H2O from fuel\n",
+ "H2O_H2 = mol_H2 * w_H2O;## H2O from H2\n",
+ "T_H2O = H2O_f + H2O_H2;## in kg/kg\n",
+ "print('Composition of wet gas ')\n",
+ "print'%s %.2f %s'%('H2O from fuel ',H2O_f,'')\n",
+ "print'%s %.2f %s'%('H2O from H2 ',H2O_H2,'')\n",
+ "print'%s %.2f %s'%('Total H2O in wet gas ',T_H2O,'kg/kg')\n",
+ "\n",
+ "##FOR DRY EXCESS AIR\n",
+ "O2_dry_ex = O2_req * w_O2 *0.3;##in kg/kg\n",
+ "N2_dry_ex = N2_air * w_N2 *0.3;##in kg/kg \n",
+ "T_dry_ex = O2_dry_ex + N2_dry_ex;## in kg/kg\n",
+ "print('Composition of dry excess air ')\n",
+ "print'%s %.2f %s'%('O2 ',O2_dry_ex,'')\n",
+ "print'%s %.2f %s'%('N2 ',N2_dry_ex,'')\n",
+ "print'%s %.2f %s'%('Total dry excess air ',T_dry_ex,'kg/kg')\n",
+ "\n",
+ "##(b.2) Enthalpy\n",
+ "## From steam table or from the appendix C.2; at the given pressure and temperatures, the following specific heat capacity for different gases are obtained\n",
+ "Cp_CO2_T1 = 1.04*10**3;## Specific heat Capacity of CO2 at temperature Tm_f in J/kg-K\n",
+ "Cp_CO2_T2 = 0.85*10**3;## Specific heat Capacity of CO2 at temperature Tm_b in J/kg-K\n",
+ "Cp_SO2_T1 = 0.73*10**3;## Specific heat Capacity of SO2 at temperature Tm_f in J/kg-K\n",
+ "Cp_SO2_T2 = 0.62*10**3;## Specific heat Capacity of SO2 at temperature Tm_b in J/kg-K\n",
+ "Cp_N2_T1 = 1.07*10**3;## Specific heat Capacity of N2 at temperature Tm_f in J/kg-K\n",
+ "Cp_N2_T2 = 1.06*10**3;## Specific heat Capacity of N2 at temperature Tm_b in J/kg-K\n",
+ "Cp_O2_T1 = 0.99*10**3;## Specific heat Capacity of O2 at temperature Tm_f in J/kg-K\n",
+ "Cp_O2_T2 = 0.91*10**3;## Specific heat Capacity of O2 at temperature Tm_b in J/kg-K\n",
+ "\n",
+ "Cp_dry_T1 = ((CO2_d * Cp_CO2_T1) + (SO2_d * Cp_SO2_T1) + (T_N2 * Cp_N2_T1))/T_dry;## in J/kg-K\n",
+ "Cp_dry_T2 = ((CO2_d * Cp_CO2_T2) + (SO2_d * Cp_SO2_T2) + (T_N2 * Cp_N2_T2))/T_dry;## in J/kg-K\n",
+ "Cp_air_T1 = ((O2_dry_ex * Cp_O2_T1) + (N2_dry_ex * Cp_N2_T1))/T_dry_ex;## in J/kg-K\n",
+ "Cp_air_T2 = ((O2_dry_ex * Cp_O2_T2) + (N2_dry_ex * Cp_N2_T2))/T_dry_ex;## in J/kg-K\n",
+ "print('(b.2) ')\n",
+ "print'%s %.2f %s'%('Specific heat Capacity of dry gas at 260 deg C is ',Cp_dry_T1,' J/kg-K ')\n",
+ "print'%s %.2f %s'%('Specific heat Capacity of dry gas at 25 deg C is ',Cp_dry_T2,' J/kg-K')\n",
+ "print'%s %.2f %s'%('Specific heat Capacity of dry excess air at 260 deg C is ',Cp_air_T1,' J/kg-K ')\n",
+ "print'%s %.2f %s'%('Specific heat Capacity of dry excess air at 25 deg C is ',Cp_air_T2,' J/kg-K ')\n",
+ "\n",
+ "## From Steam table or Appendix B.3, Enthalpy of superheated steam is obtained at 260 deg C and 1 bar\n",
+ "E_s = 2995.*10**3;##in J/kg-K\n",
+ "\n",
+ "##(c) Heat transferred to water\n",
+ "E_w = S_Rate / C_Rate;## Evaporation of water per kg of fuel in kg\n",
+ "E = (E_w*(461. - 293.)*10**3)/10**6;## in 10**6 J\n",
+ "B = (E_w*(2797. - 461.)*10**3)/10**6;## in 10**6 J\n",
+ "S = (E_w*(3139. - 2797.)*10**3)/10**6;## in 10**6 J\n",
+ "print('(c) ')\n",
+ "print'%s %.2f %s'%('Heat to water in Economiser is ',E,' *10^6 J ')\n",
+ "print'%s %.2f %s'%('Heat to water in Boiler is ',B,' *10^6 J ')\n",
+ "print'%s %.2f %s'%('Heat to water in Superheater is ',S,' *10^6 J ')\n",
+ "\n",
+ "##(d) Heat loss in flue gas\n",
+ "hl = 1056*10**3;## Enthalpy of steam at 25 deg C (from steam table) in J/kg-K\n",
+ "loss_dry = T_dry*((Tm_f*Cp_dry_T1) - (Tm_b*Cp_dry_T2))/10**6;## in 10**6 J\n",
+ "loss_wet = T_H2O*(E_s - hl)/10**6;## in 10**6 J\n",
+ "loss_ex_air = T_dry_ex*((Tm_f*Cp_air_T1) - (Tm_b*Cp_air_T2))/10**6;## in 10**6 J\n",
+ "print('(d) ')\n",
+ "print'%s %.2f %s'%('Heat loss in dry flue gas is ',loss_dry,' *10^6 J ')\n",
+ "print'%s %.2f %s'%('Heat loss in wet flue gas is ',loss_wet,' *10^6 J ')\n",
+ "print'%s %.2f %s'%('Heat loss in dry excess air is ',loss_ex_air,' *10^6 J ')\n",
+ "\n",
+ "##(e) Heat loss in combustile matter in ash\n",
+ "loss_ash = (Ash * C_ash * CV_C)/10**6;## in 10**6 J\n",
+ "print'%s %.2f %s'%('(e) Heat loss in combustile matter in ash is ',loss_ash,' *10^6 J ')\n",
+ "\n",
+ "##(f) Heat loss in grit\n",
+ "loss_grit = (G * CV_G)/10**6;## in 10**6 J\n",
+ "print'%s %.2f %s'%('(f) Heat loss in grit is ',loss_grit,' *10^6 J ')\n",
+ "\n",
+ "##(g) Radiation and unaccounted heat loss\n",
+ "h_sup = G_CV;## Heat supplied by the coal in 10**6 J\n",
+ "loss_rad = (h_sup - (E + B + S + loss_dry + loss_wet + loss_ex_air + loss_ash + loss_grit));## Radiation and unaccounted loss in 10**6 J\n",
+ "a = (h_sup/h_sup)*100.;\n",
+ "b = (E/h_sup)*100.;\n",
+ "c = (B/h_sup)*100.;\n",
+ "d = (S/h_sup)*100.;\n",
+ "e = (loss_dry/h_sup)*100.;\n",
+ "f = (loss_wet/h_sup)*100.;\n",
+ "g = (loss_ex_air/h_sup)*100.;\n",
+ "h = (loss_ash/h_sup)*100.;\n",
+ "i = (loss_grit/h_sup)*100.;\n",
+ "j = (loss_rad/h_sup)*100.;\n",
+ "T = b + c + d + e + f + g + h + i + j;\n",
+ "print('(g) THERMAL BALANCE SHEET :\\t percentage \\t\\t\\t 10**6 J ') \n",
+ "print'%s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t percentage',a,'\\t' 'Heat supplied by coal ',h_sup,'')\n",
+ "print'%s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t percentage',b,'\\t' 'Heat absorbed to loss in economiser ',E,'' )\n",
+ "print'%s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t percentage',c,'\\t' 'boiler',B,'') \n",
+ "print'%s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t percentage',d,'\\t' 'superheater',S,'') \n",
+ "print'%s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t percentage',e,'\\t' 'heat loss in :dry flue gas',loss_dry,'')\n",
+ "print'%s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t percentage',f,'\\t' 'wet flue gas ',loss_wet,'')\n",
+ "print'%s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t percentage',g,'\\t' 'dry eecess air ',loss_ex_air,'' )\n",
+ "print'%s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t percentage',h,'\\t' 'heat loss in ash',loss_ash,'') \n",
+ "print'%s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t percentage',i,'\\t' 'heat loss in grit',loss_grit,'') \n",
+ "print'%s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\t\\t\\t percentage',j,'\\t' 'radiation and unaccounted heat losses',loss_rad,'')\n",
+ "print'%s %.2f %s %.2f %s '%('\\t\\t\\t\\t\\tTOTAL percentage ',T,'\\t' 'TOTAL heat supplied',h_sup,'')\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 6.12\n",
+ "Page No. 168\n",
+ "(a.1) \n",
+ "Total number of kmol of O2 required per kg of fuel is 0.06 kmol \n",
+ "N2 associated with O2 is 0.21 kmol \n",
+ "(a.2) \n",
+ "Theoretical CO2 content of dry flue gas in percentage is 20.64 \n",
+ "(a.3) \n",
+ "Excess air based on CO2 content in percentage is 30.00 \n",
+ "(b.1) \n",
+ "Composition of dry gas \n",
+ "CO2 2.42 \n",
+ "SO2 0.03 \n",
+ "N2 from fuel 0.01 \n",
+ "N2 from air 5.89 \n",
+ "Total dry air 8.36 kg/kg\n",
+ "Composition of wet gas \n",
+ "H2O from fuel 0.10 \n",
+ "H2O from H2 0.38 \n",
+ "Total H2O in wet gas 0.48 kg/kg\n",
+ "Composition of dry excess air \n",
+ "O2 0.61 \n",
+ "N2 1.77 \n",
+ "Total dry excess air 2.38 kg/kg\n",
+ "(b.2) \n",
+ "Specific heat Capacity of dry gas at 260 deg C is 1060.09 J/kg-K \n",
+ "Specific heat Capacity of dry gas at 25 deg C is 997.61 J/kg-K\n",
+ "Specific heat Capacity of dry excess air at 260 deg C is 1049.47 J/kg-K \n",
+ "Specific heat Capacity of dry excess air at 25 deg C is 1021.50 J/kg-K \n",
+ "(c) \n",
+ "Heat to water in Economiser is 1.29 *10^6 J \n",
+ "Heat to water in Boiler is 18.00 *10^6 J \n",
+ "Heat to water in Superheater is 2.64 *10^6 J \n",
+ "(d) \n",
+ "Heat loss in dry flue gas is 2.09 *10^6 J \n",
+ "Heat loss in wet flue gas is 0.94 *10^6 J \n",
+ "Heat loss in dry excess air is 0.59 *10^6 J \n",
+ "(e) Heat loss in combustile matter in ash is 0.08 *10^6 J \n",
+ "(f) Heat loss in grit is 0.17 *10^6 J \n",
+ "(g) THERMAL BALANCE SHEET :\t percentage \t\t\t 10**6 J \n",
+ "\t\t\t\t\t\t\t percentage 100.00 \tHeat supplied by coal 26.90 \n",
+ "\t\t\t\t\t\t\t percentage 4.81 \tHeat absorbed to loss in economiser 1.29 \n",
+ "\t\t\t\t\t\t\t percentage 66.91 \tboiler 18.00 \n",
+ "\t\t\t\t\t\t\t percentage 9.80 \tsuperheater 2.64 \n",
+ "\t\t\t\t\t\t\t percentage 7.79 \theat loss in :dry flue gas 2.09 \n",
+ "\t\t\t\t\t\t\t percentage 3.48 \twet flue gas 0.94 \n",
+ "\t\t\t\t\t\t\t percentage 2.19 \tdry eecess air 0.59 \n",
+ "\t\t\t\t\t\t\t percentage 0.28 \theat loss in ash 0.08 \n",
+ "\t\t\t\t\t\t\t percentage 0.63 \theat loss in grit 0.17 \n",
+ "\t\t\t\t\t\t\t percentage 4.11 \tradiation and unaccounted heat losses 1.11 \n",
+ "\t\t\t\t\tTOTAL percentage 100.00 \tTOTAL heat supplied 26.90 \n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex13-pg188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 6.13\n",
+ "print('Example 6.13\\n\\n');\n",
+ "print('Page No. 188\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "P = 1.5;## Pressure in bar\n",
+ "T = 111.;## Temperature in degree celcius\n",
+ "m = 2.;## mass flow rate of process liquid in kg/s\n",
+ "Cp = 4.01*10**3;## Mean Specific heat capacity in J/kg_K\n",
+ "Tl_i = 20.;## Inlet temperature of liquid in degree celcius\n",
+ "Tl_o = 90.;## Outlet temperature of liquid in degree celcius\n",
+ "Ps = 15.;## Pressure of steam in bar\n",
+ "X = 0.97;## Dryness fraction of steam\n",
+ "Pa = 1.5;##Pressure after adiabatic expansion in bar\n",
+ "Ta = 80.;## Temperature of injecting condensate in degree celcius\n",
+ "\n",
+ "##(a)\n",
+ "Q = m*Cp*(Tl_o - Tl_i);## in W\n",
+ "L = 2227.*10**3;## Latent heat of 1.5 bar steam in J/kg\n",
+ "m_a = Q/L;\n",
+ "print'%s %.2f %s'%('(a) Mass flow rate of 1.5 bar steam is ',m_a,' kg/s \\n')\n",
+ "\n",
+ "##(b)\n",
+ "##from steam table, Specific enthalpy of 0.97 dry 15 bar absolute steam\n",
+ "h = ((843.+(X*1946.))*10**3);## in J/kg\n",
+ "##the balance for the desuperheater,when y is the mass flow rate(kg/s) of condensate at 80 deg C is,on the basis of 1kg/s of superheated steam: => (1*2731*10^3)+(335*10^3*y)=(1+y)*2693*10^3\n",
+ "y = (((2731.-2693.)*10**3)/((2693.-335.)*10**3))## in kg/s\n",
+ "m_b = m_a/(1.+y);## in kg/s\n",
+ "print'%s %.2f %s'%('(b) Mass flow rate of 15 bar steam is ',m_b,' kg/s \\n')\n",
+ "\n",
+ "##(c)\n",
+ "m_c = y*m_b;##in kg/s\n",
+ "print'%s %.2f %s'%('(c) Mass flow rate of condensateis ',m_c,' kg/s\\n')\n",
+ "\n",
+ "##(d)\n",
+ "v = 30.;## steam velocity in m/s\n",
+ "##from steam table\n",
+ "V = 1.16;## Specific volum of 1.5 bar saturated steam in m^3/kg\n",
+ "V_d = V*m_a;## in m^3/s\n",
+ "d = ((V_d*4.)/(v*math.pi))**0.5;## im m\n",
+ "print'%s %.2f %s'%('(d) The vapour main diameter is ',d,' m \\n')\n",
+ "\n",
+ "##(e)\n",
+ "l = 2.5;## Length of tubes in m\n",
+ "d_i = 10*10**-3;## Internal Diameter of tube in m\n",
+ "U = 1500.;## Overall heat transfer coefficent in W/m^2-K\n",
+ "\n",
+ "a = math.pi*d_i*l;## in m^2\n",
+ "T1 = T - Tl_i;## in degree celcius\n",
+ "T2 = T - Tl_o;## in degree celcius\n",
+ "Tm = ((T2-T1)/math.log(T2/T1));## logarithmic mean temperature of pipe in degree celcius\n",
+ "A = Q/(U*Tm);## in m^2\n",
+ "N = A/a;\n",
+ "print'%s %.2f %s'%('(e) The number of tubes required is ',N,'\\n')\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 6.13\n",
+ "\n",
+ "\n",
+ "Page No. 188\n",
+ "\n",
+ "\n",
+ "(a) Mass flow rate of 1.5 bar steam is 0.25 kg/s \n",
+ "\n",
+ "(b) Mass flow rate of 15 bar steam is 0.25 kg/s \n",
+ "\n",
+ "(c) Mass flow rate of condensateis 0.00 kg/s\n",
+ "\n",
+ "(d) The vapour main diameter is 0.11 m \n",
+ "\n",
+ "(e) The number of tubes required is 99.82 \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter7.ipynb b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter7.ipynb
new file mode 100644
index 00000000..22f82390
--- /dev/null
+++ b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter7.ipynb
@@ -0,0 +1,494 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e3fa428edfce5f478c94081237e59ea0a26c916de3a3af99238f0319f9a1a0b5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter7-Energy utilisation and\n",
+ "conversion systems\n"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 7.1\n",
+ "print('Example 7.1');\n",
+ "print('Page No. 201');\n",
+ "\n",
+ "## given\n",
+ "C = 220.*10**3;##Original annual cost of fuel in Pound\n",
+ "O_E = 73.;## Original Efficiency\n",
+ "Fl_i = 20.;## Initial Flue loss \n",
+ "Fl_f = 18.7;## Final Flue loss \n",
+ "N_E = O_E + (Fl_i - Fl_f);## New Efficiency\n",
+ "F_save = C*((N_E-O_E)/N_E);\n",
+ "print'%s %.2f %s '%('Fuel saving is',F_save,' Pound')\n",
+ "##Deviation in answer is due to some wrong calculation the book, instead of new efficiency in the denominator in line 13, the book has taken original efficiency\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 7.1\n",
+ "Page No. 201\n",
+ "Fuel saving is 3849.26 Pound \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 7.2\n",
+ "print('Example 7.2');\n",
+ "print('Page No. 201');\n",
+ "import numpy\n",
+ "##From Example 2.1\n",
+ "\n",
+ "## given\n",
+ "C= 35000.;## cost of boiler in Pound\n",
+ "C_grant=.25;## Capital grant available from goverment\n",
+ "E= -(C-(C_grant*C));## Net expenditure\n",
+ "Fs= 15250.;## Fuel Saving\n",
+ "r_i = 0.15;## interest\n",
+ "r_t = 0.55;## tax\n",
+ "\n",
+ "a = numpy.array([0, E, Fs, 0, E+Fs, r_i*(E+Fs), 0 ])\n",
+ "\n",
+ "bal_1 = (E+Fs)+(r_i*(E+Fs))-0## Total Balance after 1st year\n",
+ "\n",
+ "c_all = 0.55;## capital allowance in 2nd year\n",
+ "C_bal= (bal_1+0+Fs+(-(c_all*E)));## Cash Balance after 2nd year\n",
+ "b = ([[bal_1, 0, Fs ,-(c_all*E), C_bal, r_i*C_bal, r_t*(Fs+(r_i*C_bal))]]);\n",
+ "bal_2 = C_bal+ r_i*C_bal- r_t*(Fs+(r_i*C_bal)) ##Total Balance after 2nd year\n",
+ "\n",
+ "c = ([[bal_2, 0, Fs, 0, bal_2+Fs, r_i*(bal_2+Fs), r_t*(Fs+(r_i*(bal_2+Fs)))]])\n",
+ "\n",
+ "bal_3= (bal_2+Fs)+r_i*(bal_2+Fs)-r_t*(Fs+(r_i*(bal_2+Fs))) ## Total Balance after 3rd year\n",
+ "\n",
+ "if(bal_2>0): \n",
+ " print('Pay back period is of two year');\n",
+ "else:\n",
+ " print('Pay back period is of three year');\n",
+ "\n",
+ "\n",
+ "\n",
+ "print'%s %.2f %s '%('Total saving at the end of second year is ',bal_2,' Pound');\n",
+ "print'%s %.2f %s '%('Total saving at the end of third year is ',bal_3,' Pound');\n",
+ "## Deviation in answer due to direct substitution\n",
+ "\n",
+ "\n",
+ "print('The data in example 2.1 indicated that:- Saving could be made by replacing exising oil-fired burners by new burners requiring considerably less atomising steam. The financial saving are 15.25*10**3 Pound per year for an insulation and capital cost of 35*10**3 Pound.')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 7.2\n",
+ "Page No. 201\n",
+ "Pay back period is of two year\n",
+ "Total saving at the end of second year is 9800.03 Pound \n",
+ "Total saving at the end of third year is 18353.41 Pound \n",
+ "The data in example 2.1 indicated that:- Saving could be made by replacing exising oil-fired burners by new burners requiring considerably less atomising steam. The financial saving are 15.25*10**3 Pound per year for an insulation and capital cost of 35*10**3 Pound.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 7.3\n",
+ "print('Example 7.3');\n",
+ "print('Page No. 203');\n",
+ "\n",
+ "## given\n",
+ "C = 250.*10**3;##Original annual cost of fuel in Pound\n",
+ "O_E = 71.5;## Original Efficiency\n",
+ "Fl_i = 20.;## Initial Flue loss \n",
+ "Fl_f = 17.5;## Final Flue loss \n",
+ "N_E = O_E + (Fl_i - Fl_f);## New Efficiency\n",
+ "F_save = C*((N_E-O_E)/N_E);## in Pound\n",
+ "print'%s %.2f %s '%('Fuel saving is ',F_save,' Pound per year')\n",
+ "##Deviation in answer is due to some calculation approximation the book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 7.3\n",
+ "Page No. 203\n",
+ "Fuel saving is 8445.95 Pound per year \n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 7.4\n",
+ "print('Example 7.4\\n\\n');\n",
+ "print('Page No. 204\\n\\n');\n",
+ "\n",
+ "## This question doesnot contain any calculation part.\n",
+ "##Refer figure 7.3, 7.4, 7.5\n",
+ "T_max = 200.;## Flue gas exit temperature in degree celcius\n",
+ "print(' The company investigate four alternative methods of heat abstraction using the flue gas.\\n\\n System-1 The efficiency of the furnace without any air preheater is 79.2 per cent.\\n System-2 The efficiency of the furnace, with the air preheater only in the system operating as shown in figure 7.3, is increased to 86.6 per cent.\\n System-3 By the incorporation of the heat exchanger,the furnace efficiency is increased to 93.3 per cent using the arrangement shown in figure 7.4.\\n System-4 Using no preheating,finally achievied an overall thermal efficiency of 93.7 per cent.\\n \\t The new air preheater scheme is shown in figure 7.5.\\n\\n The pay-back period in all instances is less than 3.5 years.')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 7.4\n",
+ "\n",
+ "\n",
+ "Page No. 204\n",
+ "\n",
+ "\n",
+ " The company investigate four alternative methods of heat abstraction using the flue gas.\n",
+ "\n",
+ " System-1 The efficiency of the furnace without any air preheater is 79.2 per cent.\n",
+ " System-2 The efficiency of the furnace, with the air preheater only in the system operating as shown in figure 7.3, is increased to 86.6 per cent.\n",
+ " System-3 By the incorporation of the heat exchanger,the furnace efficiency is increased to 93.3 per cent using the arrangement shown in figure 7.4.\n",
+ " System-4 Using no preheating,finally achievied an overall thermal efficiency of 93.7 per cent.\n",
+ " \t The new air preheater scheme is shown in figure 7.5.\n",
+ "\n",
+ " The pay-back period in all instances is less than 3.5 years.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "# Example 7.5\n",
+ "print('Example 7.5\\n\\n');\n",
+ "print('Page No. 205\\n\\n');\n",
+ "\n",
+ "##The temperature difference is not given the question.\n",
+ "##Refer Table 7.1\n",
+ "T1 = 1000.;## Furnace operating temperature in degree celcius\n",
+ "##T2 is back calculated by the first condition given in table 7.1 and applying Fourier,s law of condition\n",
+ "T2 = 997.9545;## in degree Celcius()\n",
+ "dT = T1 - T2;## in degree celcius\n",
+ "t = 120.;## Continuous cycle time in h\n",
+ "K1 = 44.;## Thermal conductivity (W/m-K)\n",
+ "K2 = 11.;## Thermal conductivity (W/m-K)\n",
+ "K3 = 4.;## Thermal conductivity (W/m-K)\n",
+ "x1 = 250.*10**-3;## mm converted into m\n",
+ "x2 = 50.*10**-3;## mm converted into m\n",
+ "dT = T1 - T2;## in K\n",
+ "\n",
+ "##By Fourier,s law of heat conduction- Q = (dT *K)/x in W/sq.m\n",
+ "\n",
+ "##For 250 mm firebrick\n",
+ "Q1 = (dT *K1)/x1;## im W/sq.m\n",
+ "print'%s %.2f %s'%('Energy losses by 250 mm firebrick is ',Q1,' W/sq.m \\n')\n",
+ "\n",
+ "##For 250 mm hot-face insulation\n",
+ "Q2 = (dT *K2)/x1;## im W/sq.m\n",
+ "print'%s %.2f %s'%('Energy losses by 250 mm hot-face insulation is ',Q2,' W/sq.m \\n') ##Deviation in answer is due to assumption of T2 as its not mentioned in the question\n",
+ "\n",
+ "##For 250 mm hot-face insulation backed by 50 mm insulation\n",
+ "##As the resistances are in series - R = (x1/K1)+ (x2/K2) and Q = dt/R in W/sq.m\n",
+ "R = (x1/K2)+ (x2/K3);## in ohm\n",
+ "Q3 = dT/R;## in W/sq.m\n",
+ "print'%s %.2f %s'%('Energy losses by 250 mm hot-face insulation backed by 50 mm insulation is ',Q3,' W/sq.m \\n\\n') ##Deviation in answer is due to assumption of T2 as its not mentioned in the question\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 7.5\n",
+ "\n",
+ "\n",
+ "Page No. 205\n",
+ "\n",
+ "\n",
+ "Energy losses by 250 mm firebrick is 360.01 W/sq.m \n",
+ "\n",
+ "Energy losses by 250 mm hot-face insulation is 90.00 W/sq.m \n",
+ "\n",
+ "Energy losses by 250 mm hot-face insulation backed by 50 mm insulation is 58.07 W/sq.m \n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 7.6\n",
+ "print('Example 7.6\\n\\n');\n",
+ "print('Page No. 209\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "P = 150*10*83;## Power of compressor in W\n",
+ "F_load = .78;## full load percentage of the time\n",
+ "Re = .7;## Heat Recovery\n",
+ "T = 2200.;##Compressor operating time in h/year\n",
+ "C = 20.*10**-6;## Energy cost in Pound/Wh\n",
+ "\n",
+ "H_Re = P*F_load*Re;## in W\n",
+ "print'%s %.2f %s'%('Heat recovered is ',H_Re,' W \\n')\n",
+ "E_save = H_Re*T*C;## in Pound/year\n",
+ "print'%s %.2f %s'%('Economic Saving is ',E_save,' Pound per year')\n",
+ "##Deviation in answer is due to some calculation approximation the book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 7.6\n",
+ "\n",
+ "\n",
+ "Page No. 209\n",
+ "\n",
+ "\n",
+ "Heat recovered is 67977.00 W \n",
+ "\n",
+ "Economic Saving is 2990.99 Pound per year\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 7.7\n",
+ "print('Example 7.7\\n\\n');\n",
+ "print('Page No. 212\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "C_S = 1./10**3;## Cost of steam production in p/Wh\n",
+ "P = 75.*10**3;## Power required in W\n",
+ "T = 4.*10**3;## Production time in h/year\n",
+ "C_T = 7.*10**3;## Cost of turbine in Pound\n",
+ "R_T = 4.*10**3;## Annual running cost of turbine in W\n",
+ "C_M = 1.5*10**3;## Cost of electric motor in Pound\n",
+ "R_M = 14.*10**3;## Running cost of electric motor in Pound\n",
+ "C_M_A = 3.5/10**3;## Auunal running cost of electic motor in p/Wh\n",
+ "Save_R = R_M - R_T;## in Pound per year\n",
+ "print'%s %.e %s'%('The saving in running costs would be ',Save_R,' Pound per year')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 7.7\n",
+ "\n",
+ "\n",
+ "Page No. 212\n",
+ "\n",
+ "\n",
+ "The saving in running costs would be 1e+04 Pound per year\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex8-pg214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 7.8\n",
+ "print('Example 7.8\\n\\n');\n",
+ "print('Page No. 214\\n\\n');\n",
+ "\n",
+ "## given\n",
+ "m_s = 5.3;## Factory requirement of process steam in kg/s\n",
+ "Pr_s_1 = 2.5;## Pressure of process steam at bar absolute\n",
+ "E_load_1 = 1.10*10**3;## Electrical load requirement in W\n",
+ "E_load_2 = 1.5*10**3;## Electrical load requirement in W\n",
+ "m_e = 6.0;## Mass flow rate of generated electricity in kg/s\n",
+ "Pr_e = 14.;## Pressure of generated electricity at bar absolute\n",
+ "T_heat = 2.790*10**6;## Total heat content in J/kg\n",
+ "\n",
+ "##The 14 bar absolute steam would undergo an adiabatic heat drop and the steam will be expanded\n",
+ "h_drop = 306*10**3;## Adiabatic heat drop in J/kg\n",
+ "Pr_2 = 2.5;## Expanded pressure at bar absolute\n",
+ "Ex_stm = 0.11;## Exhaust steam percent\n",
+ "Ef_T = 0.65;## Tubine efficiency\n",
+ "R_h_drop = h_drop * Ef_T;## Real heat drop in J/kg\n",
+ "P_T = m_e * R_h_drop;## Power generated by turbine in W\n",
+ "Ef_G = 0.94;## Generator efficiency\n",
+ "P_G = 1.13*10**6;## Output of generator in W\n",
+ "\n",
+ "##(a) Combined heat and power system\n",
+ "Eq_Eva = 8;## Equivalent evaporation of steam per kg coal in kg\n",
+ "C_req = m_e/Eq_Eva;## in kg/s\n",
+ "print'%s %.2f %s'%('Coal Required is ',C_req,' kg/s\\n')\n",
+ "print('If the plant operates on a 140-h week for 50 weeks per annum the coal consumption is 18.9*0^6 kg per year.\\nAt an average price of, for example, 35 Pound per tonne, the aanual cost is 660*10^3 Pound.\\n\\n')\n",
+ "\n",
+ "##(b) Coal required for process steam\n",
+ "## for low pressure steam\n",
+ "Eq_Eva_2 = 8.25;## Equivalent evaporation of steam per kg coal in kg\n",
+ "Coal_req = m_s/Eq_Eva_2;## in kg/s\n",
+ "print'%s %.2f %s'%('Coal Required is ',Coal_req,' kg/s\\n\\n')\n",
+ "print('Assuming similar operating conditions for the plant the total coal consumption is 16.2*10^6 kg per year,\\nand the annual cost is 556*10^6 Pound.\\n')\n",
+ "\n",
+ "##(c)Electrical Power\n",
+ "print('The cost of 1.15*10^6 W of electricity for the same period of time is,assuming a cost of 23 Pound per 10^6 Wh,177*10^3Pound.\\nThe coal equivalent to generate 1.15*10^6 W of power for the grid would be about 5.0*10^6 kg per year.\\n\\nThe C.H.P. unit saves a coal equivalent of 2.3*10^6kg per year,\\nover the system generating process steam and utilizing grid electricty.\\nThe economic savings are 83*1063 Pound per year illustrating the benefits of a C.H.P. syatem in this case.')\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 7.8\n",
+ "\n",
+ "\n",
+ "Page No. 214\n",
+ "\n",
+ "\n",
+ "Coal Required is 0.75 kg/s\n",
+ "\n",
+ "If the plant operates on a 140-h week for 50 weeks per annum the coal consumption is 18.9*0^6 kg per year.\n",
+ "At an average price of, for example, 35 Pound per tonne, the aanual cost is 660*10^3 Pound.\n",
+ "\n",
+ "\n",
+ "Coal Required is 0.64 kg/s\n",
+ "\n",
+ "\n",
+ "Assuming similar operating conditions for the plant the total coal consumption is 16.2*10^6 kg per year,\n",
+ "and the annual cost is 556*10^6 Pound.\n",
+ "\n",
+ "The cost of 1.15*10^6 W of electricity for the same period of time is,assuming a cost of 23 Pound per 10^6 Wh,177*10^3Pound.\n",
+ "The coal equivalent to generate 1.15*10^6 W of power for the grid would be about 5.0*10^6 kg per year.\n",
+ "\n",
+ "The C.H.P. unit saves a coal equivalent of 2.3*10^6kg per year,\n",
+ "over the system generating process steam and utilizing grid electricty.\n",
+ "The economic savings are 83*1063 Pound per year illustrating the benefits of a C.H.P. syatem in this case.\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter8.ipynb b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter8.ipynb
new file mode 100644
index 00000000..535b79a2
--- /dev/null
+++ b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter8.ipynb
@@ -0,0 +1,761 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2afc3daa8e0273c84c299dcbf4aab5274b684182c853d9a3418cd2adcae29e4d"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter8-Electrical energy"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 8.1\n",
+ "print('Example 8.1');\n",
+ "print('Page No. 222');\n",
+ "\n",
+ "## given\n",
+ "V = 240;## Voltage in Volts\n",
+ "I = 8;## Current in Amps\n",
+ "##By ohm's law-> V = I*R\n",
+ "R = V/I;## In ohms\n",
+ "print'%s %.2f %s '%('The resistance of the given circuit is ',R,' ohms')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 8.1\n",
+ "Page No. 222\n",
+ "The resistance of the given circuit is 30.00 ohms \n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy\n",
+ "from numpy.linalg import inv\n",
+ "## Example 8.2\n",
+ "print('Example 8.2');\n",
+ "print('Page No. 223');\n",
+ "\n",
+ "## given\n",
+ "V1 = 100.;## In Volts\n",
+ "V2 = 50.;## In Volts\n",
+ "R1 = 8.;## Resistance in ohm\n",
+ "R2 = 5.;## Resistance in ohm\n",
+ "R3 = 10.;## Resistance in ohm\n",
+ "R4 = 50.;## Resistance in ohm\n",
+ "##By refering figure 8.3, and applying kirchoff's current law and kirchoff's voltage law in the given circuit diagram, we get following equations:\n",
+ "## I1 = I2 + I3\n",
+ "##V1 - R1*I1 - V2 - R3*I3 = 0\n",
+ "##V2 - R4*I3 + R3*I3 - R2*I2 = 0\n",
+ "A = ([[1, -1, -1],[8, 0, 10],[0 ,55, -10]])\n",
+ "b = ([0,50,50]);\n",
+ "x =numpy.dot(inv(A),b)\n",
+ "print'%s %.2f %s '%('The currents in I1 is ',x[0],' A ')\n",
+ "print'%s %.2f %s '%('The currents in I2 is ',x[1],' A ')\n",
+ "print'%s %.2f %s '%('The currents in I3 is ',x[2],' A ')\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 8.2\n",
+ "Page No. 223\n",
+ "The currents in I1 is 3.50 A \n",
+ "The currents in I2 is 1.31 A \n",
+ "The currents in I3 is 2.20 A \n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 8.3\n",
+ "print('Example 8.3');\n",
+ "print('Page No. 226');\n",
+ "\n",
+ "## given\n",
+ "R = 6;## Resistance in ohm\n",
+ "Xc = 16;## Capacitive resistance in ohm\n",
+ "Xl = 24;## Inductive resistance in ohm\n",
+ "Z = ((R**2) + (Xc - Xl)**2)**0.5;## Impedance in ohm\n",
+ "P_f = R/Z;## Power factor = cos(x) = 0.6\n",
+ "x = math.cos(0.6)*57.3;\n",
+ "y = math.sqrt(1 - P_f**2);##y = sin (x)\n",
+ "V = 200;## in Volts(sin wave voltage = ((200*2**1.5)*sinwt)\n",
+ "I = V/Z;## Current in Amperes\n",
+ "P = I**2 * R;## in W\n",
+ "Q = V * I * y;## in VAR\n",
+ "S = V * I;## in VA\n",
+ "print'%s %.2f %s'% ('The actual power is ',P,' W ')\n",
+ "print'%s %.2f %s'% ('The reactive power is ',Q,' VAR ')\n",
+ "print'%s %.2f %s'% ('The apparent power is ',S,' VA ')\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 8.3\n",
+ "Page No. 226\n",
+ "The actual power is 2400.00 W \n",
+ "The reactive power is 3200.00 VAR \n",
+ "The apparent power is 4000.00 VA \n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg232"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "## Example 8.4\n",
+ "print ('Example 8.4');\n",
+ "print ('Page No. 232');\n",
+ "\n",
+ "##given\n",
+ "pump_1 = 100*10**3;## Required pump in W\n",
+ "T_1 = 8;## Pump Operating time of each day\n",
+ "Inc_op = 0.5;## Increased output per cent\n",
+ "pump_ex = 50*10**3;## Extra pump requried in W\n",
+ "\n",
+ "## This question doesnot contain any calculation part.\n",
+ "print('there is no computational part in the problem')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 8.4\n",
+ "Page No. 232\n",
+ "there is no computational part in the problem\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg232"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "## Example 8.5\n",
+ "print ('Example 8.5');\n",
+ "print ('Page No. 232');\n",
+ "\n",
+ "##given\n",
+ "P = 600*10**3;## Power demand of pump in W\n",
+ "T = 8.;## Operating time in hour per day\n",
+ "red = 1.00/10**3.;## off-peak reduction in Pound per 10**3 W month\n",
+ "M_save = P*red;## Monthly saving Pound per month\n",
+ "A_save = M_save*12.;## Annual saving in Pound per year\n",
+ "print'%s %.2f %s'% ('Annual saving is ',A_save,' Pound per year')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 8.5\n",
+ "Page No. 232\n",
+ "Annual saving is 7200.00 Pound per year\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy\n",
+ "from numpy import floor\n",
+ "## Example 8.6\n",
+ "print ('Example 8.6');\n",
+ "print('Page No. 234');\n",
+ "\n",
+ "##given\n",
+ "T_lamp = 12.*10**3.;## Output for the tungsten filament lamp in lm per 10^3 W\n",
+ "F_tube = 63.*10**3.;## Output for the fluorescent tubes in lm per 10^3 W\n",
+ "Save = F_tube - T_lamp;## in W\n",
+ "print'%s %.2f %s'% ('Energy saving is ',Save,' lm per 10^3 W ')\n",
+ "\n",
+ "Save_pcent = (Save/F_tube)*100.;\n",
+ "print'%s %.2f %s'% ('Energy saving per cent is ',floor(Save_pcent),'')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 8.6\n",
+ "Page No. 234\n",
+ "Energy saving is 51000.00 lm per 10^3 W \n",
+ "Energy saving per cent is 80.00 \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 8.7\n",
+ "print('Example 8.7');\n",
+ "print ('Page No. 235');\n",
+ "\n",
+ "##given\n",
+ "N = 40.;## Number of lamps\n",
+ "T1 = 15.;## Operating time in h per day\n",
+ "P = 500.;## POwer from the lamps in W\n",
+ "T2 = 300.;## Total operating time in days per year\n",
+ "C = 2.5/10**3;## Electricity cost in p per Wh\n",
+ "\n",
+ "An_Cost = N*P*T1*T2*C*10**-2;## In euro\n",
+ "print'%s %.2f %s'% ('The Annual Cost is ',An_Cost,' Euro ')\n",
+ "\n",
+ "##Improvement in light by installing glassfibre skylights\n",
+ "T3 = 5;## Extra Time for natural lighting in h per day\n",
+ "New_An_Cost = N*P*(T1-T3)*T2*C*10**-2;## In euro\n",
+ "print'%s %.2f %s'% ('The New Annual Cost is ',New_An_Cost,' Euro ')\n",
+ "\n",
+ "Save = An_Cost - New_An_Cost;## in euro\n",
+ "print'%s %.2f %s'% ('The annual saving for a pay-back period of 2.5 years is ',Save,'')\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 8.7\n",
+ "Page No. 235\n",
+ "The Annual Cost is 2250.00 Euro \n",
+ "The New Annual Cost is 1500.00 Euro \n",
+ "The annual saving for a pay-back period of 2.5 years is 750.00 \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex8-pg236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "## Example 8.8\n",
+ "print ('Example 8.8');\n",
+ "print ('Page No. 236');\n",
+ "\n",
+ "## This question doesnot contain any calculation part.\n",
+ "\n",
+ "##By refering figure 8.7 which shows Poer factor-load curve for a motor with a capacitor and one without a capacitor.\n",
+ "print('there is no computational part in the problem')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 8.8\n",
+ "Page No. 236\n",
+ "there is no computational part in the problem\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9-pg238"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 8.9\n",
+ "print('Example 8.9');\n",
+ "print('Page No. 238');\n",
+ "\n",
+ "## This question doesnot contain any calculation part.\n",
+ "##given\n",
+ "l = 500.*10**3.;## Load in VA\n",
+ "P_F = 0.6;## Power Factor\n",
+ "Req_P_F = 0.9;## Required power factor\n",
+ "##Refer to figure 8.8\n",
+ "BC = 2.5;## units\n",
+ "C_rt = 250*10**3;## in VAR (obtained from figure 8.8)\n",
+ "print'%s %.2f %s'%('The required condenser rating is',C_rt,'')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 8.9\n",
+ "Page No. 238\n",
+ "The required condenser rating is 250000.00 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex10-pg240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy\n",
+ "from numpy.linalg import inv\n",
+ "## Example 8.10\n",
+ "print ('Example 8.10');\n",
+ "print ('Page No. 240');\n",
+ "\n",
+ "P = 100.;## Power in 10^3 W\n",
+ "C = 5.;## Charge in Euro per 10^3 per month\n",
+ "PF = ([1.0, 0.9 ,0.8, 0.7, 0.6, 0.5]);## Power factor \n",
+ "leng=len(PF)\n",
+ "for i in range (0,leng):\n",
+ "\tVA = (PF[i]/P)*C\n",
+ "\ta=VA\n",
+ "\tb=PF[i]\n",
+ "\tprint'%s %.2f %s %.2f %s'% ('Charge per month for power factor ',b,' is' ,a,'Euro')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 8.10\n",
+ "Page No. 240\n",
+ "Charge per month for power factor 1.00 is 0.05 Euro\n",
+ "Charge per month for power factor 0.90 is 0.05 Euro\n",
+ "Charge per month for power factor 0.80 is 0.04 Euro\n",
+ "Charge per month for power factor 0.70 is 0.03 Euro\n",
+ "Charge per month for power factor 0.60 is 0.03 Euro\n",
+ "Charge per month for power factor 0.50 is 0.03 Euro\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex11-pg240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 8.11\n",
+ "print('Example 8.11');\n",
+ "print ('Page No. 240');\n",
+ "\n",
+ "## This question doesnot contain any calculation part.\n",
+ "##given\n",
+ "P_F_1 = 0.7;## Initial power factor\n",
+ "P_F_2 = 0.95;## Final power factor\n",
+ "##Refer Figure 8.10\n",
+ "red_I = 26;##reduction in current in per cent\n",
+ "print'%s %.2f %s'% ('The reduction in current is ',red_I,' per cent ')\n",
+ "P_F_3 = 1.0;## Increased power factor\n",
+ "## From figure 8.10\n",
+ "Save = 4.;## per cent\n",
+ "print'%s %.2f %s'% ('Increase in power factor from 0.95-1.0 only increases saving further by a ',Save,' per cent')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 8.11\n",
+ "Page No. 240\n",
+ "The reduction in current is 26.00 per cent \n",
+ "Increase in power factor from 0.95-1.0 only increases saving further by a 4.00 per cent\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex12-pg240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "## Example 8.12\n",
+ "print ('Example 8.12');\n",
+ "print ('Page No. 240');\n",
+ "\n",
+ "## This question doesnot contain any calculation part.\n",
+ "##given\n",
+ "C = 10000.;## Installation cost of capacitors in Pound\n",
+ "P_F_1 = 0.84;## Initial power factor\n",
+ "P_F_2 = 0.97;## Final power factor\n",
+ "##Refer Figure 8.10\n",
+ "red_dem = 14.;##reduction in maximum demand in per cent\n",
+ "T = 9.;## pay-back time in months\n",
+ "\n",
+ "print'%s %.2f %s'% ('The reduction in maximum demand is',red_dem,' per cent')\n",
+ "print'%s %.2f %s'% ('The pay-back time was',T,' months')\n",
+ "## This question does not contain any calculation part.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 8.12\n",
+ "Page No. 240\n",
+ "The reduction in maximum demand is 14.00 per cent\n",
+ "The pay-back time was 9.00 months\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex13-pg244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy\n",
+ "from numpy import floor\n",
+ "## Example 8.13\n",
+ "print ('Example 8.13');\n",
+ "print ('Page No. 244');\n",
+ "\n",
+ "##given\n",
+ "T1 = 21.;## in degree celcius\n",
+ "t1 = 8.;## time in h per day\n",
+ "c = 3.5;## cost in p per unit\n",
+ "C1 = 38.;## Total cost in Pound per 10^3 W\n",
+ "\n",
+ "T2 = 16.;## in degree celcius\n",
+ "t2 = 8.;## time in h per day\n",
+ "C2 = 27.;## Total cost in Pound per 10^3 W\n",
+ "\n",
+ "Save = C1 - C2;## Saving in Pound per 10^3 W\n",
+ "Save_deg = Save/(T1 - T2);## Total Saving in Pound per 10^3 W for each degree drop\n",
+ "Save_per = (Save_deg/C1)*100.;## Saving in percent\n",
+ "print'%s %.2f %s'% ('For each degree drop, an energy saving of ',floor(Save_per),' per cent is achieved')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 8.13\n",
+ "Page No. 244\n",
+ "For each degree drop, an energy saving of 5.00 per cent is achieved\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex14-pg245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 8.14\n",
+ "print ('Example 8.14');\n",
+ "print ('Page No. 245');\n",
+ "\n",
+ "## This question doesnot contain any calculation part.\n",
+ "##refer Table 8.6\n",
+ "O_1 = 1750.;\n",
+ "O_2 = 0.;\n",
+ "O_3 = 2.;\n",
+ "O_4 = 150.;\n",
+ "O_5 = 1900.;\n",
+ "O_6 = 0.;\n",
+ "I_1 = 580.;\n",
+ "I_2 = 1658.;\n",
+ "I_3 = 0.5;\n",
+ "I_4 = 40.;\n",
+ "I_5 = 1698.;\n",
+ "I_6 = 11.;\n",
+ "D_1 = 300.;\n",
+ "D_2 = 869.;\n",
+ "D_3 = 0.5;\n",
+ "D_4 = 40.;\n",
+ "D_5 = 900.;\n",
+ "D_6 = 37.;\n",
+ "print(' \\t\\t\\t\\t\\t\\t ENERGY COSTS FOR HEATING STEEL BILLETS')\n",
+ "print('components\\t\\t\\t\\t\\t\\t kmol \\t\\t\\t\\t\\t\\t % Composition by volume' '\\n\\n\\n')\n",
+ "print('\\t\\t\\t\\t\\t\\t\\t (1)Oil fired \t (2)Induction \t (3)Direct resistance')\n",
+ "print'%s %.2f %s %.2f %s %.2f %s '%('Components(10^3 W/tonne) \\t\\t ',O_1,' \\t\\t ',I_1,' \\t\\t ',D_1,'')\n",
+ "print'%s %.2f %s %.2f %s %.2f %s '%('Fuel(electricity) \\t\\t ' ,O_2,' \\t\\t ',I_2,' \\t\\t ',D_2,'')\n",
+ "print'%s %.2f %s %.2f %s %.2f %s '%('Components(10^3 W/tonne) \\t\\t ',O_3,' \\t\\t ',I_3,' \\t\\t ',D_3,'')\n",
+ "print'%s %.2f %s %.2f %s %.2f %s '%('Components(10^3 W/tonne) \\t\\t ',O_4,' \\t\\t ',I_4,' \\t\\t ',D_4,'')\n",
+ "print'%s %.2f %s %.2f %s %.2f %s '%('Components(10^3 W/tonne) \\t\\t ',O_5,' \\t\\t ',I_5,' \\t\\t ',D_5,'')\n",
+ "print'%s %.2f %s %.2f %s %.2f %s '%('Components(10^3 W/tonne) \\t\\t ',O_6,' \\t\\t ',I_6,' \\t\\t ',D_6,'')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 8.14\n",
+ "Page No. 245\n",
+ " \t\t\t\t\t\t ENERGY COSTS FOR HEATING STEEL BILLETS\n",
+ "components\t\t\t\t\t\t kmol \t\t\t\t\t\t % Composition by volume\n",
+ "\n",
+ "\n",
+ "\n",
+ "\t\t\t\t\t\t\t (1)Oil fired \t (2)Induction \t (3)Direct resistance\n",
+ "Components(10^3 W/tonne) \t\t 1750.00 \t\t 580.00 \t\t 300.00 \n",
+ "Fuel(electricity) \t\t 0.00 \t\t 1658.00 \t\t 869.00 \n",
+ "Components(10^3 W/tonne) \t\t 2.00 \t\t 0.50 \t\t 0.50 \n",
+ "Components(10^3 W/tonne) \t\t 150.00 \t\t 40.00 \t\t 40.00 \n",
+ "Components(10^3 W/tonne) \t\t 1900.00 \t\t 1698.00 \t\t 900.00 \n",
+ "Components(10^3 W/tonne) \t\t 0.00 \t\t 11.00 \t\t 37.00 \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15-pg247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 8.15\n",
+ "print('Example 8.15\\n\\n');\n",
+ "print('Page No. 247\\n\\n');\n",
+ "\n",
+ "## This question doesnot contain any calculation part.\n",
+ "##refer Table 8.7\n",
+ "El = 35.;## Percentage of electricity produced from primary fuel\n",
+ "En_1 = 50.;## Endothermic gas (m^3)\n",
+ "En_2 = 100.;## Endothermic gas (m^3)\n",
+ "En_3 = 200.;## Endothermic gas (m^3)\n",
+ "G_1 = 97.;## Gas use (10^3 Wh)\n",
+ "G_2 = 194.;## Gas use (10^3 Wh)\n",
+ "G_3 = 386.;## Gas use (10^3 Wh)\n",
+ "El_1 = 24.;## Electricity use (10^3 Wh)\n",
+ "El_2 = 48.;## Electricity use (10^3 Wh)\n",
+ "El_3 = 95.;## Electricity use (10^3 Wh)\n",
+ "P_1 = 69.;## Primary energy (10^3 Wh)\n",
+ "P_2 = 137.;## Primary energy (10^3 Wh)\n",
+ "P_3 = 271.;## Primary energy (10^3 Wh)\n",
+ "Endothermicgas=['50 \\t\\t', '100 \\t\\t ','200 \\t\\t ']\n",
+ "gasuse= ['\\t\\t 97 \\t\\t ','\\t\\t194 \\t\\t ','\\t\\t 386 \\t\\t ']\n",
+ "electricityuse=[' \\t\\t 24 ',' \\t\\t 48\\t\\t ',' \\t\\t 95 \\t']\n",
+ "primaryenergy= [' \\t\\t 69 ',' 137 ',' \\t 271 ']\n",
+ "print('Endothermicgas\\t\\t gasuse\\t\\t electricityuse \\t\\t primaryenergy')\n",
+ "\n",
+ "for row in zip(Endothermicgas , gasuse, electricityuse,primaryenergy):\n",
+ "\tprint ' '.join(row)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 8.15\n",
+ "\n",
+ "\n",
+ "Page No. 247\n",
+ "\n",
+ "\n",
+ "Endothermicgas\t\t gasuse\t\t electricityuse \t\t primaryenergy\n",
+ "50 \t\t \t\t 97 \t\t \t\t 24 \t\t 69 \n",
+ "100 \t\t \t\t194 \t\t \t\t 48\t\t 137 \n",
+ "200 \t\t \t\t 386 \t\t \t\t 95 \t \t 271 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter9.ipynb b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter9.ipynb
new file mode 100644
index 00000000..271b7908
--- /dev/null
+++ b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/Chapter9.ipynb
@@ -0,0 +1,723 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:ecf6c25d050cb67c2d6108384bdb4d395e1d33e1a117952976bf67a230d01af6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter9-Building construction\n"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 9.1\n",
+ "print('Example 9.1\\n\\n');\n",
+ "print('Page No. 252\\n\\n');\n",
+ "\n",
+ "##given\n",
+ "a = 40.;## in m\n",
+ "b = 25.;## in m\n",
+ "c = 20.;## in m\n",
+ "d = 10.;## in m\n",
+ "e = 5.;## in m\n",
+ "f = 2.;## in m\n",
+ "g = 3.;## in m\n",
+ "h = 6.;## in m\n",
+ "\n",
+ "##(1) Production Area\n",
+ "T1 = 21.;## Temperature difference in degree celcius\n",
+ "T2 = -3.;## Temperature difference in degree celcius\n",
+ "U1 = 1.2;## heat transfer coefficent in W/m-K\n",
+ "U2 = 5.6;## heat transfer coefficent in W/m-K\n",
+ "U3 = 2.0;## heat transfer coefficent in W/m-K\n",
+ "U4 = 0.7;## heat transfer coefficent in W/m-K\n",
+ "U5 = 0.9;## heat transfer coefficent in W/m-K\n",
+ "## As Q = U*A*T\n",
+ "Q1 = (b*h)*U1*T1;## Heat loss in W. wall in W\n",
+ "Q2 = (((a-c)*h) + (d*h) + (d*f))*U1*T1;## Heat loss in N. wall in W\n",
+ "Q3 = (c*f)*U2*T1;## Heat loss in N. window in W\n",
+ "Q4 = (b*g)*U3*T2;## Heat loss in N. wall/internal in W\n",
+ "Q5 = (b*g)*U1*T1;## Heat loss in E. wall/external in W\n",
+ "Q6 = (((a-c)*h) + (d*h) + (d*f))*U1*T1;## Heat loss in S. wall in W\n",
+ "Q7 = (c*f)*U2*T1;## Heat loss in S. window in W\n",
+ "Q8 = (b*a)*U4*T1;## Heat loss in roof in W\n",
+ "Q9 = (b*a)*U5*T1;## Heat loss in floor in W\n",
+ "T_Q_P = Q1 + Q2 + Q3 + Q4 + Q5 + Q6 + Q7 + Q8 + Q9;## in W\n",
+ "\n",
+ "##For Office surface\n",
+ "T3 = 24;## Temperature difference in degree celcius\n",
+ "T4 = 3;## Temperature difference in degree celcius\n",
+ "## As Q = U*A*T\n",
+ "Q_1 = (b*g)*U3*T4;## Heat loss in W. wall in W\n",
+ "Q_2 = (d*g)*U1*T3;## Heat loss in N. wall in W\n",
+ "Q_3 = (((b-(2*e))*g) +(e*f))*U1*T3;## Heat loss in E. Wall in W\n",
+ "Q_4 = (e*f)*U2*T3;## Heat loss in E. window in W\n",
+ "Q_5 = (e*f)*U2*T3;## Heat loss in E. window in W\n",
+ "Q_6 = (d*g)*U1*T3;## Heat loss in S. wall in W\n",
+ "Q_7 = (b*d)*U4*T3;## Heat loss in S. roof in W\n",
+ "Q_8 = (b*d)*U5*T3;## Heat loss in floor in W\n",
+ "T_Q_O = Q_1 + Q_2 + Q_3 + Q_4 + Q_5 + Q_6 + Q_7 + Q_8; ##in W\n",
+ "\n",
+ "T_Q = T_Q_P + T_Q_O;## in W\n",
+ "print'%s %.2f %s'%('Total building fabric loss is ',T_Q,' W')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 9.1\n",
+ "\n",
+ "\n",
+ "Page No. 252\n",
+ "\n",
+ "\n",
+ "Total building fabric loss is 74358.00 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 9.2\n",
+ "print('Example 9.2\\n\\n');\n",
+ "print('Page No. 255\\n\\n');\n",
+ "\n",
+ "##given\n",
+ "L_Br = 0.105;## Length of brickwork in m\n",
+ "L_Bl = 0.100;## Length of blockwork in m\n",
+ "L_C = 0.05;## Length of cavity in m\n",
+ "K_Br = 0.84;## Thermal conductivity of brickwork in W/m-K\n",
+ "K_Bl = 0.22;## Thermal conductivity of blockwork in W/m-K\n",
+ "K_C_in = 0.033;## Thermal conductivity of insulation in cavity in W/m-K\n",
+ "R_Ex = 0.055;## Resistance of external surface in W/m^2-K\n",
+ "\n",
+ "##As R = L/K\n",
+ "R_Br = (L_Br/K_Br);## Resistance of brickwork in W/m^2-K\n",
+ "R_Bl = (L_Bl/K_Bl);## Resistance of blockwork in W/m^2-K\n",
+ "R_C = 0.18;## Resistance of cavity in W/m^2-K\n",
+ "\n",
+ "##Without insulation of cavity\n",
+ "R_T = 0.938;## Total Resistance in W/m^2-K\n",
+ "## Thermal transmittance - U = (1/R_T)\n",
+ "U = (1./R_T);## in W/m^2-K\n",
+ "print'%s %.2f %s'%('The U-value of external wall is ',U,' W/sq.m K \\n')\n",
+ "\n",
+ "##With insulation of cavity\n",
+ "##As R = L/K\n",
+ "R_C_in = (L_C/K_C_in);## Resistance of insulation in cavity in W/m^2-K\n",
+ "In = R_C_in - R_C;## Net increase in W/m^2-K\n",
+ "R_T_New = R_T + In;## New total resistance in W/m^2-K\n",
+ "## Thermal transmittance - U = (1/R_T)\n",
+ "U_New = (1./R_T_New);## in W/m^2-K\n",
+ "print'%s %.2f %s'%('The new U-value is with foamed insulation ',U_New,' W/sq.m K')\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 9.2\n",
+ "\n",
+ "\n",
+ "Page No. 255\n",
+ "\n",
+ "\n",
+ "The U-value of external wall is 1.07 W/sq.m K \n",
+ "\n",
+ "The new U-value is with foamed insulation 0.44 W/sq.m K\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 9.3\n",
+ "print('Example 9.3\\n\\n');\n",
+ "print('Page No. 256\\n\\n');\n",
+ "\n",
+ "##given\n",
+ "N_1 = 1.5;## Ventilation rate in the production area (air changes per hour)\n",
+ "N_2 = 1.0;## Ventilation rate in the office suite (air changes per hour)\n",
+ "\n",
+ "##From example 9.1\n",
+ "V_P = 6000.;## Voulme of production area in m^3\n",
+ "V_O = 750.;## Voulme of office suite in m^3\n",
+ "T1 = 21.;## Temperature difference in degree celcius\n",
+ "T2 = -3.;## Temperature difference in degree celcius\n",
+ "T_P = 18.;## Temperature difference in degree celcius\n",
+ "F_loss = 74.4*10**3;## Total fabric loss in W\n",
+ "\n",
+ "## As Q_vent = 0.33 * N * V * (T1 - T2)\n",
+ "Q_vent_P = 0.33 * N_1 * V_P * (T_P - T2);## Ventilation loss in production area in W\n",
+ "Q_vent_O = 0.33 * N_2 * V_O * (T1 - T2);## Ventilation loss in office suite in W\n",
+ "V_loss = Q_vent_P + Q_vent_O;## Total ventilation loss in W\n",
+ "T_loss = F_loss + V_loss;## Total heat loss in W\n",
+ "p = (V_loss/T_loss)*100.;\n",
+ "print'%s %.2f %s'%('percentage of ventilation loss is ',p,' percent',)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 9.3\n",
+ "\n",
+ "\n",
+ "Page No. 256\n",
+ "\n",
+ "\n",
+ "percentage of ventilation loss is 47.87 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy\n",
+ "## Example 9.4\n",
+ "print('Example 9.4\\n\\n');\n",
+ "print('Page No. 260\\n\\n');\n",
+ "\n",
+ "##(a) Design loss\n",
+ "T1 = 18.;## Internal teemperature(specified as an Environmental temperature) in degree celcius\n",
+ "##From example 9.1\n",
+ "A = numpy.array([150, 200 ,40 ,75 ,75 ,200 ,40 ,1000, 1000]);## in m^2\n",
+ "U = numpy.array([1.2, 1.2 ,5.6, 2, 1.2 ,1.2 ,5.6 ,0.7 ,0.9]);## in W/m-K\n",
+ "Qf = 58.3*10**3;## Fabric loss in production area in W\n",
+ "T2 = -3.;## in degree celcius\n",
+ "s1 =0.;\n",
+ "s2 = 0.;\n",
+ "for i in range (0,9):\n",
+ " s1 = s1+A[i];\n",
+ " s2 = s2+U[i]*A[i];\n",
+ "\n",
+ "A_T = s1;## Total area in m^2\n",
+ "UA_T = s2;## sum of U*A in W/m-K (answer wrongly calculated in the book)\n",
+ "\n",
+ "##From example 9.3\n",
+ "N_1 = 1.5;## Ventilation rate in the production area (air changes per hour)\n",
+ "V_P = 6000;## Voulme of production area in m^3\n",
+ "\n",
+ "##As Qvent = C * (T1 - T2) & C = 0.33*N*V*(1 + ((UA_T)/(4.8*A_T)))\n",
+ "C = 0.33*N_1*V_P*(1. + ((UA_T)/(4.8*A_T)));\n",
+ "Q_vent = C * (T1 - T2);## in W\n",
+ "T_Q1 = Qf + Q_vent;## in W\n",
+ "print'%s %.2f %s'%('The total design loss is ',T_Q1,' W \\n') ## (deviation in answer is due to error in calculation in the book)\n",
+ "\n",
+ "##(b) Reduced heat loss\n",
+ "## The heat transfer coeffieint in this problem has been changed as U1\n",
+ "U1 = [0.44, 0.44, 2.8, 2, 0.44,0.44, 2.8, 0.44, 0.9];##in W/m^2-K\n",
+ "T = [21 ,21 ,21 ,-3 ,21 ,21 ,21 ,21 ,21];## Temperature difference in degree celcius\n",
+ "s3 = 0;\n",
+ "s4 = 0;\n",
+ "for i in range (0,9):\n",
+ "\ts3 = s3+U1[i]*A[i];\n",
+ "\ts4 = s4+U1[i]*A[i]*T[i];\n",
+ "U1A_T = s3;## in W/m-k (answer wrongly calculated in the book)\n",
+ "Q_loss = s4## in W\n",
+ "\n",
+ "\n",
+ "##As Qvent = C * (T1 - T2) & C = 0.33*N*V*(1 + ((UA_T)/(4.8*A_T)))\n",
+ "C = 0.33*N_1*V_P*(1 + ((U1A_T)/(4.8*A_T)))\n",
+ "Q_vent = C * (T1 - T2)## in W\n",
+ "T_Q2 = Q_loss + Q_vent## in W\n",
+ "\n",
+ "Red = T_Q1 - T_Q2;## In W\n",
+ "print'%s %.2f %s'%('The reduction in loss is ',Red,' W') ## (deviation in answer is due to error in calculation in the book)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 9.4\n",
+ "\n",
+ "\n",
+ "Page No. 260\n",
+ "\n",
+ "\n",
+ "The total design loss is 134448.98 W \n",
+ "\n",
+ "The reduction in loss is 24613.38 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 9.5\n",
+ "print('Example 9.5\\n\\n');\n",
+ "print('Page No. 265\\n\\n');\n",
+ "\n",
+ "##given\n",
+ "T = 21.;## Temperature difference in degree celcius\n",
+ "Deg_d = 2186.;## Total degree-days base(15.5 deg C) September_April\n",
+ "T_D = 18.;## Design Temperature in degree celcius\n",
+ "T_O = 4.;## base offset temperature in degree celcius\n",
+ "T_b = T_D - T_O;## Base temperature in degree celcius\n",
+ "\n",
+ "## From Table 9.11 Correction factor for base tempratures other than 15.5 deg C is obtained. So for 14 deg c its 0.82\n",
+ "C = 0.82;## Correction factor\n",
+ "Do = Deg_d * C## Corrected degree-days \n",
+ "\n",
+ "##(a) Original construction\n",
+ "##from example 9.4\n",
+ "Q_d_1 = 133.7*10**3;## Design heat loss in W\n",
+ "\n",
+ "H_1 = Q_d_1/T;\n",
+ "##As E = 24 * H * Do - E = Energy consumption in (Wh)\n",
+ "E1 = (24.*H_1 *Do)/10**6;## in 10^6 Wh ( from this step 'Do' is mistakely taken as 1972 inplace of 1792 in the solution of the book, so there is deviation in answer)\n",
+ "E_1 = (E1 * 3600.)*10**6;## in J\n",
+ "print'%s %.2e %s'%('The total energy consumption in original construction is ',E_1,' J \\n')## Deviation in the answer is due to some calculation error as mentioned above\n",
+ "\n",
+ "##(b) Improved insulation\n",
+ "##from example 9.4\n",
+ "Q_d_2 = 104.4*10**3;## Design heat loss in W\n",
+ "\n",
+ "H_2 = Q_d_2/T;\n",
+ "##As E = 24 * H * Do - E = Energy consumption in (Wh)\n",
+ "E2 = (24.*H_2 *Do)/10**6;## in 10^6 Wh ( from this step 'Do' is mistakely taken as 2972 inplace of 2792 in the solution of the book, so there is deviation in answer)\n",
+ "E_2 = (E2 * 3600.)*10**6;## in J\n",
+ "print'%s %.2e%s'%('The total energy consumption in improved insulation is ',E_2,' J \\n')## Deviation in the answer is due to some calculation error as mentioned above\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 9.5\n",
+ "\n",
+ "\n",
+ "Page No. 265\n",
+ "\n",
+ "\n",
+ "The total energy consumption in original construction is 9.86e+11 J \n",
+ "\n",
+ "The total energy consumption in improved insulation is 7.70e+11 J \n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg268"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 9.6\n",
+ "print('Example 9.6\\n\\n');\n",
+ "print('Page No. 268\\n\\n');\n",
+ "\n",
+ "##given\n",
+ "U1 = 5.6;## Single glazing heat transfer coefficient in W/m^2_K\n",
+ "U2 = 2.8;## Double glazing heat transfer coefficient in W/m^2_K\n",
+ "Ti = 21.;## Internal Temperature in degree celcius\n",
+ "To = -1.;## External Temperature in degree celcius\n",
+ "R_H = 0.5;## Relative humidity\n",
+ "Rs_i = 0.123;## Surface resistance in (W/m^2-K)^-1\n",
+ "\n",
+ "## At 21 Degree celcius and R.H. = 0.5, the dew point is 10.5 degree celcius\n",
+ "Dew_pt = 10.5;## Dew point in degree celcius\n",
+ "##As Ts_i = Ti - (Rs_i * U *(Ti - To))\n",
+ "\n",
+ "##(a) Single Glazing\n",
+ "Ts_i_S = Ti - (Rs_i * U1 *(Ti - To));## in degree celcius\n",
+ "print'%s %.2f %s'%('The internal surface temperature for single glazing is ',Ts_i_S,' deg C \\n')\n",
+ "if (Dew_pt > Ts_i_S):\n",
+ "\tprint('Surface condensation will occur since it is less than 10.5 deg C.')\n",
+ "else:\n",
+ " print('No surface condensation is expected as it is greater than 10.5 deg C.')\n",
+ "\n",
+ "\n",
+ "##(b) Double Glazing\n",
+ "Ts_i_D = Ti - (Rs_i * U2 *(Ti - To));## in degree celcius\n",
+ "print'%s %.2f %s'%('The internal surface temperature for single glazing is ',Ts_i_D,' deg C \\n')\n",
+ "if (Dew_pt > Ts_i_D):\n",
+ "\tprint('Surface condensation will occur since it is less than 10.5 deg C.')\n",
+ "else:\n",
+ "\tprint('No surface condensation is expected since it is greater than 10.5 deg C.')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 9.6\n",
+ "\n",
+ "\n",
+ "Page No. 268\n",
+ "\n",
+ "\n",
+ "The internal surface temperature for single glazing is 5.85 deg C \n",
+ "\n",
+ "Surface condensation will occur since it is less than 10.5 deg C.\n",
+ "The internal surface temperature for single glazing is 13.42 deg C \n",
+ "\n",
+ "No surface condensation is expected since it is greater than 10.5 deg C.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 9.7\n",
+ "print('Example 9.7\\n\\n');\n",
+ "print('Page No. 269\\n\\n');\n",
+ "\n",
+ "##given\n",
+ "l_1 = 240.;## existing length of solid brick in mm\n",
+ "l_u = 25.;## upgraded internal lining in mm\n",
+ "l_e = 9.5;## Expanded polystyrenne in mm\n",
+ "T_i = 20.;## Internal temperature in degre celcius\n",
+ "R_H_i = 50.;## Internal Relative humidity in percent\n",
+ "T_e = 0.;## External temperature in degre celcius\n",
+ "R_H_e = 90.;## External Relative humidity in percent\n",
+ "\n",
+ "K = ([0.123, 0.059 ,0.714, 0.286, 0.055]);## Thermal resistance in W/m^2-K\n",
+ "V_r = ([0.0, 0.475 ,3.57 ,9.60 ,0.0]);## Vapour Resistance in 10^9 N-s/kg\n",
+ "\n",
+ "##Refer Figure 9.3\n",
+ "##From Figure 9.3, the tempeature, dew point, vapour pressure for different interface are obtained\n",
+ "T = ([18.01, 17.06, 5.51 ,0.89]);## Temperature in degree celcius\n",
+ "V_p = ([1170, 1148 ,986 ,550]);##Vapour pressure in N/m^2\n",
+ "D_P = ([9.5, 9.2, 7.1, -1.5]);## Dew point in degree celcius\n",
+ "\n",
+ "h = (T_i - T_e)/sum (K);## in W/m^2\n",
+ "print'%s %.2f %s'%('The heat flow is ',h,' W/m^2 \\n')\n",
+ "V_p_i = V_p[0];## Internal vapour pressure in N/m^2\n",
+ "V_p_e = V_p[3];## External vapour pressure in N/m^2\n",
+ "m = ((V_p_i - V_p_e)/sum(V_r))*10**-9;## in kg/s\n",
+ "print'%s %.2e %s'%('The vapour mass flow is ',m,' kg/s')\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 9.7\n",
+ "\n",
+ "\n",
+ "Page No. 269\n",
+ "\n",
+ "\n",
+ "The heat flow is 16.17 W/m^2 \n",
+ "\n",
+ "The vapour mass flow is 4.54e-08 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex8-pg275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy\n",
+ "## Example 9.8\n",
+ "print('Example 9.8\\n\\n');\n",
+ "print('Page No. 275\\n\\n');\n",
+ "\n",
+ "A_G_S=numpy.zeros\n",
+ "##given\n",
+ "A = 10.;## in m^2\n",
+ "S = 0.77;\n",
+ "Sa = 0.54;\n",
+ "##for South\n",
+ "print('\\t\\t\\t SOUTH \\n')\n",
+ "I1 = ([200 ,185 ,165 ,155 ,165 ,185 ,200]);## in W-m^2\n",
+ "I2 = ([500, 455 ,405 ,385, 405 ,455, 500]);## in W-m^2\n",
+ "A_G_S0 = (A*200*S) + (A*500*Sa)\n",
+ "A_G_S1 = (A*185*S) + (A*455*Sa)\n",
+ "A_G_S2 = (A*165*S) + (A*405*Sa)\n",
+ "A_G_S3 = (A*155*S) + (A*385*Sa)\n",
+ "A_G_S4 = (A*165*S) + (A*405*Sa)\n",
+ "A_G_S5 = (A*185*S) + (A*455*Sa)\n",
+ "A_G_S6 = (A*200*S) + (A*500*Sa)\n",
+ "\n",
+ "\n",
+ "print'%s %.2f %s'%('The monthly peak cooling loads for the month April is ',A_G_S0,' W \\n')\n",
+ "print'%s %.2f %s'%('The monthly peak cooling loads for the month May is ',A_G_S1,' W \\n')\n",
+ "print'%s %.2f %s'%('The monthly peak cooling loads for the month June is ',A_G_S2,' W \\n')\n",
+ "print'%s %.2f %s'%('The monthly peak cooling loads for the month July is ',A_G_S3,' W \\n')\n",
+ "print'%s %.2f %s'%('The monthly peak cooling loads for the month Aug. is ',A_G_S4,' W \\n')\n",
+ "print'%s %.2f %s'%('The monthly peak cooling loads for the month Sept. is ',A_G_S5,' W \\n\\n')\n",
+ "\n",
+ " ##For east\n",
+ "print('\\t\\t\\t EAST \\n')\n",
+ "I3 = ([110, 150, 180 ,190 ,180 ,150 ,110]);## in W-m^2\n",
+ "I4 = ([435 ,510, 515, 505, 515 ,510 ,435]);## in W-m^2\n",
+ "A_G_E0 = (A*110*S) + (A*435*Sa)\n",
+ "A_G_E1 = (A*150*S) + (A*510*Sa)\n",
+ "A_G_E2 = (A*180*S) + (A*515*Sa)\n",
+ "A_G_E3 = (A*190*S) + (A*505*Sa)\n",
+ "A_G_E4 = (A*180*S) + (A*515*Sa)\n",
+ "A_G_E5 = (A*150*S) + (A*510*Sa)\n",
+ "A_G_E6 = (A*110*S) + (A*435*Sa)\n",
+ "\n",
+ "\n",
+ "\n",
+ "print'%s %.2f %s'%('The monthly peak cooling loads for the month March is ',A_G_E0,' W \\n')\n",
+ "print'%s %.2f %s'%('The monthly peak cooling loads for the month April is ',A_G_E1,' W \\n')\n",
+ "print'%s %.2f %s'%('The monthly peak cooling loads for the month May is ',A_G_E2,' W \\n')\n",
+ "print'%s %.2f %s'%('The monthly peak cooling loads for the month June is ',A_G_E3,' W \\n')\n",
+ "print'%s %.2f %s'%('The monthly peak cooling loads for the month July is ',A_G_E4,' W \\n')\n",
+ "print'%s %.2f %s'%('The monthly peak cooling loads for the month Aug. is ',A_G_E5,' W \\n')\n",
+ "print'%s %.2f %s'%('The monthly peak cooling loads for the month Sept. is ',A_G_E6,' W \\n\\n')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 9.8\n",
+ "\n",
+ "\n",
+ "Page No. 275\n",
+ "\n",
+ "\n",
+ "\t\t\t SOUTH \n",
+ "\n",
+ "The monthly peak cooling loads for the month April is 4240.00 W \n",
+ "\n",
+ "The monthly peak cooling loads for the month May is 3881.50 W \n",
+ "\n",
+ "The monthly peak cooling loads for the month June is 3457.50 W \n",
+ "\n",
+ "The monthly peak cooling loads for the month July is 3272.50 W \n",
+ "\n",
+ "The monthly peak cooling loads for the month Aug. is 3457.50 W \n",
+ "\n",
+ "The monthly peak cooling loads for the month Sept. is 3881.50 W \n",
+ "\n",
+ "\n",
+ "\t\t\t EAST \n",
+ "\n",
+ "The monthly peak cooling loads for the month March is 3196.00 W \n",
+ "\n",
+ "The monthly peak cooling loads for the month April is 3909.00 W \n",
+ "\n",
+ "The monthly peak cooling loads for the month May is 4167.00 W \n",
+ "\n",
+ "The monthly peak cooling loads for the month June is 4190.00 W \n",
+ "\n",
+ "The monthly peak cooling loads for the month July is 4167.00 W \n",
+ "\n",
+ "The monthly peak cooling loads for the month Aug. is 3909.00 W \n",
+ "\n",
+ "The monthly peak cooling loads for the month Sept. is 3196.00 W \n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9-pg277"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "## Example 9.9\n",
+ "print('Example 9.9\\n\\n');\n",
+ "print('Page No. 277\\n\\n');\n",
+ "\n",
+ "##given\n",
+ "A = 15.;## glazing area in m^2\n",
+ "l = 10.;## Length of office in m\n",
+ "h = 6.;## height of office in m\n",
+ "w = 3.5;## width of office in m\n",
+ "Y_w = 4.;## Admittance of wall in W/m^2-K\n",
+ "Y_f = 3.;## Admittance of floor in W/m^2-K\n",
+ "Y_c = 3.;## Admittance of ceiling in W/m^2-K\n",
+ "N = 1.5;##Ventilation rate (air changes per hour)\n",
+ "V = l*h*w;## Volume in m^3\n",
+ "U_G = 5.6;## Transmittance in W/m^2-K\n",
+ "\n",
+ "##From table 9.18 and table 9.16\n",
+ "To = 16.5;## External temperature of June in degree celcius\n",
+ "T_O = 7.5;## Swing temperature in degre celcius\n",
+ "I = 155.; ##Vertical S in W-m^2\n",
+ "Is = 385.;##Vertical S in W-m^2\n",
+ "S = 0.77;## Solar gain factor\n",
+ "Sa = 0.54;## Solar gain factor\n",
+ "\n",
+ "##As For the mean internal temperature -Ti = To + ((A*I*S)/((0.33*N*V) + (A*U_G))) \n",
+ "Ti = To + ((A*I*S)/((0.33*N*V) + (A*U_G)));## in degree celcius\n",
+ "print'%s %.2f %s'%('the mean internal temperature is ',Ti,' deg C \\n')\n",
+ "\n",
+ "A_G = (A*Is*Sa) + ((A*U_G) + (0.33*N*V))*T_O;## Swing in gain in W\n",
+ "Net_A = 2*((w*h) + (l*w)) - A;## Net wall area in m^2\n",
+ "A_f = l*h;## floor area in m^2\n",
+ "A_c = l*h;##ceiling area in m^2\n",
+ "A_Y_w = Net_A * Y_w;## Wall AY in W/K\n",
+ "A_Y_f = A_f * Y_f;## Floor AY in W/K \n",
+ "A_Y_c = A_c * Y_c;## ceiling AY in W/K \n",
+ "A_Y_wi = 84.;## Window AY in W/K\n",
+ "Net_AY = A_Y_w + A_Y_f + A_Y_c + A_Y_wi## in W/K\n",
+ "Ti_s = ((A_G)/((0.33*N*V) + (Net_AY)))## Internal Temperature swing in deg C\n",
+ "T_p = Ti + Ti_s;## in deg C\n",
+ "print'%s %.2f %s'%('Peak internal temperature is ',T_p,' deg C') ## Deviation in the answer is due to some calculation approximation in the book\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Example 9.9\n",
+ "\n",
+ "\n",
+ "Page No. 277\n",
+ "\n",
+ "\n",
+ "the mean internal temperature is 26.03 deg C \n",
+ "\n",
+ "Peak internal temperature is 30.86 deg C\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/screenshots/Chapter1.png b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/screenshots/Chapter1.png
new file mode 100644
index 00000000..df9c9691
--- /dev/null
+++ b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/screenshots/Chapter1.png
Binary files differ
diff --git a/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/screenshots/Chapter3.png b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/screenshots/Chapter3.png
new file mode 100644
index 00000000..af23a39e
--- /dev/null
+++ b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/screenshots/Chapter3.png
Binary files differ
diff --git a/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/screenshots/Chapter9.png b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/screenshots/Chapter9.png
new file mode 100644
index 00000000..c7ee8dcc
--- /dev/null
+++ b/Energy_Management_by_W._R._Murphy_and_G._A._Mckay/screenshots/Chapter9.png
Binary files differ
diff --git a/Introduction_to_flight_by_J_D_Anderson/11._Hypersonic_vehicles.ipynb b/Introduction_to_flight_by_J_D_Anderson/11._Hypersonic_vehicles.ipynb
new file mode 100644
index 00000000..7e82bf05
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/11._Hypersonic_vehicles.ipynb
@@ -0,0 +1,510 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11: Hypersonic vehicles"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Percentage efficiency: 30.3 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 11.1\n",
+ "'''Determine the efficiency of a Rankine cycle using steam as the working fluid in which the\n",
+ "condenser pressure is 10 kPa. The boiler pressure is 2 MPa. The steam leaves the boiler\n",
+ "as saturated vapor.\n",
+ "In solving Rankine-cycle problems, we let w p denote the work into the pump per\n",
+ "kilogram of fluid flowing and q L denote the heat rejected from the working fluid per\n",
+ "kilogram of fluid flowing.\n",
+ "To solve this problem we consider, in succession, a control surface around the pump,\n",
+ "the boiler, the turbine, and the condenser. For each, the thermodynamic model is the steam\n",
+ "tables, and the process is steady state with negligible changes in kinetic and potential\n",
+ "energies. First, consider the pump:\n",
+ "Control volume:\n",
+ "Inlet state:\n",
+ "Exit state:\n",
+ "Pump.\n",
+ "P 1 known, saturated liquid; state fixed.\n",
+ "P 2 known.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P2 = 2000\t\t\t#Exit pressure in kPa\n",
+ "P1 = 10\t\t\t\t#Inlet pressure in kPa\n",
+ "v = 0.00101\t\t\t#specific weight of water in m**3/kg\n",
+ "h1 = 191.8\t\t\t#Enthalpy in kJ/kg from table\n",
+ "h3 = 2799.5\t\t\t#Enthalpy in kJ/kg\n",
+ "s4 = 6.3409\t\t\t#kJ/kg\n",
+ "sf = 0.6493\t\t\t#Entropy at liquid state in kJ/kg\n",
+ "sfg = 7.5009\t\t#Entropy difference for vapor and liquid state in kJ/kg\n",
+ "hfg = 2392.8\t\t#Enthalpy difference in kJ/kg for turbine\n",
+ "\n",
+ "#Calculations:\n",
+ "wp = v*(P2-P1)\t\t#work done in pipe in kJ/kg\n",
+ "h2 = h1+wp\t\t\t#enthalpy in kJ/kg\n",
+ "x4 = (s4-sf)/sfg\t#x-factor\n",
+ "h4 = h1+x4*hfg\t\t#Enthalpy in kJ/kg\n",
+ "nth = ((h3-h2)-(h4-h1))/(h3-h2)\n",
+ "\n",
+ "#Results:\n",
+ "print 'Percentage efficiency: ',round(nth*100,1),\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Percentage efficiency: 35.3 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 11.2\n",
+ "''' In a Rankine cycle, steam leaves the boiler and enters the turbine at 4 MPa and 400\n",
+ "◦\n",
+ "C.\n",
+ "The condenser pressure is 10 kPa. Determine the cycle efficiency.\n",
+ "To determine the cycle efficiency, we must calculate the turbine work, the pump\n",
+ "work, and the heat transfer to the steam in the boiler. We do this by considering a control\n",
+ "surface around each of these components in turn. In each case the thermodynamic model\n",
+ "is the steam tables, and the process is steady state with negligible changes in kinetic and\n",
+ "potential energies.\n",
+ "Control volume:\n",
+ "Inlet state:\n",
+ "Exit state:\n",
+ "Pump.\n",
+ "P 1 known, saturated liquid; state fixed.\n",
+ "P 2 known.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P2 = 4000\t\t\t#Exit pressure in kPa\n",
+ "P1 = 10\t\t\t\t#Inlet pressure in kPa\n",
+ "v = 0.00101\t\t\t#specific weight of water in m**3/kg\n",
+ "h1 = 191.8\t\t\t#Enthalpy in kJ/kg from table\n",
+ "h3 = 3213.6\t\t\t#Enthalpy in kJ/kg from table\n",
+ "s4 = 6.7690\t\t\t#Entropy in kJ/kg from table\n",
+ "sf = 0.6493\t\t\t#Entropy at liquid state in kJ/kg from table\n",
+ "sfg = 7.5009\t\t#Entropy difference for vapor and liquid state in kJ/kg from table\n",
+ "hfg = 2392.8\t\t#Enthalpy difference in kJ/kg for turbine\n",
+ "\n",
+ "#Calculations:\n",
+ "wp = v*(P2-P1)\t\t#work done in pipe in kJ/kg\n",
+ "h2 = h1+wp\t\t\t#Enthalpy in kJ/kg\n",
+ "x4 = (s4-sf)/sfg\t#x-factor\n",
+ "h4 = h1+x4*hfg\t\t#Enthalpy in kJ/kg\n",
+ "nth = ((h3-h2)-(h4-h1))/(h3-h2)\n",
+ "\n",
+ "#Results:\n",
+ "print 'Percentage efficiency: ',round(nth*100,1),'%'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Percentage efficiency: 35.9 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 11.3\n",
+ "''' Consider a reheat cycle utilizing steam. Steam leaves the boiler and enters the turbine at\n",
+ "4 MPa, 400\n",
+ "◦\n",
+ "C. After expansion in the turbine to 400 kPa, the steam is reheated to 400\n",
+ "◦\n",
+ "C\n",
+ "and then expanded in the low-pressure turbine to 10 kPa. Determine the cycle efficiency.\n",
+ "For each control volume analyzed, the thermodynamic model is the steam tables,\n",
+ "the process is steady state, and changes in kinetic and potential energies are negligible.\n",
+ "For the high-pressure turbine,\n",
+ "Control volume:\n",
+ "Inlet state:\n",
+ "Exit state:\n",
+ "High-pressure turbine.\n",
+ "P 3 , T 3 known; state fixed.\n",
+ "P 4 known.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P2 = 4000\t\t\t#Exit pressure in kPa\n",
+ "P1 = 10\t\t\t\t#Inlet pressure in kPa\n",
+ "v = 0.00101\t\t\t#specific weight of water in m**3/kg\n",
+ "h1 = 191.8\t\t\t#Enthalpy in kJ/kg from table\n",
+ "h3 = 3213.6\t\t\t#Enthalpy in kJ/kg from table\n",
+ "s4 = 6.7690\t\t\t#Entropy in kJ/kg from table\n",
+ "sf1 = 1.7766\t\t#Entropy at liquid state in kJ/kg from table\n",
+ "sfg1 = 5.1193\t\t#Entropy difference for vapor and liquid state in kJ/kg from table\n",
+ "hf = 604.7\t\t\t#Enthalpy of liquid state in kJ/kg\n",
+ "hfg1 = 2133.8\t\t#Enthalpy difference in kJ/kg for turbine\n",
+ "sf = 0.6493\t\t\t#Entropy in liquid state in kJ/kg for turbine\n",
+ "h5 = 3273.4\t\t\t#Enthalpy in kJ/kg \n",
+ "s5 = 7.8985\t\t\t#Entropy in kJ/kg\n",
+ "sfg = 7.5009\t\t#Entropy diff in kJ/kg \n",
+ "hfg = 2392.8\t\t#Enthalpy difference for low pressure turbine in kj/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "wp = round(v*(P2-P1))#Work done in pipe in kJ/kg\n",
+ "h2 = h1+wp\t\t\t#Enthalpy in kJ/kg\n",
+ "x4 = (s4-sf1)/sfg1\t#x-factor\n",
+ "h4 = hf+x4*hfg1\t\t#Enthalpy in kJ/kg\n",
+ "x6 = (s5-sf)/sfg\t#x-factor\n",
+ "h6 = h1+x6*hfg\t\t#Entropy in kg/kg\n",
+ "wt = (h3-h4)+(h5-h6)#Work output in kJ/kg\n",
+ "qh = (h3-h2)+(h5-h4)\n",
+ "nth = (wt-wp)/qh\n",
+ "\n",
+ "#Results:\n",
+ "print 'Percentage efficiency: ',round(nth*100,1),'%'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Refrigerator Efficiency: 37.5 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 11.4\n",
+ "''' Consider a regenerative cycle using steam as the working fluid. Steam leaves the boiler\n",
+ "and enters the turbine at 4 MPa, 400\n",
+ "◦\n",
+ "C. After expansion to 400 kPa, some of the steam is\n",
+ "extracted from the turbine to heat the feedwater in an open feedwater heater. The pressure\n",
+ "in the feedwater heater is 400 kPa, and the water leaving it is saturated liquid at 400 kPa.\n",
+ "The steam not extracted expands to 10 kPa. Determine the cycle efficiency.\n",
+ "The line diagram and T–s diagram for this cycle are shown in Fig. 11.12.\n",
+ "As in previous examples, the model for each control volume is the steam tables, the\n",
+ "process is steady state, and kinetic and potential energy changes are negligible.\n",
+ "From Examples 11.2 and 11.3 we have the following properties:\n",
+ "h 5 = 3213.6 h 6 = 2685.6\n",
+ "h 7 = 2144.1 h 1 = 191.8\n",
+ "For the low-pressure pump,\n",
+ "Control volume:\n",
+ "Inlet state:\n",
+ "Exit state:\n",
+ "Low-pressure pump.\n",
+ "P 1 known, saturated liquid; state fixed.\n",
+ "P 2 known.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "h1 = 191.8\t\t\t#kJ/kg\n",
+ "h5 = 3213.6\t\t\t#kg/kg\n",
+ "h6 = 2685.7\t\t\t#kJ/kg\n",
+ "h7 = 2144.1\t\t\t#kJ/kg\n",
+ "h3 = 604.7\t\t\t#kJ/kg\n",
+ "P2 = 400\t\t\t#Exit pressure in kPa\n",
+ "P1 = 10 \t\t\t#Inlet pressure in kPa\n",
+ "v = 0.00101\t\t\t#Specific weight of water in m**3/kg\n",
+ "h1 = 191.8\t\t\t#Enthalpy in kJ/kg from table\n",
+ "P3 = 400\t\t\t#KPa\n",
+ "P4 = 4000\t\t\t#KPa\n",
+ "v = 0.001084\t\t#Specific heat for 3-4 process in m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "wp1 = v*(P2-P1)\t\t#work done for low pressure pump in kJ/kg\n",
+ "h2 = h1+wp1\t\t\t#Enthalpy in kJ/kg\n",
+ "y = (h3-h2)/(h6-h2)\t#Extraction fraction\n",
+ "wt = (h5-h6)+(1-y)*(h6-h7)#Turbine work in kJ/kg\n",
+ "wp2 = v*(P4-P3)\t\t#Work done for high pressure pump\n",
+ "h4 = h3+wp2\t\t\t#Enthalpy in kJ/kg\n",
+ "wnet = wt-(1-y)*wp1-wp2\n",
+ "qh = h5-h4\t\t\t#Heat output in kJ/kg\n",
+ "nth = wnet/qh\n",
+ "\n",
+ "#Results:\n",
+ "print 'Refrigerator Efficiency: ',round(nth*100,1),'%'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Cycle Efficiency: 29.2 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 11.5\n",
+ "''' A steam power plant operates on a cycle with pressures and temperatures as designated in\n",
+ "Fig. 11.17. The efficiency of the turbine is 86%, and the efficiency of the pump is 80%.\n",
+ "Determine the thermal efficiency of this cycle.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "h5 = 3169.1\t\t\t\t#kJ/kg\n",
+ "s5 = 6.7235\t\t\t\t#kJ/kg\n",
+ "sf = 0.6493\t\t\t\t#Entropy for liquid state in kJ/kg\n",
+ "sfg = 7.5009\t\t\t#Entropy difference in kJ/kg\n",
+ "hf = 191.8\t\t\t\t#kJ/kg\n",
+ "hfg = 2392.8\t\t\t#Enthalpy difference in kJ/kg\n",
+ "nt = 0.86\t\t\t\t#turbine efficiency given\n",
+ "np = 0.80\t\t\t\t#pump efficiency given\n",
+ "v = 0.001009\t\t\t#specific heat in m**3/kg\n",
+ "P2 = 5000\t\t\t\t#kPa\n",
+ "P1 = 10\t\t\t\t\t#kPa\n",
+ "h3 = 171.8\t\t#in kJ/kg from table\n",
+ "h4 = 3213.6\t\t#kJ/kg from table\n",
+ "\n",
+ "#Calculations:\n",
+ "s6s = s5\n",
+ "x6s = (s6s-sf)/sfg\t\t#x-factor\n",
+ "h6s = hf+x6s*hfg\t\t#kJ/Kg at state 6s\n",
+ "wt = nt*(h5-h6s)\n",
+ "wp = v*(P2-P1)/np\t\t#Work done in pump in kJ/kg\n",
+ "wnet = wt-wp\t\t\t#net work in kJ/kg\n",
+ "qh = h4-h3\n",
+ "nth = wnet/qh\n",
+ "\n",
+ "#Results:\n",
+ "print 'Cycle Efficiency: ',round(nth*100,1),'%'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Refrigeration Capacity: 3.89 KW\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 11.6\n",
+ "''' Consider an ideal refrigeration cycle that uses R-134a as the working fluid. The temperature\n",
+ "of the refrigerant in the evaporator is −20\n",
+ "◦\n",
+ "C, and in the condenser it is 40\n",
+ "◦\n",
+ "C. The refrigerant\n",
+ "is circulated at the rate of 0.03 kg/s. Determine the COP and the capacity of the plant in\n",
+ "rate of refrigeration.\n",
+ "The diagram for this example is shown in Fig. 11.21. For each control volume\n",
+ "analyzed, the thermodynamic model is as exhibited in the R-134a tables. Each process is\n",
+ "steady state, with no changes in kinetic or potential energy.\n",
+ "Control volume:\n",
+ "Inlet state:\n",
+ "Exit state:\n",
+ "Compressor.\n",
+ "T 1 known, saturated vapor; state fixed.\n",
+ "P 2 known (saturation pressure at T 3 ). \n",
+ "'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P2 = 1017\t\t\t#KJ/Kg\n",
+ "h1 = 386.1 \t\t\t#KJ/Kg\n",
+ "s1 = 1.7395 \t\t#KJ/Kg\n",
+ "T2 = 47.7 \t\t\t#°C\n",
+ "h2 = 428.4 \t\t\t#KJ/Kg\n",
+ "h3 = 256.5 \t\t\t#KJ/Kg\t\n",
+ "\n",
+ "#Calculations:\n",
+ "s2 = s1\n",
+ "wc = h2-h1\t\t\t\t#Work done by compressor in KJ/Kg\n",
+ "h4 = h3\n",
+ "qL = h1-h4 \t\t\t\t#From Energy equation in KJ/Kg\n",
+ "B = round(qL/wc)\n",
+ "RC = qL*B/100\t\t\t#Refrigeration capacity in KW\n",
+ "\n",
+ "#Results:\n",
+ "print 'Refrigeration Capacity: ', round(RC,2), 'KW'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "COP of refrigerator : 1.45\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 11.7\n",
+ "'''A refrigeration cycle utilizes R-134a as the working fluid. The following are the properties\n",
+ "\tat various points of the cycle designated in Fig. 11.22:\n",
+ "\tP 1 = 125 kPa,\n",
+ "\tP 2 = 1.2 MPa,\n",
+ "\tP 3 = 1.19 MPa,\n",
+ "\tP 4 = 1.16 MPa,\n",
+ "\tP 5 = 1.15 MPa,\n",
+ "\tP 6 = P 7 = 140 kPa,\n",
+ "\tP 8 = 130 kPa,\n",
+ "\tT 1 = −10 ◦C\n",
+ "\tT 2 = 100◦C\n",
+ "\tT 3 = 80◦C\n",
+ "\tT 4 = 45◦C\n",
+ "\tT 5 = 40◦C\n",
+ "\tx 6 = x 7\n",
+ "\tT 8 = −20◦C\n",
+ "\tThe heat transfer from R-134a during the compression process is 4 kJ/kg. Determine\n",
+ "\tthe COP of this cycle.\n",
+ "\tFor each control volume, the R-134a tables are the model. Each process is steady\n",
+ "\tstate, with no changes in kinetic or potential energy.\n",
+ "\tAs before, we break the process down into stages, treating the compressor, the\n",
+ "\tthrottling value and line, and the evaporator in turn.\n",
+ "\tControl volume:\n",
+ "\tInlet state:\n",
+ "\tExit state:\n",
+ "\tCompressor.\n",
+ "\tP 1 , T 1 known; state fixed.\n",
+ "\tP 2 , T 2 known; state fixed.\n",
+ "'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "h1 = 394.9 \t\t\t#KJ/Kg\n",
+ "h2 = 480.9 \t\t\t#KJ/Kg\n",
+ "q = -4 \t\t\t\t#KJ/Kg\n",
+ "h5 = 256.4 \t\t\t#KJ/Kg\t\n",
+ "h8 = 386.6\t\t\t#KJ/Kg\n",
+ "\n",
+ "#Calculations:\n",
+ "wc = h2-h1-q\t\t#Work done by compressor in KJ/Kg\n",
+ "h6 = h5\n",
+ "h7 = h6\n",
+ "qL = h8-h7\n",
+ "B = qL/wc\t\t\t#Coefficient of performance\n",
+ "\n",
+ "#Results:\n",
+ "print 'COP of refrigerator : ', round(B,2)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Introduction_to_flight_by_J_D_Anderson/2._Fundamental_Thoughts.ipynb b/Introduction_to_flight_by_J_D_Anderson/2._Fundamental_Thoughts.ipynb
new file mode 100644
index 00000000..328a5430
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/2._Fundamental_Thoughts.ipynb
@@ -0,0 +1,365 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: Fundamental Thoughts"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Weight of person is: 9.75 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 2.1\n",
+ "'''What is the weight of a 1 kg mass at an altitude where the local acceleration of gravity is\n",
+ "9.75 m/s2?'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 1 \t\t#Mass in kg\n",
+ "g = 9.75 \t\t#Acc.due to gravity in m/s**2\n",
+ "\n",
+ "#Calculation:\n",
+ "F = m*g \t\t#Weight of 1 kg mass in N\n",
+ "\n",
+ "#Result\n",
+ "print \"Weight of person is:\",round(F,2),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Average specific volume is: 0.001325 m**3/kg\n",
+ "Overall density is: 755.0 kg/m**3\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 2.2\n",
+ "'''A1m3 container, shown in Fig. 2.9, is filled with 0.12 m3 of granite, 0.15 m3 of sand, and\n",
+ "0.2 m3 of liquid 25◦C water; the rest of the volume, 0.53 m3, is air with a density of 1.15\n",
+ "kg/m3. Find the overall (average) specific volume and density.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Vliq = 0.2 \t\t #volume of liquid in m**3\n",
+ "dliq = 997 \t\t #density of liquid in kg/m**3\n",
+ "Vstone = 0.12 \t\t#volume of stone in m**3\n",
+ "Vsand = 0.15 \t\t#volume of sand in m**3\n",
+ "Vair = 0.53 \t\t#voume of air in m**3\n",
+ "dstone = 2750 \t\t#density of stone in kg/m**3\n",
+ "dsand = 1500 \t\t#density of sand in kg/m**3\n",
+ "Vtot = 1 \t\t #total volume in m**3\n",
+ "dair = 1.1 \t\t #density of air in kg/m**3\n",
+ "\n",
+ "#Calculation:\n",
+ "mliq = Vliq*dliq \t\t#mass of liquid in kg\n",
+ "mstone = Vstone*dstone #volume of stone in m**3\n",
+ "msand = Vsand*dsand \t#volume of sand in m**3\n",
+ "mair = Vair*dair \t\t#mass of air\n",
+ "mtot = mair+msand+mliq+mstone \t\t#total mass in kg\n",
+ "v = Vtot/mtot \t\t#specific volume in m**3/kg\n",
+ "d = 1/v \t\t #overall density in kg/m**3\n",
+ "\n",
+ "#Results:\n",
+ "print \"Average specific volume is: \",round(v ,6),\"m**3/kg\"\n",
+ "print \"Overall density is:\",round(d),\"kg/m**3\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Force that rod can push within the upward direction is: 932.9 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 2.3\n",
+ "'''The hydraulic piston/cylinder system shown in Fig. 2.11 has a cylinder diameter of D =\n",
+ "0.1 m with a piston and rod mass of 25 kg. The rod has a diameter of 0.01 m with an\n",
+ "outside atmospheric pressure of 101 kPa. The inside hydraulic fluid pressure is 250 kPa.\n",
+ "How large a force can the rod push within the upward direction?'''\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Dcyl = 0.1 \t\t#Cylinder diameter in m\n",
+ "Drod = 0.01 \t#Rod diameter in m\n",
+ "Pcyl = 250000 \t#Inside hydaulic pressure in Pa\n",
+ "Po = 101000 \t#Outside atmospheric pressure in kPa\n",
+ "g = 9.81 \t\t#Acc. due to gravity in m/s**2\n",
+ "mp = 25 \t\t#Mass of (rod+piston) in kg\n",
+ "\n",
+ "#Calculation:\n",
+ "Acyl = pi*Dcyl**2/4 \t\t#Cross sectional area of cylinder in m**2\n",
+ "Arod = pi*Drod**2/4 \t\t#Cross sectional area of rod in m**2\n",
+ "F = Pcyl*Acyl-Po*(Acyl-Arod)-mp*g \t#Force that rod can push within the upward direction in N\n",
+ "\n",
+ "#Result:\n",
+ "print \"Force that rod can push within the upward direction is:\",round(F,1),\"N\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Atmospheric pressure is: 99.54 KPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 2.4\n",
+ "'''A mercury barometer located in a room at 25◦C has a height of 750 mm. What is the\n",
+ "atmospheric pressure in kPa?'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "dm = 13534 \t\t #Density of mercury in kg/m**3\n",
+ "H = 0.750 \t\t #Height difference between two columns in metres\n",
+ "g = 9.80665 \t\t #Acc. due to gravity in m/s**2\n",
+ "\n",
+ "#Calculation:\n",
+ "Patm = dm*H*g/1000 \t #Atmospheric pressure in kPa\n",
+ "\n",
+ "#Result:\n",
+ "print \"Atmospheric pressure is:\",round(Patm,2),\"KPa\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Absolute pressure inside vessel is: 1.3 atm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 2.5\n",
+ "'''A mercury (Hg) manometer is used to measure the pressure in a vessel as shown in\n",
+ "Fig. 2.13. The mercury has a density of 13 590 kg/m3, and the height difference between the\n",
+ "two columns is measured to be 24 cm.We want to determine the pressure inside the vessel.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "dm = 13590 \t\t #Density of mercury in kg/m**3\n",
+ "H = 0.24 \t\t #Height difference between two columns in metres\n",
+ "g = 9.80665 \t\t#Acc. due to gravity in m/s**2\n",
+ "Patm = 13590*0.750*9.80665 #Atmospheric Pressure in Pa\n",
+ "\n",
+ "#Calculation:\n",
+ "dP = dm*H*g \t\t#Pressure difference in Pa\n",
+ "Pvessel = dP+Patm \t#Absolute Pressure inside vessel in Pa\n",
+ "\n",
+ "#Result:\n",
+ "print \"Absolute pressure inside vessel is:\",round(Pvessel/101325,2),\"atm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pressure at the bottom of storage tank if liquid is Gasoline: 156.2 Kpa\n",
+ "Pressure at the bottom of storage tank if liquid is R-134a: 1089.0 Kpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 2.6\n",
+ "'''What is the pressure at the bottom of the 7.5-m-tall storage tank of fluid at 25◦C shown\n",
+ "in Fig. 2.15? Assume that the fluid is gasoline with atmospheric pressure 101 kPa on the\n",
+ "top surface. Repeat the question for the liquid refrigerant R-134a when the top surface\n",
+ "pressure is 1 MPa.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "dg = 750 \t\t#Density of gaasoline in kg/m**3\n",
+ "dR = 1206 \t\t#Density of R-134a in kg/m**3\n",
+ "H = 7.5 \t\t#Height of storage tank in metres\n",
+ "g = 9.807 \t\t#Acc. due to gravity in m/s**2\n",
+ "Ptop1 = 101 \t#Atmospheric pressure in kPa\n",
+ "Ptop2 = 1000 \t\t#top surface pressure in kPa\n",
+ "\n",
+ "#Calculation:\n",
+ "dP1 = dg*g*H/1000\t#Pressure difference in kPa\n",
+ "P1 = dP1+Ptop1\n",
+ "dP2 = dR*g*H/1000#Pressure difference in kPa\n",
+ "P2 = dP2+Ptop2\n",
+ "\n",
+ "#Result:\n",
+ "print \"Pressure at the bottom of storage tank if liquid is Gasoline:\",round(P1,1),\"Kpa\"\n",
+ "print \"Pressure at the bottom of storage tank if liquid is R-134a:\",round(P2),\"Kpa\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Balancing force on second larger piston is: 122.3513 N\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 2.7\n",
+ "'''A piston/cylinder with a cross-sectional area of 0.01 m2 is connected with a hydraulic\n",
+ "line to another piston/cylinder with a cross-sectional area of 0.05 m2. Assume that both\n",
+ "chambers and the line are filled with hydraulic fluid of density 900 kg/m3 and the larger\n",
+ "second piston/cylinder is 6mhigher up in elevation. The telescope armand the buckets have\n",
+ "hydraulic piston/cylinders moving them, as seen in Fig. 2.16.With an outside atmospheric\n",
+ "pressure of 100 kPa and a net force of 25 kN on the smallest piston, what is the balancing\n",
+ "force on the second larger piston?'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Po = 100\t\t#Outside atmospheric pressure in kPa\n",
+ "F1 = 25 \t\t#Net force on the smallest piston in kN\n",
+ "A1 = 0.01 \t\t#Cross sectional area of lower piston in m**2\n",
+ "d = 900 \t\t#Density of fluid in kg/m**3\n",
+ "g = 9.81 \t\t#Acc. due to gravity in m/s**2\n",
+ "H = 6 \t\t#Height of second piston in comparison to first one in m\n",
+ "A2 = 0.05 \t\t#Cross sectional area of higher piston in m**3\n",
+ "\n",
+ "#Calculation:\n",
+ "P1 = Po+F1/A1 \t#Fluid pressure in kPa\n",
+ "P2 = P1-d*g*H/1000 #Pressure at higher elevation on piston 2 in kPa\n",
+ "F2 = (P2-Po)*A2 \t#Balancing force on second piston in kN\n",
+ "\n",
+ "#Result:\n",
+ "print \"Balancing force on second larger piston is:\",round(F2,4),\"N\""
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Introduction_to_flight_by_J_D_Anderson/3._The_Standard_Atmosphere.ipynb b/Introduction_to_flight_by_J_D_Anderson/3._The_Standard_Atmosphere.ipynb
new file mode 100644
index 00000000..368f5fbe
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/3._The_Standard_Atmosphere.ipynb
@@ -0,0 +1,546 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: The Standard Atmosphere"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Theoretical question\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 3.1\n",
+ "''' Determine the phase for each of the following water states using the tables in Appendix\n",
+ "B and indicate the relative position in the P–v, T–v, and P–T diagrams. '''\n",
+ "\n",
+ "print 'Theoretical question';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Theoretical question\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 3.2\n",
+ "'''Determine the phase for each of the following states using the tables in Appendix B and\n",
+ "indicate the relative position in the P–v, T–v, and P–T diagrams, as in Figs. 3.11 and\n",
+ "3.12.'''\n",
+ "\n",
+ "print 'Theoretical question';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Theoretical question\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 3.3\n",
+ "'''Determine the temperature and quality (if defined) for water at a pressure of 300 kPa and\n",
+ "at each of these specific volumes:\n",
+ "a. 0.5 m3/kg\n",
+ "b. 1.0 m3/kg'''\n",
+ "\n",
+ "print 'Theoretical question';"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Vapor on mass basis: 22.12 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 3.4\n",
+ "'''A closed vessel contains 0.1 m3 of saturated liquid and 0.9 m3 of saturated vapor R-134a\n",
+ "in equilibrium at 30◦C. Determine the percent vapor on a mass basis.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "vliq = 0.1 \t\t#Volume of saturated liquid in m**3\n",
+ "vf = 0.000843 \t#in m**3/kg\n",
+ "vvap = 0.9 \t\t#Volume of saturated vapor R-134a in equilbrium\n",
+ "vg = 0.02671 \t#in m**3/kg\n",
+ "\n",
+ "#Calculation:\n",
+ "mliq = vliq/vf \t#Mass of liquid in kg \n",
+ "mvap = vvap/vg \t#Mass of vapor in kg\n",
+ "m = mliq+mvap \t#Total mass in kg\n",
+ "x = mvap/m \t\t#Percentage of vapor on mass basis\n",
+ "\n",
+ "#Result:\n",
+ "print 'Vapor on mass basis:',round(x*100,2),'%'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Final pressure is(by interpolation): 945 KPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 3.5\n",
+ "'''A rigid vessel contains saturated ammonia vapor at 20◦C. Heat is transferred to the system\n",
+ "until the temperature reaches 40◦C. What is the final pressure?'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "v1 = 0.14922 \t#specific volume of sautrated ammonia in m**3/kg\n",
+ "P2 = 945 \t\t#final pressure in kPa\n",
+ "\n",
+ "#Calculation:\n",
+ "v2 = v1 \t\t#in m**3/kg\n",
+ "\n",
+ "print 'Final pressure is(by interpolation):',P2,'KPa'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pressure is: 779.2 Kpa\n",
+ "Quality is: 0.2201\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 3.6\n",
+ "'''Determine the missing property of P–v–T and x if applicable for the following states.\n",
+ "a. Nitrogen: −53.2◦C, 600 kPa\n",
+ "b. Nitrogen: 100 K, 0.008 m3/kg'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 273-53.2 \t#Given temperature in K\n",
+ "P1 = 600 \t\t#Given pressure in kPa\n",
+ "T2 = 100 \t\t#Given temp. in K\n",
+ "v2 = 0.008 \t\t#Given specific volume in m**3/kg\n",
+ "vf = 0.001452 \t#in m**3/kg\n",
+ "vg = 0.0312 \t#in m**3/kg\n",
+ "Psat = 779.2 \t#Saturation pressure in kPa\n",
+ "\n",
+ "#Calculation:\n",
+ "vfg = vg-vf \t#in m**3/kg\n",
+ "x = (v2-vf)/vfg \t#Quality\n",
+ "\n",
+ "#Result:\n",
+ "print \"Pressure is: \",round(Psat,2),\"Kpa\"\n",
+ "print \"Quality is: \",round(x,4)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pressure of water: 534.2 KPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 3.7\n",
+ "'''Determine the pressure for water at 200◦C with v = 0.4 m3/kg.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "vg = 0.12736 \t#Specific volume in m**3/kg for water at 200C\n",
+ "v = 0.4 \t\t#Specific volume in m**3/kg\n",
+ "P1 = 500 \t\t#in kPa\n",
+ "v1 = 0.42492 \t#Specific volume at P1 in m**3/kg\n",
+ "P2 = 600 \t\t#in kPa\n",
+ "v2 = 0.35202 \t#Specific volume at P2 in m**3/kg\n",
+ "\n",
+ "#Calculation:\n",
+ "P = P1+(P2-P1)*(v-v1)/(v2-v1) #Calculating pressure by interplotation\n",
+ "\n",
+ "#Result:\n",
+ "print 'Pressure of water:',round(P,1),'KPa'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mass of air contained in room is: 280.43 Kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 3.8\n",
+ "'''What is the mass of air contained in a room 6 m × 10 m × 4 m if the pressure is 100 kPa\n",
+ "and the temperature is 25◦C?'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P = 100 \t\t#Pressure in kPa\n",
+ "V = 6*10*4 \t\t#Volume of room in m**3\n",
+ "R = 0.287 \t\t#in kN-m/kg-K\n",
+ "T = 25 \t\t#Temperature in Celsius\n",
+ "\n",
+ "#Calculation:\n",
+ "m = P*V/(R*(T+273.2)) \t#Mass of air contained in room\n",
+ "\n",
+ "#Result:\n",
+ "print \"Mass of air contained in room is:\",round(m,2),\"Kg\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pressure inside tank is: 2066.0 KPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 3.9\n",
+ "'''A tank has a volume of 0.5 m3 and contains 10 kg of an ideal gas having a molecular mass\n",
+ "of 24. The temperature is 25◦C. What is the pressure?'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "V = 0.5 \t\t#Volumr of tank in m**3\n",
+ "m = 10 \t\t#Mass of ideal gas in kg\n",
+ "T = 25 \t\t#Temperature of tank in Celsius\n",
+ "M = 24 \t\t#Molecular mass of gas in kg/kmol\n",
+ "Ru = 8.3145 \t#Vniversal gas constant in kN-m/kmol-K\n",
+ "\n",
+ "#Calculation:\n",
+ "R = Ru/M \t\t#Gas constant for given ideal gas in kN-m/kg-K\n",
+ "P = m*R*(T+273.2)/V#Pressure inside tank\n",
+ "\n",
+ "#Result:\n",
+ "print \"Pressure inside tank is: \",round(P),\"KPa\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Volume flow rate is: 0.004054 m**3/s\n",
+ "Mass flow rate is: 0.00766 Kg/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 3.10\n",
+ "'''A gas bell is submerged in liquid water, with its mass counterbalanced with rope and\n",
+ "pulleys, as shown in Fig. 3.20. The pressure inside is measured carefully to be 105 kPa,\n",
+ "and the temperature is 21◦C. A volume increase is measured to be 0.75 m3 over a period\n",
+ "of 185 s. What is the volume flow rate and the mass flow rate of the flow into the bell,\n",
+ "assuming it is carbon dioxide gas?'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "dt = 185 \t\t#Time period in seconds over which there is incrrease in volume \n",
+ "dV = 0.75 \t\t#Increase in volume in 0.75 in m**3\n",
+ "P = 105 \t\t#Pressure inside gas bell kPa\n",
+ "T = 21 \t\t#Temperature in celsius\n",
+ "R = 0.1889 \t\t#Ideal gas constant in kJ/kg-K\n",
+ "\n",
+ "#Calculation:\n",
+ "V = dV/dt \t\t#Volume flow rate in m**3/s\n",
+ "m = P*V/(R*(T+273.15))#Mass flow rate of the flow in kg/s\n",
+ "\n",
+ "#Result:\n",
+ "print \"Volume flow rate is: \",round(V,6),\"m**3/s\"\n",
+ "print \"Mass flow rate is: \",round(m,5),\"Kg/s\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Specific volume for R-134a using R-134a tables is: 0.0065 m**3/kg\n",
+ "Specific volume for R-134a using R-134a the ideal gas laws is: 0.01011 m**3/kg\n",
+ "Specific volume for R-134a using the generalized chart is: 0.00677 m**3/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 3.12\n",
+ "'''Determine the specific volume for R-134a at 100◦C, 3.0 MPa for the following models:'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T = 100 \t\t#Given temp.in 100 celsius\n",
+ "P = 3 \t\t#Given pressure in MPa\n",
+ "v1 = 0.0065 \t#Specific volume in m**3/kg using table\n",
+ "M = 102.3 \t\t#Molecular mass in kg\n",
+ "R = 8.3145 \t\t#in kJ/K\n",
+ "Tr = 373.2/374.2 \t#Reduced temperature using generalized chart\n",
+ "Pr = 3/4.06 \t#Reduced pressure using generalized chart\n",
+ "Z = 0.67 \t\t#Compressibility factor \n",
+ "\n",
+ "#Calculation:\n",
+ "Ru = R/M \t\t#in kJ/K-kg\n",
+ "v2 = Ru*(T+273)/(P*1000)#Specific volume assuming R-134a to be ideal gas in m**3/kg\n",
+ "v3 = Z*v2 \t\t#Specific volume using generalized chart in m**3/kg\n",
+ "\n",
+ "#Result:\n",
+ "print \"Specific volume for R-134a using R-134a tables is: \",round(v1,5),\"m**3/kg\"\n",
+ "print \"Specific volume for R-134a using R-134a the ideal gas laws is:\",round(v2,5),\"m**3/kg\"\n",
+ "print \"Specific volume for R-134a using the generalized chart is: \",round(v3,5),\"m**3/kg\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pressure is P: 850.0 KPa\n",
+ "Total propane mass is: 13.66 Kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 3.13\n",
+ "'''Propane in a steel bottle of volume 0.1 m3 has a quality of 10% at a temperature of 15◦C.\n",
+ "Use the generalized compressibility chart to estimate the total propane mass and to find\n",
+ "the pressure.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Pc = 4250 \t\t#Critical pressure of propane in kPa\n",
+ "Tc = 369.8 \t\t#Critical temperature in K\n",
+ "T = 15 \t\t#Temperature of propane in celsius\n",
+ "Prsat = 0.2 \t#Reduced pressure \n",
+ "x = 0.1 \t\t#Given quality\n",
+ "Zf = 0.035 \t\t#from graph\n",
+ "Zg = 0.83 \t\t#from graph\n",
+ "V = 0.1 \t\t#Volume of steel bottle in m**3\n",
+ "R = 0.1887 \t\t#in kPa-m**3/kg-K\n",
+ "\n",
+ "#Calculation:\n",
+ "Tr = T/Tc \t\t#Reduced temperature\n",
+ "P = Prsat*Pc \t#Pressure in kPa\n",
+ "Z = (1-x)*Zf+x*Zg #Overall compressibility factor\n",
+ "m = P*V/(Z*R*(T+273))#Total propane mass in kg\n",
+ "\n",
+ "#Result:\n",
+ "print \"Pressure is P:\",round(P,2),\"KPa\"\n",
+ "print \"Total propane mass is: \",round(m,2),\"Kg\"\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Introduction_to_flight_by_J_D_Anderson/4._Aerodynamics.ipynb b/Introduction_to_flight_by_J_D_Anderson/4._Aerodynamics.ipynb
new file mode 100644
index 00000000..d2461f95
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/4._Aerodynamics.ipynb
@@ -0,0 +1,229 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Aerodynamics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Work done during the isobaric process is: 12.0 KJ\n",
+ "Work done in isothermal process is: 7.33 KJ\n",
+ "Work done during the described process is: 6.41 KJ\n",
+ "Work done in the isovolumic process is: 0.0 KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 4.1\n",
+ "'''Consider as a system the gas in the cylinder shown in Fig. 4.7; the cylinder is fitted with\n",
+ "a piston on which a number of small weights are placed. The initial pressure is 200 kPa,\n",
+ "and the initial volume of the gas is 0.04 m3.'''\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P1 = 200 \t\t#Initial pressure inside cylinder in kPa\n",
+ "V2 = 0.1 \t\t#in m**3\n",
+ "V1 = 0.04 \t\t#Initial volume of gas in m**3\n",
+ "W4 = 0 \t\t#Work done in isovolumic process\n",
+ "\n",
+ "#Calculation:\n",
+ "W1 = P1*(V2-V1) \t#Work done in isobaric process in kJ\n",
+ "W2 = P1*V1*log(V2/V1) #Work done in isothermal process in kJ\n",
+ "P2 = P1*(V1/V2)**(1.3)\t#Final pressure according to the given process\n",
+ "W3 = (P2*V2-P1*V1)/(1-1.3)\n",
+ "\n",
+ "#Result:\n",
+ "print \"Work done during the isobaric process is: \",round(W1,2),\"KJ\"\n",
+ "print \"Work done in isothermal process is: \",round(W2,2),\"KJ\"\n",
+ "print \"Work done during the described process is: \",round(W3,2),\"KJ\"\n",
+ "print \"Work done in the isovolumic process is: \",round(W4,2),\"KJ\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Work produced by ammonia is: 12.71 KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 4.3\n",
+ "'''The cylinder/piston setup of Example 4.2 contains 0.5 kg of ammonia at −20◦C with\n",
+ "a quality of 25%. The ammonia is now heated to +20◦C, at which state the volume\n",
+ "is observed to be 1.41 times larger. Find the final pressure and the work the ammonia\n",
+ "produced.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Psat = 190.2 \t\t#in kPa\n",
+ "vf = 0.001504 \t\t#in m**3/kg\n",
+ "vfg = 0.62184 \t\t#in m**3/kg\n",
+ "x1 = 0.25 \t\t #Quality\n",
+ "P2 = 600 \t\t #Pressure in state 2 in kPa\n",
+ "m = 0.5 \t\t #Mass of ammonia in kg\n",
+ "\n",
+ "#Calculation:\n",
+ "P1 = Psat \t\t #Saturation pressure in state 1\n",
+ "v1 = vf+x1*vfg \t\t#Specific volume at state 1 in m**3/kg\n",
+ "v2 = 1.41*v1 \t\t#Specific volume at state 2 in m**3/kg\n",
+ "W = m*(P1+P2)*(v2-v1)/2#Work produced by ammonia in kJ\n",
+ "\n",
+ "#Result:\n",
+ "print \"Work produced by ammonia is: \",round(W,2),\"KJ\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Work in the overall process is: -17.71 KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 4.4\n",
+ "'''The piston/cylinder setup shown in Fig. 4.12 contains 0.1 kg of water at 1000 kPa, 500◦C.\n",
+ "The water is now cooled with a constant force on the piston until it reaches half the initial\n",
+ "volume. After this it cools to 25◦C while the piston is against the stops. Find the final water\n",
+ "pressure and the work in the overall process, and show the process in a P–v diagram.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "v1 = 0.35411 \t#Specific volume at state 1 in m**3/kg\n",
+ "m = 0.1 \t\t#Mass of water in kg\n",
+ "P1 = 1000 \t\t#Pressure inside cylinder in kPa\n",
+ "\n",
+ "#Calculation:\n",
+ "v2 = v1/2 \n",
+ "W = m*P1*(v2-v1) \t#in kJ\n",
+ "\n",
+ "#Result:\n",
+ "print \"Work in the overall process is: \",round(W,2),\"KJ\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rate of heat transfer in the glass and convective layer is: 1105.0 KW\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 4.7\n",
+ "'''Consider the constant transfer of energy from a warm room at 20◦C inside a house to the\n",
+ "colder ambient temperature of −10◦C through a single-pane window, as shown in Fig.\n",
+ "4.19. The temperature variation with distance from the outside glass surface is shown\n",
+ "by an outside convection heat transfer layer, but no such layer is inside the room (as a\n",
+ "simplification). The glass pane has a thickness of 5 mm (0.005 m) with a conductivity of\n",
+ "1.4W/mKand a total surface area of 0.5m2. The outside wind is blowing, so the convective\n",
+ "heat transfer coefficient is 100 W/m2 K.With an outer glass surface temperature of 12.1◦C,\n",
+ "we would like to know the rate of heat transfer in the glass and the convective layer'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "k = 1.4 \t\t#Conductivity of glass pane in W/m-K\n",
+ "A = 0.5 \t\t#Total surface area of glass pane\n",
+ "dx = 0.005 \t\t#Thickness of glasspane in m\n",
+ "dT1 = 20-12.1 \t#Temperature difference between room air and outer glass surface temperature in celsius\n",
+ "h = 100 \t\t#Convective heat transfer coefficient in W/m**2-K \n",
+ "dT = 12.1-(-10) \t#Temperature difference between warm room and colder ambient in celsius\n",
+ "\n",
+ "#Calculation:\n",
+ "Q = -k*A*dT1/dx \t#Conduction through glass slab in W\n",
+ "Q2 = h*A*dT \t#Heat transfer in convective layer in W\n",
+ "\n",
+ "#Result:\n",
+ "print \"Rate of heat transfer in the glass and convective layer is: \",round(Q2,2),\"KW\""
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Introduction_to_flight_by_J_D_Anderson/5._Airfoils,_Wings_and_Other_Aerodynamic_shapes.ipynb b/Introduction_to_flight_by_J_D_Anderson/5._Airfoils,_Wings_and_Other_Aerodynamic_shapes.ipynb
new file mode 100644
index 00000000..23c8b51f
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/5._Airfoils,_Wings_and_Other_Aerodynamic_shapes.ipynb
@@ -0,0 +1,533 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Airfoils, Wings and Other Aerodynamic shapes"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Required height of car: 37.1 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 5.1\n",
+ "''' A car of mass 1100 kg drives with a velocity such that it has a kinetic energy of 400 kJ (see\n",
+ "Fig. 5.4). Find the velocity. If the car is raised with a crane, how high should it be lifted in\n",
+ "the standard gravitational field to have a potential energy that equals the kinetic energy? '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 1100 \t\t#Mass of car in kg\n",
+ "ke = 400 \t\t#Kinetic energy of car in kJ\n",
+ "g = 9.807 \t\t#Acc. due to gravity in m/s**2\n",
+ "\n",
+ "#Calculations:\n",
+ "V = (2*ke*1000/m)**0.5 #Velocity of car in m/s\n",
+ "H = ke*1000/(m*g) \t#Height to which the car should be lifted so that its potential energy equals its kinetic energy\n",
+ "\n",
+ "#Results:\n",
+ "print \"Required height of car: \", round(H,1),\"m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in internal energy is: 3590.0 KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 5.2\n",
+ "'''A tank containing a fluid is stirred by a paddle wheel. The work input to the paddle wheel\n",
+ "is 5090 kJ. The heat transfer from the tank is 1500 kJ. Consider the tank and the fluid\n",
+ "inside a control surface and determine the change in internal energy of this control mass. '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "W = -5090 \t\t#Work input to paddle wheel in kJ\n",
+ "Q = -1500 \t\t#Heat transfer from tank in kJ\n",
+ "\n",
+ "#Calculations:\n",
+ "dU = Q-W \t\t#Change in internal energy in kJ\n",
+ "\n",
+ "#Results:\n",
+ "print \"Change in internal energy is: \",round(dU),\"KJ\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "When stone is about to enter state 2, dKE: 1.0 KJ and dPE : -1.0 KJ\n",
+ "When stone has just come to rest in the bucket i.e. state 3, W = 0, dPE = 0, dKE1: -1.0 J and dU : 1.0 J\n",
+ "When stone has entered state 4, dPE = 0, W3 = 0,dKE = 0, dU: -1.0 J Q3: -1.0 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 5.3\n",
+ "''' Consider a stone having a mass of 10 kg and a bucket containing 100 kg of liquid water.\n",
+ "Initially the stone is 10.2 m above the water, and the stone and the water are at the same\n",
+ "temperature, state 1. The stone then falls into the water.\n",
+ "Determine \u0003U, \u0003KE, \u0003PE, Q, and W for the following changes of state, assuming\n",
+ "standard gravitational acceleration of 9.806 65 m/s2.\n",
+ "a. The stone is about to enter the water, state 2.\n",
+ "b. The stone has just come to rest in the bucket, state 3.\n",
+ "c. Heat has been transferred to the surroundings in such an amount that the stone and\n",
+ "water are at the same temperature, T1, state 4. '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "g = 9.806 \t\t#Acceleration due to gravity in m/s**2\n",
+ "m = 10 \t\t#Mass of stone in kg\n",
+ "H1 = 10.2 \t\t#Initial height of stone above water in metres\n",
+ "H2 = 0 \t\t#Final height in metres\n",
+ "\n",
+ "#Calculations:\n",
+ "dKE1 = -m*g*(H2-H1) #Change in kinetic energy when stone enters state 2 in J\n",
+ "dPE1 = -1 \t\t#Change in potential energy when stone enters state 2 in J\n",
+ "dPE2 = 0 \t\t#Change in potential energy when stone enters state 3 in JQ2 = 0 \t\t#no heat transfer when stone enters state 3 in J\n",
+ "W2 = 0 \t\t#no work done when stone enters state 3 in J\n",
+ "dKE2 = -1 \t\t#Change in kinetic energy when stone enters state 3\n",
+ "dU2 = -dKE2 \t#Change in internal energy when stone enters state 3 in J\n",
+ "dKE3 = 0 \t\t#Change in kinetic energy when stone enters state 4\n",
+ "dPE = 0 \t\t#Change in potential energy when stone enters state 4 in J\n",
+ "W3 = 0 \t\t#No work done when stone enters state 4 in J\n",
+ "dU3 = -1 \t\t#Change in internal energy when stone enters state 4 in J\n",
+ "Q3 = dU3 \t\t#Heat transfer when stone enters state 4 in J\n",
+ "\n",
+ "#Results:\n",
+ "print \"When stone is about to enter state 2, dKE: \",round(dKE1/1000,2),\"KJ and dPE :\",round(dPE1,2),\"KJ\"\n",
+ "print \"When stone has just come to rest in the bucket i.e. state 3, W = 0, dPE = 0, dKE1:\",round(dKE2,2),\"J and dU :\",round(dU2,2),\"J\"\n",
+ "print \"When stone has entered state 4, dPE = 0, W3 = 0,dKE = 0, dU: \",round(dU3,2),\"J Q3: \",round(Q3,2),\"J\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Specific volume for water is: 0.06474 m**3/Kg\n",
+ "Therefore ,this state is in the two phase region with quality: 0.6456\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 5.4\n",
+ "'''Determine the missing property (P, T, or x) and v forwater at each of the following states:\n",
+ "a. T = 300◦C, u = 2780 kJ/kg\n",
+ "b. P = 2000 kPa, u = 2000 kJ/kg'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 300 \t\t#Given temp. in Celsius\n",
+ "u1 = 2780 \t\t#Given specific internal enrgy in kJ/kg\n",
+ "P2 = 2000 \t\t#Given pressure in kPa\n",
+ "u2 = 2000 \t\t#Given specific intrernal energy in kJ/kg\n",
+ "uf = 906.4 \t\t#in kJ/kg\n",
+ "ug = 2600.3 \t#in kJ/kg \n",
+ "vf = 0.001177 \t#in m**3/kg \n",
+ "vg = 0.099627 \t#in m**3/kg\n",
+ "\n",
+ "#Calculation:\n",
+ "x2 = (u2-906.4)/(ug-uf) \n",
+ "v2 = vf+x2*(vg-vf)#Specific volume for water in m**3/kg\n",
+ "\n",
+ "#Result:\n",
+ "print \"Specific volume for water is: \",round(v2,5),\"m**3/Kg\"\n",
+ "print \"Therefore ,this state is in the two phase region with quality: \",round(x2,4)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "By interplotation we find that for steam, if vg = 0.09831 m**3/kg then pressure is 2.03 MPa\n",
+ "Heat transfer for the process is: 104932.6 KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 5.5\n",
+ "'''A vessel having a volume of 5 m3 contains 0.05 m3 of saturated liquid water and 4.95 m3\n",
+ "of saturated water vapor at 0.1 MPa. Heat is transferred until the vessel is filled with\n",
+ "saturated vapor. Determine the heat transfer for this process.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Vliq = 0.05 \t\t#Volume of saturated liquid in m**3\n",
+ "vf = 0.001043 \t\t#in m**3/kg\n",
+ "Vvap = 4.95 \t\t#Volume of saturated water vapour in m**3\n",
+ "vg = 1.6940 \t\t#in m**3/kg\n",
+ "u1liq = 417.36 \t\t#Specific internal energy of liquid in kJ/kg\n",
+ "u1vap = 2506.1 \t\t#Specific internal energy of vapors in kJ/kg\n",
+ "V = 5 \t\t #Total volume in m**3\n",
+ "u2 = 2600.5 \t\t#Specific internal energy at final state in kJ/kg\n",
+ "\n",
+ "#Calculation:\n",
+ "m1liq = Vliq/vf \t\t#Mass of liquid in kg\n",
+ "m1vap = Vvap/vg \t\t#Mass of vapors in kg\n",
+ "U1 = m1liq*u1liq+m1vap*u1vap #Total internal energy in kJ\n",
+ "m = m1liq+m1vap \t\t#Total mass in kg\n",
+ "v2 = V/m \t\t #Final specific volume in m**3/kg\n",
+ "U2 = m*u2 \t\t #Internal energy at final state in kJ\n",
+ "Q = U2-U1 \t\t #Heat transfer for the process in kJ\n",
+ "\n",
+ "print 'By interplotation we find that for steam, if vg = 0.09831 m**3/kg then pressure is 2.03 MPa'\n",
+ "print \"Heat transfer for the process is: \",round(Q,2),\"KJ\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Work done for the process: 91.0 KJ\n",
+ "Heat transfer: 771.1 KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 5.6\n",
+ "'''A cylinder fitted with a piston has a volume of 0.1 m3 and contains 0.5 kg of steam at 0.4\n",
+ "MPa. Heat is transferred to the steam until the temperature is 300◦C, while the pressure\n",
+ "remains constant.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "V1 = 0.1 \t\t #Volume of cylinder in m**3\n",
+ "m = 0.5 \t\t #Mass of steam in kg\n",
+ "vf = 0.001084 \t\t#m**3/kg\n",
+ "vfg = 0.4614 \t\t#m**3/kg\n",
+ "hf = 604.74 \t\t#kJ/kg\n",
+ "hfg = 2133.8\t\t#kJ/kg\n",
+ "h2 = 3066.8 \t\t#Final specific heat enthalpy in kJ/kg\n",
+ "P = 400 \t\t #Pressure inside cylinder in kPa\n",
+ "v2 = 0.6548 \t\t#Specific enthalpy in m**3/kg\n",
+ "\n",
+ "#Calculation:\n",
+ "v1 = V1/m \t\t #Specific volume of steam in m**3/kg\n",
+ "x1 = (v1-vf)/vfg \t\t#Quality\n",
+ "h1 = hf+x1*hfg \t\t#Initial specific enthalpy in kJ/kg\n",
+ "Q = m*(h2-h1) \t\t#Heat transfer for this process in kJ\n",
+ "W = m*P*(v2-v1) \t\t#Work done for the process in kJ\n",
+ "\n",
+ "#Result:\n",
+ "print \"Work done for the process: \",round(W), \"KJ\"\n",
+ "print \"Heat transfer: \",round(Q,1), \"KJ\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in specific heat enthalpy if ideal gas tables are used is: 1267.0 KJ/Kg\n",
+ "If empirical equations are used: 1241.64 KJ/Kg\n",
+ "If specific heat is assumed to be constant and using its value at T1: 1106.4 KJ/Kg\n",
+ "If specific heat is assumed to be constant at its value at (T1+T2)/2: 1292.0 KJ/Kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 5.8\n",
+ "'''Calculate the change of enthalpy as 1 kg of oxygen is heated from 300 to 1500 K. Assume\n",
+ "ideal-gas behavior.'''\n",
+ "from sympy import symbols,integrate\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "h1 = 273.2 \t\t#Specific heat enthalpy for oxygen at 300 K\n",
+ "h2 = 1540.2 \t#Specific heat enthalpy for oxygen at 1500 K\n",
+ "T1 = 300 \t\t#Initial temperature in K\n",
+ "T2 = 1500 \t\t#Final temparature in K\n",
+ "x = symbols('x')\n",
+ "\n",
+ "#Calculation:\n",
+ "Cp = 0.88-0.00001*x+0.54*x**2-0.33*x**3 #Expression for constant pressure specific heat enthalpy for oxygen\n",
+ "dh1 = h2-h1 \t#This change in specific heat enthalpy is calculated using ideal gas tables \n",
+ "dh2 = 1000*integrate(Cp,(x,T1/1000,T2/1000)) #Using empirical equation\n",
+ "dh3 = 0.922*(T2-T1) #It is claculated if we assume specific heat enthalpy to be constant and uses its value at 300K\n",
+ "dh4 = 1.0767*(T2-T1)#It is claculated if we assume specific heat enthalpy to be constant and uses its value at 900K i.e mean of initial and final temperature\n",
+ "\n",
+ "#Result:\n",
+ "print \"Change in specific heat enthalpy if ideal gas tables are used is: \",round( dh1,2),\"KJ/Kg\"\n",
+ "print \"If empirical equations are used: \",round( dh2,2),\"KJ/Kg\"\n",
+ "print \"If specific heat is assumed to be constant and using its value at T1: \",round(dh3,2),\"KJ/Kg\"\n",
+ "print \"If specific heat is assumed to be constant at its value at (T1+T2)/2: \",round(dh4),\"KJ/Kg\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat transfer for the above process is: -4.21 KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 5.9\n",
+ "'''A cylinder fitted with a piston has an initial volume of 0.1 m3 and contains nitrogen at 150\n",
+ "kPa, 25◦C. The piston is moved, compressing the nitrogen until the pressure is 1 MPa and\n",
+ "the temperature is 150◦C. During this compression process heat is transferred from the\n",
+ "nitrogen, and the work done on the nitrogen is 20 kJ. Determine the amount of this heat\n",
+ "transfer.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P = 150 \t\t#Pressure of nitrogen in cylinder in kPa\n",
+ "V = 0.1 \t\t#Initial volume of cylinder in m**3\n",
+ "T1 = 25 \t\t#Initial temperature of nitrogen in celsius\n",
+ "T2 = 150 \t\t#Final tempareture of nitrogen in celsius\n",
+ "R = 0.2968 \t\t#In kJ/kg-K\n",
+ "Cv = 0.745 \t\t#Constant volume specific heat for nitrogen in kJ/kg-K\n",
+ "W = -20 \t\t#Work done on nitrogen gas in kJ\n",
+ "\n",
+ "#Calculation:\n",
+ "m = P*V/(R*(T1+273))#Mass of nitrogen in kg\n",
+ "Q = m*Cv*(T2-T1)+W #Heat transfer during the process in kJ\n",
+ "\n",
+ "#Result:\n",
+ "print \"Heat transfer for the above process is: \",round( Q,2),\"KJ\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rate of increase of internal energy is: 246.0 J/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 5.10\n",
+ "'''During the charging of a storage battery, the current i is 20 A and the voltage e is 12.8\n",
+ "V. The rate of heat transfer from the battery is 10 W. At what rate is the internal energy\n",
+ "increasing?'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "W = -12.8*20 \t#Power consumed in J/s\n",
+ "Q = -10 \t\t#Heat transfer rate from battery in J/s\n",
+ "\n",
+ "#Calculation:\n",
+ "r = Q-W \t\t#Rate of increase of internal energy\n",
+ "\n",
+ "#Result:\n",
+ "print \"Rate of increase of internal energy is: \",round( r,2),\"J/s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rate of change of temperature is: 0.0828 K/s\n",
+ "Time taken to reach a temperature of T: 11.0 min\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 5.11\n",
+ "'''A 25-kg cast-iron wood-burning stove, shown in Fig. 5.12, contains 5 kg of soft pine wood\n",
+ "and 1 kg of air. All the masses are at room temperature, 20◦C, and pressure, 101 kPa. The\n",
+ "wood now burns and heats all the mass uniformly, releasing 1500W. Neglect any air flow\n",
+ "and changes in mass of wood and heat losses. Find the rate of change of the temperature\n",
+ "(dT/dt) and estimate the time it will take to reach a temperature of 75◦C.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Q = 1500 \t\t#Power produced by burning wood in J/s\n",
+ "mair = 1 \t\t#Mass of air in kg\n",
+ "mwood = 5 \t\t#Mass of soft pine wood in kg \n",
+ "miron = 25 \t\t#Mass of cast iron in kg\n",
+ "Cvair = 0.717 \t#Constant volume specific heat for air in kJ/kg\n",
+ "Cwood = 1.38 \t#Constant volume specific heat for wood in kJ/kg\n",
+ "Ciron = 0.42 \t#Constant volume specific heat for iron in kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "dT = 75-20 \t\t#Increase in temperature in Celsius\n",
+ "T = (Q/1000)/(mair*Cvair+mwood*Cwood+miron*Ciron) \t#Rate of change of temperature in K/s\n",
+ "dt = (dT/T)/60 \t#in minutes\n",
+ "\n",
+ "#Results:\n",
+ "print \"Rate of change of temperature is: \",round(T,4),\"K/s\"\n",
+ "print \"Time taken to reach a temperature of T: \",round(dt),\"min\""
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Introduction_to_flight_by_J_D_Anderson/6._Elements_of_Airplane_Performance.ipynb b/Introduction_to_flight_by_J_D_Anderson/6._Elements_of_Airplane_Performance.ipynb
new file mode 100644
index 00000000..b3942e06
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/6._Elements_of_Airplane_Performance.ipynb
@@ -0,0 +1,677 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Elements of Airplane Performance"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The mass flow rate is: 0.0055 kg/s.\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 6.01\n",
+ "''' Air is flowing in a 0.2-m-diameter pipe at a uniform velocity of 0.1 m/s. The temperature\n",
+ "is 25◦C and the pressure is 150 kPa. Determine the mass flow rate. '''\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "R = 0.287 \t\t#in kJ/kg-K\n",
+ "T = 25 \t\t#temperature in celsius\n",
+ "P = 150 \t\t#pressure in kPa\n",
+ "v = R*(T+273.2)/P#specific volume in m**3/kg\n",
+ "D = 0.2 \t\t#diameter of pipe in metre\n",
+ "V = 0.1 \t\t#velocity of air in m/s\n",
+ "\n",
+ "#Calculations:\n",
+ "A = pi*D**2/4 \t#cross sectional area in m**2\n",
+ "m = V*A/v \t\t#mass flow rate in kg/s\n",
+ "\n",
+ "#Results:\n",
+ "print \"The mass flow rate is:\",round(m,4),\"kg/s.\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The work involved in this process is: 0.6 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 6.02\n",
+ "''' Assume we are standing next to the local city’s main water line. The liquid water inside\n",
+ "flows at a pressure of 600 kPa (6 atm) with a temperature of about 10◦C. We want to add\n",
+ "a smaller amount, 1 kg, of liquid to the line through a side pipe and valve mounted on the\n",
+ "main line. How much work will be involved in this process? '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P = 600 \t\t#pressure in kPa\n",
+ "m = 1 \t\t#in kg\n",
+ "v = 0.001 \t\t#specific volume in m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "W = P*m*v \t\t#necessary work in kJ for adding the fluid \n",
+ "\n",
+ "#Results:\n",
+ "print \"The work involved in this process is:\",round(W,2),\"kJ\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The rate at which cooling water flows thorugh the condenser is: 0.919 kg/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 6.03\n",
+ "''' Consider a water-cooled condenser in a large refrigeration system in which R-134a is the\n",
+ "refrigerant fluid. The refrigerant enters the condenser at 1.0 MPa and 60◦C, at the rate of\n",
+ "0.2 kg/s, and exits as a liquid at 0.95 MPa and 35◦C. Cooling water enters the condenser\n",
+ "at 10◦C and exits at 20◦C. Determine the rate at which cooling water flows through the\n",
+ "condenser.\n",
+ "Control volume: Condenser.\n",
+ "Sketch: Fig. 6.6\n",
+ "Inlet states: R-134a—fixed; water—fixed.\n",
+ "Exit states: R-134a—fixed; water—fixed.\n",
+ "Process: Steady-state.\n",
+ "Model: R-134a tables; steam tables. '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "hir = 441.89 \t\t#in kJ/kg for refrigerant using steam table \n",
+ "her = 249.10 \t\t#in kJ/kg for refrigerant using steam table\n",
+ "hiw = 42 \t\t #in kJ/kg for water using steam table\n",
+ "hew = 83.95 \t #in kJ/kg for water using steam table\n",
+ "mr = 0.2 \t\t #the rate at which refrigerant enters the condenser in kg/s\n",
+ "\n",
+ "#Calculations:\n",
+ "mw = mr*(hir-her)/(hew-hiw) \t\t#rate of flow of water in kg/s\n",
+ "\n",
+ "#Results:\n",
+ "print \"The rate at which cooling water flows thorugh the condenser is:\",round( mw,3),\"kg/s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The quality is: 0.99\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 6.04\n",
+ "''' Steam at 0.6 MPa and 200◦C enters an insulated nozzle with a velocity of 50 m/s. It leaves\n",
+ "at a pressure of 0.15 MPa and a velocity of 600 m/s. Determine the final temperature if\n",
+ "the steam is superheated in the final state and the quality if it is saturated.\n",
+ "Control volume: Nozzle.\n",
+ "Inlet state: Fixed (see Fig. 6.7).\n",
+ "Exit state: Pe known.\n",
+ "Process: Steady-state.\n",
+ "Model: Steam tables. '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "hi = 2850.1 \t#initial specific heat enthalpy for steam in kJ/kg\n",
+ "Vi = 50 \t\t#initial velocity of steam in m/s\n",
+ "Ve = 600 \t\t#final velocity of steam in m/s\n",
+ "hf = 467.1 \t\t#at final state in kJ/kg\n",
+ "hfg = 2226.5 \t#at final state in kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "he = hi+Vi**2/(2*1000)-Ve**2/(2*1000) #final specific heat enthalpy for steam in kJ/kg\n",
+ "xe = (he-hf)/hfg \t#quality of steam in final state\n",
+ "\n",
+ "#Results:\n",
+ "print \"The quality is: \",round(xe,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Quality of the ammonia leaving the expansion valve is: 16.38 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 6.05\n",
+ "''' Consider the throttling process across the expansion valve or through the capillary tube\n",
+ "in a vapor-compression refrigeration cycle. In this process the pressure of the refrigerant\n",
+ "drops from the high pressure in the condenser to the low pressure in the evaporator,\n",
+ "and during this process some of the liquid flashes into vapor. If we consider this\n",
+ "process to be adiabatic, the quality of the refrigerant entering the evaporator can be\n",
+ "calculated.\n",
+ "Consider the following process, in which ammonia is the refrigerant. The ammonia\n",
+ "enters the expansion valve at a pressure of 1.50MPa and a temperature of 35◦C. Its pressure\n",
+ "on leaving the expansion valve is 291 kPa. Calculate the quality of the ammonia leaving\n",
+ "the expansion valve.\n",
+ "Control volume: Expansion valve or capillary tube.\n",
+ "Inlet state: Pi, Ti known; state fixed.\n",
+ "Exit state: Pe known.\n",
+ "Process: Steady-state.\n",
+ "Model: Ammonia tables. '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "hi = 346.8 \t\t#specific heat enthalpy for ammonia at initial state in kJ/kg\n",
+ "hf = 134.4 \t\t#at final state in kJ/kg\n",
+ "hfg = 1296.4\t#at final state in kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "he = hi \t\t#specific heat enthalpy for ammonia at final state will be equal that at initial state because it is a throttling process\n",
+ "xe = (he-hf)/hfg \t#quality at final state\n",
+ "\n",
+ "#Results:\n",
+ "print \"Quality of the ammonia leaving the expansion valve is:\",round(xe*100,2),\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The power output of the turbine is: 678.2 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example:\n",
+ "''' The mass rate of flow into a steam turbine is 1.5 kg/s, and the heat transfer from the\n",
+ "turbine is 8.5 kW. The following data are known for the steam entering and leaving the\n",
+ "turbine.\n",
+ " Inlet Conditions Exit Conditions\n",
+ "Pressure 2.0 MPa 0.1 MPa\n",
+ "Temperature 350◦C\n",
+ "Quality 100%\n",
+ "Velocity 50 m/s 100 m/s\n",
+ "Elevation above 6 m 3 m\n",
+ "reference plane\n",
+ "\n",
+ "g = 9.8066 m/s2\n",
+ "\n",
+ "Determine the power output of the turbine.\n",
+ "Control volume: Turbine (Fig. 6.9).\n",
+ "Inlet state: Fixed (above).\n",
+ "Exit state: Fixed (above).\n",
+ "Process: Steady-state.\n",
+ "Model: Steam tables. '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "hi = 3137 \t\t#initial specific heat of enthalpy in kJ/kg\n",
+ "he = 2675.5 \t#final specific heat of enthalpy in kJ/kg\n",
+ "Vi = 50 \t\t#initial velocity of steam in m/s\n",
+ "Ve = 100 \t\t#final velocity of steam in m/s\n",
+ "Zi = 6 \t\t#height of inlet conditions in metres\n",
+ "Ze = 3 \t\t#height of exit conditions in metres\n",
+ "m = 1.5 \t\t#mass flow rate of steam in kg/s\n",
+ "g = 9.8066 \t\t#acc. due to gravity in m/s**2\n",
+ "Qcv = -8.5 \t\t#heat transfer rate from turbine in kW\n",
+ "\n",
+ "#Calculations:\n",
+ "Wcv = Qcv+m*(hi+Vi**2/(2*1000)+g*Zi/1000)-m*(he+Ve**2/(2*1000)+g*Ze/1000) \t#power output of turbine in kW\n",
+ "\n",
+ "#Results:\n",
+ "print \"The power output of the turbine is:\",round(Wcv,1),\"kW\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat transfer rate in the aftercooler is: 35.2 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 6.07\n",
+ "''' The compressor in a plant (see Fig. 6.10) receives carbon dioxide at 100 kPa, 280 K,\n",
+ "with a low velocity. At the compressor discharge, the carbon dioxide exits at 1100 kPa,\n",
+ "500 K, with velocity of 25 m/s and then flows into a constant-pressure aftercooler (heat\n",
+ "exchanger) where it is cooled down to 350 K. The power input to the compressor is\n",
+ "50 kW. Determine the heat transfer rate in the aftercooler. '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "V1 = 0 \t\t#we assume initial velocity to be zero because its given that it enters with a low velocity\n",
+ "V2 = 25 \t\t#final velocity with which carbon dioxide exits in m/s\n",
+ "h2 = 401.52 \t#final specific enthalpy of heat when carbon dioxide exits in kJ/kg\n",
+ "h1 = 198 \t\t#initial specific enthalpy of heat in kJ/kg\n",
+ "Wc = -50 \t\t#power input to the compressor in kW\n",
+ "h3 = 257.9 \t\t#final specific enthalpy of heat when carbon dioxide flows into a constant pressure aftercooler\n",
+ "\n",
+ "#Calculations:\n",
+ "w = h1-h2-V2**2/(2*1000)#in kJ/kg\n",
+ "m = Wc/w \t\t#mass flow rate of carbon dioxide in kg/s\n",
+ "Qcool = -m*(h3-h2) \t\t#heat transfer rate in the aftercooler in kW\n",
+ "\n",
+ "#Results:\n",
+ "print \"Heat transfer rate in the aftercooler is:\",round(Qcool,1),\"kW\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The pump requires power input of 840.0 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 6.08\n",
+ "''' A small liquid water pump is located 15 m down in a well (see Fig. 6.11), taking water\n",
+ "in at 10◦C, 90 kPa at a rate of 1.5 kg/s. The exit line is a pipe of diameter 0.04 m that\n",
+ "goes up to a receiver tank maintaining a gauge pressure of 400 kPa. Assume the process\n",
+ "is adiabatic with the same inlet and exit velocities and the water stays at 10◦C. Find the\n",
+ "required pump work. '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 1.5 \t\t#mass flow rate of water in kg/s\n",
+ "g = 9.807 \t\t#acceleration due to gravity in m/s**2\n",
+ "Zin = -15 \t\t#depth of water pump in well in metres\n",
+ "Zex = 0 \t\t#in metres\n",
+ "v = 0.001001 \t#specific volume in m**3/kg\n",
+ "Pin = 90 \t\t#in kPa\n",
+ "\n",
+ "#Calculations:\n",
+ "Pex = 400+101.3 \t#exit pressure in kPa\n",
+ "W = m*(g*(Zin-Zex)*0.001-(Pex-Pin)*v) \t\t#power input in kW\n",
+ "\n",
+ "#Results:\n",
+ "print \"The pump requires power input of\",-round(W,2)*1000,\"W\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat transfer in line between boiler and turbine is: -21.0 kJ/kg\n",
+ "Turbine work is: 640.7 kJ/kg\n",
+ "Heat transfer in condenser is: -2173.3 kJ/kg\n",
+ "Heat transfer in boiler is: 2831.0 kJ/kg. \n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 6.09\n",
+ "''' Consider the simple steam power plant, as shown in Fig. 6.12. The following data are for\n",
+ "such a power plant.\n",
+ "\n",
+ "Location Pressure Temperature or Quality\n",
+ "Leaving boiler 2.0 MPa 300◦C\n",
+ "Entering turbine 1.9 MPa 290◦C\n",
+ "Leaving turbine,entering condenser 15 kPa 90%\n",
+ "Leaving condenser,entering pump 14 kPa 45◦C\n",
+ "Pump work = 4 kJ/kg\n",
+ "\n",
+ "Determine the following quantities per kilogram flowing through the unit:\n",
+ "a. Heat transfer in the line between the boiler and turbine.\n",
+ "b. Turbine work.\n",
+ "c. Heat transfer in the condenser.\n",
+ "d. Heat transfer in the boiler. '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "h1 = 3023.5 \t\t#specific heat of enthalpy of steam leaving boiler in kJ/kg\n",
+ "h2 = 3002.5 \t\t#specific heat of enthalpy of steam entering turbine in kJ/kg\n",
+ "x = 0.9 \t\t #quality of steam entering condenser\n",
+ "hf = 226 \t\t #in kJ/kg\n",
+ "hfg = 2373.1 \t\t#in kJ/kg\n",
+ "h4 = 188.5 \t\t #specific heat of enthalpy of steam entering pump in kJ/kg\n",
+ "w45 = -4 \t\t #pump work in kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "h3 = hf+x*hfg \t\t#specific heat of enthalpy of steam entering condenser in kJ/kg\n",
+ "q12 = h2-h1 \t\t#heat transfer in line between boiler and turbine in kJ/kg\n",
+ "w23 = h2-h3 \t\t#turbine work in kJ/kg\n",
+ "q34 = h4-h3 \t\t#heat transfer in condenser\n",
+ "h5 = h4-w45 \t\t#in kJ/kg\n",
+ "q51 = h1-h5 \t\t#heat transfer in boiler in kJ/kg\n",
+ "\n",
+ "#Results:\n",
+ "print \"Heat transfer in line between boiler and turbine is:\",round(q12,2),\"kJ/kg\"\n",
+ "print \"Turbine work is:\",round(w23,1),\"kJ/kg\"\n",
+ "print \"Heat transfer in condenser is:\",round(q34,1),\"kJ/kg\"\n",
+ "print \"Heat transfer in boiler is:\",round(q51,2),\"kJ/kg. \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The quality at the evaporator inlet is: 0.345\n",
+ "The rate of heat transfer to the evaporator is: 14.54 kW. \n",
+ "Rate of heat transfer from the compressor is: -0.21 kW. \n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 6.10\n",
+ "''' The refrigerator shown in Fig. 6.13 uses R-134a as the working fluid. The mass flow rate\n",
+ "through each component is 0.1 kg/s, and the power input to the compressor is 5.0 kW. The\n",
+ "following state data are known, using the state notation of Fig. 6.13:\n",
+ "P1 = 100 kPa, T1 = −20◦C\n",
+ "P2 = 800 kPa, T2 = 50◦C\n",
+ "T3 = 30◦C, x3 = 0.0\n",
+ "T4 = −25◦C\n",
+ "\n",
+ "Determine the following:\n",
+ "a. The quality at the evaporator inlet.\n",
+ "b. The rate of heat transfer to the evaporator.\n",
+ "c. The rate of heat transfer from the compressor. '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "hf4 = 167.4 \t#in kJ/kg\n",
+ "hfg4 = 215.6 \t#in kJ/kg\n",
+ "h3 = 241.8 \t\t#specific heat of enthalpy of R-134a entering expansion valve\n",
+ "h4 = h3 \t\t#specific heat of enthalpy of R-134a leaving expansion valve\n",
+ "h1 = 387.2 \t\t#in kJ/kg\n",
+ "h2 = 435.1 \t\t#in kJ/kg\n",
+ "m = 0.1 \t\t#mass flow rate in kg/s\n",
+ "Wcomp = -5 \t\t#power input to compressor in kW\n",
+ "\n",
+ "#Calculations:\n",
+ "x4 = (h3-hf4)/hfg4 #quality of R-134a at evaporator inlet\n",
+ "Qevap = m*(h1-h4) #rate of heat transfer to the evaporator\n",
+ "Qcomp = m*(h2-h1)+Wcomp #rate of heat transfer from compressor\n",
+ "\n",
+ "#Results:\n",
+ "print \"The quality at the evaporator inlet is:\",round(x4,3)\n",
+ "print \"The rate of heat transfer to the evaporator is:\",round(Qevap,2),\"kW. \"\n",
+ "print \"Rate of heat transfer from the compressor is:\",round(Qcomp,2),\"kW. \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mass of the steam that flows into the tank is: 1.263 kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 6.12\n",
+ "''' Let the tank of the previous example have a volume of 0.4m3 and initially contain saturated\n",
+ "vapor at 350 kPa. The valve is then opened, and steam from the line at 1.4 MPa and 300◦C\n",
+ "flows into the tank until the pressure is 1.4 MPa.\n",
+ "Calculate the mass of steam that flows into the tank. '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "V1 = 0.4 \t\t#initial volume fo tank in m**3\n",
+ "v1 = 0.5243 \t#initial specific volume in m**3/kg\n",
+ "h1 = 3040.4 \t#initial specific enthalpy in kJ/kg\n",
+ "u1 = 2548.9 \t#initial specific internal energy in kJ/kg\n",
+ "V2 = 0.4 \t\t#final volume in m**3\n",
+ "T2 = 342 \t\t#final temperature in Celsius by interpolation\n",
+ "v2 = 0.1974 \t#final specific volume in m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "m1 = V1/v1 \t\t#initial mass of steam in tank in kg\n",
+ "m2 = V2/v2 \t\t#final mass of the steam in the tank in kg\n",
+ "m = m2-m1 \t\t#mass of steam that flowsinto the tank\n",
+ "\n",
+ "#Results:\n",
+ "print \"Mass of the steam that flows into the tank is:\",round(m,3),\"kg\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mass of ammonia withdrawn is: 72.7 kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 6.13\n",
+ "''' A tank of 2 m3 volume contains saturated ammonia at a temperature of 40◦C. Initially the\n",
+ "tank contains 50% liquid and 50% vapor by volume. Vapor is withdrawn from the top of\n",
+ "the tank until the temperature is 10◦C. Assuming that only vapor (i.e., no liquid) leaves\n",
+ "and that the process is adiabatic, calculate the mass of ammonia that is withdrawn. '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "vf1 = 0.001725 \t\t#in m**3/kg\n",
+ "vf2 = 0.0016 \t\t#in m**3/kg\n",
+ "uf1 = 368.7 \t\t#in kJ/kg\n",
+ "uf2 = 226 \t\t #in kJ/kg\n",
+ "vg1 = 0.08313 \t\t#in m**3/kg\n",
+ "vfg2 = 0.20381\n",
+ "ug1 = 1341 \t\t #in kJ/kg\n",
+ "ufg2 = 1099.7 \t\t#in kJ/kg\n",
+ "Vf = 1 \t\t #initial volume of liquid in m**3\n",
+ "Vg = 1 \t\t #initial volume of vapor in m**3\n",
+ "he = 1461.1 \t\t#in kJ/kg\n",
+ "V = 2 \t\t #volume of tank in m**3\n",
+ "\n",
+ "#Calculations:\n",
+ "mf1 = Vf/vf1 \t\t#initial mass of liquid in kg\n",
+ "mg1 = Vg/vg1 \t\t#initial mass of vapor in kg\n",
+ "m1 = mf1+mg1 \t\t#initial mass of liquid in kg\n",
+ "x2 = ((2*1461.1)-(2*226)-(0.00160*634706))/((634706*0.20381)+(2*1099.7)) \t\t#quality of ammonia\n",
+ "v2 = 0.00160+(0.20381*x2) #final specific volume in m**3/kg\n",
+ "m2 = V/v2 \t\t #final mass of ammonia in kg\n",
+ "m = m1-m2 \t\t #mass of ammonia withdrawn\n",
+ "\n",
+ "#Results:\n",
+ "print \"Mass of ammonia withdrawn is:\",round(m,1),\"kg\""
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Introduction_to_flight_by_J_D_Anderson/7._Principles_of_Stability_and_Control.ipynb b/Introduction_to_flight_by_J_D_Anderson/7._Principles_of_Stability_and_Control.ipynb
new file mode 100644
index 00000000..2057ecdb
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/7._Principles_of_Stability_and_Control.ipynb
@@ -0,0 +1,278 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Chapter 7: Principles of Stability and Control"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total rate of energy rejected is: 233.0 KW\n",
+ "Rate of fuel consumption is: 0.0095 Kg/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 7.1\n",
+ "'''An automobile engine produces 136 hp on the output shaft with a thermal efficiency of\n",
+ "30%. The fuel it burns gives 35 000 kJ/kg as energy release. Find the total rate of energy\n",
+ "rejected to the ambient and the rate of fuel consumption in kg/s.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "W = 136*0.7355 \t#Output of automobile engine in kW\n",
+ "neng = 0.3 \t\t#Thermal efficiency of automobile engine\n",
+ "qh = 35000 \t\t#Energy output of fuel in kJ/kg\n",
+ "\n",
+ "#Calculation:\n",
+ "Qh = W/neng \t#Energy output of fuel in kW\n",
+ "Ql = Qh-W \t\t#Total rate of energy rejected to the ambient\n",
+ "m = Qh/qh \t\t#Rate of fuel consumption in kg/s\n",
+ "\n",
+ "#Result:\n",
+ "print \"Total rate of energy rejected is: \",round(Ql),\"KW\" \n",
+ "print \"Rate of fuel consumption is: \",round(m,4),\"Kg/s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rate of energy taken out of the cold space is: 250.0 W\n",
+ "Coefficient of performance of the refrigerator is: 1.67\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 7.2\n",
+ "'''The refrigerator in a kitchen shown in Fig. 7.7 receives electrical input power of 150 W\n",
+ "to drive the system, and it rejects 400 W to the kitchen air. Find the rate of energy taken\n",
+ "out of the cold space and the COP of the refrigerator.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Qh = 400 \t\t#Heat rejected to kitchen air in W\n",
+ "W = 150 \t\t#Electrical input power in W\n",
+ "\n",
+ "#Calculation:\n",
+ "Ql = Qh-W \t\t#Rate of energy taken out to cold space in W\n",
+ "B = Ql/W \t\t#Coefficicent of performnace of refrigerator\n",
+ "\n",
+ "#Result:\n",
+ "print \"Rate of energy taken out of the cold space is: \",round(Ql,2),\"W\"\n",
+ "print \"Coefficient of performance of the refrigerator is: \",round(B,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Celcius temperature at which pressure go to zero: -273.15 °C\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 7.3\n",
+ "'''In a certain constant-volume ideal-gas thermometer, the measured pressure at the ice point\n",
+ "(see Section 2.11) of water, 0◦C, is 110.9 kPa and at the steam point, 100◦C, is 151.5 kPa.\n",
+ "Extrapolating, at what Celsius temperature does the pressure go to zero (i.e., zero absolute\n",
+ "temperature)?'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P1 = 110.9 #Pressure at 1 in Kpa\n",
+ "P2 = 151.5 #Pressure at 2 in Kpa\n",
+ "T1 = 0 #Temperature at 1 in °C\n",
+ "T2 = 100 #Temperature at 2 in °C\n",
+ "P = 0 #pressure at which temperature is to be found out(KPa)\n",
+ "\n",
+ "#Calculation:\n",
+ "C =P1 #y-intercept\n",
+ "m = (P2-P1)/(T2-T1)#Slope of P-T graph\n",
+ "T = (P-C)/m #Interpolating straight line P=mT+C and finding T in °C\n",
+ "\n",
+ "#Result:\n",
+ "print 'Celcius temperature at which pressure go to zero: ',round(T,2),\"°C\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Engine efficiency is: 0.635\n",
+ "Energy discarded to the ambient surroundings is: 365.0 KW\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 7.4\n",
+ "'''Let us consider the heat engine, shown schematically in Fig. 7.25, that receives a heattransfer\n",
+ "rate of 1 MW at a high temperature of 550◦C and rejects energy to the ambient\n",
+ "surroundings at 300 K. Work is produced at a rate of 450 kW. We would like to know\n",
+ "how much energy is discarded to the ambient surroundings and the engine efficiency and\n",
+ "compare both of these to a Carnot heat engine operating between the same two reservoirs.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Qh = 1000 \t\t#Rate of heat transfer to heat engine in kW\n",
+ "W = 450 \t\t#Rate of production of work in kW\n",
+ "Tl = 300 \t\t#Temperature of surroundings in K\n",
+ "Th = 550 \t\t#Temperature of heat source in Celsius\n",
+ "\n",
+ "#Calculation:\n",
+ "Ql = Qh-W \t\t#Rate of heat rejected by heat engine in kW\n",
+ "nthermal = W/Qh \t#Efficiency from the definition of efficiency\n",
+ "ncarnot = 1-Tl/(Th+273)#Efficiency if heat engine is considered to be ideal carnot heat engine\n",
+ "W2 = ncarnot*Qh \t#Rate of work production if heat engine is assumed to be ideal carnot heat engine in kW\n",
+ "Ql2 = Qh-W2 \t#Rate of heat rejected by heat engine in kW if heat engine is assumed to be ideal carnot heat engine\n",
+ "\n",
+ "#Result:\n",
+ "print \"Engine efficiency is: \",round(ncarnot,3)\n",
+ "print \"Energy discarded to the ambient surroundings is: \",round(Ql2),\"KW\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 7.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Magnitude of reqiured work is: 0.15 KW\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 7.5\n",
+ "'''As one mode of operation of an air conditioner is the cooling of a room on a hot day, it\n",
+ "works as a refrigerator, shown in Fig. 7.26.Atotal of 4kWshould be removed from a room\n",
+ "at 24◦C to the outside atmosphere at 35◦C.We would like to estimate the magnitude of the\n",
+ "required work. To do this we will not analyze the processes inside the refrigerator, which\n",
+ "is deferred to Chapter 11, but we can give a lower limit for the rate of work, assuming it\n",
+ "is a Carnot-cycle refrigerator.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Tl = 24+273 \t\t#Room temperature in Kelvins\n",
+ "Th = 35+273 \t\t#Atmospheric temperature in Kelvins\n",
+ "Ql = 4 \t\t #Rate of heat rejection from room\n",
+ "\n",
+ "#Calculation:\n",
+ "B = Tl/(Th-Tl) \t\t#Coefficient of performance of air conditioner\n",
+ "W = Ql/B \t\t #Required work in kW\n",
+ "\n",
+ "#Result:\n",
+ "print \"Magnitude of reqiured work is: \",round(W,2),\"KW\""
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Introduction_to_flight_by_J_D_Anderson/8._Space_Flight_(Astronautics).ipynb b/Introduction_to_flight_by_J_D_Anderson/8._Space_Flight_(Astronautics).ipynb
new file mode 100644
index 00000000..85beaf65
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/8._Space_Flight_(Astronautics).ipynb
@@ -0,0 +1,548 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8: Space Flight (Astronautics)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pressure after compression is P2: 1487.1 KPa\n",
+ "Coefficient of performance of refrigerator: 5.55\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 8.1\n",
+ "''' Consider a Carnot-cycle heat pump with R-134a as the working fluid. Heat is absorbed\n",
+ "into the R-134a at 0◦C, during which process it changes from a two-phase state to saturated\n",
+ "vapor. The heat is rejected from the R-134a at 60◦C and ends up as saturated liquid. Find\n",
+ "the pressure after compression, before the heat rejection process, and determine the COP\n",
+ "for the cycle.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Th = 60 \t\t\t#temperature at which heat is rejected from R-134a\n",
+ "Tl = 0 \t\t\t\t#temperature at which heat is absorbed into the R-134a \n",
+ "s1 = 1.7262 \t\t#specific entropy at 0 Celsius\n",
+ "s3 = 1.2857 \t\t#specific entropy at 60 celsius\n",
+ "s4 = s3 \t\t\t#process of state change from 3-4 is isentropic\n",
+ "\n",
+ "#Calculations:\n",
+ "s2 = s1 \t\t\t#process of state change from 1-2 is isentropic \n",
+ "P2 = 1400+(1600-1400)*(1.7262-1.736)/(1.7135-1.736) \t\t#pressure after compression in kPa\n",
+ "B = (Th+273)/(Th-Tl)#coefficient of performance of refrigerator\n",
+ "\n",
+ "#Results:\n",
+ "print \"Pressure after compression is P2: \",round(P2,1) ,'KPa'\n",
+ "print \"Coefficient of performance of refrigerator: \",round(B,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Work required to accomplish the process: 73.7 KJ\n",
+ "Heat transfer: 277.9 KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 8.2\n",
+ "''' A cylinder/piston setup contains 1 L of saturated liquid refrigerant R-410a at 20◦C.\n",
+ "The piston now slowly expands, maintaining constant temperature to a final pressure of\n",
+ "400 kPa in a reversible process. Calculate the work and heat transfer required to accom-\n",
+ "plish this process'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "u1 = 87.94 \t\t\t\t\t#specific internal energy of R-12 at state 1 in kJ/kg\n",
+ "u2 = 276.44 \t\t\t\t#specific internal energy of R-12 at state 2 in kJ/kg\n",
+ "s1 = 0.3357 \t\t\t\t#specific entropy at state 1 in kJ/kg-K\n",
+ "s2 = 1.2108 \t\t\t\t#specific entropy at state 2 in kJ/kg-K\n",
+ "V = 0.001 \t\t\t\t\t#volume of saturated liquid in m**3\n",
+ "v1 = 0.000923 \t\t\t\t#specific volume in m**3/kg\n",
+ "T = 20 \t\t\t\t\t\t#temperature of liquid in celsius\n",
+ "\n",
+ "#Calculations:\n",
+ "m = V/v1 \t\t\t\t\t#mass of saturated liquid in kg\n",
+ "Q12 = m*(T+273.15)*(s2-s1) \t#heat transfer in kJ to accomplish the process\n",
+ "W12 = m*(u1-u2)+Q12 \t\t#work required to accomplish the process\n",
+ "\n",
+ "#Results\n",
+ "print \"Work required to accomplish the process: \",round(W12,1),'KJ'\n",
+ "print \"Heat transfer: \",round(Q12,1),'KJ'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in entropy assuming constant specific heat: 0.8958 KJ/Kg-K\n",
+ "Using steam table: 0.8959 KJ/Kg-K\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "#Example: 8.3\n",
+ "''' One kilogram of liquid water is heated from 20◦C to 90◦C. Calculate the entropy change,\n",
+ "assuming constant specific heat, and compare the result with that found when using the\n",
+ "steam tables.\n",
+ "Control mass: Water.\n",
+ "Initial and final states: Known.\n",
+ "Model: Constant specific heat, value at room temperature.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "C = 4.184 \t\t# specific heat of water in kJ/kg-K\n",
+ "T1 = 20 \t\t#initial temperature of water in celsius\n",
+ "T2 = 90 \t\t#final temperature of water in celsius\n",
+ "\n",
+ "#Calculations:\n",
+ "dS1 = C*log((T2+273.2)/(T1+273.2)) \t\t#change in entropy in kJ/kg-K\n",
+ "dS2 = 1.1925-0.2966 \t\t#in kJ/kg-K using steam tables\n",
+ "\n",
+ "#Results\n",
+ "print \"Change in entropy assuming constant specific heat: \",round(dS1,4),'KJ/Kg-K'\n",
+ "print \"Using steam table: \",round(dS2,4) ,'KJ/Kg-K'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in entropy using ideal gas tables: 1.7228 KJ/Kg-K\n",
+ "Change in entropy using empirical equation: 1.7058 KJ/Kg-K\n",
+ "Change in entropy using the value of specific heat at 300K: 1.5586 KJ/Kg-K\n",
+ "Change in entropy assuming specific heat is constant at its value at 900K: 1.8076 KJ/Kg-K\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "from sympy import symbols, integrate\n",
+ "#Example: 8.4\n",
+ "''' Consider Example 5.7, in which oxygen is heated from 300 to 1500 K. Assume that during\n",
+ "this process the pressure dropped from 200 to 150 kPa. Calculate the change in entropy\n",
+ "per kilogram.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 300 \t\t#initial temperature in kelvins\n",
+ "T2 = 1500 \t\t#final temperature in kelvins\n",
+ "P1 = 200 \t\t#initial pressure in kPa\n",
+ "P2 = 150 \t\t#final pressure in kPa\n",
+ "R = 0.2598 \t\t# in kJ/kg-K\n",
+ "Cp = 0.922 \t\t#specific heat in kJ/kg-K at constant pressure\n",
+ "dsT2 = 8.0649 \t#in kJ/kg-K\n",
+ "dsT1 = 6.4168 \t#in kJ/kg-K\n",
+ "x = symbols('x')#Symbolic representation of theta \n",
+ "\n",
+ "#Calculations:\n",
+ "dS1 = dsT2-dsT1-R*log(P2/P1) \t\t#entropy change calculated using ideal gas tables\n",
+ "dS2 = integrate(0.88/x-0.0001+0.54*x-0.33*x**2,(x,0.3,1.5))-R*log(P2/P1) \t\t#entropy change calculated using empirical equation \n",
+ "dS3 = Cp*log(T2/T1)-R*log(P2/P1) \t#entropy change assuming constant specific heat in kJ/kg-K\n",
+ "dS4 = 1.0767*log(T2/T1)+0.0747 \t\t#entropy change assuming specific heat is constant at its value at 990K\n",
+ "\n",
+ "#Results\n",
+ "print \"Change in entropy using ideal gas tables: \",round(dS1,4),'KJ/Kg-K'\n",
+ "print \"Change in entropy using empirical equation: \",round(dS2,4),'KJ/Kg-K'\n",
+ "print \"Change in entropy using the value of specific heat at 300K: \",round(dS3,4),'KJ/Kg-K'\n",
+ "print \"Change in entropy assuming specific heat is constant at its value at 900K: \",round(dS4,4),'KJ/Kg-K'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Entropy change assuming constant specific heat: 0.7785 KJ/Kg-K\n",
+ "Assuming variable specific heat: 0.7897 KJ/Kg-K\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "#Example: 8.5\n",
+ "''' Calculate the change in entropy per kilogram as air is heated from 300 to 600 K while\n",
+ "pressure drops from 400 to 300 kPa. Assume:\n",
+ "1. Constant specific heat.\n",
+ "2. Variable specific heat.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Cp = 1.004 \t\t\t#specific heat at constant pressure in kJ/kg-K\n",
+ "R = 0.287 \t\t\t#gas constant in kJ/kg-K\n",
+ "P1 = 400 \t\t\t#initial pressure in kPa\n",
+ "P2 = 300 \t\t\t#final pressure in kPa\n",
+ "T1 = 300 \t\t\t#initial temperature in K\n",
+ "T2 = 600 \t\t\t#final temperature in K\n",
+ "s1 = 6.8693 \t\t#specific entropy at T1\n",
+ "s2 = 7.5764 \t\t#specific entropy at T2\n",
+ "\n",
+ "#Calculations:\n",
+ "dS1 = Cp*log(T2/T1)-R*log(P2/P1)#entropy change assuming constant specific heat\n",
+ "dS2 = s2-s1-R*log(P2/P1) \t\t#entropy change assuming variable specific heat\n",
+ "\n",
+ "#Results\n",
+ "print \"Entropy change assuming constant specific heat: \",round(dS1,4),'KJ/Kg-K'\n",
+ "print \"Assuming variable specific heat: \",round(dS2,4),'KJ/Kg-K'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Work done by air: 106.96 KJ/Kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "#Example: 8.6\n",
+ "''' One kilogram of air is contained in a cylinder fitted with a piston at a pressure of 400\n",
+ "kPa and a temperature of 600 K. The air is expanded to 150 kPa in a reversible adiabatic\n",
+ "process. Calculate the work done by the air.\n",
+ "Control mass: Air.\n",
+ "Initial state: P 1 , T 1 ; state 1 fixed.\n",
+ "Final state: P 2 .\n",
+ "Process: Reversible and adiabatic.\n",
+ "Model: Ideal gas and air tables, Table A.7.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 600 \t\t\t\t#initial temperature of air in K\n",
+ "P1 = 400 \t\t\t\t#intial pressure of air in kPa\n",
+ "P2 = 150 \t\t\t\t#final pressure in kPa\n",
+ "u1 = 435.10 \t\t\t#specific internal energy at temperature T1 in kJ/kg\n",
+ "sT1 = 7.5764 \t\t\t#specific entropy at temperature T1 in kJ/kg-K\n",
+ "R = 0.287 \t\t\t\t#gas constant in kJ/kg-K\n",
+ "ds = 0\n",
+ "T2 = 457 \t\t\t\t#final temperature in K\n",
+ "u2 = 328.14 \t\t\t#specific internal energy at temperature T2 in kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "sT2 = ds+sT1+R*log(P2/P1)#specific entropy at temperature T2 in kJ/kg-K\n",
+ "w = u1-u2 \t\t\t\t#work done by air in kJ/kg\n",
+ "\n",
+ "#Results\n",
+ "print \"Work done by air: \",round(w,2),'KJ/Kg'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Work done is w12: -130.5 KJ/Kg\n",
+ "Heat transfer are: -32.2 KJ/Kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 8.7\n",
+ "''' In a reversible process, nitrogen is compressed in a cylinder from 100 kPa and 20◦\n",
+ "C to 500 kPa. During this compression process, the relation between pressure and volume is\n",
+ "PV 1.3 = constant. Calculate the work and heat transfer per kilogram, and show this process\n",
+ "on P–v and T–s diagrams.\n",
+ "Control mass: Nitrogen.\n",
+ "Initial state: P 1 , T 1 ; state 1 known.\n",
+ "Final state: P 2 .\n",
+ "Process: Reversible, polytropic with exponent n < k.\n",
+ "Diagram: Fig. 8.14.\n",
+ "Model: Ideal gas, constant specific heat—value at 300 K.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P2 = 500 \t\t\t\t\t#final pressure in cylinder in kPa\n",
+ "P1 = 100 \t\t\t\t\t#initial pressure in cylinder in kPa\n",
+ "T1 = 20+273.2 \t\t\t\t#initial temperature inside cylinder in Kelvins\n",
+ "n = 1.3 \n",
+ "R = 0.2968 \t\t\t\t\t#gas constant in kJ/kg-K\n",
+ "Cvo = 0.745 \t\t\t\t#specific heat at constant volume in kJ/kg-K\n",
+ "\n",
+ "#Calculations:\n",
+ "T2 = (T1)*(P2/P1)**((n-1)/n)#final temperature inside cylinder in K\n",
+ "w12 = R*(T2-T1)/(1-n) \t\t#work in kJ/kg\n",
+ "q12 = Cvo*(T2-T1)+w12 \t\t#heat transfer in kJ/kg\n",
+ "\n",
+ "#Results\n",
+ "print \"Work done is w12: \",round(w12,1),\"KJ/Kg\"\n",
+ "print \"Heat transfer are: \",round(q12,1),\"KJ/Kg\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Increase in entropy of water plus surr: 1.522 KJ/K\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 8.8\n",
+ "'''Consider an electric space heater that converts 1 kW of electric power into a heat flux of\n",
+ "1 kW delivered at 600 K from the hot wire surface. Let us look at the process of the energy\n",
+ "conversion from electricity to heat transfer and find the rate of total entropy generation.\n",
+ "Control mass: The electric heater wire.\n",
+ "State: Constant wire temperature 600 K.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 1 \t\t\t\t\t#mass of saturated water vapour\n",
+ "sfg = 6.0480 \t\t\t#in kJ/K\n",
+ "T = 25 \t\t\t\t\t#temperature of surrounding air in celsius\n",
+ "hfg = 2257.0 \t\t\t#in kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "dScm = -m*sfg \t\t\t#change in entropy of control mass in kJ/K\n",
+ "Qsurr = m*hfg \t\t\t#heat transferred to surr in kJ\n",
+ "dSsurr = Qsurr/(T+273.15)#in kJ/K\n",
+ "dSnet = dScm+dSsurr\t\t#net increase in entropy in kJ/K\n",
+ "\n",
+ "#Results:\n",
+ "print \"Increase in entropy of water plus surr:\",round(dSnet,4) ,'KJ/K'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Entropy generation is: 0.00167 KW/K\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 8.9\n",
+ "''' Consider an electric space heater that converts 1 kW of electric power into a heat flux of\n",
+ "1 kW delivered at 600 K from the hot wire surface. Let us look at the process of the energy\n",
+ "conversion from electricity to heat transfer and find the rate of total entropy generation.\n",
+ "Control mass: The electric heater wire.\n",
+ "State: Constant wire temperature 600 K.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Qout = 1 \t\t#value of heat flux generated by 1kW of electric power\n",
+ "T = 600 \t\t#temperature of hot wire surface in K\n",
+ "\n",
+ "#Calculations:\n",
+ "Sgen = Qout/T \t\t#entropy generation in kW/K\n",
+ "\n",
+ "#Results\n",
+ "print \"Entropy generation is: \",round(Sgen,5),'KW/K'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total entropy generated: 29.3 W/K\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 8.10\n",
+ "''' Consider a modern air conditioner using R-410a working in heat pump mode, as shown in\n",
+ "Fig. 8.21. It has a COP of 4 with 10 kW of power input. The cold side is buried underground,\n",
+ "where it is 8◦C, and the hot side is a house kept at 21◦C. For simplicity, assume that the\n",
+ "cycle has a high temperature of 50◦C and a low temperature of −10◦C (recall Section\n",
+ "7.10). We would like to know where entropy is generated associated with the heat pump,\n",
+ "assuming steady-state operation.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "B = 4 \t\t\t\t\t#COP of air conditioner\n",
+ "W = 10 \t\t\t\t\t#power input of air conditioner in kW\n",
+ "Thigh = 323 \t\t\t#in Kelvin\n",
+ "Tlow = 263 \t\t\t\t#in Kelvin\n",
+ "Tl = 281 \t\t\t\t#in K\n",
+ "Th = 294 \t\t\t\t#in K\n",
+ "\n",
+ "#Calculations:\n",
+ "Qh = B*W \t\t\t\t#in kW\n",
+ "Ql = Qh-W \t\t\t\t#in kW\n",
+ "SgenHP = (Qh*1000/Thigh)-(Ql*1000/Tlow)\t#in W/K\n",
+ "SgenCV1 = Ql*1000/Tlow-Ql*1000/Tl \t\t#in W/K\n",
+ "SgenCV2 = Qh*1000/Th-Qh*1000/Thigh \t\t#in W/K\n",
+ "SgenTOT = SgenCV1+SgenCV2+SgenHP \t\t#in W/K\n",
+ "\n",
+ "#Results\n",
+ "print \"Total entropy generated: \",round(SgenTOT,1),'W/K'"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Introduction_to_flight_by_J_D_Anderson/9._Propulsion.ipynb b/Introduction_to_flight_by_J_D_Anderson/9._Propulsion.ipynb
new file mode 100644
index 00000000..c24ed6eb
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/9._Propulsion.ipynb
@@ -0,0 +1,585 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9: Propulsion"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Work per kilogram of steam for this isentropic process: 377.5 KJ/Kg-K\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 9.1\n",
+ "'''Steam enters a steam turbine at a pressure of 1 MPa, a temperature of 300\n",
+ "◦C, and avelocity of 50 m/s. The steam leaves the turbine at a pressure of 150 kPa and a velocity of\n",
+ "200 m/s. Determine the work per kilogram of steam flowing through the turbine, assuming\n",
+ "the process to be reversible and adiabatic.\n",
+ "Control volume: Turbine.\n",
+ "Sketch: Fig. 9.2.\n",
+ "Inlet state: Fixed (Fig. 9.2).\n",
+ "Exit state: P e , V e known.\n",
+ "Process: Steady state, reversible and adiabatic.\n",
+ "Model: Steam tables.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "hi = 3051.2 \t\t#initial specific heat of enthalpy of steam in kJ/kg\n",
+ "si = 7.1228 \t\t#initial specific entropy of steam in kJ/kg-K\n",
+ "Pe = 0.15 \t\t\t#final pressure in MPa\n",
+ "se = si \t\t\t#specific entropy in final state in kJ/kg-K\n",
+ "sf = 1.4335 \t\t#in kJ/kg-K\n",
+ "sfg = 5.7897 \t\t#in kJ/kg-K\n",
+ "vi = 50 \t\t\t#velocity with which steam enters turbine in m/s\n",
+ "ve = 200 \t\t\t#velocity with which steam leaves the turbine in m/s\n",
+ "hf = 467.1 \t\t\t#in kJ/kg\n",
+ "hfg = 2226.5 \t\t#in kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "xe = (se-sf)/sfg \t#quality of steam in final state\n",
+ "he = hf+xe*hfg \t\t#final specific heat of enthalpy of steam in kJ/kg\n",
+ "w = hi+vi**2/(2*1000)-he-ve**2/(2*1000) \t\t#work of steam for isentropic process in kJ/kg\n",
+ "\n",
+ "#Results\n",
+ "print \"Work per kilogram of steam for this isentropic process: \",round(w,1),\"KJ/Kg-K\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Exit velocity of the steam from the nozzle: 737.0 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 9.2\n",
+ "''' Consider the reversible adiabatic flow of steam through a nozzle. Steam enters the nozzle\n",
+ "at 1 MPa and 300◦C, with a velocity of 30 m/s. The pressure of the steam at the nozzle\n",
+ "exit is 0.3 MPa. Determine the exit velocity of the steam from the nozzle, assuming a\n",
+ "reversible, adiabatic, steady-state process.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "hi = 3051.2 \t\t#initial specific heat of enthalpy in kJ/kg\n",
+ "si = 7.1228 \t\t#initial specific entropy in kJ/kg-K\n",
+ "Pe = 0.3 \t\t\t#final pressure in MPa\n",
+ "he = 2780.2 \t\t#final specific heat of enthalpy in kJ/kg-K\n",
+ "Te = 159.1 \t\t\t#final temperature in celsius\n",
+ "vi = 30 \t\t\t#velocity with which steam enters the nozzle in m/s\n",
+ "\n",
+ "#Calculations:\n",
+ "se = si \t\t\t#final specific entropy \n",
+ "ve = ((2*(hi-he)+(vi**2/1000))*1000)**0.5 \t\t#final velocity of steam with which it exits in m/s\n",
+ "\n",
+ "#Results\n",
+ "print \"Exit velocity of the steam from the nozzle:\",round(ve),'m/s'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Specific work required: -271.0 KJ/Kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 9.4\n",
+ "''' An air compressor in a gas station (see Fig. 9.4) takes in a flow of ambient air at 100 kPa,\n",
+ "290 K and compresses it to 1000 kPa in a reversible adiabatic process. We want to know\n",
+ "the specific work required and the exit air temperature.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Cp = 1.004 \t\t#specific heat of air at constant pressure in kJ/kg-K\n",
+ "Ti = 290 \t\t#initial temperature in kelvins\n",
+ "Pi = 100 \t\t#initial pressure in kPa\n",
+ "Pe = 1000 \t\t#final pressure in kPa\n",
+ "k = 1.4 \n",
+ "\n",
+ "#Calculations:\n",
+ "Te = Ti*(Pe/Pi)**((k-1)/k) #final temperature in kelvins\n",
+ "we = Cp*(Ti-Te) \t\t#required specific work in kJ/kg\n",
+ "\n",
+ "#Results:\n",
+ "print \"Specific work required: \",round(we),'KJ/Kg'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Entropy generated in this process: 0.072 KW/K\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 9.5\n",
+ "''' A de-superheater works by injecting liquid water into a flow of superheated steam. With\n",
+ "2 kg/s at 300 kPa, 200◦C, steam flowing in, what mass flow rate of liquid water at 20◦C\n",
+ "should be added to generate saturated vapor at 300 kPa? We also want to know the rate of\n",
+ "entropy generation in the process.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "h1 = 2865.54 \t\t#specific heat of enthalpy at state 1 in kJ/kg\n",
+ "h2 = 83.94 \t\t\t#specific heat of enthalpy at state 2 in kJ/kg\n",
+ "h3 = 2725.3 \t\t#specific heat of enthalpy at state 3 in kJ?kg\n",
+ "s1 = 7.3115 \t\t#specific entropy at state 1 in kJ/kg-K\n",
+ "s2 = 0.2966 \t\t#specific entropy at state 2 in kJ/kg-K\n",
+ "s3 = 6.9918 \t\t#specific entropy at state 3in kJ/kg-K\n",
+ "m1 = 2 \t\t\t\t#mass flow rate at state 1 in kg/s\n",
+ "\n",
+ "#Calculations:\n",
+ "m2 = m1*(h1-h3)/(h3-h2)\t#mass flow rate at state 2 in kg/s\n",
+ "m3 = m1+m2 \t\t\t\t#mass flow rate at state 3 in kg/s\n",
+ "Sgen = m3*s3-m1*s1-m2*s2#entropy generation in the process\n",
+ "\n",
+ "#Results:\n",
+ "print \"Entropy generated in this process: \",round(Sgen,3),'KW/K'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total amount of work required to fill the tank: -31.9 KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "#Example: 9.6\n",
+ "'''Assume an air tank has 40 L of 100 kPa air at ambient temperature 17◦C. The adiabatic\n",
+ "and reversible compressor is started so that it charges the tank up to a pressure of 1000\n",
+ "kPa and then it shuts off. We want to know how hot the air in the tank gets and the total\n",
+ "amount of work required to fill the tank.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T1 = 17+273 \t\t#initial temperature of tank in Kelvins\n",
+ "sT1 = 6.83521 \t\t#specific entropy in kJ/kg-K\n",
+ "R = 0.287 \t\t\t#gas constant in kJ/kg-K\n",
+ "P1 = 100 \t\t\t#initial pressure in kPa\n",
+ "P2 = 1000 \t\t\t#final pressure in kPa\n",
+ "T2 = 555.7 \t\t\t#from interplotation \n",
+ "V1 = 0.04 \t\t\t#volume of tank in m**3\n",
+ "V2 = V1 \t\t\t#final volume is equal to initial volume\n",
+ "u1 = 207.19 \t\t#initial specific heat of enthalpy in kJ/kg\n",
+ "u2 = 401.49 \t\t#final specific heat of enthalpy in kJ/kg\n",
+ "hin = 290.43 \t\t#in kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "sT2 = sT1+R*log(P2/P1)\t#specific entropy at temperature T2 in kJ/kg-K\n",
+ "m1 = P1*V1/(R*T1) \t#initial mass of air in tank in kg\n",
+ "m2 = P2*V2/(R*T2) \t#final mass of air in tank in kg\n",
+ "Min = m2-m1 \t\t#in kg\n",
+ "W12 = Min*hin+m1*u1-m2*u2 \t\t#work required to fill the tank in kJ\n",
+ "\n",
+ "#Results:\n",
+ "print \"Total amount of work required to fill the tank: \",round(W12,1),'KJ'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Work required to pump water isentropically: 4.92 KJ/Kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 9.7\n",
+ "''' Calculate the work per kilogram to pump water isentropically from 100 kPa, 30◦C to 5 MPa.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P1 = 100 \t\t\t#initial pressure in kPa\n",
+ "P2 = 5000 \t\t\t#final pressure in kPa\n",
+ "v = 0.001004 \t\t#specific volume in m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "w = v*(P2-P1) \t\t#work required to pump water isentropically\n",
+ "\n",
+ "#Results:\n",
+ "print \"Work required to pump water isentropically: \",round(w,2),'KJ/Kg'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ideal nozzle can generate upto Ve = 20.0 m/s in the exit flow.\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 9.8\n",
+ "'''Consider a nozzle used to spray liquid water. If the line pressure is 300 kPa and the water\n",
+ "temperature is 20◦C, how high a velocity can an ideal nozzle generate in the exit flow?'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "vf = 0.001002 \t#in m**3/kg\n",
+ "Pi = 300 \t\t#Line pressure in kPa\n",
+ "Po = 100 \t\t#in kPa\n",
+ "\n",
+ "#Calculations:\n",
+ "v = vf\n",
+ "Ve = (2*v*(Pi-Po)*1000)**0.5 \t\t#velocity in the exit flow\n",
+ "\n",
+ "#Results:\n",
+ "print \"Ideal nozzle can generate upto Ve = \",round(Ve),'m/s in the exit flow.'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rate of entropy generation for this process: 0.00166 KW/K\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 9.9\n",
+ "'''Saturated vapor R-410a enters the uninsulated compressor of a home central air-\n",
+ "conditioning system at 5◦C. The flow rate of refrigerant through the compressor is 0.08\n",
+ "kg/s, and the electrical power input is 3 kW. The exit state is 65◦C, 3000 kPa. Any heat transfer from the compressor is with the ambient at 30◦C. Determine the rate of entropy\n",
+ "generation for this process.\n",
+ "Control volume: Compressor out to ambient T 0 .\n",
+ "Inlet state: T i , x i known; state fixed.\n",
+ "Exit state: P e , T e known; state fixed.\n",
+ "Process: Steady-state, single fluid flow.\n",
+ "Model: R-410a tables, B.4.'''\n",
+ "#Variable Declaration: \n",
+ "hi = 280.6 \t\t\t\t#in kJ/kg\n",
+ "he = 307.8 \t\t\t\t#in kJ/kg\n",
+ "si = 1.0272 \t\t\t#in kJ/kg\n",
+ "se = 1.0140 \t\t\t#in kJ/kg\n",
+ "m = 0.08 \t\t\t\t#flow rate of refrigerant in kg/s\n",
+ "P = 3 \t\t\t\t\t#electrical power input in kW\n",
+ "To = 30 \t\t\t\t#in °C\n",
+ "\n",
+ "#Calculations:\n",
+ "Qcv = m*(he-hi)-P \t\t#in kW\n",
+ "Sgen = m*(se-si)-Qcv/(To+273.2)\t#Rate of entropy generation \n",
+ "\n",
+ "#Results:\n",
+ "print \"Rate of entropy generation for this process: \",round(Sgen,5),'KW/K'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency of the turbine: 80.9 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 9.10\n",
+ "''' A steam turbine receives steam at a pressure of 1 MPa and a temperature of 300\n",
+ "◦C. The steam leaves the turbine at a pressure of 15 kPa. The work output of the turbine is measured\n",
+ "and is found to be 600 kJ/kg of steam flowing through the turbine. Determine the efficiency\n",
+ "of the turbine.\n",
+ "Control volume: Turbine.\n",
+ "Inlet state: P i , T i known; state fixed.\n",
+ "Exit state: P e known.\n",
+ "Process: Steady state.\n",
+ "Model: Steam tables.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "hi = 3051.2 \t\t#initial specific heat of enthalpy in kJ/kg\n",
+ "si = 7.1228 \t\t#initial specific entropy in kJ/kg-K\n",
+ "sf = 0.7548 \t\t#in kJ/kg-K\n",
+ "sfg = 7.2536 \t\t#in kJ/kg-K\n",
+ "hf = 225.9 \t\t#in kJ/kg\n",
+ "hfg = 2373.1 \t\t#in kJ/kg\n",
+ "wa = 600 \t\t#actual work output of turbine in kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "ses = si \t\t#final specific entropy is same as the initial\n",
+ "xes = (si-sf)/sfg \t\t#quality of steam when it leaves the turbine\n",
+ "hes = hf+xes*hfg \t\t#final specific heat of enthalpy in kJ/kg\n",
+ "ws = hi-hes \t\t#work output of turbine calculated ideally in kJ/kg\n",
+ "nturbine = wa/ws \t\t#efiiciency of turbine \n",
+ "\n",
+ "#Results:\n",
+ "print \"Efficiency of the turbine: \",round(nturbine*100,1),'%'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Turbine inlet pressure: 2995.0 Kpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "from math import e\n",
+ "#Example: 9.11\n",
+ "''' Air enters a gas turbine at 1600 K and exits at 100 kPa, 830 K.The turbine efficiency is\n",
+ "estimated to be 85%. What is the turbine inlet pressure?\n",
+ "Control volume: Turbine.\n",
+ "Inlet state: T i known.\n",
+ "Exit state: P e , T e known; state fixed.\n",
+ "Process: Steady state.\n",
+ "Model: Air tables, Table A.7.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "hi = 1757.3 \t\t#initial specific heat of enthalpy of air in kJ/kg\n",
+ "si = 8.6905 \t\t#initial specifc entropy of airin kJ/kg-K\n",
+ "he = 855.3 \t\t\t#final specific heat of enthalpy of air in kJ/kg\n",
+ "n = 0.85 \t\t\t#efficiency of turbine \n",
+ "Tes = 683.7 \t\t#final temperature in kelvins from air tables\n",
+ "ses = 7.7148 \t\t#in kJ/kg-K\n",
+ "R = 0.287 \t\t\t#gas constant in kJ/kg-K\n",
+ "\n",
+ "#Calculations:\n",
+ "w = hi-he \t\t\t#actual work done by turbine in kJ/kg\n",
+ "ws = w/n \t\t\t#ideal work done by turbine in kJ/kg\n",
+ "hes = hi-ws \t\t#from first law of isentropic process\n",
+ "Pi = 100/e**((si-ses)/-R) #turbine inlet pressure in kPa\n",
+ "\n",
+ "#Results:\n",
+ "print \"Turbine inlet pressure: \",round(Pi),'Kpa'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Required work input: -53.0 KJ/Kg\n",
+ "Exit temperature: 352.6 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 9.12\n",
+ "'''Air enters an automotive supercharger at 100 kPa, 300 K and is compressed to 150 kPa.\n",
+ "The efficiency is 70%. What is the required work input per kilogram of air? What is the\n",
+ "exit temperature?\n",
+ "Control volume: Supercharger (compressor).\n",
+ "Inlet state: P i , T i known; state fixed.\n",
+ "Exit state: P e known.\n",
+ "Process: Steady state.\n",
+ "Model: Ideal gas, 300 K specific heat, Table A.5.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Pe = 150 \t\t#final pressure of air in kPa\n",
+ "Pi = 100 \t\t#initial presure of air in kPa\n",
+ "k = 1.4\n",
+ "Ti = 300 \t\t#initial temperature of air in kelvis\n",
+ "n = 0.7 \t\t#efficiency of automotive supercharger \n",
+ "\n",
+ "#Calculations:\n",
+ "Tes = Ti*(Pe/Pi)**((k-1)/k) \t\t#from second law\n",
+ "ws = 1.004*(Ti-Tes) \t\t#from first law of isentropic process\n",
+ "w = ws/n \t\t#real work input in kJ/kg\n",
+ "Te = Ti-w/1.004 \t\t#temperature at supercharger exit in K\n",
+ "\n",
+ "#Results:\n",
+ "print \"Required work input: \",round(w),'KJ/Kg'\n",
+ "print \"Exit temperature: \",round(Te,1),'K'"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Introduction_to_flight_by_J_D_Anderson/Appendix_A.ipynb b/Introduction_to_flight_by_J_D_Anderson/Appendix_A.ipynb
new file mode 100644
index 00000000..352d2566
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/Appendix_A.ipynb
@@ -0,0 +1,517 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Appendix A"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "('Temperature T2 = %.1f K', 556.4270854641527)\n",
+ "(' Compressor work = %.1f kJ/kg ', 269.2999938060093)\n",
+ "(' Temperature T3 = %.1f K', 1373.2)\n",
+ "(' Temperature T4 = %.1f K', 711.24546295203)\n",
+ "(' Turbine work = %.1f kJ/kg', 664.6023551961619)\n",
+ "(' Net work = %.1f kJ/kg', 395.30236139015256)\n",
+ "(' Thermal Efficiency of cycle = %.1f percent', 48.205253207687875)\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 12.1\n",
+ "''' '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "\n",
+ "\n",
+ "\t\t#1-Inlet for compressor\n",
+ "\t\t#2-Exit for compressor\n",
+ "\t\t#T-Temperature at a state\n",
+ "\t\t#P-Pressure at a state\n",
+ "T1 = 288.2\t\t#K\n",
+ "P2 = 1000\t\t#kPa\n",
+ "P1 = 100\t\t#kPa\n",
+ "k = 1.4\n",
+ "T2 = T1*(P2/P1)**(1-1/k)\t\t#K\n",
+ "Cp = 1.004\t\t#Specific heat at constant pressure in kJ/kg\n",
+ "wc = Cp*(T2-T1)\t\t#compressor work in kJ/kg\n",
+ "print ('Temperature T2 = %.1f K',T2)\n",
+ "print (' Compressor work = %.1f kJ/kg ',wc)\n",
+ "\t\t#3-Turbine Inlet\n",
+ "\t\t#4-Turbine Exit\n",
+ "P4 = P1\n",
+ "P3 = P2\n",
+ "T3 = 1373.2\t\t#K\n",
+ "T4 = T3*(P4/P3)**(1-1/k)\t\t#K\n",
+ "wt = Cp*(T3-T4)\n",
+ "wnet = wt-wc\n",
+ "print (' Temperature T3 = %.1f K',T3)\n",
+ "print (' Temperature T4 = %.1f K',T4)\n",
+ "print (' Turbine work = %.1f kJ/kg',wt)\n",
+ "print (' Net work = %.1f kJ/kg',wt-wc)\n",
+ "\t\t#2-Also high temperature heat exchanger Inlet\n",
+ "\t\t#3-(-do-) Exit\n",
+ "qh = Cp*(T3-T2)\t\t#Heat of source in kJ/kg\n",
+ "\t\t#4-high temp heat exchanger inlet\n",
+ "\t\t#1-(-do-) Exit\n",
+ "ql = Cp*(T4-T1)\t\t#Heat of sink in kJ/kg\n",
+ "nth = wnet/qh\n",
+ "print (' Thermal Efficiency of cycle = %.1f percent',nth*100)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "('Temperature T2 = %.1f K', 623.4838568301909)\n",
+ "(' Compressor work = %.1f kJ/kg ', 336.6249922575117)\n",
+ "(' Temperature T3 = %.1f K', 1373.2)\n",
+ "(' Temperature T4 = %.1f K', 810.5386435092256)\n",
+ "(' Turbine work = %.1f kJ/kg', 564.9120019167375)\n",
+ "(' Net work = %.1f kJ/kg', 228.28700965922582)\n",
+ "(' Thermal Efficiency of cycle = %.1f percent', 30.32847854912508)\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 12.2\n",
+ "''' '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "\t\t#Standard brayton cycle\n",
+ "\n",
+ "\n",
+ "\t\t#Calculation mistake in book\n",
+ "\t\t#1-Inlet for compressor\n",
+ "\t\t#2-Exit for compressor\n",
+ "\t\t#T-Temperature at a state\n",
+ "\t\t#P-Pressure at a state\n",
+ "T1 = 288.2\t\t#K\n",
+ "P2 = 1000\t\t#kPa\n",
+ "P1 = 100\t\t#kPa\n",
+ "k = 1.4\n",
+ "T2s = T1*(P2/P1)**(1-1/k)\t\t#K\n",
+ "nc = .80\t\t#Compressor Efficiency\n",
+ "T2 = T1+(T2s-T1)/0.80\n",
+ "Cp = 1.004\t\t#Specific heat at constant pressure in kJ/kg\n",
+ "wc = Cp*(T2-T1)\t\t#compressor work in kJ/kg\n",
+ "print ('Temperature T2 = %.1f K',T2)\n",
+ "print (' Compressor work = %.1f kJ/kg ',wc)\n",
+ "\t\t#3-Turbine Inlet\n",
+ "\t\t#4-Turbine Exit\n",
+ "P4 = P1\n",
+ "P3 = P2\n",
+ "T3 = 1373.2\t\t#K\n",
+ "T4s = T3*(P4/P3)**(1-1/k)\t\t#K\n",
+ "nt = 0.85\t\t#turbine Efficiency\n",
+ "T4 = T3-(T3-T4s)*0.85\n",
+ "wt = Cp*(T3-T4)\n",
+ "wnet = wt-wc\n",
+ "print (' Temperature T3 = %.1f K',T3)\n",
+ "print (' Temperature T4 = %.1f K',T4)\n",
+ "print (' Turbine work = %.1f kJ/kg',wt)\n",
+ "print (' Net work = %.1f kJ/kg',wt-wc)\n",
+ "\t\t#2-Also high temperature heat exchanger Inlet\n",
+ "\t\t#3-(-do-) Exit\n",
+ "qh = Cp*(T3-T2)\t\t#Heat of source in kJ/kg\n",
+ "\t\t#4-high temp heat exchanger inlet\n",
+ "\t\t#1-(-do-) Exit\n",
+ "ql = Cp*(T4-T1)\t\t#Heat of sink in kJ/kg\n",
+ "nth = wnet/qh\n",
+ "print (' Thermal Efficiency of cycle = %.1f percent',nth*100)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "('Thermal efficiency = %.1f percent', 59.42413919202417)\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 12.3\n",
+ "''' '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "\n",
+ "\n",
+ "wnet = 395.2\t\t#kJ/kg from example no 1\n",
+ "\t\t#Tx = T4\n",
+ "Tx = 710.8\t\t#K from example no 1\n",
+ "T3 = 1373.2\t\t#K from example no 1\n",
+ "Cp = 1.004\t\t#specific heat in kJ/kg \n",
+ "qh = Cp*(T3-Tx)\n",
+ "nth = wnet/qh\n",
+ "print ('Thermal efficiency = %.1f percent',nth*100) "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "('Isothermal work in compressor = %.1f kJ/kg ', -190.4546418308537)\n",
+ "(' Isothermal work in turbine = %.1f kJ/kg', 907.4681268637344)\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 12.4\n",
+ "''' '''\n",
+ "from math import log\n",
+ "#Variable Declaration: \n",
+ "\n",
+ "\n",
+ "R = 0.287\t\t#gas constant \n",
+ "T1 = 288.2\t\t#compressor temperature K\n",
+ "T2 = 1373.2\t\t#K turbine temperature K\n",
+ "\t\t#Pe/Pi = c = 10, Pi/Pe = 1/c from example 12.1\n",
+ "c = 10\n",
+ "wc = -R*T1*log(c)\n",
+ "print ('Isothermal work in compressor = %.1f kJ/kg ',wc)\n",
+ "wt = -R*T2*log(1/c)\n",
+ "print (' Isothermal work in turbine = %.1f kJ/kg',wt) "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "('Velocity of air leaving the nozel = %.0f m/s', 889.4375751001304)\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 12.5\n",
+ "''' '''\n",
+ "from math import sqrt\n",
+ "#Variable Declaration: \n",
+ "\n",
+ "\n",
+ "\t\t#1-compressor inlet\n",
+ "\t\t#2-Compressor exit\n",
+ "\t\t#P-Pressure at given point\n",
+ "\t\t#T-Temperature at given point\n",
+ "P1 = 100\t\t#kPa\n",
+ "P2 = 1000\t\t#kPa\n",
+ "T1 = 288.2\t\t#K\n",
+ "T2 = 556.8\t\t#K\n",
+ "wc = 269.5\t\t#from ex 12.1 work done in compressor in kJ/kg\n",
+ "\t\t#2-Burner inlet\n",
+ "\t\t#3-Burner exit\n",
+ "P3 = 1000\t\t#kPa\n",
+ "T3 = 1373.2\t\t#K\n",
+ "\t\t#wc = wt\n",
+ "Cp = 1.004\t\t#specific enthalpy of heat at constant pressure in kJ/kg\n",
+ "k = 1.4\n",
+ "T4 = T3-wc/Cp\n",
+ "P4 = P3*(T4/T3)**(1-1/k)\n",
+ "\t\t#from s4 = s5 and h4 = h5+v2/2 we get\n",
+ "T5 = 710.8\t\t#K, from second law\n",
+ "v = sqrt(2*Cp*1000*(T4-T5))\t\t#m/s\n",
+ "print ('Velocity of air leaving the nozel = %.0f m/s',v)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "('Coefficient of performance = %.3f ', 1.712857850240205)\n",
+ "(' Rate at which the air enter the compressor = %.3f kg/s ', 0.013985866348928795)\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 12.6\n",
+ "''' '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "\n",
+ "\n",
+ "\t\t#1-compressor inlet\n",
+ "\t\t#2-compressor exit\n",
+ "P1 = 100\t\t#kPa\n",
+ "P2 = 500\t\t#kPa\n",
+ "k = 1.4\n",
+ "rp = P2/P1\n",
+ "cop = (rp**(1-1/k)-1)**-1\n",
+ "print ('Coefficient of performance = %.3f ',cop)\n",
+ "\t\t#3-Expander inlet\n",
+ "\t\t#4-Expander exit\n",
+ "P3 = P2\n",
+ "P4 = P1\n",
+ "T3 = 288.23\t\t#K, given and fixed\n",
+ "T4 = T3/(P3/P4)**(1-1/k)\n",
+ "T1 = 253.2\t\t#K, given\n",
+ "Cp = 1.004\t\t#Specific heat at cons pressure in kJ/kg\n",
+ "ql = Cp*(T1-T4)\t\t#heat released in kJ/kg\n",
+ "P = 1\t\t#power required in kW \n",
+ "ms = P/ql\t\t#kg/s\n",
+ "print (' Rate at which the air enter the compressor = %.3f kg/s ',ms) "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Temperature at compressor exit, T2 = %.1f K 723.925669561\n",
+ " Pressure at compressor exit, P2 = %.3f MPa 2.51188643151\n",
+ " Initial Temperature during heat additon process, T3 = %.0f K 3234.38592061\n",
+ " Initial pressure during heat addition process, P3 = %.3f MPa 11.222713118\n",
+ " Final temperature during heat addition process, T4 = %.1f K 1287.63222733\n",
+ " Final pressure during heat addition process, P4 = %.4f MPa 0.446784256534\n",
+ " Thermal efficiency = %.1f percent 96.0189282945\n",
+ " Mean effective pressure = %.0f kPa 1455.36957602\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 12.7\n",
+ "''' '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "\n",
+ "\n",
+ "\t\t#1-compressor inlet\n",
+ "\t\t#2-compressor exit\n",
+ "P1 = 100\t\t#kPa\n",
+ "T1 = 288.2\t\t#K\n",
+ "R = 0.287\t\t#gas constant\n",
+ "v1 = R*T1/P1\t\t#specific volume at inlet in m**3/kg\n",
+ "rv = 10\t\t#compression ratio given\n",
+ "k = 1.4\t\t#constant\n",
+ "T2 = T1*rv**(k-1)\t\t#K\n",
+ "print 'Temperature at compressor exit, T2 = %.1f K ',T2\n",
+ "P2 = P1*rv**k\t\t#kPa\n",
+ "print ' Pressure at compressor exit, P2 = %.3f MPa ',P2/1000\n",
+ "v2 = v1/rv\t\t#specific heat at exit in m**3/kg\n",
+ "\t\t#23-heat addition process\n",
+ "\t\t#q23 = Cv*(T3-T2) = 1800 kJ/kg given\n",
+ "q23 = 1800\t\t#kJ/kg heat addition, given\n",
+ "Cv = 0.717\t\t#specific heat at constant volume in kJ/kg\n",
+ "T3 = T2+q23/Cv\t\t#K\n",
+ "print ' Initial Temperature during heat additon process, T3 = %.0f K ',T3\n",
+ "P3 = P2*(T3/T2)\t\t#kPa\n",
+ "print ' Initial pressure during heat addition process, P3 = %.3f MPa ',P3/1000\n",
+ "r = 10\t\t#k = V4/V3 = P3/P4\n",
+ "T4 = T3*(1/r)**(k-1)\n",
+ "print ' Final temperature during heat addition process, T4 = %.1f K ',T4\n",
+ "P4 = P3/r**k\t\t#kPa\n",
+ "print ' Final pressure during heat addition process, P4 = %.4f MPa ',P4/1000\n",
+ "nth = 1-1/r**k\t\t#thermal efficiency\n",
+ "print ' Thermal efficiency = %.1f percent ',nth*100\n",
+ "q41 = Cv*(T1-T4)\t\t#/heat for process 4-1 in kJ/kg\n",
+ "wnet = q23+q41\n",
+ "mep = wnet/(v1-v2)\t\t#effective mean pressure n kPa\n",
+ "print ' Mean effective pressure = %.0f kPa ',mep"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Temperature at compressor exit, T2 = %.1f K 955.225647797\n",
+ " Pressure at compressor exit, P2 = %.3f MPa 6.62890803468\n",
+ " Initial Temperature during heat addition process, T3 = %.0f K 2748.05433306\n",
+ " Final temperature during heat addition process, T4 = %.0f K 1265.26371322\n",
+ " Thermal efficiency = %.1f percent 61.0802954233\n",
+ " Mean effective pressure = %.0f kPa 1399.18182622\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 12.8\n",
+ "''' '''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "\n",
+ "\n",
+ "\t\t#1-compressor inlet\n",
+ "\t\t#2-compressor exit\n",
+ "P1 = 100\t\t#kPa\n",
+ "T1 = 288.2\t\t#K\n",
+ "R = 0.287\t\t#gas constant\n",
+ "v1 = R*T1/P1\t\t#specific volume at inlet in m**3/kg\n",
+ "rv = 20\t\t#compression ratio given\n",
+ "k = 1.4\t\t#constant\n",
+ "T2 = T1*rv**(k-1)\t\t#K\n",
+ "print 'Temperature at compressor exit, T2 = %.1f K ',T2\n",
+ "P2 = P1*rv**k\t\t#kPa\n",
+ "print ' Pressure at compressor exit, P2 = %.3f MPa ',P2/1000\n",
+ "v2 = v1/rv\t\t#specific heat at exit in m**3/kg\n",
+ "\t\t#23-heat addition process\n",
+ "\t\t#q23 = Cv*(T3-T2) = 1800 kJ/kg given\n",
+ "q23 = 1800\t\t#kJ/kg heat addition, given\n",
+ "Cv = .717\n",
+ "Cp = 1.004\t\t#specific heat at constant pressure in kJ/kg\n",
+ "T3 = T2+q23/Cp\t\t#K\n",
+ "print ' Initial Temperature during heat addition process, T3 = %.0f K ',T3\n",
+ "r = T3/T2\t\t#T3/T2 = V3/V2 = r\n",
+ "v3 = r*v2\n",
+ "T4 = T3/(v1/v3)**(k-1)\n",
+ "print ' Final temperature during heat addition process, T4 = %.0f K ',T4\n",
+ "q41 = Cv*(T1-T4)\t\t#/heat for process 4-1 in kJ/kg\n",
+ "wnet = q23+q41\n",
+ "mep = wnet/(v1-v2)\t\t#effective mean pressure in kPa\n",
+ "qh = 1800\t\t#heat transfer in kJ/kg\n",
+ "nth = wnet/qh\t\t#thermal efficiency\n",
+ "\n",
+ "print ' Thermal efficiency = %.1f percent ',nth*100\n",
+ "print ' Mean effective pressure = %.0f kPa ',mep"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Introduction_to_flight_by_J_D_Anderson/Appendix_B.ipynb b/Introduction_to_flight_by_J_D_Anderson/Appendix_B.ipynb
new file mode 100644
index 00000000..283ba0a6
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/Appendix_B.ipynb
@@ -0,0 +1,290 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Appendix B"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mass of vapour: 2.77 Kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 13.3\n",
+ "'''Consider 100 m 3 of an air–water vapor mixture at 0.1 MPa, 35◦C, and 70% relative\n",
+ "humidity. Calculate the humidity ratio, dew point, mass of air, and mass of vapor.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "r = 0.70\t\t\t#relative humidity\n",
+ "Pg = 5.628\t\t\t#saturation pressure in kPa\n",
+ "P = 100\t\t\t\t#net pressure kPa \n",
+ "V = 100\t\t\t\t#volume in m**3\n",
+ "Ra = 0.287\t\t\t#gas constant for water vapour\n",
+ "T = 308.2\t\t\t#Temperature in K\n",
+ "\n",
+ "#Calculations:\n",
+ "Pv = r*Pg\t\t\t#vapour pressure in kPa\n",
+ "Pa = P-Pv\t\t\t#Partial pressure of air\n",
+ "w = 0.622*Pv/Pa\t\t#humidity ratio formula\n",
+ "ma = Pa*V/(Ra*T)\t#mass in kg\n",
+ "mv = w*ma\t\t\t#mass of vapour\n",
+ "\n",
+ "#Results:\n",
+ "print 'Mass of vapour: ', round(mv,2),'Kg'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mass of vapour condense 2.175 Kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 13.4\n",
+ "'''Calculate the amount of water vapor condensed if the mixture of Example 13.3 is cooled\n",
+ "to 5◦C in a constant-pressure process.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "w1 = 0.0255\t\t#w1 = w, humidity ratio at initial temperature\n",
+ "ma = 108.6\t\t#mass of air in kg\n",
+ "P = 100\t\t\t#kPa net pressure\n",
+ "Pg2 = 0.8721\n",
+ "\n",
+ "#Calculations:\n",
+ "Pv2 = Pg2\n",
+ "w2 = 0.622*Pv2/(P-Pg2)\n",
+ "mc = ma*(w1-w2)\n",
+ "\n",
+ "#Results:\n",
+ "print 'Mass of vapour condense',round(mc,3) ,'Kg'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat transferred per unit mass: -41.65 kJ/kg of dry air\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 13.5\n",
+ "''' An air-conditioning unit is shown in Fig. 13.5, with pressure, temperature, and relative\n",
+ "humidity data. Calculate the heat transfer per kilogram of dry air, assuming that changes\n",
+ "in kinetic energy are negligible.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "r1 = 0.80\t\t\t\t#realtive humidity at state 1\n",
+ "Pg1 = 4.246\t\t\t\t#saturation pressure of vapour in kPa\n",
+ "P1 = 105\t\t\t\t#net pressure at state 1 in kPa\n",
+ "P2 = 100\t\t\t\t#net pressure at state 2 in kPa\n",
+ "r2 = 0.95\t\t\t\t#relative humidity at state 2\n",
+ "Pg2 = 1.7051\t\t\t#saturation pressure of vapour in kPa\n",
+ "T1 = 30\t\t\t\t\t#C\n",
+ "T2 = 15\t\t\t\t\t#C\n",
+ "Cp = 1.004\t\t\t\t#specific heat of water vapour in kJ/kg\n",
+ "hv2 = 2528.9\t\t\t#enthalpy of vapourisation of vapour in kJ/kg\n",
+ "hv1 = 2556.3\t\t\t#enthalpy of vapourisation of vapour in kJ/kg\n",
+ "hl2 = 62.99\t\t\t\n",
+ "\n",
+ "#Calculations:\n",
+ "Pv1 = r1*Pg1\t\t\t#partial pressure of vapour in kPa\n",
+ "w1 = 0.622*Pv1/(P1-Pv1)\t#humidity ratio at state 1\n",
+ "Pv2 = r2*Pg2\t\t\t#partial pressure of vapour in kPa\n",
+ "w2 = 0.622*Pv2/(P2-Pv2)\t#humidity ratio at state 2\n",
+ "q = Cp*(T2-T1)+w2*hv2-w1*hv1+hl2*(w1-w2)\t\t#kJ/kg\n",
+ "\n",
+ "#Results:\n",
+ "print 'Heat transferred per unit mass: ',round(q,2),' kJ/kg of dry air'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat transferred -339.1 kJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 13.6\n",
+ "''' A tank has a volume of 0.5 m 3 and contains nitrogen and water vapor. The temperature\n",
+ "of the mixture is 50◦C, and the total pressure is 2 MPa. The partial pressure of the water\n",
+ "vapor is 5 kPa. Calculate the heat transfer when the contents of the tank are cooled to\n",
+ "10◦C.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Pn2 = 1995\t\t\t\t#Pressure of nitrogen in kPa\n",
+ "V = 0.5\t\t\t\t\t#Volume in m**3\n",
+ "Rn2 = 0.2968\t\t\t#Gas constant for nitrogen in kJ/kg.K\n",
+ "Rv = 0.4615\t\t\t\t#gas constant for vapour\n",
+ "T1 = 323.2\t\t\t\t#Temperature in K\n",
+ "T2 = 283.2\t\t\t\t#Temperature in K\n",
+ "Pv1 = 5\t\t\t\t\t#Pressure of water vapour in kPa at state 1\n",
+ "Pv2 = 1.2276\t\t\t#Pressure of water vapour in kPa at state 2\n",
+ "uv1 = 2443.1\t\t\t#specific internal energy of vapour in kJ/kg at state 1\n",
+ "uv2 = 2389.2\t\t\t#specific internal energy of vapour in kJ/kg at state 2\n",
+ "ul2 = 42.0\t\t\t\t#specific internal energy of liquid water in kJ/kg\n",
+ "Cv = 0.745\t\t\t\t#specific heat at constant volume in kJ/kg.K\n",
+ "\n",
+ "#Calculations:\n",
+ "mn2 = Pn2*V/(Rn2*T1)\t#mass of nitrogen\n",
+ "mv1 = Pv1*V/(Rv*T1)\t\t#mass of vapour in kg\n",
+ "mv2 = Pv2*V/(Rv*T2)\t\t#mass of vapour in kg\n",
+ "ml2 = mv1-mv2\t\t\t#mass of liquid condensed n kg\n",
+ "Q = mn2*Cv*(T2-T1)+mv2*uv2+ml2*ul2-mv1*uv1\n",
+ "\n",
+ "#Results:\n",
+ "print 'Heat transferred',round(Q,1),'kJ'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Relative humidity: 0.0107\n",
+ "Humidity ratio: 0.399\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 13.7\n",
+ "'''The pressure of the mixture entering and leaving the adiabatic saturator is 0.1 MPa, the\n",
+ "entering temperature is 30◦C, and the temperature leaving is 20◦C, which is the adiabatic\n",
+ "saturation temperature. Calculate the humidity ratio and relative humidity of the air–water\n",
+ "vapor mixture entering.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "P = 100\t\t\t\t#net pressure n kPa \n",
+ "Pg2 = 2.339\t\t\t#saturation pressure of vapour in kPa\n",
+ "Cpa = 1.004\t\t\t#specific heat n kJ/kg/K\n",
+ "T2 = 20\t\t\t\t#final temp in C\n",
+ "T1 = 30\t\t\t\t#initial temp in C\n",
+ "Hfg2 = 2454.1\t\t#specific heat difference at state 2 in kJ/kg\n",
+ "hv1 = 2556.3\t\t#enthalpy of water vapour at state 1 in kJ/kg\n",
+ "hl2 = 83.96\t\t\t#enthalpy of liquid water in kJ/kg\n",
+ "Pg1 = 4.246\t\t\t#saturation pressure at state 1 in kPa\n",
+ "\n",
+ "#Calculations:\n",
+ "Pv2 = Pg2\t\t\t#partial pressure of vapour\n",
+ "w2 = 0.622*Pv2/(P-Pg2)\n",
+ "w1 = (Cpa*(T2-T1)+w2*Hfg2)/(hv1-hl2)\n",
+ "Pv1 = 100*w1/(0.622+w1)\n",
+ "r = Pv1/Pg1\t\t\t#humidity ratio\n",
+ "\n",
+ "#Results:\n",
+ "print 'Relative humidity: ',round(w1,4)\n",
+ "print 'Humidity ratio: ',round(r,3)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Introduction_to_flight_by_J_D_Anderson/Appendix_C.ipynb b/Introduction_to_flight_by_J_D_Anderson/Appendix_C.ipynb
new file mode 100644
index 00000000..d2f0522f
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/Appendix_C.ipynb
@@ -0,0 +1,352 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Appendix C"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Sublimation Pressure: 0.00109 KPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "from math import exp\n",
+ "#Example: 14.1\n",
+ "'''Determine the sublimation pressure of water vapor at −60◦C using data available in the\n",
+ "steam tables.\n",
+ "Control mass: Water.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "#from table in appendix B.1.5\n",
+ "T1 = 213.2\t\t\t#K, Temperature at state 1\n",
+ "P2 = 0.0129\t\t\t#kPa, pressure at state 2\n",
+ "T2 = 233.2\t\t\t#K, Temperature at state 2\n",
+ "hig = 2838.9\t\t#kJ/kg, enthalpy of sublimation \n",
+ "R = .46152\t\t\t#Gas constant \n",
+ "\n",
+ "#Calculations:\n",
+ "P1 = P2*exp(-hig/R*(1/T1-1/T2)) #using relation log(P2/P1) = (hig/R)*(1/T1-1/T2) \n",
+ "\n",
+ "#Results:\n",
+ "print 'Sublimation Pressure: ',round(P1,5),'KPa'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in internal energy: -159.4 J/Kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 14.4\n",
+ "'''The pressure on a block of copper having a mass of 1 kg is increased in a reversible process\n",
+ "from 0.1 to 100 MPa while the temperature is held constant at 15◦C. Determine the work\n",
+ "done on the copper during this process, the change in entropy per kilogram of copper, the\n",
+ "heat transfer, and the change of internal energy per kilogram.\n",
+ "Over the range of pressure and temperature in this problem, the following data can\n",
+ "be used:\n",
+ "Volume expansivity = αP = 5.0 × 10−5 K−1\n",
+ "Isothermal compressibility = βT = 8.6 × 10−12 m2/N\n",
+ "Specific volume = 0.000 114 m3/kg'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "#known data\n",
+ "ap = 5*10**-5\t\t\t\t#K**-1 Volume expansivity\n",
+ "bt = 8.6*10**-12\t\t\t#m**2/N, Isothermal compressibility\n",
+ "v = 0.000114\t\t\t\t#m**3/kg, specific volume\n",
+ "P2 = 100*10**6\t\t\t\t#pressure at state 2 in kPa\n",
+ "P1 = 100\t\t\t\t\t#pressure at state 1 in kPa\n",
+ "T = 288.2\t\t\t\t\t#Temperature in K\n",
+ "\n",
+ "#Calculations:\n",
+ "w = -v*bt*(P2**2-P1**2)/2\t#work done in J/kg\n",
+ "q = -T*v*ap*(P2-P1)\t\t\t#heat in J/kg\n",
+ "du = q-w\t\t\t\t\t#change in internal energy in J/kg\n",
+ "\n",
+ "#Results:\n",
+ "print 'Change in internal energy: ',round(du,1),'J/Kg'\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Enthalpy change: 18.73 KJ/Kg\n",
+ "Temperature : 146.0 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 14.5\n",
+ "'''Nitrogen is throttled from 20 MPa, −70◦C, to 2 MPa in an adiabatic, steady-state, steadyflow\n",
+ "process. Determine the final temperature of the nitrogen.\n",
+ "Control volume:\n",
+ "Inlet state:\n",
+ "Exit state:\n",
+ "Process:\n",
+ "Diagram:\n",
+ "Model:\n",
+ "Throttling valve.\n",
+ "P1, T1 known; state fixed.\n",
+ "P2 known.\n",
+ "Steady-state, throttling process.\n",
+ "Figure 14.8.\n",
+ "Generalized charts, Fig. D.2.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "#from table A.2\n",
+ "P1 = 20\t\t#pressure at state 1 in MPa\n",
+ "P2 = 2\t\t#pressure at state 2 in MPa\n",
+ "T1 = 203.2\t\t#Temperature at state 1 in K\n",
+ "Pr1 = P1/3.39\t\t#Reduced pressure at state 1\n",
+ "Pr2 = P2/3.39\t\t#Reduced pressure at state 2\n",
+ "Tr1 = T1/126.2\t\t#Reduced temperature\n",
+ "#from compressibility chart h1*-h1 = 2.1*R*Tc\n",
+ "#from zero pressure specific heat data h1*-h2* = Cp*(T1a-T2a)\n",
+ "#h2*-h2 = 0.5*R*Tc\n",
+ "#this gives dh = h1-h2 = -2.1*R*Tc+Cp*(T1a-T2a)+0.5*R*Tc\n",
+ "R = 0.2968\t\t#gas constant for given substance\n",
+ "Tc = 126.2\t\t#K, Constant temperature\n",
+ "Cp = 1.0416\t\t#heat enthalpy at constant pressure in kJ/kg\n",
+ "T2 = 146\t\t#temperature at state 2\n",
+ "\n",
+ "#Calculations:\n",
+ "dh = 0.5*R*Tc#\n",
+ "\n",
+ "#Results:\n",
+ "print 'Enthalpy change: ',round(dh,2),'KJ/Kg'\n",
+ "print 'Temperature :',round(T2,2),'K' "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Enthalpy change: 61.98 kJ/kg\n",
+ "Entropy Change: 1.0782 kJ/kg.K\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "from math import log\n",
+ "\n",
+ "#Example: 14.6\n",
+ "'''Nitrogen at 8 MPa, 150 K, is throttled to 0.5 MPa. After the gas passes through a short\n",
+ "length of pipe, its temperature is measured and found to be 125 K. Determine the heat\n",
+ "transfer and the change of entropy using the generalized charts. Compare these results\n",
+ "with those obtained by using the nitrogen tables.\n",
+ "Control volume:\n",
+ "Inlet state:\n",
+ "Exit state:\n",
+ "Process:\n",
+ "Diagram:\n",
+ "Model:\n",
+ "Throttle and pipe.\n",
+ "P1, T1 known; state fixed.\n",
+ "P2, T2 known; state fixed.\n",
+ "Steady state.\n",
+ "Figure 14.10.\n",
+ "Generalized charts, results to be compared with those\n",
+ "obtained with nitrogen tables.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "#from table A.2\n",
+ "P1 = 8\t\t\t\t\t#pressure at state 1 in MPa\n",
+ "P2 = 0.5\t\t\t\t#pressure at state 2 in MPa\n",
+ "T1 = 150\t\t\t\t#Temperature at state 1 in K\n",
+ "Pr1 = P1/3.39\t\t\t#Reduced pressure at state 1\n",
+ "Pr2 = P2/3.39\t\t\t#Reduced pressure at state 2\n",
+ "Tr1 = T1/126.2\t\t\t#Reduced temperature\n",
+ "T2 = 125\t\t\t\t#Temperature at state 2\n",
+ "R = 0.2968\t\t\t\t#gas constant for given substance\n",
+ "Tc = 126.2\t\t\t\t#K, Constant temperature\n",
+ "Cp = 1.0416\t\t\t\t#Heat enthalpy at constant pressure in kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "dh = (2.35)*R*Tc+Cp*(T2-T1)\t\t#\n",
+ "ds = 1.6*R-0.1*R+Cp*log(T2/T1)-R*log(P2/P1)\n",
+ "\n",
+ "#Results:\n",
+ "print 'Enthalpy change: ',round(dh,2),'kJ/kg'\n",
+ "print 'Entropy Change: ',round(ds,4),'kJ/kg.K'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Percentage deviation in specific volume using Kays rule: 4.8 %\n",
+ "Percentage deviation in specific volume using vander waals eqn: 6.4 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "#Example: 14.7\n",
+ "'''A mixture of 80% CO2 and 20% CH4 (mass basis) is maintained at 310.94 K, 86.19 bar,\n",
+ "at which condition the specific volume has been measured as 0.006757 m3/kg. Calculate\n",
+ "the percent deviation if the specific volume had been calculated by (a) Kay’s rule and (b)\n",
+ "van der Waals’ equation of state.\n",
+ "Control mass:\n",
+ "State:\n",
+ "Model:\n",
+ "Gas mixture.\n",
+ "P, v, T known.\n",
+ "(a) Kay’s rule. (b) van der Waals’ equation.'''\n",
+ "#Keys:\n",
+ "#a-denotes C02\n",
+ "#b-denotes CH4\n",
+ "#c-denotes critical conditions\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T = 310.94\t\t\t\t#Temperature of mixture K\n",
+ "P = 86.19\t\t\t\t#Pressure of mixture in MPa\n",
+ "Tca = 304.1\t\t\t\t#K\n",
+ "Tcb = 190.4\t\t\t\t#K\n",
+ "Pca = 7.38\t\t\t\t#MPa\n",
+ "Pcb = 4.60\t\t\t\t#MPa\n",
+ "Ra = 0.1889\t\t\t\t#gas constant for a in kJ/kg.K\n",
+ "Rb = 0.5183\t\t\t\t#gas constant for b in kJ/kg.K\n",
+ "xa = 0.8\t\t\t\t#fraction of CO2\n",
+ "xb = 0.2\t\t\t\t#fraction of CH4\n",
+ "Ma = 44.01\t\t\t\t#molecular mass of a\n",
+ "Mb = 16.043\t\t\t\t#molecular mass of b\n",
+ "Zm = 0.7\t\t\t\t#Compressiblity from generalised compressibility chart\n",
+ "ve = 0.0006757\t\t\t#experimental specific volume in m**3/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "Rm = xa*Ra+xb*Rb\t\t#mean gas constant in kJ/kg.K\n",
+ "ya = xa/Ma/(xa/Ma+xb/Mb)#mole fraction of a\n",
+ "yb = xb/Mb/(xa/Ma+xb/Mb)#mole fraction of b\n",
+ "Tcm = ya*Tca+yb*Tcb\t\t#mean critical temp in K\n",
+ "Pcm = ya*Pca+yb*Tcb\t\t#mean critical pressure n MPa\n",
+ "Trm = T/Tcm\n",
+ "Prm = P/Pcm\n",
+ "vc = Zm*Rm*T/P/1000\t\t#specific volume calculated in m**3/kg\n",
+ "pd1 = (ve-vc)/ve*100\t#percent deviation\n",
+ "Aa = 27*Ra**2*Tca**2/(64*Pca*1000)\n",
+ "Ba = Ra*Tca/(8*Pca*1000)\n",
+ "Ab = 27*Rb**2*Tcb**2/(64*Pcb*1000)\n",
+ "Bb = Rb*Tcb/(8*Pcb*1000)\n",
+ "Am = (xa*sqrt(Aa)+xb*sqrt(Ab))**2\n",
+ "Bm = (xa*Ba+xb*Bb)\n",
+ "vc = 0.0006326\t\t\t#calculated specific volume in m**3/kg\n",
+ "pd2 = (ve-vc)/ve*100\n",
+ "\n",
+ "#Results:\n",
+ "print 'Percentage deviation in specific volume using Kays rule: ',round(pd1,1),'%'\n",
+ "print 'Percentage deviation in specific volume using vander waals eqn: ',round(pd2,1),'%' "
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Introduction_to_flight_by_J_D_Anderson/Appendix_D.ipynb b/Introduction_to_flight_by_J_D_Anderson/Appendix_D.ipynb
new file mode 100644
index 00000000..91a87652
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/Appendix_D.ipynb
@@ -0,0 +1,125 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Appendix D"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change in gibbs free energy at 298K : 457.179 KJ\n",
+ "Change in gibbs free energy at 298K : 271.04 KJ\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 16.2\n",
+ "'''Determine the value of \u0002G0 for the reaction 2H2O \u0003\u0004 2H2 + O2 at 25◦C and at 2000 K,\n",
+ "with the water in the gaseous phase.'''\n",
+ "\n",
+ "#Keys:\n",
+ "#1-H2\n",
+ "#2-O2\n",
+ "#3-H2O\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "def dG(T1,Hf1,Hf2,Hf3,Sf1,Sf2,sf3):\n",
+ "\tdH = 2*Hf1+Hf2-2*Hf3\t#Change in enthalpy in kJ\n",
+ "\tdS = 2*Sf1+Sf2-2*sf3 \t#Change in entropy in J/K\n",
+ "\tdG = dH-T1*dS/1000\t#change n gibbs free energy in kJ\n",
+ "\treturn dG\n",
+ "\n",
+ "#Results:\n",
+ "print 'Change in gibbs free energy at 298K :',round(dG(298,0, 0, -241.826, 130.678,205.148,188.834),3),\"KJ\"\n",
+ "print 'Change in gibbs free energy at 298K :',round(dG(2000,52.942, 59.176, -241.826+72.788,188.419,268.748,264.769),3),\"KJ\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Equilibrium constant at 298K: -184.51\n",
+ "Equilibrium constant at 2000K: -16.299\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 16.3\n",
+ "'''Determine the equilibrium constant K, expressed as ln K, for the reaction 2H2O <--->\n",
+ "2H2 + O2 at 25◦C and at 2000 K.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "dG1 = -457.166\t\t\t#change in gibbs free energy at temp 298 K from example2 in kJ\n",
+ "dG2 = -271.040\t\t\t#change in gibbs free energy at temp 2000 K from example2 n kJ\n",
+ "T1 = 298\t\t\t\t#K\n",
+ "T2 = 2000\t\t\t\t#K\n",
+ "R = 8.3145\t\t\t\t#gas constant\n",
+ "\n",
+ "#Calculations:\n",
+ "K1 = dG1*1000/(R*T1)\n",
+ "K2 = dG2*1000/(R*T2)\n",
+ "\n",
+ "#Results:\n",
+ "print 'Equilibrium constant at 298K: ',round(K1,2)\n",
+ "print 'Equilibrium constant at 2000K: ',round(K2,3)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Introduction_to_flight_by_J_D_Anderson/Appendix_E.ipynb b/Introduction_to_flight_by_J_D_Anderson/Appendix_E.ipynb
new file mode 100644
index 00000000..f6035999
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/Appendix_E.ipynb
@@ -0,0 +1,421 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Appendix E"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Stagnation Temperature: 319.9 K\n",
+ "Stagnation Pressure: 187.9 KPa\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 17.1\n",
+ "'''Air flows in a duct at a pressure of 150 kPa with a velocity of 200 m/s. The temperature\n",
+ "of the air is 300 K. Determine the isentropic stagnation pressure and temperature.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T = 300\t\t\t\t\t#Temperature of air in K\n",
+ "P = 150\t\t\t\t\t#Pressure of air in kPa\n",
+ "v = 200\t\t\t\t\t#velocity of air flow n m/s\n",
+ "Cp = 1.004\t\t\t\t#specific heat at constant pressure in kJ/kg\n",
+ "\n",
+ "#Calculations:\n",
+ "To = v**2/(2000*Cp)+T\t#stagnation temperature in K\n",
+ "k = 1.4\t\t \t\t#constant\n",
+ "Po = P*(To/T)**(k/(k-1))#stagnation pressure in kPa\n",
+ "\n",
+ "#Results:\n",
+ "print 'Stagnation Temperature: ',round(To,1),'K'\n",
+ "print 'Stagnation Pressure:',round(Po,1),'KPa'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Thrust acting in x direction: 10.68 KN\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 17.3\n",
+ "'''A jet engine is being tested on a test stand (Fig. 17.5). The inlet area to the compressor is\n",
+ "0.2 m2, and air enters the compressor at 95 kPa, 100 m/s. The pressure of the atmosphere\n",
+ "is 100 kPa. The exit area of the engine is 0.1 m2, and the products of combustion leave the\n",
+ "exit plane at a pressure of 125 kPa and a velocity of 450 m/s. The air–fuel ratio is 50 kg\n",
+ "air/kg fuel, and the fuel enters with a low velocity. The rate of air flow entering the engine\n",
+ "is 20 kg/s. Determine the thrust, Rx, on the engine.'''\n",
+ "\n",
+ "#Keys\n",
+ "#i = inlet\n",
+ "#e = exit\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "#using momentum equation on control surface in x direction\n",
+ "me = 20.4\t\t#mass exiting in kg\n",
+ "mi = 20\t\t\t#mass entering in kg\n",
+ "ve = 450\t\t#exit velocity in m/s\n",
+ "vi = 100\t\t#exit velocity in m/s\n",
+ "Pi = 95\t\t\t#Pressure at inlet in kPa\n",
+ "Pe = 125\t\t#Pressure at exit in kPa\n",
+ "Po = 100\t\t#surrounding pressure in kPa\n",
+ "Ai = 0.2\t\t#inlet area in m**2\n",
+ "Ae = 0.1\t\t#exit area in m**2\n",
+ "\n",
+ "#Calculations:\n",
+ "Rx = (me*ve-mi*vi)/1000-(Pi-Po)*Ai+(Pe-Po)*Ae\t\t#thrust in x direction in kN\n",
+ "\n",
+ "#Results:\n",
+ "print 'Thrust acting in x direction: ',Rx,'KN' "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Speed of sound at 300K: 347.2 m/s\n",
+ "Speed of sound at 1000K: 633.9 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "#Example: 17.5\n",
+ "'''Determine the velocity of sound in air at 300 K and at 1000 K.'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "k = 1.4\t\t\t#constant\n",
+ "R = 0.287\t\t#gas constant\n",
+ "#At 300K\n",
+ "T1 = 300\t\t#K\n",
+ "T2 = 1000\t\t#K\n",
+ "\n",
+ "#Calculations:\n",
+ "c1 = sqrt(k*R*T1*1000)\n",
+ "c2 = sqrt(k*R*T2*1000)\n",
+ "\n",
+ "#Results:\n",
+ "print 'Speed of sound at 300K: ',round(c1,1),'m/s'\n",
+ "print 'Speed of sound at 1000K: ',round(c2,1),'m/s'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mass flow rate at the throat section: 1.0646 Kg/s\n",
+ "Mass flow rate at the exit section: 0.8711 Kg/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "#Example: 17.6\n",
+ "'''A convergent nozzle has an exit area of 500 mm2. Air enters the nozzle with a stagnation\n",
+ "pressure of 1000 kPa and a stagnation temperature of 360 K. Determine the mass rate of\n",
+ "flow for back pressures of 800 kPa, 528 kPa, and 300 kPa, assuming isentropic flow'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "k = 1.4\t\t\t\t#constant\n",
+ "R = 0.287\t\t\t#gas constant\n",
+ "To = 360\t\t\t#stagnation Temperature in K \n",
+ "P = 528\t\t\t\t#stagnation pressure in kPa\n",
+ "A = 500*10**-6\t\t#area in m**2\n",
+ "Me = 0.573\t\t\t#Mach number\n",
+ "Pe = 800\t\t\t#exit pressure in kPa\n",
+ "\n",
+ "#Calculations:\n",
+ "T = To*0.8333\t\t#Temperature of air in K, 0.8333 stagnation ratio from table\n",
+ "v = sqrt(k*R*T*1000)#velocity in m/s\n",
+ "d = P/(R*T)\t\t\t#stagnation density in kg/m**3\n",
+ "ms = d*A*v\t\t\t#mass flow rate in kg/s\n",
+ "Te = To*0.9381\t\t#exit temperature in K, ratio from table\n",
+ "ce = sqrt(k*R*Te*1000)#exit velocity of sound in m/s\n",
+ "ve = Me*ce\n",
+ "de = Pe/R/Te\n",
+ "mse = de*A*ve\n",
+ "\n",
+ "#Results:\n",
+ "print 'Mass flow rate at the throat section: ',round(ms,4),'Kg/s'\n",
+ "print 'Mass flow rate at the exit section: ',round(mse,4),'Kg/s'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "__When diverging section act as a nozzle__\n",
+ "Exit pressure: 93.9 Kpa\n",
+ "Exit Temperature: 183.2 K\n",
+ "Exit velocity: 596.1 m/s\n",
+ "__When diverging section act as a diffuser__\n",
+ "Exit pressure: 93.6 Kpa\n",
+ "Exit Temperature: 353.2 K\n",
+ "Exit velocity: 116.0 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "from math import sqrt\n",
+ "#Example: 17.7\n",
+ "'''A converging-diverging nozzle has an exit area to throat area ratio of 2. Air enters this\n",
+ "nozzle with a stagnation pressure of 1000 kPa and a stagnation temperature of 360 K. The\n",
+ "throat area is 500 mm2. Determine the mass rate of flow, exit pressure, exit temperature,\n",
+ "exit Mach number, and exit velocity for the following conditions:\n",
+ "a. Sonic velocity at the throat, diverging section acting as a nozzle.\n",
+ "(Corresponds to point d in Fig. 17.13.)\n",
+ "b. Sonic velocity at the throat, diverging section acting as a diffuser.\n",
+ "(Corresponds to point c in Fig. 17.13.)'''\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Po = 1000\t\t \t#stagnation pressure in kPa\n",
+ "To = 360\t\t \t#stagnation temperature in K\n",
+ "#when diverging section acting as nozzle\n",
+ "Pe1 = 0.0939*Po\t\t\t#exit pressure of air in kPa\n",
+ "Te1 = 0.5089*To\t\t\t#exit temperature in K\n",
+ "k = 1.4\t\t \t\t#constant\n",
+ "R = 0.287\t\t \t#gas constant for air\n",
+ "Me = 2.197\t\t \t#mach number from table\n",
+ "#when diverging section act as diffuser\n",
+ "Me2 = 0.308\n",
+ "Pe2 = 0.0936*Po\t\t#exit pressure of air in kPa\n",
+ "Te2 = 0.9812*To\t\t#exit temperature in K\n",
+ "\n",
+ "#Calculations:\n",
+ "ce = sqrt(k*R*Te1*1000)\t#velocity of sound in exit section in m/s\n",
+ "ve1 = Me*ce\t\t\t\t#velocity of air at exit section in m/s\n",
+ "ce = sqrt(k*R*Te2*1000)\t\t#velocity of sound in exit section in m/s\n",
+ "ve2 = Me2*ce\n",
+ "\n",
+ "#Results:\n",
+ "print '__When diverging section act as a nozzle__'\n",
+ "print 'Exit pressure: ',round(Pe1,1),\"Kpa\"\n",
+ "print 'Exit Temperature: ',round(Te1,1),\"K\"\n",
+ "print 'Exit velocity: ',round(ve1,1),\"m/s\"\n",
+ "print '__When diverging section act as a diffuser__'\n",
+ "print 'Exit pressure: ',round(Pe2,1),\"Kpa\"\n",
+ "print 'Exit Temperature: ',round(Te2,1),\"K\"\n",
+ "print 'Exit velocity: ',round(ve2,1),\"m/s\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Static Pressure in downstream: 512.7 Kpa\n",
+ "Static Temperature in downstream: 339.7 K\n",
+ "Stagnation Pressure in downstream: 630.0 Kpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 17.8\n",
+ "'''Consider the convergent-divergent nozzle of Example 17.7, in which the diverging section\n",
+ "acts as a supersonic nozzle (Fig. 17.16). Assume that a normal shock stands in the exit\n",
+ "plane of the nozzle. Determine the static pressure and temperature and the stagnation\n",
+ "pressure just downstream of the normal shock.'''\n",
+ "\n",
+ "#Variable Declaration:\n",
+ "Px = 93.9 \t\t\t#Static Pressure in Upstream(Kpa)\n",
+ "Tx = 183.2 \t\t\t#Static Temperature in Upstream(K)\n",
+ "Pox = 1000\t\t\t#Total Pressure in Upstream(Kpa)\n",
+ "Mx = 2.197\t\t\t#X-direction Mach No (Using table A.13)\n",
+ "My = 0.547\t\t\t#Y-direction Mach No (Using table A.13)\n",
+ "rP = 5.46\t\t\t#Py/Px (Using table A.13)\n",
+ "rT = 1.854\t\t\t#Ty/Tx (Using table A.13)\n",
+ "rPo = 0.63\t\t\t#Poy/Pox (Using table A.13)\n",
+ "\n",
+ "#Calculations:\n",
+ "Py = rP*Px\n",
+ "Ty = rT*Tx\n",
+ "Poy = rPo*Pox\n",
+ "\n",
+ "#Results:\n",
+ "print 'Static Pressure in downstream: ',round(Py,1),'Kpa'\n",
+ "print 'Static Temperature in downstream: ',round(Ty,1),'K'\n",
+ "print 'Stagnation Pressure in downstream: ',round(Poy,1),'Kpa'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Exit pressure: 669.6 Kpa\n",
+ "Exit temperature: 327.8 K\n",
+ "Exit stagnation pressure: 929.8 Kpa\n"
+ ]
+ }
+ ],
+ "source": [
+ "# -*- coding: utf8 -*-\n",
+ "from __future__ import division\n",
+ "#Example: 17.9\n",
+ "'''Consider the convergent-divergent nozzle of Examples 17.7 and 17.8. Assume that there\n",
+ "is a normal shock wave standing at the point where M = 1.5. Determine the exit-plane\n",
+ "pressure, temperature, and Mach number. Assume isentropic flow except for the normal\n",
+ "shock (Fig. 17.18).'''\n",
+ "\n",
+ "#Key\n",
+ "#x = inlet\n",
+ "#y = exit\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "Mx = 1.5\t\t\t\t#mach number for inlet\n",
+ "My = 0.7011\t\t\t\t#mach number for exit\n",
+ "Px = 272.4\t\t\t\t#inlet pressure in kPa\n",
+ "Tx = 248.3\t\t\t\t#inlet temperature in K\n",
+ "Pox = 1000\t\t\t\t#stagnation pressure for inlet\n",
+ "\n",
+ "#Calculations:\n",
+ "Py = 2.4583*Px\t\t\t#Exit Pressure in kPa\n",
+ "Ty = 1.320*Tx\t\t\t#Exit temperature in K\n",
+ "Poy = 0.9298*Pox\t\t#Exit pressure in kPa\n",
+ "\n",
+ "#Results:\n",
+ "print 'Exit pressure: ',round(Py,1),\"Kpa\"\n",
+ "print 'Exit temperature: ',round(Ty,1),\"K\"\n",
+ "print 'Exit stagnation pressure: ',round(Poy,1),\"Kpa\""
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Introduction_to_flight_by_J_D_Anderson/README.txt b/Introduction_to_flight_by_J_D_Anderson/README.txt
new file mode 100644
index 00000000..990e4f2c
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Jay Chakra
+Course: btech
+College/Institute/Organization: IITB
+Department/Designation: Aerospace
+Book Title: Introduction to flight
+Author: J D Anderson
+Publisher: McGraw-Hill; 6th edition (February 1, 2008)
+Year of publication: 2008
+Isbn: 978-0071263184
+Edition: 6 \ No newline at end of file
diff --git a/Introduction_to_flight_by_J_D_Anderson/screenshots/1.png b/Introduction_to_flight_by_J_D_Anderson/screenshots/1.png
new file mode 100644
index 00000000..d0a79efb
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/screenshots/1.png
Binary files differ
diff --git a/Introduction_to_flight_by_J_D_Anderson/screenshots/2.png b/Introduction_to_flight_by_J_D_Anderson/screenshots/2.png
new file mode 100644
index 00000000..5ff8cc76
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/screenshots/2.png
Binary files differ
diff --git a/Introduction_to_flight_by_J_D_Anderson/screenshots/3.png b/Introduction_to_flight_by_J_D_Anderson/screenshots/3.png
new file mode 100644
index 00000000..48f6447a
--- /dev/null
+++ b/Introduction_to_flight_by_J_D_Anderson/screenshots/3.png
Binary files differ
diff --git a/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/1._Compressible_Flow-Some_History_and_Introductory_Thoughts.ipynb b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/1._Compressible_Flow-Some_History_and_Introductory_Thoughts.ipynb
new file mode 100644
index 00000000..be1f0a0f
--- /dev/null
+++ b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/1._Compressible_Flow-Some_History_and_Introductory_Thoughts.ipynb
@@ -0,0 +1,408 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Chapter 1. Compressible Flow-Some History and Introductory Thoughts"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 1.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Fractional change in pressure is 0.015 or 1.5 percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 1.1.py\n",
+ "# Consider the low-speed flow of air over an airplane wing at standard \n",
+ "# sea level conditions; the free-stream velocity far ahead of the wing \n",
+ "# is 100 mi/h. The flow accelerates over the wing, reaching a maximum \n",
+ "# velocity of 150 mi/h at some point on the wing. What is the percentage\n",
+ "# pressure change between this point and the free stream?\n",
+ "\n",
+ "\n",
+ "# Variable declaration\n",
+ "rho = 0.002377 # density at sea level (slug/ft^3)\n",
+ "p_1 = 2116.0 # pressure at sea level (lb/ft^2)\n",
+ "v_1 = 100.0 # velocity far ahead of the wing (mi/h)\n",
+ "v_2 = 150.0 # velocity at some point on the wing (mi/h)\n",
+ "\n",
+ "# Calculations \n",
+ "\n",
+ "u_1 = v_1 * 88.0/60.0 # converting v_1 in ft/s\n",
+ "u_2 = v_2 * 88.0/60.0 # converting v_2 in ft/s\n",
+ "\n",
+ "delP = 0.5*rho*(u_2*u_2 - u_1*u_1) # p_1 - p_2 from Bernoulli's equation\n",
+ "fracP = delP/p_1 # fractional change in pressure with respect to freestream\n",
+ "\n",
+ "# Result \n",
+ "print \"Fractional change in pressure is %.3f or %.1f percent\" %(fracP, fracP*100)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 1.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total mass stored is 234.6 Kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 1.2.py\n",
+ "# A pressure vessel that has a volume of 10 m^3 is used to store high\n",
+ "# pressure air for operating a supersonic wind tunnel. If the air pressure \n",
+ "# and temperature inside the vessel are 20 atm and 300 K, respectively,\n",
+ "# what is the mass of air stored in the vessel?\n",
+ "\n",
+ "# Variable declaration\n",
+ "V = 10 # volume of vessel (m^3)\n",
+ "p = 20.0 # pressure (atm)\n",
+ "T = 300 # temperature (K)\n",
+ "\n",
+ "R = 287.0 # gas constant (J/Kg/K)\n",
+ "\n",
+ "# Calculations \n",
+ "p = p * 101000.0 # units conversion to N/m^2\n",
+ "rho = p/R/T # from ideal gas equation of state\n",
+ "m = V * rho # total mass volume * density\n",
+ "\n",
+ "\n",
+ "# Result \n",
+ "print \"Total mass stored is %.1f Kg\" %(m)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 1.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Isothermal compressibility for air at 0.5 atm is 2.00 atm^-1 or 1.97e-05 m^2/N or 9.45e-04 ft^2/lb\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 1.3.py\n",
+ "# Calculate the isothermal compressibility for air at a pressure of 0.5 atm.\n",
+ "\n",
+ "# Variable declaration\n",
+ "p = 0.5 # pressure (atm)\n",
+ "p_si = 0.5*101325 # pressure (N/m^2)\n",
+ "p_eng = 0.5*2116 # pressure (lb/ft^2)\n",
+ "\n",
+ "# Calculations \n",
+ "tau_atm = 1/p # isothermal compressibility in atm^-1\n",
+ "tau_si = 1/p_si # isothermal compressibility in m^2/N\n",
+ "tau_eng = 1/p_eng # isothermal compressibility in ft^2/lb\n",
+ "\n",
+ "# Result \n",
+ "print \"Isothermal compressibility for air at %.1f atm is %.2f atm^-1 or %.2e m^2/N or %.2e ft^2/lb\" %(p, tau_atm, tau_si, tau_eng)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 1.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total internal energy is 5.05e+07 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 1.4.py\n",
+ "# For thre pressure vessel in Example 1.2, calculate the total internal\n",
+ "# energy of the gas stored in the vessel.\n",
+ "\n",
+ "# Variable declaration from example 1.2\n",
+ "V = 10 # volume of vessel (m^3)\n",
+ "p = 20.0 # pressure (atm)\n",
+ "T = 300 # temperature (Kelvin)\n",
+ "\n",
+ "R = 287.0 # gas constant (J/Kg/K)\n",
+ "gamma = 1.4 # ratio of specific heats for air\n",
+ "\n",
+ "# Calculations \n",
+ "cv = R / (gamma-1) # specific heat capacity at constant volume(J/Kg K)\n",
+ "e = cv * T # internal energy per Kg (J/Kg)\n",
+ "p = p * 101000.0 # units conversion to N/m^2\n",
+ "rho = p/R/T # from ideal gas equation of state (Kg/m^3)\n",
+ "m = V * rho # total mass = volume * density (Kg)\n",
+ "E = m*e # total energy in J\n",
+ "\n",
+ "# Result \n",
+ "print \"Total internal energy is %.2e J\" %(E)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 1.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total change in entropy is 1.167e+05 J/K\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 1.5.py\n",
+ "# Consider the air in the pressure vessel in Example 1.2. Let us now heat\n",
+ "# the gas in the vessel. Enough heat is added to increase the temperature\n",
+ "# to 600 K. Calculate the change in entropy of the air inside the vessel.\n",
+ "\n",
+ "# Variable declaration from example 1.2\n",
+ "V = 10 # volume of vessel (m^3)\n",
+ "p = 20.0 # pressure (atm)\n",
+ "T = 300.0 # initial temperature (K)\n",
+ "T2 = 600.0 # final temperature (Kelvin)\n",
+ "R = 287.0 # gas constant (J/Kg/K)\n",
+ "gamma = 1.4 # ratio of specific heats for air\n",
+ "\n",
+ "\n",
+ "# Calculations \n",
+ "p2_by_p = T2/T # p2/p, at constant volume p/T = constant \n",
+ "\n",
+ "cv = R / (gamma-1) # specific heat capacity at constant volume (J/Kg K)\n",
+ "cp = cv + R # specific heat capacity at constant pressure (J/Kg K)\n",
+ "\n",
+ "p = p * 101000.0 # units conversion to N/m^2\n",
+ "rho = p/R/T # from ideal gas equation of state (Kg/m^3)\n",
+ "m = V * rho # total mass = volume * density (Kg)\n",
+ "\n",
+ "from numpy import log # importing log\n",
+ "del_s = cp*log(T2/T) - R*log(p2_by_p) # change in entropy per unit mass (J/ Kg K)\n",
+ "total_del_s = m*del_s # total change in entropy (J/K)\n",
+ "\n",
+ "# Result \n",
+ "print \"Total change in entropy is %.3e J/K\" %(total_del_s)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 1.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pressure at the exit is 0.372 atm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 1.6.py\n",
+ "# Consider the flow through a rocket engine nozzle. Assume that the gas flow \n",
+ "# through the nozzle in an isentropic expansion of a calorically perfect gas.\n",
+ "# In the combustion chamber, the gas which results from the combustion of the \n",
+ "# rocket fuel and oxidizer is at a pressure and temperature of 15 atm and \n",
+ "# 2500 K, respectively, the molecular weight and specific heat at constant \n",
+ "# pressure of the combustion gas are 12 and 4157 J/kg K, respectively. The gas\n",
+ "# expands to supersonic speed through the nozzle, with temperature of 1350 K at\n",
+ "# the nozzle exit. Calculate the pressure at the exit.\n",
+ "\n",
+ "\n",
+ "# Variable declaration\n",
+ "pc = 15.0 # pressure combustion chamber (atm)\n",
+ "Tc = 2500.0 # temperature combustion chamber (K)\n",
+ "mol_wt = 12.0 # molecular weight (gm)\n",
+ "cp = 4157.0 # specific heat at constant pressure (J/Kg/K)\n",
+ "\n",
+ "Tn = 1350.0 # temperature at nozzle exit (K)\n",
+ "\n",
+ "# Calculations \n",
+ "R = 8314.0/mol_wt # gas constant = R_prime/mo_wt, R_prime = 8314 J/K\n",
+ "cv = cp - R # specific heat at constant volume (J/Kg/K)\n",
+ "gamma = cp/cv # ratio of specific heat\n",
+ "\n",
+ "pn_by_pc = pow(Tn/Tc, gamma/(gamma-1)) # ratio of pressure for isentropic process, pn/pc\n",
+ "\n",
+ "pn = pc * pn_by_pc # pn = pc * pn/pc\n",
+ "\n",
+ "# Result \n",
+ "print \"Pressure at the exit is %.3f atm\" %(pn)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 1.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total Lift per unit span = 7197 lb\n",
+ "Total Drag per unit span = 1346 lb\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 1.7.py\n",
+ "# A flat plate with a chord length of 3 ft and an infinite span(perpendicular to\n",
+ "# the page in fig 1.5) is immersed in a Mach 2 flow at standard sea level \n",
+ "# conditions at an angle of attack of 10 degrees. The pressure distribution\n",
+ "# over the plate is as follows: upper surface, p2=constant=1132 lb/ft^2; lower\n",
+ "# surface, p3=constant=3568 lb/ft^2. The local shear stress is given by tau_w =\n",
+ "# 13/xeta^0.2, where tau_w is in pounds per square feet and xeta is the distance\n",
+ "# in feet along the plate from the leading edge. Assume the distribution of \n",
+ "# tau_w over the top and bottom surfaces is the same. Both the pressure and\n",
+ "# shear disributions are sketched qualitatively in fig. 1.5. Calculate the lift\n",
+ "# and drag per unit span on the plate.\n",
+ "\n",
+ "from numpy import sin, cos, pi # importing sin, cos and pi\n",
+ "\n",
+ "# Variable declaration\n",
+ "M1 = 2.0 # mach number freestream\n",
+ "p1 = 2116.0 # pressure at sea level (in lb/ft^2)\n",
+ "l = 3.0 # chord of plate (in ft)\n",
+ "alpha = 10.0 # angle of attack in degrees\n",
+ "\n",
+ "p2 = 1132.0 # pressure on the upper surface (in lb/ft^2)\n",
+ "p3 = 3568.0 # pressure on the lower surface (in lb/ft^2)\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# assuming unit span\n",
+ "\n",
+ "pds = -p2*l + p3*l # integral p.ds from leading edge to trailing edge (in lb/ft)\n",
+ "\n",
+ "L = pds*cos(alpha*pi/180.0) # lift per unit span (in lb/ft), alpha is converted to radians\n",
+ "\n",
+ "Dw = pds*sin(alpha*pi/180.0) # pressure drag per unit span (in lb/ft), alpha is converted to radians\n",
+ "\n",
+ "Df = 16.25 * pow(l, 4.0/5.0) # skin friction drag per unit span (in lb/ft) \n",
+ " # from integral tau.d(xeta)\n",
+ "\n",
+ "Df = 2 * Df * cos(alpha*pi/180.0) # since skin friction acts on both the side\n",
+ "\n",
+ "D = Df + Dw # total drag per unit span (in lb/ft)\n",
+ "# Result \n",
+ "print \"Total Lift per unit span = %.0f lb\" %(L)\n",
+ "print \"Total Drag per unit span = %.0f lb\" %(D)\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/3._One_Dimentional_Flow.ipynb b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/3._One_Dimentional_Flow.ipynb
new file mode 100644
index 00000000..a39d46f6
--- /dev/null
+++ b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/3._One_Dimentional_Flow.ipynb
@@ -0,0 +1,881 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: One Dimentional Flow"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "To = 652.50 R, po = 6938.25 lb/ft^2, Tstar = 543.75 R, pstar = 3665.35 lb/ft^2\n",
+ "Velocity at the required point is 1559.62 ft/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 3.1.py\n",
+ "# At a point in the flow over an F-15 high performance fighter airplane,\n",
+ "# the pressure, temperature and Mach number are 1890 lb/ft^2, 450 deg R,\n",
+ "# and 1.5, respectively. At this point calculate To, po, T*, p* and the \n",
+ "# flow velocity.\n",
+ "\n",
+ "\n",
+ "# Variable declaration\n",
+ "p = 1890.0 # pressure (lb/ft^2)\n",
+ "T = 450.0 # temperature (R)\n",
+ "M = 1.5 # Mach number\n",
+ "R = 1716.0 # gas constant (ft lbf/slug/R) \n",
+ "gamma = 1.4 # ratio of specific heat capacity for air\n",
+ "\n",
+ "\n",
+ "# Calculations \n",
+ "# from isentropic relations\n",
+ "def temperature_ratio(M):\n",
+ " return 1 + (gamma-1)*M*M/2.0\n",
+ "def pressure_ratio(M):\n",
+ " return pow(temperature_ratio(M), gamma/(gamma-1))\n",
+ "\n",
+ "po_by_p = pressure_ratio(M) # ratio of stagnation pressure to actual pressure at mach 1.5\n",
+ "To_by_T = temperature_ratio(M) # ratio of stagnation temperature to actual temperature at mach 1.5\n",
+ "\n",
+ "po = po_by_p * p # stagnation pressure po = po / p * p (lb/ft^2)\n",
+ "To = To_by_T * T # stagnation temperature To = To / T * T (R)\n",
+ "\n",
+ "po_by_pstar = pressure_ratio(1.0) # ratio of stagnation pressure to actual pressure(star) at mach 1.0\n",
+ "To_by_Tstar = temperature_ratio(1.0) # ratio of stagnation temperature to actual temperature(star) at mach 1.0\n",
+ "\n",
+ "pstar = po_by_p / po_by_pstar * p # pstar(lb/ft^2), pstar/po * po/p * p\n",
+ "Tstar = To_by_T / To_by_Tstar * T # Tstar(R), Tstar/To * To/T * T\n",
+ "\n",
+ "a = pow(gamma*R*T, 0.5) # speed of sound(ft/s)\n",
+ "\n",
+ "V = M*a # velocity(ft/s)\n",
+ "\n",
+ "# Result \n",
+ "print \"To = %.2f R, po = %.2f lb/ft^2, Tstar = %.2f R, pstar = %.2f lb/ft^2\" %(To,po,Tstar,pstar) \n",
+ "print \"Velocity at the required point is %.2f ft/s\" %(V)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mach number at the exit of the rocket nozzle is 2.919\n",
+ "Velocity at the exit of the rocket nozzle is 3092.1 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 3.2.py\n",
+ "# Return to Example 1.6, Calculate the Mach Number and velocity at the exit of the rocket\n",
+ "# nozzle.\n",
+ "\n",
+ "# Variable declaration from example 1.6\n",
+ "pc = 15.0 # pressure combustion chamber (atm)\n",
+ "Tc = 2500.0 # temperature combustion chamber (K)\n",
+ "mol_wt = 12.0 # molecular weight (gm)\n",
+ "cp = 4157.0 # specific heat at constant pressure (J/Kg/K)\n",
+ "\n",
+ "Tn = 1350.0 # temperature at nozzle exit (K)\n",
+ "\n",
+ "# Calculations \n",
+ "R = 8314.0/mol_wt # gas constant = R_prime/mo_wt, R_prime = 8314 J/K\n",
+ "cv = cp - R # specific heat at constant volume (J/Kg k)\n",
+ "gamma = cp/cv # ratio of specific heat\n",
+ "\n",
+ "pn_by_pc = pow(Tn/Tc, gamma/(gamma-1)) # ratio of pressure for isentropic process, pn/pc\n",
+ "\n",
+ "Mn = pow(2/(gamma-1)*(pow(1/pn_by_pc,(gamma-1)/gamma) - 1), 0.5) # Mach number at exit, from isentropic flow relation\n",
+ "\n",
+ "an = pow(gamma*R*Tn, 0.5) # Speed of sound at exit (m/s)\n",
+ "Vn = Mn*an # Velocity at exit (m/s)\n",
+ "\n",
+ "\n",
+ "# Result \n",
+ "print \"Mach number at the exit of the rocket nozzle is %.3f\"%(Mn)\n",
+ "print \"Velocity at the exit of the rocket nozzle is %.1f m/s\"%(Vn)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Percentage change in density is 1.1\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 3.3.py\n",
+ "# Return to Example 1.1, calculate the percentage density change between the given point\n",
+ "# on the wing and the free-stream, assuming compressible flow.\n",
+ "\n",
+ "# Variable declaration from example 1.1\n",
+ "rho_1 = 0.002377 # density at sea level (slug/ft^3)\n",
+ "T_1 = 519.0 # temperature at sea level (R)\n",
+ "v_1 = 100.0 # velocity far ahead of the wing (mi/h)\n",
+ "v_2 = 150.0 # velocity at some point on the wing (mi/h)\n",
+ "gamma = 1.4 # ratio of specific heat capacity for air\n",
+ "R = 1716.0 # gas constant (ft lbf/slug/R) \n",
+ "\n",
+ "# Calculations \n",
+ "cp = gamma*R/(gamma-1) # specific heat capacity at constant pressure (ft lb/ slug / R)\n",
+ "u_1 = v_1 * 88.0/60.0 # converting v_1 in ft/s\n",
+ "u_2 = v_2 * 88.0/60.0 # converting v_2 in ft/s\n",
+ "\n",
+ "T_2 = T_1 + (u_1*u_1 - u_2*u_2)/cp/2.0 # temperature at a point from energy equation (R)\n",
+ "\n",
+ "rho_2_by_rho_1 = pow((T_2/T_1), 1/(gamma-1))# density ratio from isentropic flow relation\n",
+ "\n",
+ "rho_2 = rho_2_by_rho_1 * rho_1 # density at the point (slug/ ft^3)\n",
+ "\n",
+ "delrho = rho_1 - rho_2 # change in density (slug/ ft^3)\n",
+ "fracrho = delrho/rho_1 # fractional change in density\n",
+ "\n",
+ "# Result \n",
+ "print \"Percentage change in density is %.1f\"%(fracrho*100)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "M2 = 0.4752\n",
+ "p2 = 5.165 atm\n",
+ "T2 = 535.8 K\n",
+ "u2 = 220.5 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 3.4.py\n",
+ "# A normal shock wave is standing in the test section of a supersonic wind tunnel.\n",
+ "# Upstream of the wave, M1 = 3, p1 = 0.5 atm, and T1 = 200 K. Find M2, p2, T2 and\n",
+ "# u2 downstream of the wave\n",
+ "\n",
+ "\n",
+ "# Variable declaration from example 1.1\n",
+ "M1 = 3.0 # upstream mach number\n",
+ "p1 = 0.5 # upstream pressure (atm)\n",
+ "T1 = 200.0 # upstream temperature (K)\n",
+ "R = 287.0 # gas constant (J/Kg/K)\n",
+ "gamma = 1.4 # ratio of specific heats for air\n",
+ "\n",
+ "# Calculations \n",
+ "\n",
+ "# from shock relation (Table A2) for M1 = 3.0\n",
+ "# subscript 2 means downstream of the shock\n",
+ "p2_by_p1 = 10.33 # p2/p1\n",
+ "T2_by_T1 = 2.679 # T2/T1\n",
+ "M2 = 0.4752 # M2\n",
+ "\n",
+ "p2 = p2_by_p1 * p1 # downstream pressure (atm)\n",
+ "T2 = T2_by_T1 * T1 # downstream temperature (K)\n",
+ "a2 = pow(gamma*R*T2, 0.5) # speed of sound downstream of the shock (m/s)\n",
+ "u2 = M2*a2 # downstream velocity (m/s)\n",
+ "\n",
+ "\n",
+ "# Result \n",
+ "print \"M2 = %.4f\"%(M2)\n",
+ "print \"p2 = %.3f atm\"%(p2)\n",
+ "print \"T2 = %.1f K\"%(T2)\n",
+ "print \"u2 = %.1f m/s\"%(u2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Pressure at the nose of the missile is 11935.6 lb/ft^2\n",
+ "Temperature at the nose of the missle is 934.2 deg R\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 3.5.py\n",
+ "# A blunt-nosed missile is flying at Mach 2 at standard sea level. Calculate the\n",
+ "# temperature and pressure at the nose of the missile.\n",
+ "\n",
+ "\n",
+ "# Variable declaration\n",
+ "M1 = 2.0 # upstream mach number\n",
+ "p1 = 2116.0 # upstream pressure(sea level) (lb/ft^2)\n",
+ "T1 = 519.0 # upstream temperature(sea level) (R)\n",
+ "gamma = 1.4 # ratio of specific heat\n",
+ "\n",
+ "# Calculations \n",
+ "# subscript 2 means downstream of the shock\n",
+ "\n",
+ "# from isentropic relations\n",
+ "def temperature_ratio(M):\n",
+ " return 1 + (gamma-1)*M*M/2.0\n",
+ "def pressure_ratio(M):\n",
+ " return pow(temperature_ratio(M), gamma/(gamma-1))\n",
+ "\n",
+ "To1_by_T1 = temperature_ratio(M1) # ratio of stagnation temperature to actual temperature at mach M1\n",
+ "po1_by_p1 = pressure_ratio(M1) # ratio of stagnation pressure to actual pressure at mach M1\n",
+ "\n",
+ "To2 = To1 = To1_by_T1 * T1 # To2 and To1 = To1/T1 * T1 (in R)\n",
+ "\n",
+ "# from shock relation (Table A2) for M1 = 2.0\n",
+ "po2_by_po1 = 0.7209 # po2/po1\n",
+ "\n",
+ "po2 = po2_by_po1 * po1_by_p1 * p1 # po2 = po2/po1 * po1/p1 * p1 (in lb/ft^2)\n",
+ "\n",
+ "\n",
+ "# Result \n",
+ "print \"Pressure at the nose of the missile is %.1f lb/ft^2\" %(po2)\n",
+ "print \"Temperature at the nose of the missle is %.1f deg R\"%(To2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mach number is 2.35\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 3.6.py\n",
+ "# Consider a point in a supersonic flow where the static pressure is 0.4 atm. When\n",
+ "# a pitot tube is inserted in the float at this point, the pressure measured by the\n",
+ "# pitot tube is 3 atm. Calculate the mach number at this point.\n",
+ "\n",
+ "# Variable declaration\n",
+ "p1 = 0.4 # static pressure (in atm)\n",
+ "po2 = 3.0 # pressure measured by the pitot tube (in atm)\n",
+ "\n",
+ "#Calculations\n",
+ "# from table A2 for po2/p1 = 7.5\n",
+ "M1 = 2.35\n",
+ "\n",
+ "# Results \n",
+ "print \"Mach number is %.2f\"%(M1)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Change is entropy is 990.4 lb/slug R\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 3.7.py\n",
+ "# For the normal shock that occurs in front of the pitot tube in Example 3.6, \n",
+ "# calculate the entropy change across the shock. \n",
+ "\n",
+ "\n",
+ "# Variable declaration\n",
+ "M1 = 2.34 # mach number from example 3.6\n",
+ "R = 1716.0 # gas constant (ft lbf/slug/R) \n",
+ "\n",
+ "# Calculations \n",
+ "# subscript 2 means downstream of the shock\n",
+ "\n",
+ "po2_by_po1 = 0.5615 # from shock table A2 for mach M1\n",
+ "from numpy import log # importing log\n",
+ "dels = -R*log(po2_by_po1) # s2 - s1 (in lb/slug R)\n",
+ "\n",
+ "# Result \n",
+ "print \"Change is entropy is %.1f lb/slug R\" %(dels)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "M2 = 0.58 \n",
+ "p2 = 0.718 atm\n",
+ "T2 = 1183.31 K\n",
+ "rho2 = 0.214 Kg/m^3\n",
+ "To2 = 1270.7 K\n",
+ "po2 = 0.902 atm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 3.8.py\n",
+ "# Air enters a constant area duct at M1 = 0.2, p1 = 1 atm, and T1 = 273 K. \n",
+ "# Inside the duct the heat is added per unit mass is q = 1.0 * 10^6 J/kg. \n",
+ "# Calculate the flow properties M2, p2, T2, rho2, To2, po2 at the exit of the\n",
+ "# duct.\n",
+ "\n",
+ "\n",
+ "# Variable declaration\n",
+ "M1 = 0.2 # upstream mach number \n",
+ "p1 = 1.0 # upstream pressure (in atm)\n",
+ "T1 = 273.0 # upstream temperature (in K)\n",
+ "q = 1e6 # heat added (in J/Kg)\n",
+ "R = 287.0 # gas constant (in J/Kg K)\n",
+ "gamma = 1.4 # ratio of specific heats\n",
+ "\n",
+ "# from Table A3, for M1 = 0.2 \n",
+ "T1_by_Tstar = 0.2066\n",
+ "p1_by_pstar = 2.273\n",
+ "po1_by_postar = 1.235\n",
+ "To1_by_Tostar = 0.1736\n",
+ "\n",
+ "\n",
+ "# Calculations \n",
+ "\n",
+ "# from isentropic relations\n",
+ "def temperature_ratio(M):\n",
+ " return 1 + (gamma-1)*M*M/2.0\n",
+ "def pressure_ratio(M):\n",
+ " return pow(temperature_ratio(M), gamma/(gamma-1))\n",
+ "\n",
+ "\n",
+ "po1_by_p1 = pressure_ratio(M1) # ratio of stagnation pressure to actual pressure at mach M1\n",
+ "To1_by_T1 = temperature_ratio(M1) # ratio of stagnation temperature to actual temperature at mach M1\n",
+ "\n",
+ "po1 = po1_by_p1 * p1 # po1 = po1/p1 * p1 (in atm)\n",
+ "To1 = To1_by_T1 * T1 # To1 = To1/T1 * T1 (in K)\n",
+ "\n",
+ "cp = gamma * R / (gamma-1) # specific heat at constant pressure (J/ Kg K)\n",
+ "\n",
+ "To2 = q / cp + To1 # total temperature after heat addition (K)\n",
+ "\n",
+ "\n",
+ "# hence \n",
+ "\n",
+ "To2_by_Tostar = To2/To1 * To1_by_Tostar # To2/Tostar = To2/To1 * To1/Tostar\n",
+ "\n",
+ "M2 = 0.58 # from table A3\n",
+ "\n",
+ "# from Table A3, for M2 = 0.58 \n",
+ "T2_by_Tstar = 0.8955\n",
+ "p2_by_pstar = 1.632\n",
+ "po2_by_postar = 1.083\n",
+ "\n",
+ "T2 = T2_by_Tstar / T1_by_Tstar * T1 # T2 = T2/Tstar * Tstar/T1 * T1 (in K)\n",
+ "p2 = p2_by_pstar / p1_by_pstar * p1 # p2 = p2/pstar * pstar/p1 * p1 (in atm)\n",
+ "po2 = po2_by_postar / po1_by_postar * po1 # po2 = po2/postar * postar/po1 * po1 (in atm)\n",
+ "\n",
+ "rho2 = p2*101325.0 / R / T2 # rho (in Kg/m^3) = P/(RT), where p is in N/m^2\n",
+ "\n",
+ "\n",
+ "# Result\n",
+ "# M2, p2, T2, rho2, To2, po2 at the exit\n",
+ "print \"M2 = %.2f \"%(M2)\n",
+ "print \"p2 = %.3f atm\"%(p2)\n",
+ "print \"T2 = %.2f K\"%(T2)\n",
+ "print \"rho2 = %.3f Kg/m^3\"%(rho2)\n",
+ "print \"To2 = %.1f K\"%(To2)\n",
+ "print \"po2 = %.3f atm\"%(po2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "M2 = 1.58 \n",
+ "p2 = 3.025 atm\n",
+ "T2 = 761.72 K\n",
+ "rho2 = 1.402 Kg/m^3\n",
+ "To2 = 1138.7 K\n",
+ "po2 = 12.487 atm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 3.9.py\n",
+ "# Air enters a constant area duct at M1 = 3.0, p1 = 1 atm, and T1 = 300 K. \n",
+ "# Inside the duct the heat is added per unit mass is q = 3.0 * 10^5 J/kg. \n",
+ "# Calculate the flow properties M2, p2, T2, rho2, To2, po2 at the exit of the\n",
+ "# duct.\n",
+ "\n",
+ "\n",
+ "# Variable declaration\n",
+ "M1 = 3.0 # upstream mach number \n",
+ "p1 = 1.0 # upstream pressure (in atm)\n",
+ "T1 = 300.0 # upstream temperature (in K)\n",
+ "q = 3e5 # heat added (in J/Kg)\n",
+ "R = 287.0 # gas constant (in J/Kg K)\n",
+ "gamma = 1.4 # ratio of specific heats\n",
+ "\n",
+ "# from Table A3, for M1 = 3.0\n",
+ "T1_by_Tstar = 0.2803\n",
+ "p1_by_pstar = 0.1765\n",
+ "To1_by_Tostar = 0.6540\n",
+ "po1_by_postar = 3.424\n",
+ "\n",
+ "# Calculations \n",
+ "\n",
+ "# from isentropic relations\n",
+ "def temperature_ratio(M):\n",
+ " return 1 + (gamma-1)*M*M/2.0\n",
+ "def pressure_ratio(M):\n",
+ " return pow(temperature_ratio(M), gamma/(gamma-1))\n",
+ "\n",
+ "\n",
+ "po1_by_p1 = pressure_ratio(M1) # ratio of stagnation pressure to actual pressure at mach M1\n",
+ "To1_by_T1 = temperature_ratio(M1) # ratio of stagnation temperature to actual temperature at mach M1\n",
+ "\n",
+ "po1 = po1_by_p1 * p1 # po1 = po1/p1 * p1 (in atm)\n",
+ "To1 = To1_by_T1 * T1 # To1 = To1/T1 * T1 (in K)\n",
+ "\n",
+ "cp = gamma * R / (gamma-1) # specific heat at constant pressure (J/ Kg K)\n",
+ "\n",
+ "To2 = q / cp + To1 # total temperature after heat addition (K)\n",
+ "\n",
+ "\n",
+ "# hence \n",
+ "\n",
+ "To2_by_Tostar = To2/To1 * To1_by_Tostar # To2/Tostar = To2/To1 * To1/Tostar\n",
+ "\n",
+ "M2 = 1.58 # from table A3\n",
+ "\n",
+ "# from Table A3, for M2 = 1.58 \n",
+ "T2_by_Tstar = 0.7117\n",
+ "p2_by_pstar = 0.5339\n",
+ "po2_by_postar = 1.164\n",
+ "\n",
+ "T2 = T2_by_Tstar / T1_by_Tstar * T1 # T2 = T2/Tstar * Tstar/T1 * T1 (in K)\n",
+ "p2 = p2_by_pstar / p1_by_pstar * p1 # p2 = p2/pstar * pstar/p1 * p1 (in atm)\n",
+ "po2 = po2_by_postar / po1_by_postar * po1 # po2 = po2/postar * postar/po1 * po1 (in atm)\n",
+ "\n",
+ "rho2 = p2*101325.0 / R / T2 # rho (in Kg/m^3) = P/(RT), where p is in N/m^2\n",
+ "\n",
+ "\n",
+ "# Result\n",
+ "# M2, p2, T2, rho2, To2, po2 at the exit\n",
+ "print \"M2 = %.2f \"%(M2)\n",
+ "print \"p2 = %.3f atm\"%(p2)\n",
+ "print \"T2 = %.2f K\"%(T2)\n",
+ "print \"rho2 = %.3f Kg/m^3\"%(rho2)\n",
+ "print \"To2 = %.1f K\"%(To2)\n",
+ "print \"po2 = %.3f atm\"%(po2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Heat require to choke the flow is 4.46e+05 J/kg\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 3.10.py\n",
+ "# In example 3.9, how much heat per unit mass must be added to choke the flow?\n",
+ "\n",
+ "\n",
+ "# Variable declaration from example 3.9\n",
+ "To1 = 840 # upstream total temperature (in K)\n",
+ "M1 = 3.0 # upstream mach number\n",
+ "To1_by_Tostar = 0.6540 # To1/Tostar from Table A3\n",
+ "cp = 1004.5 # specific heat at constant pressure for air (in J/Kg K)\n",
+ "\n",
+ "# Calculations \n",
+ "Tostar = To1 / To1_by_Tostar # Tostar = To1 * Tostar/To1 (in K)\n",
+ "\n",
+ "M2 = 1.0 # for choked flow\n",
+ "To2 = Tostar # since M2 = 1.0\n",
+ "\n",
+ "q = cp * (To2 - To1) # required heat = cp(To2 - To1) (in J/kg)\n",
+ "\n",
+ "\n",
+ "# Result \n",
+ "print \"Heat require to choke the flow is %.2e J/kg\" %(q)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "M2 = 0.475 \n",
+ "p2 = 0.624 atm\n",
+ "T2 = 265.82 K\n",
+ "po2 = 0.728 atm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 3.11.py\n",
+ "# Consider the flow of air through a pipe of diameter = 0.15 m and length = 30 m.\n",
+ "# The inlet flow conditions are M1 = 0.3, p1 = 1.0 atm and T1 = 273 K. Assuming\n",
+ "# f = constant = 0.005, calculate the flow conditions at the exit, M2, p2, T2 and\n",
+ "# po2.\n",
+ "\n",
+ "\n",
+ "# Variable declaration\n",
+ "M1 = 0.3 # upstream mach number \n",
+ "p1 = 1.0 # upstream pressure (in atm)\n",
+ "T1 = 273.0 # upstream temperature (in K)\n",
+ "R = 287.0 # gas constant (in J/Kg K)\n",
+ "gamma = 1.4 # ratio of specific heats\n",
+ "\n",
+ "D = 0.15 # diameter of pipe (in m)\n",
+ "L = 30.0 # length of pipe (in m)\n",
+ "f = 0.005 # friction coefficient\n",
+ "# Calculations \n",
+ "\n",
+ "# from isentropic relations\n",
+ "def temperature_ratio(M):\n",
+ " return 1 + (gamma-1)*M*M/2.0\n",
+ "def pressure_ratio(M):\n",
+ " return pow(temperature_ratio(M), gamma/(gamma-1))\n",
+ "\n",
+ "\n",
+ "po1_by_p1 = pressure_ratio(M1) # ratio of stagnation pressure to actual pressure at mach M1\n",
+ "To1_by_T1 = temperature_ratio(M1) # ratio of stagnation temperature to actual temperature at mach M1\n",
+ "\n",
+ "po1 = po1_by_p1 * p1 # po1 = po1/p1 * p1 (in atm)\n",
+ "To1 = To1_by_T1 * T1 # To1 = To1/T1 * T1 (in K)\n",
+ "\n",
+ "# from Table A4 for M1 = 0.3\n",
+ "# C = 4*f*Lstar/D\n",
+ "\n",
+ "C1 = 5.299 \n",
+ "p1_by_pstar = 3.619 # p1 / pstar\n",
+ "T1_by_Tstar = 1.179 # T1 / Tstar\n",
+ "po1_by_pstar = 2.035 # po1 / pstar\n",
+ "\n",
+ "C2 = C1 - 4*f*L/D \n",
+ "\n",
+ "# from Table A4 for 4*f*Lstar/D = 1.2993\n",
+ "\n",
+ "M2 = 0.475\n",
+ "T2_by_Tstar = 1.148 # T2 / Tstar\n",
+ "p2_by_pstar = 2.258 # p2 / pstar\n",
+ "po2_by_postar = 1.392 # po2 / postar\n",
+ " \n",
+ "\n",
+ "T2 = T2_by_Tstar / T1_by_Tstar * T1 # T2 = T2/Tstar * Tstar/T1 * T1 (in K)\n",
+ "p2 = p2_by_pstar / p1_by_pstar * p1 # p2 = p2/pstar * pstar/p1 * p1 (in atm)\n",
+ "po2 = po2_by_postar / po1_by_pstar * po1 # po2 = po2/postar * postar/po1 * po1 (in atm)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print \"M2 = %.3f \"%(M2)\n",
+ "print \"p2 = %.3f atm\"%(p2)\n",
+ "print \"T2 = %.2f K\"%(T2)\n",
+ "print \"po2 = %.3f atm\"%(po2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "M2 = 1.9 \n",
+ "p2 = 2.014 atm\n",
+ "T2 = 487.8 K\n",
+ "po2 = 13.49 atm\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 3.12.py\n",
+ "# Consider the flow of air through a pipe of diameter = 0.4 ft and length = 5 ft.\n",
+ "# The inlet flow conditions are M1 = 3.0, p1 = 1.0 atm and T1 = 300 K. Assuming\n",
+ "# f = constant = 0.005, calculate the flow conditions at the exit, M2, p2, T2 and\n",
+ "# po2.\n",
+ "\n",
+ "\n",
+ "# Variable declaration\n",
+ "M1 = 3.0 # upstream mach number \n",
+ "p1 = 1.0 # upstream pressure (in atm)\n",
+ "T1 = 300.0 # upstream temperature (in K)\n",
+ "gamma = 1.4 # ratio of specific heats\n",
+ "\n",
+ "D = 0.4 # diameter of pipe (in ft)\n",
+ "L = 5.0 # length of pipe (in ft)\n",
+ "f = 0.005 # friction coefficient\n",
+ "\n",
+ "# Calculations \n",
+ "\n",
+ "# from isentropic relations\n",
+ "def temperature_ratio(M):\n",
+ " return 1 + (gamma-1)*M*M/2.0\n",
+ "def pressure_ratio(M):\n",
+ " return pow(temperature_ratio(M), gamma/(gamma-1))\n",
+ "\n",
+ "\n",
+ "po1_by_p1 = pressure_ratio(M1) # ratio of stagnation pressure to actual pressure at mach M1\n",
+ "To1_by_T1 = temperature_ratio(M1) # ratio of stagnation temperature to actual temperature at mach M1\n",
+ "\n",
+ "po1 = po1_by_p1 * p1 # po1 = po1/p1 * p1 (in atm)\n",
+ "To1 = To1_by_T1 * T1 # To1 = To1/T1 * T1 (in K)\n",
+ "\n",
+ "# from Table A4 for M1 = 3.0\n",
+ "# C = 4*f*Lstar/D\n",
+ "\n",
+ "C1 = 0.5222\n",
+ "p1_by_pstar = 0.2182 # p1 / pstar\n",
+ "T1_by_Tstar = 0.4286 # T1 / Tstar\n",
+ "po1_by_pstar = 4.235 # po1 / pstar\n",
+ "\n",
+ "C2 = C1 - 4*f*L/D \n",
+ "\n",
+ "# from Table A4 for 4*f*Lstar/D = 0.2722\n",
+ "\n",
+ "M2 = 1.9\n",
+ "T2_by_Tstar = 0.6969 # T2 / Tstar\n",
+ "p2_by_pstar = 0.4394 # p2 / pstar\n",
+ "po2_by_postar = 1.555 # po2 / postar\n",
+ " \n",
+ "\n",
+ "T2 = T2_by_Tstar / T1_by_Tstar * T1 # T2 = T2/Tstar * Tstar/T1 * T1 (in K)\n",
+ "p2 = p2_by_pstar / p1_by_pstar * p1 # p2 = p2/pstar * pstar/p1 * p1 (in atm)\n",
+ "po2 = po2_by_postar / po1_by_pstar * po1 # po2 = po2/postar * postar/po1 * po1 (in atm)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print \"M2 = %.1f \"%(M2)\n",
+ "print \"p2 = %.3f atm\"%(p2)\n",
+ "print \"T2 = %.1f K\"%(T2)\n",
+ "print \"po2 = %.2f atm\"%(po2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Length required to choke the flow is 10.44 ft\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 3.13.py\n",
+ "# In example 3.12, what is the length of the duct required to choke the flow?\n",
+ "\n",
+ "\n",
+ "# Variable declaration from example 3.12\n",
+ "M1 = 3.0 # mach number\n",
+ "C1 = 0.5222 # C1 = 4*f*L1star/D\n",
+ "f = 0.005 # friction coefficient\n",
+ "D = 0.4 # diameter of pipe (in ft)\n",
+ "\n",
+ "# Calculations \n",
+ "L1star = 0.5222 * D/4.0/f \n",
+ "\n",
+ "\n",
+ "# Result \n",
+ "print \"Length required to choke the flow is %.2f ft\" %(L1star)\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/4._Oblique_Shock_and_Expansion_Waves.ipynb b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/4._Oblique_Shock_and_Expansion_Waves.ipynb
new file mode 100644
index 00000000..6e2c8e3b
--- /dev/null
+++ b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/4._Oblique_Shock_and_Expansion_Waves.ipynb
@@ -0,0 +1,687 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4. Oblique Shock and Expansion Waves"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Shock wave angle 37.50 degrees\n",
+ "p2 = 3.72 atm\n",
+ "T2 = 446.69 K\n",
+ "M2 = 2.03 \n",
+ "po2 = 29.42 atm\n",
+ "To2 = 806.40 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 4.1.py\n",
+ "# A uniform supersonic stream with M1 = 3.0, p1 = 1 atm, T1 = 288 K encounters\n",
+ "# a compression corner which deflects the stream by an angle theta = 20 deg. \n",
+ "# Calculate the shock wave angle, and p2, T2, M2, po2 and To2 behind the shock\n",
+ "# wave.\n",
+ "\n",
+ "\n",
+ "# Variable declaration\n",
+ "M1 = 3.0 # upstream mach number\n",
+ "p1 = 1.0 # upstream pressure (in atm)\n",
+ "T1 = 288 # upstream temperature (in K)\n",
+ "theta = 20 # deflection (in degrees)\n",
+ "\n",
+ "# Calculations \n",
+ "# subscript 2 means behind the shock\n",
+ "\n",
+ "# from figure 4.5 from M1 = 3.0, theta = 20.0 deg.\n",
+ "beta = 37.5 # shock angle (in degress)\n",
+ "\n",
+ "# degree to radian conversion is done by multiplying by pi/180\n",
+ "from numpy import sin, pi\n",
+ "Mn1 = M1 * sin(beta*pi/180) # upstream mach number normal to the shock\n",
+ "\n",
+ "# from Table A2 for Mn1 = 1.826\n",
+ "p2_by_p1 = 3.723 # p2/p1\n",
+ "T2_by_T1 = 1.551 # T2/T1\n",
+ "Mn2 = 0.6108 \n",
+ "po2_by_po1 = 0.8011 # po2/po1\n",
+ "\n",
+ "p2 = p2_by_p1 * p1 # p2 (in atm) = p2/p1 * p1\n",
+ "T2 = T2_by_T1 * T1 # T2 (in K) = T2/T1 * T1\n",
+ "\n",
+ "M2 = Mn2/(sin((beta-theta)*pi/180)) # mach number behind the shock\n",
+ "\n",
+ "# from A1 for M1 = 3.0\n",
+ "po1_by_p1 = 36.73\n",
+ "To1_by_T1 = 2.8\n",
+ "\n",
+ "po2 = po2_by_po1 * po1_by_p1 * p1 # po2 (in atm) = po2/po1 * po1/p1 * p1\n",
+ "To2 = To1 = To1_by_T1 * T1 # To2 (in atm) = To2/To1 * To1/T1 * T1\n",
+ "\n",
+ "\n",
+ "# Result \n",
+ "print \"Shock wave angle %.2f degrees\"%(beta)\n",
+ "print \"p2 = %.2f atm\" %(p2)\n",
+ "print \"T2 = %.2f K\" %(T2)\n",
+ "print \"M2 = %.2f \" %(M2)\n",
+ "print \"po2 = %.2f atm\" %(po2)\n",
+ "print \"To2 = %.2f K\" %(To2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Shock wave angle 52.00 degrees\n",
+ "p2 = 6.276 atm\n",
+ "M2 = 1.41 \n",
+ "\n",
+ "Comparing the above results with those from Example 4.1. When theta is increased, the shock wave becomes stronger, as evidenced by the increased pressure behind\n",
+ "the shock(6.276 atm as compared to 3.723). The Mach number behind the shock is\n",
+ "reduced(1.41 compared to 2.03). Also, as theta is increased, beta also increases\n",
+ "(52 degrees compared to 37.5 degrees.\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 4.2.py\n",
+ "# In Example 4.1, the deflection angle is increased to theta = 30 degrees. \n",
+ "# Calculate the pressure and Mach number behind the wave, and compare these\n",
+ "# results with those of Example 4.1.\n",
+ "\n",
+ "\n",
+ "# Variable declaration\n",
+ "M1 = 3.0 # upstream mach number\n",
+ "p1 = 1.0 # upstream pressure (in atm)\n",
+ "T1 = 288 # upstream temperature (in K)\n",
+ "theta = 30 # deflection (in degrees)\n",
+ "\n",
+ "# Calculations \n",
+ "# subscript 2 means behind the shock\n",
+ "\n",
+ "# from figure 4.5 from M1 = 3.0, theta = 30.0 deg.\n",
+ "beta = 52.0 # shock angle (in degress)\n",
+ "\n",
+ "# degree to radian conversion is done by multiplying by pi/180\n",
+ "from numpy import sin, pi\n",
+ "Mn1 = M1 * sin(beta*pi/180) # upstream mach number normal to the shock\n",
+ "\n",
+ "# from Table A2 for Mn1 = 2.364\n",
+ "p2_by_p1 = 6.276 # p2/p1\n",
+ "Mn2 = 0.5286\n",
+ "\n",
+ "p2 = p2_by_p1 * p1 # p2 (in atm) = p2/p1 * p1\n",
+ "M2 = Mn2/(sin((beta-theta)*pi/180)) # mach number behind the shock\n",
+ "\n",
+ "\n",
+ "print \"Shock wave angle %.2f degrees\"%(beta)\n",
+ "print \"p2 = %.3f atm\" %(p2)\n",
+ "print \"M2 = %.2f \" %(M2)\n",
+ "comparison = \"\"\"\n",
+ "Comparing the above results with those from Example 4.1. When theta is increased, the shock wave becomes stronger, as evidenced by the increased pressure behind\n",
+ "the shock(6.276 atm as compared to 3.723). The Mach number behind the shock is\n",
+ "reduced(1.41 compared to 2.03). Also, as theta is increased, beta also increases\n",
+ "(52 degrees compared to 37.5 degrees.\n",
+ "\"\"\"\n",
+ "print comparison\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Shock wave angle 30.00 degrees\n",
+ "p2 = 7.125 atm\n",
+ "M2 = 2.95 \n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 4.3.py\n",
+ "# In Example 4.1, the free stream mach number is increased to 5.0. \n",
+ "# Calculate the pressure and Mach number behind the wave, and compare these\n",
+ "# results with those of Example 4.1.\n",
+ "\n",
+ "\n",
+ "# Variable declaration \n",
+ "M1 = 5.0 # upstream mach number\n",
+ "p1 = 1.0 # upstream pressure (in atm)\n",
+ "T1 = 288 # upstream temperature (in K)\n",
+ "theta = 20.0 # deflection (in degrees)\n",
+ "\n",
+ "# Calculations \n",
+ "# subscript 2 means behind the shock\n",
+ "\n",
+ "# from figure 4.5 from M1 = 5.0, theta = 20.0 deg.\n",
+ "beta = 30.0 # shock angle (in degress)\n",
+ "\n",
+ "# degree to radian conversion is done by multiplying by pi/180\n",
+ "from numpy import sin, pi\n",
+ "Mn1 = M1 * sin(beta*pi/180) # upstream mach number normal to the shock\n",
+ "\n",
+ "# from Table A2 for Mn1 = 2.5\n",
+ "p2_by_p1 = 7.125 # p2/p1\n",
+ "Mn2 = 0.513\n",
+ "\n",
+ "p2 = p2_by_p1 * p1 # p2 (in atm) = p2/p1 * p1\n",
+ "M2 = Mn2/(sin((beta-theta)*pi/180)) # mach number behind the shock\n",
+ "\n",
+ "\n",
+ "print \"Shock wave angle %.2f degrees\"%(beta)\n",
+ "print \"p2 = %.3f atm\" %(p2)\n",
+ "print \"M2 = %.2f \" %(M2)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Coefficient of pressure is 0.289\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 4.5.py\n",
+ "# Consider a 15 deg half angle wedge at zero angle of attack. Calculate the\n",
+ "# pressure coefficient on the wedge surface in a Mach 3 flow of air.\n",
+ "\n",
+ "\n",
+ "# Variable declaration \n",
+ "M1 = 3.0 # upstream mach number\n",
+ "theta = 15.0 # deflection (in degrees)\n",
+ "gamma = 1.4 # ratio of specific heats\n",
+ "\n",
+ " \n",
+ "# Calculations \n",
+ "# subscript 2 means behind the shock\n",
+ "\n",
+ "# from figure 4.5 from M1 = 3.0, theta = 15.0 deg.\n",
+ "beta = 32.2 # shock angle (in degress)\n",
+ "\n",
+ "# degree to radian conversion is done by multiplying by pi/180\n",
+ "from numpy import sin, pi\n",
+ "Mn1 = M1 * sin(beta*pi/180) # upstream mach number normal to the shock\n",
+ "\n",
+ "# from Table A2 for Mn1 = 1.6\n",
+ "p2_by_p1 = 2.82 # p2/p1\n",
+ "\n",
+ "Cp = 2/(gamma*M1*M1) * (p2_by_p1 - 1) \n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print \"Coefficient of pressure is %.3f\"%(Cp)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Coefficient of drag is 0.155\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 4.6.py\n",
+ "# Consider a 15 deg half angle wedge at zero angle of attack in a Mach 3 flow of\n",
+ "# air. Calculate the drag coefficient. Assume that the pressure exerted over the \n",
+ "# base of the wedge, the base pressure, is equal to the free stream pressure.\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Variable declaration \n",
+ "M1 = 3.0 # upstream mach number\n",
+ "theta = 15.0 # deflection (in degrees)\n",
+ "gamma = 1.4 # ratio of specific heats\n",
+ "\n",
+ " \n",
+ "# Calculations \n",
+ "# subscript 2 means behind the shock\n",
+ "\n",
+ "# from figure 4.5 from M1 = 3.0, theta = 15.0 deg.\n",
+ "beta = 32.2 # shock angle (in degress)\n",
+ "\n",
+ "# degree to radian conversion is done by multiplying by pi/180\n",
+ "from numpy import sin, pi, tan\n",
+ "Mn1 = M1 * sin(beta*pi/180) # upstream mach number normal to the shock\n",
+ "\n",
+ "# from Table A2 for Mn1 = 1.6\n",
+ "p2_by_p1 = 2.82 # p2/p1\n",
+ "\n",
+ "Cd = 4/(gamma*M1*M1)*(p2_by_p1 - 1)*tan(theta*pi/180)\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print \"Coefficient of drag is %.3f\"%(Cd)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "phi 29.50 degrees\n",
+ "Pressure behind reflected shock, p3 = 6.54 atm\n",
+ "Temperature behind reflected shock, T3 = 932.16 R\n",
+ "Mach behind reflected shock, M3 = 1.45 \n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 4.7.py\n",
+ "# Consider a horizontal supersonic flow at Mach 2.8 with a static pressure and\n",
+ "# temperature of 1 atm and 519 R, respectively. This flow passes over a compr-\n",
+ "# ession corner with deflection angle of 16 degrees. The oblique shock generated\n",
+ "# at the corner propagates into the flow, and is incident on a horizontal wall, \n",
+ "# as shown in Fig. 4.15. Calculate the angle phi made by the reflected shock wave\n",
+ "# with respect to the wall, and the Mach number, pressure and temperature behind\n",
+ "# the reflected shock.\n",
+ "\n",
+ "\n",
+ "# Variable declaration\n",
+ "M1 = 2.8 # upstream mach number\n",
+ "p1 = 1.0 # upstream pressure (in atm)\n",
+ "T1 = 519.0 # upstream temperature (in R)\n",
+ "theta = 16.0 # deflection (in degrees)\n",
+ "\n",
+ "# Calculations \n",
+ "# subscript 2 means behind the shock\n",
+ "\n",
+ "# from figure 4.5 from M1 = 2.8, theta = 16.0 deg.\n",
+ "beta_1 = 35.0 # shock angle (in degress)\n",
+ "\n",
+ "# degree to radian conversion is done by multiplying by pi/180\n",
+ "from numpy import sin, pi\n",
+ "Mn1 = M1 * sin(beta_1*pi/180) # upstream mach number normal to the shock\n",
+ "\n",
+ "# from Table A2 for Mn1 = 1.606\n",
+ "p2_by_p1 = 2.82 # p2/p1\n",
+ "T2_by_T1 = 1.388 # T2/T1\n",
+ "Mn2 = 0.6684 \n",
+ "\n",
+ "\n",
+ "p2 = p2_by_p1 * p1 # p2 (in atm) = p2/p1 * p1\n",
+ "T2 = T2_by_T1 * T1 # T2 (in R) = T2/T1 * T1\n",
+ "\n",
+ "M2 = Mn2/(sin((beta_1-theta)*pi/180)) # mach number behind the shock\n",
+ "\n",
+ "# from figure 4.5 from M2 = 2.053, theta = 16.0 deg.\n",
+ "beta_2 = 45.5 # shock angle of reflected(in degress)\n",
+ "\n",
+ "# degree to radian conversion is done by multiplying by pi/180\n",
+ "Mn2 = M2 * sin(beta_2*pi/180) # upstream mach number normal to the shock\n",
+ "\n",
+ "# from Table A2 for Mn1 = 1.46\n",
+ "p3_by_p2 = 2.32 # p3/p2\n",
+ "T3_by_T2 = 1.294 # T3/T2\n",
+ "Mn3 = 0.7157\n",
+ "\n",
+ "\n",
+ "p3 = p3_by_p2 * p2 # p3 (in atm) = p3/p2 * p2\n",
+ "T3 = T3_by_T2 * T2 # T3 (in R) = T3/T2 * T2\n",
+ "\n",
+ "phi = beta_2 - theta # (in degrees)\n",
+ "M3 = Mn3/(sin((beta_2-theta)*pi/180)) # mach number behind the reflected shock\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Result \n",
+ "print \"phi %.2f degrees\" %(phi)\n",
+ "print \"Pressure behind reflected shock, p3 = %.2f atm\" %(p3)\n",
+ "print \"Temperature behind reflected shock, T3 = %.2f R\" %(T3)\n",
+ "print \"Mach behind reflected shock, M3 = %.2f \" %(M3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "M2 = 2.207\n",
+ "p2 = 577.31 lb/ft^2\n",
+ "T2 = 337.89 deg R\n",
+ "po2 = 6240.70 lb/ft^2\n",
+ "To2 = 667.00 deg R\n",
+ "Angle forward = 41.81 degrees\n",
+ "Angle rearward = 6.95 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 4.8.py\n",
+ "# A uniform supersonic stream with M1 = 1.5, p1 = 1700 lb/ft^2, and T1 = 460.0 R\n",
+ "# encounters an expansion corner which deflects the stream by and angle theta_2\n",
+ "# = 20 degrees. Calculate M2, p2, T2, po2, To2, and the angles the forward and\n",
+ "# rearward Mach lines make with respect to the upstream flow direction.\n",
+ "\n",
+ "\n",
+ "# Variable declaration\n",
+ "M1 = 1.5 # upstream mach number\n",
+ "p1 = 1700.0 # upstream pressure (in lb/ft^2)\n",
+ "T1 = 460.0 # upstream temperature (in R)\n",
+ "theta_2 = 20.0 # deflection (in degrees)\n",
+ "\n",
+ "\n",
+ "# Calculations \n",
+ "# subscript 2 means after the expansion fan\n",
+ "\n",
+ "# from Table A5 for M1 = 1.5\n",
+ "v1 = 11.91 # (in degrees)\n",
+ "mu1 = 41.81 # (in degrees)\n",
+ "\n",
+ "v2 = v1 + theta_2\n",
+ "\n",
+ "# from Table A5, for v2 = 31.91\n",
+ "M2 = 2.207 # Mach behind the expansion fan\n",
+ "mu2 = 26.95 # (in degrees)\n",
+ "\n",
+ "# from Table A1 for M1 = 1.5\n",
+ "po1_by_p1 = 3.671 # po1/p1\n",
+ "To1_by_T1 = 1.45 # To1/T1\n",
+ "\n",
+ "# from Table A1 for M2 = 2.207\n",
+ "po2_by_p2 = 10.81 # po2/p2\n",
+ "To2_by_T2 = 1.974 # To2/T2\n",
+ "\n",
+ "p2 = 1/po2_by_p2 * po1_by_p1 * p1 # p2 (in lb/ft^2) = p2/po2 * po2/po1 * po1/p1 * p1 and po2 = po1\n",
+ "T2 = 1/To2_by_T2 * To1_by_T1 * T1 # T2 (in R) = T2/To2 * To2/To1 * To1/T1 * T1 and To2 = To1\n",
+ "\n",
+ "po2 = po1 = po1_by_p1 * p1 # po2 (in lb/ft^2) = po1/p1 * p1\n",
+ "To2 = To1 = To1_by_T1 * T1 # To2 (in R) = To1/T1 * T1\n",
+ "\n",
+ "angle_forward = mu1 # angle of forward ray (in degrees)\n",
+ "angle_rearward = mu2 - theta_2 # angle of backward ray (in degrees)\n",
+ "\n",
+ "\n",
+ "# Result \n",
+ "print \"M2 = %.3f\" %(M2)\n",
+ "print \"p2 = %.2f lb/ft^2\" %(p2)\n",
+ "print \"T2 = %.2f deg R\" %(T2)\n",
+ "print \"po2 = %.2f lb/ft^2\" %(po2)\n",
+ "print \"To2 = %.2f deg R\" %(To2)\n",
+ "print \"Angle forward = %.2f degrees\" %(angle_forward)\n",
+ "print \"Angle rearward = %.2f degrees\" %(angle_rearward)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Freestream mach number is 3.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 4.9.py\n",
+ "# Consider the arrangement shows in fig. 4.29. A 15 degree half angle diamond \n",
+ "# wedge airfoil is in supersonic flow at zero angle of attack. A pitot tube is\n",
+ "# inserted into the flow at the location shown in fig 4.29. The pressure measured\n",
+ "# by the Pitot tube is 2.596 atm. At point a on the backface, the pressure is 0.1\n",
+ "# atm. Calculate the freestream Mach number M1.\n",
+ "\n",
+ "from numpy import sin, pi\n",
+ "\n",
+ "# Variable declaration\n",
+ "theta = 15.0 # wedge angle/deflection (in degrees)\n",
+ "po4 = 2.596 # measured pressure (in atm)\n",
+ "p3 = 0.1 # pressure at point a (in atm)\n",
+ "\n",
+ "# Calculations \n",
+ "\n",
+ "po4_by_p3 = po4/p3\n",
+ "\n",
+ "# from Table A 2 for po4/p3 = 25.96\n",
+ "M3 = 4.45\n",
+ "v3 = 71.27\n",
+ "v2 = v3 - 2*theta\n",
+ "\n",
+ "# from Table A 5, for v2 = 41.27 degrees\n",
+ "M2 = 2.6\n",
+ "# Mn2 = M2*sin((beta-theta)*pi/180) @equation 1\n",
+ "\n",
+ "# Guessing\n",
+ "\n",
+ "# Guess 1\n",
+ "M1 = 4.0 # Guess for freestream number\n",
+ "beta = 27.0 # from fig 4.5 (in degrees)\n",
+ "Mn1 = M1*sin(beta*pi/180) # mach number normal to shock\n",
+ "\n",
+ "# from Table A2 for Mn1 = 1.816\n",
+ "Mn2 = 0.612 \n",
+ "# but Mn2 from equation 1 is 0.54\n",
+ "\n",
+ "# Guess 2\n",
+ "M1 = 4.5 # Guess for freestream number\n",
+ "beta = 25.5 # from fig 4.5 (in degrees)\n",
+ "Mn1 = M1*sin(beta*pi/180) # mach number normal to shock\n",
+ "\n",
+ "# from Table A2 for Mn1 = 1.937\n",
+ "Mn2 = 0.588 \n",
+ "# but Mn2 from equation 1 is 0.47\n",
+ "\n",
+ "# Guess 3\n",
+ "M1 = 3.5 # Guess for freestream number\n",
+ "beta = 29.2 # from fig 4.5 (in degrees)\n",
+ "Mn1 = M1*sin(beta*pi/180) # mach number normal to shock\n",
+ "\n",
+ "# from Table A2 for Mn1 = 1.71\n",
+ "Mn2 = 0.638 \n",
+ "# but Mn2 from equation 1 is 0.638\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "# Result \n",
+ "print \"Freestream mach number is %.1f\" %(M1)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Lift coefficient : 0.152\n",
+ "Drag coefficient : 0.0133\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 4.10.py\n",
+ "# Consider an infinitely this flat plate at 5 degrees angle of attack in a Mach\n",
+ "# 2.6 free stream. Calculate the lift and drag coefficients. \n",
+ "\n",
+ "from numpy import sin, cos, pi\n",
+ "\n",
+ "# Variable declaration\n",
+ "alpha = 5.0 # angle of attack in degrees (in degrees)\n",
+ "M1 = 2.6 # freestream mach number \n",
+ "gamma = 1.4 # ratio of specific heats\n",
+ "\n",
+ "# Calculations \n",
+ "\n",
+ "# from table A5 for M1 = 2.6\n",
+ "v1 = 41.41 # (in degrees)\n",
+ "v2 = v1 + alpha # (in degrees)\n",
+ "# from table A5 for v2 = 46.41 deg\n",
+ "M2 = 2.85\n",
+ "# from A1 for M1 = 2.6\n",
+ "po1_by_p1 = 19.95\n",
+ "# from A1 for M2 = 2.85\n",
+ "po2_by_p2 = 29.29\n",
+ "\n",
+ "p2_by_p1 = 1/po2_by_p2 * po1_by_p1 # p2/p1 = p2/po2 * po2/po1 * po1/p1 and po2 = po1\n",
+ "\n",
+ "# from theta-beta-M diagram for M1 = 2.6\n",
+ "theta = 5.0 # deflection (in degrees)\n",
+ "beta = 26.5 # shock angle (in degrees)\n",
+ "Mn1 = M1*sin(beta*pi/180) # mach number normal to the shock\n",
+ "\n",
+ "# from table A2 for Mn1 = 1.16\n",
+ "p3_by_p1 = 1.403 # p3/p1\n",
+ "\n",
+ "cl = 2.0/(gamma*M1*M1)*(p3_by_p1 - p2_by_p1)*cos(alpha*pi/180) # coefficient of lift\n",
+ "cd = 2.0/(gamma*M1*M1)*(p3_by_p1 - p2_by_p1)*sin(alpha*pi/180) # coefficient of drag\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print \"Lift coefficient : %.3f\"%(cl)\n",
+ "print \"Drag coefficient : %.4f\"%(cd)\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/5._Quasi-One-Dimensional_Flow.ipynb b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/5._Quasi-One-Dimensional_Flow.ipynb
new file mode 100644
index 00000000..67838527
--- /dev/null
+++ b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/5._Quasi-One-Dimensional_Flow.ipynb
@@ -0,0 +1,444 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Quasi-One-Dimensional Flow"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Converging section\n",
+ "M = 0.097\n",
+ "p = 9.94 atm\n",
+ "T = 299.4 K\n",
+ "u = 33.64 m/s\n",
+ "Divering section\n",
+ "M = 3.368\n",
+ "p = 0.1584 atm\n",
+ "T = 91.77 K\n",
+ "u = 646.74 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 5.1.py\n",
+ "# Consider the subsonic-supersonic flow through a convergent-divergent nozzle. The\n",
+ "# reservoir pressure and temperature are 10 atm and 300 K, repectively. There are \n",
+ "# two locations in the nozzle where A/Astar = 6, one in the convergent section and\n",
+ "# the other in the divergent section. At each location calculate M, p, T, u.\n",
+ "\n",
+ "# Variable declaration\n",
+ "po = 10.0 # reservoir pressure (in atm)\n",
+ "To = 300.0 # reservoir temperature (in K)\n",
+ "A_by_Astar = 6.0 # area ratio\n",
+ "gamma = 1.4 # ratio of specific heat\n",
+ "R = 287.0 # gas constant (in J/ Kg K)\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# from table A1 for subsonic flow with A/Astar = 6.0\n",
+ "Msub = 0.097 # mach number in converging section\n",
+ "po_by_p = 1.006 # po/p in converging section\n",
+ "To_by_T = 1.002 # To/T in converging section\n",
+ "\n",
+ "psub = 1 / po_by_p * po # pressure (in atm) in converging section\n",
+ "Tsub = 1 / To_by_T * To # temperature (in K) in converging section\n",
+ "asub = pow(gamma*R*Tsub, 0.5) # speed of sound (in m/s) in converging section\n",
+ "usub = Msub*asub # velocity (in m/s) in converging section\n",
+ "\n",
+ "# from table A1 for supersonic flow with A/Astar = 6.0\n",
+ "Msup = 3.368 # mach number in diverging section\n",
+ "po_by_p = 63.13 # po/p in diverging section\n",
+ "To_by_T = 3.269 # To/T in diverging section\n",
+ "\n",
+ "psup = 1 / po_by_p * po # pressure (in atm) in diverging section\n",
+ "Tsup = 1 / To_by_T * To # temperature (in K) in diverging section\n",
+ "asup = pow(gamma*R*Tsup, 0.5) # speed of sound (in m/s) in diverging section\n",
+ "usup = Msup*asup # velocity (in m/s) in diverging section\n",
+ "\n",
+ "\n",
+ "# Results\n",
+ "print \"Converging section\"\n",
+ "print \"M = %.3f\" %(Msub)\n",
+ "print \"p = %.2f atm\" %(psub)\n",
+ "print \"T = %.1f K\" %(Tsub)\n",
+ "print \"u = %.2f m/s\" %(usub)\n",
+ "\n",
+ "print \"Divering section\"\n",
+ "print \"M = %.3f\" %(Msup)\n",
+ "print \"p = %.4f atm\" %(psup)\n",
+ "print \"T = %.2f K\" %(Tsup)\n",
+ "print \"u = %.2f m/s\" %(usup)\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Area ratio required 2.637\n",
+ "Reservoir pressure required 17.09 atm\n",
+ "Reservoir temperature required 648.0 K\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 5.2.py\n",
+ "# A supersonic wind tunnel is designed to produce Mach 2.5 flow in the test section\n",
+ "# with standard sea level conditions. Calculate the exit area ratio and reservoir\n",
+ "# conditions necessary to achieve these design conditions.\n",
+ "\n",
+ "# Variable declaration\n",
+ "Me = 2.5 # exit mach number\n",
+ "pe = 1.0 # sea level pressure (in atm)\n",
+ "Te = 288.0 # sea level temperature (in K) \n",
+ "# Calculations\n",
+ "\n",
+ "# from table A1 for Me = 2.5\n",
+ "Ae_by_Astar = 2.637 # Ae/Astar\n",
+ "po_by_pe = 17.09 # po/p \n",
+ "To_by_Te = 2.25 # To/T \n",
+ "\n",
+ "po = po_by_pe * pe # reservoir pressure (in atm)\n",
+ "To = To_by_Te * Te # reservoir temperature (in K)\n",
+ "\n",
+ "# Results\n",
+ "print \"Area ratio required %.3f\" %(Ae_by_Astar)\n",
+ "print \"Reservoir pressure required %.2f atm\" %(po)\n",
+ "print \"Reservoir temperature required %.1f K\" %(To)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Exit mach number 5.21\n",
+ "Exit velocity 3925.91 m/s\n",
+ "Mass flow rate 485.27 Kg/s\n",
+ "Area of the exit 48.41 m^2\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 5.3.py\n",
+ "# Consider a rocket engine burning hydrogen and oxygen; combustion chamber temper-\n",
+ "# ature and pressure are 3571 K and 25 atm, respectively. The molecular weight of\n",
+ "# the chemically reacting gas in the combustion chamber is 16.0 and gamma = 1.22.\n",
+ "# The pressure at the exit of the convergent-divergent rocket nozzle is 1.174*10^-2\n",
+ "# atm. The area of the throat is 0.4 m^2. Assuming a calorifically perfect gas, \n",
+ "# calculate (a) the exit mach number (b) the exit velocity (c) the mass through the\n",
+ "# nozzle and (d) the area of the exit.\n",
+ "\n",
+ "# Variable declaration\n",
+ "po = 25.0 # combustion chamber pressure (in atm)\n",
+ "To = 3571.0 # combustion chamber temperature (in K)\n",
+ "pe = 1.174e-2 # pressure at the exit of the nozzle (in atm)\n",
+ "Astar = 0.4 # throat area (in m^2)\n",
+ "gamma = 1.22 # ratio of specific heats\n",
+ "mol_wt = 16.0 # molecular weight (in gms)\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# part (a)\n",
+ "Me = pow(2/(gamma-1) *(pow(po/pe,(gamma-1)/gamma) - 1), 0.5) # Exit mach number\n",
+ "\n",
+ "# part (b)\n",
+ "Te_by_To = pow(pe/po, (gamma-1)/gamma) # Te/To\n",
+ "Te = Te_by_To * To # exit temperature (in K)\n",
+ "\n",
+ "R = 8314.0/mol_wt # gas constant (in J/Kg K)\n",
+ "ae = pow(gamma*R*Te, 0.5) # speed of sound at exit (in m/s)\n",
+ "ve = Me * ae # velocity at exit (in m/s)\n",
+ "\n",
+ "# part (c)\n",
+ "rhoo = po*101325/R/To # density at reservoir (in Kg/m^3) \n",
+ "rhostar_by_rhoo = pow(2.0/(gamma+1),1/(gamma-1)) # rhostar/rhoo\n",
+ "rhostar = rhostar_by_rhoo * rhoo # rhostar, throat density (in Kg/m^3)\n",
+ "\n",
+ "Tstar_by_To = 2.0/(gamma+1) # Tstar/To\n",
+ "Tstar = Tstar_by_To * To # Tstar, throat temperature (in K)\n",
+ "astar = pow(gamma*R*Tstar, 0.5) # speed of sound at throat (in m/s)\n",
+ "mass = rhostar*Astar*astar # mass flow rate at throat (in Kg/s)\n",
+ "\n",
+ "# part (d)\n",
+ "rhoe = pe*101325/R/Te # density at exit (in Kg/m^3) \n",
+ "Ae = mass/rhoe/ve # exit area (in m^2)\n",
+ "\n",
+ "# Results \n",
+ "\n",
+ "print \"Exit mach number %.2f\" %(Me)\n",
+ "print \"Exit velocity %.2f m/s\" %(ve)\n",
+ "print \"Mass flow rate %.2f Kg/s\" %(mass)\n",
+ "print \"Area of the exit %.2f m^2\" %(Ae)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mach number at exit 0.28\n",
+ "Mach number at throat 0.72\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 5.4.py\n",
+ "# Consider the flow through a convergent-divergent duct with an exit to throat area\n",
+ "# ratio of 2. The reservoir pressure is 1 atm, and the exit pressure is 0.95 atm.\n",
+ "# Calculate the mach numbers at the throat and at the exit.\n",
+ "\n",
+ "# Variable declaration\n",
+ "po = 1.0 # reservoir pressure (in atm)\n",
+ "pe = 0.95 # pressure at the exit (in atm)\n",
+ "Ae_by_At = 2.0 # ratio of exit to throat area\n",
+ "\n",
+ "# Calculations\n",
+ "# from table A1 for po/pe = 1.053\n",
+ "Me = 0.28 # mach number at exit\n",
+ "Ae_by_Astar = 2.17 # nearest entry\n",
+ "\n",
+ "At_by_Astar = 1 / Ae_by_At * Ae_by_Astar # At/Astar = At/Ae * Ae/Astar\n",
+ "\n",
+ "# from table A1 for At/A* = 1.085\n",
+ "Mt = 0.72 # mach number at throat\n",
+ "\n",
+ "\n",
+ "# Results \n",
+ "print \"Mach number at exit %.2f\" %(Me)\n",
+ "print \"Mach number at throat %.2f\" %(Mt)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Exit to reservoir required pressure ratio is 0.9\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 5.5.py\n",
+ "# Consider a convergent divergent duct with an exit to throat area ratio of 1.6. \n",
+ "# Calculate the exit to reservoir pressure ratio required to achieve sonic flow\n",
+ "# at the throat, but subsonic flow everywhere else.\n",
+ "\n",
+ "# Variable declaration\n",
+ "Ae_by_At = 1.6 # ratio of exit to throat area\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# since M = 1 at the throat Mt = Astar\n",
+ "# Ae/At = Ae/Astar = 1.6\n",
+ "\n",
+ "# from table A1 for Ae/Astar = 1.6\n",
+ "po_by_pe = 1.1117 # po/pe\n",
+ "pe_by_po = 1/po_by_pe # pe/po\n",
+ "\n",
+ "\n",
+ "# Results \n",
+ "print \"Exit to reservoir required pressure ratio is %.1f\" %(pe_by_po)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Exit to reservoir pressure ratio is 0.585\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 5.6.py\n",
+ "# Consider a convergent divergent nozzle with an exit to throat area ratio of 3.\n",
+ "# A normal shock wave is inside the divergent portion at a location where the local\n",
+ "# area ratio is A/At = 2.0. Calculate the exit to reservoir pressure ratio.\n",
+ "\n",
+ "# Variable declaration\n",
+ "Ae_by_At = 3.0 # ratio of exit to throat area\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# from table A1 for A/At = 2.0\n",
+ "M1 = 2.2 # mach number in front the shock\n",
+ "\n",
+ "# from table A2 for M1 = 2.2\n",
+ "M2 = 0.5471 # mach number behind the shock\n",
+ "po2_by_po1 = 0.6281 # stagnation pressure ratio accross the shock\n",
+ "\n",
+ "# from table A1 for M2 = 0.5471\n",
+ "A2_by_A2star = 1.27 # A2/A2star\n",
+ "At_by_A2 = 1/2.0 # At/A2\n",
+ "Ae_by_A2star = Ae_by_At * At_by_A2 * A2_by_A2star #Ae/A2star = Ae/At * At/A2 * A2/A2star\n",
+ "\n",
+ "# from table A1 for Ae/A2star = 1.905\n",
+ "Me = 0.32 # exit mach number\n",
+ "poe_by_pe = 1.074 # poe/pe\n",
+ "\n",
+ "# po = po1 and poe = po2\n",
+ "pe_by_po = 1 / poe_by_pe * po2_by_po1 # pe/po = pe/poe * poe/po2 * po2/po1 * po1/po\n",
+ "\n",
+ "# Results \n",
+ "print \"Exit to reservoir pressure ratio is %.3f\" %(pe_by_po)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ratio of diffuser throat area to nozzle throat area 2.00\n",
+ "Ratio of total pressure at the diffuser exit to the reservoir pressure, 0.599\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Example 5.7.py\n",
+ "# Consider the wind tunnel described in example 5.2. Estimate the ratio of diffuser\n",
+ "# throat area to nozzle throat area required to allow the tunnel to start. Also, \n",
+ "# assuming that the diffuser efficiency is 1.2 after the tunnel has started, calculate\n",
+ "# the pressure ratio across the tunnel necessary for running i.e. calculate the ratio\n",
+ "# of total pressure at the diffuser exit to the reservoir pressure.\n",
+ "\n",
+ "# Variable declaration\n",
+ "\n",
+ "M = 2.5 # mach number before the shock\n",
+ "eta_d = 1.2 # diffuser efficiency\n",
+ "\n",
+ "# Calculations\n",
+ "\n",
+ "# from table for M = 2.5\n",
+ "po2_by_po1 = 0.499 # po2/po1\n",
+ "At2_by_At1 = 1 / po2_by_po1 # At2/At1 = po1/po2\n",
+ " \n",
+ "Pdo_by_po = eta_d * po2_by_po1 # pdo/po\n",
+ "\n",
+ "# Results\n",
+ "print \"Ratio of diffuser throat area to nozzle throat area %.2f\" %(At2_by_At1)\n",
+ "print \"Ratio of total pressure at the diffuser exit to the reservoir pressure, %.3f\"%(Pdo_by_po)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/README.txt b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/README.txt
new file mode 100644
index 00000000..4ea5dfa6
--- /dev/null
+++ b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Anand Pratap Singh
+Course: be
+College/Institute/Organization: IITB
+Department/Designation: Aerospace Engineering
+Book Title: Modern Compressible Flow with historical perspective
+Author: John D Anderson
+Publisher: McGraw-Hill Education; 3 edition (1 August 2002)
+Year of publication: 2002
+Isbn: 978-0072424430
+Edition: 2 \ No newline at end of file
diff --git a/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/screenshots/1.png b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/screenshots/1.png
new file mode 100644
index 00000000..b5031629
--- /dev/null
+++ b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/screenshots/1.png
Binary files differ
diff --git a/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/screenshots/2.png b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/screenshots/2.png
new file mode 100644
index 00000000..a9e01cf4
--- /dev/null
+++ b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/screenshots/2.png
Binary files differ
diff --git a/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/screenshots/3.png b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/screenshots/3.png
new file mode 100644
index 00000000..dcc70f5e
--- /dev/null
+++ b/Modern_Compressible_Flow_with_historical_perspective_by_John_D_Anderson/screenshots/3.png
Binary files differ