In [4]:

```
from __future__ import division
# Initialisation of Variables
n=6#...............#No of cylinders
BP=125#...............#Brake Power in kW
N=3000#..............#Engine rpm
bsfc=200#............#Brake Specific Fuel Consumption g/kWh
spgr=0.85#.............#Specific Gravity
#Calculations
fc=(bsfc/1000)*BP#.........#Fuel consumption in kg/h
fcpc=fc/n#..................#Fuel consumption per cylinder
FCPC=(fcpc/60)/(N/2)#................#Fuel Consumption per cycle in kg
VFIC = (FCPC*1000)/spgr#...................#Volume of fuel injected per cycle in cc
print "Volume of Fuel Injected per Cycle = %0.2f cc "%VFIC
```

In [11]:

```
from __future__ import division
from math import sqrt, pi
# Initialisation of Variables
n=6#...............#No of cylinders
N=1500#............#Engine rpm
BP=220#.............#Brake Power in kW
bsfc=0.273#..........#Brake Specific Fuel Consumption in kg/kWh
theta=30#.............#The Period of Injection in degrees of crank angle
spgr=0.85#............#Specific Gravity of fuel
Cf=0.9#................#Orifice discharge co-efficient
ip=160#...............#Injection pressure in bar
cp=40#.................#Pressure in combustion chamber in bar
rhow=1000#................#Density of water in kg/m**3
#Calculations
vf = Cf*sqrt((2*(ip-cp)*10**5)/(spgr*rhow))#.............#Actual fuel velocity of injection in m/sec
qf=(bsfc*BP)/(spgr*rhow*3600)#..................# Volume of fuel injected per sec in m**3
d=sqrt (qf/((pi/4)*n*vf*(theta/360)*(60/N)*(N/120)))#...........#Diameter of nozzle orifice
print "Diameter of Nozzle Orifice = %0.2e m "%d
```

In [12]:

```
from __future__ import division
from math import sqrt, pi
# Initialisation of Variables
n=1#............#No of cylinders
N=650#............#Engine rpm
theta=28#...........#Crank Travel in degree
fc=2.2#...........#Fuel consumption in kg/h
spgr=0.875#............#Specific Gravity
ip=150#................#Injection Pressure in bar
cp=32#.................#Combustion chamber Pressure in bar
Cd=0.88#...............#co-efficient of discharge of orifice
rhow=1000#...........#Density of water in kg/m**3
#Calculation
fcpc = fc/60#..............#Fuel consumption per cylinder
fipc = fcpc/(N/2)#.........#Fuel Injected per cycle in kg
vfpc = fipc/(spgr*rhow)#....#volume of fuel injected per cycle
print "Volume of Fuel Injected per Cycle = %0.2f cm**3 "%(vfpc*10**6)
tfic=(theta/360)*(60/N)#....#Time for Fuel Injection per Cycle in sec
mf = fipc/tfic#...............#Mass of fuel injected per cycle in kg/s
vf = Cd*sqrt((2*(ip-cp)*10**5)/(spgr*rhow))#.............#Actual fuel velocity of injection in m/sec
d=sqrt((mf*4)/(pi*vf*spgr*rhow))
print "Diameter of orifice = %0.2f mm "%(d*1000)
```

In [13]:

```
from __future__ import division
from math import sqrt, pi
# Initialisation of Variables
N=2000#............#Engine rpm
theta=30#...........#Crank Travel in degree
sfc=0.272#...........#Fuel consumption in kg/kWh
ip=120#................#Injection Pressure in bar
cp=30#.................#Combustion chamber Pressure in bar
Cd=0.9#...............#co-efficient of discharge of orifice
rhow=1000#...........#Density of water in kg/m**3
api = 32#..............#API in degree
pw=15#..................#Power Output in kW
#Calculation
spgr= 141.5/(131.5+api)#............#Specific Gravity
fcpc = (sfc*pw)/((N/2)*60)#..............#Fuel consumption per cycle in kg
tfic=(theta/360)*(60/N)#....#Time for Fuel Injection per Cycle in sec
mf = fcpc/tfic#...............#Mass of fuel injected per cycle in kg/s
vf = Cd*sqrt((2*(ip-cp)*10**5)/(spgr*rhow))#.............#Actual fuel velocity of injection in m/sec
d=sqrt((mf*4)/(pi*vf*spgr*rhow))
print "Diameter of orifice = %0.2f mm "%(d*1000)
```

In [14]:

```
from __future__ import division
from math import sqrt, pi
# Initialisation of Variables
N=1800#............#Engine rpm
theta=32#...........#Crank Travel in degree
ip=118.2#................#Injection Pressure in bar
cp=31.38#.................#Combustion chamber Pressure in bar
Cd=0.9#...............#co-efficient of discharge of orifice
rhow=1000#...........#Density of water in kg/m**3
api = 32#..............#API in degree
pw=11#..................#Power Output in kW
d=0.47#...................#Fuel Injection orifice diameter in mm
#Calculation
spgr= 141.5/(131.5+api)#............#Specific Gravity
tfic=(theta/360)*(60/N)#....#Time for Fuel Injection per Cycle in sec
vf = Cd*sqrt((2*(ip-cp)*10**5)/(spgr*rhow))#.............#Actual fuel velocity of injection in m/sec
mf=vf*spgr*rhow*(pi/4)*(d/1000)**2#
tncp=(N/2)*60#...............#Total no of cycles per hour
FIPC=mf*tfic#.................#Mass of fuel injected per cycle in kg/cycle
fc=FIPC*tncp*(1/pw)#...................#Fuel consumption in kg/kWh
print "Fuel consumption = %0.2f kg/kWh "%fc
```

