Project

Efficieny and P-V diagram of Otto cycle

Aim:-The program in Octave which generate pressure versus volume diagrame of otto cycle.

Objective:-

  • calculate values of pressure and volume for the four points.
  • From the value locate that points on P-V diagram.
  • calculate efficiency.

Explaining the program:-

clear all
close all
clc

%Input
k=1.4
t3=2100

%state 1 variables
p1=100000
t1=300

%Engine geometry parameters
bore=0.2
stroke=0.2
con_rod=0.15
cr=8

%Calculating swept volume and clearance volume
swept_volume=(pi/4)*bore^2*stroke
clearance_volume=swept_volume/(cr-1)

v1=swept_volume+clearance_volume
v2=clearance_volume

%state variables at point2
%pressure
%p1v1^k=p2v2^k
p2=p1*cr^k

%temperature at point2
t2=p2*v2*t1/(p1*v1)

constant_c=p1*v1^k;
V_compression=engine_kinematics(bore,stroke,con_rod,cr,180,360);
P_compression=constant_c./(V_compression.^k);


%state variables at point3
%volume at point3
v3=v2
%pressure at point3
p3=p2*t3/t2

%expansion
constant_c=p3*v3^k;
V_expansion=engine_kinematics(bore,stroke,con_rod,cr,0,180);
P_expansion=constant_c./(V_expansion.^k);

%state variables at point4
% Volume
v4=v1

%pressure at point4
p4=p3*(v3/v4)^k

%efficiency
efficiency_otto=1-1/(cr^(k-1))

figure(1)
hold on
plot(v1,p1,'+','color','r')
plot(v2,p2,'+','color','r')
plot(V_compression,P_compression)
plot(v3,p3,'+','color','r')
plot(V_expansion,P_expansion)
plot(v4,p4,'+','color','r')
plot([v2 v3],[p2 p3])
plot([v4 v1],[p4 p1])
xlabel('Volume')
ylabel('Pressure')

To commence with, input parameters are gamma(k)=1.4,pressure and temperature at point1 is 100kPa and 300K respectively,temperature at point3 is 2100K which is the highest temperature,bore diameter is 0.2m,stroke length is 0.2m,connecting rod is 0.15m and compression ratio(cr) for otto cycle is 8.Then, for calculation of swept volume and clearance volume I used equation such as

swept_volume=(pi/4)*bore^2*stroke
clearance_volume=swept_volume/(cr-1) from that volume at point 1 and 2 is calculated.

In the following step,it is require to find the value of pressure at point 2 which is calculate by the formula p2=p1*cr^k and temperature at point2 is calculated by t2=p2*v2*t1/(p1*v1) in the program.Additionaly volume at point 3 is same as of point2 and pressure at point 3 is calculated by p3=p2*t3/t2.Similarly, volume at point 4 is same as that of point1 and pressure at point4 is calculate by the following equation p4=p3*(v3/v4)^k.

For generating graph of P-V diagram it is required to use function operator because of the different values of theta the value corrusponding of volume and pressure is different.for the fuction operator of V in the program is given below.

%function operator is used to take different values of volume to the corrusponding  different values of theta
function[V]=engine_kinematics(bore,stroke,con_rod,cr,start_crank,end_crank)


a=stroke/2;
R=con_rod/a;
% swept volume
v_s=pi/4*bore^2*stroke;
%clearance volume
v_c=v_s/(cr-1);
 
% for taking 100 values of theta
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

%different values of volume to the corrusponding values of theta
V=(1+term1*(term2-term3)).*v_c



end

for calculating different values of volume corrusponding values of theta

V=(1+term1*(term2-term3)).*v_c is used and it produced 100 different values of theta.

In next step,it is require to call a function[V] by writing function V_compression=engine_kinematics(bore,stroke,con_rod,cr,180,360); and engine_kinematics is file name.from, these value find pressure values corrusponding to volume values. It is caluculated by calculating values by constant_c=p1*v1^k. Repeating the above step for taking different values of volume by changing crank rotation angle in volume function and pressure is calculated by calculating constant value(c) by this formula constant_c=p3*v3^k.

efficiency is calculated by,

efficiency_otto=1-1/(cr^(k-1))

Plot the graph by plot operator and for labelling I used xlabel and ylabel.whereas, hold on command is used for superimposing the graph in one figure.

Output graph:-

Conclusion:- efficiency of otto cycle is 56.472% which is calculated by the program and also diagram is generated.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.