Project

Air standard Otto cycle

AIR STANDARD OTTO CYCLE

Abstract:

The main aim of this project is to calculate the thermal efficiency of the Otto cycle and create its PV diagram using Matlab code. Here, while writing the code, assumed that the parameters like air inlet pressure and temperature, the maximum temperature at the end of heat addition were already known.

Working of Otto cycle:

Otto cycle is also called a constant volume cycle where the combustion occurs at constant volume. It has two isentropic processes and two constant volume process.

Process 1 to 2 = Isentropic compression process

Process 2 to 3 = Constant volume heat addition

Process 3 to 4 = Isentropic expansion process

Process 4 to 1 = Constant volume heat rejection

Efficiency of Otto cycle = (1-(1/cr)^(gamma-1))

where, cr = compression ratio

gamma = ratio of specific heats of air

Variation of Volume during compression:

Volume does not vary linearly during the compression and expansion process of the Otto cycle.It is given by:

V = Vc(1+0.5*(cr-1)*(n+1-cos(theta)- (n^2 -(sin(theta))^2)^0.5))

where V = Volume trace

Vc = Clearance volume

cr = compression ratio

n = ratio of connecting rod length to crank length

theta = angle made by crank

MATLAB CODE

%otto cycle simulator

clear all
close all
clc

%variables at state point 1
% Inputs
P1 = 101325; % Inlet pressure at state 1 in pascals
T1 = 450;                  % Inleta air temperature in kelvin
gamma = 1.4;               % Ratio of Cp/Cv

%Geometric parameters
 bore = 0.2;               % bore dia in mts
 stroke = 0.2;             % length of stroke in mts
 connecting_rod = 0.14;    %length of connecting rod in mts
 cr = 11;                  % compression ratio
 
%Calculation of swept volume and clearence volume
vs = (pi*bore^2*stroke)/4; % stroke volume
vc = vs/(cr-1);            % clearence volume

V1 = vs+vc;
V2 = vc;
%variables at state point 2
%Calculation of P2 from P1*V1^gamma = P2*V2^gamma
P2 = P1*(V1/V2)^gamma;      % Pressure at state point 2
T2 = T1*(P2*V2)/(P1*V1);    % Tempreature at state point 2

cnst = P1*V1^gamma;         % COndition for isentropic process

%Function has been called to get the volume of compression w.r.t angle
V_compression = engine_kinematics(bore,stroke,cr,connecting_rod,180,0);
P_compression = cnst./(V_compression.^gamma);



%variables at state point 3
V3 = V2;                    % Volume at end of heat addition
T3 = 2300;                 % Temperature at end of heat addition(given)
P3 = P2*(T3)/(T2);          % Pressure at end of heat addition

%variables at state point 4
V4 = V1;                   % Volume at end of end of expansion
P4 = P3*(V3/V4)^gamma;     % Pressure at end of end of expansion
T4 = T3*(P4*V4)/(P3*V3);   % Temperature at end of end of expansion

cnst = P3*V3^gamma;
V_expansion = engine_kinematics(bore,stroke,cr,connecting_rod,0,180);
P_expansion = cnst./(V_expansion.^gamma);

%Calculation of thermal efficiency
Otto_cycle_efficiency = (1-(1/cr)^(gamma-1))*100

% Plotting of points and processes
figure(1)
hold on
plot(V1,P1,'*','color','r')
plot(V_compression,P_compression,'color','b')
plot(V2,P2,'*','color','r')
plot([V2,V3],[P2,P3],'color','g')
plot(V3,P3,'*','color','r')
plot(V_expansion,P_expansion,'color','r')
plot(V4,P4,'*','color','r')
plot([V4,V1],[P4,P1],'color','y')
xlabel('VOLUME')
ylabel('PRESSURE')

Creation of Function in Matlab to get a profile of the volume of compression:

function [volumetrace] = engine_kinematics(bore,stroke,cr,connecting_rod,start_crank,end_crank)

r = stroke/2;         % Radius of crank
n = connecting_rod/r; % Ratio of connecting rod len. to crank radius

%Calculation of swept volume and clearence volume
vs = (pi*bore^2*stroke)/4;
vc = vs/(cr-1);

theta = linspace(start_crank,end_crank,100);

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

volumetrace = vc*(1+term1*(term2-term3));

end

Steps Involved:

  • Input values like inlet temperature and pressure of air, compression ratio, gamma geometric dimensions like bore diameter, stroke length have been given.
  • Stroke volume and clearance volume have been calculated using geometric dimensions and compression ratio.
  • Now that volume at state points 1 and 2 are determined, the pressure at point 2 is calculated through isentropic condition and the temperature is calculated by ideal gas law equation.
  • Similarly, state variables at state point no.3 and no.4 were determined using the equations. Here as it is a constant volume cycle v2=v3 and v4 = v1.
  • A function has been created to find the volume trace of the piston during compression and expansion. During compression the angle of rotation variates from 180 t0 and vice versa during expansion.
  • Otto cycle efficiency has been calculated using formula (1-(1/cr)^(gamma-1))Plots have been made for all the state points and curves on PV diagram

Result:

Otto cycle efficiency has been calculated and PV diagram has been plotted using Matlab code.

PV plot for Otto cycle:

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.