TO PLOT "P-V DIAGRM" FOR AN OTTO CYCLE AND ALSO CALCULATE THERMAL EFFICIENCY USING MATLAB .
AIM:- To Plot "P-V Diagrm" for an Otto Cycle and also Find out its Thermal Efficiency using MATLAB .
THEORY:-
The Otto cycle is the standard cycle of the SI engine. It is an idealized thermodynamic cycle most commonly used in Automobile Engine. It consist of various process as shown below-
Process 0-1 :- Intake. –The inlet valve is open, the piston moves to the BDC, admitting fuel-air mixture into the cylinder at constant pressure.
Process 1-2 :- Isentropic compression.- Both valves are closed, the piston compress the combustible mixture to the minimum volume i.e., piston moves from BDC to TDC.
Process 2-3 :- Constant volume heat addition/Combustion.-The mixture is then ignited by means of a spark, and there is an increase in temperature and pressure.
Process 3-4 :- Isentropic expansion.-The products of combustion do work on the piston which moves to the BDC, and pressure and temperature of gases decrease.
Process 4-1 :- Constant volume heat rejection/Blow-down.-The exhaust valve opens, the drops to the initial pressure.
Process 1-0 :- Exhaust.- With the exhaust valve open, the piston moves towards TDC to expel the combustion products from cylinder at constant pressure.
where,
TDC – Top Dead Centre
BDC – Bottom Dead Centre
GOVERNING EQUATIONS:-
For Swept Volume (Vs) calculation-
`V_s=π/4×〖bore〗^2×stroke`
For Clearance Volume (Vc) calculation-
`V_c=V_s/((cr-1))`
Volume at state point 1-
`V_1=V_s+V_c`
Volume at state point 2-
`V_2=V_c`
Isentropic process equation-
`PV^γ=constant`
Combined Gas equation-
`PV/T=constant`
For Volume Trace Calculation-
`V/V_c =1+1/2 (cr-1)[R+1-cosθ-(R^2-〖sin〗^2 θ)^(1/2) ]`
For Thermal efficiency calculation(`n_o`)-
`n_o=1-1/〖cr〗^((γ-1))`
OBJECTIVES:-
- To plot P-V Diagram of an OTTO Cycle using MATLAB.
- To determine its thermal efficiency.
ASSUMPTIONS:-
Air standard assumption
- Air is only a working fluid. Since air is perfect gas so it follows ideal gas equation.
- Cp ,Cv and are constant.
- Internal combustion is assumed to be heat addition process from an external source.
- The exhaust process is assumed to be heat rejection process without mass transfer.
INPUT DATA:-
STATE VARIABLES
P1=101325Pa=1atm
T1=310K
T3=2000K
ENGINE GEOMETRIC PARAMETERS
bore=0.1m
stroke=0.1m
con_rod=0.15m
cr=10
`γ`=1.4 (for air)
FUNCTION PROGRAM:
function [v]= engine_kinematics(bore,stroke,con_rod,cr,start_crank,end_crank)
%Crank radius
a=stroke/2;
R=con_rod/a;
%Swept volume
v_s=pi/4*bore^2*stroke;
%clearance volume
v_c=v_s/(cr-1);
%Array of crank angleover which graph is plotted
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;
%Volume trace equation
v=(1+term1*(term2-term3)).*v_c;
end
MAIN PROGRAM:
clear all
close all
clc
% Inputs
gama=1.4;
t3=2000; %Tempetature in Kelvin(K)
% State variables
p1=101325; %Pressure in Pascal(Pa)
t1=310;
% Engine geometric parameters (bore,stroke,con_rod in meter(m)
bore=0.1;
stroke=0.1;
con_rod=0.15;
cr=10;
% Calculating the swept volume & clearance volume
v_s=(pi/4)*bore^2*stroke;
v_c=v_s/(cr-1);
v1=v_s+v_c;
v2=v_c;
% State variables at state point 2
% p2v2^gama=p1v1^gama | Isentropic Equation
% p2=p1*(v1/v2)^gama=p1*cr^gama
p2=p1*cr^gama;
% p1v1/t1=p2v2 | t2=p2*v2*t1/(p1*v1) | Combined Gas Equation
t2=p2*v2*t1/(p1*v1);
const_c=p1*v1^gama;
% Calculating values of v_compression by calling function engine_kinematics
v_compression=engine_kinematics(bore,stroke,con_rod,cr,180,0);
p_compression=const_c./v_compression.^gama; %Using Element operator because v_compression is an array
%state variable at state point 3
v3=v2;
%p3v3/t3=p2v2/t2 | p3=p2*t3/t2
p3=p2*t3/t2;
const_c=p3*v2^gama;
% Calculating values of v_expansion by calling function engine_kinematics
v_expansion= engine_kinematics(bore,stroke,con_rod,cr,0,180);
p_expansion=const_c./v_expansion.^gama; %Using Element operator because v_expansion is an array
%state variable at syate point 4
v4=v1;
% p3v3^gama=p4v4^gama | p4=p3*(v3/v4)^gama
p4=p3*(v3/v4)^gama;
%Plotting P-V Diagram
figure(1)
hold on
plot(v1,p1,'*','color','r')
plot(v_compression,p_compression,'linewidth',2,'color','b')
plot(v2,p2,'*','color','r')
plot(v3,p3,'*','color','r')
plot(v_expansion,p_expansion,'linewidth',2,'color','b')
plot(v4,p4,'*','color','r')
plot([v2 v3],[p2 p3],'linewidth',2)
plot([v4 v1],[p4 p1],'linewidth',2)
% To Plot Suction and Exhaust
v0=v2;
p0=p1;
plot([v0 v1],[p0 p1],'linewidth',2,'color','g')
title('P-V DIAGRAM of OTTO Cycle')
xlabel('Volume')
ylabel('Pressure')
% To calculate Thermal eficiency
thermal_efficiency=1-(1/(cr^(gama-1)))
thermal_efficiency_percentage=thermal_efficiency*100;
fprintf('Thermal efficiency of OTTO Cycle is %f percent',thermal_efficiency_percentage)
EXPLANATION OF PROGRAM:
- Function Program
- In this program we have create a function covering all the parameters and variables. Program should be saved as the name of function.
- Then we make an array of crank angle by using linspace command.
- Then we calculate the volume trace.
- And at last end the function program by using end command.
- Main Program
- In this program we have to give all input data.
- Then calculate clearance volume, swept volume, V1,V2.
- By using isentropic equation we can calculate P2 and by using combined gas equation we can calculate T2.
- Calculate constant c by using isentropic equation.
- Now by calling function program we calculate v_compression array. And from this v_compression and constant c we calculate p_compression.
- Now calculate P3 by using combined gas equation and constant c by using isentropic equation.
- Again by calling function program we calculate v_expansion And from this v_expantion and constant c we calculate v_expantion.
- Now by using plot command we create P-V Diagram and give the title of P-V Diagram by using title command.
- Now we calculate thermal efficieny.
- To print thermal efficiency along with text written we use fprintf command.
P-V DIAGRAM:
OUTPUT:
CONCLUSION:
The P-V Diagram has been plotted and the thermal efficiency has been calculated. The thermal efficiency increases with increase in value of compression ratio to a considerable extent.