Project

Otto Cycle and Its Thermal Efficiency

OTTO CYCLE

AIM:

To write a Matlab program to plot the Otto cycle and find its thermal efficiency.

GOVERNING EQUATIONS:

Swept Volume, Vs :

`V_s=pi/4xxd^2xxL`

where d=Bore diameter, L=Stroke Length

Compression ratio, rc :

`r_c=(V_s+V_c)/V_c`

where

Vs =Swept Volume

Vc =Clearance Volume

Volume change inside the cylinder due to Isentropic Process:

`V/V_c=1+1/2(r_c-1)[R+1- costheta-sqrt(R^2-sin^2theta)]`

where

rc = Compression ratio

R = ratio of length of connecting rod to crank radius

Θ = Crank angle

Thermal efficiency of Otto cycle:

`eta_(thermal)=[1-(r_c)^(1-gamma)]xx100`

OBJECTIVES:

  • To plot the Pressure Volume diagram (PV Diagram) for the Otto cycle.
  • To determine the thermal efficiency of the cycle

DESCRIPTION:

Otto cycle is a gas power cycle that is used in spark-ignition IC Engines (modern petrol engines). These engines a) ingest a mixture of fuel and air, b) compress it, c) cause it to react, thus effectively adding heat through converting chemical energy into thermal energy, d) expand the combustion products, and then e) eject the combustion products and replace them with a new charge of fuel and air.

The Otto cycle comprises of four processes,

  • Process 1-2 represent the Isentropic compression,
  • Process 2-3 represent Constant Volume Heat addition,
  • Process 3-4 represent Isentropic expansion,
  • Process 4-1 represent the Constant Volume Heat rejection

PROGRAM:

Programming Language used – MATLAB

PV Diagram and Thermal Efficiency:

%To plot the pv diagram in an Otto cycle and to calculate its thermal efficiency
clear all
close all
clc
 
%Inputs
gamma=1.4;
%Maximum temperature at state point 3(K)
t3=2100;
 
%Engine parameters
bore=0.1;
stroke=0.1;
conn_rod=0.15;
cr=12;
 
%At state point 1
%Pressure(Pa)
p1=101325;
%Temperature(K)
t1=400;
 
%Swept and Clearance volume
v_swept=(pi/4)*bore^2*stroke;
v_clearance=v_swept/(cr-1);
v1= v_clearance+v_swept;
v2= v_clearance;
 
%At state point 2
%p2*v2^gamma=p1*v1^gamma, p2=p1*(v1/v2)^gamma, p2=p1*cr^gamma
p2=p1*cr^gamma;
%p1*v1/t1=p2*v2/t2, t2=(p2*v2*t1)/(p1*v1)
t2=(p2*v2*t1)/(p1*v1);
 
%Pressure and Volume during Compression
c=p1*v1^gamma;
v_compression=otto_engparam(bore,stroke,conn_rod,cr,180,0);
p_compression=c./(v_compression.^gamma);
 
%At state point 3
v3=v2;
%p3*v3/t3=p2*v2/t2, p3=(p2*v2*t3)/(t2*v3)
p3=(p2*v2*t3)/(t2*v3);
 
%Pressure and volume during Expansion
c=p3*v3^gamma;
v_expansion=otto_engparam(bore,stroke,conn_rod,cr,180,360);
p_expansion=c./(v_expansion.^gamma);
 
%At state point 4
v4=v1; 
%p3*v3^gamma=p4*v4^gamma, p4=p3*(v3/v4)^gamma,p4=p3*(v2/v1)^gamma
%p4=p3*(1/cr)^gamma
p4=p3*(1/cr)^gamma;
 
%Thermal efficiency, thermal_effi=(1-(cr^(1-gamma)))*100
thermal_effi=(1-(cr^(1-gamma)))*100;
fprintf('Thermal efficiency: %f Percent',thermal_effi);
 
%Plot
hold on
plot(v1,p1,'*','color','r')
plot(v_compression,p_compression,'linewidth',1.5)
plot(v2,p2,'*','color','r')
plot(v3,p3,'*','color','r')
line([v2 v3],[p2 p3],'linewidth',1.5)
plot(v_expansion,p_expansion,'linewidth',1.5)
plot(v4,p4,'*','color','r')
line([v4 v1],[p4 p1],'linewidth',1.5)

Function 'otto_engparam ':

%Function for Engine Parameters
function [V]=otto_engparam(bore,stroke,conn_rod,cr,start_crank,end_crank)
  %Crankpin Radius(r) and Crank Radius(R)
  r=stroke/2;
  R=conn_rod/r;
  
  %Calculating swept volume and clearance volume
  v_swept=(pi/4*bore^2*stroke);
  v_clearance=v_swept/(cr-1);
  
  %Volume Change With 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;
  V=(1+term1*(term2-term3)).*v_clearance;
end

INPUTS:

Initial Pressure, P1=101325 Pa

Initial Temperature, T1=400 K

Maximum Temperature inside the cylinder, T3=2100 K

Engine Parameters:

Bore=0.1 m

Stroke=0.1 m

Length of Connecting rod=0.15 m

Compression ratio=12

OUTPUT:

P-V Diagram for Otto cycle:

Thermal efficiency of Otto cycle:

EXPLANATION:

  • Various inputs like bore diameter, stroke length, compression ratio, and connecting rod length are given and the swept and clearance volume is determined.
  • State variables at point 2 were calculated using the relevant thermodynamic equations.
  • A function ‘otto_engparam’ is created and it determines the volume for varying crank angles during the compression and expansion strokes. (180° to 0° and 0° to 180°, respectively)
  • State variables at points 3 and 4 were calculated and the same function ‘‘otto_engparam’’ is used to determine the pressure and volume values for the process 3-4.
  • Consequently, the pressure and volumes of the four states were plotted and joined.
  • So, a P-V diagram for the Otto cycle is plotted.
  • The thermal efficiency is then calculated by suitable equations

ERRORS:

  • Elementwise operator not used for v_expansion
  • P used in place of p in p4=p3*(1/cr)^gamma;

CONCLUSION:

The P-V diagram of Otto cycle is plotted and its Thermal efficiency is calculated to be 62.98 %.

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.