{
 "metadata": {
  "name": "",
  "signature": "sha256:4e8467c44185deda0f287a5fb2df2f33438b3eb316ab3092c4e75cf0fe34abd0"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chatper 11 : Four Stroke Spark Ignition Engine"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.1  Page no :  239"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "d = 0.0625\t\t\t\t\t#Diameter in m\n",
      "L = 0.09\t\t\t\t\t#Stroke in m\n",
      "nv = 0.75\t\t\t\t\t#Volumetric efficiency\n",
      "p = 1.03\t\t\t\t\t#Pressure at N.T.P in kg/cm**2\n",
      "T = 273\t\t\t\t\t#Temperature at N.T.P in K\n",
      "R = 29.27\t\t\t\t\t#Characteristic gas constant in kg.m/kg.degree C\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "Vs = ((3.14/4)*d**2*L)\t\t\t\t\t#Swept volume in cu.m\n",
      "V = (nv*Vs)\t\t\t\t\t#Volume of charge at N.T.P in cu.m\n",
      "w = (p*10**4*V)/(R*T)\t\t\t\t\t#Weight of the charge in kg/cycle\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'The weight of the charge is %3.6f kg/cycle'%(w)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The weight of the charge is 0.000267 kg/cycle\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.2  Page no :  242"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "n = 9.\t\t\t\t\t#Number of cylinder\n",
      "d = 0.145\t\t\t\t\t#Bore in m\n",
      "l = 0.19\t\t\t\t\t#Stroke in m\n",
      "r = 5.9\t\t\t\t\t#Compression ratio\n",
      "bhp = 460.\t\t\t\t\t#Brake horse power in B.H.P\n",
      "N = 2000.\t\t\t\t\t#Speed in r.p.m\n",
      "x = 20.\t\t\t\t\t#Percentage rich in mixture\n",
      "CV = 11200.\t\t\t\t\t#Calorific value in kcal/kg\n",
      "pC = 85.3\t\t\t\t\t#Percentage of carbon\n",
      "pH2 = 14.7\t\t\t\t\t#Percentage of Hydrogen\n",
      "nv = 70.\t\t\t\t\t#Volumetric efficiency in percent\n",
      "T = 15.+273\t\t\t\t\t#Temperature in K\n",
      "nm = 90.\t\t\t\t\t#Mechanical efficiency in percent\n",
      "wO2 = 23.3\t\t\t\t\t#Percentage of oxygen by weight in air\n",
      "da = 1.29\t\t\t\t\t#Density of air in kg/m**3\n",
      "mC = 12.\t\t\t\t\t#Molecular weight of carbon\n",
      "mO2 = 32.\t\t\t\t\t#Molecular weight of O2\n",
      "mH2 = 2.\t\t\t\t\t#Molecular weight of H2\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "hihp = ((bhp/(nm/100))*(4500./427))\t\t\t\t\t#Heat equivalent in kcal\n",
      "Vs = ((3.14/4)*d**2*l*(N/2)*n)\t\t\t\t\t#Swept volume in c.m per min\n",
      "cw = (Vs/da)\t\t\t\t\t#Charge weight of air per minute in kg\n",
      "ma = (100/wO2)*((pC/100)*(mO2/mC)+(pH2/100)*(mO2/(2*mH2)))\t\t\t\t\t#Wt. of air required per kg of fuel in kg\n",
      "mf = (cw/ma)\t\t\t\t\t#Minimum fuel inkg\n",
      "ith = (hihp/(mf*(100+x)/100*CV))*100\t\t\t\t\t#Indicated thermal efficiciency in percent'\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'Indicated thermal efficiency of the engine is %3.1f percent'%(ith)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Indicated thermal efficiency of the engine is 27.1 percent\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.3  Page no :  244"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "n = 8.\t\t\t\t\t#Number of cylinders\n",
      "d = 8.57\t\t\t\t\t#Bore in cm\n",
      "l = 8.25\t\t\t\t\t#Stroke in cm\n",
      "r = 7.\t\t\t\t\t#Compression ratio\n",
      "N = 4000.\t\t\t\t\t#Speed in r.p.m\n",
      "la = 53.35\t\t\t\t\t#Length of the arm in cm\n",
      "t = 10.\t\t\t\t\t#Test duration in min\n",
      "br = 40.8\t\t\t\t\t#Beam reading in kg\n",
      "gas = 0.455\t\t\t\t\t#gasoline in kg. In textbook, it is given wrong as 4.55\n",
      "CV = 11400.\t\t\t\t\t#Calorific value in kcal/kg\n",
      "Ta = 21.+273\t\t\t\t\t#Temperature of air in K\n",
      "pa = 1.027\t\t\t\t\t#Pressure of air in kg/cm**2\n",
      "wa = 5.44\t\t\t\t\t#Rate of air in kg/min\n",
      "J = 427.\t\t\t\t\t#Mechanical equivalent of heat in kg.m/kcal\n",
      "R = 29.27\t\t\t\t\t#Characteristic gas constant in kg.m/kg.K\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "bhp = (2*3.14*N*br*la)/(4500*100)\t\t\t\t\t#Brake horse power in B.H.P\n",
      "pb = (bhp*4500)/((n/2)*(l/100)*(3.14/4)*d**2*N)\t\t\t\t\t#Brake mean effective pressure in kg/cm**2\n",
      "bsfc = (gas*60)/bhp\t\t\t\t\t#Brake specific fuel consumption in kg/b.h.p.hr\n",
      "bsac = ((wa*60)/bhp)\t\t\t\t\t#Brake specific fuel consumption in kg/b.h.p.hr\n",
      "nb = ((bhp*4500)/(J*gas*CV))*100\t\t\t\t\t#Brake thermal efficiency in percent\n",
      "Vd = ((3.14/4)*d**2*l)\t\t\t\t\t#Piston print lacement in c.c/cycle\n",
      "Pd = (Vd/10**6)*(N/2)*n\t\t\t\t\t#Piston print lacement in m**3/min\n",
      "Va = ((wa*R*Ta)/(pa*10**4))\t\t\t\t\t#Volume of air used in m**3/min\n",
      "nv = (Va/Pd)*100\t\t\t\t\t#Volumetric efficiency in percent\n",
      "af = (wa/gas)\t\t\t\t\t#Air fel ratio\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'a) the B.H.P delivered s %3.0f h.p  \\\n",
      "\\nb) the b.m.e.p is %3.1f kg/cm**2  \\\n",
      "\\nc) the b.s.f.c is %3.3f kg/b.h.p.hr  \\\n",
      "\\nd) the brake specific air consumption is %3.3f kg/b.h.p.hr  \\\n",
      "\\ne) the brake thermal efficiency is %3.1f percent  \\\n",
      "\\nf) the volumetric efficiency is %3.0f percent  \\\n",
      "\\ng) the air fuel ratio is %3.2f'%(bhp,pb,bsfc,bsac,nb,nv,af)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a) the B.H.P delivered s 122 h.p  \n",
        "b) the b.m.e.p is 7.2 kg/cm**2  \n",
        "c) the b.s.f.c is 0.225 kg/b.h.p.hr  \n",
        "d) the brake specific air consumption is 2.686 kg/b.h.p.hr  \n",
        "e) the brake thermal efficiency is 24.7 percent  \n",
        "f) the volumetric efficiency is  60 percent  \n",
        "g) the air fuel ratio is 11.96\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.4  Page no :  246"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "n = 4.\t\t\t\t\t#Number of cylinders\n",
      "N = 2000.\t\t\t\t\t#Speed in r.p.m\n",
      "m = 13.15\t\t\t\t\t#Mass of fuel in kg/hour\n",
      "Vd = 655.5\t\t\t\t\t#Displacement volume in c.c\n",
      "da = 1.2\t\t\t\t\t#Density of air in kg/m**3\n",
      "d = 12.7\t\t\t\t\t#Manometer depression in cm\n",
      "\t\t\t\t\t#Qa = 0.231*math.sqrt(ha); Qa is the flow rate in cu.m/min and ha is the pressure difference in metres\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "Qa = (0.231*math.sqrt(((d*1000)/da)/100))\t\t\t\t\t#Flow rate in cu.m/min\n",
      "Wa = (Qa*da)\t\t\t\t\t#Weight of air in kg/min\n",
      "Va = (Qa*(2/N)*(1/n))*10**6\t\t\t\t\t#Volume of air drawn in per cycle per cylinder in c.c\n",
      "nv = (Va/Vd)*100\t\t\t\t\t#Volumetric efficiency in percent\n",
      "af = (Wa/(m/60))\t\t\t\t\t#Air fuel ratio\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'a) the weight of air drawn is %3.3f kg/min  \\\n",
      "\\nb) volumetric efficiency taking air into account is %3.1f percent  \\\n",
      "\\nc) the air-fuel ratio is %i'%(Wa,nv,af)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a) the weight of air drawn is 2.852 kg/min  \n",
        "b) volumetric efficiency taking air into account is 90.6 percent  \n",
        "c) the air-fuel ratio is 13\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.5  Page no :  248"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "d = 10.\t\t\t\t\t#Diameter in cm\n",
      "l = 15.\t\t\t\t\t#Stroke in cm\n",
      "r = 6.\t\t\t\t\t#Compression ratio\n",
      "ihp = 20.\t\t\t\t\t#Indicated horse power in h.p\n",
      "N = 1000.\t\t\t\t\t#Speed in r.p.m\n",
      "n = 4.\t\t\t\t\t#Number of cylinders\n",
      "nt = 30.\t\t\t\t\t#Thermal efficiency in percent\n",
      "CV = 10000.\t\t\t\t\t#Calorific value in kca/kg\n",
      "g = 1.4\t\t\t\t\t#Ratio of specific heats\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "Vs = ((3.14/4)*d**2*l)\t\t\t\t\t#Swept volume in c.c\n",
      "Vc = (Vs/(r-1))\t\t\t\t\t#Clearance volume in c.c\n",
      "na = (1-(1/r)**(g-1))*100\t\t\t\t\t#Air standard efficiency in percent\n",
      "pm = ((ihp*4500)/((l/100)*(3.14/4)*(d/100)**2*(N/2)*n))\t\t\t\t\t#Pressure in kg/cm**2\n",
      "pc = (ihp*4500*60)/(427*(nt/100)*CV)\t\t\t\t\t#Petrol consumption in kg/hr\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'Clearance volume is %3.1f c.c  \\\n",
      "\\nThe air standard efficiency is %3.1f percent  \\\n",
      "\\nPetrol consumption is %3.2f kg/hr'%(Vc,na,pc)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Clearance volume is 235.5 c.c  \n",
        "The air standard efficiency is 51.2 percent  \n",
        "Petrol consumption is 4.22 kg/hr\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.6  Page no :  253"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "n = 6.\t\t\t\t\t#Number of cylinders\n",
      "P = 62.\t\t\t\t\t#Power in HP\n",
      "N = 3000.\t\t\t\t\t#Speed in r.p.m\n",
      "nv = 85.\t\t\t\t\t#Volumetric efficiency in percent\n",
      "nt = 25.\t\t\t\t\t#Thermal efficiency in percent\n",
      "CV = 10500.\t\t\t\t\t#Calorific value in kcal/kg\n",
      "af = 15.\t\t\t\t\t#Air fuel ratio\n",
      "T = 273.\t\t\t\t\t#standard atmosphere temperature in K\n",
      "p = 1.03\t\t\t\t\t#standard atmosphere pressure in kg/cm**2\n",
      "R = 29.27\t\t\t\t\t#Characteristic gas constant in kg.m/kg.K\n",
      "J = 427.\t\t\t\t\t#Mechanical equivalent of heat in kg.m/kcal\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "q = (P*4500)/(J*(nt/100))\t\t\t\t\t#Heat supplied in kcal/min\n",
      "F = (q/CV)\t\t\t\t\t#Fuel supplied per minute in kg\n",
      "Fc = (F/N)*(2/n)\t\t\t\t\t#Fuel supplied per cycle per cylinder in kg\n",
      "wt = (af*Fc)\t\t\t\t\t#Weight of air supplied per cycle in kg\n",
      "d = ((((wt)*R*T)/(p*10**4*(3.14/4)*(nv/100)))**(1./3))*100\t\t\t\t\t#Diameter in cm\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'Cylinder bore  =  stroke  =  %3.2f cm'%(d)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Cylinder bore  =  stroke  =  7.84 cm\n"
       ]
      }
     ],
     "prompt_number": 7
    }
   ],
   "metadata": {}
  }
 ]
}