Project

Analysis of the Air standard cycle

Aim of the project:- To analyze the otto cycle as an air standard cycle and compute the engine performance in matlab.

Background Knowledge:- The internal combustion thermal engine cycle considered in this project is for a 4 stroke petrol engine working on ideal Otto cycle. The Otto cycle is an air-standard cycle which approximates the processes in petrol engines. When theoretically analyzed, otto cycle is composed of an adiabatic compression process, followed by a combustion process where heat is supplied to the engine charge at constant volume. The latter process is expected to show an important rise in the entropy of the system. After combustion, an adiabatic expansion and a cooling process brings the system back to the initial point of the cycle.

Since ignition in these engines is due to a spark, they are also called spark ignition engines. The parts of the petrol engine can be seen as below,

The four different strokes occuring in petrol engines are:

  1. Suction stroke.
  2. Compression stroke
  3. Working or power or expansion stroke
  4. Exhaust stroke.

The schematic diagram of the 4 stroke petrol engine working on otto cycle can be seen as below,

Suction stroke:- During suction stroke, the piston is moved from the top dead centre to the bottom dead centre by the crank shaft. The crank shaft is revolved either by the momentum of the flywheel or by the electric starting motor. The inlet valve remains open and the exhaust valve is closed during this stroke. The proportionate air-petrol mixture is sucked into the cylinder due to the downward movement of the piston.

Compression stroke:- During compression stroke, the piston moves from bottom dead centre to the top dead centre, thus compressing air petrol mixture. Due to compression, the pressure and temperature are increased. Just before the end of this stroke the spark - plug initiates a spark, which ignites the mixture and combustion takes place at constant volume. Both the inlet and exhaust valves remain closed during this stroke.

Expansion or Power stroke:- The expansion of hot gases exerts a pressure on the piston. Due to this pressure, the piston moves from top dead centre to bottom dead centre and thus the work is obtained in this stroke. Both the inlet and exhaust valves remain closed during this stroke.

Exhaust stroke:- During this stroke, the inlet valve remains closed and the exhaust valve opens. The greater part of the burnt gases escapes because of their own expansion. The piston moves from bottom dead centre to top dead centre and pushes the remaining gases to the atmosphere. When the piston reaches the top dead centre the exhaust valve closes and cycle is completed. The operations are repeated over and over again in running the engine. Thus a four stroke engine completes one working cycle, during this the crank rotate by two revolutions.

The above processes can be shown in a P-V diagram and T-S diagram,

Where,

Process 1—2 is reversible adiabatic or isentropic compression.

Process 2—3 is reversible constant volume heating.

Process 3—4 is reversible adiabatic or isentropic expansion.

Process 4—1 is reversible constant volume heat rejection.

Analysis of otto cycle:-

In an ideal Otto cycle, a fuel/air mixture is compressed adiabatically from a volume V1 to a volume V2 during the compression phase. The gas traces out the line between the points 1 and 2 in the p−V diagram, thus,

and from perfect gas law,

where `r_c` is the compression ratio, V1/V2. The compression is adiabatic because, owing to the rapidity with which it occurs, no heat is exchanged between the interior of the cylinder and the outside. Consequently, the work done is equal to the increase in internal energy of the gas:

At the end of the compression phase, Point 2, a spark ignites the mixture, which, ideally, is assumed to burn instantaneously. Both temperature and pressure rise instantaneously, the latter reaching the value
indicated in Point 3 of the diagram. There is no change in volume during this heat addition or combustion phase. The amount of heat added is,

The behavior during expansion is similar to that during compression:

The useful output of the engine is `W_(3,4)` − `W_(1,2)`, while the energy input is `W_(2,3)`. Hence the efficiency is,

As `r_c^(1−γ) = T_1/T_2`,

Objectives of the project:-

  • To analyze the case study considered in the project and determine all the parameters of different state points.
  • To create a P - V plot using the calculated state points.
  • Understand the relation of engine kinematics with p-v plot.
  • Calculate the efficiency of the thermodynamic cycle.
  • Stimulate the processes occuring in a otto cycle considering the calculated state points.

Tools used:- Matlab

Proccedure:-

Case Study:- The ratio of compression of an engine working on the constant volume cycle is 8.6:1. At the beginning of compression the temperature is 32`°C` or 305 `K` and at the end of heat supply the temperature is 1600 `°C` or 1873 `K`. The index of compression is 1.4. Pressure at the start of the compression stroke is atmospheric. The engine cyclinder bore is 10 cm, stroke length is 10 cm and length of the connecting rod is 15 cm.

The above case study can be visualized in a diagram,

