Project

Otto Cycle using Piston Kinematics

OBJECTIVE

The Air standard cycle of an otto engine is to be calculated and to be plotted by using the piston kinematics in MATLAB

Air standard cycle

The air standard cycles are reference cycles which give an approximation to the performance of an internal combustion engine

Otto Cycle

The Otto cycle of an automobile engine dedscribes the functioning of a typical Spark ignition piston engine.It is the thermodynamic cycle seen in most of the automobile engines

Process

The Otto cycle involves four major process on its path

  • 1-2 Isentropic compression
  • 2-3 Constant volume heat addition
  • 3-4 Isentropic expansion
  • 4-1 Constant volume heat reajection

1-2 Isentropic compression - It is an adiabetic compression in which the piston moves from the bottom dead centre to top dead centre

2-3 Constant volume heat addition - In this the heat gets transferred from the external source to the fluid while the piston is at top dead centre

3-4 Isentropic expansion - It is the adiabetic expansion process and it is also called as the power stroke

4-1 Constant volume heat rejection - The heat gets rejected from the air while the piston is at the bottom dead center

PROGRAM

In this case we are going to use the piston kinematics to determine the volume of the cylinder and so to make the program clear we are gonna write a seperate program which is a function definition program for the piston kinematics calculation

%Program to capture the air standard cycle of an otto engine

clear all
close all
clc

%inputs
gamma = 1.4;

%engine parametrics
bore = 0.1;
stroke = 0.1;
rod_l = 0.15;
cr = 12;

%state variables
p1 = 101325;
t1 = 500;
t3 = 2300;

%swept and clearence volume
sv = pi/4*bore^2*stroke;
cv = sv/(cr-1);

v1 = sv+cv;
v2 = cv;


%State 2 variables p1v1^gamma = p2v2^gamma
p2 = p1*(v1/v2)^gamma;

%temperature p1v1/t1 = p2v2/t2
t2 = (p2*v2*t1)/(p1*v1);

constant = p1 * v1^gamma;

%function call
v_compression = engine_kinematics(bore,stroke,cr,rod_l,180,0)
p_compression = constant./v_compression.^gamma;

%State 3 variables p2v2/t2 = p3v3/t3

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

constant2 = p3 * v3^gamma;


%function call
v_expansion = engine_kinematics(bore,stroke,cr,rod_l,0,180)
p_expansion = constant2./v_expansion.^gamma;

%state 4 variables p3v3^gamma = p4v4^gamma
v4 = v1
p4 = p3*(v3/v4)^gamma

%thermal efficiency
TE = 1 - 1/cr^(gamma-1);

%plotting and curve capture
hold on
plot(v1,p1,'*','color','b')
plot(v_compression,p_compression)
plot(v2,p2,'*','color','b')
line([v2 v3],[p2 p3],'color','b')
plot(v3,p3,'*','color','b')
plot(v_expansion,p_expansion)
line([v4 v1],[p4 p1],'color','b')
plot(v4,p4,'*','color','b')

INPUTS

We can see that there are variables which are assigned with values

  • Engine Parametrics - Which defines the values for bore , stroke , connecting rod and the compression ratio (v1/v2)
  • Initial State variables are assigned with values (p1,t1,t3)

VOLUME

As we need the initial volume at state 1 , the swept volume (the colume through which the piston moves during a stroke) and the clearence volume (the volume contained in the cylinder above the top of the piston, when the piston is in the top dead centre) are calculated.

Swept Volume (sv) = pi/4 * bore^2 * stroke

Clearence volume (cv) = sv / (cr - 1)

From this the volume v1 and v2 are determined

v1 = Swept volume + Clearence volume

v2 = Clearence volume

STATE VARIABLES

The pressure and temeprature for different states are being calculated by using the boyle's law and ideal gas equation

For state 2 , we know that

p1 * v1 ^ gamma = p2 * v2 ^ gamma ( Boyle's law)

Using this relation the pressure p2 can be found

(p1 * v1) / t1 = (p2 * v2) / t2 (Ideal gas equation)

The temperature t2 can be found and hence all the variables for state 2 are found using the equations that are known

By using the same equation we will be able to find all the variables for state 3 and state 4

The thermal efficiency of the Otto cycle is calculated using the formula

Thermal Efficiency (TE) = 1 - 1/(compression ratio)^(gamma-1)

PLOTTING

The final process is to plot all the points in an Pressure - volume graph which tends to the otto cycle

To plot, all the volume and pressure values are being added correspondingly and when the program is runned the final output is shown below

fhgsduferiyherithseuithe;ruityweityaeityy

The next is to connect the points with the curves and so the plot function is used again but the result which we obtain consists of straight line

So we are calculating the volume trace of the otto cycle and we are going to create it as a function and we are using the function call option to avoid confusion

function[volume_trace] = engine_kinematics(bore,stroke,cr,rod_l,start_crank,end_crank)


theta = linspace(start_crank,end_crank,100)

a = stroke/2;
r = rod_l/a;

sv = pi/4*bore^2*stroke;
cv = sv/(cr-1);

part1 = 0.5*(cr-1);
part2 = r+1 - cosd(theta);
part3 = (r^2 - sind(theta).^2).^0.5;

volume_trace = (1+part1*(part2-part3)).*cv;

end


The above code is used for tracing the volume and using this the pressure and volume for both compression and the expansion strokes are computed and with this the otto cycle can be computed

RESULT

Hence by calculating all the parameters using the above program the Otto cycle is plotted and it is shown below

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.