All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Aim : To demonstrate the working of an Otto cycle and write a Matlab code to plot graph of PV diagram & calculate its thermal efficiency Theory : Air standard cycle ( Otto cycle): an Otto cycle is an idealized thermodynamic…
Omkar Kudalkar
updated on 07 Jan 2021
Aim : To demonstrate the working of an Otto cycle and write a Matlab code to plot graph of PV diagram & calculate its thermal efficiency
Theory : Air standard cycle ( Otto cycle): an Otto cycle is an idealized thermodynamic cycle that describe the function of a typical spark plug engine (petrol engine).It is most found in auto mobile engines.
QA=Cv(T3-T2) KJ/KG % mass = 1kg assume
QR=Cv(T4-T1) KJ/KG
WD=QA-QR
WD=Cv[(T3-T2)-(T4-T1)]
nOo=1-T4-T1T3-T2 equation no. 1
T2T1=(V1V2)γ-1=(P2P1)γ-1γ
rc=compressionratio
rc=V1V2=cyl∈dervolumec≤arancevolume
Therfore, T2=T1(rc)γ-1 equation no. 2
( Reversible Isentropic process )
P1〖V1〗γ=P2〖V2〗γ
〖V1〗γ〖V2〗γ=P2P1
Letrc=re=r
Put “T2”&“T3” in equation no. 1
Therefore, 〖n〗Oo=1-1rγ-1
Result if “ r ” compression ratio increases then efficiency of Otto cycle increases.
bore = 0.1
Stroke = 0.1
Con_rod = 0.15
Cr = 12
v_swept = pi/4*bore^2*stroke;
v_clearance = v_swept/(cr-1);
a = stroke/2 | ratio of con_rod to crank pin radius
R = con_rod/a
Formula for How volume inside the combustion chamber is going to change derived from pure geometric reletion
VVc=1+12(cr-1)[R+1-cos〖∅-(R2-sin∅2)12〗]
theta = 0
term 1 = 0.5*(cr-1)
term 2 = R +1 – cosd(theta) |cosd because cos in degree
term 3 = [ R^2 – sind(theta)^2]^0.5
V = [1 + term1*(term2 –term3)]*Vc
Points to remember :-
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
Using the above code we could plot the pv daigram but yet it will not follow the path which it should be,because matlab code is just joining the points of compression, combustion, expansion,exhaust.
where on otherside it should follow th actuall path by taking each stages in account,it could be achieved by determining the constant K.
P_compression*V_compression^gamma =constant_c
P_compression = constant_c./v_compression^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;
From the above code we can determine P_compression and plot it against V_compression to follow the desired path.
Similarly we could determine Expansion stage,and plot V_expansion against P_expansion.
p3 = p2*t3/t2
constant_c = p3*v3^gamma;
V_expansion = engine_kinematics(bore, stroke, con_rod, cr, 180,0);
P_expansion = constant_c./V_expansion.^gamma;
Final plot following desired paths after adding Title & Label is Coded below :-
figure(1)
grid on;
grid minor;
hold on
plot(v1,p1,'color','r','linew',3)
plot(V_compression, P_compression,'linew',3)
plot(v2,p2,'color','b','linew',3)
plot([v2 v3],[p2 p3],'linew',3)
plot(v3,p3,'color','g','linew',3)
plot(V_expansion, P_expansion,'linew',3)
plot(v4,p4,'color','y','linew',3)
plot([v4 v1],[p4 p1],'linew',3)
%Adding the Labels
xlabel('Volume in m^3')
ylabel('Pressure in Pa')
%Adding the Title
title ('PV daigram of an IC engine ');
legend('Compression','Combustion','Expansion','Exhaust');
Output :- The thermal efficiency of the Cycle is given following code as mention below.
%Calculating Thermal Efficiency
thermal_efficiency = 1-1./cr^(gamma-1);
%Print the thermal efficiency
fprintf(['The thermal efficiency of the cycle is : ' num2str(thermal_efficiency)]);
fprintf('n');
Final Matlab Code :-
clear all
close all
clc
%Inputs
gamma = 1.4 ; t3 = 2300
%State variable at point 1
p1 = 101325
t1 = 500
%Engine gometric 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 vairable at state point 2
%p2v2^gamma = p1v1^gamma
%p2 = p1*(cr).^gamma
p2 = p1*(cr).^gamma
%Ideal Gas Law
%p1v1/t1 = p2v2/t2
%t2 = p2v2.*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 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 = engine_kinematics(bore, stroke, con_rod, cr, 180,0);
P_expansion = constant_c./V_expansion.^gamma;
%State variables at state point 4
v4 = v1
%p3v3^gamma = p4v4^gamma | p4 = p3*(v3/v4)^gamma
p4 = p3*(v3/v4)^gamma
figure(1)
grid on;
grid minor;
hold on
plot(v1,p1,'color','r','linew',3)
plot(V_compression, P_compression,'linew',3)
plot(v2,p2,'color','b','linew',3)
plot([v2 v3],[p2 p3],'linew',3)
plot(v3,p3,'color','g','linew',3)
plot(V_expansion, P_expansion,'linew',3)
plot(v4,p4,'color','y','linew',3)
plot([v4 v1],[p4 p1],'linew',3)
%Adding the Labels
xlabel('Volume in m^3')
ylabel('Pressure in Pa')
%Adding the Title
title ('PV daigram of an IC engine ');
legend('Co %Calculating Thermal Efficiency
thermal_efficiency = 1-1./cr^(gamma-1);
%Print the thermal efficiency
fprintf(['The thermal efficiency of the cycle is : ' num2str(thermal_efficiency)]);
fprintf('n');
mpression','Combustion','Expansion','Exhaust');
Conclusion :-
In this Report Otto cycle was studied and was plotted using Matlab,Important insights are obtained on the efficiency and the plotting of the cycle.Matlab is very powerful tool especially when it comes to numerical computing.
REFERENCE :
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Week 1 Understanding Different Battery Chemistry
Abstract: The Lithium-ion battery is one of the most common batteries used in Electric Vehicles (EVs) due to the specific features of high energy density, power density, long life span and environment friendly. With the development of lithium-ion battery technology, different materials have been adopted in the design of…
14 Dec 2021 02:03 AM IST
Week 8 Challenge:Thermal Management
Abstract: Control functionality of modern vehicles is getting more and more complex. Programming complex embedded systems involves reasoning through intricate system interactions along paths between sensors, actuators and control processors. This is a time-consuming and error-prone process. Furthermore, the…
30 Sep 2021 05:06 AM IST
UML (Unified Modeling Language) high-level schematic of a remote controller toy car system.
Abstract: Control functionality of modern vehicles is getting more and more complex. Programming complex embedded systems involves reasoning through intricate system interactions along paths between sensors, actuators and control processors. This is a time-consuming and error-prone process. Furthermore, the resulting…
30 Sep 2021 04:45 AM IST
Explain the cooling technologies of a power converter And Calculation of MOSFET Thermal Resistance and Power Dissipation.
Explain the cooling technologies of a power converter? Abstract: Power electronics devices such as MOSFETs, GTOs, IGBTs, IGCTs etc. are now widely used to efficiently deliver electrical power in home electronics, industrial drives, telecommunication, transport, electric grid and numerous other applications.…
30 Sep 2021 04:41 AM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.