GENERATING P-V DIAGRAM AND DETERMINING THE THERMAL EFFICIENCY OF AN OTTO-CYCLE
AIM:
To generate the the P-V DIAGRAM and determine the THEMAL EFFICIENCY of an OTTO CYCLE using MATLAB.
SOFTWARE:
MATLAB.
THESIS:
Otto-Cycle is the basic process of how a 4-Stroke Gasoline powered S.I(Spark Ignition) engine works. 1 power stroke is produced in 2 revolutions of the crankshaft. there are 4 MAIN processes which take place to produce 1 power stroke. Each process is explained in detail below.
PROCESS 0-1 (INTAKE STROKE):
In this process,the piston moves from the TDC(Top Dead Center) to the BDC(Bottom Dead Center) sucking in the Air-Fuel mixture into the combustion chamber from the inlet valve. during this process the intake valve is opened and the exhaust valve remains closed.
PROCESS 1-2 (COMPRESSION STROKE):
In this process, the piston moves from BDC to TDC compressing the Air-Fuel mixture hence resulting in decrease of the volume and an increase in the pressure. this process is an ADIABATIC PROCESS, which means there is not transfer of heat and mass between the surrounding of the system.during this process both the intake and exhaust valves remain closed.
PROCESS 2-3 (IGNITION):
In this process the piston is at TDC and a spark Ignites the compressed Air-Fuel Mixture causing an Explosion in within the combustion chamber. the volume remains constant and heat addition takes place. this process is also called as constant volume heat addition process. during this process both the inlet and exhaust valves remain closed.
PROCESS 3-4 (EXPANSION STROKE):
In this process,the piston is forced to move down due to the exlosion caused in the previous process. this process is also called as an ADIABATIC EXPANSION process since there is no heat or mass transfer between the system and the surroundings. as the piston moves from TDC to BDC, the volume increases and the pressure decreases,simultaneously the exhaust valve opens but the intake valve remains closed.
PROCESS 4-1(HEAT REJECTION):
In this process the heat is rejected as the volume remains constant. this process can also called as Constant volume Heat Rejection Process. the heat is rejected from the Burnt Air-Fuel mixture while the piston is at BDC.
PROCESS 1-0(EXHAUST STROKE):
In this process the piston moves from BDC to TDC while the exhaust valve is open,hence forcing out the burnt exhaust gases through the exhaust valve into the atmosphere.
MATHEMATICAL FORMULAE USED IN THIS PROGRAM:
1 . V/Vc = 1 + 1/2(rc -1)[R+1cos(theta) - (R^2 - sin^2(theta))^1/2]
2 . Swept Volume=(pi/4)*bore^2*stroke
3 . Clearance volume = v_swept/(cr-1)
4 . v1 = swept volume +clearance volume
5 . (p1*v1)/t1=(p2*v2)/t2
6 . compression ratio(rc) = V2/V1
PROGRAM FOR ENGINE KINEMATICS:
This program is called during the execution of the main program to make the program shorter, look cleaner and eliminate the any mistakes during coding.
function [V] = engine_kinematics(bore,stroke,con_rod,cr,start_crank,end_crank)
a=stroke/2;
R=con_rod/a;
v_swept = (pi/4)*bore^2*stroke;
v_clearance = v_swept/(cr-1);
theta = linspace(start_crank,end_crank,100);
term1= 0.5*(cr-1);
term2= R + 1 - cosd(theta);
term3 = (R^2 - sind(theta).^2).^0.5;
V = (1+ term1*(term2-term3)).*v_clearance;
end
PROGRAM TO PLOT THE P-V DIAGRAM AND TO GENERATE THE THERMAL EFFICIENCY OF THE ENGINE:
%otto cycle
clear all
close all
clc
%inputs
gamma=1.4;
t3=2300;
%state variables
p1=101325;
t1=500;
%engine geometric parameters
bore=0.1;
stroke=0.1;
con_rod=0.15;
cr=12;
%calculating the swept volume and clearance volume
v_swept=(pi/4)*bore^2*stroke;
v_clearance = v_swept/(cr-1);
v1 = v_swept + v_clearance;
v2 = v_clearance;
%state variables at state point 2
%p2v2^gamma = p1v1^gamma
%p2=p1*(v1/v2)*gamma = p1*cr^gamma
p2=p1*cr^gamma;
%p1v1/t1=p2v2/t2 | t2=p2*v2*t1/(p1*v1)
t2=(p2*v2*t1)/(p1*v1);
constant_c = p1*v1^gamma;
V_compression = engine_kinematics(bore,stroke,con_rod,cr,180,0);
P_compression = constant_c./V_compression.^gamma;
%state varible at point 3
v3=v2;
%p3v3/t3=p2v2/t2 | p3=p2*t3/t2
p3 = p2*(t3/t2);
constant_c = p3*v3^gamma;
V_expansion = engine_kinematics(bore,stroke,con_rod,cr,0,180);
P_expansion = constant_c./V_expansion.^gamma;
%state variable at point 4
v4=v1;
%p3v3^gamma = p4v4^gamma | p4 = p3(v3/v4)*gamma
p4 = p3*(v3/v4)^gamma;
%thermal efficiency of the engine
thermal_efficiency = 1 - (1/(cr^(gamma-1)))
thermal_efficiency_percentage = thermal_efficiency * 100
figure(1)
hold on
plot(v1,p1,'*','color','r')
plot(V_compression,P_compression,'color','g')
plot(v2,p2,'*','color','r')
plot([v2 v3],[p2 p3],'color','r')
plot(v3,p3,'*','color','r')
plot(V_expansion,P_expansion,'color','y')
plot(v4,p4,'*','color','r')
plot([v4 v1],[p4 p1],'color','b')
OUTPUTS:
The P-V diagram of the OTTO CYCLE:
The THERMAL EFFICIENCY of the OTTO CYCLE: