Abhishek S. Jadhav
- Aim- To write MATLAB program for calculating air standard cycle efficinacy of Otto cycle & plot P-V diagram.
- Otto Cycle
fig. 1- P-V diagram of ottto cycle
Process 1-2 :- Represent iscentropic compression of the air when the piston moves from BDC to TDC
Process 2-3 :- Heat is supplied reversibly at constant volume. This process corresponds to spark ignite at & combustion in the actual engine.
Process 3-4 & 4-1 :- Represent isentrpic expansion & constant volume heat rejection respectively.
Parameter at state 1
`V=V_s+V_c`
Where,
`V_s=` Swept volume`
`V_c=` clearance volume`
`V_2=` Clearance Volume
Parameter at state 2
`(P_2×V_2 )^γ=(P_1×V_1 )^γ`
`P_2=P_1×(V_1/V_2 )^γ`
`P_2=P_1×(C_r )^γ`
Where,
`C_r=` Compression ratio
`T_2=(P_2×V_2)/(P_1×V_1 )`
Parameter at state 3
`V_3=V_2`
`(P_3×V_3)/T_3 =(P_2×V_2)/T_2`
`P_3=P_2/(T_3 ×T_2 )`
Parameters for State Point 4
`V_4=V_1`
`P_4=P_3×(V_3/V_4 )^γ`
- The thermal efficiency of otto cycle can be written as
`η_otto=(Q_s-Q_s)/Q_s ….(1)`
Considering constant volume process 2 to process 3 & process 4 to process 1, the heat supplied & rejected of air can be written as
`Q_s=mC_v (T_3-T_2 ) ….(2)`
`Q_R=mC_v (T_4-T_1 ) ….(3)`
`η_otto=(m(T_3-T_2 ) -m(T_4-T_1 ))/m(T_3-T_2 ) ….(4)`
`=1-(T_4-T_1)/(T_3-T_2 ) ….(5)`
Considering isentropic process process 1 to process 2 & process 3 to process 4, we have
`T_2/T_1 =(V_1/V_2 )^((γ-1)) ….(6)`
and
`T_3/T_4 =(V_4/V_3 )^((γ-1)) ….(7)`
But the volume ratio `V_1/V_2` & `V_4/V_3` are equal to the compression ratio, r
Therefore,
`V_1/V_2 =V_4/V_3 =r ….(8)`
Therefore,
`T_2/T_1 =T_3/T_4 ….(9)`
From equation (9), it can be easily show that
`T_4/T_3 =T_1/T_2 =(T_4-T_1)/(T_3-T_2 ) ….(10)`
`η_otto=1-T_1/T_2 ….(11)`
`=1-1/(V_1/V_2 )^((γ-1) ) ….(12)`
`=1-1/r^((γ-1)) ….(13)`
`%η_th=(1-1/r^((γ-1)) )×100`....percentage thermal efficiancy
Given data:-
bore=0.1;
stroke= 0.1;
con_rod=0.5;
cr=12;
- MATLAB program is divided in two part as following
1. Main program
2. Engine kinematics program
1. Main program:- In this program we take input data from 'Engine kinematics program'. Then we calculating the thremal efficiany of otto cycle & plotting graph i.e P-V diagram of otto cycle.
a) Program-
%Otto cycle main program
clear all
close all
clc
%input
gamma = 1.4
t3=2300
%state variable
p1= 101325
t1=500
%Engine geometric parameter
bore=0.1;
stroke= 0.1;
con_rod=0.5;
cr=12;
%Calculating the swept volume & clearance volume
v_swept=(pi/4)*bore^2*stroke;
v_clearance=v_swept/(cr-1);
v1=v_swept+v_clearance
v2=v_clearance
%State variable 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=EK(bore, stroke, con_rod, cr, 180, 0);
P_compression = constant_c./V_compression.^gamma;
%state variable at state point 3
v3= v2
%p3v3/t3=p2v2/t2 | p3=p2*t3/t2
p3= p2*t3/t2
constant_c=p3*v3^gamma;
V_expansion=EK(bore, stroke, con_rod, cr, 0, 180);
P_expansion = constant_c./V_expansion.^gamma;
%state variable at state point 4
v4=v1
%p3v3^gamma=p4v4 | p4=p3(v3/v4)^gamma
p4=p3*(v3/v4)^gamma
figure(1)
hold on
plot(v1,p1,'*','color','r')
plot(V_compression, P_compression)
plot([v1,v4],[p1,p4])
plot(v2,p2,'*','color','r')
plot(v3,p3,'*','color','r')
plot(V_expansion, P_expansion)
plot([v2,v3],[p2,p3])
plot(v4,p4,'*','color','r')
%Thermal efficiacy=1-((v1/v2)^(gamma-1))
thermal_efficiacy_p1=1/(v1/v2)^(gamma-1)
thermal_efficiacy_p2=1-thermal_efficiacy_p1
thermal_efficiacy_p3=thermal_efficiacy_p2*100
xlabel('Volume')
ylabel('Pressure')
b) Screenshot of program & output-
c) Plotted graph-
2. Engine kinematics program:-In this program taking input of engine geometry data from user like bore diameter, stroke length, connecting rod length, compression ratio, starting crank angle, end crank angle, then we calculating total volume.
a) Program-
function [V]= EK(bore, stroke, con_rod, cr, start_crank, end_crank)
a= stroke/2;
R=con_rod/a;
v_s= pi/4*bore^2*stroke;
v_c= v_s/(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_c;
end
b) Screenshot of program & output-
- Conclusion:- On the basisi of calculation of efficiancy of otto cycle state that, gases who has higher value of `γ` (gamm) the higher the efficiancy.