Project

Week.2 AIR STANDARD CYCLE

WRITE A PROGRAM FOR OTTO CYCLE AND PLOT PV DIAGRAM:

%v = volume ; p = pressure ; T =  temprature ;
% engine geometric parameters : bore,stroke, connecting_rod,compression ratio,

clear all
close all
clc

% inputs
% v1=v4,v2=v3,p1,p2,T1,T2

p1 = 2021
T1 = 300
gamma = 2
T3 = 600
% engine geometric parameters
bore = 1
stroke = 1
con_rod = 0.5
cr = 10

%calculate swept volume and clearance volume

v_swept = (pi/4)*bore*stroke;
v_clearance = v_swept/(cr-1);


v1 = v_swept+v_clearance
v2 = v_clearance

% we need to find T2,T4,p2,p3,p4
%we need to find p2,t2,here the formula is(p1v1/T1) = (p2v2/T2),but here we
%dont know two values i.e., p2&T2 
%state point 1
% we need find p2 value, then the formula is (p1v1^gamma) =
% (p2v2^gamma),then p2 = p1*(v1/v2)^gamma ;(v1/v2)= cr then; p1*cr^gamma

p2 = p1*cr^gamma
%we know the p2 value then we find T2 value
T2 = p2*v2*T1/p1*v1

% state point 3
v3 = v2
% we need to find p3 then p2v2/T2 = p3v3/T3 ; p3 =p2v2T3/T2v3,here
% v2=v3;p3=p2T3/T2

p3 = p2*T3/T2

% state point 4 
v4 = v1
% we need to find p4, here T4 is not exist because in this point heat/temp
% rejection,then p3v3^gamma = p4v4^gamma; p4 = p3*(v3/v4)^gamma

p4 = p3*(v3/v4)^gamma

plot([v1 v2 v3 v4 v1],[p1 p2 p3 p4 p1],'linewidth',3,'color','b')
grid on
xlabel('volume')
ylabel('pressure')



       

  • WRITE A PROGRAM TO FIND THERMAL EFFICIENCY OF OTTO CYCLE

clear all
close all
clc

% inputs
% v1=v4,v2=v3,p1,p2,T1,T2

p1 = 2021
T1 = 300
gamma = 2
T3 = 600
% engine geometric parameters
bore = 1
stroke = 1
con_rod = 0.5
cr = 10

%calculate swept volume and clearance volume

v_swept = (pi/4)*bore*stroke;
v_clearance = v_swept/(cr-1);


v1 = v_swept+v_clearance
v2 = v_clearance
 
%state point 1
% we need find p2 value, then the formula is (p1v1^gamma) =
% (p2v2^gamma),then p2 = p1*(v1/v2)^gamma ;(v1/v2)= cr then; p1*cr^gamma

p2 = p1*cr^gamma
%we know the p2 value then we find T2 value
T2 = p2*v2*T1/p1*v1

% state point 3
v3 = v2
% we need to find p3 then p2v2/T2 = p3v3/T3 ; p3 =p2v2T3/T2v3,here
% v2=v3;p3=p2T3/T2

p3 = p2*T3/T2

% state point 4 
v4 = v1
% we need to find p4, here T4 is not exist because in this point heat/temp
% rejection,then p3v3^gamma = p4v4^gamma; p4 = p3*(v3/v4)^gamma

p4 = p3*(v3/v4)^gamma

% we need to find the thermal efficiency here (cr=compression ratio=[v1/v2])
cr = (v1/v2)
thrml_eff = 1-(1/cr^(gamma-1))

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.