In [15]:

```
from __future__ import division
from math import sqrt, pi
# Initialisation of Variables
n=8#......#No of cylinders
pw=386.4#...........#Power output in kW
N=800#.............#Engine rpm
fc=0.25#.............#Fuel Consumption in kg/kWh
theta=12#..............#Crank Travel in degree (for injection)
spgr=0.85#...........#Specific Gravity
patm=1.013#............#Atmospheric pressure
cf=0.6#................#Co-efficient of discharge for injector
pcB=32#................#Pressure in cylinder in beginning in bar
piB=207#...............#Pressure in injector in beginning in bar
pcE=55#...............#Pressure in cylinder at the end in bar
piE=595#................#Pressure in injector at the end in bar
rhow=1000#..............#density of water in kg/m**3
#calculations
pwpc = pw/n#......................#Output per cylinder
fcpc = (pwpc*fc)/60#.............#Fuel consumption per cylinder in kg/min
fipc = fcpc/(N/2)#................#Fuel injected per cycle in kg
tfic = (theta*60)/(360*N)#...........#Time for fuel Injection per cycle
mf = fipc/tfic#......................#Mass of fuel injected per second
pdb = piB-pcB#....................#Pressure difference at beginning
pde = piE-pcE#...................#Pressure difference at end
apd = (pdb+pde)/2#
Ao=mf/(cf*sqrt(2*apd*10**5*spgr*rhow))#
print "Orifice Area Required per injector = %0.4f cm**2 "%(Ao*10000)
```

In [16]:

```
from __future__ import division
from math import sqrt, pi
# Initialisation of Variables
n=6#...............#No of cylinders
afr=20#...........#Air fuel ratio
d = 0.1#...............#cylinder bore in mm
l=0.14#..............#Cylinder length in mm
etav=0.8#............#Volumetric Efficiency
pa=1#.................#Pressure at the beginning of the compression in bar
ta = 300#.............#Temperature at the beginning of the compression in Kelvin
theta = 20#...............#Crank travel in degree for injection
N = 1500#...................#engine rpm
rhof=960#.................#Fuel density in kg/m**3
cf=0.67#................#Co efficient of discharge for injector
pi=150#....................#injection pressure in bar
pc=40#....................#combustion pressure in bar
R=287#........................#gas constant for air in kJ/kg.K
#calculations
V=(pi/4)*d**2*l*etav#......................#Volume of air supplied per cylinder per cycle in m**3
ma=(pa*10**5*V)/(R*ta)#.....................#Mass of this air at suction conditions in kg/cycle
mf=ma/afr#............................#Mass of fuel in kg/cycle
fipc = (theta*60)/(360*N)#...........#Time taken for fuel injection per cycle in seconds
MF = mf/fipc#........................#Mass of fuel injected into each cylinder per second
print "The mass of fuel injected into each cylinder per second = %0.2f kg/s"%MF
vf=cf*sqrt((2*(pi-pc)*10**5)/rhof)#.............#fuel velocity injection in m/s
d0=sqrt((MF*4)/(pi*vf*rhof))#..................#diameter of fuel orifice in m
print "Diameter of the fuel orifice = %0.2f mm "%(d0*1000)
```

In [17]:

```
from __future__ import division
from math import sqrt, pi
# Initialisation of Variables
Vpbes=7#.................#Volume of fuel in the pump barrel before commencement of effective stroke in cc
df=3#.................#Diameter of fuel line from pump to injector in mm
lf=700#.................#Length of fuel line from pump to injector in mm
Vfiv=2#................#Volume of fuel in the injection valve in cc
Vfd=0.1#.................#Volume of fuel to be delivered in cc
p1=150#..............#Pressure at which fuel is delivered in bar
p2=1#.................#atmospheric pressure in bar
cc=78.8*10**(-6)#..........#Co - efficient of compressibility per bar
dp=7#..............#Diameter of plunger in mm
#calculations
V1=Vpbes+(pi/4)*((df/10)**2)*(lf/10)+Vfiv#...................#Total initial fuel volume
delV=cc*(p1-p2)*V1#................#Change in volume due to compression
displu=delV+Vfd#.....................#Total displacement of plunger
print "Total displacement of plunger = %0.2f cc"%displu
lp=(displu*4)/(pi*(dp/10)**2)#.............#Effective stroke of plunger
print "Effective stroke of plunger = %0.2f mm "%lp
```

In [18]:

```
from __future__ import division
from math import sqrt, pi
# Initialisation of Variables
p1=145#...........#injection pressure in bar
p2=235#.........#Injection pressure in bar (2nd case)
t1=16#.............#spray penetration time in milliseconds
s1=22#................#spray penetration length in cm
s2=22#.................#spray penetration length in cm (2nd case)
pc=30#.................#combustion chamber pressure in bar
#calculations
delp1=p1-pc#
delp2=p2-pc#
t2=(s2/s1)*t1*sqrt(delp1/delp2)#..........#Spray time in seconds for 2nd case
#Given that s=t*sqrt(delp)
print "The time required for spray penetration at an injection pressure of 235 bar = %0.2f milliseconds:"%t2
```