So using the specified parameters in case study, inputs to matlab program is known and the state points can be calculated as below,

State point 1:-

Known parameters,

1. temperature t1,

2. pressure, p1

Calculating the swept volume and clearance volume using the compression ratio we can find volume v1 and v2.

State point 2:-

Using these above parameters the state points 2 parameters are calculated,

1. Using the adiabetic relation, pressure p2 is calculated

2. Using the ideal gas law, temperature t2 is calculated

3. Volume, v2 is calculated before using compression ratio

State point 3:-

1. Volume v3 = v2, because of constant volume heat addition process

2. Using the ideal gas law, the pressure p3 is calculated

State point 4:-

1. Volume v4 = v1, because of constant volume heat rejection process

2. Using adiabetic relation, pressure p4 can be calculated

The matlab program for the above steps of calculating the state points and plotting the same to generate a p-v plot can be written as follows,

The output plot of the same can be seen as,

With the basic knowledge about the p-v plot of an otto cycle, it can be seen the above plot is improper as the isentrophic compression and expansion processes are not linear function. Not only the state points of the otto cycle are sufficient to plot the proper p-v plot as the volume of the cylinder is not just a function of the state points but also a function of degrees of crank angle rotation. Due to which the analysis of kinematic analysis of IC engine piston is required,

The engine parameters can be seen as following,

The volume of the piston cylinder can be determined as a function of crank angle from the compression ratio, the stroke, bore and connecting rod length.

Where:

b = bore

s = stroke

l = connecting rod length

a = crank radius (= ½ s)

theta = crank angle

TDC = top dead center

BDC = bottom dead center

Top dead center refers to the position of the crank shaft at an crank angle of 0o. This position is otherwise known as the clearance volume, Vc. At bottom dead center the crank angle is at 180 o. In this position the cylinder volume is at its maximum, V1. The difference between the maximum and minimum volume, V1- Vc, is defined as the displacement volume, Vd. The displacement volume can also be represented as a function of the bore and stroke:

`V_d = (pi)/4b^2s`

At a given crank angle the volume is given by: `V = Vc + pi/4 b^2x`

Again using geometry, a relationship for x can be developed:

`x = a + l - [(l^2 - a^2 sin(theta)^2)^(1/2) + a cos(theta)]`

The compression ratio is defined as the ratio between the maximum and minimum volume, `r_c = V_1/V_c`, substituting the maximum volume with the displacement volume yields: `r = 1 + V_d/V_c`.

Solving for `V_c` results in: `V_c = V_d/ (r_c-1)`

Rearranging the above equations results in the following relationship for the cylinder volume:

`V = V_d/(r_c - 1) + V_d/2 [1 + R - cos(theta) - (R^2 - sin(theta)^2)^(1/2)]`, where `R = 1/a`

The final form is given as a non-dimensional relationship by dividing both sides of by Vd,

`V /V_d= 1/(r_c - 1) + 1/2 [1 + R - cos(theta) - (R^2 - sin(theta)^2)^(1/2)]`

or can be written as `V /V_c= 1 + 1/2(r_c - 1) [1 + R - cos(theta) - (R^2 - sin(theta)^2)^(1/2)]`

Using the following relation,

An function defintion in a matlab program naming as engine_kinematics can be written to compute the kinematics of engine as,

And the following modified matlab code can be written along with the code for p-v plot as,

Note - Modification 1 and 2 are function call to the function definition engine_kinematics to compute the values of the parameters as function of crank angle rotation,

The output plot of the above code can be seen as below,

For understanding the processes individually, the following plot can be refered as well,

Now, The matlab code for calculation of thermal efficiency of the air standard otto cycle can be written as,

The output of the following code can be seen as below,

To analyze the system further the effect of the change of compression ratio and also the polytrophic index with the engine efficiency can be computed and plotted ,

And the output plot for the same,

Inference:- Engine efficiency working on otto cycle increases with increasing in polytrophic index and also with increase in compression ratio, but also the upper limit of compression ratio is limited due to occurence of knocking in petrol engines.

The snapshot of the workspace for reference of variables can be seen as below,

The variation of engine cylinder volume with crank rotation can be seen as,

The output for the same is,

The code snippet for the entire matlab program can be seen as below,

%Aim of the program is the plot the p-v diagram of otto cycle and find the efficiency of the engine operating on otto cycle

%Data in this program are according to the situation statement given above in the project page and other parameters assumed are geometric parameters

clear all
close all
clc

%inputs 
gamma = 1.4;    %adiabetic constant
t3 = 1873;      %Temperature of the charge at the end of combustion, Kelvin  

