Professional Documents
Culture Documents
Hazem Tawfeek Yassen Tawfeek .
Hazem Tawfeek Yassen Tawfeek .
Matlab project
Part 1 :
syms r
%Set specific heat values
k1=1.3;
k2=1.4;
k3=1.667;
%Compute Efficiency with multiple specific heat
values
E1 = (1-(1./(r).^(k1-1)))*100;
E2 = (1-(1./(r).^(k2-1)))*100;
E3 = (1-(1./(r).^(k3-1)))*100;
%Plot multiple efficincies on the same figure
ezplot(E1,1,10);
hold on
ezplot(E2,1,10);
hold on
ezplot(E3,1,10);
%Set figure title and labels
xlabel('Compression Ratio');
ylabel('Cycle Efficiency');
title('cycle efficiency as a function of
compression ratio ');
part 2 :
%Set specific heat
k= 1.4;
%Set temperature(1)
T1= 400;
%Set compression ratio
r= 10;
%Compute temperature(3) from temperature ratio
Tratio = 3:0.2:10;
T3 = T1 * Tratio;