{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter10:CI Engines-Fuel Injection System"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.1 page no: 332"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "bsfc=0.3                    #The brake specific fuel consumption in kg/kWh\n",
      "bp=250                      #The brake power in kW\n",
      "N=1500                      #Number of cycles per min in rpm\n",
      "CA=15                       #Crank angle in degrees\n",
      "pi1=30                      #The pressure of air in the cylinder at the beginning of the injection in bar\n",
      "pi2=60                      #The pressure of air in the cylinder at the end of the injection in bar\n",
      "pf1=220                     #The fuel injection pressure at the beginning in bar\n",
      "pf2=550                     #The fuel injection pressure at the end in bar\n",
      "Cd=0.65                     #The coefficient of discharge for the injector \n",
      "df=850                      #The density of the fuel in kg/m**3\n",
      "p1=1.013                    #The atmospheric pressure in bar\n",
      "n=4.0                       #The number of orifices used in the nozzle\n",
      "x=6.0                       #Number of cylinders\n",
      "\n",
      "#Calculations\n",
      "import math\n",
      "mf=bsfc*bp/60.0             \n",
      "F=(mf/(N/2.0))*(1/x)        \n",
      "s=(CA/360.0)/(N/60.0)       \n",
      "mf1=F/s                     \n",
      "p1=pf1-pi1                 \n",
      "p2=pf2-pi2\n",
      "pa=(p1+p2)/2.0\n",
      "Af=(mf1/(Cd*(2*df*pa*10.0**5)**(1/2.0)))*10**6\n",
      "do=((Af/n)*(4/math.pi))**(1/2.0)\n",
      "\n",
      "#Output\n",
      "print\"The nozzle area required per injection = \" ,round(Af,3),\"mm**2\"\n",
      "print\"The diameter of the orifice = \",round(do,3), \"mm\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The nozzle area required per injection =  1.067 mm**2\n",
        "The diameter of the orifice =  0.583 mm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.2 page no: 333"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "bp=30                                   #The brake power of the engine in kW\n",
      "N=3000                                  #The engine speed in rpm \n",
      "bsfc=0.28                               #The brake specific fuel consumption in kg/kWh \n",
      "Api=35                                  \n",
      "p2=160                                  #The pressure at which fuel is injected in bar\n",
      "CA=28                                   #The crank angle in degrees\n",
      "p1=35                                   #The pressure in the combustion chamber in bar\n",
      "Cv=0.92                                 #The coefficient of velocity \n",
      "\n",
      "#Calculations\n",
      "import math\n",
      "S=141.5/(131.5+Api)                    \n",
      "df=S*1000                               \n",
      "D=(CA/360.0)/(N/60.0)\n",
      "F=(bsfc*bp)/((N/2.0)*60)\n",
      "mf=F/D\n",
      "Cf=Cv*((2*(p2-p1)*10**5)/df)**(1/2.0)\n",
      "Af=(mf/(df*Cf))*10**6\n",
      "d=(4*Af/math.pi)**(1/2.0)                   \n",
      "\n",
      "#Output\n",
      "print\"The velocity of injection of the fuel = \",round(Cf,1),\"m/s \"\n",
      "print\"The diameter of the fuel orifice = \",round(d,3),\" mm \"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The velocity of injection of the fuel =  157.8 m/s \n",
        "The diameter of the fuel orifice =  0.755  mm \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.3 Page no 334"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "d=0.8*10**-3                              #The diameter of an orifice in m\n",
      "A=1.65*10**-6                             #The cross sectional area in m**2\n",
      "Cd=0.9                                    #The discharge coefficient of the orifice \n",
      "Cp=0.85                                   #The coefficient of the passage\n",
      "p1=170                                    #The injection pressure in bar\n",
      "p2=25                                     #The compression pressure of the discharge in bar\n",
      "df=850                                    #The density of the fuel in kg/m**3\n",
      "\n",
      "#Calculations\n",
      "Q=((145/(22.931*10.0**9))**(1/2.0))*10**6  \n",
      "p=170-(2.161*10**9*(Q/10.0**6)**2)\n",
      "Cf=Cd*((2*(p-p2)*10**5)/df)**(1/2.0)\n",
      "\n",
      "#Output\n",
      "print\"The discharge of fuel through the injector = \",round(Q,1),\"cm**2/s\" \n",
      "print\"The jet velocity through the orifice = \",round(Cf,1),\" m/s\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The discharge of fuel through the injector =  79.5 cm**2/s\n",
        "The jet velocity through the orifice =  158.2  m/s\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.4 page no: 336"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "s=20                         #Spray penetration in cm\n",
      "t1=15.7                      #The spray penetration of 20 cm in ms\n",
      "pi1=150                      #The injection pressure in bar\n",
      "pi2=450.0                    #The injection pressure to be used in bar\n",
      "p2=15                        #The combustion chamber pressure in bar\n",
      "d1=0.34                      #The diameter of the orifice in mm\n",
      "s1=20                        #The penetration for an orifice in cm\n",
      "d2=0.17                      #If the diameter of the orifice in cm\n",
      "t11=12                       #The spray penetration in ms\n",
      "\n",
      "#Calculations\n",
      "t2=(t1*(pi1-p2)**(1/2.0))/(pi2-p2)**(1/2.0)\n",
      "s2=d2*(s1/d1)\n",
      "t21=t11*(d2/d1)\n",
      "\n",
      "#Output\n",
      "print\"(a) The time required for the spray to penetrate = \",round(t2,3),\"ms\"\n",
      "print\"(b) The spray penetration of the orifice = \",round(s2,3),\"cm\"\n",
      "print\"The time required for the spray to penetrate = \",round(t21,3),\"ms\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) The time required for the spray to penetrate =  8.746 ms\n",
        "(b) The spray penetration of the orifice =  10.0 cm\n",
        "The time required for the spray to penetrate =  6.0 ms\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.5 page no: 336"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "v=6.5                       #The volume of fuel in the barrel in cc\n",
      "d=0.3                       #The dimeter of fuel pipe line in cm\n",
      "l=65                        #The length of the fuel pipe line in cm \n",
      "vi=2.5                      #The volume of fuel in the injection valve in cc\n",
      "K=78.5*10**-6               #The coefficient of compressibility of the oil per bar\n",
      "p1=1                        #The atmospheric pressure in bar\n",
      "p2=180                      #The pressure due to pump in bar\n",
      "v3=0.1                      #The pump displacement necessary for the fuel in cc\n",
      "e=0.75                      #The effective stroke of the plunger in cm\n",
      "\n",
      "#Calculations\n",
      "import math\n",
      "V1=v+((math.pi*d**2)/4.0)*l+vi\n",
      "V=K*V1*(p2-p1)\n",
      "T=(V)+v3\n",
      "L=T*(4/math.pi)*(1/(e**2))\n",
      "\n",
      "#Output\n",
      "print\"(a) The total displacement of the plunger = \",round(T,3),\"cc\" \n",
      "print\"(b) The effective stroke of the plunger = \",round(L,3),\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) The total displacement of the plunger =  0.291 cc\n",
        "(b) The effective stroke of the plunger =  0.659 cm\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.6 page no: 337"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "n=4.0                               #Number of cylinders \n",
      "N=2500                              #The engine speed in rpm \n",
      "P=90                                #The power produced by the engine in kW\n",
      "bsfc=0.28                           #The brake specific fuel consumption in kg/kWh\n",
      "v=3.5                               #The volume of fuel in the barrel in cc\n",
      "vp=2.5                              #Volume of fuel in the pipe line in cc\n",
      "vi=2.0                                #The fuel inside the injector in cc\n",
      "p1=280.0                              #The average injection pressure in bar\n",
      "p2=30.0                               #The compression pressure of air during injection in bar\n",
      "df=850.0                            #The density of the fuel in kg/m**3\n",
      "K=80*10**-6                         #The coefficient of compressibility of fuel per bar\n",
      "pi=1.0                                #The pressure with which fuel enter into the barrel in bar\n",
      "\n",
      "#Calculations\n",
      "import math\n",
      "F=(bsfc*P)/((N/2.0)*60)\n",
      "F1=F/n\n",
      "Vf=(F1/df)*10**6\n",
      "V1=v+vp+vi\n",
      "V=K*V1*(p1-math.pi)\n",
      "Vp=Vf+V\n",
      "W=((1/2.0)*(p1-math.pi)*10**5*V*10**-6)+((p1-p2)*10**5*Vf*10**-6)\n",
      "P1=(W*N)/(2*60*1000)     #Power lost per cylinder in kW\n",
      "P2=P1*4        #Total power lost for pumping the fuel in kW\n",
      "\n",
      "#Output \n",
      "print\"The displacement volume of one plunger per cycle = \",round(Vp,3),\"cc\" \n",
      "print\"Total power lost for pumping the fuel = \",round(P2,3),\"kW\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The displacement volume of one plunger per cycle =  0.276 cc\n",
        "Total power lost for pumping the fuel =  0.41 kW\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.7 page no: 339"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "v1=0.3                              #Velocity of the pump plunger in m/s\n",
      "l=0.575                             #The length of the fuel pipe in m\n",
      "A=1/20.0                            #The cross sectional area of pipe to the plunger cylinder\n",
      "a=1/40.0                            #The area of nozzle hole to the pipe \n",
      "p1=27.6                             #Initial pressure in the line in bar \n",
      "p2=27.6                             #The compression pressure of the engine\n",
      "K=17830*10**5                       #The bulk modulus of fuel in N/m**2\n",
      "df=860.0                            #The density of the fuel in kg/m**3\n",
      "\n",
      "#Calculations\n",
      "Vs=(K/df)**(1/2.0)\n",
      "t=l/Vs\n",
      "Vp=(1/A)*v1\n",
      "p=((K/Vs)*Vp)/10.0**5\n",
      "pi=p+p1\n",
      "po=p1+p\n",
      "vc=Vp-(a*((2*(po-p2))/df)**(1/2.0))\n",
      "pr=26.8                            #By trial , Pressure\n",
      "Vc=pr*(Vs/(K/10.0**5))\n",
      "po1=p1+p+pr\n",
      "vo=a*((2*(po1-p2)*10**5)/df)**(1/2.0)\n",
      "\n",
      "#Output\n",
      "print\"(a)The velocity of the pressure disturbance = \",round(Vs,0),\"m/s\"\n",
      "print\"(b) The time taken by the disturbance to travel through the pipe line = \",round(t,4),\" s\"  \n",
      "print\"(c) The velocity at the pump end of the pipe line as the plunger moves = \",round(Vp,2),\" m/s\"\n",
      "print\"The pressure at the pump end of pipe line as the plunger moves = \",round(pi,2),\"bar\"\n",
      "print\"(d)The magnitude of the first reflected pressure = \",round(pr,2),\"bar\" \n",
      "print\"The magnitude of the first reflected velocity wave =\",round(Vc,2),\"m/s\" \n",
      "print\"(e)The pressure at the oriface end of the pipe line after the first reflection = \",round(po1,1),\"bar\"\n",
      "print\"The velocity at the oriface end of the pipe line after the first reflection = \",round(vo,2),\" m/s \"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The velocity of the pressure disturbance =  1440.0 m/s\n",
        "(b) The time taken by the disturbance to travel through the pipe line =  0.0004  s\n",
        "(c) The velocity at the pump end of the pipe line as the plunger moves =  6.0  m/s\n",
        "The pressure at the pump end of pipe line as the plunger moves =  101.9 bar\n",
        "(d)The magnitude of the first reflected pressure =  26.8 bar\n",
        "The magnitude of the first reflected velocity wave = 2.16 m/s\n",
        "(e)The pressure at the oriface end of the pipe line after the first reflection =  128.7 bar\n",
        "The velocity at the oriface end of the pipe line after the first reflection =  3.83  m/s \n"
       ]
      }
     ],
     "prompt_number": 30
    }
   ],
   "metadata": {}
  }
 ]
}