diff options
Diffstat (limited to 'Elements_of_Thermodynamics_and_heat_transfer/Chapter_16.ipynb')
-rwxr-xr-x | Elements_of_Thermodynamics_and_heat_transfer/Chapter_16.ipynb | 556 |
1 files changed, 556 insertions, 0 deletions
diff --git a/Elements_of_Thermodynamics_and_heat_transfer/Chapter_16.ipynb b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_16.ipynb new file mode 100755 index 00000000..e73c5d78 --- /dev/null +++ b/Elements_of_Thermodynamics_and_heat_transfer/Chapter_16.ipynb @@ -0,0 +1,556 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b48de029dcc8d0a67a0785422dda0e79a8ad980134c0bbc3f290af08b9a74588"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 16 - Combustion"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1 - Pg 299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the Molecule\n",
+ "#Initialization of variables\n",
+ "per=85.\n",
+ "#calculations\n",
+ "a=per/12.\n",
+ "b=100-per\n",
+ "ad=1.13*a\n",
+ "bd=1.13*b+1\n",
+ "#results\n",
+ "print '%s %d %s %d' %(\"Molecule is C\",ad,\"H\",bd)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Molecule is C 8 H 17\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2 - Pg 299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the Oxygen and Nitrogen content\n",
+ "#Initialization of variables\n",
+ "per=0.071\n",
+ "#calculations\n",
+ "O2=8.74\n",
+ "N2=per/2 + 3.76*O2\n",
+ "#results\n",
+ "print '%s %.2f %s %.2f' %(\"Oxygen =\",O2,\"and Nitrogen =\",N2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Oxygen = 8.74 and Nitrogen = 32.90\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4 - Pg 302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the air fuel ratio\n",
+ "#Initialization of variables\n",
+ "N2=78.1\n",
+ "M=29.\n",
+ "co2=8.7\n",
+ "co=8.9\n",
+ "x4=0.3\n",
+ "x5=3.7\n",
+ "x6=14.7\n",
+ "#calculations\n",
+ "O2=N2/3.76\n",
+ "Z=(co2+co+x4)/8\n",
+ "AF=(O2+N2)*M/(Z*113)\n",
+ "#results\n",
+ "print '%s %.1f %s' %(\"Air fuel ratio =\",AF,\"lbm air/lbm fuel\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air fuel ratio = 11.3 lbm air/lbm fuel\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5 - Pg 303"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the air fuel ratio\n",
+ "#Initialization of variables\n",
+ "N2=78.1\n",
+ "M=29\n",
+ "ba=2.12\n",
+ "x4=0.3\n",
+ "x5=3.7\n",
+ "x6=14.7\n",
+ "#calculations\n",
+ "O2=N2/3.76\n",
+ "O2=N2/3.76\n",
+ "Z=(x4*4+x5*2+x6*2)/17\n",
+ "AF=(O2+N2)*M/(Z*113)\n",
+ "#results\n",
+ "print '%s %.1f %s' %(\"Air fuel ratio =\",AF,\"lbm air/lbm fuel\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air fuel ratio = 11.4 lbm air/lbm fuel\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6 - Pg 303"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the air fuel ratio\n",
+ "#Initialization of variables\n",
+ "N2=78.1\n",
+ "M=29\n",
+ "ba=2.12\n",
+ "x4=0.3\n",
+ "x5=3.7\n",
+ "x6=14.7\n",
+ "#calculations\n",
+ "O2=N2/3.76\n",
+ "c=14.7\n",
+ "b= x4*4 + x5*2 + x6*2\n",
+ "a=b/ba\n",
+ "AF=(O2+N2)*M/(a*12. + b)\n",
+ "#results\n",
+ "print '%s %.1f %s' %(\"Air fuel ratio =\",AF,\"lbm air/lbm fuel\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air fuel ratio = 11.3 lbm air/lbm fuel\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7 - Pg 304"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the air fuel ratio\n",
+ "#Initialization of variables\n",
+ "N2=78.1\n",
+ "M=29\n",
+ "ba=2.12\n",
+ "co2=8.7\n",
+ "co=8.9\n",
+ "x4=0.3\n",
+ "x5=3.7\n",
+ "x6=14.7\n",
+ "#calculations\n",
+ "O2=N2/3.76\n",
+ "c=14.7\n",
+ "Z=2.238\n",
+ "X=(Z*17-x4*4-x5*2)/2\n",
+ "a=co2+co/2+x4+x6/2\n",
+ "b=3.764*a\n",
+ "AF=(O2+N2)*M/(Z*113)\n",
+ "#results\n",
+ "print '%s %.1f %s' %(\"Air fuel ratio =\",AF,\"lbm air/lbm fuel\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air fuel ratio = 11.3 lbm air/lbm fuel\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8 - Pg 305"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the air fuel ratio\n",
+ "#Initialization of variables\n",
+ "x1=8.7\n",
+ "x2=8.9\n",
+ "x3=0.3\n",
+ "N=78.1\n",
+ "z=113\n",
+ "M=29\n",
+ "#calculations\n",
+ "co2=(x1+x2+x3)*100/(N+x1+x2+x3)\n",
+ "a=2.325\n",
+ "AF=103*M/(a*z)\n",
+ "#results\n",
+ "print '%s %.2f' %(\"Air fuel ratio = \",AF)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Air fuel ratio = 11.37\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9 - Pg 308"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the Higher heating value\n",
+ "#Initialization of variables\n",
+ "dH=-2369859 #Btu\n",
+ "r=1.986\n",
+ "dn=5.5\n",
+ "T=536.7 #R\n",
+ "#calculations\n",
+ "dQ=dH+dn*r*T\n",
+ "#results\n",
+ "print '%s %d %s' %(\"Higher heating value =\",dQ,\" Btu\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Higher heating value = -2363996 Btu\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10 - Pg 308"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the Lower heating value\n",
+ "#Initialization of variables\n",
+ "y=13\n",
+ "x=12\n",
+ "M2=18\n",
+ "M=170\n",
+ "p=0.4593\n",
+ "vfg=694.9\n",
+ "J=778.2\n",
+ "m=9*18\n",
+ "u1=-2363996 #Btu\n",
+ "#calculations\n",
+ "z=y*M2/M\n",
+ "hfg=1050.4 #Btu/lbm\n",
+ "ufg= hfg- p*vfg*144/J\n",
+ "dU=ufg*m \n",
+ "Lhv=u1+dU\n",
+ "#results\n",
+ "print '%s %d %s' %(\"Lower heating value =\",Lhv,\"Btu/lbm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Lower heating value = -2203398 Btu/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11 - Pg 309"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the Heat of the reaction\n",
+ "#Initialization of variables\n",
+ "n1=8\n",
+ "n2=9\n",
+ "n3=1\n",
+ "n4=12.5\n",
+ "U11=3852\n",
+ "U12=115\n",
+ "U21=3009\n",
+ "U22=101\n",
+ "U31=24773\n",
+ "U32=640\n",
+ "U41=2539\n",
+ "U42=83\n",
+ "H=-2203389\n",
+ "#calculations\n",
+ "dU1=n1*(U11-U12)+n2*(U21-U22)\n",
+ "dU2=n3*(U31-U32)+n4*(U41-U42)\n",
+ "Q=H+dU1-dU2\n",
+ "#results\n",
+ "print '%s %d %s' %(\"Heat of reaction =\",Q,\"Btu\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat of reaction = -2202154 Btu\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12 - Pg 310"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the final temperature\n",
+ "#Initialization of variables\n",
+ "n1=8\n",
+ "n2=9\n",
+ "n3=47\n",
+ "h1=118\n",
+ "h2=104\n",
+ "h3=82.5\n",
+ "Q=2203279 #Btu\n",
+ "#calculations\n",
+ "U11=n1*h1+n2*h2+n3*h3\n",
+ "U12=U11+Q\n",
+ "T2=5271 #R\n",
+ "#results\n",
+ "print '%s %d %s' %(\"Upon interpolating, T2 =\",T2,\" R\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Upon interpolating, T2 = 5271 R\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13 - Pg 313"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the percentage of dissociation\n",
+ "#Initialization of variables\n",
+ "import numpy\n",
+ "from numpy import roots\n",
+ "kp=5. \n",
+ "#calculations\n",
+ "p1=[24.,0,3,-2]\n",
+ "vec=numpy.roots(p1)\n",
+ "x=numpy.real(vec[2]*100.)\n",
+ "p2=[249.,0,3,-2]\n",
+ "vec2=numpy.roots(p2)\n",
+ "y=numpy.real(vec2[2]*100.)\n",
+ "#results\n",
+ "print '%s %.1f %s' %(\"percentage of dissociation =\",x,\" percent\")\n",
+ "print '%s %.d %s' %(\"\\n If pressure =10 . degree of dissociation =\",y,\"percent\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "percentage of dissociation = 34.3 percent\n",
+ "\n",
+ " If pressure =10 . degree of dissociation = 18 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14 - Pg 314"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the Extent of reaction\n",
+ "#Initialization of variables\n",
+ "import numpy\n",
+ "from numpy import roots\n",
+ "p=[24.,48,7,-4]\n",
+ "vec=numpy.roots(p)\n",
+ "x=numpy.real(vec[2] *100)\n",
+ "#results\n",
+ "print '%s %d %s' %(\"Extent of reaction=\",100-x,\"percent\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Extent of reaction= 78 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |