In [1]:

```
import math
#Input data
d = 0.001 #Diameter of the jet in m
vd = 104. #Venturi depression in cm of water. In textbook, it is given as 10 cm
Cd = 0.65 #Coefficient of discharge
g = 0.76 #Specific gravity of petrol
w = 1000. #Weight of water per one cu.m in kg
#Calculations
pa = (vd/100)*w #Venturi depression in kg/m**2
dp = (g*w) #Density of petrol in kg/m**3
wf = (((3.14*d**2)/4)*Cd*math.sqrt(2*9.81*dp*pa))/10**-3 #Petrol discharge in gm/sec neglecting nozzle lip
#Output
print 'The weight of petrol discharged is %3.2f gm/sec'%(wf)
```

In [2]:

```
import math
#Input data
d1 = 0.075 #Throat diameter in m
Ca = 0.93 #Coefficient of air flow
d2 = 0.005 #Orifice diameter in m
Cf = 0.68 #Coefficient of fuel discharge
ap = 1. #Approach factor
dp = 0.15 #Pressure drop in kg/cm**2
da = 1.29 #Density of air in kg/m**3
df = 720 #Density of fuel in kg/m**3
#Calcultions
w = (((3.14/4)*d1**2)/((3.14/4)*d2**2))*(Ca/Cf)*math.sqrt(da/df) #The air-fuel ratio neglecting the nozzle lip
#Output
print 'The air-fuel ratio neglecting the nozzle lip is %3.1f'%(w)
```

In [3]:

```
import math
#Input data
af = 15. #Air fuel ratio
dp = 753. #Density of petrol in kg/m**3
da = 1.28 #Density of air in kg/m**3
C = [0.84,0.7] #Coefficient of discharge for air and fuel respectively
#Calculations
A = 1/(af*(C[1]/C[0])*math.sqrt(dp/da)) #Ratio of areas
d = math.sqrt(A) #Ratio of diamter of jet to diameter of venturi
x = (1/d) #Reverse of ratio
#Output
print 'The ratio of diameter of jet to diameter of venturi is 1 : %3.1f'%(x)
```

In [4]:

```
import math
#Input data
D = [10.,12.] #Dimensions of four cylinder in 10 cm* 12 cm
n = 4. #Four cylinder
N = 2000. #Speed in r.p.m
d = 0.03 #Venturi throat in m
nv = 70. #Volumetric efficiency of the engine in percent
Ca = 0.8 #Coefficient of air flow
da = 1.29 #Density of air in kg/m**3
#Calculations
Vs = (3.14/4)*(D[0]/100)**2*(D[1]/100) #Stroke volume of one cylinder in m**3
Va = (Vs*n*(nv/100)*(N/2)) #Volume of air drawn per minute in m**3
w = (Va*da)/60 #Weight of air drawn per sec
dp = ((w/((3.14/4)*d**2*Ca))**2/(2*9.81*da)) #Venturi depression in kg/cm**2
#Output
print 'The venturi depression is %3.1f kg/m**2'%(dp)
```

In [5]:

```
import math
#Input data
D = [8.25,11.5] #Dimensions of four cylinder in 8.25 cm* 11.5 cm
n = 4. #Four cylinder
N = 3000. #Speed in r.p.m
v = 150. #Venturi depression in cm of water
nv = 80. #Volumetric efficiency of the engine in percent
af = 14. #Air fuel ratio
Ca = 0.84 #Coefficient of air flow
Cf = 0.7 #Coefficient of fuel orifice
da = 1.29 #Density of air in kg/m**3
df = 700. #Density of fuel in kg/m**3
dw = 1000. #Density of water in kg/m**3
#Calculations
Va = ((3.14/4)*(D[0]/100)**2*(D[1]/100)*n*(nv/100)*(N/(2*60))) #Maximum amount of air pasmath.sing through the venturi in m**3
vd = (v/100)*dw #Venturi depression in kg/m**2
va = (Ca*math.sqrt((2*9.81*vd)/da)) #Velocity of air in m/s
d = math.sqrt((Va/va)*(4/3.14)) #Throat diameter of venturi in m
Af = 1/(af*(va/Va)*math.sqrt(df/da)*(Cf/Ca)) #Area of orifice in m**2
df = math.sqrt((Af*4)/3.14)*1000 #Diameter of orifice in mm
#Output
print 'The size of venturi is %i kg/m**2 \
\nThe diameter of fuel orifice is %3.2f mm'%(vd,df)
```

In [6]:

