Rohit Suresh
unread,Oct 6, 2015, 11:24:13 AM10/6/15You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello,
I need to plot TS and PV diagram for Brayton Cycle.
The following is my code that I used but I'm not sure if I am storing it correctly or not also I'm somehow not able to plot.
The s1 value when computed by using a calculator does not give a negative value but MATLAB does, don't know why?
%T-S and P-V diagrams
close all; clear all; clc;
format long;
cp=1.0045;
r=0.287; %Specific Gas Constant for Dry Air
k=1.4; %Specific Heat Capacity
ta=288.15;% Inlet Temperature (K)
tc=2000:500:4000; %Combustion Temperature (K)
pa=101325 ; %Inlet Pressure ()
s0=0;
for j=1:5; %tc
%Compressor Temperature
tb=(ta*tc(1,j))^0.5;
%Exit Temperature
td=ta*(tc(1,j)/tb);
%Pressure
pb=pa*((tb/ta)^(k/(k-1)));
pc=pb;
pd=(pa/pb)*pc;
% a=tb/ta(1,i);
% b=pb/pa(1,i);
% Entropy calculation
s1=s0+(cp*(log(tb/ta)))-(r*(log(pb/pa)));
s2=s1+(cp*(log(tc(1,j)/tb)))-(r*(log(pc/pb)));
s3=s2+(cp*(log(td/tc(1,j))))-(r*(log(pd/pc)));
store1(1,j)=tb;
store2(1,j)=td;
store3(1,j)=pb;
store4(1,j)=pc;
store5(1,j)=pd;
store6(1,j)=s1;
store7(1,j)=s2;
store8(1,j)=s3;
end