Challenge

Week 2 Air standard Cycle

AIR STANDARD CYCLE

AIM:

From the learning of forward kinematics routine, write a program to solve an otto cycle and make plots for it.

OBJECTIVE:

1.To create a PV diagram

2.Find the output thermal efficiency of the engine.

THEORY:

Assumptions of Air standard cycle

==> Gas should be perfect gas

==> Adiabatic and reversible

==> Cycle considered in closed system with no air leaving or entering in system.

Types of Air Standard Cycle:

1. Otto cycle - Gasoline/Petrol engine

2. Diesel cycle - Diesel engine

3. Dual combustion or semi-diesel cycle - Hybrid otto/diesel

4. Brayton - Gas turbine/Jet engine

OTTO CYCLE:

--Describes functioning of a typical spark ignition piston engine.

--Constant volume cycles

--Gasoline/ Petrol engine

The cycle Contains Mainly four Processes. In the overall cycle, suction and Exhaust are neglected, also power consumption is not considered.
The Ideal Otto cycle consists of the four processes which are as below.

1–2 Reversible Adiabatic compression (Or) Isentropic Compression.
2–3 Constant Volume Heat Addition.
3–4 Reversible Adiabatic Expansion (Or) Isentropic Expansion.
4–1 Constant Volume Heat Rejection.

TERMINOLOGIES:
BDC-Botttom dead centre i.e., Extreme position at the bottom end of the cylinder.

TDC-Top dead centre i.e., Extreme position of the piston at the top end of cylinder.

Compression ratio (cr): It is the ratio of volume before compression to the volume after compression.

Compression ratio (cr) = Volume before compression/volume after compression

also, Compression ratio (cr) = `(Vs+Vc)/(Vc)`

Where:-

V1= volume before compression = V_swept + V_clearance

V2 = volume after compression = V_clearance

Vs = V_swept , Vc = V_clearance

Therefore, Compression ratio (cr) = `(V1)/(V2)`

Expansion ratio (er):- It is the ratio of volume after Expansion to the volume before compression.

Similarly, as the compression ratio, we can get an Expansion ratio.

Therefore, Expansion ratio (er) = `(V4)/(V3)`

Note : for Otto cycle compression Ratio = Expansion ratio i.e (cr=er).

Swept volume and Clearance volume:- Swept Volume (V_s) is a volume Before compression stroke. Also known as stoke volume and Displacement volume. Similarly, Clearance volume (V_c) is a volume after compression stroke.

Swept Volume `V_s = (pi/4)*D²*L`

Clearance volume `V_c = V_s/(cr-1)`

Adiabatic process equation = p⋅vγp⋅vγ = constant,

Ideal Gas equation = `p⋅v=m⋅R⋅T.p⋅v=m⋅R⋅T`

Percentage_Efficiency = `(1-(cr^(gamma-1))^-1)*100`

APPROACHES MADE TO WRITE A PROGRAM:
Otto cycle is an air standard cycle, such that specific heat for air is gamma = 1.4

Initial conditions ,Temperature T1 = 298k , Pressure P1 = 101.325Kpa

From the design of engine cylinder,bore diameter,stroke length, length of connecting rod is known. Then Vs Vc can be calculated.

Maximum temperature T3 occuring inside the cylinder is also known. Adiabatic process and ideal gas equation gives the values of state variables.

Thermal efficiency can be calculated from the formula given.

PROGRAM :

#A Program to calculate different state variables in Otto cycle and calculate its thermal efficiency and plot it in P-V diagram 
import math
import matplotlib.pyplot as plt
import numpy as np

def engine_kinematics(bore,stroke,connecting_rod,cr,start_crank,end_crank):
 #Engine kinematics
 a = stroke/2
 R = connecting_rod/a

 sc = math.radians(start_crank)
 ec = math.radians(end_crank)

 num_values = 100

 theta = np.linspace(sc,ec,num_values)

 v = []
 

 for i in theta:
      term1 = 0.5*(cr-1)
      term2 = R + 1 - math.cos(i)
      term3 = pow(R,2) - pow(math.sin(i),2)
      term3 = pow(term3,0.5)
      v.append((1+term1*(term2 - term3))*v_c)


 return v
 
# inputs
p1 = 101325
t1 = 298
gamma = 1.4
t3 = 2800

# geometric parameters
bore = 0.1
stroke = 0.1
connecting_rod = 0.15
cr = 12

# volume computation
v_s = (math.pi/4)*pow(bore,2)*stroke
v_c = v_s/(cr-1)
v1 = v_s + v_c

v_compression = engine_kinematics(bore,stroke,connecting_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 2
v2 = v_c
# p1*v1^gamma = p2*v2^gamma
rhs = p1*pow(v1,gamma)
p2 = rhs/pow(v2,gamma)
# p1*v1/t1 = p2*v2/t2
rhs = (p1*v1)/t1
t2 = rhs/(p2*v2)

# state point 3
v3 = v2
# p2*v2/t2 = p3*v3/t3
p3 = rhs*t3/v3

v_expansion = engine_kinematics(bore, stroke, connecting_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
# p3*v3^gamma = p4*v4^gamma
rhs = p3*pow(v3,gamma)
p4 = rhs/pow(v4,gamma)
# p3*v3/t3 = p4*v4/t4
rhs = (p3*v3)/t3
t4 = rhs/(p4*v4)

# plot results
plt.plot(v_compression, p_compression)
plt.plot([v2,v3],[p2,p3])
plt.plot(v_expansion,p_expansion)
plt.plot([v1,v4],[p1,p4])
plt.xlabel('Volume(m^3)')
plt.ylabel('Pressure(Pa)')
plt.title('Air standard otto cycle')
plt.savefig('Air standard otto cycle')
plt.grid()
plt.show()

# Thermal Efficiency
therm_eff = 1 - 1/pow(cr,gamma-1)
print('Thermal Efficiency = ' + str(therm_eff))

PLOT OBTAINED :

OUTPUT THERMAL EFFICIENCY:

For Compression ratio = 8.5

Percentage efficiency = 62.98%

CONCLUSION:
The desired PV diagram of otto cycle was obtained and output thermal efficiency of the engine is calculated.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.