```
import math
D = [7.5,10] #Dimensions of four cylinder in 7.5 cm diameter and 10 cm stroke
n = 6. #Six cylinder
pC = 84. #Percentage of carbon in volatile fuel
pH2 = 16. #Percentage of hydrogen in volatile fuel
dc = (38.5/1000) #Diameter of the throat of the choke tube in m
N = 3000. #Speed in r.p.m
nv = 0.8 #Volumetric efficiency in ratio
p = 0.914 #Pressure at the throat of the choke tube in kg/cm**2
T = 15.5+273 #Temperature at the throat of the choke tube in K
Ts = 273. #Temperature of 0 degree C in K
ps = 1.027 #Atmospheric pressure in kg/cm**2
Ra = 29.27 #Universal gas constant for air in kg.m/kg.K
Rf = 9.9 #Gas constant for fuel in kg.m/kg.K
pO2 = 23. #Composition by weight of oxygen in air in percent
pN2 = 77. #Composition by weight of nitogen in air in percent
mO2 = 32. #Molecular weight of O2
mH2 = 2. #Molecular weight oh H2
mC = 12. #Molecular weight of carbon
#Calculations
Vm = ((3.14/4)*(D[0]/100)**2*(D[1]/100)*n*(N/2)*nv) #Volume of mixture supplied per sec in m**3
qa = ((100/pO2)*(((pC/100)*(mO2/mC))+((pH2/100)*(mO2/(2*mH2))))) #Quantity of air required for complete combustion of fuel in kg
vf = (Rf*Ts)/(ps*10**4) #Specific volume of volatile fuel in m**3/kg
va = (Ra*Ts)/(ps*10**4) #Specific volume of air in m**3/kg
wf = (Vm/(qa*va+vf)) #Flow rate of fuel in kg/min
Fc = (wf*60) #Fuel consumption in kg/hour
da = (p*10**4)/(Ra*T) #Density of air at the throat of the choke in kg/m**3
Va = ((qa*wf)/((3.14/4)*dc**2*da*60)) #Speed of air at throat in m/s
#Output
print 'a) The fuel consumption is %3.1f kg/hr \
\nb) The speed of the air through the choke is %3.1f m/s'%(Fc,Va)
```

In [7]:

```
import math
#Input data
mf = 7.5 #Consumption of petrol per hour
gf = 0.75 #Specific gravity of fuel
Tf = 25+273 #Temperature of fuel in K
af = 15 #Air fuel ratio
dc = 22 #diameter of choke tube in mm
l = 4 #Top of the jet is 4 mm above the petrol level in the float chamber
Ca = 0.82 #Coefficient of discharge for air
Cf = 0.7 #Coefficient of discharge for fuel
R = 29.27 #Characteristic gas constant for air in kg.m/kg.K
p = 1.03 #Atmospheric pressure in kg/cm**2
#Calculations
da = (p*10**4)/(R*Tf) #Density of air in kg/m**3
dp = (gf*1000) #Density of petrol in kg/cm**3
dpa = ((af*mf*10**6)/(60*60*3.14*Ca*(dc/2)**2))**2/(2*9.81*da) #Change in pressure in kg/m**2
df = math.sqrt((mf/(60*60*Cf*math.sqrt(2*9.81*dp*(dpa-((l/100)*dp)))))*(4/3.14))*1000 #Diameter of the fuel jet in mm
#Output
print 'Diameter of the jet of the carburettor is %3.2f mm'%(df)
```

In [8]:

```
import math
#Input data
td = 7.5 #Throat diameter in cm
Ca = 0.85 #Coefficient of air flow
fd = 0.5 #Diameter of fuel orifice in cm
Cd = 0.7 #Coefficient of discharge
l = 5 #Nozzle lip in mm
x = 1 #Approach factor
dpa = 0.15 #Pressure drop in kg/cm**2
da = 1.29 #Density of air in kg/m**3
dp = 720 #Density of fuel in kg/m**3
#Calculations
afr1 = (((3.14*td**2)/(3.14*fd**2))*(Ca/Cd)*math.sqrt(da/dp)) #Air fuel ratio
afr2 = ((3.14*td**2)/(3.14*fd**2))*(Ca/Cd)*math.sqrt((da*dpa)/(dp*(dpa-((l/100)*(dp/10**6))))) #Air fuel ratio
#Output
print 'The air fuel ratio \
\na) neglecting nozzle lip is %3.2f \
\nb) nozzle lip is taken into account is %3.2f'%(afr1,afr2)
```

In [10]:

