OTTO CYCLE
AIM:
- To Write a program in Matlab to obtain various state point variable and thermal efficiency of the otto cycle.
OBJECTIVES OF THE PROJECT:
- The main objective of this project is to determine pressure,volume and temperature at various points of otto cycle.
- To obtain the thermal efficiency of the otto cycle.
BODY OF THE CONTENT: & EXPLANATION:
- The programming language used here is ‘C’.
- In this gamma (1.4) &T3 are taken initially
- State variable at point 1 are declared.
- The engines geometric parameters (bore, stroke, con_rod & cr ) are assumed.
- Swept volume and clearance volume are calculated by using the cylinder volume formula and clearance volume is derived by dividing swept volume with (compression ratio-1).
- V1=swept volume +clearance volume.
- V2=clearance volume.
- Using the equation p1v1γ=p2v2γ, p2 is calculated.
- T2 is calculated by using t2=p2*v2*t1/(p1*v1).
- Assuming the constant_c= p1v1γ.
- v_compression is calculated by using function engine_kinematics and it is shown below.
- V_compression=engine_kinematics(bore,stroke,con_rod,cr,180,0);
- in this function,the swept volume and clearance volume are calculated and theta value is varied by using linspace command between 0-180 deg(100 values).
- v/vc= 1+5[cr−1][R+1−cosθ−(R2−sin2θ).5]-by using this formula, volumes at different angles are calculated.
- P_compression= constant_c./V_compression.^gamma; using this p_compression value is determined.
- By using the above procedure ,rest of the program was coded and results are calculated
- The thermal efficiency is calculated by using
TE=1−(v2/v1)γ−1;
And the values are plotted by using plot command.
CONCLUSION:
Thus thermal efficiency of the otto cycle is calculated and PV-diagram has been plotted.
MAIN PROGRAM :
clear all
close all
clc
%inputs
gamma=1.4;
t3=2400;
%state 1 variables
p1=101325;
t1=500;
%engine geometric parameters
bore=.1;
stroke=.1;
con_rod=.15;
cr=12;
%calc swept vol and clearance vol
v_sw=(pi/4)*bore^2*stroke;
v_clr=v_sw/(cr-1);
v1=v_sw+v_clr;
v2=v_clr;
%state 2 variables
%p2v2^gamma=p1v1^gamma
p2=p1*cr^gamma;
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;
v3=v2;
%p3v3/t3=p2v2/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 4 variable
v4=v1;
p4=p3*(v3/v4)^gamma;
%thermal efficiency T_E=1-(v2/v1)^(gamma-1)
T_E=1-(v2/v1)^(gamma-1);
figure(1)
hold on
plot(v1,p1,'*','color','r')
plot(V_compression,P_compression)
plot(v2,p2,'*','color','r')
plot([v2 v3],[p2 p3])
plot(v3,p3,'*','color','r')
plot(V_expansion,P_expansion)
plot(v4,p4,'*','color','r')
plot([v4 v1],[p4 p1])
figure(2)
plot([v1 v2 v3 v4 v1],[p1 p2 p3 p4 p1],'color','b')
FUNCTION PROGRAM:
function[V]=engine_kinematics(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
THERMAL EFFICIENCY= 0.6299 (OR) 62.99%.