Project

Engine kinematics and efficiency of an Otto Cycle using MATLAB

AIM: To plot a PV diagram and calculate the efficiency of an Otto Cycle using MATLAB

INTRODUCTION

PV Diagram of an Otto Cycle

An Otto cycle is an idealized thermodynamic cycle that describes the functioning of a typical spark ignition piston engine. It is the thermodynamic cycle most commonly found in automobile engines.

The sub-processes that take place during an Otto cycle are:

  • Process 1-2: Isentropic compression
  • Process 2-3: Constant Volume Heat Addition
  • Process 3-4: Isentropic expansion
  • Process 4-1: Constant Volume Heat Rejection

INPUT:-

1. Temperature(T1) and Pressure(P1) at the beginning of the compression stroke. This usually corresponds to the ambient temperature and pressure.

2. Temeperature(T3) at the end of heat addition/ignition process. This temperature is usually limited by the metallurgical limits of the material used.

3. Specific heat ratio(gamma)

4. Engine geometric parameters like bore diameter,stroke length,connecting rod length and compression ratio.

FORMULA

1)`PV^(gamma)= C`

where

  • P = pressure
  • V = volume
  • `gamma= (Cp)/(Cv)`
  • `Cp`= specific heat(Constant pressure)
  • `Cv`= specific heat(Constant volume)

2)`V /(V c )= 1 + 1 /2 ( C R − 1 ) [ R + 1 − cos ( θ ) − ( R ^2 − ( sin ( θ ) )^ 2 )^0.5]`

where

  • `V` - volume during compression or expansion
  • `Vc` - clearance volume
  • `theta`- crank angle
  • `CR` - compression ratio
  • `R=(CR)/(alpha)`, where `alpha`=crank pin radius

3)`η = 1 − (1/(C R)^( γ − 1))`

where

  • `η` = thermal efficiency

MATLAB CODE

  • User-defined function
function [T P] = adiabatic(v,V,p,t,g)
P = p*((v/V)^g);
T = t*((v/V)^(g-1));
end
  • Main program code
%Design parameters:
%b-bore
%s-stroke
%sr-stroke ratio
%c-connecting rod length
%r-crank radius
%T-crank angle
%vc-clearance volume
%vs-swept volume
%cr-compression ratio

%inputs
sr = 0.5;
cr = 4;
s = 0.07;
b = sr*s;
c = 1.6*s;
r = s/2;
R = c/r;
vs = pi*0.25*s*b^2;
vc = vs/(cr-1);
g=1.4;

%variables
%t(i) temperature at state point i
%p(i) pressue at state point i
%v(i) volume at state point i

%Boundary conditions
%v1 = vs + vc
%v2 = vc
%p1 = 101325 pa
%t1 = 298k
%t3 = 1000k

%state values

%state 1 points
v(1) = vc + vs;
t(1) = 300;
p(1) = 101325;

%state 2 points
v(2) = vc;
[t(2), p(2)] = adiabatic(v(1),v(2),p(1),t(1),g);

%state 3 points
v(3) = v(2);
t(3) = 1200;
p(3) = p(2)*t(3)/t(2);

%state 4 points
v(4) = v(1);
[t(4), p(4)] = adiabatic(v(3),v(4),p(3),t(3),g);

%state 5 points = state 1
v(5) = v(1);
p(5) = p(1);
t(5) = t(1);

%state point plot
hold on
grid on
plot(v,p,'*','color',"blue","linewidth",5)
plot(v,p,'color',"red","linewidth",2)
xlabel('VOLUME')
ylabel('PRESSURE')
title('PV Diagram(OTTO CYCLE)')


%Efficiency
%efficiency = net heat of the process/heat added to the system
%work done = heat added - heat rejected
%efficiency = 1-(heat rejected/heat added)
%heat added = m*cv*(T3-T2)
%heat rejected = m*cv*(T4-T1)
%E = 1 - (t(4)-t(1))/(t(3)-t(2))
%E = 1 - t(1)( t(4)/t(1) - 1 )/t(2)( t(3)/t(2) - 1)
%E = 1 - (t(1)/t(2))*(( t(4)/t(1) - 1 )/( t(3)/t(2) - 1))
%t(4)/t(1) = t(3)/t(2)
E = 1 - (t(1)/t(2));
disp("Efficiency of the Otto Cycle")
disp(E)

RESULTS AND CONCLUSION

i)P-V Diagram

ii)Efficiency

No errors were generated

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.