Project

Air standard Cycle - MATLAB

AIM : To write a code for the PV diagram of an Air Standard Cycle (Otto Cycle), also to calculate the thermal efficiency of the engine.

THEORY :

The air-standard-Otto cycle is the idealized cycle for the spark-ignition internal combustion engines.

This cycle is shown above on p-v and T-s diagrams.

The Otto cycle 1-2-3-4 consists of following four process:

Process 1-2: Reversible adiabatic compression of air.
Process 2-3: Heat addition at constant volume.
Process 3-4: Reversible adiabatic expansion of air.
Process 4-1: Heat rejection at constant volume.

Air standard efficiency = Net work done / net heat added

Geometric Inputs : Bore, Stroke, crank pin radius, connecting rod length, starting angle of the crank and ending angle of the crank.

Volume trace :

Here,

a=stroke/2;
R=cond_rod/a;

MATLAB code :

clear all
close all
clc

%defining engine parametere
bore=0.1
stroke=0.1
cr=12
cond_rod=0.15

%defining state variables
p1=103125
t1=500
gamma=1.4
t3=2300

%1-2 isentopic compression
v_swept=(pi/4)*bore^2*stroke;
v_clearance= v_swept/(cr-1);

v1=v_swept+v_clearance
v2=v_clearance

% to find p2 and t2

p2= p1*(cr)^gamma
t2=p2*v2*t1/(p1*v1)

V_compression=engine_kinematics(bore,stroke,cond_rod,cr,180,0)
c=p1*v1^gamma;     %constant
P_compression=c./(V_compression.^gamma)


% 2-3 constant volume heat addition
v3=v2

p3=(p2*t3)/t2

V_expansion=engine_kinematics(bore,stroke,cond_rod,cr,0,180)
c=p3*v3^gamma;
P_expansion=c./(V_expansion.^gamma)


%3-4 isentropic expansion

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

% To find efficieny
E=1-(t1/t2)

% marking the points
figure(1)
hold on
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('PV-Diagram Otto Cycle')
function [V]=engine_kinematics(bore, stroke, cond_rod, cr, start_crank, end_crank)

a=stroke/2;
R=cond_rod/a;


v_s= (pi/4)*bore^2*stroke;
v_c=v_s/(cr-1);

theta=linspace(start_crank,end_crank,180);

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

end

FIGURE:

From the above figure , the effiiency E is found to be 62.99%

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.