%Intial state 1 variables
p1 = 101325;    %Pressure before compression i.e. atmospheric pressure, Pascal
t1 = 305;       %Temperature before compression, Kelvin

%Engine geometric parameters
bore = 0.1;         %Cylinder diameter, metre
stroke = 0.1;       %Piston stroke length, metre
con_rod = 0.15;     %Length of connecting rod, metre
cr = 8.6;           %Compression ratio

%Calculating the swept volume and clearance volume, metre^3
v_swept = (pi/4)*bore^2*stroke;

%cr = {v_swept + v_clearance)/v_clearance 
v_clearance = v_swept/(cr-1);

v1 = v_swept + v_clearance;     %Volume before compression, metre^3
v2 = v_clearance;               %Volume after compression, metre^3
%cr = v1/v2

%State variables at state point 2
%From the adiabetic relation, p1*v1^gamma = p2*v2^gamma
p2 = p1*cr^gamma;

%From ideal gas law, (p1*v1)/t1 = (p2*v2)/t2
t2 = (p2*v2)/((p1*v1)/t1);

constant_c = p1*v1^gamma;
v_compression = engine_kinematics(bore, stroke, con_rod, cr, 180,0);

%As p*v^gamma is equal to constant_c which is a constant for all values of p
%and v, hence we can use this constant_c to find the array of values of
%p_compression
p_compression = constant_c./v_compression.^gamma;  

%State variables at state point 3
v3 = v2;  %Constant volume heat addition process

%From ideal gas law, (p2*v2)/t2 = (p3*v3)/t3
p3 = (p2*v2*t3)/(t2*v3); %v2 = v3

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

%State variables at state point 4
v4 = v1;
%From the adiabetic relation, p3*v3^gamma = p4*v4^gamma
p4 = p3*(v3/v4)^gamma;

%From ideal gas law, (p3*v3)/t3 = (p4*v4)/t4
t4 = (p4*v4)/((p3*v3)/t3);


figure(1)  %creates a new figure window
hold on
plot(v1,p1,'*','color','r')  %plot state points with red markers
plot(v_compression, p_compression,'color','r','linewidth',3)
plot(v2,p2,'*','color','r')
plot([v2 v3],[p2 p3],'color','y','linewidth',3)
plot(v3,p3,'*','color','r')
plot(v_expansion, p_expansion,'color','b','linewidth',3)
plot(v4,p4,'*','color','r')
plot([v4 v1],[p4 p1],'color','y','linewidth',3)
axis([0, 9.5*10^(-4), -0.5, 6*(10^6)])
xlabel('Volume(m^3)')
ylabel('Pressure(Pa)')
grid on

%Calculation of thermal efficiency of the engine
%Method 1
%Efficiency = 1 - (1/cr^(gamma-1)) * 100
Method1_Efficiency = (1 - (1/8.6^(1.4-1)))*100

%Method2
%Efficiency = 1 - ((t4-t1)/(t3-t2)) * 100
Method2_Efficiency = (1 - ((792.0241-305)/(1873-721.2722))) * 100

%Method3
%Efficiency = 1 - (t1/t2) * 100
Method3_Efficiency = (1 - (305/721.2722)) * 100


%To know the effect of change of compression ratio and polytropic constant
%with engine thermal efficiency

%Efficiency = 1 - (1/cr^(n-1)) * 100  %n is the polytrophic index 
n = [1.25, 1.35, 1.4];
cr_1 = linspace(0,15,15);  %For range of compression ratio upto 15 as limit for otto cycle
[e_1] = (1 - (1./cr_1.^(n(1)-1)))*100;
figure(2)
plot(cr_1,e_1,'linewidth',2,'color','b')
axis([0, 15, 0, 100])
text(11.79,46.03,'\leftarrow n = 1.25')
hold on
[e_2] = (1 - (1./cr_1.^(n(2)-1)))*100;
plot(cr_1,e_2,'linewidth',2,'color','r')
axis([0, 15, 0, 100])
text(11.79,57.83,'\leftarrow n = 1.35')
hold on
[e_3] = (1 - (1./cr_1.^(n(3)-1)))*100;
plot(cr_1,e_3,'linewidth',2,'color','y')
axis([0, 15, 0, 100])
text(11.79,62.72,'\leftarrow n = 1.4')
xlabel('Compression ratio')
ylabel('Efficiency')
grid on

The stimulation of processes occurring in an engine that works on Otto cycle based on the above case study can be seen in the movie made in matlab as below,

Conclusion:- The objectives mentioned at the start of this project are thoroughly carried out and the analysis of the air standard cycle is done extensively, which yielded results same as compared to standard expectations of the solution as per the given case study.

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.