Project

OTTO CYCLE - PV DIAGRAM AND ITS THERMAL EFFICIENCY

AIM :

To create a PV Diagram for Otto Cycle and also to find out the Thermal Efficiency of the engine.

OBJECTIVE :

By using MATLAB to create a Program for Otto cycle and make plot for it to generate a PV Diagram and also to find the Thermal Efficiency of the engine.

THEORY OF OTTO CYCLE :

An Otto cycle is an idealized thermodynamic cycle that describes the functioning of a typical spark ignition piston engine. Otto cycle is also known as Air Standard Cycle

The Otto cycle is a description of what happens to a mass of gas as it is subjected to changes of pressure, temperature, volume, addition of heat, and removal of heat.

Where,

  • Process (0-1) - Intake Stroke
  • Process (1-2) - Isentropic Compression
  • Process (2-3) - Constant Volume Heat Addition
  • Process (3-4) - Isentropic Expansion
  • Process (4-1) - Constant Volume Heat Rejection
  • Process (1-0) - Exhaust Stroke

Process (0-1) - Intake Stroke:

In Intake Stroke, Piston moves from Top Dead Centre (TDC) to Bottom Dead Centre(BDC) and low pressure has been created and Air-Fuel Mixture in entered into the cylinder through Intake Valve. While during this process Exhaust valve is closed condition.No Heat Interaction in this process.

where,

- Pressure, Temperature remains Constant

- Volume Increases

Process (1-2) - Isentropic Compression (Compression Stroke):

In Isentropic Compression, Piston moves from BDC to TDC, while during this process Piston compresses the Air Fuel Mixture. No Heat Dissipation in this process.

where,

- Pressure and Temperature Increases

- Volume Decreases

Process (2-3) - Constant Volume Heat Addition (Ignition Stroke):

In Ignition Stroke, During Fuel Combustion Piston does not moves, only Combustion process is takes place.

where,

- Pressure and Temperature Increases

- Volume remains Constant

Process (3-4) - Isentropic Expansion:

In Isentropic Expansion, Piston moves from TDC to BDC, while during this process there is no Heat dissipation.

where,

- Pressure and Temperature Decreases

- Volume Increases

Process (4-1) - Constant Volume Heat Rejection:

In this Process,Piston does not moves and Exhaust valve will open, Burnt gases goes through exhaust valve mixed with Atmospheric air and Heat Dissipation occurs.

where,

- Pressure and Temperature Decreases

- Volume remains Constant

Process (1-0) - Exhaust Stroke:

In this Process Burnt gas escapes through exhaust valve.

where,

- Pressure and Temperature remains Constant

- Volume Decreases

PROGRAM FOR CREATING A PV DIAGRAM AND THERMAL EFFICIENCY FOR OTTO CYCLE USING MATLAB :

% A Program for Creating a PV Diagram for OTTO CYCLE
clear all
close all
clc

%Inputs
gamma=1.4;
p1=101325;
t1=500;
t3=2300;
bore=0.25;
stroke=0.32;
c_rd=0.30;
cr=12;

%Swept Volume (v_s)
v_s=(pi/4)*bore^2*stroke
%Clearence Volume (v_c)
v_c=v_s/(cr-1)

%(1-2) - Isentropic Compression
v1=v_s+v_c
v2=v_c

%p1*v1^gamma=p2*v2^gamma
%p2=p1*(v1/v2)^gamma
p2=p1*cr^gamma
%Ideal gas law
%(p1*v1)/t1=(p2*V2)/t2
t2=(p2*v2*t1)/(p1*v1)

constant_c=p1*v1^gamma;
V_compression = Piston_Kinematics(bore,stroke,c_rd,cr,180,0)
P_compression = constant_c./V_compression.^gamma

%(2-3) - Constant Volume Heat Addition
v3=v2
%(p3*v3)/t3=(p2*v2)/t2
p3=(p2*v2*t3)/(t2*v3)

%(3-4) - Isentropic Expansion
constant_e=p3*v3^gamma;
V_expansion = Piston_Kinematics(bore,stroke,c_rd,cr,0,180)
P_expansion = constant_e./V_expansion.^gamma

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

%(4-1) - Constant Volume Heat Rejection

% Thermal Efficiency
     thermal_efficiency = 1- (1/cr^(gamma-1))


figure(1)
hold on
plot(v1,p1,'*','color','r')
plot(V_compression,P_compression,'color','b')
plot(v2,p2,'*','color','r')
line([v2 v3],[p2 p3],'color','b')
plot(v3,p3,'*','color','r')
plot(V_expansion,P_expansion,'color','b')
plot(v4,p4,'*','color','r')
line([v4 v1],[p4 p1],'color','b')
xlabel('Volume')
ylabel('Pressure')
grid on

