Week 2 Air standard Cycle
AIM:
Based on the concepts you have learnt during the forward kinematics routine, go ahead and write code that can solve an otto cycle and make plots for it.
Here are the requirements
1. Your code should create a PV diagram
2. You should output the thermal efficiency of the engine
Air Standard Cycle
The addition and rejection of heat is considered to take place with the external reservoir and ideally all the processes are reversible.
The internal combustion engines are considered to be working on the principle of air standard cycles. The two most commonly used air standard cycles are Otto cycle and Diesel cycle. The Otto cycle corresponds to four stroke gasoline or petrol engines also called Spark Ignition (SI) engines. The Diesel cycle corresponds to four stroke Diesel engines also called as Compression Ignition (CI) engines.
Compression Ignition (CI) engines.
Air Standard Efficiency
Otto Cycle consists of two constant volumes and two adiabatic processes. Heat is supplied during the process 2-3 and rejected during the process 4-1
Qa = Heat Supplied during process 2-3 = Cv(T3 – T2)
Vc = Clearance Volume
Vs = Swept and Stroke Volume
rc= compression ratio = V1/V2
Qa = Heat rejected during process 4-1 = Cv(T4– T1)
Air Standard efficiency = (Qa–Qr) / Qa = 1 – Qr / Qa
Process 1-2:
Air is compressed isentropically to 2. Ratio V1 to V2 is called compression ratio donated by rk. Cover is adiabatic. At the end of compression, diabatic cover replaces adiabatic cover.
Process 2-3:
At the end of compression, heat is added at constant volume by bringing a hot body near the cylinder diabatic cover. Heat is added at constant volume and hence pressure and temperature increase. Because the heat is added at constant volume, the cycle is called as Constant Volume Cycle.
Process 3-4:
After heat is added, air expands isentropically to state 4. Here the expansion ratio is given by re = V4/V3. For Otto cycle rk = re. Adiabatic cover is kept during expansion.
Process 4-1:
At the end of isentropic expansion, adiabatic cover is replaced by diabetics cover and the cold body is brought near the cover. Heat is rejected at constant volume thus decreasing the pressure and temperature to initial values.
Thus the cycle is completed.
(a) Thermal Analysis of Cycle:
Programm:
#Otto cycle (Air standard cycle)
import math
import matplotlib.pyplot as plt
#Define the function
def engine_kinematics(bore,stroke,con_rod,cr,start_point_angle,end_point_angle):
"""
Engine Kinematics
"""
#Engine parameters
#crank pin radius
a = stroke/2
R = con_rod/a
#volume computations
v_s = (math.pi/4)*pow(bore,2)*stroke
v_c = v_s/(cr-1)
# To define the starting crank and end crank
sc = math.radians(start_point_angle)
ec = math.radians(end_point_angle)
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
#engine parameter
bore = 0.1
stroke = 0.1
con_rod = 0.2
cr = 12
#volume Cumputation
v_s = (math.pi/4)*pow(bore,2)*stroke
v_c = v_s/(cr-1)
v1 = v_s + v_c
#stage 2
v2 = v_c
p2 = p1*pow(v1,gamma)/pow(v2,gamma)
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))
#stage
v3 = v2
rhs = p2*v2/t2
p3 = rhs*t3/v3
v_expanssion = engine_kinematics(bore,stroke,con_rod,cr,0,180)
constant = p3*pow(v3,gamma)
p_expanssion = []
for v in v_expanssion:
p_expanssion.append(constant/pow(v,gamma))
#stage 4
v4 = v1
p4= p3*pow(v3,gamma)/pow(v4,gamma)
t4 = p4*v4/rhs
plt.plot([v2,v3],[p2,p3])
plt.plot(v_compression,p_compression)
plt.plot(v_expanssion,p_expanssion)
plt.plot([v4,v1],[p4,p1])
plt.show()
#Thermal efficiency
n = 1 - (pow(cr,(1-gamma)))
print (n)
Procedure to write a programm
1) First import the mathematical profile and plot result
2)Then define the function
3)To provide the required input data
4) To provide the for loop command
5)Append command use to continous run the value.
6) According the rquirement to provide the input data
7)use plt.plot commond to plot the graph
8)plt.show command use to show the graph
Result: -
Air Standard Efficiency:
Thermal efficiency = 62.989%
pv diagram
Thermal efficiency of the Otto cycle depends only on the compression ratio and not on the peak temperature T3.