Air standard Cycle
Air standard Cycle
AIM:
solve an otto cycle and make plots for it.
OBJECTIVE:
- create a PV diagram
- output the thermal efficiency of the engine.
INTRODUCTION:
Otto cycle: automobiles The Otto cycle is the name for the cycle used in spark-ignition IC Engine such as gasoline/petrol. Its theoretical efficiency depends on the compression ratio cr of the engine and the specific heat ratio γ of the gas in the combustion chamber.
Thus, the efficiency increases with the compression ratio. However, the compression ratio of Otto cycle engines is limited by the need to prevent the uncontrolled combustion known as knocking. Modern engines have compression ratios in the range 8 to 11, resulting in ideal cycle efficiencies of 56% to 61%.
PROCESSES:
- Intake Stroke(0-1)
- Compression Stroke(1-2)
- Ignition Phase(2-3)
- Expansion Stroke(3-4)
- Heat Rejection(4-1)
- Exhaust Stroke(1-0)
Governing equations:
Compression ratio: Vs+Vc/Vc
Where Vs=swept volume=(pi/4)*d^2*L
Where d=bore
L=stroke
Vc=clearance volume
- Volume change inside the cylinder due to various processes :
For the isoentropic process, P*V^gamma=constant. - Thermal efficiency of otto cycle=1-(1/cr^(gamma-1))
where cr=compression ratio=12 (assumed) - gamma=specific heat of air=1.4
Assumptions:
The initial pressure P1 and temperature T1 is assumed to be 101325 pascal and 500 kelvin.
The maximum temperature inside the engine cylinder. T3 is assumed to be 2300 kelvin.
Python CODE:
import matplotlib.pyplot as plt
import math
import numpy as np
#function
def engine(sa,ea):
bore=0.1
stroke=0.1
con_rod=.15
cr=12
vs=math.pi/4*bore*bore*stroke
vc=vs/(cr+1)
r=con_rod/(bore/2)
t=np.linspace(sa,ea,50,endpoint=True)
vol=[]
for a in t:
t1=0.5*(cr-1)
t2=r+1-(math.cos(a))
t3=math.sqrt(r*r-pow(math.sin(a),2))
term=1+t1*(t2-t3)
v=vc*(term)
vol.append(v)
return(vol)
#input
p1=101325
t1=500
gama=1.4
t3=2300
#geometric parameters
#clearence and swept volume
bore=0.1
stroke=0.1
con_rod=.15
cr=12
vs=math.pi/4*bore*bore*stroke
vc=vs/(cr+1)
v1=vs+vc
#point 2
v2=vc
#p1*v1^gama=p2*v2^gama=g
p2=p1*pow(v1,gama)/pow(v2,gama)
#p*v/t=const=nr
nr=p1*v1/t1
t2=p2*v2/nr
vol=engine(0,math.pi)
vol.append(v1)
pr=[]
for a in vol:
p=p1*pow(v1,gama)/pow(a,gama)
pr.append(p)
#point3
v3=v2
p3=t3*nr/v3
#point4
v4=v1
p4=p3*math.pow(v3,gama)/math.pow(v4,gama)
t4=nr/(p4*v4)
vol2=[]
vol3=engine(math.pi,0)
vol2.append(v1)
vol2=vol2+vol3
pr2=[]
for a in vol2:
p=p3*pow(v3,gama)/pow(a,gama)
pr2.append(p)
#plot
plt.plot([v1,v2,v3,v4],[p1,p2,p3,p4],'*')
plt.plot([v1,v4],[p1,p4])
plt.plot([v2,v3],[p2,p3])
plt.plot(vol,pr)
plt.plot(vol2,pr2)
plt.ylabel('Preasure[Pa]')
plt.xlabel('Volume[m^3]')
plt.title('P-V Diagram of otto cycle')
plt.show()
n=1-(t1/t2)
print(n)
MATLAB CODE FOR FUNCTION:
function [V] = engine_kinematics(bore,stroke,con_rod,cr,start_crank,end_crank);
v_s = pi/4*bore^2*stroke
v_c = v_s/(cr-1)
theta = linspace(start_crank,end_crank,100)
a = stroke/2
R = con_rod/a
term1 = 0.5*(cr-1)
term2 = R+1-cosd(theta)
term3 = (R^2-sind(theta).^2).^0.5
V = (1+term1*(term2-term3)).*v_c
end
RESULTS:
- Output PV Diagram :
Efficiency:
REFERENCE:
- Image is taken from google images :
- https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.nuclear-power.net%2Fnuclear-engineering%2Fthermodynamics%2Fthermodynamic-cycles%2Fotto-cycle-otto-engine%2F&psig=AOvVaw3lL4btK9qXfCj1YeRpnasL&ust=1589167740089000&source=images&cd=vfe&ved=0CAIQjRxqFwoTCLDhnqmtqOkCFQAAAAAdAAAAABAD