Project

AIR STANDARD CYCLE (OTTO CYCLE)

AIR STANDARD CYCLE (OTTO CYCLE)

AIM: MATLAB program to create a ‘PV’ diagram of an OTTO CYCLE and to find its THERMAL EFFICIENCY.

THEORY:

  • An Otto cycle is an idealized thermodynamic cycle that describes the functioning of a typical spark ignition piston. It is the thermodynamic cycle most commonly found in automobile engines.
  • Nicholas-A-Otto, a German engineer developed the first successful engine working on this cycle in 1876, So this cycle named as Otto cycle.
  • An Otto cycle consists of four processes: Two isentropic (reversible adiabatic) processes and Two isochoric (constant volume) processes which are:

1-2: Isentropic compression (reversible adiabatic compression)

2-3: Constant volume heat addition

3-4: Isentropic expansion (reversible adiabatic expansion)

4-1: Constant volume heat rejection

AIR STANDARD CYCLE:

GOVERNING EQUATIONS:

For swept volume – `V_s = pi/4 xx (bore)^2 xx stroke`

For clearance volume – `V_c=(Vs)/(cr-1)`

For volume trace – `V/(V_c )=1+ 1/(2 ) (cr-1)×[R+1-cos⁡θ-(R^2-sin^2⁡θ )^(1/2)]`

Or,

`V= V_c {1+ 1/(2 ) (cr-1)×[R+1-cos⁡θ-(R^2-sin^2⁡θ )^(1/2)]}`

Isentropic process equation – `PV^γ` = constant`

Combined gas equation – `(PV)/T` = constant

For Thermal efficiency – `η=1-(V_2/V_1 )^(γ-1)= 1-(V_3/V_4 )^(γ-1)=1- 1/((cr)^(γ-1) )`

where,

cr = compression ratio

R = con_rod/2

a = crank pin radius

`gamma` = specific heat ratio

P = pressure

V = volume

T = temperature

INPUT VALUES:

Engine geometric parameters-

bore = 0.17 m

stroke = 0.17 m

connecting rod = 0.15 m

cr = 6

`gamma`= 1.4 (for air)

State Variables-

P1 = 101325 Pa (1 atm)

T1 = 550 K

T3 = 2300 K

ASSUMPTIONS:

Initial values of pressure (P1) and Temperature(T1) are known.

The Temperature after the Combustion process is also known.

OBJECTIVE:

  1. To create a PV diagram for an Otto Cycle
  2. To find the thermal efficiency of an Otto Cycle

FUNCTION PROGRAM:

function [V] = Engine_kinematics(bore ,stroke ,con_rod ,cr ,start_crank ,end_crank)

% Crank pin radius
a = stroke/2;

R = con_rod/a;

% Swept volume 
v_s = (pi/4)*bore^2*stroke;

% Clearance volume 
v_c = v_s/(cr-1);

% Crank angle
theta = linspace(start_crank,end_crank,100);

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

% Volume trace
V = (1 + term1*(term2 - term3)).*v_c;

end

MAIN PROGRAM:

% A program to create a PV diagram of an OTTO cycle and find the thermal efficiency 
clear all
close all
clc

%Inputs 
gamma = 1.4; % (for air)
t3 = 2300;

%State variables
p1 = 101325;   % pressure at state point 1
t1 = 550;      % temperature at state point 1

%Engine geometric parameters
% Bore dia (in m)
bore = 0.17;

% Stroke length(in m)
stroke = 0.17; 

% Connecting rod(in m)
con_rod = 0.15;

% Compression ratio
cr = 6;

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

v1 = v_swept + v_clearance
v2 = v_clearance

% Isentropic process equation
constant_c = p1*v1^gamma
V_compression = Engine_kinematics(bore ,stroke ,con_rod ,cr,180,0);

P_compression = constant_c./V_compression.^gamma;

% State variables at state point 2
% p2v2^gamma = p1v1^gamma
% p2 = p1*(v1/v2)^gamma = p1*cr^gamma
p2 = p1*cr^gamma;

% Combined gas equation 
% p1v1/t1 = p2v2/t2 | t2 = p2*v2*t1/(p1*v1)
t2 = p2*v2*t1/(p1*v1);



% State variables at state point 3
v3 = v2;

% 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,0,180);

P_expansion = constant_c./V_expansion.^gamma;

% State variables at state point 4
v4 = v1;

% p3v3^gamma = p4v4^gamma | p4 = p3*(v3/v4)^gamma
p4 = p3*(v3/v4)^gamma;
t4 = p4*cr*t3/p3;

% Thermal efficiency
n = (1 - (1/(cr-1)^(gamma - 1)))*100
fprintf('thermal efficiency of otto cycle: %f percent', n)

% Plotting PV Diagram
hold on
plot(v1,p1)
plot(V_compression, P_compression,'color','b')
plot(v2,p2)
plot(v3,p3)
plot([v2,v3],[p2,p3],'color','r')
plot(V_expansion, P_expansion,'color','g')
plot(v4,p4)
plot([v4,v1],[p4,p1],'color','r')
title('PV Diagram (OTTO CYCLE)')
xlabel('VOLUME(m^3)')
ylabel('PRESSURE (Pa)')

grid on

PV DIAGRAM:


OUTPUT:

The thermal efficiency of an OTTO cycle is

`eta` = 47.4694 %

EXPLANATION OF THE CODE:

  1. In the beginning, before starting the main program, a function program is written which contains all the input parameters and the variables under a proper function.

* NOTE: function name and the program name must be same.

  1. Then, come to the main program, here the known values of input, state variables and engine geometric parameters are provided in the beginning.
  2. Thereafter, we write the equations being used during the processes starting from state 1 to state 4.
  3. The function program is called for the states 1-2 and 3-4 because they constitute a different process, i.e., isentropic process.
  4. The combined gas equation and isentropic process equation are used to solve the different states .
  5. After providing the equations, plotting of PV diagram is done followed by the calculation of thermal efficiency.

ERRORS OCCURED:

1. Error thrown in command window as I have forgot to use the elementwise operator after the v_compression, as it is an array.

Steps taken to correct error: By using the dot (.) operator, the error is corrected.

2. Another error is that in the function I have forgot to add the end crank angle.

Steps taken to correct error: It is corrected by providing the end crank angle to it.

3. And some other different errors are including typos.

Steps taken to correct error: Those errors are corrected by checking and reviewing the program.

CONCLUSION: The PV diagram has been plotted using the process equations and the thermal efficiency has been 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.

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.