FUNCTION PROGRAM:

function [V] = Piston_Kinematics(bore,stroke,c_rd,cr,start_crank,end_crank)
%inputs
a=stroke/2;
R=c_rd/a;

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

%(V/v_c) = 1 + 0.5*(cr-1)*[R+1-cosd(theta)-(R^2-sind(theta)^2)^0.5]
theta=linspace(start_crank,end_crank,100)
t1=0.5*(cr-1)
t2=R+1-cosd(theta)
t3=(R^2-sind(theta).^2).^0.5

V=(1+t1*[t2-t3]).*v_c;
end

EXPLANATION OF ABOVE OTTO CYCLE PROGRAM AND FUNCTION PROGRAM:

Step 1 : In a Program giving Input values for engine Geometric Parameters as bore,stroke,connecting rod, compression ratio and pressur(p1),temperature(t1,t3) and assign gamma = 1.4

Step 2 : After giving Inputs we want to calculate Swept Volume (v_s) and Clearence Volume (v_c)

Step 3 : By using Swept Volume (v_s) and Clearence Volume (v_c) we will find the v1 and v2.

Step 4 : In Isentropic Compression stage, In that we know already pv^gamma = Constant, so p1*v1^gamma=p2*v2^gamma by using this we will find the value of p2.

Step 5 : we already know the value for p1,v1,t1,p2,v2 and By using Ideal gas law (p1v1)/t1 = (p2v2)/t2, we can find the value of t2

Step 6 : After finding p1,v1,t1,p2,v2 and t2 values, we want to write a function program to call a value for V_compression to get a exact curve line for a Isentropic Compression.

Step 7 : In a Function Program assign [V] = Piston_Kinematics (bore,stroke,c_rd,cr,start_crank,end_crank).

Step 8 : In this Function Program we want use the geometric formula i.e., (V/v_c) = 1 + 0.5*(cr-1)*[R+1-cosd(theta)-(R^2-sind(theta)^2)^0.5], and split this formula as

t1=0.5*(cr-1)
t2=R+1-cosd(theta)
t3=(R^2-sind(theta).^2).^0.5

Step 9 : R is ratio of Connecting rod and crank pin radius(R=c_rd/a), a is crank pin radius (a=stroke/2).

Step 10: Assign a theta value in a array as theta = linspace (start_crank,end_crank,100)

Step 11 : After finding the R,a values , substitute in the above formula V = (1+t1*[t2-t3]).*v_c and we can get the value for V and function program ends and return to previous Otto cycle program.

Step 12 : In Otto cycle Program V value will store in V_compression = Piston_Kinematics(bore,stroke,c_rd,cr,180,0).

Step 13 : After getting V_compression value, using p1*v1^gamma = constant_c we can find the value of P_compression (P_compression = constant_c./V_compression.^gamma).

Step 14 : In Constant volume Heat Addition stage v3=v2 and by using Ideal gas law (p3v3)/t3 = (p2*v2)/t2 we can find the value of p3.

Step 15 : Next step is Isentropic expansion process, in this stage we want to go to function program to call a value for V_expansion to get another curve line for a Isentropic Expansion.

Step 16 : Get a V value from function program by giving inputs in otto cycle program and get a V value and store in V_expansion [V_expansion = Piston_Kinematics(bore,stroke,c_rd,cr,0,180)]

Step 17 : After getting V_expansion value, using p3*v3^gamma = constant_c we can find the value of P_expansion (P_expansion = constant_c./V_expansion.^gamma).

Step 18 : we know already pv^gamma = Constant, so p3*v3^gamma=p4*v4^gamma by using this we will find the value of p4 and also we know that v1=v4.

Step 19 : By using Thermal Efficiency Formula for Otto Cycle [thermal_efficiency = 1- (1/cr^(gamma-1)] get a value of thermal efficiency of the engine and also by giving a plot command to get a PV diagram in the output

Step 20 : Finally Check the Program without error and run the program to get a output of PV Diagram of Otto Cycle.

OUTPUT OF PV DIAGRAM FOR OTTO CYCLE:

OUTPUT FOR THERMAL EFFICIENCY OF THE ENGINE :

ERROR AND CORRECTIONS :

EXPLANATION FOR ERROR AND CORRECTIONS:

In this above window, error has been occured in P_expansion = constant_e./V_expansion^gamma and it is corrected by P_expansion = constant_e./V_expansion.^gamma. This program is corrected by using a element Operator (.). Whenever we assigning a value in a array we want to put a element operator (.).

CONCLUSION :

Otto Cycle Program has been created using MATLAB and got a output of Thermal Efficiency and also a PV Diagram for 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.