Project

program to calculate otto cycle efficiency and to plot PV curve

T1=500;
P1=101325;
gamma=1.4;
T3=2300;
% engine geometric parameter
bore=.1;
stroke=.1;
con_rod=.15;
cr=12;
%calculating swept volume and clearance volume
V_S=.25*pi*bore^2*stroke;
V_C=V_S/(cr-1);
V1=V_S+V_C;
V2=V_C;
V3=V_C;
V4=V1;
P2=P1*(cr)^gamma;
T2=T1*(cr)^(gamma-1);
V_COMP=projecticengine(.1,.1,.15,12,180,0);
CON_T=P1*V1^(gamma);
P_COMP=CON_T./V_COMP.^(gamma);
P3=P2*(T3/T2);
P4=P3*(1/cr)^gamma;
V_EXP=projecticengine(.1,.1,.15,12,0,180);
con_t=P3*V3^(gamma);
P_EXP=con_t./V_EXP.^(gamma);
figure(1)
efficiency=1-1/(cr)^(gamma-1);

hold on
plot(V1,P1,'*','color','r')
plot(V2,P2,'*','color','r')
line([V3 V2],[P3,P2])
plot(V_COMP,P_COMP)
line([V4 V1],[P4 P1])
plot(V3,P3,'*','color','r')
plot(V4,P4,'*','color','r')
plot(V_EXP,P_EXP)
xlabel('volume')
ylabel('pressure')
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.