Study Of Air standard Cycle
Air standard Cycle
Objective:
- We should code to create PV diagram
- We should code to print the Thermal Efficiency
Theory:
The Otto cycle is a set of processes used by spark ignition internal combustion engines (2-stroke or 4-stroke cycles). These engines a) ingest a mixture of fuel and air, b) compress it, c) cause it to react, thus effectively adding heat through converting chemical energy into thermal energy, d) expand the combustion products, and then e) eject the combustion products and replace them with a new charge of fuel and air.
- Intake stroke, gasoline vapor and air drawn into engine (5-1)
- Compression stroke, P, T increase (1-2)
- Combustion (spark), short time, essentially constant volume (2-3) Model: heat absorbed from a series of reservoirs at temperatures T2 toT3 .
- Power stroke: expansion (3-4)
- Valve exhaust: valve opens, gas escapes.
- (4-1) Model: rejection of heat to series of reservoirs at temperatures T4 to T1 .
- Exhaust stroke, piston pushes remaining combustion products out of chamber (1-5)
We model the processes as all acting on a fixed mass of air contained in a piston-cylinder arrangement
In terms of compression ratio, the efficiency of an ideal Otto cycle is:


Python code :
#PROGRAM TO PLOT OTTO CYCLE AND FIND THE THERMAL EFFICIENCY
#IMPORTING MODULES
import math
import matplotlib.pyplot as plt
import numpy as np
#Function for the Kinematics of the engine
def engine_kinematics(bore,stroke,con_rod,cr,start_crank,end_crank):
a=stroke/2 #Geometric Parametrs
R=con_rod/a
Vs=(math.pi/4)*pow(bore,2)*stroke #Swept Volume
Vc=Vs/(cr-1) #Clearance Volume
sc=math.radians(start_crank) #Radians conversion
ec=math.radians(end_crank)
n=50 #Number of Divisions
dt=(ec-sc)/(n-1) #Findining space
v=[] #Empty array for Volume
for i in range(0,n): #Values for v
theta=sc+i*dt
v.append((1+0.5*(cr-1)*(R+1-math.cos(theta)-(pow((pow(R,2)-pow(math.sin(theta),2)),0.5))))*Vc)
return v
#Inputs
bore=0.1
stroke=0.1
con_rod=0.15
p1=101325
t1=230
t3=1500
gamma=1.4
cr=10
#swept Volume and Clearance volume finding
Vs=(math.pi/4)*pow(bore,2)*stroke
Vc=Vs/(cr-1)
v1=Vs+Vc
v2=Vc
#Variables at point 1(4-1)
#Constant Volume haer Rejection
t1=230
p1=101325
v1=Vs+Vc
#Variables at point 2 (1-2)
#Iscentropic Compression
#(p1*v1)/t1=(p2*v2)/t2
v2=Vc
p2=p1*pow(v1,gamma)/pow(v2,gamma)
t2=t1*(p2*v2)/(p1*v1)
Constant_C=p1*pow(v1,gamma)
V_Compression=engine_kinematics(bore,stroke,con_rod,cr,180,0) #Calling the kinematics function
P_Compression=[]
for V in V_Compression:
P_Compression.append(Constant_C/pow(V,gamma)) #Appending the values of Compression Pressure
#Variables at point 3(2-3)
#Constant Volume Heat addition
#p3/p2=t3/t2
p3=p2*(t3/t2)
v3=v2
#Variables at point 4(3-4)
#Iscentropic Expansion
#(p3*v3)/t3=(p4*v4)/t4
v4=v1
p4=p3*pow(v3,gamma)/pow(v4,gamma)
t4=t3*(p4*v4)/(p3*v3)
Constant_E=p3*pow(v3,gamma)
V_Expansion=engine_kinematics(bore,stroke,con_rod,cr,0,180) #Calling the functon
P_Expansion=[]
for V in V_Expansion:
P_Expansion.append(Constant_E/pow(V,gamma)) #Appending the values of expansion pressure
#Calculating the Thermal Efficency
Thermal_Effi=(1-(1/pow(cr,gamma-1)))*100
print('Thermal Efficiency of the Engines=')
print(Thermal_Effi)
#Plotting the PV Diagram
plt.plot(V_Compression,P_Compression)
plt.plot([v2,v3],[p2,p3])
plt.plot(V_Expansion,P_Expansion)
plt.plot([v4,v1],[p4,p1])
plt.xlabel('Volume')
plt.ylabel('Pressure')
plt.title('Air Standard Cycle -Otto Cycle')
plt.show()
Explanation:
We have to start the coding by importing the important modules, So we have imported modules like math ,library, NumPy. We have to define the function for engine kinematics using the parameters like bore, troke,con_rod,cr,start_crank,end_crank along with that we have to input the formulas for Geometric Parameters, Swept Volume, Clearance Volume. From BDC to TDC we have to define number of divisions and we have to use the formula to find the spacing. Basics Inputs like bore, stroke, con_rod, p1,t1,t3,gamma,and compression ratio is given.
There after all the inputs are defined and other unknown parameters at different points were found using the formula. As you can using the Thermal Efficiency formula, we have calculated the Thermal efficiency and also plotted the PV diagram successfully
Result:
The Thermal Efficiency of the Engine=60.189%

PV Diagram

Conlusion:
The Thermal Efficency of the Engine were calculated and PV diagram were plotted Successfully