Challenge

Week 2 Air standard Cycle

AIR STANDARD CYCLE

AIM:Find the thermal efficiency and Pressure-Volume of the diagram of an otto cycle.

PRINCIPLE

In our weekly challenges it is asked to find the thermal efficiency and Pressure-Volume of the diagram of an otto cycle. In the given problem engine specifications are given like

bore length bore=0.1m
compression raio cr=12
Length of connecting rod=con_rod=0.1m
length of stroke =stroke=0.1m
We assume Adiabatic index=gamma= 1.4;

and maximum temperature=t3=2300K

  • Process 1-2: Isentropic compression

We also initialise the initial pressure as p1=101325 Pa

p1=101325

We also initialise the initial temperature t1=500 K

t1=500

After initalising the initial variables we find the swept and clearance volume where swept volume = vs and clearance volume= vc

Swept volume vs=(pi/4)*bore^2*stroke;
Clearance volume = vc=vs/(cr-1);

From the theoritical experience inital volume at the bdc=v1=sume of swept volume and clearance volume

v1=vs+vc;

Volume at the tdc = volume at the clearance volume

v2=vc;

Since we know that the product of pressure of presure and volume exponent adiabatic index is constant thoughout, we find the constant

constant_c1=(p1*v1^gamma);

  • Process 2-3: Constant Volume heat addition

Since we have found the volume at point 2, v2= clearance volume =vc, we find the pressure at point 2. For an isentropic process, p2/p1=(v1/v2)^ gamma. Since we know the compression ratio =12 we can write p2/p1=cr^gamma which can also be written as
p2=p1*cr^gamma. Thus pressure at point 2 = p2

p2=p1*cr^gamma;

Similarly we find the temperature at point 2

t2=(p2*v2*t1)/(p1*v1);

In the theoritical case the volume in the cyclinder varie non linearly. To plot the varialtion of volume and pressure we initialise a function called engine kinematics which descibe the variation of engine volume non linearly. Input parameters of the functions are the bore length , stroke length, connecting rod, staring crank agle,end cank angle. The output of the function will be the Volume at the compreesion stroke for each instant
v_compression=engine_kinematics(bore,stroke,con_rod,cr,180,0);
p_compression=constant_c1./(v_compression.^gamma);

  • Process 3-4: Isentropic compression

Volume at state point 3 = volume at point 2
v3=v2;

Similarly Presure at point 3
p3=p2*t3/t2;

Since we know that the product of pressure of presure and volume exponent adiabatic index is constant thoughout, we find the constant
constant_c2=p3*v3^gamma;

In the theoritical case the volume in the cyclinder varie non linearly. To plot the varialtion of volume and pressure we initialise a function called engine kinematics which descibe the variation of engine volume non linearly. Input parameters of the functions are the bore length , stroke length, connecting rod, staring crank agle,end cank angle. The output of the function will be the Volume at the expansion stroke for each instant


v_expansion=engine_kinematics(bore,stroke,con_rod,cr,0,180);
p_expansion=constant_c2./v_expansion.^gamma;

  • Process 4-1: Constant Volume heat rejection

%state variables at point 4
v4=v1;
p4=p3*(v3/v4)^gamma;

Thermal Efficiency-Thermal efficiency of the otto cycle=1-(1/(compression ratio^gamma-1))

thermal_efficiency= (1-(1/cr^(gamma-1)))*100;

PROGRAM

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
	n=100
	

	sc=math.radians(start_crank)
	ec=math.radians(end_crank)
	dtheta=(ec-sc)/(n-1)
	v=[]
	for i in range(0,n):
		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

bore=0.1
stroke=0.12
con_rod=0.15
cr=12

#INPUTS
p1=101325
t1=500
gamma=1.4
t3=2300
th_eff=(1-1/pow(cr,gamma-1))*100
print(th_eff)
v_s=math.pi/4*pow(bore,2)*stroke
v_c=v_s/(cr-1)
v1=v_s+v_c

#STATE POINTS 2
v2=v_c
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 POINTS 3
v3=v2
rhs=p2*v2/t2
p3=rhs*t3/v3

v_expansion=engine_kinematics(bore,stroke,con_rod,cr,180,0)
constant=p3*pow(v3,gamma)
p_expansion=[]

for v in v_expansion:
	p_expansion.append(constant/pow(v,gamma))

#STATE POINTS 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_expansion,p_expansion)
plt.plot([v4,v1],[p4,p1])
plt.show()
plt.savefig('pvdiagram.png')



RESULTS

PRESSURE-VOLUME OF OTTO CYCLE IS OBTAINED

THERMAL EFFICIENCY=62.989

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.

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.