Report
AIM:
1. Create a PV diagram with writing code .
2. To find Thermal efficiency of an internal combustion engine
Objectives of the project:
To determine PV diagram of Otto cycle and thermal efficiency of the IC engine with the help of coding in Matlab.
Body of the content:
Incase of programming project
clear
close
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 the 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/v2 | 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 variables 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,0,180);
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;
%Thermal efficiency
thermal_efficiency_engine = 100*(1-(1/(cr^(gamma-1))))
figure(1)
hold on
plot(v_compression,P_compression,'LineWidth',3)
plot([v2 v3],[p2 p3],'LineWidth',3)
plot(v_expansion,P_expansion,'LineWidth',3)
plot([v4 v1],[p4 p1],'LineWidth',3)
legend('compression','heat addition','expansion','heat rejection')
xlabel('volume')
ylabel('pressure')
grid on
Incase of simulation project
PV diagram
Conclusion
With the help of Matlab we can find thermal efficiency of an IC engine and can plot the graph of PV diagram of an Otto cycle.