```
import math
#Input data
td = 7.5 #Throat diameter in cm
Ca = 0.85 #Coefficient of air flow
fd = 0.5 #Diameter of fuel orifice in cm
Cd = 0.7 #Coefficient of discharge
l = 5. #Nozzle lip in mm
x = 1. #Approach factor
dpa = 0.15 #Pressure drop in kg/cm**2
da = 1.29 #Density of air in kg/m**3
dp = 720 #Density of fuel in kg/m**3
#Calculations
v = math.sqrt(2*9.81*(l/1000)*(dp/da)) #Velocity of air in m/s
#Output
print 'Velocity of air flow is %3.1f m/s'%(v)
```

In [11]:

```
import math
#Input data
x = 2.8 #Height above the nozzle in mm
va = 58 #Velocity of air in m/s
da = 1.28 #Density of air in kg/m**3
dp = 750 #Density of petrol in kg/m**3
An = 1.8 #Area of cross section of nozzle in mm**2
Cd = 0.6 #Coefficient of discharge of nozzle
Ca = 0.84 #Coefficient of discharge of air
#Calculations
dpa = ((va/Ca)**2*(da/(2*9.81))) #Change in pressure in kg/m**2
wf = ((An*10**-6)*Cd*math.sqrt(2*9.81*dp*(dpa-((x/1000)*dp)))) #Petrol consumption in kg/sec
#Output
print 'Petrol consumption is %3.4f kg/sec'%(wf)
```

In [12]:

```
import math
#Input data
d = 0.155 #Diameter of orifice in mm
Cd = 0.94 #Coefficient of discharge
td = 3.18 #Throat diameter in cm
Ca = 0.84 #Coefficient of discharge
x = 29 #Venturi depression
dw = 0.89 #Minimum depression of water in cm
sa = 1.1 #Specific weight of air in kg/m**3
sg = 0.72 #Specific gravity of petrol
cyd = [7.75,10.75] #Cylinder dimensions in cm
fc = 10.9 #Fuel consumption in kg/hr
N = 3200 #Speed in r.p.m
n = 4 #Number of cylinders
#Calculations
w = (((3.14/4)*td**2)/((3.14/4)*d**2))*(Ca/Cd)*math.sqrt((sa/(sg*1000))*(x/(x-dw))) #Air fuel ratio
Va = (3.14/4)*(td/100)**2*Ca*math.sqrt(2*9.81*sa*x*6) #Volume of air drawn/sec
vn = (Va/((3.14/4)*(cyd[0]/100)**2*(cyd[1]/100)*n*(N/(2*60))))*100 #Volumetric efficiency in percent
#Output
print 'Air fue ratio is %3.1f \
\nVolumetric efficiency is %3.1f percent'%(w,vn)
```

In [13]:

```
import math
#Input data
af = 0.066 #Air fuel ratio
p = 0.83 #Pressure at the venturi throat in kg/cm**2
pd = 0.04 #Pressure drop in kg/cm**2
va = 245 #Air flow at sea level in kg per hour
#Calculations
dpa = 1.03-p #Pressure at air cleaner in kg/cm**2
d = (1.03-pd-dpa) #Throat pressure when the air cleaner is fitted in kg/cm**2
naf = (af*math.sqrt((1.03-d)/dpa)) #New air fuel ratio
#Output
print 'a) Throat pressure when the air cleaner is fitted is %3.2f kg/cm**2 \
\nb) New air fuel ratio is %3.4f'%(d,naf)
```

In [14]:

```
import math
#Input data
x = 3 #Petrol smath.radians(numpy.arcmath.tan(s 3 mm below
Ta = 15.5+273 #Temperature of air in K
pa = 1.027 #Pressure of air in kg/cm**2
R = 29.27 #Characteristic gas constant in kg.m/kg.K
sg = 0.76 #Specific gravity of fuel
fc = 6.4 #Consumption of fuel in kg/hour
jd = 1.27 #Jet diameter in mm
Cd = 0.6 #Nozzle discharge coefficienct
Ca = 0.8 #Discharge coefficient of air
af = 0.066 #Air fuel ratio
#Calculations
df = (sg*1000) #Density of fuel in kg/m**3
da = (pa*10**4)/(R*Ta) #Density of air in kg/m**3
va = Ca*math.sqrt((2*9.81*x*df)/(da*1000)) #Critical velocity of air in m/s
dpa = (((fc/(60*60))/((3.14/4)*(jd/1000)**2*Cd))**2/(2*9.81*df))+((x/1000)*df) #Drop in pressure in kg/m**3
dpaw = (dpa/1000)*100 #Drop in pressure in cm of water
dj = math.sqrt(((fc/(3600*af))/(Ca*math.sqrt(2*9.81*da*dpa)))/(3.14/4))*1000 #Effective throat diameter in mm
#Output
print 'Critical air velocity is %3.2f m/sec \
\nEffective throat diameter of the venturi is %3.1f mm \
\nThe drop in pressure in the venturi is %3.2f cm of water'%(va,dj,dpaw)
```

