Week 2 Air standard Cycle
Aim:
To find the perofrmance of an SI engine and make a P-V diagram of Otto Cycle
Objective:
- To plot the P-V diagram
- To find out the thermal efficiency of the engine
Theory:
Otto Cycle:
The Otto Cylce is an ideal thermodynamic cycle which explains the functioning of an SI engine.The Otto cycle determines what happens to the mass of gas when it is subjected to pressure,temperature,volume,addition and removal of heat.An Otto cycle undergoes four processes to complete the cycle.
- Process 1-2 : Iscentropic Expansion
- Process 2-3 : Constant Volume Heat Addition
- Process 3-4 : Iscentropic Expansion
- Process 4-1 : Constant Volume Heat Rejection
From Process 1-2,it is an Iscentropic Compression process where the volume of the gas decreases with increase in pressure,.In Process 2-3 there is a constant addition of heat with volume remaining the same and the pressure increases reaching the peak.In Process 3-4, it is an Iscentropic Expansion process where the volume increases with decrease in pressure and the final process,Process 4-1, the pressure drops and the volume remains same with removal of heat.These processes combine to complete one cycle in an Otto Cycle.
Thermal Efficiency:
Thermal Efficiency refers to the net heat output produced by engine from the net inputs given.Thermal efficiency varies in different engines.CI engines are more thermal efficient than the counterpart SI engines because of the larger compression ratio and better compression.Thermal Efficiency is denoted as `eta_t` and defined using a formula.
`eta_c=(1-(W_o /Q_i))*100`
Thermodynamic equations and Formulae required:
For Iscentropic Process:
`P_a*V_a^gamma=P_b*V_b^gamma`
Where,
P refers to Pressure(Pa),
V refers to Volume(`m^3`),
a and b refers to corresponding processes.
For Constant Heat Addition and Removal Processes:
`(P_a*V_a)/T_a=(P_b*V_b)/T_b`
Where,
P refers to Pressure(Pa),
V refers to Volume(`m^3`),
T refers to Temperature(K),
a and b refers to corresponding processes
Swept Volume(v_s):
`v_s=pi/4*b^2*s*n`
Where,
b refers to Bore length(m),
s refers to Stroke length(m),
n refers to number of cylinders.
Clearance Volume(v_c):
`v_c=v_s/(cr-1)`
Compression Volume:
`V/v_c=1+1/2(cr-1)[R+1-costheta-(R^2-sin^2theta)^(1/2)]`
`a=s/2`
`R=c.rod //2`
where,
a refers to crank radius(m),
V refers to Compression Volume(`m^3`),
cr refers to Compression Ratio
Thermal Efficiency:
`Q_i=C_p(t3-t4)`
`W_o=C_p(t_d-t_a)`
`eta_t=(1-(W_o /Q_i))*100`
where,
`W_o` refers to Net Work Output(J/kg),
`Q_i` refers to Net Heat Input(J/kg).
Program Description:
1)Two seperate functions are made to calculate the Compression and Expansion Volume and Thermal efficiency.
2)All the inputs such as engine geometric parameters,thermodynamics and thevolume,pressure and temperature and different states are mentioned.
3)A program is written to calculate all the unknown parameters using the thermodynamic equations and fomulae required.
4)Both the functions are called in the main program and executed.
5)The PV diagram is plotted.
Program:
# OTTO CYCLE
import math
import matplotlib.pyplot as plt
import numpy as np
#Function to calculate the Compression and Expansion Volume:
def piston_kinematics(bore,stroke,cr,connect_r,crank_start,crank_end):
a = stroke/2
R = connect_r/a
v_s = (math.pi/4)*pow(bore,2)*stroke
v_c = v_s/(cr-1)
cs=math.radians(crank_start)
ce=math.radians(crank_end)
t = np.linspace(cs,ce,50)
V = []
for i in t:
term1 = 0.5*(cr-1)
term2 = R+1-(math.cos(i))
term3 = pow(pow(R,2)-(pow(math.sin(i),2)),0.5)
V.append((1+term1*(term2-term3))*v_c)
#print(V)
return V
def Thermal_eff(C_p,t1,t2,t3,t4):
Q_in = C_p*(t3-t2)
W_out = C_p*(t4-t1)
eff_t = (1-(W_out/Q_in))*100
return eff_t
# Inputs:
# Gamma:
g = 1.4
# Engine Parameter:
C_p = 2130
bore = 0.1
stroke = 0.1
connect_r = 0.4
cr = 12
# State Variable as state 1:
t1 = 450
p1 = 150000
# State Variable at state 3:
t3 = 2000
# State Variable at state 4:
t4 = 900
# Calculations:
# Swept Volume and Clearance Volume:
v_s = (math.pi/4)*pow(bore,2)*stroke
v_c = v_s/(cr-1)
v1 = v_s + v_c
v2 = v_c
# State variable at state 2:
# Since it is an Iscentropic expansion process:
# wkt p1/v1^g = p2/v2^g:
p2 = p1*pow((v1/v2),g)
#print(p2)
# wkt p1*v1/t1 = p2*v2/t2:
t2 = (p2*v2*t1)/(p1*v1)
constant_c = p1*pow(v1,g)
V_compression = piston_kinematics(bore,stroke,cr,connect_r,180,0)
P_compression = []
for v in V_compression:
P_compression.append(constant_c/pow(v,g))
# State variable at state 3:
# Since it is a constant volume heat addition process:
v3 = v2
# wkt p2*v2/t2 = p3*v3/t3:
p3 = (p2*v2*t3)/(t2*v3)
#print(p3)
constant_d = p3*pow(v3,g)
V_expansion = piston_kinematics(bore,stroke,cr,connect_r,0,180)
P_expansion = []
for u in V_expansion:
P_expansion.append(constant_d/pow(u,g))
# State variable at state 4:
v4 = v1
# wkt p3/v3^g = p4/v4^g:
p4 = p3*pow((v3/v4),g)
#Calling Thermal Efficiency function:
eff = Thermal_eff(C_p,t1,t2,t3,t4)
eff = round(eff,2)
print('The Thermal efficiency is', eff,'%')
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.title('PV Diagram of Otto Cycle')
plt.xlabel('Volume(m^3)')
plt.ylabel('Pressure(Pascal)')
plt.show()
Output:

PV DIAGRAM:

Result and Conclusion:
The Thermal efficiency is found out to be 42.61% and the PV Diagram is plotted.