{
 "metadata": {
  "name": "",
  "signature": "sha256:7a4f335b4806f25fef0bf94c3a05e4c422a4dc1cb839f62bebcb4060f38f97a2"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER 8: INTERNAL COMBUSTION ENGINES: VARIABLE SPECIFIC HEATS"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.1 Page 128"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variable\n",
      "from math import pi,sqrt,acos,asin,atan,cos,sin,tan\n",
      "b=6#in\n",
      "b1=9.0#in\n",
      "r1=4.0#ratio\n",
      "r2=1.0#ratio\n",
      "p=50#lb/in^2\n",
      "s=300#r p m\n",
      "e=30#per cent\n",
      "v=260#C.H.U\n",
      "a=1.41\n",
      "h=0.30#in\n",
      "g=33000#in\n",
      "g1=1400#in\n",
      "A=1-(r2/r1)**0.41#lb/in^2\n",
      "\n",
      "#CALCULATIONS\n",
      "I=(p*pi*36/4*9/12*s/2)*1/g#ft^3\n",
      "X=(I*g)/(g1*v*h)#ft^3\n",
      "C=X*60/I#ft^3\n",
      "R=h/A*100#per cent\n",
      "\n",
      "#RESULTS\n",
      "print\"The fuel consumption in ft^3/h p hr and the efficiency relative to the air standard cycle is\",round(R,3),\"%\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The fuel consumption in ft^3/h p hr and the efficiency relative to the air standard cycle is 69.195 %\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.3 Page 129"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variable\n",
      "from math import pi,sqrt,acos,asin,atan,cos,sin,tan\n",
      "h=200.0#r p m\n",
      "h1=50.0#i h p\n",
      "P4=33.4#lb/in^2\n",
      "W=9000.0#ft lb\n",
      "x=33000.0#ft.lb\n",
      "p=1728.0#ft/lb\n",
      "\n",
      "#CALCULATIONS\n",
      "w=h1*x/100.0#ft lb\n",
      "T=w/W#ft^3\n",
      "V =13.0/14.0*T#ft^3\n",
      "D=((V*p*8)/(3*pi))**(1.0/3.0)#in\n",
      "\n",
      "#RESULTS\n",
      "print\"The diameter of the cylinder of a single acting and swept volume is\",round(D,3),\"in\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The diameter of the cylinder of a single acting and swept volume is 13.567 in\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.6 Page 132"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variable\n",
      "from math import pi,sqrt,acos,asin,atan,cos,sin,tan\n",
      "h=12#in\n",
      "h1=18#in\n",
      "v=19000#B.Th.U/lb\n",
      "T=12600#lb/in^2\n",
      "m=90#lb/in^2\n",
      "w=120#gal\n",
      "t1=140#F\n",
      "t2=60#F\n",
      "t3=570#F\n",
      "Cv=0.24#ft/lb\n",
      "q=810#ft/lb\n",
      "n=16.9#lb\n",
      "\n",
      "#CALCULATIONS\n",
      "H=(n/t2*v)#B.Th.U\n",
      "H1=(m*pi*(144/4)*(h1/h)*(T/t2))/(778*2)#B.TH.U/min\n",
      "H2=1750#B.Th.U\n",
      "H3=(H1-H2)#B.Th.U\n",
      "W=(w*10/t2)*(t1-t2)#B,Th.U\n",
      "G=((q+n)/(t2))*(t3-t2)*Cv#B.TH.U\n",
      "\n",
      "#RESULTS\n",
      "print\"The heat balance showing heat quantities received and the discharged per min is\",round(G,3),\"B.TH.u\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The heat balance showing heat quantities received and the discharged per min is 1686.876 B.TH.u\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.8 Page 133"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variable\n",
      "from math import pi,sqrt,acos,asin,atan,cos,sin,tan\n",
      "v=12.5 #i.p.h\n",
      "p1=8.25#in\n",
      "p2=12.0#in\n",
      "t=110.0#per min\n",
      "g1=280.0#C.H.U/ft^3\n",
      "g2=215.0#ft^3\n",
      "V=25.0#percent\n",
      "e=0.875#in\n",
      "T=33000.0#in\n",
      "v1=0.4170#ft^3\n",
      "\n",
      "#CALCULATIONS\n",
      "M=(T*v)/((pi*(p1)**2.0)/(4.0)*(p2/p2)*(t))#lb.in^2\n",
      "V1=pi*(p1)**2.0/4.0*p2/1728.0*e#ft^3\n",
      "V2=(pi*(p1)**2.0*p2)/(4.0*4.0*1728.0)#ft^3\n",
      "G=(g2/60.0*1.0/t)#ft^3\n",
      "T1=G*g1#C.H.U\n",
      "T2=(T1/v1)#C.H.U\n",
      "F=(M/T2)#C.H.U\n",
      "\n",
      "#RESULTS\n",
      "print\"The value of the Tookey factor for gas engine is\",round(F,3),\"C.H.U\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of the Tookey factor for gas engine is 3.207 C.H.U\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.10 Page 135 "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variable\n",
      "from math import pi,sqrt,acos,asin,atan,cos,sin,tan\n",
      "p1=140#lb/in^2\n",
      "p2=6.6#lb/in^2\n",
      "v1=122#r.p.m\n",
      "v2=1250#b.h.p\n",
      "t=1425#i.h.p\n",
      "p3=77.8#lb/in^2\n",
      "h=0.356#lb\n",
      "v=10000#C.H.U/lb\n",
      "h2=2400#lb\n",
      "q=33000#in\n",
      "j=1400#in\n",
      "\n",
      "#CALCULATIONS\n",
      "t=(v2*q*60)/(j*h*v2*v)*100#percent\n",
      "V=(p3*144*v1)/(q*2)#V\n",
      "V1=(p2*144*v1)/q#V\n",
      "T=24.16#V\n",
      "V2=t/T#ft^3\n",
      "I=V*V2#ft^3\n",
      "I1=V1*V2#ft^3\n",
      "H=24904#C/.H.U//mim\n",
      "T=(I*q*60)/(j*h*v2*v)*100#percent\n",
      "T1=(I1*q)/(j*H)*100#percent\n",
      "T2=(h*v2*v)/(60)#C.H.U\n",
      "H1=(v2*q)/(j)#C.H.U/mim\n",
      "H2=H-(I1*q*v2)/(j*t)#C.H.U/mim\n",
      "T3=H1+H2#C.H.U/mim\n",
      "Tn=T2-T3#C.H.U/mim\n",
      "\n",
      "#RESULTS\n",
      "print\"the overall thermal effciency is\",round(t,3),\"%\"\n",
      "print\"the cylinder volume is\",round(V,3),\"ft^3\"\n",
      "print\"the thermal efficiency of steam engine is\",round(T1,3),\"%\"\n",
      "print\"total heat in oil.min is\",round(Tn,3),\"C.H.U/min\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the overall thermal effciency is 39.727 %\n",
        "the cylinder volume is 20.709 ft^3\n",
        "the thermal efficiency of steam engine is 0.547 %\n",
        "total heat in oil.min is 24083.671 C.H.U/min\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.12 Page 138"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variable\n",
      "from math import pi,sqrt,acos,asin,atan,cos,sin,tan\n",
      "r=14#in\n",
      "r1=1.8#in\n",
      "t=30.4#lb\n",
      "e=0.6#lb\n",
      "lam=1.4\n",
      "d=12#in\n",
      "d1=18#in\n",
      "v=10000#C.H.U/lb\n",
      "P=200#r m p\n",
      "\n",
      "#CALCULATIONS\n",
      "A=1-(1/(lam*(r)**0.4))*((r1)**lam-1)/(r1-1)#percent\n",
      "T=e*A#percent\n",
      "H=t/60*v#C.H.U\n",
      "H1=H*T#C.H.U\n",
      "I=(H1*1400)/(33000)#ln/in^2\n",
      "M=(I*33000)/(2*pi*144/4*d1/12*P/2)#lb/in^2\n",
      "\n",
      "#RESULTS\n",
      "print\"the indicated hourse-power and the mean effiective pressure of the engine is\",round(M,3),\"lb/in^2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the indicated hourse-power and the mean effiective pressure of the engine is 75.666 lb/in^2\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.19 Page 140"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variable\n",
      "from math import pi,sqrt,acos,asin,atan,cos,sin,tan\n",
      "cv=0.1714#C.H.U\n",
      "R=100.3#ft.lb\n",
      "T=500#degree c\n",
      "J=1400#in\n",
      "Lam=R/J#C.H.U percent C\n",
      "\n",
      "#CALCULATIONS\n",
      "Cp=Lam+cv#C.H.U percent C\n",
      "\n",
      "#RESULTS\n",
      "print\"The specific heat at constant volume of a gaseous mixture is\",round(Cp,3),\"C.H.U %\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The specific heat at constant volume of a gaseous mixture is 0.243 C.H.U %\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.20 Page 141"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variable\n",
      "from math import pi,sqrt,acos,asin,atan,cos,sin,tan\n",
      "a=0.124#in\n",
      "b=0.000025#in\n",
      "R=0.0671#heat units\n",
      "\n",
      "#CALCULATIONS\n",
      "Cp=(R+a+b)+b#T\n",
      "\n",
      "#RESULTS\n",
      "print\"the specific heat of a gas at constant volume is\",round(Cp,3),\"T\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the specific heat of a gas at constant volume is 0.191 T\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.21 Page 142"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variable\n",
      "from math import pi,sqrt,acos,asin,atan,cos,sin,tan\n",
      "v=18#ft^3\n",
      "p=14#lb/in^2\n",
      "p1=150#lb/in^2\n",
      "Cp=0.242#T\n",
      "Cv=0.171#T\n",
      "j=1400#ft\n",
      "R=j*(Cp-Cv)#ft.lb\n",
      "p2=144#ft\n",
      "I1=137500#ft/lb\n",
      "I2=6.37#ft/lb\n",
      "v2=3.282#ft^3\n",
      "\n",
      "#CALCULATIONS\n",
      "T=(p2*p*v)/R#Degree C\n",
      "T2=(p2*p1*v2)/(R)#Degree c\n",
      "W=Cp*(T2-T)+0.00002*((T2)**2-(T)**2)#C.H.U/lb\n",
      "C=v/v2#ratio\n",
      "\n",
      "#RESULTS\n",
      "print\"The work done the temperatures at the beginning and end of compression ratio is\",round(C,3),\"ratio\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The work done the temperatures at the beginning and end of compression ratio is 5.484 ratio\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.22 Page 144"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variable\n",
      "from math import pi,sqrt,acos,asin,atan,cos,sin,tan\n",
      "r=12.5#rario\n",
      "p=0.39*10**6#ft.lb\n",
      "p1=14#lb/in^2\n",
      "t=373#Degree C\n",
      "g=18#ft^3\n",
      "t1=100#Degree C\n",
      "V=g/r#ft^3\n",
      "I=0.2*10**6#ft lb/lb\n",
      "T=0.59*10**6#ft.lb/lb\n",
      "D=0.221*10**6#ft.lb/lb\n",
      "A=0.095*10**6#ft.lb/lb\n",
      "E=0.264*10**6#ft.lb/lb\n",
      "E1=0.390*10**6#t.lb/lb\n",
      "\n",
      "#ALCULATIONS\n",
      "W=(E/E1)*100#ercent\n",
      "M=(E)/(144*(g-V))#b.in^2\n",
      "\n",
      "#RSULTS\n",
      "print\"the efficiency of the engine and the m e p on the assumption that the specific heats is\",round(M,3),\"lb in^2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the efficiency of the engine and the m e p on the assumption that the specific heats is 110.709 lb in^2\n"
       ]
      }
     ],
     "prompt_number": 16
    }
   ],
   "metadata": {}
  }
 ]
}