summaryrefslogtreecommitdiff
path: root/Engineering_Thermodynamics_by_Dr._S._S._Khandare
diff options
context:
space:
mode:
authorTrupti Kini2016-02-14 23:30:12 +0600
committerTrupti Kini2016-02-14 23:30:12 +0600
commit01eccafd5e05ee10df8447dbd1e2bc3e27af8d04 (patch)
tree1b6909a3a04b7410df6798fce902c2dc6f9c7f87 /Engineering_Thermodynamics_by_Dr._S._S._Khandare
parent061569f018be96328fd8d26f635f1cbada72a7b9 (diff)
downloadPython-Textbook-Companions-01eccafd5e05ee10df8447dbd1e2bc3e27af8d04.tar.gz
Python-Textbook-Companions-01eccafd5e05ee10df8447dbd1e2bc3e27af8d04.tar.bz2
Python-Textbook-Companions-01eccafd5e05ee10df8447dbd1e2bc3e27af8d04.zip
Added(A)/Deleted(D) following books
A A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER11.ipynb A A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER12.ipynb A A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER15.ipynb A A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER16.ipynb A A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER17.ipynb A A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER20.ipynb A A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER21.ipynb A A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER3.ipynb A A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER4.ipynb A A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER5.ipynb A A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER7.ipynb A A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/screenshots/HeatTransfer(3).png A A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/screenshots/cycleWorkEff(4).png A A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/screenshots/volumetric_Eff(7).png A Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_1.ipynb A Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_2.ipynb A Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_3.ipynb A Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_4.ipynb A Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_5.ipynb A Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_6.ipynb A Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_7.ipynb A Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_8.ipynb A Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file1.png A Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file2.png A Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file3.png A sample_notebooks/MohdGufran/chapter_10.ipynb
Diffstat (limited to 'Engineering_Thermodynamics_by_Dr._S._S._Khandare')
-rw-r--r--Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_1.ipynb382
-rw-r--r--Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_2.ipynb967
-rw-r--r--Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_3.ipynb1450
-rw-r--r--Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_4.ipynb113
-rw-r--r--Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_5.ipynb579
-rw-r--r--Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_6.ipynb1446
-rw-r--r--Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_7.ipynb249
-rw-r--r--Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_8.ipynb958
-rw-r--r--Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file1.pngbin0 -> 31689 bytes
-rw-r--r--Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file2.pngbin0 -> 42108 bytes
-rw-r--r--Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file3.pngbin0 -> 37647 bytes
11 files changed, 6144 insertions, 0 deletions
diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_1.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_1.ipynb
new file mode 100644
index 00000000..2f8362cd
--- /dev/null
+++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_1.ipynb
@@ -0,0 +1,382 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter No - 1 : Introduction\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 1.1- Page No : 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data\n",
+ "P_m = 760 # pressure of mercury in mm\n",
+ "P_m_bar = P_m/750 # in bar\n",
+ "P_W = 0.006867 # pressure of water in bar\n",
+ "P = P_m_bar+P_W # in bar\n",
+ "print \"The absolute pressure of gas = %0.3f bar \" %P"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The absolute pressure of gas = 1.020 bar \n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 1.2- Page No : 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Rho = 13.6 \n",
+ "g = 9.81 \n",
+ "a = 760 # in mm\n",
+ "b = 480 # in mm\n",
+ "h = a-b # in mm\n",
+ "P = (1000*Rho*g*h)/(1000) # in N/m**2\n",
+ "P= int(P/100)*100 #in N/m**2\n",
+ "print \"The absolute pressure = %0.f N/m**2 \" %P\n",
+ "P = int(P /100) # in mbar\n",
+ "print \"The absolute pressure = %0.f mbar \" %P"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The absolute pressure = 37300 N/m**2 \n",
+ "The absolute pressure = 373 mbar \n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 1.3- Page No : 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "\n",
+ "G_P = 30 # guage pressure of steam in bar\n",
+ "P1 = 745 # in mm\n",
+ "P1= P1/750 # in bar\n",
+ "PressureInBoiler = G_P+P1 # in bar\n",
+ "print \"The absolute pressure in the bioler =\",round(PressureInBoiler,3),\"bar\"\n",
+ "P2 = 708.2 # in mm\n",
+ "P2= P2/750 # in \n",
+ "PressureInCond = P1-P2 # in bar\n",
+ "print \"The absolute pressure in the Condenser = %0.4f bar \" %PressureInCond\n",
+ "PressureInCond = round(PressureInCond*10**4)*10**1 # in N/m**2\n",
+ "print \"The absolute pressure in the Condenser = %0.f N/m**2 \" %(PressureInCond)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The absolute pressure in the bioler = 30.993 bar\n",
+ "The absolute pressure in the Condenser = 0.0491 bar \n",
+ "The absolute pressure in the Condenser = 4910 N/m**2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 1.4- Page No : 7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "\n",
+ "Rho = 0.78 # in kg/m**3\n",
+ "g = 9.81 \n",
+ "h = 3 # in m\n",
+ "b = g*Rho*h*1000 # in N/m**2\n",
+ "b = b * 10**-3 # in kN/m**2\n",
+ "print \"The gauge pressure = %0.3f kN/m**2 \" %b"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The gauge pressure = 22.955 kN/m**2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 1.5- Page No : 7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "\n",
+ "B_h = 755 # Barometric height in mm\n",
+ "M_h= 240 # Manometer height in mm\n",
+ "P = B_h+M_h # in mm \n",
+ "P = P/750 # absolute pressure in bar\n",
+ "P= P*10**5 # in N/m**2\n",
+ "print \"The absolute pressure in the vessel = %0.4f MN/m**2 \" %(P*10**-6)\n",
+ "print \"The absolute pressure in the vessel = %0.3f bar \" %(P*10**-5)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The absolute pressure in the vessel = 0.1327 MN/m**2 \n",
+ "The absolute pressure in the vessel = 1.327 bar \n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 1.6- Page No : 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "\n",
+ "T = 287 # in degree C\n",
+ "T = T + 273 # in K\n",
+ "print \"The temperature on absolute scale = %0.f K \" %T"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature on absolute scale = 560 K \n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 1.7- Page No : 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "# Given data\n",
+ "\n",
+ "a = 0.26 \n",
+ "b = 5*10**-4 \n",
+ "E = 10 # in mV\n",
+ "T = (a/(2*b))*( sqrt(1+(4*E*b/a**2)) - 1 ) # in degree C\n",
+ "print \"The unit of a will be mV/\u00b0C and the unit of b will be mV/\u00b0C**2\"\n",
+ "print \"The Temperature = %0.2f degree C \" %T"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The unit of a will be mV/\u00b0C and the unit of b will be mV/\u00b0C**2\n",
+ "The Temperature = 35.97 degree C \n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 1.8- Page No : 15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "\n",
+ "Q_w = 500 # quantity of water flowing in kg/minute\n",
+ "T1 = 80 # in \u00b0 C\n",
+ "T2 = 20 # in \u00b0C\n",
+ "del_T = T1-T2 # in \u00b0C\n",
+ "Spe_heat = 4.182 # in kJ/kg\n",
+ "Q_h = Q_w*del_T*Spe_heat # in kJ/minute\n",
+ "print \"Quantity of heat supplied to water in the economizer is\",int(Q_h),\"kJ/minute or\",round(Q_h*10**-3,2),\" MJ/minute\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Quantity of heat supplied to water in the economizer is 125460 kJ/minute or 125.46 MJ/minute\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 1.9- Page No : 15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "\n",
+ "CopperMass = 3 # in kg\n",
+ "WaterMass= 6 # in kg\n",
+ "Spe_heat_copper= 0.394 # in kJ/kg-K\n",
+ "T1 = 90 # in degree C\n",
+ "T2 = 20 # in degree C\n",
+ "del_T = T1-T2 # in degree C\n",
+ "H_C = CopperMass*Spe_heat_copper*del_T # heat required by copper in kJ\n",
+ "Spe_heat_water= 4.193 # in kJ/kg-K\n",
+ "H_W = WaterMass*Spe_heat_water*del_T # heat required by water in kJ\n",
+ "H = H_C+H_W #heat required by vessel and water in kJ\n",
+ "H = H * 10**-3 # in MJ\n",
+ "print \"Heat required by vessel and water = %0.3f MJ \" %H"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat required by vessel and water = 1.844 MJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 1.10- Page No : 15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "\n",
+ "m = 18.2 #quantity of air supplied of coal in kg\n",
+ "T1 = 200 # in degree C\n",
+ "T2 = 18 # in degree C\n",
+ "del_T = T1-T2 # in degree C\n",
+ "Spe_heat = 1 # in kJ/kg-K\n",
+ "Q_C = m*Spe_heat*del_T # in kJ\n",
+ "print \"The Quantity of heat supplied per kg of coal = %0.1f kJ \" %Q_C"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Quantity of heat supplied per kg of coal = 3312.4 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_2.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_2.ipynb
new file mode 100644
index 00000000..1e9e60ad
--- /dev/null
+++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_2.ipynb
@@ -0,0 +1,967 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter No - 2 : Gas Laws And Properties\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.1 - Page No : 22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data\n",
+ "P1= 250 # in kN/m**2\n",
+ "V1= 6.2 # in m**3\n",
+ "V2= 1.82 # in m**3\n",
+ "# Formula P1*V1 = P2*V2\n",
+ "P2= P1*V1/V2 # in kN/m**2\n",
+ "print \"Pressure of air after compression = %0.1f kN/m**2 \" %P2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure of air after compression = 851.6 kN/m**2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.2 - Page No : 22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "guagePressure= 1500 # in kN/m**2\n",
+ "atmPressure= 100 # in kN/m**2\n",
+ "P1= guagePressure+atmPressure # in kN/m**2\n",
+ "V1= 0.1 # in m**3\n",
+ "V2= 0.4 # in m**3\n",
+ "# Formula P1*V1 = P2*V2\n",
+ "P2= P1*V1/V2 # in kN/m**2\n",
+ "NewGuagePressure= P2-atmPressure # in kN/m**2\n",
+ "print \"New guage pressure = %0.f kN/m**2 (3 bar)\" %NewGuagePressure"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "New guage pressure = 300 kN/m**2 (3 bar)\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.3 - Page No : 23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1= -4+101.3 # in kN/m**2\n",
+ "V1= 96+475 # in cm**3\n",
+ "V2= 96 # in cm**3\n",
+ "# Formula P1*V1 = P2*V2\n",
+ "P2= P1*V1/V2 # in kN/m**2\n",
+ "print \"Pressure at the end of the compression stroke = %0.1f kN/m**2 \" %P2\n",
+ "print \"Pressure at the end of the compression stroke = %0.3f bar \" %(P2*10**-2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure at the end of the compression stroke = 578.7 kN/m**2 \n",
+ "Pressure at the end of the compression stroke = 5.787 bar \n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.4 - Page No : 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "V0= 1 # in m**3\n",
+ "t= 300 # in \u00b0C\n",
+ "V= V0*(1+t/273) # in m**3\n",
+ "print \"The volume occupied = %0.1f m**3 \" %V"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume occupied = 2.1 m**3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.5 - Page No : 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "V1= 2 # in m**3\n",
+ "T1= 30+273 # in K\n",
+ "T2= 230+273 # in K\n",
+ "# V1/T1 = V0/T0 = V2/T2\n",
+ "V2= V1*T2/T1 # in m**3\n",
+ "print \"The final volume = %0.3f m**3 \" %V2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final volume = 3.320 m**3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.6 - Page No : 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1= 7*10**5 # in N/m**2\n",
+ "V1= 3 # in m**3\n",
+ "V2= 9 # in m**3\n",
+ "T1= 150+273 # in K\n",
+ "T2= 10+273 # in K\n",
+ "# Formula P1*V1/T1 = P2*V2/T2\n",
+ "P2= P1*V1*T2/(T1*V2) # in N/m**2\n",
+ "print \"Pressure of the gas = %0.3f bar \" %(P2*10**-5)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure of the gas = 1.561 bar \n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.7 - Page No : 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1= 100 # in kN/m**2\n",
+ "V1byV2= 12 # in \n",
+ "T1= 115+273 # in K\n",
+ "T2= 180+273 # in K\n",
+ "# Formula P1*V1/T1 = P2*V2/T2\n",
+ "P2= P1*V1byV2*T2/T1 # in N/m**2\n",
+ "print \"Absolute pressure at the end of compression stroke = %0.2f bar \" %(P2*10**-2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Absolute pressure at the end of compression stroke = 14.01 bar \n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.8 - Page No : 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "mR= 8314.3 # in J/kg-mole-K\n",
+ "P= 200*10**3 # in N/m**2\n",
+ "T= 30+273 # in K\n",
+ "# Formula P*V = mR*T\n",
+ "V= mR*T/P # in m**3\n",
+ "print \"The molecular volume of all the gases = %0.3f m**3 \" %V"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The molecular volume of all the gases = 12.596 m**3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.9 - Page No : 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1= 96 # in kN/m**2\n",
+ "P2= 725 # in kN/m**2\n",
+ "V1= 600 # in cm**3\n",
+ "V2= 100 # in cm**3\n",
+ "T1= 100+273 # in K\n",
+ "# Formula P1*V1/T1 = P2*V2/T2\n",
+ "T2= P2*V2*T1/(P1*V1) # in K\n",
+ "print \"Temperature at the end of compression = %0.3f \u00b0C \" %(T2-273)\n",
+ "# Note:- In the book, There is an error to calculate the value of T2."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature at the end of compression = 196.488 \u00b0C \n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.10 - Page No : 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "MR= 8314.2 # in J/kg-mole-K\n",
+ "mass= 44 # Molecular mass of carbon dioxide in kg\n",
+ "R= MR/mass # in J/kg-K\n",
+ "P= 11 # in MPa\n",
+ "P=P*10**6 # in Pa\n",
+ "V= 50*10**-3 # in m**3\n",
+ "T= 18+273 # in K\n",
+ "# Formula P*V= m*R*T\n",
+ "m= P*V/(R*T) # in kg\n",
+ "m=round(m) # in kg\n",
+ "MolecularVolume= MR*T/P # in m**3\n",
+ "D= m/V # density of the gas in kg/m**3\n",
+ "SpecificVolume= 1/D # in m**3/kg\n",
+ "print \"The mass of the gas = %0.f kg \" %m\n",
+ "print \"The Molecular volume = %0.2f m**3 \" %MolecularVolume\n",
+ "print \"The density of the gas = %0.f kg/m**3 \" %D\n",
+ "print \"The specific volume of the gas = %0.3f m**3/kg \" %SpecificVolume"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of the gas = 10 kg \n",
+ "The Molecular volume = 0.22 m**3 \n",
+ "The density of the gas = 200 kg/m**3 \n",
+ "The specific volume of the gas = 0.005 m**3/kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.11 - Page No : 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1= 350 # in kN/m**2\n",
+ "P1=P1*10**3 # in N/m**2\n",
+ "P2= 1.05 # in kN/m**2\n",
+ "P2=P2*10**6 # in N/m**2\n",
+ "V= 0.3 # in m**3\n",
+ "R= 0.29 # in kJ/kg-K\n",
+ "R= R*10**3 # in j/kgK\n",
+ "T1= 35+273 # in K\n",
+ "# Formula P*V= m*R*T\n",
+ "m= P1*V/(R*T1) # in kg\n",
+ "# Formula P1*V1/T1 = P2*V2/T2 and since V1= V2\n",
+ "T2= P2*T1/P1 # in K\n",
+ "print \"Temperature at constant volume compression = %0.f \u00b0C \" %(T2-273)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature at constant volume compression = 651 \u00b0C \n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.12 - Page No : 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "g1= 1.75 # gauge reading in bar\n",
+ "atm= 1.013 # in atmospheric pressure in bar\n",
+ "P1= g1+atm # in bar\n",
+ "T1= 12+273 # in K\n",
+ "T2= 45+273 # in K\n",
+ "# Formula P1*V1/T1 = P2*V2/T2 and since V1= V2\n",
+ "P2= P1*T2/T1 # in bar\n",
+ "g2=P2-atm # tyre gauge reading in bar \n",
+ "print\"Tyre guage reading at 45\u00b0C = %0.2f bar \"%g2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Tyre guage reading at 45\u00b0C = 2.07 bar \n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.13 - Page No : 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Q= 120 # in kJ\n",
+ "W= 150 # in kJ\n",
+ "E= Q-W # change in internal energy in kJ\n",
+ "print \"The internal energy of the system decreases by %0.0f kJ\" %abs(E)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The internal energy of the system decreases by 30 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.14 - Page No : 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Q= -40 # in kJ/kg\n",
+ "W= -80 # in kJ/kg\n",
+ "E= Q-W # change in internal energy in kJ/kg\n",
+ "print \"Change in internal energy = %0.0f kJ/kg \" %E\n",
+ "print \"Thus internal energy of the working substance increases \""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in internal energy = 40 kJ/kg \n",
+ "Thus internal energy of the working substance increases \n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.15 - Page No : 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Int_energy_changes= 20 # in kJ/kg\n",
+ "Q= 0 # in kJ\n",
+ "W= -90 # in kJ\n",
+ "E= Q-W # change in internal energy in kJ/kg\n",
+ "m= E/Int_energy_changes # in kg\n",
+ "print \"The mass of the fluid in the system = %0.1f kg \" %m"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of the fluid in the system = 4.5 kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.16 - Page No : 38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "U= 2800 # in kJ/kg\n",
+ "P= 20 # in bar\n",
+ "P= P*10**5 # in N/m**2\n",
+ "V= 0.23/1000 # in m**3\n",
+ "SP= U+P*V # specific enthalpy in kJ/kg\n",
+ "print \"The specific enthalpy = %0.0f kJ/kg \" %SP"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The specific enthalpy = 3260 kJ/kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.17 - Page No : 38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "h1= 210 #first heat transfer in kJ\n",
+ "h2= -20 # second heat transfer in kJ\n",
+ "h3= -190 # third heat transfer in kJ\n",
+ "h4= 60 # fourth heat transfer in kJ\n",
+ "W1= -180 # first work transfer in kJ\n",
+ "W2= 200 # second work transfer in kJ\n",
+ "W3= -300 # third work transfer in kJ\n",
+ "# Total Heat transfer = Total work transfer\n",
+ "W4= h1+h2+h3+h4-W1-W2-W3 # forth work transfer in kJ\n",
+ "print \"Fourth work transfer = %0.0f kJ is :\" %W4\n",
+ "print \"Thus the system delivers\",int(W4),\"kJ of work\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fourth work transfer = 340 kJ is :\n",
+ "Thus the system delivers 340 kJ of work\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.18 - Page No : 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Cv= 0.718 # in kJ/kgK\n",
+ "R= 0.278 # in kJ/kgK\n",
+ "T1= 15+273 # in K\n",
+ "T2= 135+273 # in K\n",
+ "m= 2 # mass in kg\n",
+ "V1= 0.7 # in m**3\n",
+ "Q= m*Cv*(T2-T1) # in kJ\n",
+ "print \"Heat supplied to gas = %0.2f kJ \" %Q\n",
+ "# Formula P1*V1= m*R*T1\n",
+ "P1= m*R*T1/V1 # in kN/m**2 absolute\n",
+ "# From P1/T1= P2/T2\n",
+ "P2= P1*T2/T1 # in kN/m**2\n",
+ "print \"The final pressure = %0.1f kN/m**2 \" %P2\n",
+ "# Note : The calculation in the book is not accurate"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat supplied to gas = 172.32 kJ \n",
+ "The final pressure = 324.1 kN/m**2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.19 - Page No : 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Cv= 1.005 # in kJ/kgK\n",
+ "T1= 200+273 # in K\n",
+ "T2= 15+273 # in K\n",
+ "V1= 0.12 # in m**3\n",
+ "m= 0.25 # mass in kg\n",
+ "Q= m*Cv*(T1-T2) # in kJ\n",
+ "print \"Heat extracted from the gas = %0.2f kJ \" %Q\n",
+ "# From V1/T1= V2/T2\n",
+ "V2= V1*T2/T1 # in m**3\n",
+ "print \"The final volume of the gas = %0.3f m**3 \" %V2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat extracted from the gas = 46.48 kJ \n",
+ "The final volume of the gas = 0.073 m**3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.20 - Page No : 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "m=2 # molecular mass\n",
+ "UGC= 8.3143 # universal gas constant in kJ/kg-mole-K\n",
+ "Cp= 14.41 # in kJ/kg-K\n",
+ "R= UGC/m # in kJ/kgK\n",
+ "Cv= Cp-R # in kJ/kgK\n",
+ "gama= Cp/Cv \n",
+ "print \"The value of R = %0.3f kJ/kgK is :\" %R\n",
+ "print \"The value of Cv = %0.3f kJ/kgK \" %Cv\n",
+ "print \"The value of gama = %0.1f\" %gama"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of R = 4.157 kJ/kgK is :\n",
+ "The value of Cv = 10.253 kJ/kgK \n",
+ "The value of gama = 1.4\n"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.21 - Page No : 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Cp = 0.796 # in kJ/kg-K\n",
+ "Cv = 0.67 # in kJ/kg-K\n",
+ "P1=1 # in bar\n",
+ "P1= P1*10**5 # in N/m**2\n",
+ "P2=3.5 # in bar\n",
+ "P2= P2*10**5 # in N/m**2\n",
+ "V1= 0.12 # in m**3\n",
+ "V2= 0.05 # in m**3\n",
+ "m=1 # in kg\n",
+ "R= Cp-Cv # in kJ/kg-K\n",
+ "R= R*10**3 # in J/kg-K\n",
+ "# Formula P*V= m*R*T\n",
+ "T1= P1*V1/(m*R) # in K\n",
+ "# Formula P1*V1/T1 = P2*V2/T2\n",
+ "T2= P2*V2*T1/(P1*V1) # in K\n",
+ "T= T2-T1 # Temperature rise in K\n",
+ "print \"Temperature rise = %0.1f K \" %T\n",
+ "E= m*Cv*(T2-T1) # change in internal energy kJ\n",
+ "print \"Change in internal energy = %0.1f kJ \" %E"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature rise = 43.7 K \n",
+ "Change in internal energy = 29.2 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.22 - Page No : 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "CO2= 0.12 #volume of CO2 in m**3\n",
+ "CO= 0.25 # in m**3\n",
+ "H2= 0.06 # in m**3\n",
+ "CH4= 0.02 # in m**3\n",
+ "N2= 0.55 # in m**3\n",
+ "R= 8.3143 # Universal gas constant in kJ/kg-mol-K\n",
+ "mm_CO2= 44 # molecular mass of CO2\n",
+ "mm_CO= 28 \n",
+ "mm_H2= 2 \n",
+ "mm_CH4= 16 \n",
+ "mm_N2= 28 \n",
+ "Gm_CO2= 5.28 # gravimetric mass of CO2\n",
+ "Gm_CO= 7.00 \n",
+ "Gm_H2= 0.12 \n",
+ "Gm_CH4= 0.32 \n",
+ "Gm_N2= 15.40 \n",
+ "total_Gm= Gm_CO2+Gm_CO+Gm_H2+Gm_CH4+Gm_N2 \n",
+ "Per_relative_CO2= Gm_CO2/total_Gm*100 # in %\n",
+ "Per_relative_CO= Gm_CO/total_Gm*100 # in %\n",
+ "Per_relative_H2= Gm_H2/total_Gm*100 # in %\n",
+ "Per_relative_CH4= Gm_CH4/total_Gm*100 # in %\n",
+ "Per_relative_N2= Gm_N2/total_Gm*100 # in %\n",
+ "print \"Analysis % Relative : \"\n",
+ "print \"CO2 : \",round(Per_relative_CO2,1)\n",
+ "print \"CO : \",round(Per_relative_CO,1)\n",
+ "print \"H2 : \",round(Per_relative_H2,3)\n",
+ "print \"CH4 : \",round(Per_relative_CH4,2)\n",
+ "print \"N2 : \",round(Per_relative_N2,1)\n",
+ "App_Gas_Constant= R/total_Gm # in kJ/kg-K\n",
+ "mol_Vol= 22.4 #mole volume at NTP in m**3\n",
+ "Average_Density= total_Gm/mol_Vol # in kg/m**3 at NTP\n",
+ "print \"The Apparent gas constant = %0.4f kJ/kg-K \" %App_Gas_Constant\n",
+ "print \"The average density = %0.3f kg/m**3 at NTP. \" %Average_Density"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Analysis % Relative : \n",
+ "CO2 : 18.8\n",
+ "CO : 24.9\n",
+ "H2 : 0.427\n",
+ "CH4 : 1.14\n",
+ "N2 : 54.8\n",
+ "The Apparent gas constant = 0.2957 kJ/kg-K \n",
+ "The average density = 1.255 kg/m**3 at NTP. \n"
+ ]
+ }
+ ],
+ "prompt_number": 68
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.23 - Page No : 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Cv = 652 # in J/kg-K\n",
+ "R= 287 # in J/kg-K\n",
+ "Cp= Cv+R # in J/kg-K\n",
+ "m=0.3 # in kg\n",
+ "P= 1.5*10**5 # in N/m**2\n",
+ "V= 0.283 # in m**3\n",
+ "# Formula P*V= m*R*T\n",
+ "T= P*V/(m*R) # in K\n",
+ "T= T-273 # in \u00b0C\n",
+ "T1= -40 # in \u00b0C\n",
+ "delta_U= m*Cv*(T-T1) # in J\n",
+ "print \"Internal energy = %0.3f kJ \" %(delta_U*10**-3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Internal energy = 50.862 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 2.24 - Page No :50 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "H2= 0.50 #volume of H2 in m**3\n",
+ "CH4= 0.19 # in m**3\n",
+ "CO= 0.18 # in m**3\n",
+ "C2H4= 0.02 # in m**3\n",
+ "CO2= 0.05 # in m**3\n",
+ "N2= 0.06 # in m**3\n",
+ "P= 100 # pressure of mixture in kN/m**2\n",
+ "mm_CO2= 44 # molecular mass of CO2\n",
+ "mm_CO= 28 \n",
+ "mm_H2= 2 \n",
+ "mm_CH4= 16 \n",
+ "mm_C2H4= 28 \n",
+ "mm_N2= 28 \n",
+ "R= 8.3143 # Universal gas constant in kJ/kg-mol-K\n",
+ "R_H2= R/mm_H2 # gas constant for H2\n",
+ "R_CO2= R/mm_CO2 \n",
+ "R_CO= R/mm_CO \n",
+ "R_C2H4= R/mm_C2H4 \n",
+ "R_CH4= R/mm_CH4 \n",
+ "R_N2= R/mm_N2 \n",
+ "M= mm_CO2*CO2+mm_H2*H2+mm_CH4*CH4+mm_CO*CO+mm_C2H4*C2H4+mm_N2*N2 # in kg\n",
+ "print \"Apparent molecular mass of the gas = %0.2f kg \" %M\n",
+ "mol_Vol= 22.4 #mole volume at NTP in m**3\n",
+ "density= M/mol_Vol # in kg/m**3\n",
+ "print \"Density of the mixture = %0.3f kg/m**3 \" %density\n",
+ "mixture_G_constant= R/M # in kJ/kg-K \n",
+ "print \"The mixture gas constant = %0.3f kJ/kg-K \" %mixture_G_constant\n",
+ "P_H2= P*H2 #partial pressure of H2 in kN/m**2\n",
+ "P_CH4= P*CH4 # in kN/m**2\n",
+ "P_CO= P*CO # in kN/m**2\n",
+ "P_C2H4= P*C2H4 # in kN/m**2\n",
+ "P_CO2= P*CO2 # in kN/m**2\n",
+ "P_N2= P*N2 # in kN/m**2\n",
+ "print \"The partial pressure of H2 = %0.0f kN/m**2\" %P_H2\n",
+ "print \"The partial pressure of CH4 = %0.0f kN/m**2\" %P_CH4\n",
+ "print \"The partial pressure of CO = %0.0f kN/m**2\" %P_CO\n",
+ "print \"The partial pressure of C2H4 = %0.0f kN/m**2\" %P_C2H4\n",
+ "print \"The partial pressure of CO2 = %0.0f kN/m**2\" %P_CO2\n",
+ "print \"partial pressure of N2 = %0.0f kN/m**2\" %P_N2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Apparent molecular mass of the gas = 13.52 kg \n",
+ "Density of the mixture = 0.604 kg/m**3 \n",
+ "The mixture gas constant = 0.615 kJ/kg-K \n",
+ "The partial pressure of H2 = 50 kN/m**2\n",
+ "The partial pressure of CH4 = 19 kN/m**2\n",
+ "The partial pressure of CO = 18 kN/m**2\n",
+ "The partial pressure of C2H4 = 2 kN/m**2\n",
+ "The partial pressure of CO2 = 5 kN/m**2\n",
+ "partial pressure of N2 = 6 kN/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_3.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_3.ipynb
new file mode 100644
index 00000000..39e249ba
--- /dev/null
+++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_3.ipynb
@@ -0,0 +1,1450 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter No - 3 : Thermodynamic Processes\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1 - Page No : 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data\n",
+ "P = 2.15 * 10**5 # in N/m**2\n",
+ "T = 20 # in degree C \n",
+ "T = T + 273 # in K\n",
+ "V = 0.20 # in m**3\n",
+ "R = 0.2927 # in kJ/kg-K\n",
+ "R = R * 10**3 # in J/kg-K\n",
+ "m = (P*V)/(T*R) # in kg\n",
+ "Q = 20*10**3 # in J\n",
+ "C_v = 0.706*10**3 # in J/kg-K\n",
+ "theta = Q/(m*C_v) # in degree C\n",
+ "T = T - 273 # in degree C\n",
+ "T1 = theta + T # new temp. in degree C\n",
+ "print \"New temperature = %0.1f degree C \" %T1\n",
+ "T1 = T1 + 273 # in K\n",
+ "T = T + 273 # in K\n",
+ "P2 = P * (T1/T) # in N/m**2\n",
+ "P2 = P2 * 10**-3# in kN/m**2\n",
+ "print \"New pressure = %0.3f kN/m**2 \" %P2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "New temperature = 76.5 degree C \n",
+ "New pressure = 256.459 kN/m**2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2 - Page No : 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P = 350# in kN/m**2\n",
+ "P = P * 10**3# in N/m**2\n",
+ "m = 1# in kg\n",
+ "m = m * 10**3# in gram\n",
+ "V = 0.35# in m**3\n",
+ "C_p = 1.005# in kJ/kg-K\n",
+ "C_v = 0.710# in kJ/kg-K\n",
+ "R = C_p - C_v# in kJ/kg-K\n",
+ "T = (P*V)/(m*R) # in K\n",
+ "T = T - 273# in degree C\n",
+ "print \"The intial temperature = %0.0f K \" %(T+273)\n",
+ "T = T + 273# in K\n",
+ "T1 = 316# in degree C\n",
+ "T1 = T1 + 273# in K\n",
+ "P2 = P * (T1/T) # in N/m**2\n",
+ "P2 = P2 * 10**-3# in kN/m**2\n",
+ "print \"The final pressure of air = %0.1f kN/m**2 \" %P2\n",
+ "T = T - 273# in degree C\n",
+ "T1 = T1 - 273# in degree C\n",
+ "m = m * 10**-3# in kg\n",
+ "Q = m * C_v * (T1-T) # in kJ\n",
+ "print \"Heat added = %0.2f kJ \" %Q\n",
+ "G = m*C_v * (T1-T) # Gain of internal energy # in kJ\n",
+ "print \"Gain of internal energy = %0.2f kJ \" %G\n",
+ "G_enthalpy = m*C_p*(T1-T) # Gain of enthalpy in kJ\n",
+ "print \"Gain of enthalpy = %0.2f kJ \" %G_enthalpy"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The intial temperature = 415 K \n",
+ "The final pressure of air = 496.4 kN/m**2 \n",
+ "Heat added = 123.36 kJ \n",
+ "Gain of internal energy = 123.36 kJ \n",
+ "Gain of enthalpy = 174.61 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3 - Page No : 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P = 3.2# in bar\n",
+ "P = P * 10**5# in N/m**2\n",
+ "R = 292.7# in kJ/kg-K\n",
+ "C_p = 1.003# in kJ/kg-K\n",
+ "m = 1#\n",
+ "V1 = 0.3# in m**3\n",
+ "V2 = 2*V1# in m**3\n",
+ "W = P*(V2-V1) # in J\n",
+ "W = W * 10**-3 # in kJ\n",
+ "print \"The work done = %0.0f kJ \" %W\n",
+ "T1 = (P*V1)/(m*R) # in K\n",
+ "print \"The intail Temperature = %0.0f \u00b0C \" %(T1-273)\n",
+ "T2 = T1*(V2/V1) # in K\n",
+ "print \"The final temperature = %0.0f \u00b0C \" %(T2-273)\n",
+ "Q = m*C_p*(T2-T1) # in kJ\n",
+ "print \"The Heat added = %0.0f kJ \" %(Q)\n",
+ "\n",
+ "# Note: To evaluate the value of Heat added, \n",
+ "# wrong value of T1 is putted (i.e 273 k at place of 328 K), so the answer of Heat added is wrong in the book."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The work done = 96 kJ \n",
+ "The intail Temperature = 55 \u00b0C \n",
+ "The final temperature = 383 \u00b0C \n",
+ "The Heat added = 329 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4 - Page No : 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "R = 0.29# in kJ/kg-K\n",
+ "R = R * 10**3# in J/kg-K\n",
+ "C_p = 1.005# in kJ/kg-K\n",
+ "T = 185# in degree C\n",
+ "T = T + 273# in K\n",
+ "T2 = 70+273# in K\n",
+ "V1 = 0.23# in m**3\n",
+ "P = 500# in kN/m**2\n",
+ "P = P * 10**3# in N/m**2\n",
+ "m = (P*V1)/(R*T) # in kg\n",
+ "Q = m*C_p*(T2-T) # in kJ\n",
+ "print \"Heat transferred = %0.2f kJ \" %Q\n",
+ "print \"i.e. %0.2f kJ heat has been abstracted from the gas\" %(abs(Q))\n",
+ "V2 = V1*(T2/T) # in m**3\n",
+ "W = P * (V2-V1) # in J\n",
+ "W= W*10**-3#in kJ\n",
+ "print \"The work done = %0.0f kJ \" %W\n",
+ "print \"i.e.\",round(abs(W),0),\"kJ work has been done on the gas \"\n",
+ "R= R*10**-3# in kJ/kg-K\n",
+ "C_v = C_p - R# in kJ/kg-K\n",
+ "I_E = m*C_v*(T2-T) # Change in internal energy in kJ\n",
+ "print \"Change in internal energy = %0.3f kJ \" %I_E\n",
+ "print \"i.e.\",round(abs(I_E),3),\"kJ energy is decrease in internal energy\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transferred = -100.07 kJ \n",
+ "i.e. 100.07 kJ heat has been abstracted from the gas\n",
+ "The work done = -29 kJ \n",
+ "i.e. 29.0 kJ work has been done on the gas \n",
+ "Change in internal energy = -71.193 kJ \n",
+ "i.e. 71.193 kJ energy is decrease in internal energy\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5 - Page No : 71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import log\n",
+ "# Given data\n",
+ "P1 = 1.1# in MN/m**2\n",
+ "P1 = P1 * 10**6# in N/m**2\n",
+ "V1 = 1.5# in m**3\n",
+ "V2 = 7.5# in m**3\n",
+ "P2 = (P1*V1)/V2# in kN/m**2\n",
+ "P2 = P2 * 10**-6# in MN/m**2\n",
+ "P2 = P2 * 10**3# in kN/m**2\n",
+ "print \"The final pressure = %0.0f kN/m**2 \" %P2\n",
+ "W = P1*V1*log(V2/V1) # in J\n",
+ "W = W * 10**-4# in kJ\n",
+ "print \"The work done = %0.0f kJ \" %int(W)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final pressure = 220 kN/m**2 \n",
+ "The work done = 265 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6 - Page No : 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1 = 2800000# in N/m**2\n",
+ "P1 = P1 * 10**-6# in MN/m**2\n",
+ "C_p = 1.024# in kJ/kg-K\n",
+ "C_v = 0.7135# in kJ/kg-K\n",
+ "V1 = 1# in m**3. (asuumed )\n",
+ "V2 = 5*V1# in m**3\n",
+ "T1 = 220# in degree C\n",
+ "T1 = T1 + 273# in K\n",
+ "Gamma = C_p/C_v#\n",
+ "P2 = (P1*(V1)**Gamma)/((V2)**Gamma) # in MN/m**2\n",
+ "print \"The final pressure = %0.3f MN/m**2 \" %P2\n",
+ "T2 = (P2/P1)*V2*T1 # in K\n",
+ "print \"The final temperature = %0.1f degree C \" %(T2-273)\n",
+ "R = C_p-C_v# in kJ/kg-K\n",
+ "W = (R*(T1-T2))/(Gamma - 1) # in kJ\n",
+ "print \"Work done = %0.1f kJ \" %W"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final pressure = 0.278 MN/m**2 \n",
+ "The final temperature = -28.3 degree C \n",
+ "Work done = 177.1 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.7 - Page No : 76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import log10\n",
+ "# Given data\n",
+ "W = 89.947# in kJ\n",
+ "T1 = 240# in degree C\n",
+ "T1=T1+273# in K\n",
+ "T2 = 115# in degree C\n",
+ "T2=T2+273# in K\n",
+ "C_v = W/(T1-T2) # in kJ/kg-K\n",
+ "print \"The value of Cv = %0.3f kJ/kg-K \" %C_v\n",
+ "V1 = 1# in m**3 (assumed)\n",
+ "V2 = 2*V1# in m**3\n",
+ "# (T1/T2) = (V2/V1)**(Gamma - 1)\n",
+ "Gamma=log10(T1/T2)/log10(V2/V1)+1#\n",
+ "Gamma = 1.4#\n",
+ "C_p = Gamma * C_v# in kJ/kg-K\n",
+ "print \"The value Cp = %0.3f kJ/kg-K \" %C_p"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of Cv = 0.720 kJ/kg-K \n",
+ "The value Cp = 1.007 kJ/kg-K \n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.8 - Page No : 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P = 7# in bar\n",
+ "P = P *10**5# in N/m**2\n",
+ "R = 0.287# in kJ/kg-K\n",
+ "R=R*10**3# in J/kg-K\n",
+ "Gamma = 1.4#\n",
+ "T = 100# in degree C\n",
+ "T = T + 273# in K\n",
+ "V = (R*T)/P# in m**3\n",
+ "print \"The volume of one kg of air = %0.3f m**3\" %V\n",
+ "C_v = 0.718# in kJ/kg\n",
+ "T=T-273# in degree C\n",
+ "InternalEnergy= C_v*T# in kJ/kg\n",
+ "print \"Internal energy of 1 kg air = %0.1f kJ/kg\" %InternalEnergy\n",
+ "P1= P# in bar\n",
+ "V1 = 1# in m**3 (assumed)\n",
+ "V2 = 4 * V1# in m**3\n",
+ "T1= T# in degree C\n",
+ "T1=T1+273# in K\n",
+ "P2 = (P * (V1)**Gamma)/((V2)**Gamma) # in N/m**2\n",
+ "print \"The final pressure = %0.3f bar \" %(P2*10**-5)\n",
+ "T2 = (P2*V2)/(P1*V1)*T1# in K\n",
+ "T2 = T2 - 273# in degree \n",
+ "print \"The final temperature = %0.1f degree C \" %T2\n",
+ "I_E = C_v * T2# in kJ/kg\n",
+ "print \"Internal energy = %0.2f kJ/kg \" %I_E"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume of one kg of air = 0.153 m**3\n",
+ "Internal energy of 1 kg air = 71.8 kJ/kg\n",
+ "The final pressure = 1.005 bar \n",
+ "The final temperature = -58.8 degree C \n",
+ "Internal energy = -42.20 kJ/kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.9 - Page No : 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Gamma = 1.41#\n",
+ "C_v = 0.703# in kJ/kg-K\n",
+ "P1 = 105# in kN/m**2\n",
+ "P2 = 2835# in kN/m**2\n",
+ "T1 = 15# in degree C\n",
+ "T1 = T1 + 273# in K\n",
+ "m = 0.2# in kg\n",
+ "# Formula T2/T1 = (P2/P1)**((Gamma-1)/Gamma)\n",
+ "T2 = T1*(P2/P1)**((Gamma-1)/Gamma) # in K\n",
+ "T2 = T2 - 273# in degree C\n",
+ "print \"The final temperature = %0.0f degree C \" %T2\n",
+ "T2 = T2+273# in K\n",
+ "I_E = m*C_v*(T2-T1) # in kJ\n",
+ "print \"Change in internal energy = %0.3f kJ \" %I_E\n",
+ "W = I_E# in kJ\n",
+ "print \"Work done = %0.3f kJ \" %W\n",
+ "\n",
+ "# Note: There is an error to calculate the value of T2, and this wrong value is putted to evaluate \n",
+ "# the value of Change in internal energy but the value of Change in internal energy is calculated correct."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final temperature = 478 degree C \n",
+ "Change in internal energy = 65.089 kJ \n",
+ "Work done = 65.089 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.10 - Page No : - Page No : 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import pi\n",
+ "# Given data\n",
+ "P1= 100# in N/m**2\n",
+ "T1 = 30# in degree C\n",
+ "T1 = T1 + 273# in K\n",
+ "C_v = 0.718# in kJ/kg-K\n",
+ "#C_v= C_v*10**3# in J/kg-K\n",
+ "R = 287.1# in J/kg-K\n",
+ "d = 15# in cm\n",
+ "l = 20# in cm\n",
+ "V = (pi/4)*(d)**2*l# in cm**3\n",
+ "V = V * 10**-3# in litre\n",
+ "Clear_V = 1.147# clearance volume \n",
+ "Vol = V+Clear_V#volume of air at beginning of compression in litre\n",
+ "ROC = Vol/Clear_V# Ratio of compression\n",
+ "P2 = P1*(Vol/Clear_V)**1.2# in kN/m**2\n",
+ "print \"The pressure at the end of compression = %0.1f kN/m**2 \" %P2\n",
+ "T2 = (P2*Clear_V*T1)/(P1*Vol) # in K\n",
+ "T2 = T2 - 273# in degree C\n",
+ "T1 = T1 - 273# in degree C\n",
+ "T = T2-T1# in degree C\n",
+ "print \"The temperature at the end of compression = %0.1f degree C \" %T\n",
+ "T1 = T1 + 273# in K\n",
+ "m = (P1*Vol)/(R*T1) # in kg\n",
+ "I_E = m*C_v*T# in kJ\n",
+ "print \"The change in internal energy = %0.3f kJ \" %I_E"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure at the end of compression = 540.7 kN/m**2 \n",
+ "The temperature at the end of compression = 98.4 degree C \n",
+ "The change in internal energy = 0.380 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11 - Page No : 87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "V1 = 2.5 # in litre\n",
+ "P1 = 1400 # kN/m**2\n",
+ "P2 = 280 # in kN/m**2\n",
+ "T1 = 1100 # in \u00b0C\n",
+ "T1 = T1 + 273 # in K\n",
+ "n = 1.28\n",
+ "V2 = V1*(P1/P2)**(1/1.28) # in litres\n",
+ "print \"Final volume = %0.1f litres \" %V2\n",
+ "T2 = T1*((P2*V2)/(P1*V1)) # in K\n",
+ "T2 = T2 - 273# in degree C\n",
+ "print \"Final temperature = %0.0f degree C \" %T2\n",
+ "W = (P1* V1 - P2*V2)/(n-1) # in Joules\n",
+ "print \"Work done = %0.2f kJ \" %(W*10**-3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final volume = 8.8 litres \n",
+ "Final temperature = 693 degree C \n",
+ "Work done = 3.71 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.12 - Page No : 87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Gamma = 1.4#\n",
+ "P1 = 780# in kN/m**2\n",
+ "P2 = 100# in kN/m**2\n",
+ "V1 = 750# in cm**3\n",
+ "V1= V1*10**-6# in m**3\n",
+ "V2 = (1/5)*V1# in m**3\n",
+ "n = (log(P1/P2))/(log(V1/V2))\n",
+ "print \"The value of index = %0.3f\" %n\n",
+ "W = (P1*V2-P2*V1)/(1-n) # in kJ\n",
+ "print \"Work done = %0.3f kJ \" %W\n",
+ "print \"i.e.\",round(abs(W),4),\"kJ work is done on the gas\"\n",
+ "Q = ((Gamma - n)/(Gamma-1)) * (-W) # in kJ\n",
+ "print \"Heat rejected during Compression is :\",round(Q,4),\"kJ or\",round(Q*10**3),\"joules.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of index = 1.276\n",
+ "Work done = -0.152 kJ \n",
+ "i.e. 0.152 kJ work is done on the gas\n",
+ "Heat rejected during Compression is : 0.047 kJ or 47.0 joules.\n"
+ ]
+ }
+ ],
+ "prompt_number": 63
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.13 - Page No : 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "T1 = 40# in degree C\n",
+ "T1 = T1 +273# in K\n",
+ "P2 = 50# in bar\n",
+ "P1 = 1# in bar\n",
+ "Gamma = 1.4#\n",
+ "C_v = 0.718# in kJ/kg-K\n",
+ "SpeHeat = 1.005# in kJ/kg-K\n",
+ "HeatSupply= 125.6# in kJ/kg\n",
+ "T2 = T1 * (P2/P1)**((Gamma-1)/Gamma) # in K\n",
+ "C_p = C_v * (T2-T1) # in kJ/kg\n",
+ "del_T = HeatSupply/SpeHeat# in degree C\n",
+ "del_U = C_v * del_T# in kJ/kg\n",
+ "print \"Change in internal energy = %0.1f kJ/kg \" %del_U\n",
+ "T3 = T2 + del_T# in K\n",
+ "del_Phi = SpeHeat * log(T3/T2) # in kJ/kg-K\n",
+ "print \"Change in entropy during constant pressure = %0.3f kJ/kg-K \" %del_Phi"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in internal energy = 89.7 kJ/kg \n",
+ "Change in entropy during constant pressure = 0.123 kJ/kg-K \n"
+ ]
+ }
+ ],
+ "prompt_number": 65
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.14 - Page No : 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1 = 30# in bar\n",
+ "P1= P1*10**5# in N/m**2\n",
+ "V1 = 0.85# in m**3\n",
+ "V2 = 4.25# in m**3\n",
+ "W = P1 *V1 * log(V2/V1) # in Joules\n",
+ "W = W * 10**-3# in kJ\n",
+ "T = 400# in K\n",
+ "del_U = W/T# in kJ/K\n",
+ "print \"Change in entropy = %0.3f kJ/K \" %del_U"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy = 10.260 kJ/K \n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.15 - Page No : 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "C_P = 1.041# in kJ/kg-K\n",
+ "C_V = 0.743# in kJ/kg-K\n",
+ "R = C_P - C_V# in kJ/kg-K\n",
+ "P1 = 140# in kN/m**2\n",
+ "P2 = 1400# in kN/m**2\n",
+ "V1 = 0.14# in m**3\n",
+ "T1 = 25# in degree C\n",
+ "T1 = T1 + 273# in K\n",
+ "Gamma = 1.4#\n",
+ "n = 1.25#\n",
+ "m = (P1 * 10**3 *V1)/(R * 10**3 * T1) # in kg\n",
+ "V2 = V1 * (P1/P2)**(1/n) # in m**3\n",
+ "del_U = C_P * (log(V2/V1)) + C_V * (log(P2/P1)) # in kJ/kg-K\n",
+ "del_U = m * del_U # in kJ/K\n",
+ "print \"Part (i)\"\n",
+ "print \"Change in entropy = %0.4f kJ/K \" %del_U\n",
+ "T2 = T1 * (V1/V2)**(n-1) # in K\n",
+ "del_U1 = C_P * (log(T2/T1)) - R*(log(P2/P1)) # in kJ/kg-K\n",
+ "print \"Part (ii)\"\n",
+ "print \"Change in entropy = %0.3f kJ/kg-K \" %del_U1\n",
+ "del_U2 = C_V * (log(T2/T1)) + R*(log(V2/V1)) # in kJ/kg-K\n",
+ "print \"Part (iii)\"\n",
+ "print \"Change in entropy = %0.3f kJ/kg-K \" %del_U2\n",
+ "del_U3 = C_V * (Gamma-n) * (log(V2/V1)) # in kJ/kg-K\n",
+ "print \"Part (iv)\"\n",
+ "print \"Change in entropy = %0.3f kJ/kg-K \" %del_U3\n",
+ "del_U4 = C_V * ((Gamma-n)/(n-1)) * (log(T1/T2)) # in kJ/kg-K\n",
+ "print \"Part (v)\"\n",
+ "print \"change in entropy = %0.3f kJ/kg \" %del_U4\n",
+ "del_U5 = C_V * ((Gamma-n)/n) * (log(P1/P2)) # in kJ/kg-K\n",
+ "print \"Part (vi)\"\n",
+ "print \"Change in entropy = %0.3f kJ/kg-k \" %del_U5"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part (i)\n",
+ "Change in entropy = -0.0456 kJ/K \n",
+ "Part (ii)\n",
+ "Change in entropy = -0.207 kJ/kg-K \n",
+ "Part (iii)\n",
+ "Change in entropy = -0.207 kJ/kg-K \n",
+ "Part (iv)\n",
+ "Change in entropy = -0.205 kJ/kg-K \n",
+ "Part (v)\n",
+ "change in entropy = -0.205 kJ/kg \n",
+ "Part (vi)\n",
+ "Change in entropy = -0.205 kJ/kg-k \n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.16 - Page No : 93 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1 = 1# in bar\n",
+ "P2 = 15# in bar\n",
+ "T1 = 0# in degree C\n",
+ "T1 = T1 + 273# in K\n",
+ "T2 = 200# in degree C\n",
+ "T2 = T2 + 273# in K\n",
+ "C_P = 1.005# in kJ/kg-K\n",
+ "C_V = 0.718# in kJ/kg-K\n",
+ "R = C_P-C_V# in kJ/kg-K\n",
+ "del_U = C_P * (log(T2/T1)) - R*(log(P2/P1)) # in kJ/kg-K\n",
+ "print \"Change in entropy = %0.3f kJ/kg-K \" %del_U"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy = -0.225 kJ/kg-K \n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.17 - Page No : 94"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "C_V = 2.174# in kJ/kg-K\n",
+ "R = 0.5196# in kJ/kg-K\n",
+ "C_P = C_V+R# in kJ/kg-K\n",
+ "V2 = 1# in m**3\n",
+ "V1 = 8# in m**3\n",
+ "P1 = 0.7# in bar\n",
+ "P2 = 7# in bar\n",
+ "del_U = C_P * (log(V2/V1)) + C_V * (log(P2/P1)) # in kJ/kg-K\n",
+ "m = 0.9# in kg\n",
+ "del_U = m * del_U# in kJ/K\n",
+ "print \"Change in entropy = %0.3f kJ/K \" %del_U\n",
+ "print \"It is a loss of entropy\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy = -0.536 kJ/K \n",
+ "It is a loss of entropy\n"
+ ]
+ }
+ ],
+ "prompt_number": 73
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.18 - Page No : 95 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "C_P = 1.005# in kJ/kg-K\n",
+ "C_V = 0.718# in kJ/kg-K\n",
+ "R = C_P - C_V# in kJ/kg-K\n",
+ "R= R*10**3#in J/kg-K\n",
+ "P1 = 3*10**5#in N/m**2\n",
+ "V1 = 1.5# m**3\n",
+ "T1 = 15# in degree C\n",
+ "T1 = T1 +273# in K\n",
+ "m1 = (P1*V1)/(R* T1) # in kg\n",
+ "m2 = m1+2#final mass of air in kg\n",
+ "P2 = P1 * (m2/m1) # in kN/m**2\n",
+ "T1 = T1 - 273# in degree C\n",
+ "T2 = 0# in degree C\n",
+ "m = 1# in kg\n",
+ "del_U = m * C_P * (T1-T2) # in kJ\n",
+ "print \"Total enthapy of air = %0.3f kJ \" %del_U"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total enthapy of air = 15.075 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 75
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.19 - Page No : 96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "R = 0.287# in kJ/kg-K\n",
+ "P1 = 30# in bar\n",
+ "V1 = 0.12# in m**3\n",
+ "m = 1.8# in kg\n",
+ "U= 8.3143# in kJ/kg-mol-K\n",
+ "T1 = (P1 * 10**5 * V1)/(m*R*10**3) # in K\n",
+ "T1 = T1 - 273# in degree C\n",
+ "print \"The temperature = %0.0f degree C \" %int(T1)\n",
+ "m_m = U/R# in kg\n",
+ "print \"The molecular mass = %0.2f kg \" %m_m\n",
+ "V_s = V1/m# in m**3\n",
+ "print \"The Specific volume = %0.4f m**3 \" %V_s\n",
+ "V_m = V_s * m_m# in m**3\n",
+ "print \"Molecular volume = %0.2f m**3 \" %V_m"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature = 423 degree C \n",
+ "The molecular mass = 28.97 kg \n",
+ "The Specific volume = 0.0667 m**3 \n",
+ "Molecular volume = 1.93 m**3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.20 - Page No : 96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "T=15+273#in K\n",
+ "U= 8.3143# in kJ/kg-mol-K\n",
+ "GasConstant = 0.618# in kJ/kg-K\n",
+ "GasVolume= 1# in m**3 (assume)\n",
+ "AirVolume= 1.5*GasVolume# in m**3\n",
+ "P=760# in mm\n",
+ "P= P/750# in bar\n",
+ "P= P*10**5#in N/m**2\n",
+ "MixtureVolume= GasVolume+AirVolume#in m**3\n",
+ "PGM= GasVolume/MixtureVolume*100# in %\n",
+ "print \"Percentage of gas by volume in the mixture = %0.0f %%\" %PGM\n",
+ "PAM= AirVolume/MixtureVolume*100# in %\n",
+ "print \"Percentage of air by volume in the mixture = %0.0f %%\" %PAM\n",
+ "M1= U/0.287# in mol\n",
+ "M2= U/0.618# in mol\n",
+ "M= PAM/100*M1+PGM/100*M2# mass of mixture in mol\n",
+ "R= U/M# gas constant in kJ/kg-K\n",
+ "R= R*10**3#in J/kg-K\n",
+ "print \"The gas constant = %0.3f kJ/kg-K\" %(R*10**-3)\n",
+ "PAM1= PAM*M1/M# in %\n",
+ "print \"Percentage of air by mass in the mixture = %0.2f %%\" %PAM1\n",
+ "PGM1= PGM*M2/M# in %\n",
+ "print \"Percentage of gas by mass in the mixture = %0.2f %%\" %PGM1\n",
+ "Rho= P/(R*T) # kg/m**3\n",
+ "print \"The density of the gas = %0.3f kg/m**3\" %Rho"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage of gas by volume in the mixture = 40 %\n",
+ "Percentage of air by volume in the mixture = 60 %\n",
+ "The gas constant = 0.365 kJ/kg-K\n",
+ "Percentage of air by mass in the mixture = 76.36 %\n",
+ "Percentage of gas by mass in the mixture = 23.64 %\n",
+ "The density of the gas = 0.963 kg/m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 81
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.21 - Page No : 97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "# Given data\n",
+ "Gamma = 1.4#\n",
+ "P1 = 7# in bar\n",
+ "P1= P1*10**5# in N/m**2\n",
+ "V1 = 1.6# in m**3\n",
+ "V2 = 8# in m**3\n",
+ "P2 = (P1 * (V1)**(Gamma))/((V2)**(Gamma)) # in bar\n",
+ "W1 = (P1*V1-P2*V2)/(Gamma-1) # work done by the gas during isentropic expansion in J\n",
+ "Rho = V2/V1#\n",
+ "W2 = P1*V1*(log(Rho)) # work done by the gas during isothermal expansion in J\n",
+ "del_W = W2-W1# in J\n",
+ "del_W = del_W*10**-3 # in kJ\n",
+ "print \"Difference between the work done during isentropic and isothemal expansion = %0.0f kJ \" %del_W"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Difference between the work done during isentropic and isothemal expansion = 473 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 90
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.22 - Page No : 98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1 = 1# in bar\n",
+ "V1 = 400# in cm**3\n",
+ "V2 = 80# in Cm**3\n",
+ "T1 = 110# in degree C\n",
+ "T1 = T1 + 273# in K\n",
+ "Gamma = 1.3#\n",
+ "P2 = P1*((V1/V2)**(Gamma)) # in bar\n",
+ "print \"The pressure = %0.1f bar \" %P2\n",
+ "T2 = T1 * ((P2*V2)/(P1*V1)) # in K\n",
+ "T2 = int(T2-273)#in degree C\n",
+ "print \"The temperature = %0.0f degree C \" %T2\n",
+ "T2 = T2 + 273# in K\n",
+ "m = 1#\n",
+ "C_V = 0.75#\n",
+ "del_U = m*C_V*(T2-T1) # in kJ\n",
+ "print \"Change in internal energy = %0.2f kJ \" %del_U\n",
+ "P1= P1*10**5# in N/m**2\n",
+ "P2= P2*10**5# in N/m**2\n",
+ "V1= V1*10**-3# in litre\n",
+ "V2= V2*10**-3# in litre\n",
+ "W = (P1*V1-P2*V2)/(Gamma-1) # in J\n",
+ "W = abs(W * 10**-3) # in kJ\n",
+ "print \"Work done = %0.2f kJ \" %W\n",
+ "P3 = 40*10**5# in N/m**2\n",
+ "T3 = (P3/P2) * T2# in K\n",
+ "T3 = T3 - 273# in degree C\n",
+ "print \"Temperature of gas = %0.0f degree C \" %T3"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure = 8.1 bar \n",
+ "The temperature = 347 degree C \n",
+ "Change in internal energy = 177.75 kJ \n",
+ "Work done = 82.75 kJ \n",
+ "Temperature of gas = 2787 degree C \n"
+ ]
+ }
+ ],
+ "prompt_number": 99
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.23 - Page No : 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "C_P = 1.068# in kJ/kg-K\n",
+ "C_V = 0.775#in kJ/kg-K\n",
+ "R = C_P-C_V# in kJ/kg-K\n",
+ "R= R*10**3# in J/kg-K\n",
+ "P1 = 12# in bar\n",
+ "P1= P1*10**5# in N/m**2\n",
+ "V1 = 0.15#in m**3\n",
+ "V2= 0.28# in m**3\n",
+ "m = 1# in kg\n",
+ "T1 = (P1*V1)/(R* m) # in K\n",
+ "T2 = (T1 * (V2/V1)) # in K\n",
+ "print \"Temperature at the end of Constant pressure = %0.3f \u00b0C \" %(T2-273)\n",
+ "W = P1* (V2-V1) # in J\n",
+ "W = W * 10**-3# in kJ\n",
+ "Gamma = 1.38\n",
+ "V3 = 1.5# in m**3\n",
+ "T3 = T2/((V3/V2)**(Gamma-1)) # in K\n",
+ "T3 = (T3 - 273)# in degree C\n",
+ "print \"Temperature at the end of Isentropic = %0.0f \u00b0C \" %T3\n",
+ "T3 = T3 + 273# in K\n",
+ "W1 = m *C_V*(T2-T3) # work done during isentropic expansion in kJ\n",
+ "W2 = W+W1# in kJ\n",
+ "print \"Total Work done = %0.2f kJ \" %W2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature at the end of Constant pressure = 873.758 \u00b0C \n",
+ "Temperature at the end of Isentropic = 333 \u00b0C \n",
+ "Total Work done = 575.08 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 106
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.24 - Page No : 100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from scipy.integrate import quad\n",
+ "# Given data\n",
+ "C_P = 1.005# in kJ/kg-K\n",
+ "C_V = 0.718# in kJ/kg-K\n",
+ "R = C_P-C_V# in kJ/kg-K\n",
+ "P1 = 20#in bar\n",
+ "P2 = 12# in bar\n",
+ "T1 = 200#in degree C\n",
+ "T1 = T1 + 273# in K\n",
+ "T2 = 125#in degree c\n",
+ "T2 = T2 + 273# in K\n",
+ "V1 = (R*10**3*T1)/(P1*10**5) # in m**3\n",
+ "V2 = (R*10**3*T2)/(P2*10**5) # in m**3\n",
+ "def integrand(V):\n",
+ " return -293*V+40\n",
+ "ans, err = quad(integrand, 0.0679,0.0952)\n",
+ "W = 10**5 * ans# in Joules\n",
+ "W = round(W * 10**-3) # in kJ\n",
+ "print \"Work done = %0.0f kJ \" %W\n",
+ "m = 1# in kg\n",
+ "del_U = m*C_V*(T2-T1) # change in internal energy in kJ\n",
+ "print \"Change in internal energy = %0.2f kJ \" %del_U\n",
+ "print \"Negative sign indicates that there is decrease in internal energy of the gas. \"\n",
+ "C_Enthalpy = m*C_P*(T2-T1) # change in enthalpy in kJ\n",
+ "print \"The change in enthalpy = %0.1f kJ\" %C_Enthalpy\n",
+ "print \"Negative sign indicates that there is decrease in enthalpy of the gas\"\n",
+ "Q = W+ del_U# in kJ\n",
+ "print \"Heat transfer = %0.2f kJ \" %Q\n",
+ "print \"Negative sign indicates that the heat is rejected by the air\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done = 44 kJ \n",
+ "Change in internal energy = -53.85 kJ \n",
+ "Negative sign indicates that there is decrease in internal energy of the gas. \n",
+ "The change in enthalpy = -75.4 kJ\n",
+ "Negative sign indicates that there is decrease in enthalpy of the gas\n",
+ "Heat transfer = -9.85 kJ \n",
+ "Negative sign indicates that the heat is rejected by the air\n"
+ ]
+ }
+ ],
+ "prompt_number": 118
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.25 - Page No : 101"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1 = 14# in bar\n",
+ "P3 = 2.222# in bar\n",
+ "V3byV1 = P1/P3#\n",
+ "P2 = 1.05# in bar\n",
+ "Gamma = log(P1/P2)/log(V3byV1)\n",
+ "C_P = 1.005# in kJ/kg-K\n",
+ "C_V = C_P/Gamma# in kJ/kg-K\n",
+ "T3 = 343# in degree C\n",
+ "T3 = T3 + 273# in K\n",
+ "T2 = math.ceil(T3*P2)/P3# in K\n",
+ "m = 0.5# in kg \n",
+ "del_U = m*C_V*(T2-T3) # in kJ\n",
+ "print \"Change in internal energy = %0.3f kJ \" %del_U\n",
+ "print \"i.e. there is a loss of\",round(abs(del_U),3),\"kJ of internal energy\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in internal energy = -115.986 kJ \n",
+ "i.e. there is a loss of 115.986 kJ of internal energy\n"
+ ]
+ }
+ ],
+ "prompt_number": 125
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.26 - Page No : 102"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "R = 0.26# in kJ/kg-K\n",
+ "R = R * 10**3# in J/kg-K\n",
+ "Gamma = 1.4#\n",
+ "P1 = 3.1# MN/m**2\n",
+ "P1 = P1 * 10**6# N/m**2\n",
+ "P2 = 1.7# in MN/m**2\n",
+ "P2 = P2 * 10**6# in N/m**2\n",
+ "V1 = 500# in cm**3\n",
+ "T = 18# in degree C\n",
+ "T = T + 273# in K\n",
+ "T2 = 15# in degree C\n",
+ "T2 = T2 + 273# in K\n",
+ "m = (P1*V1)/(R*T)*10**-3# in kg\n",
+ "m_desh = (P2*V1)/(R*T2)*10**-3#in kg\n",
+ "M = m-m_desh# in kg\n",
+ "print \"The mass of oxygen = %0.2f kg \" %M\n",
+ "R = R * 10**-3# in kJ/kg-K\n",
+ "C_v = R/(Gamma-1) # in kJ/kg-K\n",
+ "Q = m_desh*C_v * (T-T2) # in kJ\n",
+ "print \"Heat transfered = %0.3f kJ \" %Q"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of oxygen = 9.13 kg \n",
+ "Heat transfered = 22.135 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 128
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.27 - Page No : 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1 = 1 * 10**5# in N/m**2\n",
+ "V1 = 0.1# in m**3\n",
+ "V2 = 0.01# in m**3\n",
+ "T1 = 90# in degree C\n",
+ "T1 = T1 +273# in K\n",
+ "R = 0.287# in kJ/kg-K\n",
+ "R = R *10**3#\n",
+ "C_v = 0.717# in kJ/kg-K\n",
+ "C_P = 1.005# in kJ/kg-K\n",
+ "m = (P1 * V1)/(R*T1) # in kg\n",
+ "Gamma = 1.4#\n",
+ "T2 = T1 * ((V1/V2)**(Gamma - 1)) # in K\n",
+ "del_U = m*C_v*(T1-T2) # in kJ\n",
+ "print \"The change in internal energy = %0.2f kJ\" %del_U\n",
+ "del_E = m * C_P*(T2-T1) # in kJ\n",
+ "print \"The change in enthalpy = %0.2f kJ\" %del_E\n",
+ "U2 = m*C_v*T2#Internal energy at 2 in kJ\n",
+ "T= 473# temp. of entering air\n",
+ "E = V1*C_P*T#Enthalpy of entering air in kJ\n",
+ "# U3= (m+V1)*C_v*T3 # (internal energy at 3)\n",
+ "# U3= U2+E\n",
+ "T3 = (E+U2)/( (m+V1)*C_v ) # in K\n",
+ "print \"Temperature = %0.0f K\" %T3\n",
+ "m=m+.1#\n",
+ "P3 =m* R*T3/V2# in N/m**2\n",
+ "print \"The pressure = %0.3f MN/m**2 \" %(P3*10**-6)\n",
+ "\n",
+ "# Note: There is a calculation error to evaluating the value of P3. So the answer in the book of P3 is wrong."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The change in internal energy = -37.77 kJ\n",
+ "The change in enthalpy = 52.94 kJ\n",
+ "Temperature = 785 K\n",
+ "The pressure = 4.415 MN/m**2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 134
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.28 - Page No : 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "T= 60+273# in K\n",
+ "T2= 25+273# in K\n",
+ "P1=3.5*10**6# in Pa\n",
+ "P2=1.7*10**6# in Pa\n",
+ "Gamma=0.4# value of Cp-Cv\n",
+ "m1=1# (assumed value)\n",
+ "# R= P1*V/(m*T) (i)\n",
+ "# R= P2*V/((m-m1)*T2) (ii)\n",
+ "# From eq(i) and (ii)\n",
+ "m= m1*P1*T2/(P1*T2-P2*T)\n",
+ "# U= m*Cv*T and U1= (m-m1)*Cv*T2+m1*Cv*T1\n",
+ "# U-U1= P1*V1= m1*R*T1 or\n",
+ "# m1*R*T1= m*Cv*T-[(m-m1)*Cv*T2+m1*Cv*T1]\n",
+ "T1= (m*T-(m-m1)*T2)/(m1*Gamma+m1) # in K\n",
+ "print \"The temperature of gas in the cylinder = %0.2f \u00b0C\" %(T1-273)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The temperature of gas in the cylinder = -5.47 \u00b0C\n"
+ ]
+ }
+ ],
+ "prompt_number": 136
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.29 - Page No : 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "U=180# energy received by system in kJ\n",
+ "RH= 200# rejected heat by system in kJ\n",
+ "RcHeat= 50# received heat by system in kJ\n",
+ "W= U-RH+RcHeat# in kJ\n",
+ "U1 = 0# in kJ\n",
+ "U2= U+U1# in kJ\n",
+ "U3 = RcHeat-RH+U2# in kJ\n",
+ "print \"Internal energy = %0.0f kJ \" %U3"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Internal energy = 30 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 138
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.30 - Page No : 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "C_P = 1.045# in kJ/kg-K\n",
+ "Q = 100# in kJ\n",
+ "del_T = Q/C_P# in degree C\n",
+ "T1 = 25# in degree C\n",
+ "T1 = T1 + 273# in K\n",
+ "T = 0# in degree C\n",
+ "T = T + 273# in K\n",
+ "T2 = T1 + del_T# in K\n",
+ "del_Phi = C_P * (log(T2/T1)) # in kJ/kg-K\n",
+ "print \"The change in entropy in the process = %0.3f kJ/kg-K \" %del_Phi\n",
+ "ini_entropy = C_P * (log(T1/T)) # initial entropy in kJ/kg-K\n",
+ "print \"The initial entropy = %0.3f kJ/kg-K \" %ini_entropy"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The change in entropy in the process = 0.291 kJ/kg-K \n",
+ "The initial entropy = 0.092 kJ/kg-K \n"
+ ]
+ }
+ ],
+ "prompt_number": 139
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_4.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_4.ipynb
new file mode 100644
index 00000000..debc04ae
--- /dev/null
+++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_4.ipynb
@@ -0,0 +1,113 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter No - 4 : Avaibility\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 4.1 - Page No : 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data\n",
+ "Q= 1000 # in kJ\n",
+ "T1= 1000 # in K\n",
+ "T2= 400 # in K\n",
+ "delta_Qsource= -Q/T1 # in kJ/K\n",
+ "delta_Qsystem= Q/T2 # in kJ/K\n",
+ "delta_Qnet=delta_Qsystem+delta_Qsource # in kJ/K\n",
+ "print \"The entropy production accompanying the heat transfer = %0.1f kJ/K \" %delta_Qnet\n",
+ "T0= 300 # in K\n",
+ "Q1= Q-T0*abs(delta_Qsource) # in kJ\n",
+ "Q2= Q-T0*abs(delta_Qsystem) # in kJ\n",
+ "LossOfEnergy= Q1-Q2 # in kJ\n",
+ "print \"The decrease in available energy after heat transfer = %0.0f kJ \" %LossOfEnergy"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The entropy production accompanying the heat transfer = 1.5 kJ/K \n",
+ "The decrease in available energy after heat transfer = 450 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 4.2 - Page No : 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from scipy.integrate import quad\n",
+ "# Given data\n",
+ "T1= 800+273 # in K\n",
+ "T2= 400+273 # in K\n",
+ "T3= 179+273 # in K\n",
+ "T0= 25+273 # in K\n",
+ "Q= 2018.4 # heat taken by water in kJ/kg\n",
+ "# Formula mCp*(T1-T2)= Q\n",
+ "mCp= Q/(T1-T2)\n",
+ "def integrand(t):\n",
+ " return 1/t\n",
+ "ans, err = quad(integrand, T1, T2)\n",
+ "delta_Qgas= mCp*ans # in kJ/K\n",
+ "delta_Qwater= Q/T3 # in kJ/K\n",
+ "delta_Qnet= delta_Qwater+delta_Qgas # in kJ/K\n",
+ "print \"Net entropy changes = %0.3f kJ/K \" %delta_Qnet\n",
+ "E1= T0*abs(delta_Qgas) # Original unavailable energy in kJ\n",
+ "E2= T0*delta_Qwater #unavailable energy after heat transfer in kJ\n",
+ "E= E2-E1 # in increase in unavailable energy in kJ\n",
+ "print \"The increase in unavailable energy = %0.2f kJ \" %E\n",
+ "\n",
+ "# Note: In the book, the calculation is not accurate"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net entropy changes = 2.112 kJ/K \n",
+ "The increase in unavailable energy = 629.28 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_5.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_5.ipynb
new file mode 100644
index 00000000..a63f1328
--- /dev/null
+++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_5.ipynb
@@ -0,0 +1,579 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter No - 5 : Air Standard Cycles\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 5.1 - Page No : 128"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data\n",
+ "T1 = 550 # in degree C\n",
+ "T1 = T1 + 273 # in K\n",
+ "T2 = 27 # in degree C\n",
+ "T2 = T2 + 273 # in K\n",
+ "Eta = ((T1-T2)/T1)*100 # in %\n",
+ "print \"Maximum possible efficiency for staem turbine plant = %0.2f %% \" %Eta\n",
+ "T1 = 2500 # in degree C\n",
+ "T1 = T1 + 273 # in K\n",
+ "T2 = 400 # in degree C\n",
+ "T2 = T2 + 273 # in K\n",
+ "Eta = ((T1-T2)/T1)*100 # in %\n",
+ "print \"Maximum possible efficiency for internal combustion engine = %0.2f %% \" %Eta\n",
+ "T1 = 450 # in degree C\n",
+ "T1 = T1 + 273 # in K\n",
+ "T2 = 15 # in degree C\n",
+ "T2 = T2 + 273 # in K\n",
+ "Eta = ((T1-T2)/T1)*100 # in %\n",
+ "print \"Maximum possible efficiency for nuclear power plant = %0.2f %% \" %Eta"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum possible efficiency for staem turbine plant = 63.55 % \n",
+ "Maximum possible efficiency for internal combustion engine = 75.73 % \n",
+ "Maximum possible efficiency for nuclear power plant = 60.17 % \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 5.2 - Page No : 133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import pi\n",
+ "# Given data\n",
+ "D = 0.3 # in m\n",
+ "L = 0.45 # in m\n",
+ "V_s = (pi/4)*(D)**2*L # in m**3\n",
+ "V_c = 0.0114 # in m**3\n",
+ "V = V_c+V_s # in m**3\n",
+ "r = V/V_c \n",
+ "Gamma = 1.4 \n",
+ "Eta = (1-((1/r)**(Gamma-1)))*100 # in %\n",
+ "print \"Efficiency of engine = %0.1f %% \" %Eta"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Efficiency of engine = 41.3 % \n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 5.3 - Page No : 133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "# Given data\n",
+ "P1 = 0.93 # in bar\n",
+ "T1 = 93 # in degree C\n",
+ "T1 = T1 + 273 # in K\n",
+ "V2 = 1 # assumed\n",
+ "V1 = 8.5*V2 \n",
+ "r = V1/V2 \n",
+ "Gamma = 1.4 \n",
+ "P2 = P1 * ((V1/V2)**(Gamma)) # in bar\n",
+ "print \"Pressure at the beginning of compression stroke = %0.1f bar \" %P2\n",
+ "T2 = (P2*V2*T1)/(P1*V1) # in K\n",
+ "print \"Temperature at the beginning of compression stroke = %0.0f \u00b0C\" %(T2-273)\n",
+ "P3 = 38 # in bar\n",
+ "T3 = T2 * (P3/P2) # in K\n",
+ "print \"Pressure at the beginning of expansion stroke = %0.0f bar\" %P3\n",
+ "print \"Temperature at the beginning of expansion stroke = %0.0f \u00b0C\" %(T3-273)\n",
+ "V3 = V2 \n",
+ "V4 = V1 \n",
+ "P4 = P3 * ((V3/V4)**(Gamma)) # in bar\n",
+ "T4 = T1 * (P4/P1) # in K\n",
+ "T4 = math.ceil(T4-273) # in degree C\n",
+ "print \"Pressure at the end of expansion stroke = %0.1f bar \" %P4\n",
+ "print \"Temperature at the end of expansion stroke = %0.0f \u00b0C\" %T4\n",
+ "Eta = 1 - (1/((r)**(Gamma-1))) \n",
+ "Eta = Eta * 100 # in %\n",
+ "print \"Standard air efficiency = %0.1f %% \" %Eta"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure at the beginning of compression stroke = 18.6 bar \n",
+ "Temperature at the beginning of compression stroke = 588 \u00b0C\n",
+ "Pressure at the beginning of expansion stroke = 38 bar\n",
+ "Temperature at the beginning of expansion stroke = 1486 \u00b0C\n",
+ "Pressure at the end of expansion stroke = 1.9 bar \n",
+ "Temperature at the end of expansion stroke = 475 \u00b0C\n",
+ "Standard air efficiency = 57.5 % \n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 5.4 - Page No : 135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "CalorificValue= 14.887*10**3 # in kJ/m**3\n",
+ "Vs= 1 # in m**3 (assumed)\n",
+ "Vc= 0.25*Vs # clearance volume in m**3\n",
+ "V= Vs+Vc # in m**3\n",
+ "Ratio= V/Vc # ratio of compression\n",
+ "Gamma= 1.4 \n",
+ "r= 5 \n",
+ "Eta=1-1/(r**(Gamma-1)) \n",
+ "Eta= Eta*100 # in %\n",
+ "print \"Air standard efficiency = %0.1f %%\" %Eta\n",
+ "Eta_Th= Eta*60/100 # thermal efficiency\n",
+ "print \"Thermal efficiency = %0.2f %%\" %Eta_Th\n",
+ "Eta_br_th= Eta_Th*75/100 # break thermal efficiency\n",
+ "print \"Brake thermal efficiency = %0.2f %%\" %Eta_br_th\n",
+ "E= 3600 # energy equivalent of brake in kJ\n",
+ "GasConsumption= E/CalorificValue # in m**3\n",
+ "print \"The consumption of gas = %0.3f m**3\" %GasConsumption"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air standard efficiency = 47.5 %\n",
+ "Thermal efficiency = 28.48 %\n",
+ "Brake thermal efficiency = 21.36 %\n",
+ "The consumption of gas = 0.242 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 5.7 - Page No : \t142"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Gamma = 1.4 \n",
+ "r = 8 \n",
+ "Eta = 1 - (1/((r)**(Gamma-1))) \n",
+ "Eta = Eta * 100 # in %\n",
+ "print \"Otto engine efficiency = %0.1f %% \" %Eta\n",
+ "r = 13 \n",
+ "x = 1 \n",
+ "Rho = 2.5 \n",
+ "Eta = 1-(1/r)**(Gamma-1)*((Rho**Gamma-1)/(Gamma*(Rho-1)))\n",
+ "Eta = Eta * 100 # in %\n",
+ "print \"Diesel engine efficiency = %0.1f %% \" %Eta\n",
+ "r = 13 \n",
+ "x = 3.5 \n",
+ "Rho = 2.5 \n",
+ "Eta = 1-(1/r)**(Gamma-1)*((x*Rho**Gamma-1)/((x-1)+x*Gamma*(Rho-1))) \n",
+ "Eta = Eta * 100 # in %\n",
+ "print \"Dual engine efficiency = %0.1f %% \" %Eta"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Otto engine efficiency = 56.5 % \n",
+ "Diesel engine efficiency = 55.5 % \n",
+ "Dual engine efficiency = 57.7 % \n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 5.8 - Page No : 143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "D = 15 \n",
+ "L = 25 \n",
+ "V_s = (pi/4) * (D)**2 * L # in cm**3\n",
+ "V_c = 400 # in cm**3\n",
+ "V = V_s+V_c # in cm**3\n",
+ "r = V/V_c \n",
+ "Rho = (V_c +( V_s*(5/100) ))/V_c \n",
+ "Gamma = 1.4 \n",
+ "Eta = 1-((1/r)**(Gamma-1)) * ( (((Rho)**(Gamma))-1)/(Gamma*(Rho-1)) ) \n",
+ "Eta = Eta * 100 # in %\n",
+ "print \"Efficiency of diesel cycle = %0.3f %% \" %Eta\n",
+ "\n",
+ "# Note: Calculation in the book is wrong, So the answer in the book is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Efficiency of diesel cycle = 59.335 % \n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 5.9 - Page No : 143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "C_P = 0.966 # in kJ/kg-K\n",
+ "C_v = 0.712 # in kJ/kg-K\n",
+ "T1 = 83 # in degree C\n",
+ "T1 =T1 + 273 # in K\n",
+ "T3 = 1800 # in degree C\n",
+ "T3 = T3+273 # in K\n",
+ "r = 13 \n",
+ "Gamma = 1.4 \n",
+ "T2 = T1 * (r)**(Gamma-1) # in K\n",
+ "print \"Temperature at the end of compression = %0.0f \u00b0C \" %(T2-273)\n",
+ "Rho = T3/T2 \n",
+ "T4 = ((Rho)**(Gamma)) * T1 # in K\n",
+ "print \"Temperature at the end of expansion = %0.0f \u00b0C \" %(T4-273)\n",
+ "Q = C_P * (T3-T2) # in kJ\n",
+ "print \"Heat supplied at constant pressure = %0.0f kJ \" %Q\n",
+ "Q1 = C_v * (T4-T1) # in kJ\n",
+ "print \"Heat rejected at constant volume = %0.1f kJ \" %Q1\n",
+ "Eta = ((Q-Q1)/Q) * 100 # in %\n",
+ "print \"Thermal efficiency = %0.1f %% \" %Eta\n",
+ "\n",
+ "# Note: The answer in the book is not accurate"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature at the end of compression = 720 \u00b0C \n",
+ "Temperature at the end of expansion = 724 \u00b0C \n",
+ "Heat supplied at constant pressure = 1043 kJ \n",
+ "Heat rejected at constant volume = 456.6 kJ \n",
+ "Thermal efficiency = 56.2 % \n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 5.11 - Page No : 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "r = 10 \n",
+ "Gamma = 1.4 \n",
+ "P1 = 1 # in bar\n",
+ "P2 = 1 * ((r)**(Gamma)) # in bar\n",
+ "P3 = 40 # in bar\n",
+ "P4 = P3 # in bar\n",
+ "T1 = 80 # in degree C\n",
+ "T1 = T1+273 # in K\n",
+ "T2 = T1 * ((r)**(Gamma-1)) # in K\n",
+ "T3 = (P3/P2)*T2 # in K\n",
+ "T4 = 1700 # in degree C\n",
+ "T4 = T4 + 273 # in K\n",
+ "Vc= 1 # in m**3(assumed)\n",
+ "V4= Vc*T4/T3 \n",
+ "V1= 10*Vc # volume at beginning of compression in m**3\n",
+ "Vs= V1-Vc # in m**3\n",
+ "PercentageStroke= (V4-Vc)/Vs*100 # in %\n",
+ "print \"Percentage of stroke at which heat reception must stop = %0.1f %%\" %PercentageStroke\n",
+ "r= V1/V4 \n",
+ "P5= P4/r**Gamma # in bar\n",
+ "ratio= (P4*V4-P5*V1)/(P2*Vc-P1*V1) \n",
+ "print \"Ratio of work done during expansion to that done during compression = %0.2f\" %ratio"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage of stroke at which heat reception must stop = 4.4 %\n",
+ "Ratio of work done during expansion to that done during compression = 2.01\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 5.12 - Page No : 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1 = 1 # in bar\n",
+ "T1 = 320 # in K\n",
+ "r= 11.6 \n",
+ "Vc= 1 # in m**3 (assumed)\n",
+ "Vs= 10.6*Vc #in m**3\n",
+ "V1= r*Vc # in m**3\n",
+ "Gamma= 1.4 \n",
+ "P2= P1*r**Gamma # in bar\n",
+ "V2= Vc # in m**3\n",
+ "V3= Vc # in m**3\n",
+ "V4=1.38*Vc # in m**3\n",
+ "P3= 1.53*P2 # in bar\n",
+ "P4= P3 # in bar\n",
+ "expansionRatio= V1/V4 \n",
+ "P5= P4/expansionRatio**Gamma # in bar\n",
+ "V5= r*Vc # in m**3\n",
+ "W= (P3*(V4-Vc)+(P4*V4-P5*V5)/(Gamma-1)-(P2*V2-P1*V1)/(Gamma-1))*10**5 # in joule\n",
+ "Pm= W/(Vs*10**4) # in N/cm**2\n",
+ "print \"The mean effective pressure of the cycle = %0.2f N/cm**2\" %Pm\n",
+ "\n",
+ "# Note: The calculation in the book is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mean effective pressure of the cycle = 59.66 N/cm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 5.13 - Page No : 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import log\n",
+ "# Given data\n",
+ "C_P = 0.998 # in kJ/kg-K\n",
+ "C_v = 0.707 #in kJ/kg-K\n",
+ "T1 = 15 # in degree C\n",
+ "T1 = T1 +273 # in K\n",
+ "T2 = 400 # in degree C\n",
+ "T2 = T2 + 273 # in K\n",
+ "Eta = (1 - (T1/T2))*100 # in %\n",
+ "print \"The ideal efficiency when engine is fitted with a perfect regenerator = %0.2f %% \" %Eta\n",
+ "R = C_P-C_v # in kJ/kg-K\n",
+ "r = 3 \n",
+ "Eta_r = 0.8 \n",
+ "Eta = ((R*(log(r)))*(T2-T1))/( (R*(log(r))*T2) + (1-Eta_r) * C_v * (T2-T1) )*100 # in %\n",
+ "print \"The ideal efficicency when efficiency of the regenrator is 0.8 = %0.1f %% \" %Eta"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ideal efficiency when engine is fitted with a perfect regenerator = 57.21 % \n",
+ "The ideal efficicency when efficiency of the regenrator is 0.8 = 45.7 % \n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 5.14 - Page No : 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "T1 = 15 # in degree C\n",
+ "T1 = T1 + 273 # in K\n",
+ "P1 = 1 # in bar\n",
+ "P2 = 5 # in bar\n",
+ "Gamma = 1.4 \n",
+ "T2 = T1 * ((P2/P1)**((Gamma-1)/Gamma)) # in K\n",
+ "C_P = 1.003 # in kJ/kg-K\n",
+ "CompWork = C_P*(T2 - T1) # Compressure work in kJ/kg\n",
+ "T3 = 800 # in degree C\n",
+ "T3 = T3 + 273 # in K\n",
+ "T4 = T3/((P2/P1)**((Gamma-1)/Gamma)) # in K\n",
+ "T4= round(T4) # in K\n",
+ "turbineWork = C_P * (T3-T4) # Turbine work in kJ/kg\n",
+ "Q = C_P * (T3-T2) # Heat input in kJ/kg\n",
+ "W = turbineWork-CompWork # in kJ/kg\n",
+ "W= round(W) #in kJ/kg\n",
+ "Eta = (W/Q)* 100 # in %\n",
+ "print \"the thermal efficiency of plant = %0.0f %% \" %round(Eta)\n",
+ "print \"Output of gas turbine installation\",int(W),\"kW per kg of flow per second\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " the thermal efficiency of plant = 37 % \n",
+ "Output of gas turbine installation 229 kW per kg of flow per second\n"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 5.15 - Page No : 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "C_v = 0.711 # in kJ/kg-K\n",
+ "T3 = 850 # in degree C\n",
+ "T3 = T3 + 273 # in K\n",
+ "T2 = 90 # in degree C\n",
+ "T2 = T2 + 273 # in K\n",
+ "E = C_v * (log(T3/T2)) # Entropy change in kJ/kg-K\n",
+ "print \"Entrophy change = %0.3f kJ/kg-K \" %E\n",
+ "W = (E * (T3-T2))/2 #output work in kJ/kg\n",
+ "Q = T2+E #rejected heat in kJ/kg\n",
+ "Q1 = W + Q #heat supplied in kJ/kg\n",
+ "Eta = (W/Q1) # in %\n",
+ "print \"The efficiency of cycle = %0.3f %% \" %Eta"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entrophy change = 0.803 kJ/kg-K \n",
+ "The efficiency of cycle = 0.456 % \n"
+ ]
+ }
+ ],
+ "prompt_number": 63
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_6.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_6.ipynb
new file mode 100644
index 00000000..74d22d02
--- /dev/null
+++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_6.ipynb
@@ -0,0 +1,1446 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter No - 6 : Properties Of Steam And Steam Cycle\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.1 - Page No : 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data\n",
+ "P = 10 # in bar\n",
+ "P = P *10**5 # in N/m**2\n",
+ "V = 2 #volume of water in m**3\n",
+ "W = P * V # in J\n",
+ "W = W * 10**-6 # in MJ\n",
+ "print \"Work done = %0.0f MJ \" %W"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done = 2 MJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.2 - Page No : 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P = 1.013 # atm pressure in bar\n",
+ "P = P * 10**5 # in N/m**2\n",
+ "area= 1000*10**-4 # in m**2\n",
+ "L_w = 1000 # in N\n",
+ "P_L = L_w/area # Pressure due to load in N/m**2\n",
+ "PressOnPiston = P_L+P # absolute pressure to piston in N/m**2\n",
+ "a = 10**-3 # in m**2\n",
+ "U = PressOnPiston*a # in Joules\n",
+ "print \"Energy required to pump 1 kg of water at 0\u00b0C into the cylinder = %0.1f joules\" %U \n",
+ "# Part (b)\n",
+ "absPressure= 111.3*10**3 # in N/m**2\n",
+ "increaseInVol= (1.02-1)*10**-3 # in m**3\n",
+ "u_f= increaseInVol*absPressure # in joules\n",
+ "print \"Energy required to effect the change in volume = %0.3f joules \" %u_f \n",
+ "# Part (c)\n",
+ "increaseInVol= (1.52-0.001) # in m**3\n",
+ "ExternalWorkDone= absPressure*increaseInVol # in joules\n",
+ "print \"External work done = %0.3f kJ\" %(ExternalWorkDone*10**-3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy required to pump 1 kg of water at 0\u00b0C into the cylinder = 111.3 joules\n",
+ "Energy required to effect the change in volume = 2.226 joules \n",
+ "External work done = 169.065 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.3 - Page No : 175"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "m_s = 92.3 # mass of steam in kg\n",
+ "m_w = 0.78 # mass of water in kg\n",
+ "m = m_s + m_w # total mass in kg\n",
+ "D_s = 92.3 # Dry steam in kg\n",
+ "D_F = D_s/m # Dryness fraction\n",
+ "print \"Dryness fraction = %0.2f \" %D_F"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dryness fraction = 0.99 \n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.4 - Page No : 176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "L = 693.3 # Liquid heat in kJ/kg\n",
+ "L1 = 125.7 # Liquid heat of feed water in kJ/kg\n",
+ "m = 2 # mass of water in kg\n",
+ "Q = m * (L-L1) # in kJ\n",
+ "print \"Heat required to raise temperature = %0.1f kJ \" %Q\n",
+ "print \"The water is still liquid at the end of the heat supply\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat required to raise temperature = 1135.2 kJ \n",
+ "The water is still liquid at the end of the heat supply\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.5 - Page No : 176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "x = 0.9 \n",
+ "h_f = 762.2 # in kJ/kg\n",
+ "h_fg = 2013.8 # in kJ/kg\n",
+ "H_wet = h_f + (x*h_fg) # in kJ/kg\n",
+ "En = 125.7 # Enthapy of liquid in kJ/kg\n",
+ "H_wet = H_wet - En # in kJ\n",
+ "print \"When dry fraction is 0.9, Heat required, to convert = %0.1f kJ \" %H_wet\n",
+ "# Part (b) when dry fraction is saturated\n",
+ "H_sat = h_f + h_fg # in kJ/kg\n",
+ "H_sat = H_sat-En # in kJ\n",
+ "print \"Heat required when steam is dry and saturated = %0.1f kJ \" %H_sat\n",
+ "C_P = 2.093 # in kJ/kg-K\n",
+ "t_sup = 300 # in degree C\n",
+ "t_sat = 179.9 # in degree C\n",
+ "H_sup = h_f + h_fg + C_P*(t_sup-t_sat) # in kJ\n",
+ "H_sup1 = H_sup - En # in kJ\n",
+ "print \"Heat required when the steam is super heated = %0.1f kJ \" %H_sup1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When dry fraction is 0.9, Heat required, to convert = 2448.9 kJ \n",
+ "Heat required when steam is dry and saturated = 2650.3 kJ \n",
+ "Heat required when the steam is super heated = 2901.7 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.6 - Page No : 177"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "x = 0.95 \n",
+ "v_f = 0.001 \n",
+ "v_g = 0.1238 # in m**3/kg\n",
+ "V_wet = ((1-x)*v_f)+(x*v_g) # in m**3 correction little diff in ans \n",
+ "print \"Specific volume of wet steam = %0.5f m**3 \" %V_wet\n",
+ "print \"When the steam is dry saturated, the specific volume = %0.4f m**3/kg \" %v_g\n",
+ "T_sat = 201.3 # in degree C\n",
+ "T_sat = T_sat + 273 # in K\n",
+ "T_sup = 300 # in degree C\n",
+ "T_sup = T_sup + 273 # in K\n",
+ "V_sup = v_g * (T_sup/T_sat) # in m**3\n",
+ "print \"When the steam is superheated, the specific volume = %0.2f m**3 \" %V_sup"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific volume of wet steam = 0.11766 m**3 \n",
+ "When the steam is dry saturated, the specific volume = 0.1238 m**3/kg \n",
+ "When the steam is superheated, the specific volume = 0.15 m**3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.7 - Page No : 178"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "h_f = 720.7 # in kJ\n",
+ "h_fg = 2046.6 # in kJ\n",
+ "v_g = 0.2405 # in m**3\n",
+ "x = 0.9 \n",
+ "P = 8*10**2 # in kN/m**2\n",
+ "U_sat = h_f+x*h_fg-x*v_g*P # in kJ\n",
+ "print \"When the steam is wet, the internal energy = %0.2f kJ \" %U_sat\n",
+ "En = 2767.3 # Enthalpy of dry saturated stream\n",
+ "U_sat = En-(v_g*P) #in kJ/kg\n",
+ "print \"When the steam is dry and saturated, the internal energy = %0.2f kJ/kg \" %U_sat\n",
+ "C_P = 2.093 \n",
+ "del_s = 100 # in degree C\n",
+ "H_sup = h_f + h_fg + (C_P*del_s) # in kJ/kg\n",
+ "t_sat = 170.4+273 # in K\n",
+ "V_sup = (v_g*(t_sat+del_s))/t_sat # in m**3\n",
+ "U_sup = H_sup - P*V_sup # in kJ/kg\n",
+ "print \"When the steam is super heated, the internal energy = %0.1f kJ/kg \" %U_sup"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When the steam is wet, the internal energy = 2389.48 kJ \n",
+ "When the steam is dry and saturated, the internal energy = 2574.90 kJ/kg \n",
+ "When the steam is super heated, the internal energy = 2740.8 kJ/kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.8 - Page No : 179"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "x = 0.88 # dryness fraction\n",
+ "h_fg = 2392.7 # in kJ/kg\n",
+ "H_wet = x * h_fg # in kJ/kg\n",
+ "Vs = 14.67 # Specific volume in m**3/kg\n",
+ "V_wet = x * Vs # in m**3/kg\n",
+ "Q = H_wet/V_wet # in kJ/m**3\n",
+ "print \"Heat to be extracted = %0.1f kJ/m**3 \" %Q "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat to be extracted = 163.1 kJ/m**3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.9 - Page No : 180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P = 12*10**2 # in kN/m**2\n",
+ "h_f = 798.1 # in kJ/kg\n",
+ "h_fg = 1984.5 # in kJ/kg\n",
+ "x = 0.8 \n",
+ "H_wet = h_f + (x*h_fg) # in kJ/kg\n",
+ "v_f = 0.001 # in m**3\n",
+ "v_g = 0.1684 # in m**3\n",
+ "V_wet = ((1-x)*v_f) + (x*v_g) # in m**3\n",
+ "En = H_wet/V_wet # kJ/m**3\n",
+ "print \"The enthalpy = %0.3f kJ/m**3 \" %En\n",
+ "U_wet = H_wet - ( V_wet * P ) # in kJ\n",
+ "U_wet1 = (U_wet/V_wet) # in kJ/m**3\n",
+ "print \"Internal energy = %0.3f kJ/m**3 \" %U_wet1\n",
+ "\n",
+ "# Note: There is calculation error to find the value of V_wet.( the correct value of V_wet is 0.13492 not 0.1308), \n",
+ "# so there is some difference between the output of coding and the answer of the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The enthalpy = 17682.330 kJ/m**3 \n",
+ "Internal energy = 16482.330 kJ/m**3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.10 - Page No : 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import log\n",
+ "# Given data\n",
+ "T = 0 # in degree C\n",
+ "T = T + 273 # in K\n",
+ "T_sat = 179.9 # in degree C\n",
+ "T_sat = T_sat + 273 # in K\n",
+ "x = 0.8 \n",
+ "h_fg = 2013.8 # in kJ/kg\n",
+ "c_f = 4.188 \n",
+ "Phi_wet = c_f*log(T_sat/T)+x*h_fg/T_sat # in kJ/kg-K\n",
+ "print \"The entropy of wet steam = %0.2f kJ/kg-K \" %Phi_wet\n",
+ "Phi_g = (c_f*(log(T_sat/T))) + (h_fg/T_sat) # in kJ/kg-K\n",
+ "print \"The entropy of dry saturated steam = %0.2f kJ/kg-K \" %Phi_g\n",
+ "C_P = 2.3 \n",
+ "T_sup = 200+273 # in K\n",
+ "Phi = c_f *log(T_sat/T) + h_fg/T_sat+ C_P*log(T_sup/T_sat) # in kJ/kg-K\n",
+ "print \"The entropy of superheated steam = %0.2f kJ/kg-K \" %Phi"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The entropy of wet steam = 5.68 kJ/kg-K \n",
+ "The entropy of dry saturated steam = 6.57 kJ/kg-K \n",
+ "The entropy of superheated steam = 6.67 kJ/kg-K \n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.11 - Page No : 186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "T_sat = 198.3 # in degree C\n",
+ "T_sat = T_sat + 273 # in K\n",
+ "T_sup = 300 # in degree C\n",
+ "T_sup = T_sup + 273 # in K\n",
+ "c_f = 4.188 \n",
+ "h_fg = 1945 # in kJ/kg-K\n",
+ "T = 273 # in K\n",
+ "C_P = 2.093 # in kJ/kg-K\n",
+ "Phi_sup =c_f *log(T_sat/T)+h_fg/T_sat+C_P*log(T_sup/T_sat) # in kJ/kg-K\n",
+ "print \"The value of specific entropy = %0.2f kJ/kg-K \" %Phi_sup"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of specific entropy = 6.82 kJ/kg-K \n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.12 - Page No : \t195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given data\n",
+ "P = 16 # in bar\n",
+ "m_w = 73 # in gm\n",
+ "m_s = 980 # in gm\n",
+ "x = m_s/(m_s+m_w) \n",
+ "print \"Dryness fraction of steam = %0.2f \" %x"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dryness fraction of steam = 0.93 \n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.13 - Page No : 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1 = 7 # in bar\n",
+ "P2 = 1.2 # in bar\n",
+ "h_f1 = 696.9 # in kJ/kg\n",
+ "h_fg1 = 2065 # in kJ/kg\n",
+ "h_g2 = 2684.9 # in kJ/kg\n",
+ "T_sup = 112 # in degree C\n",
+ "T_sat = 104.77 # in degree C\n",
+ "C_P = 2.1 # in kJ/kg\n",
+ "x1 = (h_g2+(C_P*(T_sup-T_sat))-h_f1)/h_fg1 \n",
+ "print \"Dryness fraction of steam = %0.3f\"%x1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dryness fraction of steam = 0.970\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.14 - Page No : 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1 = 14 # in bar\n",
+ "P2 = 1.2 # in bar\n",
+ "h_f1 = 830 \n",
+ "h_fg1 = 1958 \n",
+ "h_g2 = 2684.9 \n",
+ "x = (h_g2-h_f1)/h_fg1 \n",
+ "print \"Dryness fraction of steam = %0.4f\" %x"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dryness fraction of steam = 0.9473\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.15 - Page No : 199"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "m_s = 2.2 # in kg \n",
+ "m_w = 0.18 # in kg\n",
+ "x1 = m_s/(m_s+m_w) \n",
+ "h_f1 = 743 \n",
+ "h_fg1 = 2031 \n",
+ "h_g2 = 2685 \n",
+ "C_P = 2 \n",
+ "T_sup = 115 # in degree C\n",
+ "T_sat = 104.8 # in degree C\n",
+ "x2 = (h_g2 + (C_P*(T_sup-T_sat)) - h_f1)/h_fg1 \n",
+ "x = x1 * x2 \n",
+ "print \"The dryness fraction of steam = %0.4f\" %x"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The dryness fraction of steam = 0.8931\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.16 - Page No : 200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "h_f1 = 232 # in kJ/kg\n",
+ "h_fg = 2369 # in kJ/kg\n",
+ "x = 0.8 \n",
+ "h_f2 = 167.5 # in kJ/kg\n",
+ "H_wet1 = h_f1 + (x*h_fg) # in kJ/kg\n",
+ "H_wet = H_wet1 - h_f2 # in kJ/kg\n",
+ "T1 = 38 # in degree C\n",
+ "T2 = 25 # in degree C\n",
+ "T = T1-T2 # in degree C\n",
+ "SpeHeat = 4.188 # in kJ/kg-K\n",
+ "m = H_wet/(T*SpeHeat) # in kJ/kg\n",
+ "print \"The quantity of circulating water required of condensed steam = %0.0f kJ/kg \" %round(m)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The quantity of circulating water required of condensed steam = 36 kJ/kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.17 - Page No : 200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "V1 = 0.4 # volume of dry saturated steam\n",
+ "P1 = 1.5 # in MN/m**2\n",
+ "print \"Part (i) : For Isothermal operation :\"\n",
+ "Vs = 0.1318 # specific volume of dry steam\n",
+ "m = V1/Vs # quantity of steam present in the vessel in kg\n",
+ "h_f1= 844.6 # in kJ/kg\n",
+ "x1= 0.5 # dryness fraction\n",
+ "h_fg1= 1945.2 # in kJ/kg\n",
+ "Specific_Enth= h_f1+x1*h_fg1 # in kJ/kg\n",
+ "En= Specific_Enth*m # kJ\n",
+ "print \"Enthalpy of the fluid = %0.2f kJ \" %En\n",
+ "HeatLost= m*(1-x1)*h_fg1 # in kJ\n",
+ "print \"The loss of heat during the constant temperature process = %0.1f kJ \" % HeatLost\n",
+ "print \"Part (ii) : For Hyperbolic operation :\"\n",
+ "h_f2= 1008.3 # in kJ/kg\n",
+ "h_fg2= 1794 # in kJ/kg\n",
+ "Vs= 0.0659 # Specific volume after compression in m**3/kg\n",
+ "Vs1= 0.0666 # Specific volume of dry saturated steam in m**3/kg\n",
+ "x2=Vs/Vs1 \n",
+ "H_wet= h_f2+x2*h_fg2 # in kJ/kg\n",
+ "H= m*H_wet # in kJ\n",
+ "print \"Enthalpy of the fluid = %0.1f kJ\" %H\n",
+ "# Note : The calculation in the book is not accurate"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part (i) : For Isothermal operation :\n",
+ "Enthalpy of the fluid = 5515.02 kJ \n",
+ "The loss of heat during the constant temperature process = 2951.7 kJ \n",
+ "Part (ii) : For Hyperbolic operation :\n",
+ "Enthalpy of the fluid = 8447.5 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.18 - Page No : 201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import pi\n",
+ "# Given data\n",
+ "P = 13.5 # power developed by engine in kW\n",
+ "P1 = 12 # Steam consumption of the engine in kg/kWh\n",
+ "S_C = P*P1 #steam consumed per hour in kg\n",
+ "S_C = S_C/60 # in kg/min\n",
+ "x = 0.85 \n",
+ "V_g = 1.430 \n",
+ "Volume = x * V_g # in m**3/kg\n",
+ "Volume = S_C * Volume # in m**3\n",
+ "d = 15*10**-2 #diameter of exhaust pipe in meter\n",
+ "A = (pi/4) * (d)**2 # in m**2\n",
+ "C = Volume/A # in meter/minute\n",
+ "print \"The velocity of steam = %0.1f metre/minute\" %C"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of steam = 185.7 metre/minute\n"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.19 - Page No : 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P = 2 #pressure of steam in bar\n",
+ "m = 0.1 #mass of steam in kg\n",
+ "V = 0.080 #volume of steam in m**3\n",
+ "V1 = 0.8872 #volume of 1kg dry saturated steam in m**3\n",
+ "x = V/(m*V1) \n",
+ "print \"Dryness fraction of steam = %0.3f\" %x"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dryness fraction of steam = 0.902\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.20 - Page No : 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "# Given data\n",
+ "P1 = 7+ 1 # in bar\n",
+ "H = 2767 # Enthalpy in kJ/kg\n",
+ "P2 = 1.5+1 # in bar\n",
+ "H1 = 2717 # enthalpy of 1kg of dry steam in kJ/kg\n",
+ "H_sup = H - H1 # Superheated of 1kg of steam in kJ\n",
+ "S1 = 2.17 # super heated steam in kJ/kg-K\n",
+ "theta = H_sup/S1 # in degree C\n",
+ "T_sat = 127.4 # in degree C\n",
+ "T_sup = T_sat + theta # in degree C\n",
+ "print \"The super heated temperature = %0.0f degree C \" %(T_sup)\n",
+ "# Note : The calculation in the book is not accurate"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The super heated temperature = 150 degree C \n"
+ ]
+ }
+ ],
+ "prompt_number": 67
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.21 - Page No : 203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "T_sat = 99.6 # in degree C\n",
+ "h_fg = 2258 # in kJ/kg\n",
+ "m = 1 # steam output of the boiler in (assumed)\n",
+ "m1 = 0.03 # exhaust steam\n",
+ "x = 0.9 \n",
+ "T1 = 21 # in degree C\n",
+ "Cp = 4.187 # kJ/kg-K\n",
+ "# Formula m1*(Cp*(T_sat-t)+x*h_fg)= m*Cp*(t-T1)\n",
+ "t= (m1*(Cp*T_sat+x*h_fg)+m*Cp*T1)/(Cp*(m+m1))\n",
+ "print \"Temperature of the feed water leaving the heater = %0.1f degree C \" %t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature of the feed water leaving the heater = 37.4 degree C \n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.22 - Page No : 203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "T = 20 # in degree C\n",
+ "H1 = 3039 # Enthalpy in kJ/kg\n",
+ "H2 = 2725 # Enthalpy of 1kg dry saturated steam\n",
+ "H_sup = H1-H2 # superheat of 1kg of steam in kJ/kg\n",
+ "H= 2621.4 # heat required for 1kg or water in kJ\n",
+ "m = H_sup/H # in kg\n",
+ "print \"Quantity of water = %0.2f kg \" %m"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Quantity of water = 0.12 kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 71
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.23 - Page No : 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "x = 0.9 \n",
+ "h_f1 = 1087.4 # in kJ/kg\n",
+ "h_fg1 = 1712.9 # in kJ/kg\n",
+ "H_wet1 = h_f1 + (x*h_fg1) # in kJ/kg\n",
+ "H_sup2 = 3095 # in kJ/kg\n",
+ "H = H_sup2 - H_wet1 # in kJ/kg\n",
+ "print \"Heat recieved = %0.0f kJ/kg \" %H"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat recieved = 466 kJ/kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 74
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.24 - Page No : 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "V_fg =0.1632 # in m**3\n",
+ "T_sup = 200 # in degree C\n",
+ "T_sup = T_sup + 273 # in K\n",
+ "T_sat = 188 # in degree C\n",
+ "T_sat = T_sat + 273 # in K\n",
+ "V_sup = (V_fg*T_sup)/T_sat # in m**3/kg\n",
+ "V = 0.24 # Capacity of the vessel in m**3\n",
+ "Q = V/V_sup # in kg\n",
+ "V1 = 0.9774 #volume of 1kg dry saturated steam in m**3\n",
+ "x = V_sup/V1 \n",
+ "print \"Dryness fraction of steam = %0.4f\" %x"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dryness fraction of steam = 0.1713\n"
+ ]
+ }
+ ],
+ "prompt_number": 76
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.25 - Page No : 205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "V = 0.6 # in m**3\n",
+ "P2 = 2*10**2 # in kN/m**2\n",
+ "P1 = 10*10**2 # in kN/m**2\n",
+ "m = V/0.1946 # in kg\n",
+ "V_s = 0.8872 # Specific volume of dry saturated steam in m**3\n",
+ "x = 0.1946/V_s \n",
+ "h_f1 = 505 # in kJ/kg\n",
+ "h_fg1 = 2202 # in kJ/kg\n",
+ "H2 = m*(h_f1 + (x*h_fg1)) # in kJ\n",
+ "H1 = m*2776 # in kJ\n",
+ "Q = (H2-H1) - (V*(P2-P1)) # in kJ\n",
+ "print \"The mass of steam in the vessel = %0.2f kg \" %m\n",
+ "print \"The dryness fraction of steam = %0.4f the vessel \" %x\n",
+ "print \"The amount o heat transferred = %0.0f kJ \" %int(Q)\n",
+ "print \"Thus during cooling process there is loss of heat\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of steam in the vessel = 3.08 kg \n",
+ "The dryness fraction of steam = 0.2193 the vessel \n",
+ "The amount o heat transferred = -5032 kJ \n",
+ "Thus during cooling process there is loss of heat\n"
+ ]
+ }
+ ],
+ "prompt_number": 81
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.26 - Page No : 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "x1 = 0.95 \n",
+ "P1 = 9 # in bar\n",
+ "P1= P1*10**2 # in kN/m**2\n",
+ "h_f1 = 743 # in kJ/kg\n",
+ "h_fg1 = 2030 # in kJ/kg\n",
+ "V = 0.204 # in m**3\n",
+ "x2 = 0.544\n",
+ "P2 = 5 # in bar\n",
+ "P2= P2*10**2 # in kN/m**2\n",
+ "h_f2 = 640 # in kJ/kg\n",
+ "h_fg2 = 2108 # in kJ/kg\n",
+ "H_wet1 = h_f1 + (x1*h_fg1) # in kJ/kg\n",
+ "print \"Total energy = %0.1f kJ/kg \" %H_wet1\n",
+ "U1 = H_wet1 - P1*V # in kJ/kg\n",
+ "print \"The internal energy = %0.1f kJ/kg \" %U1\n",
+ "V_g1 = 0.204 # in m**3\n",
+ "V1 = 0.3753 #volume of 1kg of dry stream in m**3\n",
+ "x2 = V_g1/V1 \n",
+ "H_wet2 = h_f2 + (x2*h_fg2) # in kJ\n",
+ "U2 = H_wet2 - P2*V # in kJ\n",
+ "del_U = U1-U2 # in kJ\n",
+ "H = del_U/V # in kJ\n",
+ "print \"Heat removed from 1 m**3 of steam = %0.1f kJ \" %H"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total energy = 2671.5 kJ/kg \n",
+ "The internal energy = 2487.9 kJ/kg \n",
+ "Heat removed from 1 m**3 of steam = 3941.5 kJ \n"
+ ]
+ }
+ ],
+ "prompt_number": 85
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.27 - Page No : 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1 = 2.1 # in MN/m**2\n",
+ "P1= P1*10**3 #in kN/m**2\n",
+ "P2 = 0.7 # in MN/m**2\n",
+ "P2= P2*10**3 #in kN/m**2\n",
+ "V1 = 0.1281 # in m**3\n",
+ "x = 0.9 \n",
+ "n = 1.25 \n",
+ "h_f1= 920 # in kJ/kg\n",
+ "h_fg1= 1878.6 # in kJ/kg\n",
+ "h_f2= 697.0 # in kJ/kg\n",
+ "h_fg2= 2065.0 # in kJ/kg\n",
+ "V_wet1 = x * 0.0949 # in m**3/kg\n",
+ "m = V1/V_wet1 # in kg\n",
+ "print \"Mass of steam = %0.1f kg \" %m\n",
+ "V2 = V1*((P1/P2)**(1/n)) #in m**3\n",
+ "del_W = (P1*V1-P2*V2)/(n-1) # in kJ\n",
+ "print \"External work done = %0.1f kJ \" %del_W\n",
+ "V_2 = V2/m # in m**3/kg\n",
+ "x2 = V_2/0.273 \n",
+ "H1= h_f1+x*h_fg1 # in kJ/kg\n",
+ "U1= H1-P1*V_wet1 # in kJ/kg\n",
+ "H2= h_f2+x2*h_fg2 # in kJ/kg\n",
+ "U2= H2-P2*V_2 # in kJ/kg\n",
+ "del_E = m*(U2-U1) #in kJ\n",
+ "print \"Change in internal energy = %0.1f kJ \" %del_E\n",
+ "Q = del_W +del_E # in kJ\n",
+ "print \"Heat exchange = %0.1f kJ \" %Q\n",
+ "print \"Heat is lost to the surroundings.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass of steam = 1.5 kg \n",
+ "External work done = 212.3 kJ \n",
+ "Change in internal energy = -483.7 kJ \n",
+ "Heat exchange = -271.5 kJ \n",
+ "Heat is lost to the surroundings.\n"
+ ]
+ }
+ ],
+ "prompt_number": 91
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.28 - Page No : 207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "h_f1 = 670 # in kJ/kg\n",
+ "h_fg1 = 2085 # in kJ/kg\n",
+ "h_f2 = 475 # in kJ/kg\n",
+ "h_fg2 = 2221 # in kJ/kg\n",
+ "P2 = 6*10**2 # in kJ/kg \n",
+ "P1 = 1.6*10**2 # in kJ/kg\n",
+ "n = 1.1 \n",
+ "x1 = 0.9 \n",
+ "V1 = 0.3159 # in m**3\n",
+ "V2 = 1.092 # in m**3\n",
+ "H_wet = h_f1 + (x1*h_fg1) # in kJ/kg\n",
+ "V_wet1 = x1*V1 # in m**3\n",
+ "V_wet2 = V_wet1*(P2/P1)**(1/n) # in m**3\n",
+ "x2 = V_wet2/V2 \n",
+ "H_wet2 = h_f2 + (x2*h_fg2) # in kJ/kg\n",
+ "U2= H_wet2-H_wet+P2*V_wet1-P1*V_wet2 # in kJ/kg\n",
+ "W= (P2*V_wet1-P1*V_wet2)/(n-1) # in kJ/kg\n",
+ "Q= U2+W # in kJ/kg\n",
+ "print \"Heat recieved by steam = %0.1f kJ/kg \" %Q"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat recieved by steam = 63.9 kJ/kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 93
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.29 - Page No : 208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1 = 0.85*10**3 # in kN/m**2\n",
+ "P2 = 0.17*10**3 # in kN/m**2\n",
+ "n = 1.13 \n",
+ "x1 = 0.95 \n",
+ "V1 = x1*0.227 # in m**3/kg\n",
+ "V2 = V1 * ((P1/P2)**(1/n)) # in m**3/kg\n",
+ "x2 = V2/1.032 \n",
+ "print \"Final dryness fraction of steam = %0.3f\" %x2\n",
+ "W = (P1*V1-P2*V2)/(n-1) # in kJ/kg\n",
+ "print \"Change in internal energy = %0.1f kJ/kg \" %W"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final dryness fraction of steam = 0.868\n",
+ "Change in internal energy = 238.3 kJ/kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 97
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.30 - Page No : 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Cp= 2.3 # in kJ/kg-K\n",
+ "T_sat= 179.9 # in \u00b0C\n",
+ "T_sat= T_sat+273 # in K\n",
+ "H= 3052 # enthalpy in kJ/kg\n",
+ "P= 10*10**2 # in kN/m**2\n",
+ "h_f= 763 # in kJ/kg\n",
+ "h_fg= 2015 # in kJ/kg\n",
+ "V= 0.1944 # in m**3\n",
+ "# Formula H= h_f+h_fg*Cp*(t_sup-T_sat)-P*V*(t_sup/T_sat)\n",
+ "t_sup= (h_f+h_fg-Cp*T_sat-H)/(P*V/T_sat-Cp) # in K\n",
+ "t_sup= t_sup-273 # in \u00b0C\n",
+ "print \"The final temperature of the steam = %0.0f \u00b0C \" %math.ceil(t_sup)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The final temperature of the steam = 431 \u00b0C \n"
+ ]
+ }
+ ],
+ "prompt_number": 103
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.31 - Page No : 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "m1 = 3 # in kg\n",
+ "m2 = 2 # in kg\n",
+ "T1 = 10 # in degree C\n",
+ "T2 = 80 # In Degree C\n",
+ "T = ((m1*T1)+(m2*T2))/(m1+m2) # in degree C\n",
+ "T = T + 273 # in K\n",
+ "T1 = T1 + 273 # in K\n",
+ "T2 = T2 + 273 # in K\n",
+ "c_f = 4.188 \n",
+ "del_phi1 = m1 * c_f*log(T/T1) # in kJ/K\n",
+ "del_phi2 = m2 * c_f*log(T/T2) # in kJ/K\n",
+ "Phi = del_phi1 + del_phi2 # in kJ/K\n",
+ "print \"Total change in entropy = %0.3f kJ/K \" %Phi"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total change in entropy = 0.124 kJ/K \n"
+ ]
+ }
+ ],
+ "prompt_number": 104
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.32 - Page No : 216"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1 = 15 # in bar\n",
+ "P2 = 0.15 # in bar\n",
+ "T_sat = 198.3 # in degree C\n",
+ "T_sat = T_sat + 273 # in K\n",
+ "h_fg1 = 1947 # in kJ/kg\n",
+ "h_fg2= 2369 # in kJ/kg\n",
+ "h_g1 = 845 # in kJ/kg\n",
+ "h_f2 = 232 # in kJ/kg\n",
+ "f_g2 = 7.985 # in kJ/kg-K\n",
+ "x1 = 0.8 \n",
+ "Phi_f1 = 2.315 # in kJ/kg-K\n",
+ "Phi_f2 = 0.772 # in kJ/kg-K\n",
+ "Phi1 = Phi_f1 + ((x1*h_fg1)/T_sat) # in kJ/kg-K\n",
+ "H1 = h_g1 + (x1*h_fg1) # in kJ/kg-K\n",
+ "Phi2 = Phi1 # in kJ/kg-K\n",
+ "x2 = (Phi1 - Phi_f2)/(f_g2 - Phi_f2) \n",
+ "H2 = h_f2 + (x2*h_fg2) # in kJ/kg\n",
+ "Eta = ((H1-H2)/(H1-h_f2))*100 # in %\n",
+ "print \"Part (i) When the steam supply is wet and dryness fraction is 0.8\"\n",
+ "print \"Rankine efficiency = %0.1f %% \" %Eta\n",
+ "delH = H1-H2 #theoretical work of steam in kJ/kg\n",
+ "W = delH*60/100 # in kJ/kg\n",
+ "Energy_Equivalent= 3600 # in kJ\n",
+ "Steam_C = Energy_Equivalent/W # Steam consumption in kg\n",
+ "print \"Steam consumption per kW-hr = %0.2f kg\" %Steam_C\n",
+ "print \"Part (ii) When the steam supply is dry and saturated\"\n",
+ "H_1 = 2792 # in kJ/kg\n",
+ "Phi_g1 = 6.445 # in kJ/kg-K\n",
+ "x_2 = (Phi_g1-Phi_f2)/(f_g2-Phi_f2) \n",
+ "H_2 = h_f2 + (x_2*h_fg2) # in kJ/kg\n",
+ "Eta1 = (H_1-H_2)/(H_1-h_f2) \n",
+ "print \"Rankine efficiency =\",round(Eta1,3),\"=\",round(Eta1*100,1),\"%%\" \n",
+ "W1 = (H_1-H_2)*60/100 # in kJ/kg\n",
+ "Steam_C= Energy_Equivalent/W1 # in kg\n",
+ "print \"Steam consumption per kW-hr = %0.2f kg is :\" %Steam_C\n",
+ "print \"Part (iii) When steam is superheated and temperature is 300\u00b0C\"\n",
+ "H_1 = 3039 # in kJ/kg\n",
+ "Phi_1 = 6.919 # in kJ/kg-K\n",
+ "x_2 = (Phi_1 - Phi_f2)/(f_g2-Phi_f2) \n",
+ "H_2 = h_f2 + (x_2 * h_fg2) # in kJ/kg\n",
+ "Eta = (H_1 - H_2)/(H_1-h_f2) \n",
+ "print \"Rankine efficiency =\",round(Eta,3),\"=\",round(Eta*100,1),\"%%\" \n",
+ "W2 = (H_1-H_2)*60/100 # in kJ/kg\n",
+ "Steam_C= Energy_Equivalent/W2 # in kg\n",
+ "print \"Steam consumption per kW-hr = %0.2f kg \" % Steam_C"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part (i) When the steam supply is wet and dryness fraction is 0.8\n",
+ "Rankine efficiency = 26.6 % \n",
+ "Steam consumption per kW-hr = 10.37 kg\n",
+ "Part (ii) When the steam supply is dry and saturated\n",
+ "Rankine efficiency = 0.272 = 27.2 %%\n",
+ "Steam consumption per kW-hr = 8.61 kg is :\n",
+ "Part (iii) When steam is superheated and temperature is 300\u00b0C\n",
+ "Rankine efficiency = 0.281 = 28.1 %%\n",
+ "Steam consumption per kW-hr = 7.61 kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 112
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.33 - Page No : 218"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "T1 = 400 # in degree C\n",
+ "T1 = T1 + 273 # in K\n",
+ "T2 = 72.7 # in degree C\n",
+ "T2 = T2 + 273 # in K\n",
+ "Eta = ((T1-T2)/T1)*100 # in %\n",
+ "print \"For carnot cycle : \"\n",
+ "print \"Rankine efficiency = %0.1f %% \" %Eta\n",
+ "H1 = 3248 # in kJ/kg\n",
+ "h_f2 = 304.5 # in kJ/kg\n",
+ "del_H = 809.2 # in kJ/kg\n",
+ "Eta = (del_H/(H1-h_f2))*100 # in %\n",
+ "print \"For Rankine cycle : \"\n",
+ "print \"Rankine efficiency = %0.2f %% \" %Eta"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For carnot cycle : \n",
+ "Rankine efficiency = 48.6 % \n",
+ "For Rankine cycle : \n",
+ "Rankine efficiency = 27.49 % \n"
+ ]
+ }
+ ],
+ "prompt_number": 116
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 6.34 - Page No : 218"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "P1 = 15 # in bar\n",
+ "H1 = 3039 # in kJ/kg\n",
+ "V_g1 = 0.1697 # in m**3/kg\n",
+ "Phi1 = 6.919 # in kJ/kg-K\n",
+ "P2_desh = 3.5*10**2 # in kN/m**2\n",
+ "Phi_g2 = 6.941 # in kJ/kg-K\n",
+ "Phi_f2 = 1.727 # in kJ/kg-K\n",
+ "P2 = 0.15*10**2 # in kN/m**2\n",
+ "h_f2 = 232 # in kJ/kg\n",
+ "x = (Phi1-Phi_f2)/(Phi_g2 - Phi_f2) \n",
+ "h_f = 584 # in kJ/kg\n",
+ "h_fg = 2148 # in kJ/kg\n",
+ "H2 = h_f + (x*h_fg) # in kJ/kg\n",
+ "V = 0.5241 # in m**3\n",
+ "V2=x*V # in m**3/kg\n",
+ "W = (H1-H2) + (P2_desh-P2)*V2 #work output of the cycle in kJ/kg\n",
+ "Eta = W/(H1-h_f2)*100 # in %\n",
+ "print \"The efficiency of the cycle = %0.1f %% \" %Eta\n",
+ "Energy_equivalent= 3600 # in kJ\n",
+ "S_consumption = Energy_equivalent/W # in kg\n",
+ "V = S_consumption* V_g1 # in m**3\n",
+ "print \"Total volume of steam = %0.2f m**3 \" %V"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The efficiency of the cycle = 17.5 % \n",
+ "Total volume of steam = 1.24 m**3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 118
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_7.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_7.ipynb
new file mode 100644
index 00000000..924d966a
--- /dev/null
+++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_7.ipynb
@@ -0,0 +1,249 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter No - 7 : Flow Process\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 7.1 - Page No : 233"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data\n",
+ "H1 = 2600 # in kJ/kg\n",
+ "H2 = 1850 # in kJ/kg\n",
+ "g = 9.81 \n",
+ "C1 = 10 # in meter/second\n",
+ "C2 = 20 # in meter/secon\n",
+ "Q = 120 # in kJ/kg\n",
+ "Z1 = 30 # in meter\n",
+ "Z2 = 10 # in meter\n",
+ "W = g*(Z1-Z2)/1000+H1-H2+(C1**2-C2**2)/(2*1000)+Q\n",
+ "print \"The work done = %0.0f kJ/kg \" %W"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The work done = 870 kJ/kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 7.2 - Page No : 234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "H1 = 3100 # in kJ/kg\n",
+ "H2 = 1950 # in kJ/kg\n",
+ "C1 = 20 # in meter/second\n",
+ "C2 = 30 # in meter/secon\n",
+ "Q = 0 # in kJ/kg\n",
+ "Q_desh= 20 # in kJ/kg\n",
+ "Vs= 1.1 # in m**3/kg\n",
+ "W = H1-H2+(C1**2-C2**2)/(2*1000)+Q-Q_desh # in kJ/kg\n",
+ "m= 2 #mass flow rate in kg/sec\n",
+ "Power= m*W # in kW\n",
+ "print \"Power output of the turbine = %0.1f kW\" %Power\n",
+ "Area= m*Vs/C2 # in m**2\n",
+ "print \"Area of exhaust pipe = %0.3f m**2 \" %Area"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power output of the turbine = 2259.5 kW\n",
+ "Area of exhaust pipe = 0.073 m**2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 7.3 - Page No : 234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "# Given data\n",
+ "H1 = 2940 # in kJ/kg\n",
+ "H2 = 2630 # in kJ/kg\n",
+ "C = sqrt((H1-H2)*1000*2) # in m/sec\n",
+ "print \"Velocity of the steam leaving the nozzle = %0.1f m/sec \" %C"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity of the steam leaving the nozzle = 787.4 m/sec \n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 7.4 - Page No : 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "H1 = 2800 # in kJ/kg\n",
+ "H2 = 2600 # in kJ/kg\n",
+ "C2 = sqrt(2*(H1-H2)*1000) # in m/s\n",
+ "print \"Exit velocity = %0.0f m/s\" %C2\n",
+ "m_f = 25 # mass flow rate in kg/sec\n",
+ "V = 0.154 # in m**3/kg\n",
+ "A = (m_f*V)/C2 # in m**2\n",
+ "print \"Total exit area = %0.4f m**2\" %A"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Exit velocity = 632 m/s\n",
+ "Total exit area = 0.0061 m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 7.5 - Page No : 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Q = 20 # in kJ/kg\n",
+ "P = 10 # in MW\n",
+ "P = P * 10**3 # in kW\n",
+ "H1 = 3248 # in kJ/kg\n",
+ "H2 = 2552 # in kJ/kg\n",
+ "C1 = 20 # m/s\n",
+ "C2 = 40 # m/s\n",
+ "m = P/((H1-H2+(C1**2-C2**2)/(2*1000))-Q) # in kg/s\n",
+ "print \"Mass = %0.3f kg \" %m"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass = 14.806 kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 7.6 - Page No : 236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "h_f1 = 2584 # in kJ/kg\n",
+ "h_fg1 = 2392 # in kJ/kg\n",
+ "H2 = 192 # in kJ/kg\n",
+ "x = 0.2 \n",
+ "H1 = round(h_f1- (x*h_fg1)) # in kJ/kg\n",
+ "x1 = 0.8 \n",
+ "Vs = 14.67 # in m**3\n",
+ "V1 = x1*Vs # in m**3/kg\n",
+ "A = 0.45 # in m**2\n",
+ "C1 = V1/A # in m/s\n",
+ "Q = 5 # kJ/s\n",
+ "C2 = 0 \n",
+ "W = 0 \n",
+ "Q_desh = W-H1 - C1**2/(2*1000)-Q+H2+C2**2/2 # in kJ/s\n",
+ "print \"Rate of heat transfer = % 0.3f kJ/s \" %Q_desh\n",
+ "# Note : The calculation in the book is not accurate"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat transfer = -1919.340 kJ/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_8.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_8.ipynb
new file mode 100644
index 00000000..923f4357
--- /dev/null
+++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_8.ipynb
@@ -0,0 +1,958 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter No - 8 : Fuels And Combustion\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.1 - Page No : 248"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data\n",
+ "C= 85 # in %\n",
+ "H= 12.5 # in %\n",
+ "H1 = 35000 # heat liberated by carbon in kJ\n",
+ "H2 = 143000 # heat liberated by hydrogen in kJ\n",
+ "HCV = (C*H1+H*H2)/100 # Higher calorific value in kJ/kg\n",
+ "print \"Higher calorific value = %0.0f kJ/kg \" %HCV\n",
+ "ms = 9 \n",
+ "LCV= HCV -(ms*H*2442)/100 # Lower calorific value in kJ/kg\n",
+ "print \"Lower calorific value = %0.0f kJ/kg \" %LCV\n",
+ "\n",
+ "# Note: The calculated value in the book is not accurate"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Higher calorific value = 47625 kJ/kg \n",
+ "Lower calorific value = 44878 kJ/kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.2 - Page No : 249"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "CH4 = 77 # in %\n",
+ "C2H6 = 22.5 #in %\n",
+ "H1 = 40.08 # heat liberated by CH4 in MJ/nm**3\n",
+ "H2 = 69.52 # heat liberated by C2H6 in MJ/nm**3\n",
+ "HCV = (CH4*H1+C2H6*H2)/100 # Higher calorific value in kJ/kg\n",
+ "print \"The higher calorific value = %0.3f MJ/nm**3\" %HCV\n",
+ "V1= CH4*2/100 # volume of water due to combustion of CH4 in m**3\n",
+ "V2= C2H6*3/100 # volume of water due to combustion of C2H6 in m**3\n",
+ "V= V1+V2 # total volume in m**3\n",
+ "ms= 18/22.41 # in kg\n",
+ "LCV= HCV-ms*V*2.242 # in MJ/nm**3\n",
+ "print \"The lower calorific value = %0.3f MJ/nm**3\" %LCV\n",
+ "print \"The word nm**3 means that cubic metre at normal temperature and pressure\"\n",
+ "\n",
+ "# Note: The calculated value in the book is not accurate"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The higher calorific value = 46.504 MJ/nm**3\n",
+ "The lower calorific value = 42.515 MJ/nm**3\n",
+ "The word nm**3 means that cubic metre at normal temperature and pressure\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.3 - Page No : 253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "mw = 2.5 #mass of water in kg\n",
+ "mc= 0.744 #water equivalen of apparatus in kg\n",
+ "CoalMass = 1.01*10**-3 # in kg\n",
+ "T_r = 2.59 #temp. rise in degree C\n",
+ "C_c = 0.016 # Cooling correction in degree C\n",
+ "theta = T_r +C_c #corrected temp. rise in degree C\n",
+ "Cp = 4.1868 # in kJ/kg-K\n",
+ "m = mw+mc # in kg\n",
+ "Qw = m * Cp*theta #heat received by water in kJ\n",
+ "C = (Qw/CoalMass) # in kJ/kg\n",
+ "print \"Calorific value of the fuel = %0.0f kJ/kg \" %C"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Calorific value of the fuel = 35044 kJ/kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.4 - Page No : 255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "T_r = 2.912 # temp. rise in degree C\n",
+ "C_c = 0.058 #cooling correction in degree C\n",
+ "theta = T_r + C_c # in degree C\n",
+ "HyCon= 14/100 # Hydrogen content\n",
+ "C_P = 4.1868 # in J/gm-K\n",
+ "Cc = 16750 #calorific value of cotton in J/gm\n",
+ "m_w = 1400 # in gm\n",
+ "m_c = 500 # in gm\n",
+ "m = m_w+m_c # in gm\n",
+ "m1 = 0.005 #mass of cotton in gm\n",
+ "m2 = 0.579 #mass of oil in gm\n",
+ "Qw = m*C_P*theta # in J\n",
+ "H1= m1*Cc # heat given out by combustion of cotton in J\n",
+ "Qin= Qw-H1 # in J\n",
+ "C= Qin/m2 # J/gm or kJ/kg\n",
+ "LCV= C-2442*9*HyCon # in J/gm or kJ/kg\n",
+ "print \"Higher Calorific value of the fuel = %0.0f J/gm or kJ/kg\" %C\n",
+ "print \"Lower Calorific value of the fuel = %0.0f J/gm or kJ/kg\" %LCV"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Higher Calorific value of the fuel = 40660 J/gm or kJ/kg\n",
+ "Lower Calorific value of the fuel = 37583 J/gm or kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.5 - Page No : 259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "W_c = 500*10**-3 #water collected in kg\n",
+ "C_P = 4.1868 # in kJ/kg-K\n",
+ "T_o = 28.3 #outlet temp. in \u00b0C\n",
+ "T_i = 14 #inlet temp. in \u00b0C\n",
+ "P_bero= 785 # barometric pressure in mm\n",
+ "P_gas= P_bero+90/13.6 # in mm\n",
+ "T1=17+273 # gas temp. in K\n",
+ "T2= 15+273 # in K\n",
+ "theta = T_o-T_i #temp. rise in \u00b0C\n",
+ "Qw = W_c * C_P*theta # in kJ\n",
+ "Vgs= 2.8*10**-3 #volume of gas consumed in m**3\n",
+ "E = Qw/Vgs # in kJ\n",
+ "V1= P_gas/760*(T2/T1) # in m**3\n",
+ "CalorificValue= E/V1 # in kJ/standard m**3\n",
+ "print \"Calorific value = %0.2f kJ/m**3 \" %CalorificValue"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Calorific value = 10335.56 kJ/m**3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.6 - Page No : 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "C = 0.83 # in kg\n",
+ "H = 0.05 # in kg\n",
+ "O = 0.02 # in kg\n",
+ "S = 0.002 # in kg\n",
+ "AbyF_min = (11.6 * C) + +(34.8*(H-(O/8))) + (4.35 * S) # in kg\n",
+ "print \"The therotical mass of air = %0.2f kg \" %AbyF_min"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The therotical mass of air = 11.29 kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.7 - Page No : 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "C = 0.86 # in kg\n",
+ "H = 0.14 # in kg\n",
+ "S = 0 # in kg\n",
+ "O = 0 # in kg\n",
+ "Vair = 0.77 #volume of 1kg of air in m**3\n",
+ "Spe_Gravity = 0.8 # specific gravity of petrol\n",
+ "maBYmf = (11.6*C)+(34.8*(H-O/8)) + (4.35*S) # in kg\n",
+ "print \"The therotical mass of air = %0.1f kg \" %maBYmf\n",
+ "V = maBYmf *Spe_Gravity*Vair # in m**3/litre\n",
+ "print \"Volume of air required = %0.3f m**3/litre \" %V"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The therotical mass of air = 14.8 kg \n",
+ "Volume of air required = 9.146 m**3/litre \n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.8 - Page No : 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "C = 0.75 # in kg\n",
+ "H = 0.08 # in kg\n",
+ "O = 0.03 # in kg\n",
+ "S = 0 # in kg\n",
+ "P = 1.1 # in bar\n",
+ "P = P*10**5 # in N/m**2\n",
+ "maBYmf = (11.6*C) + (34.8 * (H-(O/8))) + (4.35 *S) # in kg\n",
+ "print \"The mass of air = %0.2f kg \" %maBYmf\n",
+ "m = 1.5*(maBYmf ) # in kg\n",
+ "T = 20+273 # in K\n",
+ "R = 29.27 \n",
+ "V = (m*R*T)/P # in m**3\n",
+ "print \"Volume = %0.3f m**3 \" %V\n",
+ "\n",
+ "# Note: The calculated value of V in the book is wrong."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mass of air = 11.35 kg \n",
+ "Volume = 1.328 m**3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.9 - Page No : 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "C = 0.82 # in kg\n",
+ "H2 = .12 # in kg\n",
+ "O2 = 0.02 # in kg\n",
+ "a = C/12 \n",
+ "b = H2/2 \n",
+ "y = (32*(a+(0.5*b))-O2)/0.23 \n",
+ "print \"Minimum quantity of air = %0.2f kg \" %y"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum quantity of air = 13.59 kg \n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.10 - Page No : 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "mC= 0.88 #mass of carbon in kg\n",
+ "mH2= 0.03 #mass of H2 in kg\n",
+ "mS= 0.005 #mass of S in kg\n",
+ "O2_mass= 2.66*mC + 8*mH2 + 2*mS # in kg\n",
+ "Air_mass= O2_mass/0.23 # in kg\n",
+ "Air_mass= 1.5*Air_mass # in kg (as 50% excess air is supplied)\n",
+ "print \"Actual mass of air required per kg of fuel for complete combustion = %0.3f kg\" %Air_mass\n",
+ "# The flue gases per kg of fuel will be:\n",
+ "CO2= 3.226 # in kg\n",
+ "N2= 13.04 # in kg\n",
+ "O2= 1.298 # in kg\n",
+ "total_mass= CO2+N2+O2 # in kg\n",
+ "CO2_per_by_mass= CO2/total_mass*100 # in %\n",
+ "O2_per_by_mass= O2/total_mass*100 # in %\n",
+ "N2_per_by_mass= N2/total_mass*100 # in %\n",
+ "print \"Percentage of CO2 by mass is : %0.1f\" %CO2_per_by_mass\n",
+ "print \"Percentage of O2 by mass is : %0.1f\" %O2_per_by_mass\n",
+ "print \"Percentage of N2 by mass is : %0.1f\" %N2_per_by_mass\n",
+ "M_wt_CO2= 44 \n",
+ "CO2_Per_M_com_M_wt= CO2_per_by_mass/M_wt_CO2 # % Mass composition molecular weight\n",
+ "M_wt_O2= 32 \n",
+ "O2_Per_M_com_M_wt= O2_per_by_mass/M_wt_O2 # % Mass composition molecular weight\n",
+ "M_wt_N2= 28 \n",
+ "N2_Per_M_com_M_wt= N2_per_by_mass/M_wt_N2 # % Mass composition molecular weight\n",
+ "total= CO2_Per_M_com_M_wt + O2_Per_M_com_M_wt + N2_Per_M_com_M_wt \n",
+ "CO2_per_by_vol= CO2_Per_M_com_M_wt/total*100 # in %\n",
+ "O2_per_by_vol= O2_Per_M_com_M_wt/total*100 # in %\n",
+ "N2_per_by_vol= N2_Per_M_com_M_wt/total*100 # in %\n",
+ "print \"Percentage of CO2 by volume is : %0.2f\" %CO2_per_by_vol\n",
+ "print \"Percentage of O2 by volume is : %0.0f\" %O2_per_by_vol\n",
+ "print \"Percentage of N2 by volume is : %0.2f\" %N2_per_by_vol"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Actual mass of air required per kg of fuel for complete combustion = 16.897 kg\n",
+ "Percentage of CO2 by mass is : 18.4\n",
+ "Percentage of O2 by mass is : 7.4\n",
+ "Percentage of N2 by mass is : 74.2\n",
+ "Percentage of CO2 by volume is : 12.65\n",
+ "Percentage of O2 by volume is : 7\n",
+ "Percentage of N2 by volume is : 80.35\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.11 - Page No : 269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "Cp= 1 # in kJ/kg\n",
+ "H= 2.7*10**3 # total heat of vaport in flue gas in kJ/kg\n",
+ "CoalCalorific= 32.82*10**3 # in kJ/kg\n",
+ "T1= 310 # final gas flue temp. in \u00b0C\n",
+ "T2= 25 # boiler house temp. in \u00b0C\n",
+ "mC= 0.84 #mass of carbon in kg\n",
+ "mH2= 0.05 #mass of H2 in kg\n",
+ "O2_mass= 2.66*mC + 9*mH2 # in kg\n",
+ "Air_mass= O2_mass/0.23 # in kg\n",
+ "Air_mass= 1.5*Air_mass # in kg (as 50% excess air is supplied)\n",
+ "print \"Actual mass of air required per kg of fuel for complete combustion = %0.3f kg \" %Air_mass\n",
+ "# Analysis of dry flue gas by weight\n",
+ "CO2= 3.08 # in kg\n",
+ "N2= 13.24 # in kg\n",
+ "O2= 1.32 # in kg\n",
+ "total_mass= CO2+N2+O2 # in kg\n",
+ "CO2_per_by_mass= CO2/total_mass*100 # in %\n",
+ "O2_per_by_mass= O2/total_mass*100 # in %\n",
+ "N2_per_by_mass= N2/total_mass*100 # in %\n",
+ "print \"Percentage of CO2 by mass is : %0.2f\" %CO2_per_by_mass\n",
+ "print \"Percentage of O2 by mass is : %0.2f\" %O2_per_by_mass\n",
+ "print \"Percentage of N2 by mass is : %0.2f\" %N2_per_by_mass\n",
+ "M_wt_CO2= 44 \n",
+ "CO2_Per_M_com_M_wt= CO2_per_by_mass/M_wt_CO2 # % Mass composition molecular weight\n",
+ "M_wt_O2= 32 \n",
+ "O2_Per_M_com_M_wt= O2_per_by_mass/M_wt_O2 # % Mass composition molecular weight\n",
+ "M_wt_N2= 28 \n",
+ "N2_Per_M_com_M_wt= N2_per_by_mass/M_wt_N2 # % Mass composition molecular weight\n",
+ "total= CO2_Per_M_com_M_wt + O2_Per_M_com_M_wt + N2_Per_M_com_M_wt \n",
+ "CO2_per_by_vol= CO2_Per_M_com_M_wt/total*100 # in %\n",
+ "O2_per_by_vol= O2_Per_M_com_M_wt/total*100 # in %\n",
+ "N2_per_by_vol= N2_Per_M_com_M_wt/total*100 # in %\n",
+ "print \"Percentage of CO2 by volume is : %0.0f\" %CO2_per_by_vol\n",
+ "print \"Percentage of O2 by volume is : %0.0f\" %O2_per_by_vol\n",
+ "print \"Percentage of N2 by volume is : %0.0f\" %N2_per_by_vol\n",
+ "H_w_v= 9*mH2*H #heat carried away by water vapour in kJ\n",
+ "H_dry_flue= total_mass*Cp*(T1-T2) # in kJ\n",
+ "H_total= H_w_v+H_dry_flue # in kJ\n",
+ "H_available= CoalCalorific-H_total # in kJ\n",
+ "print \"Heat available for steam generation = %0.0f kJ\" %H_available"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Actual mass of air required per kg of fuel for complete combustion = 17.507 kg \n",
+ "Percentage of CO2 by mass is : 17.46\n",
+ "Percentage of O2 by mass is : 7.48\n",
+ "Percentage of N2 by mass is : 75.06\n",
+ "Percentage of CO2 by volume is : 12\n",
+ "Percentage of O2 by volume is : 7\n",
+ "Percentage of N2 by volume is : 81\n",
+ "Heat available for steam generation = 26578 kJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.12 - Page No : 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "mC= 0.86 #mass of carbon in kg\n",
+ "mH2= 0.14 #mass of H2 in kg\n",
+ "maBYmf= (2.66*mC + 8*mH2)/0.23 # in kg/kg of fuel\n",
+ "Air_supp_deficiency= maBYmf/10 # in kg/kg of fuel\n",
+ "Air_saved= 16/(12*0.23) # in kg/kg of carbon\n",
+ "m1= Air_supp_deficiency/Air_saved # mass of coal burns to carbon monoxide\n",
+ "m2= mC-m1 # mass of coal burns to carbon diooxide\n",
+ "CO2_formed= m2*3.66 # in kg\n",
+ "CO_formed= m1*28/12 # in kg\n",
+ "N2_formed= Air_supp_deficiency*0.77*9 # in kg\n",
+ "M_wt_CO2= 44 # molecular weight\n",
+ "M_wt_CO= 28 \n",
+ "M_wt_N2= 28 \n",
+ "CO2_rel_vol= CO2_formed/M_wt_CO2 \n",
+ "CO_rel_vol= CO_formed/M_wt_CO \n",
+ "N2_rel_vol= N2_formed/M_wt_N2 \n",
+ "total_rel_vol=CO2_rel_vol+CO_rel_vol+N2_rel_vol \n",
+ "CO2_vol= CO2_rel_vol/total_rel_vol*100 # in %\n",
+ "CO_vol= CO_rel_vol/total_rel_vol*100 # in %\n",
+ "N2_vol= N2_rel_vol/total_rel_vol*100 # in %\n",
+ "print \"Volumetric analysis of CO2 = %0.2f %%\" %CO2_vol\n",
+ "print \"Volumetric analysis of CO = %0.2f %% \" %CO_vol\n",
+ "print \"Volumetric analysis of N2 = %0.2f %% \" %N2_vol"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volumetric analysis of CO2 = 11.47 %\n",
+ "Volumetric analysis of CO = 4.86 % \n",
+ "Volumetric analysis of N2 = 83.67 % \n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.13 - Page No : 275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "N = 83 #compositon of nitrogen in %\n",
+ "C = 81 #carbon mass in the fuel in %\n",
+ "C1 = 11 #compositon of CO2 in %\n",
+ "C2 = 2 # compositon of CO in %\n",
+ "O = 4 # composition of O2 in %\n",
+ "AirSupplied =N*C/(33*(C1+C2)) # in kg/kg\n",
+ "print \"The amount of air supplied = %0.1f kg per kg of fuel \" %AirSupplied\n",
+ "ExcessAir =79*O*C/(21*33*(C1+C2)) # in kg/kg\n",
+ "print \"Weight of excess air = %0.2f kg per kg of fuel \" %ExcessAir"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The amount of air supplied = 15.7 kg per kg of fuel \n",
+ "Weight of excess air = 2.84 kg per kg of fuel \n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.14 - Page No : 275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "CO2= 10 # in %\n",
+ "O2= 6 # in %\n",
+ "N2= 84 # in %\n",
+ "# a= x/12 and b= (1-x)/2\n",
+ "# 0.23*y/32= a+b/2+c\n",
+ "abyc= CO2/O2 \n",
+ "# a/(0.77*y/28)= CO2/N2\n",
+ "x=0.835 \n",
+ "carbon_per= x*100 # in %\n",
+ "hydrogen_per= 100-carbon_per # in %\n",
+ "print \"The fuel consists of\",round(carbon_per,1),\"%% carbon and\",round(hydrogen_per,1),\"%% hydrogen.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The fuel consists of 83.5 %% carbon and 16.5 %% hydrogen.\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.15 - Page No : 278"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "H2 = 50 # in %\n",
+ "CO = 5 # in %\n",
+ "CH4 = 35 # in %\n",
+ "V = ((0.5*(H2+CO))+(2*CH4))/21 # in m**3\n",
+ "print \"Quantity of air required for complete combustion of 1m**3 of gas = %0.2f m**3\" %V"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Quantity of air required for complete combustion of 1m**3 of gas = 4.64 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.16 - Page No : 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "H2= 0.4 # in m**3\n",
+ "CH= 0.425 # in m**3\n",
+ "C2H4= 0.0253 # in m**3\n",
+ "C4H8= 0.0127 # in m**3\n",
+ "CO= 0.075 # in m**3\n",
+ "O2_vol= 0.5*H2 + 2*CH + 3*C2H4 + 6*C4H8 + 0.5*CO # in m**3\n",
+ "Air_vol= O2_vol/0.21 # in m**3\n",
+ "print \"The volume of air required for complete combustion = %0.1f m**3 \" %Air_vol\n",
+ "actualAirSupplied= 1.3*Air_vol # in m**3\n",
+ "print \"The actual quantity of air supplied = %0.2f m**3 \" %actualAirSupplied"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume of air required for complete combustion = 5.9 m**3 \n",
+ "The actual quantity of air supplied = 7.67 m**3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.17 - Page No : 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "V_H2= 0.15 # in m**3\n",
+ "V_CH4= 0.02 # in m**3\n",
+ "V_CO= 0.20 # in m**3\n",
+ "V_CO2= 0.06 # in m**3\n",
+ "V_O2= 0.03 # in m**3\n",
+ "V_N2= 0.54 # in m**3\n",
+ "V1= 0.5*V_H2 # quantity of O2 required for complete combustion of H2\n",
+ "V2= 2*V_CH4 # in m**3\n",
+ "V3= 0.5*V_CO # in m**3\n",
+ "V= V1+V2+V3 # total oxygen required in m**3\n",
+ "O2_supp= V-V_O2 # O2 to be supplied by air in m**3\n",
+ "Air_req_min= O2_supp/0.21 # minimum quantity of air required in m**3\n",
+ "Actual_Air_Supp= 1.5*Air_req_min # m**3 of air\n",
+ "print \"The volume of air supplied = %0.2f m**3\" %Actual_Air_Supp\n",
+ "Vol_Carbondioxide_inFlue= V_CO2+V_CH4+V_CO #total volume of carbon dioxide\n",
+ "Vol_O2_inFlue= (Actual_Air_Supp-Air_req_min)*0.21 # in m**3\n",
+ "N2_from_air_Supp= 0.79*Actual_Air_Supp # in m**3\n",
+ "Vol_N2_inFlue= N2_from_air_Supp+V_N2 # in m**3\n",
+ "total= Vol_Carbondioxide_inFlue+Vol_O2_inFlue+Vol_N2_inFlue # in m**3\n",
+ "Per_CarbonDioxide= Vol_Carbondioxide_inFlue/total*100 # in %\n",
+ "Per_Oxygen= Vol_O2_inFlue/total*100 # in %\n",
+ "Per_Nitrogen= Vol_N2_inFlue/total*100 # in %\n",
+ "print \"%% Carbon dioxide is : %0.1f %%\" %Per_CarbonDioxide\n",
+ "print \"%% Carbon dioxide is : %0.2f %%\" %Per_Oxygen\n",
+ "print \"%% Carbon dioxide is : %0.2f %%\" %Per_Nitrogen"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume of air supplied = 1.32 m**3\n",
+ "% Carbon dioxide is : 14.3 %\n",
+ "% Carbon dioxide is : 4.73 %\n",
+ "% Carbon dioxide is : 80.96 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.18 - Page No : 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "V_CH4= 0.14 # in m**3\n",
+ "V_CO= 0.35 # in m**3\n",
+ "V_CO2= 0.06 # in m**3\n",
+ "V_N2= 0.03 # in m**3\n",
+ "V_H2= 0.42 # in m**3\n",
+ "a= V_CH4+V_CO2+V_CO \n",
+ "b= 2*V_CH4+V_H2 \n",
+ "# a+0.5*b+c= V_CO2+V_CO/2+0.21*5\n",
+ "c= V_CO2+V_CO/2+0.21*5-a-0.5*b \n",
+ "d=V_N2+5*0.79 \n",
+ "total= a+c+d \n",
+ "Vol_per_CO2= a/total*100 # in %\n",
+ "Vol_per_O2= c/total*100 # in %\n",
+ "Vol_per_N2= d/total*100 # in %\n",
+ "print \"Volume percentage of CO2 is : %0.2f\" %Vol_per_CO2\n",
+ "print \"Volume percentage of O2 is : %0.2f\" %Vol_per_O2\n",
+ "print \"Volume percentage of N2 is : %0.2f\" %Vol_per_N2\n",
+ "m_CO2= 44 # molecular mass\n",
+ "m_O2= 32 # molecular mass\n",
+ "m_N2=28 # molecular mass\n",
+ "mass_ratio_CO2= Vol_per_CO2/m_CO2 \n",
+ "mass_ratio_O2= Vol_per_O2/m_O2 \n",
+ "mass_ratio_N2= Vol_per_N2/m_N2 \n",
+ "total_mass_ratio= mass_ratio_CO2+mass_ratio_O2+mass_ratio_N2 \n",
+ "mass_per_CO2= mass_ratio_CO2/total_mass_ratio*100 \n",
+ "mass_per_O2= mass_ratio_O2/total_mass_ratio*100 \n",
+ "mass_per_N2= mass_ratio_N2/total_mass_ratio*100 \n",
+ "print \"Mass percentage of CO2 is : %0.2f\" %mass_per_CO2\n",
+ "print \"Mass percentage of O2 is : %0.2f\" %mass_per_O2\n",
+ "print \"Mass percentage of N2 is : %0.2f\"%mass_per_N2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume percentage of CO2 is : 11.19\n",
+ "Volume percentage of O2 is : 7.83\n",
+ "Volume percentage of N2 is : 80.98\n",
+ "Mass percentage of CO2 is : 7.50\n",
+ "Mass percentage of O2 is : 7.22\n",
+ "Mass percentage of N2 is : 85.28\n"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.19 - Page No : 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "GCR= 110 # gas consumption rate in m**3/hour\n",
+ "rpm= 300 # round per minute\n",
+ "Vs= 0.1 # swept volume of engine in m**3\n",
+ "V_H2=0.50 # in m**3\n",
+ "V_CO= 0.05 # in m**3\n",
+ "V_CH4=0.25 # in m**3\n",
+ "V_CO2= 0.10 # in m**3\n",
+ "V_N2= 0.10 # in m**3\n",
+ "V_O2= 5.8 # in m**3\n",
+ "AirRequired= (0.5*(V_H2+V_CO)+2*V_CH4)/0.21 # in m**3\n",
+ "CO2_formed= V_CO+V_CH4 # in m**3\n",
+ "total_CO2= CO2_formed+V_CO2 # in m**3\n",
+ "N2_of_air= 0.79*AirRequired # in m**3\n",
+ "total_N2= N2_of_air+V_N2 # in m**3\n",
+ "TotalVolume= total_N2+total_CO2 # in m**3\n",
+ "V= TotalVolume # in m**3\n",
+ "ExcessAirSupplied= (V_O2*V)/(21-V_O2) # in m**3\n",
+ "TotalAirSupplied= ExcessAirSupplied+AirRequired # in m**3\n",
+ "AirFuel_ratio= round(TotalAirSupplied)/1 \n",
+ "print \"Air fuel ratio by volume is : %0.0f\" % AirFuel_ratio\n",
+ "# Let V1= Volume of air + gas aspirated per hour\n",
+ "V1= GCR*6 # in m**3\n",
+ "Vs_out= Vs*rpm/2*60 # in m**3\n",
+ "Ratio= V1/Vs_out \n",
+ "print \"The value of Ratio i.e.\"\n",
+ "print \"(Volume of air + gas aspirted per hour)/Volume swept out by piston per hour = %0.4f\" %Ratio"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air fuel ratio by volume is : 5\n",
+ "The value of Ratio i.e.\n",
+ "(Volume of air + gas aspirted per hour)/Volume swept out by piston per hour = 0.7333\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example No : 8.20 - Page No : 291"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "CO2= 9.9 # in %\n",
+ "CO= 7.2 # in %\n",
+ "H2= 3.3 # in %\n",
+ "CH4= 0.3 # in %\n",
+ "N2= 79.3 # in %\n",
+ "O2= N2*21/79 # in %\n",
+ "print \"Method 1 : By Carbon balance :- \"\n",
+ "Z= (CO2+CO+CH4)/8 \n",
+ "x= 8*Z \n",
+ "measured_air_fuel_ratio= 11.3 \n",
+ "mm1= 29 # molecular mass of air\n",
+ "mm2= 12*8+17 # molecular mass of C8H17\n",
+ "massOf_air= (O2+N2)*mm1 \n",
+ "massOf_fuel= Z*mm2 \n",
+ "air_fuel_ratio= massOf_air/massOf_fuel \n",
+ "print \"The air fuel ratio by mass is : %0.2f\" %air_fuel_ratio\n",
+ "Per_error= (air_fuel_ratio - measured_air_fuel_ratio)/measured_air_fuel_ratio*100 \n",
+ "print \"Percentage error is : %0.3f %%\" %Per_error\n",
+ "print \"Method 2 : By Hydrogen balance : \"\n",
+ "X= (O2-CO2-CO/2)*2 \n",
+ "Z= (4*CH4+2*H2+X*2)/17 \n",
+ "massOf_air= (O2+N2)*mm1 \n",
+ "massOf_fuel= Z*mm2 \n",
+ "air_fuel_ratio= massOf_air/massOf_fuel \n",
+ "print \"The air fuel ratio by mass is : %0.2f\" %air_fuel_ratio\n",
+ "Per_error= (air_fuel_ratio - measured_air_fuel_ratio)/measured_air_fuel_ratio*100 \n",
+ "print \"Percentage error is : %0.2f %%\" %Per_error\n",
+ "print \"Method 3 : By Carbon-Hydrogen balance : \"\n",
+ "y= (4*CH4+2*H2+X*2) \n",
+ "massOf_air= (O2+N2)*mm1 \n",
+ "massOf_fuel= x*12+y \n",
+ "air_fuel_ratio= massOf_air/massOf_fuel \n",
+ "print \"The air fuel ratio by mass is : %0.2f\" %air_fuel_ratio\n",
+ "Per_error= (air_fuel_ratio - measured_air_fuel_ratio)/measured_air_fuel_ratio*100 \n",
+ "print \"Percentage error is : %0.2f %%\" %Per_error"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Method 1 : By Carbon balance :- \n",
+ "The air fuel ratio by mass is : 11.84\n",
+ "Percentage error is : 4.816 %\n",
+ "Method 2 : By Hydrogen balance : \n",
+ "The air fuel ratio by mass is : 11.49\n",
+ "Percentage error is : 1.67 %\n",
+ "Method 3 : By Carbon-Hydrogen balance : \n",
+ "The air fuel ratio by mass is : 11.79\n",
+ "Percentage error is : 4.33 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 64
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file1.png b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file1.png
new file mode 100644
index 00000000..225e656e
--- /dev/null
+++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file1.png
Binary files differ
diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file2.png b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file2.png
new file mode 100644
index 00000000..56e36a59
--- /dev/null
+++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file2.png
Binary files differ
diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file3.png b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file3.png
new file mode 100644
index 00000000..d4a9159d
--- /dev/null
+++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file3.png
Binary files differ