summaryrefslogtreecommitdiff
path: root/Basic_Engineering_Thermodynamics
diff options
context:
space:
mode:
Diffstat (limited to 'Basic_Engineering_Thermodynamics')
-rwxr-xr-xBasic_Engineering_Thermodynamics/ch1.ipynb287
-rwxr-xr-xBasic_Engineering_Thermodynamics/ch10.ipynb665
-rwxr-xr-xBasic_Engineering_Thermodynamics/ch11.ipynb393
-rwxr-xr-xBasic_Engineering_Thermodynamics/ch12.ipynb763
-rwxr-xr-xBasic_Engineering_Thermodynamics/ch2.ipynb458
-rwxr-xr-xBasic_Engineering_Thermodynamics/ch3.ipynb253
-rwxr-xr-xBasic_Engineering_Thermodynamics/ch4.ipynb199
-rwxr-xr-xBasic_Engineering_Thermodynamics/ch5.ipynb476
-rwxr-xr-xBasic_Engineering_Thermodynamics/ch6.ipynb157
-rwxr-xr-xBasic_Engineering_Thermodynamics/ch7.ipynb204
-rwxr-xr-xBasic_Engineering_Thermodynamics/ch8.ipynb365
-rwxr-xr-xBasic_Engineering_Thermodynamics/ch9.ipynb867
-rwxr-xr-xBasic_Engineering_Thermodynamics/screenshots/3.pngbin0 -> 86118 bytes
-rwxr-xr-xBasic_Engineering_Thermodynamics/screenshots/6.pngbin0 -> 76856 bytes
-rwxr-xr-xBasic_Engineering_Thermodynamics/screenshots/PVDiagram9.pngbin0 -> 13597 bytes
15 files changed, 5087 insertions, 0 deletions
diff --git a/Basic_Engineering_Thermodynamics/ch1.ipynb b/Basic_Engineering_Thermodynamics/ch1.ipynb
new file mode 100755
index 00000000..db200142
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/ch1.ipynb
@@ -0,0 +1,287 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2e535cebdbf0df3d8142e86a92fc184d16f528ad1b16b72e6276221e73684820"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1 : Fundamental Concepts and Definitions"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1 Page No : 5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "distanceTravelled = 80. * 1000 \t\t\t#in meters\n",
+ "timeOfTravel = 2 * 3600. \t\t\t#in seconds\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "Velocity = distanceTravelled / timeOfTravel \t\t\t#in meter/second\n",
+ "print \"Velocity = %.1f m/s \"%(Velocity);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity = 11.1 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2 Page No : 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "mass = 120 \t\t\t#in kg\n",
+ "acceleration = 10 \t\t\t#in m/s**2\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "force = mass * acceleration * 0.001 \t\t\t#in kN\n",
+ "print \"Force = %.1f kN \"%(force);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force = 1.2 kN \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3 Page No : 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "mass = 60 \t\t\t#in kg\n",
+ "accelerationDueToGravity = 9.8 \t\t\t#in m/s**2\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "weight = mass * accelerationDueToGravity \t\t\t#in N\n",
+ "print \"Weight = %.0f N \"%(weight);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Weight = 588 N \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4 Page No : 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "Pg = 12E5 \t\t\t#in N/m**2 \t\t\t#inlet gauge pressure\n",
+ "Pvac = 75. / 1000 \t\t\t#in m Hg \t\t\t#exit gauge pressure\n",
+ "atmosphericPressure = 760. / 1000 \t\t\t#in m Hg \t\t\t#atmospheric pressure\n",
+ "density = 13.6 * 10**3 \t\t\t#kg/m**3 \t\t\t#density of mercury\n",
+ "g = 9.805 \t\t\t#in m/s**2 \t\t\t#acceleration due to gravity\n",
+ " \n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "Pvac = density*g*Pvac \t\t\t#Pvac in N/m**2 \n",
+ "atmosphericPressure = density*g*atmosphericPressure \t\t\t#atmospheric pressure in N/m**2\n",
+ "PabsInlet = atmosphericPressure + Pg \t\t\t#in N/m**2 \t\t\t#absolute inlet pressure\n",
+ "PabsExit = atmosphericPressure - Pvac \t\t\t#in N/m**2 \t\t\t#absolute exit pressure\n",
+ "print \"At the inlet, absolute pressure = %.3f kPa \"%(PabsInlet*.001);\n",
+ "print \"At the exit, absolute pressure = %.3f kPa \"%(PabsExit*.001);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At the inlet, absolute pressure = 1301.344 kPa \n",
+ "At the exit, absolute pressure = 91.343 kPa \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5 Page No : 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "mass = 50 * .001 \t\t\t#in kg\n",
+ "volume = 0.04 \t\t\t#in m**3\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "specificVolume = volume / mass \t\t\t#in m**3/kg\n",
+ "density = 1/specificVolume \t\t\t#in kg/m**3\n",
+ "print \"Specific density = %.2f m**3/kg \"%(specificVolume);\n",
+ "print \"Density = %.2f kg/m**3 \"%(density);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific density = 0.80 m**3/kg \n",
+ "Density = 1.25 kg/m**3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6 Page No : 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "temp = 100; \t\t\t#in degree Celsius\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "TEMP = temp + 273.15;\n",
+ "print \"Temperature in Kelvin = %.2f K\"%(TEMP);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature in Kelvin = 373.15 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7 Page No : 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "TEMP = 263.15; \t\t\t#in Kelvin\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "temp = TEMP - 273.15;\n",
+ "print \"Temperature in degree Celsius = %.2f degree C\"%(temp);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature in degree Celsius = -10.00 degree C\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Engineering_Thermodynamics/ch10.ipynb b/Basic_Engineering_Thermodynamics/ch10.ipynb
new file mode 100755
index 00000000..5d434dbb
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/ch10.ipynb
@@ -0,0 +1,665 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1a81913d8f306ac03dbac9653a74d59c865e73e675c11ff3c8d84de998d79d37"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10 : Properties of Pure Substance - Water"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.1 Page No : 333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "m = 1.5 \t\t\t#kg \t\t\t#mass of wet steam\n",
+ "mf = 0.08*m \t\t\t#kg \t\t\t#mass of liquid in wet steam\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "x = (m-mf)/m \t\t\t#dryness fraction of mixture\n",
+ "print \"Dryness fraction of mixture = %.2f\"%(x)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dryness fraction of mixture = 0.92\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.2 Page No : 333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "x = 0.85 \t\t\t#quality of steam\n",
+ "print \"The ratio of mass of saturated liquid to saturated steam = %.5f\"%((1-x)/x)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ratio of mass of saturated liquid to saturated steam = 0.17647\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.3 Page No : 350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "p1 = 200. \t\t\t#kPa \t\t\t#initial pressure\n",
+ "t1 = 100. \t\t\t#\u00b0C \t\t\t#initial temperature\n",
+ "ts = 120.23 \t\t\t#\u00b0C \t\t\t#saturated steam temperature\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#From steam table\n",
+ "v1 = 0.001044 \t\t\t#m**3/kg \t\t\t#volume per kilogram of water \n",
+ "h1 = 419 \t\t\t#kJ/kg \t\t\t#enthalpy per kilogram of water\n",
+ "s1 = 1.3068 \t\t\t#kJ/kg \t\t\t#entropy per kilogram of water\n",
+ "u1 = h1-p1*v1 \t\t\t#kJ/kg \t\t\t#internal energy per kilogram of water\n",
+ "print \"Volume per kilogram of water = %.6f m**3/kg\"%(v1)\n",
+ "print \"Enthalpy per kilogram of water = %.1f kJ/kg\"%(h1)\n",
+ "print \"Entropy per kilogram of water = %.4f kJ/kgK\"%(s1)\n",
+ "print \"Internal energy per kilogram of water = %.1f kJ/kg\"%(u1)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume per kilogram of water = 0.001044 m**3/kg\n",
+ "Enthalpy per kilogram of water = 419.0 kJ/kg\n",
+ "Entropy per kilogram of water = 1.3068 kJ/kgK\n",
+ "Internal energy per kilogram of water = 418.8 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.4 Page No : 350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "p1 = 500. \t\t\t#kPa \t\t\t#initial pressure\n",
+ "s1 = 1.3625 \t\t\t#initial entropy\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#Using Method 2:\n",
+ "Ts = 424.28 \t\t\t#K \t\t\t#temperature at 500kPa\n",
+ "sf = 1.8606 \t\t\t#kJ/kgK \t\t\t#entropy at 500kPa\n",
+ "Cwat = 4.189 \t\t\t#kJ/kgK \t\t\t#specific heat of water\n",
+ "T1 = round((math.exp((sf-s1)/Cwat)/Ts)**-1) \t\t\t#K\n",
+ "print \"Temperature = %.2f \u00b0C\"%(T1-273)\n",
+ "v1 = 0.001 \t\t\t#m**3/kg \t\t\t#volume per kg water\n",
+ "h1 = (640.21 - Cwat*(151.86-T1+273)) \t\t\t# kJ/kg \t\t\t#Enthalpy per kg water\n",
+ "u1 = h1 - p1*v1 \t\t\t#kJ/kg \t\t\t#internal energy per kg water\n",
+ "print \"Volume per kg water = %f m**3/kg\"%(v1)\n",
+ "print \"Enthalpy per kg water = %.1f kJ/kg\"%(h1)\n",
+ "print \"Internal energy per kg water = %.1f kJ/kg\"%(u1)\n",
+ "\n",
+ "# note : rounding off error. please check."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature = 104.00 \u00b0C\n",
+ "Volume per kg water = 0.001000 m**3/kg\n",
+ "Enthalpy per kg water = 439.7 kJ/kg\n",
+ "Internal energy per kg water = 439.2 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.5 Page No : 353"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "t = 50. \t\t\t#\u00b0C \t\t\t#temperature of water\n",
+ "h = 209.31 \t\t\t#kJ/kg\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#From saturated property table\n",
+ "p = 12.35 \t\t\t#kPa\n",
+ "v = 0.001012 \t\t\t#m**3/kg\n",
+ "u = h - p*v \t\t\t#kJ/kg\n",
+ "s = 0.7037 \t\t\t#kJ/kg\n",
+ "print \"Pressure = %.2f kPa\"%(p)\n",
+ "print \"Volume per kg water = %.6f m**3/kg\"%(v)\n",
+ "print \"Internal energy per kg water = %.1f kJ/kg\"%(u)\n",
+ "print \"Entropy per kg water = %.4f kJ/kgK\"%(s)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure = 12.35 kPa\n",
+ "Volume per kg water = 0.001012 m**3/kg\n",
+ "Internal energy per kg water = 209.3 kJ/kg\n",
+ "Entropy per kg water = 0.7037 kJ/kgK\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.6 Page No : 353"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "p = 12. \t\t\t#bar \t\t\t#pressure of steam leaving boiler\n",
+ "h = 2705. \t\t\t#kJ/kg \t\t\t#Enthalpy of steam\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#From pressure based saturated property table, at p = 12bar\n",
+ "hf = 798.64 \t\t\t#kJ/kg\n",
+ "hg = 2784.8 \t\t\t#kJ/kg\n",
+ "x = (h-hf)/(hg-hf) \t\t\t#Dryness fraction\n",
+ "v = (1-x)*0.001139 + (x)*0.1633 \t\t\t#m**3/kg\n",
+ "s = (1-x)*2.2165 + (x)*6.5233 \t\t\t#m**3/kgK\n",
+ "u = h - p*v*100 \t\t\t#kJ/kg\n",
+ "print \"Volume per kg water = %.4f m**3/kg\"%(v)\n",
+ "print \"Internal energy per kg water = %.0f kJ/kg\"%(u)\n",
+ "print \"Entropy per kg water = %.3f kJ/kgK\"%(s)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume per kg water = 0.1568 m**3/kg\n",
+ "Internal energy per kg water = 2517 kJ/kg\n",
+ "Entropy per kg water = 6.350 kJ/kgK\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.7 Page No : 354"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "p = 15 \t\t\t#bar\n",
+ "u = 2594.5 \t\t\t#kJ/kg\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#From saturated steam table based on pressure at p = 15 bar\n",
+ "hf = 844.87 \t\t\t#kJ/kg\n",
+ "hg = 2792.1 \t\t\t#kJ/kg\n",
+ "vf = 0.001154 \t\t\t#m**3/kg\n",
+ "vg = 0.13177 \t\t\t#m**3/kg\n",
+ "uf = hf-100*p*vf \t\t\t#kJ/kg\n",
+ "ug = hg-100*p*vg \t\t\t#kJ/kg\n",
+ "\n",
+ "if u-ug<0.1 :\n",
+ " print \"Temperature = %.2f \u00b0C\"%(198.32)\n",
+ " print \"Volume per kg water = %.5f m**3/kg\"%(vg)\n",
+ " print \"Enthalpy per kg water = %.1f kJ/kg\"%(hg)\n",
+ " print \"Internal energy per kg water = %.1f kJ/kg\"%(ug)\n",
+ " print \"Entropy per kg water = %.4f kJ/kgK\"%(6.4448)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature = 198.32 \u00b0C\n",
+ "Volume per kg water = 0.13177 m**3/kg\n",
+ "Enthalpy per kg water = 2792.1 kJ/kg\n",
+ "Internal energy per kg water = 2594.4 kJ/kg\n",
+ "Entropy per kg water = 6.4448 kJ/kgK\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.8 Page No : 355"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p = 10e6 \t\t\t#Pa\n",
+ "t = 550. \t\t\t#\u00b0C\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#From superheated property table\n",
+ "v_500 = 0.03279 \t\t\t#m**3/kg\n",
+ "v_600 = 0.03837 \t\t\t#m**3/kg\n",
+ "v_550 = v_500 + (v_500-v_600)/(500-600)*(550-500) \t\t\t#m**3/kg\n",
+ "h_500 = 3373.6 \t\t\t#kJ/kg\n",
+ "h_600 = 3625.3 \t\t\t#kJ/kg\n",
+ "h_550 = h_500 + (h_500-h_600)/(500-600)*(550-500) \t\t\t#kJ/kg\n",
+ "s_500 = 6.5965 \t\t\t#kJ/kgK\n",
+ "s_600 = 6.9028 \t\t\t#kJ/kgK\n",
+ "s_550 = s_500 + (s_500-s_600)/(500-600)*(550-500) \t\t\t#kJ/kgK\n",
+ "print \"Volume per kg water = %.6f m**3/kg\"%(v_550)\n",
+ "print \"Enthalpy per kg water = %.1f kJ/kg\"%(h_550)\n",
+ "print \"Entropy per kg water = %.4f kJ/kgK\"%(s_550)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume per kg water = 0.035580 m**3/kg\n",
+ "Enthalpy per kg water = 3499.4 kJ/kg\n",
+ "Entropy per kg water = 6.7496 kJ/kgK\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.9 Page No : 355"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "t = 250. \t\t\t#\u00b0C \n",
+ "h = 2855.8 \t\t\t#kJ/kg\n",
+ "\n",
+ "#From superheated property table\n",
+ "p = 3e6 \t\t\t#Pa\n",
+ "v = 0.07058 \t\t\t#m**3/kg\n",
+ "s = 6.2871 \t\t\t#kJ/kgK\n",
+ "u = h - p*v*.001 \t\t\t#kJ/kg\n",
+ "print \"Pressure = %.1f MPa\"%(p*1e-6)\n",
+ "print \"Volume per kilogram of water = %.5f m**3/kg\"%(v)\n",
+ "print \"Enthalpy per kilogram of water = %.1f kJ/kg\"%(h)\n",
+ "print \"Entropy per kilogram of water = %.4f kJ/kgK\"%(s)\n",
+ "print \"Internal energy per kilogram of water = %.0f kJ/kg\"%(u)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure = 3.0 MPa\n",
+ "Volume per kilogram of water = 0.07058 m**3/kg\n",
+ "Enthalpy per kilogram of water = 2855.8 kJ/kg\n",
+ "Entropy per kilogram of water = 6.2871 kJ/kgK\n",
+ "Internal energy per kilogram of water = 2644 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.10 Page No : 359"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# variables\n",
+ "p = 2. \t\t\t#bar\n",
+ "m = 0.16 \t\t\t#kg\n",
+ "V = 0.1 \t\t\t#m**3\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#refereing to the saturation temperature corresponding to 2bar\n",
+ "v = V/m \t\t\t#m**3/kg\n",
+ "vf = 0.001061 \t\t\t#m**3/kg\n",
+ "vg = 0.8857 \t\t\t#m**3/kg\n",
+ "print 'Specific volume at saturated liquid phase vf) = %.6f m**3/kg '%(vf)\n",
+ "print 'Specific volume at saturated vapor phase vg) = %.6f m**3/kg '%(vg)\n",
+ " \n",
+ "if v<vg and v>vf :\n",
+ " print 'The temperature of the steam must be equal to saturation temperature corresponding to 2 bar'\n",
+ " print \"Temperature of steam = %.2f \u00b0C\"%(120.23)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific volume at saturated liquid phase vf) = 0.001061 m**3/kg \n",
+ "Specific volume at saturated vapor phase vg) = 0.885700 m**3/kg \n",
+ "The temperature of the steam must be equal to saturation temperature corresponding to 2 bar\n",
+ "Temperature of steam = 120.23 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.11 Page No : 360"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "p1 = 2. \t\t\t#bar\n",
+ "v1 = 0.624 \t\t\t#m**3/kg\n",
+ "t = 120.23 \t\t\t#\u00b0C\n",
+ "m = 0.16 \t\t\t#kg\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "vf = 0.001061 \t\t\t#m**3/kg\n",
+ "vg = 0.8857 \t\t\t#m**3/kg\n",
+ "x1 = (v1-vf)/(vg-vf) \t\t\t#Dryness fraction\n",
+ "hf = 504.68 \t\t\t#kJ/kg\n",
+ "hg = 2706.6 \t\t\t#kJ/kg\n",
+ "h1 = (1-x1)*hf + x1*hg \t\t\t#kJ/kg\n",
+ "u1 = h1 - p1*v1*100\t\t\t#kJ/kg\n",
+ "\n",
+ "v2 = v1 \t\t\t#m**3/kg\n",
+ "vf = 0.001044 \t\t\t#m**3/kg\n",
+ "vg = 1.673 \t\t\t#m**3/kg\n",
+ "x2 = (v1-vf)/(vg-vf) \t\t\t#Dryness fraction\n",
+ "hf = 419. \t\t\t#kJ/kg\n",
+ "hg = 2676. \t\t\t#kJ/kg\n",
+ "h2 = (1-x2)*hf + x2*hg \t\t\t#kJ/kg\n",
+ "p2 = 1.010325 \t\t\t#bar\n",
+ "u2 = h2 - (p2*100)*v2 \t\t\t#kJ/kg\n",
+ "print \"Heat rejected from steam = %.1f kJ\"%(m*(u2-u1))\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat rejected from steam = -117.4 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.12 Page No : 361"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "m =0.1 \t\t\t#kg\n",
+ "p1 = 10. \t\t\t#bar \n",
+ "p2 = 1. \t\t\t#bar\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#From saturated steam table\n",
+ "v1 = 0.1944 \t\t\t#m**3/kg\n",
+ "v2 = (p1/p2)**(1/1.3)*v1 \t\t\t#m**3/kg\n",
+ "W = m*(p1*v1-p2*v2)*100/(1.3-1) \t\t\t#kJ\n",
+ "print \"Work during expansion process = %.2f kJ\"%(W)\n",
+ "h1 = 2778.1 \t\t\t#kJ/kg\n",
+ "u1 = (h1 - p1*v1*100) \t\t\t#kJ/kg\n",
+ "\n",
+ "vf = 0.001043 \t\t\t#m**3/kg\n",
+ "vg = 1.694 \t\t\t#m**3/kg\n",
+ "x2 = (v2-vf)/(vg-vf) \t\t\t#Dryness fraction\n",
+ "hf = 417.33 \t\t\t#kJ/kg\n",
+ "hg = 2675.5 \t\t\t#kJ/kg\n",
+ "h2 = (1-x2)*hf + x2*hg \t\t\t#kJ/kg\n",
+ "u2 = h2 - p2*v2*100 \t\t\t#kJ/kg\n",
+ "print \"Heat rejected from steam = %.2f kJ\"%(W+m*(u2-u1))\n",
+ "\n",
+ "# note : rounding off error"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work during expansion process = 26.71 kJ\n",
+ "Heat rejected from steam = -49.07 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.13 Page No : 362"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Variables\n",
+ "p1 = 10. \t\t\t#bar\n",
+ "t1 = 300. \t\t\t#\u00b0C\n",
+ "V1 = 50. \t\t\t#m/s\n",
+ "p2 = 1. \t\t\t#bar\n",
+ "m = 1.2 \t\t\t#kg/s\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "\t\t\t#From superheated steam table\n",
+ "h1 = 3051.2 \t\t\t#kJ/kg\n",
+ "s1 = 7.1228 \t\t\t#kJ/kgK\n",
+ "p2 = 1 \t\t\t#bar\n",
+ "s2 = s1 \t\t\t#kJ/kgK\n",
+ "\n",
+ "sf = 1.3025 \t\t\t#kJ/kgK\n",
+ "sg = 7.3593 \t\t\t#kJ/kgK\n",
+ "x2 = (s2-sf)/(sg-sf) \t\t\t#Dryness fraction\n",
+ "hf = 417.44 \t\t\t#kJ/kg\n",
+ "hg = 2675.5 \t\t\t#kJ/kg\n",
+ "h2 = (1-x2)*hf + x2*hg \t\t\t#kJ/kg\n",
+ "vf = 0.001043 \t\t\t#m**3/kg\n",
+ "vg = 1.694 \t\t\t#m**3/kg\n",
+ "v2 = (1-x2)*vf + x2*vg \t\t\t#m**3/kg\n",
+ "V2 = (2*(1000*(h1-h2))+V1**2)**0.5 \t\t\t#m/s\n",
+ "A2 = m*v2/V2*10000\t\t\t#cm**3\n",
+ "print \"The exit area of the nozzle = %.1f cm**2\"%(A2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The exit area of the nozzle = 20.3 cm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.14 Page No : 363"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "m1 = 0.2 \t\t\t#kg/s\n",
+ "p = 4. \t\t\t#bar\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#From superheated steam table\n",
+ "h1 = 2752.8 \t\t\t#kJ/kg\n",
+ "h2 = 209.31 \t\t\t#kJ/kg\n",
+ "h3 = 604.73 \t\t\t#kJ/kg\n",
+ "\n",
+ "m2 = (m1*h1-m1*h3)/(h3-h2) \t\t\t#kg/s\n",
+ "print \"The flow rate of feed water into the heater = %.3f kg/s\"%(m2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The flow rate of feed water into the heater = 1.086 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Engineering_Thermodynamics/ch11.ipynb b/Basic_Engineering_Thermodynamics/ch11.ipynb
new file mode 100755
index 00000000..b9633767
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/ch11.ipynb
@@ -0,0 +1,393 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1a66a7b358047512cb72cb60b5347f9bd68c40105b1c8a4914776231ef293db4"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11 : Real Gas"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1 Page No : 394"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "P = 70.e5 \t\t\t#Pa\n",
+ "T = 150. + 273 \t\t\t#K\n",
+ "Z = 0.55 \t\t\t#Compressibility factor\n",
+ "R = 8314.3/44 \t\t\t#J/kgK\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#For propane\n",
+ "v = Z*R*T/P \t\t\t#m**3/kg\n",
+ "print \"Specific volume for propane = %.2e m**3/kg\"%(v)\n",
+ "\t\t\t#ideal gas\n",
+ "v = R*T/P \t\t\t#m**3/kg\n",
+ "print \"Specific volume for ideal gas = %2.3e m**3/kg\"%(v)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific volume for propane = 6.28e-03 m**3/kg\n",
+ "Specific volume for ideal gas = 1.142e-02 m**3/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2 Page No : 396"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "Z = 1.04 \t\t\t#Compressiblity factor\n",
+ "pc = 3.77e6 \t\t\t#Pa \t\t\t#crticial pressure\n",
+ "Tc = 132.5 \t\t\t#K\n",
+ "vc = 0.0883 \t\t\t#m**3/kmol\n",
+ "p = 10.e5 \t\t\t#Pa\n",
+ "T = 300. \t\t\t#K\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "R = 287. \t\t\t#J/kgK\n",
+ "pR = p/pc \t\t\t#reduced pressure\n",
+ "TR = T/Tc \t\t\t#reduced temperature\n",
+ "v = Z*R*T/p \t\t\t#m**3/kg\n",
+ "vR = v/vc \t\t\t#reduced volume\n",
+ "\n",
+ "print \"Reduced pressure = %.5f \"%(pR)\n",
+ "print \"Reduced temperature = %.5f \"%(TR)\n",
+ "print \"Reduced volume = %.3f \"%(vR)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reduced pressure = 0.26525 \n",
+ "Reduced temperature = 2.26415 \n",
+ "Reduced volume = 1.014 \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3 Page No : 397"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "pR = 0.26525 \t\t\t#reduced pressure\n",
+ "TR = 2.26415 \t\t\t#reduced temperature\n",
+ "pc = 22.09 \t\t\t#bar \t\t\t#critical pressure of water\n",
+ "Tc = 647.3 \t\t\t#K \t\t\t#critical temperature of water\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "p = pR*pc \t\t\t#bar\n",
+ "T = TR*Tc \t\t\t#K\n",
+ "print \"Temperature at which steam would beahve similar to air at 10 bar and 27\u00b0C = %.1f K\"%(T)\n",
+ "\n",
+ "print \"Pressure at which steam would beahve similar to air at 10 bar and 27\u00b0C = %.2f bar\"%(p)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature at which steam would beahve similar to air at 10 bar and 27\u00b0C = 1465.6 K\n",
+ "Pressure at which steam would beahve similar to air at 10 bar and 27\u00b0C = 5.86 bar\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.4 Page No : 399"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "pc = 3.77e6 \t\t\t#Pa \t\t\t#critical pressure\n",
+ "p = 5.65e6 \t\t\t#Pa\n",
+ "Tc = 132.5 \t\t\t#K \t\t\t#critical temperature\n",
+ "T = 300 \t\t\t#K\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "pR = p/pc \t\t\t#reduced pressure\n",
+ "TR = T/Tc \t\t\t#reduced temperature\n",
+ "\t\t\t#from generalized compressibilty chart\n",
+ "Z =0.97\n",
+ "print \"From the generalized compressiblity chart,\\\n",
+ " at reduced pressure of %.1f and reduced temperature of %.2f, Z = %.2f\"%(pR,TR,Z)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "From the generalized compressiblity chart, at reduced pressure of 1.5 and reduced temperature of 2.26, Z = 0.97\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.5 Page No : 299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "T =150.+273 \t\t\t#K\n",
+ "p = 7e6 \t\t\t#Pa\n",
+ "\n",
+ "#Part (i)\n",
+ "print \"Parti\"\n",
+ "v = (8314.3/44)*T/p \t\t\t#m**3/kg\n",
+ "print \"Specific volume for gaseous propane using ideal gas equation = %.4f m**3/kg\"%(v)\n",
+ "\n",
+ "#Part(ii)\n",
+ "print \"Partii\"\n",
+ "pc = 4.26e6 \t\t\t#Pa \t\t\t#critical pressure\n",
+ "Tc = 370. \t\t\t#K \t\t\t#critical temperature\n",
+ "\n",
+ "pR = p/pc \t\t\t#reduced pressure\n",
+ "TR = T/Tc \t\t\t#reduced temperature\n",
+ "Z = 0.56 \t\t\t#compressibility factor\n",
+ "print \"From the generalized compressiblity chart,\\\n",
+ " at reduced pressure of %.1f and reduced temperature of %.2f, Z = %.2f\"%(pR,TR,Z)\n",
+ "v = Z*v\n",
+ "print \"Specific volume for gaseous propane using generalized compressiblity chart = %.5f m**3/kg\"%(v)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parti\n",
+ "Specific volume for gaseous propane using ideal gas equation = 0.0114 m**3/kg\n",
+ "Partii\n",
+ "From the generalized compressiblity chart, at reduced pressure of 1.6 and reduced temperature of 1.14, Z = 0.56\n",
+ "Specific volume for gaseous propane using generalized compressiblity chart = 0.00639 m**3/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.6 Page No : 404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "m = 5.\t\t\t#kg \t\t\t#mass of CO2\n",
+ "T = 300. \t\t\t#K\n",
+ "R = 8314.3/44 \t\t\t#J/kgK\n",
+ "V = 1.5 \t\t\t#m**3\n",
+ "\n",
+ "#Part(i)\n",
+ "print \"Parti\"\n",
+ "p = m*R*T/V\n",
+ "print \"Pressure exerted by CO2using ideal gas equation) = %.2f kPa\"%(p*.001)\n",
+ "\n",
+ "#Part(ii)\n",
+ "print \"Partii\"\n",
+ "R = 8.3143 \t\t\t#J/kmolK\n",
+ "a = 0.3658e3 \t\t\t#kPam**6/kmol**2\n",
+ "b = 0.0428 \t\t\t#m**3.kmol\n",
+ "v = 44*V/m \t\t\t#m**3/kmol\n",
+ "p = T*R/(v-b) - a/v**2\n",
+ "print \"Pressure exerted by CO2using van der Waals equation) = %.1f kPa\"%(p)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parti\n",
+ "Pressure exerted by CO2using ideal gas equation) = 188.96 kPa\n",
+ "Partii\n",
+ "Pressure exerted by CO2using van der Waals equation) = 187.5 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.7 Page No : 406"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "M = 28. \t\t\t#g/mol\n",
+ "m = 3.5\t\t\t#kg\n",
+ "V = 0.015 \t\t\t#m**3\n",
+ "v = V/m \t\t\t#m**3/kg\n",
+ "T = 473. \t\t\t#K\n",
+ "R = 8314.3/M \t\t\t#J/kgK\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "\n",
+ "#Part(i)\n",
+ "print \"Parti\"\n",
+ "p = m*R*T/V \t\t\t#Pa\n",
+ "print \"Pressure using ideal gas equation of state) = %.2f MPa\"%(p*1e-6)\n",
+ "\n",
+ "#Part(ii)\n",
+ "print \"Partii\"\n",
+ "pc = 3.39e6 \t\t\t#Pa \t\t\t#critical pressure\n",
+ "Tc = 126.2 \t\t\t#K \t\t\t#critical temperature\n",
+ "vc = 0.0899 \t\t\t#m**3/kmol \t\t\t#critical volume\n",
+ "\n",
+ "TR = T/Tc \t\t\t#reduced temperature\n",
+ "vR = v/(R*Tc/pc) \t\t\t#reduced volume\n",
+ "Z = 1.1 \t\t\t#Compressibility factor\n",
+ "print \"From the generalized compressiblity chart, \\\n",
+ " at reduced volume of %.4f and reduced temperature of %.2f, Z = %.2f\"%(vR,TR,Z)\n",
+ "p = Z*R*T/v \t\t\t#Pa\n",
+ "print \"Pressure using generalised compressibility chart) = %.3f MPa\"%(p*1e-6)\n",
+ "\n",
+ "#Part(iii)\n",
+ "print \"Partiii\"\n",
+ "a = 0.1366e6 \t\t\t#Pam**5/kmol**2\n",
+ "b = 0.0386 \t\t\t#m**3/kmol\n",
+ "p = (8314.3*T/(v*M - b)) - a/(v*M)**2\n",
+ "print \"Pressure using van der Waals equation) = %.2f MPa\"%(p*1e-6)\n",
+ "\n",
+ "#Part(iv)\n",
+ "print \"Partiv\"\n",
+ "a = (0.427*(R*M)**2*Tc**2.5/pc)\n",
+ "b = 0.0866*(R*M*Tc/pc)\n",
+ "\n",
+ "p = (R*M*T/(v*M-b))-(a/(((v*M)**2 + v*M*b)*(T**0.5)))\n",
+ "print \"Pressure using Redlich-Kwong equation of state) = %.2f MPa\"%(p*1e-6)\n",
+ "\n",
+ "\n",
+ "#Part(v)\n",
+ "print \"Partv\"\n",
+ "A0 = 136.2315\n",
+ "a = 0.02617\n",
+ "B0 = 0.05046\n",
+ "b = -0.00691\n",
+ "c = 42000\n",
+ "\n",
+ "A = A0*(1 - a/(v*M))\n",
+ "B = B0*(1 - b/(v*M))\n",
+ "eps = c/(T**3 * v*M)\n",
+ "p = ((8314.3)*T*(1-eps)*(v*M+B))/(v*M)**2 - 1e3*A/(v*M)**2\n",
+ "print \"Pressure using ideal gas equation of state) = %.2f MPa\"%(p*1e-6)\n",
+ "\n",
+ "\t\t\t#---Note--- \t\t\t\n",
+ "# Calculations and Results to Part(iv) in the textbook is 40.58 MPa which is wrong. \n",
+ "# The correct solution (38.13 MPa) is computed here.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parti\n",
+ "Pressure using ideal gas equation of state) = 32.77 MPa\n",
+ "Partii\n",
+ "From the generalized compressiblity chart, at reduced volume of 0.3877 and reduced temperature of 3.75, Z = 1.10\n",
+ "Pressure using generalised compressibility chart) = 36.049 MPa\n",
+ "Partiii\n",
+ "Pressure using van der Waals equation) = 38.83 MPa\n",
+ "Partiv\n",
+ "Pressure using Redlich-Kwong equation of state) = 38.13 MPa\n",
+ "Partv\n",
+ "Pressure using ideal gas equation of state) = 39.79 MPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Engineering_Thermodynamics/ch12.ipynb b/Basic_Engineering_Thermodynamics/ch12.ipynb
new file mode 100755
index 00000000..896ca7c0
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/ch12.ipynb
@@ -0,0 +1,763 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:53a735279bd0b4b47d350239e84293c3d52753ef579aa2d9f892dff4596cafc6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12 : Fuels and Combustion"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.1 Page No : 412"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "xCO2 = 0.03 \t\t\t#mole fraction of CO2\n",
+ "xCO = 0.19 \t\t\t#mole fraction of CO\n",
+ "xH2 = 0.41 \t\t\t#mole fraction of H2\n",
+ "xCH4 = 0.25 \t\t\t#mole fraction of CH4\n",
+ "xC2H4 = 0.09 \t\t\t#mole fraction of C2H4\n",
+ "xN2 = 0.03 \t\t\t#mole fraction of N2\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#Part(a)\n",
+ "print \"Parta\";\n",
+ "M = xCO2*44 + xCO*28 + xH2*2 + xC2H4*28 +xCH4*16 + xN2*28 \t\t\t#kg/mol \t\t\t#average molar mass\n",
+ "yCO2 = xCO2*(44/M)\n",
+ "yCO = xCO*(28/M)\n",
+ "yH2 = xH2*(2/M)\n",
+ "yCH4 = xCH4*(16/M)\n",
+ "yC2H4 = xC2H4*(28/M)\n",
+ "yN2 = xN2*(28/M)\n",
+ "print \"yCO2 = %.1f%%\"%(yCO2*100)\n",
+ "print \"yCO = %.1f%%\"%(yCO*100)\n",
+ "print \"yH2 = %.1f%%\"%(yH2*100)\n",
+ "print \"yCH4 = %.0f%%\"%(yCH4*100)\n",
+ "print \"yC2H4 = %.1f%%\"%(yC2H4*100)\n",
+ "print \"yN2 = %.1f%%\"%(yN2*100)\n",
+ "\n",
+ "#Part(b)\n",
+ "print \"Partb\";\n",
+ "nC = xCO2 + xCO + xCH4 + xC2H4*2 \t\t\t#number of moles of C\n",
+ "nH2 = xH2 + xCH4*2 + xC2H4*2 \t\t\t#number of moles of H2\n",
+ "nO2 = xCO2 + 0.5*xCO \t\t\t#number of moles of O2\n",
+ "nN2 = xN2 \t\t\t#number of moles of N2\n",
+ "\n",
+ "mC = nC*12/M\n",
+ "mH2 = nH2*2/M\n",
+ "mO2 = nO2*32/M\n",
+ "mN2 = nN2*28/M\n",
+ "print \"mC = %.1f%%\"%(mC*100)\n",
+ "print \"mH2 = %.1f%%\"%(mH2*100)\n",
+ "print \"mO2 = %.0f%%\"%(mO2*100)\n",
+ "print \"mN2 = %.1f%%\"%(mN2*100)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parta\n",
+ "yCO2 = 8.9%\n",
+ "yCO = 35.9%\n",
+ "yH2 = 5.5%\n",
+ "yCH4 = 27%\n",
+ "yC2H4 = 17.0%\n",
+ "yN2 = 5.7%\n",
+ "Partb\n",
+ "mC = 52.6%\n",
+ "mH2 = 14.7%\n",
+ "mO2 = 27%\n",
+ "mN2 = 5.7%\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.2 Page No : 416"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "#Molar masses of O2,H2,N2,C and S respectively\n",
+ "MO2 = 32. \t\t\t#g/mol\n",
+ "MH2 = 2. \t\t\t#g/mol\n",
+ "MN2 = 28. \t\t\t#g/mol\n",
+ "MC = 12. \t\t\t#g/mol\n",
+ "MS = 32. \t\t\t#g/mol\n",
+ "#Part(a)\n",
+ "print \"Parta\"\n",
+ "print \"Stoichiometric airCarbon) = %.2f kg/kg carbon\"%((MO2 + 3.76*MN2)/MC)\n",
+ "#Part(b)\n",
+ "print \"Partb\"\n",
+ "print \"Stoichiometric airHydrogen) = %.1f kg/kg hydrogen\"%(0.5*(MO2 + 3.76*MN2)/MH2)\n",
+ "#Part(c)\n",
+ "print \"Partc\"\n",
+ "print \"Stoichiometric airSulphur) = %.1f kg/kg sulphur\"%((MO2 + 3.76*MN2)/MS)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parta\n",
+ "Stoichiometric airCarbon) = 11.44 kg/kg carbon\n",
+ "Partb\n",
+ "Stoichiometric airHydrogen) = 34.3 kg/kg hydrogen\n",
+ "Partc\n",
+ "Stoichiometric airSulphur) = 4.3 kg/kg sulphur\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.3 Page No : 417"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "xC3H8 = 0.2 \t\t\t#mole fraction of propane\n",
+ "xC4H10 = 0.8 \t\t\t#mole fraction of bumath.tane\n",
+ "#Molar masses of O2,H2,N2 & C respectively\n",
+ "MO2 = 32. \t\t\t#g/mol\n",
+ "MH2 = 2. \t\t\t#g/mol\n",
+ "MN2 = 28. \t\t\t#g/mol\n",
+ "MC = 12. \t\t\t#g/mol\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#C balance\n",
+ "b = xC3H8*3+xC4H10*4\n",
+ "#H2 balance\n",
+ "d = xC3H8*4 + xC4H10*5\n",
+ "#O2 balance\n",
+ "a = b + d/2\n",
+ "#N2 balance\n",
+ "c = 3.76*a\n",
+ "\n",
+ "Stoichiometric_air = a*(MO2 + 3.76*MN2)/(xC3H8*(MC+MO2)+xC4H10*(MC*4+MH2*5))\n",
+ "print \"Stoichiometric air = %.2f kg/kg cooking gas\"%(Stoichiometric_air)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stoichiometric air = 15.42 kg/kg cooking gas\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.4 Page No : 418"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "xC3H8 = 0.2 \t\t\t#mole fraction of propane\n",
+ "xC4H10 = 0.8 \t\t\t#mole fraction of bumath.tane\n",
+ "\n",
+ "xO2 = 0.21 \t\t\t#mole fraction of O2\n",
+ "xN2 = 0.79 \t\t\t#mole fraction of N2\n",
+ "#Molar masses of O2,H2,N2 & C respectively\n",
+ "MO2 = 32. \t\t\t#g/mol\n",
+ "MH2 = 2. \t\t\t#g/mol\n",
+ "MN2 = 28. \t\t\t#g/mol\n",
+ "MC = 12. \t\t\t#g/mol\n",
+ "Stoichiometric_air = 15.42 \t\t\t#kg/kg\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#C balance\n",
+ "b = xC3H8*3+xC4H10*4\n",
+ "#H2 balance\n",
+ "e = xC3H8*4 + xC4H10*5\n",
+ "#O2 balance\n",
+ "d = 40*xO2-b -0.5*e\n",
+ "#N2 balance\n",
+ "c = 40*xN2\n",
+ "\n",
+ "actual_air = 40*(xO2*MO2 + xN2*MN2)/(xC3H8*(MC*3+MH2*4)+xC4H10*(MC*4+MH2*5)) \t\t\t#kg/kg gas\n",
+ "\n",
+ "excess_air = (actual_air - Stoichiometric_air)/Stoichiometric_air*100\n",
+ "print \"Excess air = %.1f%%\"%(excess_air)\n",
+ "\n",
+ "theoritical_air = 100+excess_air\n",
+ "print \"Theoritical air = %.1f%%\"%(theoritical_air)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Excess air = 35.5%\n",
+ "Theoritical air = 135.5%\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.5 Page No : 420"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "nCO2 = 3.8 \t\t\t#Number of moles of CO2\n",
+ "nN2 = 31.6 \t\t\t#Number of moles of N2\n",
+ "nO2 = 2.2 \t\t\t#Number of moles of O2\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "n = nCO2 + nN2 + nO2\n",
+ "xCO2 = nCO2/n \t\t\t#mole fraction of CO2\n",
+ "xN2 = nN2/n \t\t\t#mole fraction of N2\n",
+ "xO2 = nO2/n \t\t\t#mole fraction of O2\n",
+ "\n",
+ "print \"xCO2 = %.1f %% \"%(xCO2*100)\n",
+ "print \"xN2 = %.1f %% \"%(xN2*100)\n",
+ "print \"xO2 = %.1f %% \"%(xO2*100)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "xCO2 = 10.1 % \n",
+ "xN2 = 84.0 % \n",
+ "xO2 = 5.9 % \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.6 Page No : 421"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "nCO2 = 3.8 \t\t\t#Number of moles of CO2\n",
+ "nN2 = 31.6 \t\t\t#Number of moles of N2\n",
+ "nO2 = 2.2 \t\t\t#Number of moles of O2\n",
+ "nH2O = 4.8 \t\t\t#Number of moles of H2O\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "n = nCO2 + nN2 + nO2 + nH2O\n",
+ "xCO2 = nCO2/n \t\t\t#mole fraction of CO2\n",
+ "xN2 = nN2/n \t\t\t#mole fraction of N2\n",
+ "xO2 = nO2/n \t\t\t#mole fraction of O2\n",
+ "xH2O = nH2O/n \t\t\t#mole fraction of H2O\n",
+ "\n",
+ "print \"Volume fraction of CO2 = %.1f%%\"%(xCO2*100)\n",
+ "print \"Volume fraction of N2 = %.1f%%\"%(xN2*100)\n",
+ "print \"Volume fraction of O2 = %.1f%%\"%(xO2*100)\n",
+ "print \"Volume fraction of H2O = %.1f%%\"%(xH2O*100)\n",
+ "\n",
+ "M = xCO2*44 + xN2*28 + xO2*32 + xH2O*18 \t\t\t#Mass of combustion product\n",
+ "\n",
+ "yCO2 = xCO2*(44/M)\n",
+ "yH2O = xH2O*(18/M)\n",
+ "yN2 = xN2*(28/M)\n",
+ "yO2 = xO2*(32/M)\n",
+ "\n",
+ "print \"Mass fraction of CO2 = %.1f%%\"%(yCO2*100)\n",
+ "print \"Mass fraction of N2 = %.1f%%\"%(yN2*100)\n",
+ "print \"Mass fraction of O2 = %.1f%%\"%(yO2*100)\n",
+ "print \"Mass fraction of H2O = %.1f%%\"%(yH2O*100)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume fraction of CO2 = 9.0%\n",
+ "Volume fraction of N2 = 74.5%\n",
+ "Volume fraction of O2 = 5.2%\n",
+ "Volume fraction of H2O = 11.3%\n",
+ "Mass fraction of CO2 = 13.8%\n",
+ "Mass fraction of N2 = 73.2%\n",
+ "Mass fraction of O2 = 5.8%\n",
+ "Mass fraction of H2O = 7.1%\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.7 Page No : 422"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Part(a)\n",
+ "print \"Parta\"\n",
+ "mC = 0.65 \t\t\t#kg \t\t\t#mass of C per kg coal\n",
+ "mA = 0.15 \t\t\t#kg \t\t\t#mass of Ash per kg coal\n",
+ "CR = 0.05 \t\t\t#kg \t\t\t#mass of carbon in solid refuse per kg coal\n",
+ "mR = 0.2 \t\t\t#kg \t\t\t#mass of refuse per kg coal\n",
+ "m = mC- CR \t\t\t#kg \t\t\t#mass of carbon burnt per kg coal\n",
+ "\n",
+ "#By C balance\n",
+ "x = (14 + 1)*(12/0.6) \t\t\t#kg \t\t\t#mass of burnt coal\n",
+ "#By H2 balance\n",
+ "b = x*(0.06/2)\n",
+ "#By O2 Balance\n",
+ "a = (14 + 0.5 + 3.5 + 4.5)-(x*0.1/32) \n",
+ "actual_air = a*(32+3.76*28)/x \t\t\t#kg/kg coal\n",
+ "print \"Actual air = %.3f kg/kg coal\"%(actual_air)\n",
+ "\n",
+ "#Part(b)\n",
+ "print \"Partb\"\n",
+ "Stoichiometric_air = (0.6*11.45+0.06*34.3)-(0.1/0.232) \t\t\t#kg\n",
+ "excess_air = (actual_air - Stoichiometric_air)/Stoichiometric_air*100 \n",
+ "print \"Excess air = %.1f%%\"%(excess_air)\n",
+ "\n",
+ "#Part(c)\n",
+ "print \"Partc\";\n",
+ "print \"Percentage theoritical air = %.1f%%\"%(100+excess_air)\n",
+ "\n",
+ "#Part(d)\n",
+ "print \"Partd\"\n",
+ "m = 14*44 + 1*28 +3.5*32 +81.5*28 +9*18 \t\t\t#kg \t\t\t#mass of combustion product\n",
+ "print \"Mass fraction of CO2 = %.2f%%\"%(14*44/m*100)\n",
+ "print \"Mass fraction of CO = %.3f%%\"%(1*28/m*100)\n",
+ "print \"Mass fraction of O2 = %.2f%%\"%(3.5*32/m*100)\n",
+ "print \"Mass fraction of N2 = %.2f%%\"%(81.5*28/m*100)\n",
+ "print \"Mass fraction of H2O = %.2f%%\"%(9*18/m*100)\n",
+ "\n",
+ "#Part(e)\n",
+ "print \"Parte\"\n",
+ "xH2O = 9/(14+1+3.5+81.5+9) \t\t\t#molfraction of H2O\n",
+ "pH2O = xH2O*1e5 \t\t\t#Pa \t\t\t#partial pressure\n",
+ "#From steam table\n",
+ "tdp = 42.5 \t\t\t#\u00b0C\n",
+ "print \"Dew point temperature = %.1f \u00b0C\"%(tdp)\n",
+ "\n",
+ "\n",
+ "# note : part b is calculated wrong in book. so answers might be different."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parta\n",
+ "Actual air = 9.867 kg/kg coal\n",
+ "Partb\n",
+ "Excess air = 16.1%\n",
+ "Partc\n",
+ "Percentage theoritical air = 116.1%\n",
+ "Partd\n",
+ "Mass fraction of CO2 = 19.25%\n",
+ "Mass fraction of CO = 0.875%\n",
+ "Mass fraction of O2 = 3.50%\n",
+ "Mass fraction of N2 = 71.31%\n",
+ "Mass fraction of H2O = 5.06%\n",
+ "Parte\n",
+ "Dew point temperature = 42.5 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.8 Page No : 425"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "xCO2 = 9.7 \t\t\t#mole percent CO2\n",
+ "xCO = 1.1 \t\t\t#mole percent CO\n",
+ "xO2 = 4 \t\t\t#mole percent O2\n",
+ "xN2 = 85.2 \t\t\t#mole percent N2\n",
+ "\n",
+ "\n",
+ "# Calculations and Results\n",
+ "#by C balance\n",
+ "b = 2\n",
+ "#by H2 balance\n",
+ "d = 2\n",
+ "#by O2 balance\n",
+ "a = b+d*.5\n",
+ "#by N2 balance\n",
+ "c = 3.76*a\n",
+ "\n",
+ "Stoichiometric_air = a*(32+3.76*28)/28 \t\t\t#kg/kg ethylene\n",
+ "\n",
+ "#by C balance\n",
+ "x = (xCO2+xCO)/2 \t\t\t#kmol of ehtylene be burnt\n",
+ "#by H2 balance\n",
+ "q = 2*x\n",
+ "#by O2 balance\n",
+ "p = xCO2 + xCO/2 + xO2 + q/2\n",
+ "\n",
+ "actual_air = p*(32+3.76*28)/(x*28) \t\t\t#kg/kg ethylene\n",
+ "excess_air = (actual_air - Stoichiometric_air)/Stoichiometric_air*100\n",
+ "print \"Actual air = %.1f kg/kg ethylene \"%(actual_air)\n",
+ "print \"Excess air = %.0f%%\"%(excess_air)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Actual air = 17.8 kg/kg ethylene \n",
+ "Excess air = 21%\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.9 Page No : 433"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# variables\n",
+ "excess_air = 10. \t\t\t#%\n",
+ "tR = 30. \t\t\t#\u00b0C \t\t\t#temperature of reacmath.tant\n",
+ "tP = 120. \t\t\t#\u00b0C \t\t\t#temperature of product\n",
+ "delta_H = -802.3*1000 \t\t\t#kJ/kmol CH4\n",
+ "Cp_CH4 = 36. \t\t\t#kJ/lmolK\n",
+ "Cp_O2 = 29.5 \t\t\t#kJ/lmolK\n",
+ "Cp_N2 = 29.2 \t\t\t#kJ/lmolK\n",
+ "Cp_CO2 = 37. \t\t\t#kJ/lmolK\n",
+ "Cp_H2O = 33.7 \t\t\t#kJ/lmolK\n",
+ "tA = 30. \t\t\t#\u00b0C\n",
+ "tX = 25. \t\t\t#\u00b0C\n",
+ "tY = tX \t\t\t#\u00b0C\n",
+ "tB = 120. \t\t\t#\u00b0C\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "Q_AB = (1*Cp_CO2 + 0.2*Cp_O2 + 8.272*Cp_N2 + 2*Cp_H2O)*(tB-tX)+ delta_H + (1*Cp_CH4 + 2.2*Cp_O2 +8.272*Cp_N2)*(tY-tA)\n",
+ "print \"The heat transfer from the combustor = %.1f kJ/kg CH4 \"%(Q_AB/16)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transfer from the combustor = -48161.7 kJ/kg CH4 \n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.10 Page No : 435"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "deltaH_gasgas = -2651.4e3 \t\t\t#kJ/kmol bumath.tane\n",
+ "hfg_butane = 370 \t\t\t#kJ/kg \t\t\t#enthalpies of vaporisation of butance\n",
+ "hfg_water = 2442 \t\t\t#kJ/kg \t\t\t#enthalpies of vaporisation of water\n",
+ "M_butane = 58 \t\t\t#g/mol\n",
+ "M_water = 18 \t\t\t#g/mol\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "deltaH_liqliq = deltaH_gasgas + M_butane*hfg_butane - 5*M_water*hfg_water\n",
+ "print \"Enthalpy of reaction = %.1f kJ/kg\"%(deltaH_liqliq/M_butane)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enthalpy of reaction = -49133.1 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.11 Page No : 437"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "#Formation Enthalpies\n",
+ "hf_CO2 = -393510. \t\t\t#kJ/kmol\n",
+ "hf_H2O = -285838. \t\t\t#kJ/kmol\n",
+ "hf_C3H8 = -104680. \t\t\t#kJ/kmol\n",
+ "hf_O2 = 0. \t\t\t#kJ/kmol\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "Hp = 3*hf_CO2 + 4*hf_H2O \n",
+ "Hr = hf_C3H8 + 5*hf_O2\n",
+ "deltaH_std = Hp-Hr\n",
+ "print \"Standard change in enthalpy for the reaction = %.0f kJ/kg\"%(deltaH_std/44)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Standard change in enthalpy for the reaction = -50436 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.12 Page No : 438"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "Cp_C2H4 = 28*1.548 \t\t\t#kJ/lmolK\n",
+ "Cp_O2 = 32*0.922 \t\t\t#kJ/lmolK\n",
+ "Cp_N2 = 28*1.042 \t\t\t#kJ/lmolK\n",
+ "Cp_CO2 = 44*0.842 \t\t\t#kJ/lmolK\n",
+ "Cp_H2O = 18*1.86 \t\t\t#kJ/lmolK\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "deltaH_BX = (2*Cp_CO2 + 2*Cp_H2O + 0.3*Cp_O2 + 12.408*Cp_N2)*(120-25)\n",
+ "deltaH_YA = (Cp_C2H4 + 3.3*Cp_O2 + 12.408*Cp_N2)*(25-50)\n",
+ "hf_CO2 = -393510. \t\t\t#kJ/kmol\n",
+ "hf_H2O = -241820. \t\t\t#kJ/kmol\n",
+ "hf_C2H4 = 52283. \t\t\t#kJ/kmol\n",
+ "deltaH_XY = 2*hf_CO2 + 2*hf_H2O - hf_C2H4 \t\t\t#kJ/kmol\n",
+ "deltaH_BA = deltaH_BX + deltaH_YA + deltaH_XY \t\t\t#kJ/kmol\n",
+ "\n",
+ "print \"The heat transferred from the combustor per kg ethylene = %.0f kJ/kg ethane\"%(deltaH_BA/28)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The heat transferred from the combustor per kg ethylene = -45960 kJ/kg ethane\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.13 Page No : 441"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Part(a)\n",
+ "print \"Parta\"\n",
+ "#Picking up various Cp values from Table 12.1\n",
+ "tB = (16*50010)/(44*0.842+2*18*1.86+3*32*0.922+22.56*28*1.042)+25\n",
+ "print \"Adiabatic combustion temperature using average Cp values)= %.1f K\"%(tB+273)\n",
+ "\n",
+ "#Part(b)\n",
+ "print \"Partb\"\n",
+ "tb1 = 1000. \t\t\t#K \t\t\t#first guess temperature\n",
+ "tb2 = 1200. \t\t\t#K second guess temperature\n",
+ "tb = (tb1 - tb2)/(637617-836847)*(800160-836847) + tb2\n",
+ "print \"Adiabatic combustion temperature using ideal gas enthalpy = %.0f K\"%(tb)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parta\n",
+ "Adiabatic combustion temperature using average Cp values)= 1238.6 K\n",
+ "Partb\n",
+ "Adiabatic combustion temperature using ideal gas enthalpy = 1163 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.14 Page No : 443"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "delta_H_std = -45101. \t\t\t#kJ/kg\n",
+ "hfg = 2442. \t\t\t#kJ/kg \t\t\t#enthalpy of vaporisation\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "LCV = -1*delta_H_std \t\t\t# kJ/kg hexane\n",
+ "print \"LCV of gaseous hexane = %.1f kJ/kg hexane\"%(LCV)\n",
+ "\n",
+ "m = 7.*18./86 \t\t\t#mass of H2O per kg hexane\n",
+ "HCV = LCV+m*hfg \t\t\t#kJ/kg hexane\n",
+ "print \"HCV of gaseous hexane = %d kJ/kg hexane\"%(HCV)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "LCV of gaseous hexane = 45101.0 kJ/kg hexane\n",
+ "HCV of gaseous hexane = 48678 kJ/kg hexane\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Engineering_Thermodynamics/ch2.ipynb b/Basic_Engineering_Thermodynamics/ch2.ipynb
new file mode 100755
index 00000000..e0d9b70e
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/ch2.ipynb
@@ -0,0 +1,458 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:6899d33957757e53b75082591aa468f495e3dee26f9772aa86059a86f9321499"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2 : Work"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1 Page No : 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "Force = 180 \t\t\t#in N \t\t\t#horizontal force\n",
+ "theta = 30 \t\t\t#in degrees \t\t\t#angle of inclination\n",
+ "distance = 12 \t\t\t#in m \t\t\t#distance moved by block along inclined plane.\n",
+ " \n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "Work = Force * (distance * math.cos(math.radians(theta))) \t\t\t#in J \t\t\t# Work done\n",
+ "Work = 0.001 * Work \t\t\t# Work done in KJ\n",
+ "print \"Work done by block = %.4f KJ\"%(Work);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done by block = 1.8706 KJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2 Page No : 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "mass_body = 2 \t\t\t#in kg \t\t\t#mass of body\n",
+ "L = 5 \t\t\t#in m \t\t\t#vertical distance\n",
+ "g = 9.8 \t\t\t#in m/s**2 \t\t\t#acceleration due to gravity\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "Work_done_by_agent = mass_body * g * L \t\t\t#in Nm \t\t\t#work done by agent\n",
+ "Work_done_by_body = -1*Work_done_by_agent\n",
+ "print \"Work done by agent = %.0f Nm\"%(Work_done_by_agent);\n",
+ "print \"Work done by body = %.0f Nm\"%(Work_done_by_body);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done by agent = 98 Nm\n",
+ "Work done by body = -98 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4 Page No : 39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "p1 = 1.5 * 10**(5) \t\t\t#N/m**2 \t\t\t#initial pressure in ballon\n",
+ "d1 = 0.25 \t\t\t#m \t\t\t#initial diameter of balloon\n",
+ "d2 = 0.3 \t\t\t#m \t\t\t#final diameter of balloon\n",
+ "p_atm = 10**(5) \t\t\t#N/m**2 \t\t\t#atmospheric pressure\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "\n",
+ "#Part (a)\n",
+ "print \"Part a\";\n",
+ "print \"As p is proportional to d, p = k*d, where k is proportionality constant\"\n",
+ "print \"Therefore,\";\n",
+ "\n",
+ "k = p1/d1;\n",
+ "print \"p1 = k*d1 => k = p1/d1 = %.2f/%.2f) = %.1e N/m**3\"%(p1,d1,k);\n",
+ "\n",
+ "p2 = k*d2; \t\t\t#N/m**2 \t\t\t#final pressure in balloon\n",
+ "print \"p2 = k*d2 = %.2f*%.2f) = %.1e N/m**2\"%(k,d2,p2);\n",
+ "\n",
+ "\n",
+ "def f0(d): \n",
+ "\t return k*(math.pi/2)*(d**3)\n",
+ "\n",
+ "W_air = quad(f0,d1,d2)[0]\n",
+ "\n",
+ "print \"Work done by balloon on air = %.0f Nm\"%(W_air);\n",
+ "\n",
+ "\t\t\t#Part (b)\n",
+ "print \"Part b\";\n",
+ "\n",
+ "def f1(d): \n",
+ "\t return p_atm*(0.5*math.pi*(d**2))\n",
+ "\n",
+ "W_atm = quad(f1,d2,d1)[0]\n",
+ "\n",
+ "print \"Work done by atmosphere on balloon = %.2f Nm\"%(W_atm);\n",
+ "W_balloon = -1*(W_air+W_atm);\n",
+ "print \"Work done by balloon = -Work done by air + Work done by atmosphere = -%.0f %.0f = %.0f Nm\"%(W_air,W_atm,W_balloon);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "As p is proportional to d, p = k*d, where k is proportionality constant\n",
+ "Therefore,\n",
+ "p1 = k*d1 => k = p1/d1 = 150000.00/0.25) = 6.0e+05 N/m**3\n",
+ "p2 = k*d2 = 600000.00*0.30) = 1.8e+05 N/m**2\n",
+ "Work done by balloon on air = 988 Nm\n",
+ "Part b\n",
+ "Work done by atmosphere on balloon = -595.59 Nm\n",
+ "Work done by balloon = -Work done by air + Work done by atmosphere = -988 -596 = -393 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5 Page No : 40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\n",
+ "# Variables\n",
+ "p1 = 10 \t\t\t#bar \t\t\t#initial pressure\n",
+ "V1 = 0.1 \t\t\t#m**3 \t\t\t#initial volume\n",
+ "p2 = 2 \t\t\t#bar \t\t\t#final pressure\n",
+ "V2 = 0.35 \t\t\t#m**3 \t\t\t#final volume\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "print \"Let the expansion process follow the path pV**n = constant\";\n",
+ "print \"Therefore \"\n",
+ "n = (math.log(p1/p2))/(math.log(V2/V1));\n",
+ "print \"n = lnp1/p2/lnV2/V1 = ln%.2f/%.2f/ln %.2f/%.2f = %.4f\"%(p1,p2,V2,V1,n);\n",
+ "W_d = (p1*V1 - p2*V2)*10**5/(n-1) \t\t\t#J \t\t\t#Work interaction for pure substance\n",
+ "print \"Work interaction for pure substance = p1V1 - p2V2)/n-1) = %.2f kJ\"%(W_d*.001)\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Let the expansion process follow the path pV**n = constant\n",
+ "Therefore \n",
+ "n = lnp1/p2/lnV2/V1 = ln10.00/2.00/ln 0.35/0.10 = 1.2847\n",
+ "Work interaction for pure substance = p1V1 - p2V2)/n-1) = 105.37 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6 Page No : 41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "p1 = 1.0 \t\t\t#bar \t\t\t#initial pressure\n",
+ "V1 = 0.1 \t\t\t#m**3 \t\t\t#initial volume\n",
+ "p2 = 6 \t\t\t#bar \t\t\t#final pressure\n",
+ " \t\t\t#and p1*(V1**1.4) = p2*(V2**1.4)\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#Part (a)\n",
+ "print \"Part a\";\n",
+ "V2 = V1*(p1/p2)**(1/1.4) \t\t\t#m**3 \t\t\t#final volume\n",
+ "print \"Final Volume = %.4f m**3\"%(V2);\n",
+ "\n",
+ "W_d = (10**5)*(p1*V1 - p2*V2)/(1.4-1); \t\t\t#J \t\t\t#Work of compression for air\n",
+ "print \"Work of compression for air = %.1f KJ\"%(W_d*.001);\n",
+ "\n",
+ "#Part (b)\n",
+ "print \"Part b\";\n",
+ "V2 = (p1/p2)*V1; \t\t\t#m**3 \t\t\t#final volume\n",
+ "print \"Final Volume = %.4f m**3\"%(V2);\n",
+ "\n",
+ "W_d = (10**5)*p1*V1*math.log(V2/V1); \t\t\t#J \t\t\t#Work done on air\n",
+ "print \"Work done on air = %.1f KJ\"%(W_d*.001);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "Final Volume = 0.0278 m**3\n",
+ "Work of compression for air = -16.7 KJ\n",
+ "Part b\n",
+ "Final Volume = 0.0167 m**3\n",
+ "Work done on air = -17.9 KJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7 Page No : 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "#four-stroke engine\n",
+ "x = 3. \t\t\t#number of cylinders\n",
+ "y = 1. \t\t\t#engine is math.single-acting\n",
+ "n = 500. \t\t\t#rev/min \n",
+ "N = n/2 \t\t\t#cycles/min\n",
+ "D = 0.075 \t\t\t#m \t\t\t#bore length\n",
+ "L = 0.1 \t\t\t#m \t\t\t#stroke length\n",
+ "a = 6.*10**(-4) \t\t\t#m**2 \t\t\t#area\n",
+ "l = 0.05 \t\t\t#m \t\t\t#length\n",
+ "S = 2.*10**8 \t\t\t#N/m**3 \t\t\t#spring constant\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "p_m = (a/l)*S \t\t\t#Pa \t\t\t#mep\n",
+ "\n",
+ "print \"Mean effective pressure, mep{Pm} = %.2f kPa\"%(p_m*.001)\n",
+ "A = (math.pi/4)*D**2 \t\t\t#m**2\n",
+ "\n",
+ "print \"Indicated power{P_ind} = %.2f kW\"%(x*y*p_m*L*A*N/60000)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mean effective pressure, mep{Pm} = 2400.00 kPa\n",
+ "Indicated power{P_ind} = 13.25 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8 Page No : 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy import *\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "N = poly1d([.5,0]) \t\t\t#n is engine speed\n",
+ "x = 6 \t\t\t#six cylinders\n",
+ "y = 1 \t\t\t#assumed\n",
+ "d = 0.1 \t\t\t#m \t\t\t#bore length\n",
+ "A = math.pi*(0.1)**2/4 \t\t\t#m**2 \t\t\t#Area\n",
+ "L = 0.15 \t\t\t#m \t\t\t#stroke length\n",
+ "P_shaft = 24.78 \t\t\t#KW \t\t\t#Power of shaft\n",
+ "T = 474.9 \t\t\t#Nm \t\t\t#Torque in the crank shaft\n",
+ "l = 0.05 \t\t\t#m \t\t\t#length of indicator diagram\n",
+ "a = 9.37*10**(-4) \t\t\t#cm**2 \t\t\t#area of indicator diagram\n",
+ "S = 0.5*(10**8) \t\t\t#N/m**3 \t\t\t#spring constant\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "p_m = a*S/l \t\t\t#mean pressure difference\n",
+ "print \"Mean pressure difference = %.2f N/m**2\"%(p_m);\n",
+ "\n",
+ "P_ind = (x*y)*p_m*(L*A*N/60000) \t\t\t#indicated power\n",
+ "#C = coeff(P_ind)\n",
+ "C = poly(P_ind)\n",
+ "print \"Indicated Power = %.6f n kW\"%(C[1])\n",
+ "\n",
+ "P_shaft = 2*math.pi*poly([1,0])*T/60000 \t\t\t#shaft power output\n",
+ "print \"Shaft power output in KW)= %.5f n kW\"%(P_shaft[0])\n",
+ "\n",
+ "#Mechanical_efficiency = poly(P_shaft,1)/coeff(P_ind,1)*100\n",
+ "Mechanical_efficiency = poly(P_shaft[1])/poly(P_ind[1])*100\n",
+ "print \"Mechanical Efficiency = %.0f %%\"%(-Mechanical_efficiency[1])\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mean pressure difference = 937000.00 N/m**2\n",
+ "Indicated Power = -0.055194 n kW\n",
+ "Shaft power output in KW)= 0.04973 n kW\n",
+ "Mechanical Efficiency = 90 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9 Page No : 46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "d = 0.4 \t\t\t#m \t\t\t#cylinder diameter\n",
+ "t = 10. \t\t\t#min \t\t\t#Time taken for stirring\n",
+ "L = 0.49 \t\t\t#m \t\t\t#distance moved by the piston\n",
+ "p_atm = 1. \t\t\t#bar \t\t\t#atmospheric pressure\n",
+ "W_net = -1965. \t\t\t#Nm \t\t\t#net work done\n",
+ "n = 750. \t\t\t#rev/min \t\t\t#rotational velocity of electric motor\n",
+ "I = 0.9 \t\t\t#A \t\t\t#current\n",
+ "V = 24. \t\t\t#V \t\t\t#voltage\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#Part(a)\n",
+ "print \"Part a\";\n",
+ "W_d = 10**5*p_atm * (math.pi/4) * d**2 * L; \t\t\t#Nm \t\t\t#work done by fluid on piston\n",
+ "print \"Work done by fluid on the piston = %.1f Nm\"%(W_d);\n",
+ "W_str = W_net - W_d; \t\t\t#Nm \t\t\t#Work done by stirrer\n",
+ "print \"Work done by stirrer on the fluid = %.1f Nm\"%(W_str);\n",
+ "P_shaft = abs(W_str)/(t*60); \t\t\t#W \t\t\t#shaft power output\n",
+ "print \"Shaft power output = %.2f W\"%(P_shaft);\n",
+ "T = (P_shaft*60)/(2*math.pi*n); \t\t\t#Nm \t\t\t#Torque in the driving shaft\n",
+ "print \"Torque in the driving shaft = %.3f Nm\"%( T);\n",
+ "\n",
+ "#Part(b)\n",
+ "print \"Part b\";\n",
+ "W_bat = I*V*t*60; \t\t\t#Nm \t\t\t#work done by battery\n",
+ "print \"Work done by battery = %.1f Nm\"%(W_bat);\n",
+ "W_motor = -1*(W_bat+W_str) \t\t\t#Nm \t\t\t#work done by motor\n",
+ "print \"Work done by motor = %.1f Nm\"%(W_motor);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "Work done by fluid on the piston = 6157.5 Nm\n",
+ "Work done by stirrer on the fluid = -8122.5 Nm\n",
+ "Shaft power output = 13.54 W\n",
+ "Torque in the driving shaft = 0.172 Nm\n",
+ "Part b\n",
+ "Work done by battery = 12960.0 Nm\n",
+ "Work done by motor = -4837.5 Nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Engineering_Thermodynamics/ch3.ipynb b/Basic_Engineering_Thermodynamics/ch3.ipynb
new file mode 100755
index 00000000..8ff56196
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/ch3.ipynb
@@ -0,0 +1,253 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:c25c8c800dd34f424a4f0cf9e435c0ab4dc67af9251d8f09c564bbab45696729"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3 : Temperature and Heat"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1 Page No : 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\n",
+ "#Part(a)\n",
+ "print \"Part a\"\n",
+ "tf = 98.6 \t\t\t#\u00b0F \t\t\t#average temperature Human Body in \u00b0C\n",
+ "tc = (tf - 32)/1.8 \t\t\t#\u00b0C\n",
+ "print \"Average human temperature in \u00b0C = %.1f \u00b0C\"%(tc);\n",
+ "\n",
+ "\n",
+ "#Part(b)\n",
+ "print \"Part b\"\n",
+ "tc = 27 \t\t\t#\u00b0C \t\t\t#Annual average temperature in peninsular India in \u00b0C\n",
+ "tf = 1.8*tc+32 \t\t\t#Annual average temperature in peninsular India in \u00b0F\n",
+ "print \"Annual average temperature in peninsular India in \u00b0F = %.1f \u00b0F\"%(tf);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "Average human temperature in \u00b0C = 37.0 \u00b0C\n",
+ "Part b\n",
+ "Annual average temperature in peninsular India in \u00b0F = 80.6 \u00b0F\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2 Page No : 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# Variables\n",
+ "t = 27 \t\t\t#\u00b0C \n",
+ "\n",
+ "# Calculations\n",
+ "T = t + 273.15 \t\t\t#K\n",
+ "\n",
+ "# Result\n",
+ "print \"Temperature in Kelvin = %.2f K\"%(T)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature in Kelvin = 300.15 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3 Page No : 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "# variables\n",
+ "T = 250 \t\t\t#K \n",
+ "\n",
+ "# calculations\n",
+ "t = T - 273.15 \t\t\t#\u00b0C\n",
+ "\n",
+ "# result\n",
+ "print \"Temperature in \u00b0C = %.2f \u00b0C\"%(t)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature in \u00b0C = -23.15 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4 Page No : 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy.linalg import solve\n",
+ "# Variables\n",
+ "X = solve([[1, 0, 0],[ 1, 100, 100**2],[ 1, 50, 50**2]],[[0], [100], [51]])\n",
+ "\n",
+ "p = X[0]\n",
+ "q = X[1];\n",
+ "r = X[2];\n",
+ "\n",
+ "def t_A(t_B): \n",
+ " return q*t_B + r*(t_B**2)\n",
+ "t_B = 30;\n",
+ "\n",
+ "print \"When thermometer B reads %0.1f C then thermometer A reads, t_B = %.02f degree C\"%(t_B,t_A(t_B))\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When thermometer B reads 30.0 C then thermometer A reads, t_B = 30.84 degree C\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5 Page No : 79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# variables\n",
+ "\n",
+ "Rt = 80\n",
+ "t = 25\n",
+ "\n",
+ "# calculations and results\n",
+ "#Substituting Rt and t in Rt = Ro(1+0.00395t)\n",
+ "Ro = 80/(1+0.00395*25)\n",
+ "print \"Ro {Resistance at 0\u00b0C} = %.2f ohm\"%(Ro)\n",
+ "\n",
+ "#Full load condition\n",
+ "Rt = 95\n",
+ "#temperature at full load condition\n",
+ "print \"t {Temperature at full load condition} = %.2f \u00b0C\"%(((Rt/Ro)-1)/0.00395);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ro {Resistance at 0\u00b0C} = 72.81 ohm\n",
+ "t {Temperature at full load condition} = 77.16 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6 Page No : 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# calculations\n",
+ "def e(t): \n",
+ "\t return 0.0367*t + 1.33 * 10**(-4)*t**2\n",
+ "\n",
+ "# results\n",
+ "print \"Thermometer read in place where gas thermometer reads 50\u00b0C = %.2f \u00b0C\"%((e(50)/e(100)*100))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermometer read in place where gas thermometer reads 50\u00b0C = 43.35 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Engineering_Thermodynamics/ch4.ipynb b/Basic_Engineering_Thermodynamics/ch4.ipynb
new file mode 100755
index 00000000..9d364f3a
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/ch4.ipynb
@@ -0,0 +1,199 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:796b0d55d49c3a8708377f5eda9102cc03f40afdc4e2bd80f2e4fc59de97aea2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4 : The First Law of Thermodynamics for Systems-Pure Substances"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1 Page No : 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "#four heat transfer\n",
+ "Q_1 = 900 \t\t\t#J\n",
+ "Q_2 = 80 \t\t\t#J\n",
+ "Q_3 = -800 \t\t\t#J\n",
+ "Q_4 = 150 \t\t\t#J\n",
+ "#four work interactions\n",
+ "W_1 = 200 \t\t\t#J\n",
+ "W_2 = 150 \t\t\t#J\n",
+ "W_3 = 300 \t\t\t#J\n",
+ "\t\t\t#W_4\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "W_4 = Q_1 +Q_2 +Q_3 +Q_4 -W_1 -W_2 -W_3 \n",
+ "print \"Magnitude and Direction of the fourth work interaction, W4 = %.0f J\"%(W_4)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnitude and Direction of the fourth work interaction, W4 = -320 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2 Page No : 94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "Q_a = -50 \t\t\t#KJ \t\t\t#heat transferred from the system along path A\n",
+ "W_a = -65 \t\t\t#KJ \t\t\t#work done along path A\n",
+ "Q_b = 0 \t\t\t#KJ \t\t\t#heat transferred from the system along path B\n",
+ "\t\t\t#W_b work done along path B\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "\n",
+ "#Part(a)\n",
+ "print \"Part a\";\n",
+ "delE_a = Q_a - W_a \t\t\t#KJ \t\t\t#Change in energy along path A\n",
+ "print \"Change in energy of the system = %.0f KJ\"%(delE_a);\n",
+ "\n",
+ "#Part(b)\n",
+ "print \"Part b\";\n",
+ "delE_b = -1*delE_a \t\t\t#KJ \t\t\t#Change in energy along path B\n",
+ "W_b = delE_b - Q_b \t\t\t#KJ \t\t\t#work done along path B\n",
+ "print \"Magnitude and direction of work done during B, W_b = %.0f KJ\"%(W_b)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "Change in energy of the system = 15 KJ\n",
+ "Part b\n",
+ "Magnitude and direction of work done during B, W_b = -15 KJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3 Page No : 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "# Variables\n",
+ "m = 2.3 \t\t\t#kg \t\t\t#mass of substance\n",
+ "u = 21 * 10**3 \t\t\t#J/kg \t\t\t#internal energy\n",
+ "V = 110. \t\t\t#m/s \t\t\t#velocity \n",
+ "z = 1500. \t\t\t#m \t\t\t#elevation above sea level\n",
+ "g = 9.81 \t\t\t#m/s**2 \t\t\t#acceleration due to gravity\n",
+ "\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "E = m*(g*z + V**2/2 + u) \t\t\t#J/kg \t\t\t#Total energy of the system\n",
+ "print \"The total energy of the system with respect to an observer at rest at sea level, E = %.4f KJ\"%(0.001*E);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total energy of the system with respect to an observer at rest at sea level, E = 96.0595 KJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4 Page No : 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import *\n",
+ "from sympy import Derivative\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "t = poly1d(0); \t\t\t#C \t\t\t#Temperature in C\n",
+ "u = 196. + .718*t; \t\t\t#KJ/kg \t\t\t#specific internal energy\n",
+ "pv = 287*(t+273.); \t\t\t#Nm/kg \t\t\t#p is pressure and v = specific volume\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "Cv = poly(u);\n",
+ "print \"Specific heat at constant volume,Cv = %.3f kJ/kgK\"%(Cv[0])\n",
+ "\n",
+ "h = u + pv*.001 \t\t\t#KJ/kg \t\t\t#enthalpy\n",
+ "Cp = poly(h);\n",
+ "print \"Specific heat at constant pressure,Cp = %.3f kJ/kgK\"%(Cp[0])\n",
+ "\n",
+ "# Note: Poly function gives different result then book has."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific heat at constant volume,Cv = 1.000 kJ/kgK\n",
+ "Specific heat at constant pressure,Cp = 1.000 kJ/kgK\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Engineering_Thermodynamics/ch5.ipynb b/Basic_Engineering_Thermodynamics/ch5.ipynb
new file mode 100755
index 00000000..82c29562
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/ch5.ipynb
@@ -0,0 +1,476 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:7f13a6535713e6dd307350b25e55b55427f77dbef3f6f6422a5890eea0412625"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5 : First Law of Thermodynamics for Control Volumes"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1 Page No : 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Variables\n",
+ "Q = -24.; \t\t\t#KJ/kg\n",
+ "\n",
+ "p1 = 5e5; \t\t\t#N/m**2\n",
+ "t1 = 227.; \t\t\t#\u00b0C\n",
+ "V1 = 50.; \t\t\t#m/s\n",
+ "v1 = 0.78; \t\t\t#m**3/kg\n",
+ "\n",
+ "p2 = 1e5; \t\t\t#N/m**2\n",
+ "t2 = 57.; \t\t\t#\u00b0C\n",
+ "V2 = 100.; \t\t\t#m/s\n",
+ "v2 = 0.97; \t\t\t#m**3/kg\n",
+ "\n",
+ "g = 9.81; \t\t\t#m/s**2 \t\t\t#acceleration due to gravity\n",
+ "\n",
+ "delta_z = -5; \t\t\t#m \n",
+ "Cv = 0.7; \t\t\t#KJ/kg \n",
+ "delta_u = Cv*(t2 - t1); \t\t\t#KJ/kg \t\t\t#change in internal energy \t\t\t#u2-u1\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "delta_h = delta_u + (p2*v2 - p1*v1)*.001; \t\t\t#KJ/kg \t\t\t#change in enthalpy \t\t\t#h2-h1\n",
+ "\n",
+ "W_x = Q - (delta_h + (V2**2 - V1**2)/2*.001 + g*delta_z*.001); \t\t\t#kJ/kg \t\t\t#Work Output\n",
+ "\n",
+ "print \"Work output = %.1f KJ/kg\"%(W_x);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work output = 384.3 KJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2 Page No : 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "m = 5000./3600 \t\t\t# kg/s \t\t\t# flow rate\n",
+ "W_x = 550. \t\t\t# KJ/s \t\t\t#power developed by turbine\n",
+ "Q = 0. \t \t\t#Heat loss is negligible\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#Part (a)\n",
+ "print \"Parta\"\n",
+ "V1 = 0. \t\t\t# m/s \t\t\t#inlet velocity\n",
+ "V2 = 360. \t\t\t# m/s \t\t\t#exit velocity\n",
+ "g = 9.81 \t\t\t# m/s**2\n",
+ "delta_z = 0. \t\t\t#m \t\t\t#z2-z1\n",
+ "\n",
+ "delta_h = ((Q-W_x)/m)-g*delta_z*.001-((V2**2-V1**2)/2000) \t\t\t#KJ/Kg \t\t\t#change in enthalpy\n",
+ "print \"Change in enthalpy = %.2f KJ/kg\"%(delta_h)\n",
+ "\n",
+ "#Part (a)\n",
+ "print \"Partb\"\n",
+ "V1 = 60. \t\t\t# m/s \t\t\t#inlet velocity\n",
+ "V2 = 360. \t\t\t# m/s \t\t\t#exit velocity\n",
+ "g = 9.81 \t\t\t# m/s**2\n",
+ "delta_z = 0. \t\t\t#m \t\t\t#z2-z1\n",
+ "\n",
+ "delta_h = ((Q-W_x)/m)-g*delta_z*.001-((V2**2-V1**2)/2000) \t\t\t#KJ/Kg \t\t\t#change in enthalpy\n",
+ "print \"Change in enthalpy = %.2f KJ/kg\"%(delta_h)\n",
+ "\n",
+ "# note : rounding off error"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parta\n",
+ "Change in enthalpy = -460.80 KJ/kg\n",
+ "Partb\n",
+ "Change in enthalpy = -459.00 KJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3 Page No : 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "mA = 0.8 \t\t\t# kg/s \t\t\t#flow rate of stream A\n",
+ "pA = 15e5 \t\t\t# N/m**2 \t\t\t#Pressure of stream A\n",
+ "tA = 250. \t\t\t#\u00b0C \t\t\t#temperature of stream A\n",
+ "\n",
+ "mB = 0.5 \t\t\t# kg/s \t\t\t#flow rate of stream B\n",
+ "pB = 15e5 \t\t\t# N/m**2 \t\t\t#Pressure of stream B\n",
+ "tB = 200. \t\t\t#\u00b0C \t\t\t#temperature of stream B\n",
+ "\n",
+ "Q = 0. \t\t\t#No heat loss\n",
+ "\n",
+ "p1 = 10e5 \t\t\t# N/m**2 \t\t\t#pressure supply of chamber\n",
+ "t2 = 30. \t\t\t#\u00b0C \t\t\t#exhaust air temperature from turbine\n",
+ "\n",
+ "Cv = 0.718 \t\t\t# KJ/kgK \t\t\t#heat capacity at constant volume\n",
+ "Cp = 1. \t\t\t# KJ/kgK \t\t\t#heat capacity at constant pressure\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#Part(a)\n",
+ "print \"Part a\"\n",
+ "t1 = ((mA*Cp*tA)+(mB*Cp*tB))/((mA*Cp)+(mB*Cp)) \t\t\t# \u00b0C \t\t\t#the temperature of air at inlet to the turbine\n",
+ "print \"The temperature of air at inlet to the turbine = %.2f \u00b0C\"%(t1);\n",
+ "\n",
+ "#Part(b)\n",
+ "print \"Part b\"\n",
+ "WT = -1*(mA+mB)*Cp*(t2-t1) \t\t\t# \u00b0kW \t\t\t#power developed by turbine\n",
+ "print \"Power developed by turbine = %.0f kW\"%(WT);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "The temperature of air at inlet to the turbine = 230.77 \u00b0C\n",
+ "Part b\n",
+ "Power developed by turbine = 261 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4 Page No : 123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "d1 = 0.15 \t\t\t#m \t\t\t#inlet diameter\n",
+ "m = 4000./3600 \t\t\t# kg/s \t\t\t#flow rate\n",
+ "v1 = 0.285 \t\t\t#m**3/kg \t\t\t#specific volume at entry\n",
+ "d2 = 0.25 \t\t\t#m \t\t\t#exit diameter\n",
+ "v2 = 15. \t\t\t# m**3/kg \t\t\t#specific volume at exit\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "\n",
+ "A1 = math.pi*d1**2/4 \t\t\t#m**2 \t\t\t#inlet cross sectional area\n",
+ "A2 = math.pi*d2**2/4 \t\t\t# m**2 \t\t\t# exit cross sectional area\n",
+ "print \"Inlet cross sectional area A1)= %.5f m**2\"%(A1);\n",
+ "print \"Exit cross sectional area A2)= %.4f m**2\"%(A2);\n",
+ "\n",
+ "V1 = m*v1/A1 \t\t\t#m/s \t\t\t#inlet velocity\n",
+ "V2 = m*v2/A2 \t\t\t#m/s \t\t\t#exit velocity\n",
+ "\n",
+ "print \"Inlet velocity = %.1f m/s\"%(V1);\n",
+ "print \"Exit velocity = %.1f m/s\"%(int(V2));\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Inlet cross sectional area A1)= 0.01767 m**2\n",
+ "Exit cross sectional area A2)= 0.0491 m**2\n",
+ "Inlet velocity = 17.9 m/s\n",
+ "Exit velocity = 339.0 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5 Page No : 125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "p1 = 10.\t\t\t#bar \t\t\t#inlet pressure\n",
+ "t1 = 300. \t\t\t#\u00b0C \t\t\t#inlet temperature\n",
+ "\n",
+ "p2 = 0.1 \t\t\t#bar \t\t\t#exit pressure\n",
+ "Cp = 1. \t\t\t#kJ/kgK \t\t\t# heat capacity at constant pressure\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#Adiabatic process\n",
+ "delta_h = 0 \t\t\t#change in enthalpy\n",
+ "t2 = delta_h/Cp + t1\n",
+ "print \"Temperature of air after throttling = %.0f \u00b0C\"%(t1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature of air after throttling = 300 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6 Page No : 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "p1 = 1e5 \t\t\t# N/m**2 \t\t\t#inlet pressure\n",
+ "v1 = 0.08 \t\t\t#m**3/kg \t\t\t# specific volume at inlet\n",
+ "p2 = 7e5 \t\t\t# N/m**2 \t\t\t#exit pressure\n",
+ "v2 = 0.016 \t\t\t# m**3/kg \t\t\t#specific volume at exit\n",
+ "u1 = 48. \t\t\t# kJ/kg \t\t\t# internal energy at inlet\n",
+ "u2 = 200. \t\t\t# kJ/kg \t\t\t# internal energy at exit\n",
+ "Q = -120. \t\t\t# kJ/kg \t\t\t# heat loss\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "Wc = ((u2 - u1) + (p2*v2 - p1*v1)*.001 - Q)*-1 \t\t\t# kJ/kg \t\t\t# work input to compressor\n",
+ "print \"Work input to compressor Wc) = %.1f kJ/kg\"%(Wc)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work input to compressor Wc) = -275.2 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7 Page No : 128"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# variables\n",
+ "mh = 9.45 \t\t\t# kg/s \t\t\t# flow rate of steam\n",
+ "h_h2 = 140. \t\t\t# kJ/kg \t\t\t# enthalpy of condensate\n",
+ "h_h1 = 2570. \t\t\t# kJ/kg \t\t\t# inlet enthalpy of steam\n",
+ "t1 = 25. \t\t\t# \u00b0C \t\t\t#inlet temperature of cooling water\n",
+ "t2 = 36. \t\t\t# \u00b0C \t\t\t#exit temperature of cooling water\n",
+ "c = 4.189 \t\t\t# kJ/kg deg \t\t\t# specific heat of water\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "mc = -1*(mh*(h_h2-h_h1))/(c*(t2-t1)) \t\t\t# kg/s \t\t\t#mass flow rate of cooling water\n",
+ "print \"Mass flow rate of cooling water = %.2f kg/s\"%(mc)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flow rate of cooling water = 498.35 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.8 Page No : 129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# variables\n",
+ "mh = 9.45 \t\t\t# kg/s \t\t\t# flow rate of steam\n",
+ "h_h2 = 140. \t\t\t# kJ/kg \t\t\t# enthalpy of condensate\n",
+ "h_h1 = 2570. \t\t\t# kJ/kg \t\t\t# inlet enthalpy of steam\n",
+ "t1 = 25. \t\t\t# \u00b0C \t\t\t#inlet temperature of cooling water\n",
+ "t2 = 36. \t\t\t# \u00b0C \t\t\t#exit temperature of cooling water\n",
+ "c = 4.189 \t\t\t# kJ/kg deg \t\t\t# specific heat of water\n",
+ "fractionalheatloss = 0.1 \t\t\t# fractional heat loss\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "mc = -1*((1-fractionalheatloss)*mh*(h_h2-h_h1))/(c*(t2-t1)) \t\t\t# kg/s \t\t\t#mass flow rate of cooling water\n",
+ "print \"Mass flow rate of cooling water = %.1f kg/s\"%(mc)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flow rate of cooling water = 448.5 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.9 Page No : 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# variables\n",
+ "V1 = 300 \t\t\t#m/s \t\t\t#inlet air velocity\n",
+ "t2 = 100 \t\t\t#\u00b0C \t\t\t#exit air temperature\n",
+ "V2 = 15 \t\t\t#m/s \t\t\t#exit air velocity\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "t1 = t2 + .001*(V2**2 - V1**2)/2 \t\t\t# \u00b0C \t\t\t#inlet air temperature\n",
+ "print \"Inlet air temperature = %.1f \u00b0C\"%(t1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Inlet air temperature = 55.1 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.10 Page No : 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "m1 = 0.8 \t\t\t#kg \t\t\t#initial mass of air\n",
+ "p1 = 150. \t\t\t#kPa \t\t\t#initial pressure of air\n",
+ "T1 = 300. \t\t\t#K \t\t\t#initial temperature of air\n",
+ "p_p = 600. \t\t\t#kPa \t\t\t#pressure of air in pipe\n",
+ "T_p = 330. \t\t\t#K \t\t\t# temperature of air in pipe\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "m2T2 = (p_p/p1)*T1*m1\n",
+ "m2 = ((0.718*(m2T2/m1-T1))/(331.65)*m1)+m1 \t\t\t#kg \t\t\t#final mass of air\n",
+ "print \"Mass of air entering in vessel = %.4f kg\"%(m2-m1)\n",
+ "T2 = m2T2/m2 \t\t\t#K \t\t\t#Temperature of air in vessel\n",
+ "print \"Temperature of air in vessel = %.0f K\"%(T2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of air entering in vessel = 1.5588 kg\n",
+ "Temperature of air in vessel = 407 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Engineering_Thermodynamics/ch6.ipynb b/Basic_Engineering_Thermodynamics/ch6.ipynb
new file mode 100755
index 00000000..43eef050
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/ch6.ipynb
@@ -0,0 +1,157 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:eff853f228eb4757e442dc216472b407bdef65c4a94c6d1528a14e56ce286c8d"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6 : Head Engines - The Second Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1 Page No : 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "Q1 = 300. \t\t\t#kJ \t\t\t#heat supplied at the boiler\n",
+ "Wt = 100. \t\t\t#kJ \t\t\t#work output of turbine\n",
+ "Wp = 0.5 \t\t\t#kJ \t\t\t#work input to pump\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "Q2 = Q1 - (Wt - Wp) \t\t\t#kJ \t\t\t#heat rejected at the condensor\n",
+ "print \"Heat rejected at the condensor = %.1f kJ\"%(Q2);\n",
+ "efficiency = 1 - (Q2/Q1)\n",
+ "print \"The thermal efficiency of plant = %.2f \"%(efficiency)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat rejected at the condensor = 200.5 kJ\n",
+ "The thermal efficiency of plant = 0.33 \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2 Page No : 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "COP_ref = 4 \t\t\t#COP of refrigerator\n",
+ "Q1 = 0.5 \t\t\t#kJ/s \t\t\t#rate of heat transfer at the condensor\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#Part(a)\n",
+ "print \"Parta\";\n",
+ "Wc = Q1/(COP_ref+1) \t\t\t#kJ/s \t\t\t#Power input to compressor\n",
+ "Q2 = COP_ref*Wc \t\t\t#kJ/s \t\t\t#Rate of heat transfer in evaporator\n",
+ "print \"Rate of heat transfer in evaporator = %.1f kJ/s\"%(Q2)\n",
+ "print \"Power input to compressor = %.1f kJ/s\"%(Wc)\n",
+ "\n",
+ "#Part(b)\n",
+ "print \"Partb\";\n",
+ "COP_hp = 1 + COP_ref \t\t\t#COP of heat pump\n",
+ "print \"COP of heat pump = %.0f\"%(COP_hp)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parta\n",
+ "Rate of heat transfer in evaporator = 0.4 kJ/s\n",
+ "Power input to compressor = 0.1 kJ/s\n",
+ "Partb\n",
+ "COP of heat pump = 5\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3 Page No : 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Part(a)\n",
+ "print \"Part a\";\n",
+ "I = 4.5 \t\t\t#Amp \t\t\t#Current drawn\n",
+ "V = 220 \t\t\t#V\n",
+ "Electricity_consumption = I*V \t\t\t#Watts\n",
+ "ElectricityUnitPerDay = Electricity_consumption/1000*8 \t\t\t#kWh\n",
+ "MonthlyBill_part_a = ElectricityUnitPerDay * 5 * 30\n",
+ "print \"The additional monthly electricity bill = Rs. %.2f\"%(MonthlyBill_part_a);\n",
+ "\n",
+ "#Part(b)\n",
+ "print \"Part b\";\n",
+ "Q1 = Electricity_consumption*.001 \t\t\t#kW \t\t\t#Rate of heat transfer from heat pump\n",
+ "COP_hp = 4 \t\t\t#COP of heat pump\n",
+ "W = Q1/COP_hp \t\t\t#kW \t\t\t#rate at which energy is consumed\n",
+ "ElectricityUnitPerDay = W*8\n",
+ "MonthlyBill_part_b = ElectricityUnitPerDay * 5 * 30\n",
+ "print \"Saving in monthly electricity bill = Rs. %.2f\"%(MonthlyBill_part_a - MonthlyBill_part_b)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "The additional monthly electricity bill = Rs. 1188.00\n",
+ "Part b\n",
+ "Saving in monthly electricity bill = Rs. 891.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Engineering_Thermodynamics/ch7.ipynb b/Basic_Engineering_Thermodynamics/ch7.ipynb
new file mode 100755
index 00000000..b6ea2d15
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/ch7.ipynb
@@ -0,0 +1,204 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:c994036a387ecf3d6e1af15e46c49ba61b58c1363388a5e580f169263936cabd"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7 : Reversibility and The Thermodynamic Temperature Scale"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1 Page No : 174"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "print \"Part a\";\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "Q1 = 500. \t\t\t#kJ \t\t\t#Heat transfer from reservoir at t1\n",
+ "Q2 = 187.5 \t\t\t#kJ \t\t\t#Heat transfer from reservoir at t2\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "nr = 1-(Q2/Q1) \t\t\t#Efficiency\n",
+ "W = nr*Q1 \t\t\t#kJ \t\t\t#Work output of the engine\n",
+ "print \"Work output of the engine = %.1f kJ\"%(W);\n",
+ "\n",
+ "\t\t\t#Part(b)\n",
+ "print \"Part b\";\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "Q1 = 500. \t\t\t#kJ \t\t\t#Heat transfer from reservoir at t1\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "COP_hp = 1/nr\n",
+ "W = Q1/COP_hp \t\t\t#kJ \t\t\t#Work input to heat pump\n",
+ "Q2 = Q1-W \t\t\t#kJ \t\t\t#heat ineraction with reservoir at t2\n",
+ "print \"Heat ineraction with reservoir at t2 = %.1f kJ\"%(Q2);\n",
+ "print \"Work input to the heat pump = %.1f kJ\"%(W);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "Work output of the engine = 312.5 kJ\n",
+ "Part b\n",
+ "Heat ineraction with reservoir at t2 = 187.5 kJ\n",
+ "Work input to the heat pump = 312.5 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2 Page No : 178"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "nr = 0.7 \t\t\t#maximum efficiency\n",
+ "W = 80. \t\t\t#kJ \t\t\t#Work\n",
+ "Q1 = 100. \t\t\t#kJ \t\t\t#heat transfered\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "nx = W/Q1 \t\t\t#claimed efficiency\n",
+ "if nx>nr :\n",
+ " print \"Engine X is not a viable proposition because the claimed efficiency %.2f is greater than maximum efficiency %.2f\"%(nx,nr)\n",
+ "else:\n",
+ " print \"Engine X is a viable proposition because the claimed efficiency %.2f is less than maximum efficiency %.2f\"%(nx,nr) \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Engine X is not a viable proposition because the claimed efficiency 0.80 is greater than maximum efficiency 0.70\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4 Page No : 191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "T1 = (527.+273) \t\t\t#K\n",
+ "T2 = (27.+273) \t\t\t#K\n",
+ "\n",
+ "# calculations and results\n",
+ "#Part (a)\n",
+ "print \"Part a\";\n",
+ "nr = 1 - (T2/T1) \t\t\t#reversible efficiency\n",
+ "print \"Reversible efficiency = %.3f \"%(nr);\n",
+ "\n",
+ "#Part(b)\n",
+ "print \"Part b\";\n",
+ "print \"As the values of at least any two from among Q1,Q2 and W \\\n",
+ "are not given the efficiency of the engine cannot be evaluated.However\\\n",
+ "according to Carnots statement, the efficiency will be less than %.3f\"%(nr)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "Reversible efficiency = 0.625 \n",
+ "Part b\n",
+ "As the values of at least any two from among Q1,Q2 and W are not given the efficiency of the engine cannot be evaluated.Howeveraccording to Carnots statement, the efficiency will be less than 0.625\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5 Page No : 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "T1 = 273. + 37 \t\t\t#K \n",
+ "T2 = 273. - 13 \t\t\t#K\n",
+ "\n",
+ "\t\t\t#Part(a)\n",
+ "print \"Part a\";\n",
+ "COP_ref = T2/(T1-T2) \t\t\t#COP of reversible heat engine as refrigerator.\n",
+ "print \"COP of reversible heat engine as refrigerator = %.1f\"%(COP_ref)\n",
+ "\t\t\t#Part(b)\n",
+ "print \"Part b\";\n",
+ "COP_hp = T1/(T1-T2) \t\t\t#COP of reversible heat engine as heat pump.\n",
+ "print \"COP of reversible heat engine as heat pump = %.1f\"%(COP_hp)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "COP of reversible heat engine as refrigerator = 5.2\n",
+ "Part b\n",
+ "COP of reversible heat engine as heat pump = 6.2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Engineering_Thermodynamics/ch8.ipynb b/Basic_Engineering_Thermodynamics/ch8.ipynb
new file mode 100755
index 00000000..c856536e
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/ch8.ipynb
@@ -0,0 +1,365 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:6ced269b2d83adfe9e452136249f918e5748b410340744d57a784dbf4aa451de"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8 : Entropy - Available and Unavailable Energy"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.2 Page No : 211"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "Q = 10. \t\t\t#kJ \t\t\t#heat transfered from reservoir\n",
+ "T = 100.+273 \t\t\t#K \t\t\t#isothermal expansion temperature\n",
+ "T_res = 300.+273 \t\t\t#K \t\t\t#reservoir temperature\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "delta_S_sys = (Q/T) \t\t\t#kJ/K \t\t\t#delta S for the system\n",
+ "print \"Change in entropyDelta S) for the system = %.2e kJ/K\"%(delta_S_sys);\n",
+ "\n",
+ "delta_S_res = -1*(Q/T_res) \t\t\t#kJ/K \t\t\t#delta S for the reservoir\n",
+ "print \"Change in entropyDelta S) for the reservoir = %.4e kJ/K\"%(delta_S_res);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropyDelta S) for the system = 2.68e-02 kJ/K\n",
+ "Change in entropyDelta S) for the reservoir = -1.7452e-02 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3 Page No : 212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "Q = 10. \t\t\t#kJ \t\t\t#heat transfered from reservoir\n",
+ "T = 100.+273 \t\t\t#K \t\t\t#isothermal expansion temperature\n",
+ "T_res = 100.+273 \t\t\t#K \t\t\t#reservoir temperature\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "delta_S_sys = (Q/T) \t\t\t#kJ/K \t\t\t#delta S for the system\n",
+ "print \"Change in entropyDelta S) for the system = %.2e kJ/K\"%(delta_S_sys)\n",
+ "\n",
+ "delta_S_res = -1*(Q/T_res) \t\t\t#kJ/K \t\t\t#delta S for the reservoir\n",
+ "print \"Change in entropyDelta S) for the reservoir = %.2e kJ/K\"%(delta_S_res);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropyDelta S) for the system = 2.68e-02 kJ/K\n",
+ "Change in entropyDelta S) for the reservoir = -2.68e-02 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4 Page No : 212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "Q = 1.; \t\t\t#kJ \t\t\t#heat transfered from reservoir\n",
+ "T = 100.+273; \t\t\t#K \t\t\t#isothermal expansion temperature\n",
+ "T_res = 100.+273; \t\t\t#K \t\t\t#reservoir temperature\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "delta_S_res = -1*(Q/T_res); \t\t\t#kJ/K \t\t\t#delta S for the reservoir\n",
+ "print \"Change in entropyDelta S) for the reservoir = %.2e kJ/K\"%(delta_S_res);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropyDelta S) for the reservoir = -2.68e-03 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.12 Page No : 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "pA = 120. \t\t\t#kPa \t\t\t#Pressure at location A\n",
+ "TA = 50.+273 \t\t\t#K \t\t\t#Temperature at location A\n",
+ "VA = 150. \t\t\t#m/s \t\t\t#Velocity at location A\n",
+ "\n",
+ "pB = 100. \t\t\t#kPa \t\t\t#Pressure at location B\n",
+ "TB = 30.+273 \t\t\t#K \t\t\t#Temperature at location B\n",
+ "VB = 250. \t\t\t#m/s \t\t\t#Velocity at location B\n",
+ "\n",
+ "Cp = 1.005 \t\t\t#kJ/kg\n",
+ "R = 0.287 \t\t\t#kJ/kgK\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "delta_S_sys = (Cp*math.log(TB/TA))-(R*math.log(pB/pA)) \t\t\t#kJ/kgK \t\t\t#Entropy of system\n",
+ "if delta_S_sys < 0 :\n",
+ " print \"Flow is from B to A.\";\n",
+ "else:\n",
+ " print \"Flow is from A to B.\" \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Flow is from B to A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.13 Page No : 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# Variables\n",
+ "mi = 5. \t\t\t#kg \t\t\t#mass of ice\n",
+ "Ti = 273. - 10 \t\t\t#K \t\t\t#Temperature of ice\n",
+ "ci = 2.1 \t\t\t#kJ/kgK \t\t\t#specific heat of ice\n",
+ "L = 330. \t\t\t#kJ/kg \t\t\t#Latent heat\n",
+ "mw = 20. \t\t\t#kg \t\t\t#mass of water\n",
+ "Tw = 273.+80 \t\t\t#K \t\t\t#Temperatur of water\n",
+ "cw = 4.2 \t\t\t#kJ/kgK \t\t\t#specific heat of water\n",
+ "\n",
+ "# calculatins and results\n",
+ "\n",
+ "#Part(a)\n",
+ "print \"Part a\";\n",
+ "Tmix = ((mi*ci*(Ti-273))-(L*mi)+(mw*cw*Tw)+(mi*cw*273))/(mw*cw+mi*cw)\n",
+ "print \"Temperature of the mixture when equilibrium is established between ice and water = %.f K\"%(Tmix)\n",
+ "#Part (b)\n",
+ "print \"Part b\";\n",
+ "delta_S_ice = mi*(ci*math.log(273/Ti)+L/273+cw*math.log(Tmix/273))\t\t\t#kJ/K \t\t\t#Entropy of ice\n",
+ "print \"Entropy of ice = %.2f kJ/K\"%(delta_S_ice)\n",
+ "#Part (c)\n",
+ "print \"Part c\";\n",
+ "delta_S_water = mw*(cw*math.log(Tmix/Tw))\t\t\t#kJ/K \t\t\t#Entropy of water\n",
+ "print \"Entropy of water = %.2f kJ/K\"%(delta_S_water)\n",
+ "#Part (d)\n",
+ "print \"Part d\";\n",
+ "delta_S_uni = delta_S_water+delta_S_ice\t\t\t#kJ/K \t\t\t#Entropy of universe\n",
+ "print \"Entropy of universe = %.2f kJ/K\"%(delta_S_uni)\n",
+ "\n",
+ "# note : rounding off error"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "Temperature of the mixture when equilibrium is established between ice and water = 320 K\n",
+ "Part b\n",
+ "Entropy of ice = 9.79 kJ/K\n",
+ "Part c\n",
+ "Entropy of water = -8.17 kJ/K\n",
+ "Part d\n",
+ "Entropy of universe = 1.62 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.14 Page No : 230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "Q1 = 100. \t\t\t#kJ \t\t\t#Heat input\n",
+ "T0 = 300. \t\t\t#K \t\t\t#Surrounding temperature\n",
+ "\n",
+ "\t\t\t#Part(a)\n",
+ "print \"Part a\";\n",
+ "T1 = 1000. \t\t\t#K \t\t\t#reservoir temperature\n",
+ "print \"Avalable enery of 100 kJ of heat from a reservoir at 1000K = %.f kJ\"%(Q1*1-T0/T1)\n",
+ "print \"Unvalable enery of 100 kJ of heat from a reservoir at 1000K = %.1f kJ\"%(Q1*(1-(T0/T1)))\n",
+ "\t\t\t#Part(b)\n",
+ "print \"Part b\";\n",
+ "T1 = 600 \t\t\t#K \t\t\t#reservoir temperature\n",
+ "print \"Avalable enery of 100 kJ of heat from a reservoir at 1000K = %.f kJ\"%(Q1*1-T0/T1)\n",
+ "print \"Unvalable enery of 100 kJ of heat from a reservoir at 1000K = %.1f kJ\"%(Q1*(1-(T0/T1)))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "Avalable enery of 100 kJ of heat from a reservoir at 1000K = 100 kJ\n",
+ "Unvalable enery of 100 kJ of heat from a reservoir at 1000K = 70.0 kJ\n",
+ "Part b\n",
+ "Avalable enery of 100 kJ of heat from a reservoir at 1000K = 100 kJ\n",
+ "Unvalable enery of 100 kJ of heat from a reservoir at 1000K = 50.0 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.15 Page No : 231"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "T0 = 300. \t\t\t#K \t\t\t#Surrounding temperature\n",
+ "T1 = 1000. \t\t\t#K \t\t\t#Temperature of final reservoir\n",
+ "T2 = 600. \t\t\t#K \t\t\t#Temperature of intermediate reservoir\n",
+ "Q1 = 100. \t\t\t#kJ \t\t\t#Heat input\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "print \"Increase in unavaliable energy due to irreversible heat transfer = %.1f kJ\"%(Q1*(1-T0/T1)-Q1*(1-T0/T2))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Increase in unavaliable energy due to irreversible heat transfer = 20.0 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.16 Page No : 234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "T1 = 500. \t\t\t#K\n",
+ "T0 = 300. \t\t\t#K\n",
+ "T2 = 350. \t\t\t#K\n",
+ "W = 250. \t\t\t#kJ\n",
+ "Q1 = 1000. \t\t\t#kJ\n",
+ "\n",
+ "# Results\n",
+ "print \"Available energy = %.1f kJ\"%(((1-T0/T1))*Q1);\n",
+ "print \"Unavailable energy = %.1f kJ\"%(Q1 - (((1-T0/T1))*Q1));\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Available energy = 400.0 kJ\n",
+ "Unavailable energy = 600.0 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Engineering_Thermodynamics/ch9.ipynb b/Basic_Engineering_Thermodynamics/ch9.ipynb
new file mode 100755
index 00000000..a3ffa471
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/ch9.ipynb
@@ -0,0 +1,867 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:db9190b16f5381a0273b385245ae5408db2539c1355e253496c8d01bc2f77490"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9 : Ideal Gas and Ideal Gas Mixtures"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.1 Page No : 253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "m = 6. \t\t\t#kg \t\t\t#mass of nitrogen\n",
+ "M = 28. \t\t\t#kg/kmol \t\t\t#molar mass of nitrogen\n",
+ "R = 8314.3 \t\t\t#kg/kmol\n",
+ "p = 1e5 \t\t\t#Pa \t\t\t#pressure\n",
+ "T = 27.+273 \t\t\t#K \t\t\t#temperature\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "V = m*R*T/(p*M)\n",
+ "print \"Volume occupied by nitrogen = %.3f m**3\"%(V)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume occupied by nitrogen = 5.345 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.2 Page No : 253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "p1 = 10. \t\t\t#bar \t\t\t#inital pressure\n",
+ "T1 = 273.+227 \t\t\t#K \t\t\t#inital temperature\n",
+ "v1 = 0.01 \t\t\t#m**3 \t\t\t#initial volume\n",
+ "p2 = 1. \t\t\t#bar \t\t\t#final pressure\n",
+ "T2 = 273.+27 \t\t\t#K \t\t\t#final temperature\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "v2 = (p1/p2)*(T2/T1)*v1 \t\t\t#m**3 \t\t\t#final volume\n",
+ "print \"Final volume = %.2f m**3\"%(v2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final volume = 0.06 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.3 Page No : 255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "p = 1. \t\t\t#bar \t\t\t#pressure\n",
+ "T = 50.+273 \t\t\t#\u00b0C \t\t\t#temperature\n",
+ "h = 324.6 \t\t\t#kJ/kg \t\t\t#enthalpy\n",
+ "R = 8.3143 \t\t\t#kJ/kmolK\n",
+ "M = 28.97 \t\t\t#kg/kmol\n",
+ "\n",
+ "#Part (a)\n",
+ "print \"Part a\";\n",
+ "u = h - (R/M)*T \t\t\t#kJ/kg \t\t\t#internal energy\n",
+ "print \"Internal energy = %.1f kJ/kg\"%(u)\n",
+ "\n",
+ "#Part (b)\n",
+ "print \"Part b:i\";\n",
+ "u = h - (R/M)*T \t\t\t#kJ/kg \t\t\t#internal energy\n",
+ "print \"Enthalpy = %.1f kJ/kg\"%(h)\n",
+ "print \"Internal energy = %.1f kJ/kg\"%(u)\n",
+ "print \"Part b:ii\";\n",
+ "u = h - (R/M)*T \t\t\t#kJ/kg \t\t\t#internal energy\n",
+ "print \"Enthalpy = %.1f kJ/kg\"%(h)\n",
+ "print \"Internal energy = %.1f kJ/kg\"%(u)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "Internal energy = 231.9 kJ/kg\n",
+ "Part b:i\n",
+ "Enthalpy = 324.6 kJ/kg\n",
+ "Internal energy = 231.9 kJ/kg\n",
+ "Part b:ii\n",
+ "Enthalpy = 324.6 kJ/kg\n",
+ "Internal energy = 231.9 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.4 Page No : 256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\t\n",
+ "# Variables\n",
+ "Cv = 718 \t\t\t#J/kgK \t\t\t#specific at constant volume\n",
+ "M = 28.97 \t\t\t#kg/kmol \t\t\t#molar mass of air\n",
+ "R = 8314.3 \t\t\t#J/kmolK\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "Cp = (R/M)+Cv \t\t\t#J/kgK \t\t\t#specific heat at constant pressure\n",
+ "print \"Specific heat at constant pressure = %.0f J/kg K\"%(Cp)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific heat at constant pressure = 1005 J/kg K\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.5 Page No : 258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "p1 = 1. \t\t\t#bar \t\t\t#initial pressure\n",
+ "T1 = 27.+273 \t\t\t#K \t\t\t#initial temperature\n",
+ "p2 = 10. \t\t\t#bar \t\t\t#final pressure\n",
+ "T2 = 327.+273 \t\t\t#K \t\t\t#final temperature\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#Part(a)\n",
+ "print \"Part a\";\n",
+ "\n",
+ "def f2(T): \n",
+ "\t return 1.4-18.3*(T/100)**(-1.5)+38.3*(T/100)**(-2)-29.3*(T/100)**(-3)\n",
+ "\n",
+ "delta_h = quad(f2,T1,T2)[0]\n",
+ "\n",
+ "print \"Increase in specific enthalpy = %.2f kJ/kg\"%(delta_h)\n",
+ "\n",
+ "#Part(b)\n",
+ "print \"Part b\";\n",
+ "\n",
+ "def f3(T): \n",
+ "\t return 1.042\n",
+ "\n",
+ "delta_h = quad(f3,T1,T2)[0]\n",
+ "\n",
+ "print \"Increase in specific enthalpy at Cp = 1.042 kJ/kgK) = %.2f kJ/kg\"%(delta_h)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "Increase in specific enthalpy = 317.34 kJ/kg\n",
+ "Part b\n",
+ "Increase in specific enthalpy at Cp = 1.042 kJ/kgK) = 312.60 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.6 Page No : 268"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "\n",
+ "from numpy import *\n",
+ "from matplotlib.pyplot import *\n",
+ "import math \n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "Cp = 1005. \t\t\t#J/kgK \t\t\t#specific heat at constant pressure\n",
+ "Cv = 718. \t\t\t#J/kgK \t\t\t#specific heat at constant volume\n",
+ "m = 1. \t\t\t#kg \t\t\t#mass of air\n",
+ "T1 = (27.+273) \t\t\t#K \t\t\t#initial temperature\n",
+ "p1 = 1e5 \t\t\t#Pa \t\t\t#initial pressure\n",
+ "p2 = p1/2. \t\t\t#Pa \t\t\t#final pressure\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#Part(a)\n",
+ "print \"Parta\";\n",
+ "R = Cp-Cv \t\t\t#J/kgK\n",
+ "V1_a = m*R*T1/p1 \t\t\t#m**3 \t\t\t#initial volume\n",
+ "V2_a = V1_a \t\t\t#m**3 \t\t\t#final volume\n",
+ "T2 = p2*V2_a/(m*R) \t\t\t#K \t\t\t#final temperature\n",
+ "print \"Final temperature,T2 = %.1f K\"%(T2)\n",
+ "\n",
+ "#Part(b)\n",
+ "print \"Partb\";\n",
+ "V1_b = m*R*T1/p1 \t\t\t#m**3 \t\t\t#initial volume\n",
+ "V2_b = V1_b*(p1/p2) \t\t\t#m**3 \t\t\t#final volume\n",
+ "#Isothermal process => T1 = T2\n",
+ "print \"Final temperature,T2 = %.1f K\"%(T1)\n",
+ "\n",
+ "#Part(c)\n",
+ "print \"Partc\";\n",
+ "R = Cp-Cv \t\t\t#J/kgK\n",
+ "y = Cp/Cv\n",
+ "V1_c = m*R*T1/p1 \t\t\t#m**3 \t\t\t#initial volume\n",
+ "V2_c = V1_c*(p1/p2)**(1/y) \t\t\t#m**3 \t\t\t#final volume\n",
+ "T2 = p2*V2_c/(m*R) \t\t\t#K \t\t\t#final temperature\n",
+ "print \"Final temperature,T2 = %.0f K\"%(T2)\n",
+ "\n",
+ "#P-V diagram\n",
+ "P = [p1*1e-5, p2*1e-5]\n",
+ "V = [V1_a ,V1_a]\n",
+ "plot(V,P,'b') \t\t\t#plot for part(a)\n",
+ "\n",
+ "V = linspace(V1_b,V2_b,100)\n",
+ "P = (p1*1e-5*V1_b)/V\n",
+ "plot(V,P,'g') \t\t\t#plot for part(b)\n",
+ "\n",
+ "V = linspace(V1_c,V2_c,100)\n",
+ "P = (p1*1e-5*V1_c**y)/V**y\n",
+ "plot(V,P,'r') \t\t\t#plot for part(c)\n",
+ "xlabel('Volume in m**3')\n",
+ "ylabel('Pressure in bar')\n",
+ "suptitle('p-V diagram sought in example 9.6')\n",
+ "#legends(['Part (a)';'Part (b)';'Part (c)'],[2 3 5],opt=1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parta\n",
+ "Final temperature,T2 = 150.0 K\n",
+ "Partb\n",
+ "Final temperature,T2 = 300.0 K\n",
+ "Partc\n",
+ "Final temperature,T2 = 246 K\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 1,
+ "text": [
+ "<matplotlib.text.Text at 0x1100b2a90>"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEhCAYAAAB7mQezAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4FNXbxvFvCr13qdIERERqpKkBRYoC0nsVBRUFUfQn\nFvBFbCBFEUV6R1CqKFWiNKmRKkiVKnZEFEnZ94+zMZuwSXaTnZ1Ncn+uK1dmZ2dnnkySeeacM+cc\nEBEREREREREREREREREREREREREREfGZEcDridbVAA6n8LlwYJVzuRXwvG/DShfKAgeSeK83UDyJ\n914F7rUiIIv1Ad7zYvuswExgP/AtcE8y2z4JfAccBN5KZXwi4iO3ACcSrXsTeCmFz4UTnxh8Jcj5\nlV6UJenEsAmo7b9Q/KI33iWGJ4DpzuUiwG7c/34bA+uBLC7bSgAJtjsA8amywBFgHqYEsATIkWib\nY8DvQJjLuo7AQjf7a465q9sDtHVZ34f4C0Yr4BtgL+afvahzfRHn64PAVOA0UNAZ41FgNuYiWxqY\nDOxybjvS5TinMaWbSMxFphawDjgODHATby5gNeZu9QDQybn+Xmd8+zEXrqwu+y/oXK6DubgnFztA\nCPCR8721QHagg/Pz853HyZ4orllAe5djjsSc0/1AZTc/RwgwBtgJ7AMeda5/mvgL7+3OnzE75ne5\nzXnsrUAl5zZ9gOWYc3YKGA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Ixcwa526/ceJG86yB\nufA/kkQs5ZyxtwbmYUa9rI4Z+O0BzKBvA4G5mAHhRiWxLs5MzNj71TFDhYikihKDpBcLMQkBzACL\nCzEX9AjMWEkxwHzgbg/25VpXHzfI3EHn1yXMmDMnMQP03YsZtXQ3psTQBHNBT851YLVzeQ+m1JKY\nA1MyiHEeNxhY63zvgPMz+zBtKb9hktbLSayL0xeTLPcDL6YQo0iSAmk+BpHkrATGY+7ac2Iu0qUT\nbRPEjfNSRJPwBihHom3+dX6PdVmOex33/zEbM6a9p6KS2E9i1122Se4zr7r5rLt1cZ9dBDyXcpgi\n7qnEIOnFX5jZuGYCC5zrdgH3AIUwwyt3Ab5K9LlLmDr+gkA24EEvjukANgIdgCLOdQUxJYlAU9H5\nPQhTNRVpYyySzqnEIOnJQszcC52cry9iZizbhLkgfoYZXhjiSwVRwP9h2ijOk/SY/K5tD66+wzzh\nsw5zIxUFPA6cSSZOR6LlpGbXS7xdUu+lJAiYRfy8vruBJ7z4vIiIiIiIiIiIiIiIiIiIiIiIiIiI\niIiIiIiIiIj9/h8kPPiCgRrEnAAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x112341d50>"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.7 Page No : 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy.linalg import solve\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "p1 = 10e6 \t\t\t#N/m**2 \t\t\t#initial pressure\n",
+ "T1 = 273.+27 \t\t\t#K \t\t\t#inital temperature\n",
+ "V1 = 50.e-3 \t\t\t#m**3 \t\t\t#inital volume\n",
+ "M = 28. \t\t\t#g/mol \t\t\t#molecular mass\n",
+ "R = 8314.3/M \t\t\t#J/kgK\n",
+ "y = 1.4 \t\t\t#gamma\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#Part(a)\n",
+ "print 'Parta';\n",
+ "m = (p1*V1)/(R*T1)\n",
+ "print \"Mass of nitrogen stored in bottle = %.3f kg\"%(m)\n",
+ "\n",
+ "#Part(b):(i)\n",
+ "print 'Partb:i';\n",
+ "p2 = 15e6 \t\t\t#N/m**2 \t\t\t#final pressure\n",
+ "V2 = V1 \t\t\t#m**3 \t\t\t#final volume\n",
+ "T2 = (p2*V2)/(m*R)\n",
+ "print \"Temperature of nitrogen at maximum permitted temperature = %.1f K\"%(T2)\n",
+ "\n",
+ "#Part(b):(ii)\n",
+ "print 'Partb:ii';\n",
+ "C = solve([[1, -1.4],[1, -1]],[[0],[R]]) \t\t\t#J/kgK \t\t\t#C = [Cp;Cv]\n",
+ "delta_U = m*C[1]*(T2-T1)*.001 \t\t\t#kJ \t\t\t#Change in internal energy\n",
+ "print \"Change in internal energy = %.1f kJ\"%(delta_U)\n",
+ "\n",
+ "#Part(b):(iii)\n",
+ "print 'Partb:iii';\n",
+ "delta_H = m*C[0]*(T2-T1)*.001 \t\t\t#kJ \t\t\t#Change in enthalpy\n",
+ "print \"Change in enthalpy = %.1f kJ\"%(delta_H)\n",
+ "\n",
+ "#Part(b):(iv)\n",
+ "print 'Partb:iv';\n",
+ "delta_S = m*(C[1]*math.log(T2/T1)+R*math.log(V2/V1))*.001 \t\t\t#kJ/K \t\t\t#Change in entropy\n",
+ "print \"Change in entropy = %.4f kJ/K\"%(delta_S)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parta\n",
+ "Mass of nitrogen stored in bottle = 5.613 kg\n",
+ "Partb:i\n",
+ "Temperature of nitrogen at maximum permitted temperature = 450.0 K\n",
+ "Partb:ii\n",
+ "Change in internal energy = 625.0 kJ\n",
+ "Partb:iii\n",
+ "Change in enthalpy = 875.0 kJ\n",
+ "Partb:iv\n",
+ "Change in entropy = 1.6894 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.8 Page No : 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "T1 = 800. \t\t\t#K \t\t\t#initial temperature\n",
+ "p1 = 1.5e6 \t\t\t#N/m**2 \t\t\t#initial pressure\n",
+ "T2 = 540. \t\t\t#K \t\t\t#final temperature\n",
+ "T2s = 485. \t\t\t#K \t\t\t#final temperature for reversible process\n",
+ "Q = 0. \t\t\t#adiabatic process\n",
+ "y = 1.4\n",
+ "Cv = 718. \t\t\t#J/kgK \t\t\t#specific heat at constant volume\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "delta_U = Cv*(T2-T1) \t\t\t#kJ/kg \t\t\t#change in internal energy\n",
+ "W = (Q-delta_U)*.001 \t\t\t#kJ/kg \t\t\t#work done per kilogram\n",
+ "print \"Work done per kilogram = %.1f kJ/kg\"%(W);\n",
+ "\n",
+ "p2 = p1*(T2s/T1)**(y/(y-1)) \t\t\t#N/m**2 \t\t\t#final pressure\n",
+ "delta_S = (y*Cv)*math.log(T2/T1)-(y*Cv-Cv)*math.log(p2/p1)\n",
+ "print \"Change in entropy = %.3f kJ/kgK\"%(delta_S*.001)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done per kilogram = 186.7 kJ/kg\n",
+ "Change in entropy = 0.108 kJ/kgK\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9 Page No : 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "xCO2 = 0.1 \t\t\t#mole fraction of CO2\n",
+ "xO2 = .09 \t\t\t#mole fraction of O2\n",
+ "xCO = 0.01 \t\t\t#mole fraction of CO\n",
+ "xN2 = 0.8 \t\t\t#mole fraction of N2\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "M = xCO2*44 + xO2*32 + xCO*28 + xN2*28 \t\t\t#kg/kmol \t\t\t#avg. molar mass\n",
+ "R = 8314.3/M \t\t\t#J/kgK \t\t\t#gas constant\n",
+ "yCO2 = xCO2*(44/M) \t\t\t#mass fraction of CO2\n",
+ "yO2 = xO2*(32/M) \t\t\t#mass fraction of O2\n",
+ "yCO = xCO*(28/M) \t\t\t#mass fraction of CO\n",
+ "yN2 = xN2*(28/M) \t\t\t#mass fraction of N2\n",
+ "\n",
+ "print \"Molar Mass = %.2f kg/kmol\"%(M);\n",
+ "print \"Gas constant = %.1f J/kgK\"%(R);\n",
+ "print \"Mass fraction of CO2 = %.4f \"%(yCO2);\n",
+ "print \"Mass fraction of O2 = %.4f \"%(yO2);\n",
+ "print \"Mass fraction of CO = %.4f \"%(yCO);\n",
+ "print \"Mass fraction of N2 = %.4f \"%(yN2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Molar Mass = 29.96 kg/kmol\n",
+ "Gas constant = 277.5 J/kgK\n",
+ "Mass fraction of CO2 = 0.1469 \n",
+ "Mass fraction of O2 = 0.0961 \n",
+ "Mass fraction of CO = 0.0093 \n",
+ "Mass fraction of N2 = 0.7477 \n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.10 Page No : 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "m = 1.9 \t\t\t#kg\n",
+ "T = 273.+20 \t\t\t#K\n",
+ "p = 150.e3 \t\t\t#Pa\n",
+ "yO2 = 0.1 \t\t\t#mass fraction of O2\n",
+ "yN2 = 0.75 \t\t\t#mass fraction of N2\n",
+ "yCO2 = 0.12 \t\t\t#mass fraction of CO2\n",
+ "yCO = 0.03 \t\t\t#mass fraction of CO\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#Part(a)\n",
+ "print \"Parta\";\n",
+ "M = 1/((yO2/32)+(yN2/28)+(yCO/28)+(yCO2/44)) \t\t\t#kg/kmol \t\t\t#molar mass\n",
+ "print \"Molar mass = %.2f kg/kmol \"%(M)\n",
+ "R = 8314.3/M \t\t\t#J/kgK \t\t\t#Gas constant\n",
+ "print \"Gas constant = %.2f J/kgK \"%(R)\n",
+ "V = m*R*T/p \t\t\t#m**3 \t\t\t#Volume\n",
+ "\n",
+ "#Part(b)\n",
+ "print \"Partb\"\n",
+ "xO2 = yO2*(M/32) \t\t\t#mole fraction O2\n",
+ "print \"Mole fraction of O2 = %.3f\"%(xO2)\n",
+ "pO2 = xO2*p \t\t\t#partial pressure O2\n",
+ "print \"Partial pressure of O2 = %.2f kPa\"%(pO2*.001)\n",
+ "VO2 = xO2*V \t\t\t#partial volume of O2\n",
+ "print \"Partial volume of O2 = %.4f m**3\"%(VO2)\n",
+ "\n",
+ "\n",
+ "xN2 = yN2*(M/28) \t\t\t#mole fraction N2\n",
+ "print \"Mole fraction of N2 = %.3f\"%(xN2)\n",
+ "pN2 = xN2*p \t\t\t#partial pressure N2\n",
+ "print \"Partial pressure of N2 = %.2f kPa\"%(pN2*.001)\n",
+ "VN2 = xN2*V \t\t\t#partial volume of N2\n",
+ "print \"Partial volume of N2 = %.4f m**3\"%(VN2)\n",
+ "\n",
+ "\n",
+ "xCO2 = yCO2*(M/44) \t\t\t#mole fraction CO2\n",
+ "print \"Mole fraction of CO2 = %.3f\"%(xCO2)\n",
+ "pCO2 = xCO2*p \t\t\t#partial pressure CO2\n",
+ "print \"Partial pressure of CO2 = %.2f kPa\"%(pCO2*.001)\n",
+ "VCO2 = xCO2*V \t\t\t#partial volume of CO2\n",
+ "print \"Partial volume of CO2 = %.4f m**3\"%(VCO2)\n",
+ "\n",
+ "\n",
+ "xCO = yCO*(M/28) \t\t\t#mole fraction CO\n",
+ "print \"Mole fraction of CO = %.3f\"%(xCO)\n",
+ "pCO = xCO*p \t\t\t#partial pressure CO\n",
+ "print \"Partial pressure of CO = %.2f kPa\"%(pCO*.001)\n",
+ "VCO = xCO*V \t\t\t#partial volume of CO\n",
+ "print \"Partial volume of CO = %.4f m**3\"%(VCO)\n",
+ "\n",
+ "# note : rounding off error"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parta\n",
+ "Molar mass = 29.67 kg/kmol \n",
+ "Gas constant = 280.27 J/kgK \n",
+ "Partb\n",
+ "Mole fraction of O2 = 0.093\n",
+ "Partial pressure of O2 = 13.91 kPa\n",
+ "Partial volume of O2 = 0.0964 m**3\n",
+ "Mole fraction of N2 = 0.795\n",
+ "Partial pressure of N2 = 119.19 kPa\n",
+ "Partial volume of N2 = 0.8265 m**3\n",
+ "Mole fraction of CO2 = 0.081\n",
+ "Partial pressure of CO2 = 12.14 kPa\n",
+ "Partial volume of CO2 = 0.0842 m**3\n",
+ "Mole fraction of CO = 0.032\n",
+ "Partial pressure of CO = 4.77 kPa\n",
+ "Partial volume of CO = 0.0331 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.11 Page No : 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "from numpy.linalg import solve\n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "R = 1841. \t\t\t#J/kgK \t\t\t#Gas constant\n",
+ "Cp = 6310. \t\t\t#J/kgK \t\t\t#specific heat at constant pressure\n",
+ "MN = 28. \t\t\t#kg/kmol \t\t\t#molar mass N2\n",
+ "MH = 2. \t\t\t#kg/kmol \t\t\t#molar mass H2\n",
+ "CpN = 1042. \t\t\t#J/kgK \t\t\t#specific heat of N2\n",
+ "CpH = 14210. \t\t\t#J/kgK \t\t\t#specific heat of H2\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "Y = solve([[8314.3/MN, 8314.3/MH],[CpN, CpH]],[[R],[ Cp]])\n",
+ "YN = round(Y[0],1) \t\t\t#mass fraction of N2\n",
+ "YH = round(Y[1],1) \t\t\t#mass fraction of H2\n",
+ "XN = YN*(8314.3/(R*MN)) \t\t\t#volume fraction of N2\n",
+ "XH = YH*(8314.3/(R*MH)) \t\t\t#volume fraction of H2\n",
+ "print \"Mass fraction of N2 = %.1f \"%(YN)\n",
+ "print \"Mass fraction of H2 = %.1f \"%(YH)\n",
+ "print \"Volume fraction of N2 = %.4f \"%(XN)\n",
+ "print \"Volume fraction of H2 = %.4f \"%(XH)\n",
+ "\n",
+ "# note : rounding off error"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass fraction of N2 = 0.6 \n",
+ "Mass fraction of H2 = 0.4 \n",
+ "Volume fraction of N2 = 0.0968 \n",
+ "Volume fraction of H2 = 0.9032 \n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.12 Page No : 284"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "m = 1.9 \t\t\t#kg\n",
+ "T = 273.+20 \t\t\t#K\n",
+ "p = 150. \t\t\t#kPa\n",
+ "pdat = 100. \t\t\t#kPa \t\t\t#datum pressure\n",
+ "Tdat = 273. \t\t\t#K \t\t\t#datum temperature\n",
+ "yO2 = 0.1 \t\t\t#mass fraction of O2\n",
+ "yN2 = 0.75 \t\t\t#mass fraction of N2\n",
+ "yCO2 = 0.12 \t\t\t#mass fraction of CO2\n",
+ "yCO = 0.03 \t\t\t#mass fraction of CO\n",
+ "xO2 = 0.093 \t\t\t#mole fraction of O2\n",
+ "xN2 = 0.795 \t\t\t#mole fraction of N2\n",
+ "xCO2 = 0.081 \t\t\t#mole fraction of CO2\n",
+ "xCO = 0.031 \t\t\t#mole fraction of CO\n",
+ "R = 280.22 \t\t\t#J/kgK\n",
+ "M = 29.67 \t\t\t#kg/kmol \t\t\t#mixture molar mass\n",
+ "CpO2=0.922 \t\t\t#kJ/kgK\n",
+ "CpN2=1.042 \t\t\t#kJ/kgK\n",
+ "CpCO2=0.842 \t\t\t#kJ/kgK\n",
+ "CpCO=1.041 \t\t\t#kJ/kgK\n",
+ "\n",
+ "#Part(a)\n",
+ "print \"Parta\";\n",
+ "Cp = yN2*CpN2 + yO2*CpO2 + yCO2*CpCO2 + yCO*CpCO \t\t\t#kJ/kgK \t\t\t# specific heat of mixture at constant pressure\n",
+ "Cv = Cp - R*.001 \t\t\t#specific heat of mixture at constant volume\n",
+ "print \"Cp = %.3f kJ/kgK\"%(Cp)\n",
+ "print \"Cv = %.4f kJ/kgK\"%(Cv) \n",
+ "\n",
+ "#Part(b)\n",
+ "print \"Partb\";\n",
+ "U = m*(Cv*(T-Tdat)) \t\t\t#kJ \t\t\t#internal energy\n",
+ "print \"Internal energy = %.2f kJ\"%(U)\n",
+ "\n",
+ "#Part(c)\n",
+ "print \"Partc\"\n",
+ "H = U + m*R*T*.001 \t\t\t#kJ \t\t\t#enthalpy\n",
+ "print \"Enthalpy = %.1f kJ\"%(H)\n",
+ "\n",
+ "#Part(d)\n",
+ "print \"Partd\"\n",
+ "SO2 = CpO2*math.log(T/Tdat)-(8.3143/32)*math.log(xO2*(p/pdat)) \t\t\t#kJ/kgK \t\t\t#entropy of O2\n",
+ "SN2 = CpN2*math.log(T/Tdat)-(8.3143/28)*math.log(xN2*(p/pdat)) \t\t\t#kJ/kgK \t\t\t#entropy of N2\n",
+ "SCO2 = CpCO2*math.log(T/Tdat)-(8.3143/44)*math.log(xCO2*(p/pdat)) \t\t\t#kJ/kgK \t\t\t#entropy of CO2\n",
+ "SCO = CpCO*math.log(T/Tdat)-(8.3143/28)*math.log(xCO*(p/pdat)) \t\t\t#kJ/kgK \t\t\t#entropy of CO\n",
+ "\n",
+ "S = m*(yO2*SO2+yN2*SN2+yCO2*SCO2+yCO*SCO) \t\t\t#kJ/K \t\t\t#entropy\n",
+ "print \"Entropy = %.4f kJ/K\"%(S)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parta\n",
+ "Cp = 1.006 kJ/kgK\n",
+ "Cv = 0.7258 kJ/kgK\n",
+ "Partb\n",
+ "Internal energy = 27.58 kJ\n",
+ "Partc\n",
+ "Enthalpy = 183.6 kJ\n",
+ "Partd\n",
+ "Entropy = 0.3006 kJ/K\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.13 Page No : 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "V_He = 0.3 \t\t\t#m**3 \t\t\t#volume of Helium\n",
+ "p_He = 20e5 \t\t\t#Pa \t\t\t#pressure of Helium\n",
+ "T_He = 273.+30 \t\t\t#K \t\t\t#Temperature of Helium\n",
+ "V_O2 = 0.7 \t\t\t#m**3 \t\t\t#volume of O2\n",
+ "p_O2 = 6e5 \t\t\t#Pa \t\t\t#pressure of O2\n",
+ "T_O2 = 273.+2 \t\t\t#K Temperature of O2\n",
+ "R_He = 2077. \t\t\t#J/kgK\n",
+ "R_O2 = 260. \t\t\t#J/kgK\n",
+ "Cv_He = 3116. \t\t\t#J/kgK\n",
+ "Cv_O2 = 662. \t\t\t#J/kgK\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "m_He = (p_He*V_He)/(R_He*T_He) \t\t\t#kg \t\t\t#mass of Helium\n",
+ "m_O2 = (p_O2*V_O2)/(R_O2*T_O2) \t\t\t#kg \t\t\t#mass of O2\n",
+ "T_ad = (m_He*Cv_He*T_He+m_O2*Cv_O2*T_O2)/(m_He*Cv_He+m_O2*Cv_O2) \t\t\t#K \t\t\t#Temperature after mixing\n",
+ "T_final = 300 \t\t\t#K \t\t\t#final temperature\n",
+ "Q = (Cv_He*m_He+Cv_O2*m_O2)*(T_final-T_ad) \t\t\t#J \t\t\t#Magnitude of heat transfer\n",
+ "print \"Magnitude of heat transfer = %.2f kJ\"%(Q*.001)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnitude of heat transfer = 88.30 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.14 Page No : 289"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\t\t\n",
+ "# Variables\n",
+ "T_E = (273.+20) \t\t\t#K \t\t\t#temperature of ethane\n",
+ "p_E = 200. \t\t\t#kPa \t\t\t#pressure of ethane\n",
+ "T_M = 273.+45 \t\t\t#K \t\t\t#temperature of methane\n",
+ "p_M = 200. \t\t\t#kPa \t\t\t#pressure of methane\n",
+ "m_E = 9. \t\t\t#kg/s \t\t\t#mass rate of ethane\n",
+ "m_M = 4.5 \t\t\t#kg/s \t\t\t#mass rate of methane\n",
+ "Cp_E = 1766. \t\t\t#J/kgK \t\t\t#specific heat of ethane\n",
+ "Cp_M = 2254. \t\t\t#J/kgK \t\t\t#specific heat of methane\n",
+ "\n",
+ "\t\t\t\n",
+ "# Calculations and Results\n",
+ "#Part(a)\n",
+ "print \"Parta\";\n",
+ "T = (m_E*Cp_E*T_E+m_M*Cp_M*T_M)/(m_E*Cp_E+m_M*Cp_M) \t\t\t#K \t\t\t#mixture temperature\n",
+ "print \"Mixture temperature = %.1f K\"%(T)\n",
+ "\n",
+ "#Part(b)\n",
+ "print \"Partb\";\n",
+ "R_E = 8314.3/30 \t\t\t#J/kgK \t\t\t#gas constant for ethane\n",
+ "R_M = 8314.3/16 \t\t\t#J/kgK \t\t\t#gas constant for methane\n",
+ "R = (m_E/(m_E+m_M))*R_E+(m_M/(m_E+m_M))*R_M \t\t\t#J/kgK \t\t\t#gas constant of mixture\n",
+ "M = 8314.3/R \t\t\t#kg/kmol \t\t\t#mixture molar mass\n",
+ "x_E = (m_E/(m_E+m_M))*(M/30) \t\t\t#mole fraction of ethane\n",
+ "x_M = (m_M/(m_E+m_M))*(M/16) \t\t\t#mole fraction of methane\n",
+ "\n",
+ "delta_S_E = Cp_E*math.log(T/T_E) - R_E*math.log(x_E) \t\t\t#J/kgK \t\t\t#change in entropy of ethane\n",
+ "delta_S_M = Cp_M*math.log(T/T_M) - R_M*math.log(x_M) \t\t\t#J/kgK \t\t\t#change in entropy of methane\n",
+ "\n",
+ "print \"Rate of entropy production = %.4f kJ/sK\"%((m_E*delta_S_E+m_M*delta_S_M)*.001)\n",
+ "\n",
+ "# note : rounding off error"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parta\n",
+ "Mixture temperature = 302.7 K\n",
+ "Partb\n",
+ "Rate of entropy production = 3.3681 kJ/sK\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Basic_Engineering_Thermodynamics/screenshots/3.png b/Basic_Engineering_Thermodynamics/screenshots/3.png
new file mode 100755
index 00000000..89b82c27
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/screenshots/3.png
Binary files differ
diff --git a/Basic_Engineering_Thermodynamics/screenshots/6.png b/Basic_Engineering_Thermodynamics/screenshots/6.png
new file mode 100755
index 00000000..b767f067
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/screenshots/6.png
Binary files differ
diff --git a/Basic_Engineering_Thermodynamics/screenshots/PVDiagram9.png b/Basic_Engineering_Thermodynamics/screenshots/PVDiagram9.png
new file mode 100755
index 00000000..cb4c5108
--- /dev/null
+++ b/Basic_Engineering_Thermodynamics/screenshots/PVDiagram9.png
Binary files differ