Challenge

Week 2 Air standard Cycle

Aim: To find Efficiency of Otto cycle and to plot PV diagram.

Theory:

Otto cycle The Otto Cycle is named after Nikolaus Otto (1832–1891, German) who is credited as the first creator of a petroleum fuel based internal combustion engine operating under a four stroke cycle. Otto’s engine work during the eve of the industrial revolution was a critical development leading to the dawn of the automotive industry in the late 19th century. The Otto Cycle involves four engine strokes. A stroke is defined as a process in which the cylinder’s piston moves up to the top of the engine or down to the bottom of the engine. The cycle begins with the intake stroke in which fresh reactants (fuel and air) are drawn into the engine’s cylinder by a downward-expanding piston motion. The second stroke is compression in which the piston moves from the bottom to top of the engine thereby reducing the volume of the fuel and air. Compressing the reactants before burning them allows for greater work and power to be extracted from the following combustion process. When the piston is near the top of its stroke combustion begins and expansion of the burned gases continues into the expansion stroke. The last of the four strokes is the exhaust stroke in which the burned products of combustion are pushed out of the engine in order to make space for the next cycle’s intake stroke.

Today the Otto Cycle is frequently associated with an ideal cycle analysis of automotive spark ignition gasoline internal combustion. This ideal cycle assumes that the combustion process occurs instantaneously at constant volume. To a first order this Otto Cycle analysis can provide insights into how engine efficiency is affected by changing operating and design parameters. Engines operating under the Otto Cycle are the principal power-plants used in automobiles worldwide at the present time, although in some regions of the world the Diesel Cycle is a very close second in automotive applications. Engines operating under the Otto cycle are relatively inexpensive to manufacture and provide reasonable power to weight ratios with good efficiencies. In recent years engine design improvements coupled with exhaust after-treatment have resulted in vehicles that produce very low levels of pollutants.

Formula Used:

`v_s=(π/4)*b^2*s`

v_s is Swept Volume

b is Bore

s is Stroke

`v_c=v_s/(cr-1)`

v_c is Clearance Volume

cr is Compression Ratio

`P*V^ϒ=constant`

`(P*V)/T= constant`

`eff=1-1/(cr^(ϒ-1))`

Procedure:

  1. In this program we will plot the Otto cycle and also calculate the thermal efficiency of Otto cycle.
  2. At first are going to define the Input parameter like p1, t1, gamma and t3.
  3. Also the Engine parameter we will define such as the bore, stroke, connecting rod, compression ratio and then we will start calculating the swept volume and the clearance volume using the defined formula.
  4. Then we will calculate the state variables at the four points using the known formula.
  5. We will be defining theta in a range of 0 to 180 in a division of 50.
  6. We will be using for loop to define the values in the number of divisions and so that they no more can be a single value and can become an array.
  7. Now we will be making a function file in which we will be defining the engine parameters and then including it in the main file so that our program can be short.\
  8. Now since everything is done we will plot against the four states in both pressure and volume to get the desired plot.
  9. We will also calculate thermal efficiency and then we will print them.

Program Code:

Function definition on engine kinematics

import math


#Geometric Parameters
bore  = 0.1
stroke = 0.1
conn_rod = 0.15
cr = 12
a = stroke/2
R = conn_rod/a

#Volume Parameter
v_s = math.pi*(1/4)*pow(bore,2)*stroke
v_c = v_s/(cr-1)

theta = math.radians(180)

term1 = 0.5*(cr-1)
term2 = R+1-math.cos(theta)
term3 = pow(pow(R,2) - pow(math.sin(theta),2),0.5)

V = (1+term1*(term2-term3))*v_c

print(V)
print(v_c+v_s)

Program Code on Otto Cycle:

# Program for Otto Cycle

import math
import matplotlib.pyplot as plt


def engine_kinematics(bore, stroke, conn_rod, cr, start_crank, end_crank):



	#Geometric Parameters
	
	a = stroke/2
	R = conn_rod/a

	#Volume Parameter
	v_s = math.pi*(1/4)*pow(bore,2)*stroke
	v_c = v_s/(cr-1)

	sc = math.radians(start_crank)
	ec = math.radians(end_crank)

	num_values = 50

	dtheta = (ec-sc)/(num_values-1)
	V = []
	
	for i in range(0,num_values):
		theta = sc + i*dtheta
		




		term1 = 0.5*(cr-1)
		term2 = R+1-math.cos(theta)
		term3 = pow(pow(R,2) - pow(math.sin(theta),2),0.5)

		V.append((1+term1*(term2-term3))*v_c)
	return V

		


#Inputs
#Pressure and Temperature are in Pa and K

p1 = 101325
t1 = 500
gamma = 1.4
t3 = 2300

#Geometric Parameters
bore  = 0.1
stroke = 0.1
conn_rod = 0.15
cr = 12

#Volumetric Computation
#Swept Volume
v_s = (math.pi/4)*pow(bore,2)*stroke

#Clearnace Volume
v_c = v_s/(cr-1)

#State Point 1
v1 = v_c+v_s

#State Point 2
v2 = v_c

#p2*v2^gamma = p1*v1^gamma
p2 = p1*pow(v1,gamma)/pow(v2,gamma)

#Calculating Temperature at State point 2
#p1*v1/t1 = p2*v2/t2
t2 = (p2*v2*t1)/(p1*v1)

cons = p1*pow(v1,gamma)

V_compression = engine_kinematics(bore,stroke,conn_rod, cr, 180, 0)

P_compression = []

for v_comp in V_compression:
	P_compression.append(cons/pow(v_comp,gamma))


#State Variable at point 3
v3 = v2 #Constant Volume Heat addition

#p3*v3/t3 = p2*v2/t2
p3 = (p2*v2*t3)/(v3*t2)



V_expansion = engine_kinematics(bore,stroke,conn_rod, cr, 0, 180)
cons = p3*pow(v3,gamma)
P_expansion = []

for v_exp in V_expansion:
	P_expansion.append(cons/pow(v_exp,gamma))

#State Variable at point 4
#p4*v4^gamma = p3*v3^gamma
v4 = v1

p4 = p3*pow(v3,gamma)/pow(v4,gamma)

#p4*v4/t4 = p3*v3/t3

t4 = (t3*p4*v4)/(p3*v3)

#Thermal Efficiency
eff = 1-(1/pow(cr,(gamma-1)))
print(eff)

#Plot
plt.plot([v2,v3],[p2,p3])
plt.plot(V_compression,P_compression)
plt.plot(V_expansion,P_expansion)
plt.plot([v4,v1],[p4,p1])
plt.xlabel('Volume')
plt.ylabel('Pressure')
plt.title('P-V Diagram Otto Cycle')
plt.legend()
plt.show()

V = engine_kinematics(bore,stroke,conn_rod, cr, 180, 0)

Results and Plots:

Otto Cycle PV Diagram:

Thermal Efficiency:

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.