Week 2 Air standard Cycle
AIM: Write a programme for AIR STANDARD CYCLE
OBJECTION: The Otto cycle is an air-standard cycle which approximates the processes in petrol or diesel engines. It is based on constant volume heat addition (combustion) and heat rejection processes, and isentropic compression and expansion.
BODY :
import math
import matplotlib.pyplot as plt
def engine_kinematics(bore,stroke,con_rod,cr,start_crank,end_crank):
a = stroke/2
R = con_rod/a
#volume parameters
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(R,2)-pow(math.sin(theta),2)
term3 = pow(term3,0.5)
V.append((1+term1*(term2 - term3))*V_C)
return V
#inputs
p1 = 101325
t1 = 500
gamma = 1.4
t3 = 2300
# geometric parameter
bore = 0.1
stroke = 0.1
con_rod = 0.15
cr = 12
# volume computation
V_S = (math.pi/4)*pow(bore,2)*stroke
V_C = V_S/(cr-1)
V1 = V_C +V_S
#state point 2
V2 = V_C
#p2v2 ^gamma = p1v1^gamma
p2 = p1*pow(V1,gamma)/pow(V2,gamma)
#p2v2/t2 = p1v1/t1 !rhs = p1v1/t1 ! p2v2/t2 = rhs | t2 = p2v2/rhs
rhs = p1*V1/t1
t2 = p2*V2/rhs
V_compression = engine_kinematics(bore,stroke,con_rod,cr,180,0)
constant = p1*pow(V1,gamma)
P_compression = []
for v in V_compression:
P_compression.append(constant/pow(v,gamma))
#state point 3
V3 = V2
rhs = p2*V2/t2
p3 = rhs*t3/V3
V_expansion = engine_kinematics(bore,stroke,con_rod,cr,0,180)
constant = p3*pow(V3,gamma)
P_expansion = []
for v in V_expansion:
P_expansion.append(constant/pow(v,gamma))
#state point 4
V4 = V1
#p4v4^gamma = p3v3^gamma
p4 = p3*pow(V3,gamma)/pow(V4,gamma)
#p4v4/t4 = rhs
t4 = p4*V4/rhs
efficency = abs( 1-(1/pow(cr,(gamma-1)))*100)
print(efficiency)
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.show()
STEPS TAKEN WRITE A PROGRAMME
- First, we have to define the essential value in a initial state. so define p1,t1,gamma,bore stroke,con_rod,cr.
- Calculate the swept volume and clearance volume
- Then use ideal gas law PV = constant according to this Temperature is constant.
- According to this p1v1^gamma = p2v2^gamma. By using this law we calculate the p2, v2,p3,p4,v3,v4.
- Here we use a function called engine_kinematics. With the help of we call value.
- In the function, we use a formula for calculating array volume.
- Here we also use linspace command for different value of theta.
- We take value different position for theta.
- Then we have plot have to plot two graphs, one is for compression and expansion, and other one is for plot a simple graph b/w PV
- Then we write a formula for calculating the thermal efficiency.
PLOT
RESULT
CONCLUSION:
The combustion process is idealized by a constant-volume process (SI cycle), a constant-pressure process (CI cycle), or a combination of both (CI Dual cycle).
Exhaust blow down is approximated by a constant-volume process.
All processes are considered reversible.