Week 2.1 - Air standard Cycle
clear all
close all
clc
% inputs which are given
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 = 10; %compression ratio
% calculating the swept volume and clearance volume
v_swept = (pi/4)*bore^2*stroke; % the all value are given so we can find swept volume using formula
v_clearance = v_swept/(cr-1); %the all value are given so we can find clearance volume using formula
v1 = v_swept + v_clearance %which is TDC
v2 = v_clearance %which is BDC
%state variable at state point 2
% p2v2^gamma = p1v1^gamma = constant ,from this we can find p2.
% p2 = p1*(v1/v2)^gamma = p1*(cr)^gamma
p2 = p1*cr^gamma;
%p1v1/t1 = p2v2/t2 | t2 = p2*v2*t1/(p1v1)
t2 = p2*v2*t1/(p1*v1);
constant_c = p1*v1^gamma;
% below equation find out using function command
V_compression = otto_cycle1(bore,stroke,con_rod,cr,180,0);
%in simple word it is work like templete you jst put values in it.
p_compression = constant_c./V_compression.^gamma;
% state variable at state point 3
v3 = v2
%because 2-3 constant volume heat addition process
% so we can use combined gas law
%p3v3/t3 = p2v2/t2 | p3 = p2*v2*t3/(v3*t2)
p3 = p2*v2*t3/(v3*t2);
constant_c = p3*v3^gamma;
V_expanssion = otto_cycle1(bore,stroke,con_rod,cr,0,180);
p_expanssion = constant_c./V_expanssion.^gamma;
% state variable at state point 4
v4 = v1
%p4v4^gamma = p3v3^gamma | p4 = p3*(v3/v4)^gamma
p4 = p3*(v3/v4)^gamma;
% So from this we can find out thermal efficency
thermal_efficency = (1-(1/cr^(gamma-1)))*100
figure(1)
hold on
plot(v1,p1,'*','color','r')
% it shows point 1
plot(V_compression, p_compression)
plot(v2,p2,'*','color','r')
plot([v2,v3],[p2,p3],'color','r')
plot(v3,p3,'*','color','r')
plot( V_expanssion, p_expanssion )
plot(v4,p4,'*','color','r')
plot([v4,v1],[p4,p1],'Color','r')
xlabel('Volume')
ylabel('Pressure')
legend('Isentropic Compression','Const Vol heat add','Isentropivexpansion','Const Vol heat Rejection')
https://drive.google.com/file/d/1KOoqV_ujjBr2bZBtxUrxgXOQY7Oq-z9N/view?usp=sharing