In [15]:

```
import math
#Input data
ma = 6.11 #Flow rate of air in kg/min
mf = 0.408 #Flow arte of petrol in kg/min
dp = 768 #Density of petrol in kg/m**3
Ta = 15.5+273 #Temperature of air in K
pa = 1.027 #Pressure of air in kg/cm**2
R = 29.27 #Characteristic gas constant in kg.m/kg.K
va = 97.5 #Speed of air in m/sec
Cv = 0.84 #Velocity coefficient
g = 1.4 #Ratio of specific heats
x = 0.8 #pressure at the venturi is 0.8 of the pressure drop at the choke
Cd = 0.66 #Coefficient of discharge
#Calculations
rp = (1-((va/Cv)**2/(((2*9.81*g)/(g-1))*R*Ta)))**(g/(g-1)) #Pressure ratio
p2 = (pa*rp) #Pressure in kg/cm**2
T2 = (Ta*rp**((g-1)/g)) #Temperature in K
da = (p2/(R*T2))*10**4 #Density in kg/m**3
daa = math.sqrt((ma/(60*va*da))/(3.14/4))*1000 #Throat diameter in mm
df = math.sqrt((mf/(60*Cd*math.sqrt(2*9.81*dp*x*(pa-p2)*10**4)))/(3.14/4))*1000 #Orifice diameter in mm
#Output
print 'Throat diameter of the choke is %i mm \
\nThe orifice diameter is %3.2f mm'%(daa,df)
```

In [16]:

```
import math
#Input data
ma = 6.8 #Mass flow rate of air in kg/min
mf = 0.45 #Mass flow rate of petrol in kg/min
pa = 1.033 #Pressure of air in kg/cm**2
Ta = 20+273 #Temperature of air in K
va = 97.5 #Velocity of air in m/s
Cv = 0.8 #Velocity coefficient
g = 1.4 #Ratio of specific heats
R = 29.27 #Characteristic gas constant in kg.m/kg.K
x = 0.75 #pressure at the venturi is 0.8 of the pressure drop at the choke
Cd = 0.65 #Coefficient of discharge
pw = 800 #Weight of petrol in kg per cu.m
#Calculations
rp = (1-((va/Cv)**2/(((2*9.81*g)/(g-1))*R*Ta)))**(g/(g-1)) #Pressure ratio
p2 = (pa*rp) #Pressure in kg/cm**2
T2 = (Ta*rp**((g-1)/g)) #Temperature in K
da = (p2/(R*T2))*10**4 #Density in kg/m**3
daa = math.sqrt((ma/(60*va*da))/(3.14/4))*100 #Throat diameter in mm
df = math.sqrt((mf/(60*Cd*math.sqrt(2*9.81*pw*x*(pa-p2)*10**4)))/(3.14/4)) #Orifice diameter in mm
#Output
print 'Throat diameter of the choke is %3.2f cm \
\nThe orifice diameter is %3.5f m'%(daa,df)
```

In [17]:

```
import math
#Input data
n = 6. #Number of cylinders
d = 100. #Diameter in mm
L = 100. #Stroke in mm
N = 1500. #Speed in r.p.m
ap = 13.5 #Air fuel ratio
Ta = 80.+273 #Temperature of air in K
x = (7./8) #Ratio of volume drawn
nth = 22. #Thermal efficiency in percent
p = 76. #Pressure in cm of mercury
CV = 9000. #Calorific value of petrol in kcal/kg
l = 1524. #Altitude in m
dp = 2.54 #Drop in pressure in cm of barometric reading
lx = 274 #Altitude rise in m
#Calculations
Vs = (3.14/4)*(d/10)**2*(L/10) #Swept volume in c.c
Va = (x*Vs) #Volume of air drawn in per cylinder per stroke in c.c
wa = (Va*10**-6*(N/2)*n) #Weight of air supplied to the engine per minute in kg
wf = (wa/ap) #Weight of fuel consumed per minute in kg
q = (wf*CV) #Heat supplied to the engine per minute in kcal
P = (q*(nth/100)*427)/4500 #Power developed at ground level in H.P
db = (l/lx)*dp #Drop in barometric reading at an altitude of 1524 m in cm
Pd = (P/p)*(p-db) #Power developed at 1524 m altitude in H.P
#Output
print 'Power developed at the ground level is %i H.P \
\nPower developed at an altitude of %i m is %i H.P'%(P,l,Pd)
```