Project

AIR STANDARD CYCLE | OTTO CYCLE & PLOTTING THE p-V diagram

OBJECTIVE:

  • To plot the p-V diagram of the air standard otto cycle by finding out the state variables at each points.
  • Calculate the thermal efficiency of the engine

OTTO CYCLE:

An Otto cycle is a thermodynamic cycle that is used for spark ignition piston engine.
It consists of four processes i.e.

  • Reversible adiabatic (isentropic) compression
  • Constant volume heat addition
  • Reversible adiabatic (isentropic) expansion
  • Constant volume heat rejection

The p-V diagram of the otto cycle is shown below:


Fig 1 – p-V diagram

  • Process 1-2: Reversible adiabatic (isentropic) compression:

In this process the piston moves from BDC (bottom dead centre) to TDC (top dead centre). Air undergoes reversible adiabatic (isentropic) compression.
In this process the pressure increases from p1 to p2 while volume decreases from v1 to v2.

  • Process 2-3: Constant volume heat addition:

In this process the piston stays at TDC for a moment. Heat is added at a constant volume (v2 = v3) from an external heat source. Temperature and pressure rises from t2 to t3 and p2 to p3.

In this process heat supplied = m(t3-t4)

Where is the specific heat supplied at constant volume.

  • Process 3-4: Reversible adiabatic (isentropic) expansion:

Air undergoes reversible adiabatic (isentropic) expansion. Piston is pushed fromm the TDC to BDC. Here, pressure decreases from p3 to p4 volume rises from v3 to v4.

  • Process 4-1: Constant volume heat rejection:

The piston rests at BDC for a moment and heat is rejected at constant volume (v4 = v1). In this process pressure falls from p4 to p1.
The temperature also decreases from t4 to t1.

The above formula has been used to create a
function [V] = engine_kinematics(bore,stroke,con_rod,cr,start_crank,end_crank) which
takes the inputs bore, stroke, connecting rod, compression ratio, start crank angle & end crank angle.
The above inputs are defined in the engine geometric parameters from which swept volume and clearance volume is calculated.

function V = engine_kinematics(bore,stroke,con_rod,cr,start_crank,end_crank)

% a is crank pin radius
%  is the ratio of connecting rod length to crank pin radius

a = stroke/2;
R = con_rod/a;
v_s = (pi/4)*bore^2*stroke
v_c = v_s/(cr -1)

theta = linspace(start_crank,end_crank,100)

% breaking the equation into 3 parts
term1 = 0.5*(cr - 1);
term2 = R + 1 - cosd(theta)
term3 = (R^2 - sind(theta).^2).^0.5

V = (1 + term1*(term2 - term3)).*v_c



The above code is used to create the function for volume V


Fig 2 - Volume equation

The above equation is divided into 3 terms

term1 = 0.5*(cr - 1)
term2 = R + 1 - cosd(theta)
term3 = (R^2 - sind(theta).^2).^0.5

hence V:

V = (1 + term1*(term2 - term3)).*v_c

The code below plot the p-V diagram of the air standard otto cycle by finding out the state variables at each points & along with calculating the thermal efficiency of the engine.

clear all
close all
clc

% Input
gamma = 1.4

% state variables at state point 1
p1 = 101325
t1=500

% engine geometric parameters
bore=0.1;
stroke=0.1;
con_rod=0.15
cr=12;

% Calculating the swept volume and clearance volume
v_swept=(pi/4)*bore^2*stroke;
v_clearance=v_swept/(cr-1);

v1=v_swept + v_clearance
v2=v_clearance

% state variable at state point 2
%p2/p1 = (v1/v2)^gamma but also cr = (v1/v2)^gamma then p2:
p2=p1*(cr^gamma)
% p2v2/t2 = p1v1/t1 then t2=p2*v2*t1/(p1*v1)
t2=p2*v2*t1/(p1*v1)

constant_c= p1*v1^gamma;
V_compression=engine_kinematics(bore,stroke,con_rod,cr,180,0);
p_compression= (constant_c)./(V_compression.^gamma)


% state variable at state point 3
v3=v2
t3=2300
%p3v3/t3 = p2v2/t2 | p3=(p2*t3)/t2
p3=(p2*t3)/t2

constant_c= p3*v3^gamma;
V_expansion=engine_kinematics(bore,stroke,con_rod,cr,180,0);
p_expansion= (constant_c)./(V_expansion.^gamma)


% state variable at state point 4
v4=v1
% p4v4^gamma = p3v3^gamma then p4 = p3*(v3/v4)^gamma
p4 = p3*(v3/v4)^gamma

% Plot
figure(1)
hold on
plot(v1,p1,'*','color','r')
plot(V_compression,p_compression)
plot(v2,p2,'*','color','r')
plot([v2 v3],[p2 p3])
plot(v3,p3,'*','color','r')
plot(V_expansion,p_expansion) 
plot(v4,p4,'*','color','r')
plot([v4 v1],[p4 p1])
xlabel('Volume')
ylabel('Pressure')
grid on
%Thermal efficiency
E=(1-1/(cr^(gamma-1)))




RESULT:


Fig 3 - p-V diagram Otto Cycle

The thermal efficiency has been given by:

E=(1-1/(cr^(gamma-1)))


Fig 4 - thermal efficiency

ERRORS ENCOUNTERED:


Fig 5 - error while multiplying

In line 25 did not give the * sign for multiplying


Fig 6 - error Element-wise multiplication

To multiply the arrays element by element .* Element-wise operation is needed.

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.