Project

Modelling of Otto cycle in MATLAB

Aim: - To solve Otto cycle and make plot for it

Objective of project: -

  1. To create a PV diagram
  2. To draw output of thermal efficiency of the engine.
  3. And to study relationship between different parameters

Body of content: -

An Otto cycle is a cycle in which heat addition take place at constant volume process. It consists of two constant volume process and two adiabatic process. This cycle is applied to internal combustion engine, i.e. it is an ideal air standard cycle for the (gasoline) engine, gas engine. Efficiency of Otto cycle is the function of compression ratio only. Thermal efficiency can be increase with increase in compression ratio. i.e. even found through MATLAB program.

Code: -

clear all;
close all;
clc;

%input
gamma=1.4;
t3=2300;

%state variables
p1=101325;
t1=500;

%Engine geometric parameters
bore=0.1;
stroke=0.1;
connecting_rod=0.15;
comp_ratio=12;

%calculating the swept volume and the clearance volume

v_swept= (pi/4)*bore^2*stroke;
v_clearance=v_swept/(comp_ratio-1);

v1=v_swept+v_clearance;
v2=v_clearance;

%state variables at state point 2

%p2v2^gamma=p1v1^gamma
%p2=p1*(comp_ratio)^gamma

p2=p1*(comp_ratio)^gamma;

t2=p2*v2*t1/(p1*v1);

v_compression=engine_kinematics(bore,stroke,connecting_rod,comp_ratio,180,360);
constant_c=p1*v1^gamma;
p_compression=constant_c./v_compression.^gamma

%state variable at point 3

v3=v2;
p3=p2*t3/t2;

v_expansion=engine_kinematics(bore,stroke,connecting_rod,comp_ratio,0,180);
constant_c=p3*v3^gamma;
p_expansion=constant_c./v_expansion.^gamma

%state variable at point 4

v4=v1;
p4=p3*(v3/v4)^gamma

%thermal efficiency of otto cycle

efficiency=(1-(t1/t2))*100

figure(1)
hold on

% plotting pv diagram

plot(v1,p1,'*','color','r')
plot(v_compression,p_compression)
plot(v2,p2,'*','color','r')
plot(v3,p3,'*','color','r')
plot(v_expansion,p_expansion)
plot(v4,p4,'*','color','r')
plot([v2 v3],[p2 p3])
plot([v4 v1],[p4,p1])
xlabel('volume');
ylabel('pressure');
title('OTTO CYCLE');


PV Diagram: -

Coclusion: -Thermal Efficiency increases as compression ratio increases of 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.