How to plot the PV and TS diagram of an Brayton Cycle. I only have Temperature and Pressure values.

조회 수: 185 (최근 30일)
i have Tmin,Tmax,t2,t4 & Pmin, Pmax. How do i find values of S (entropy) and V(volume).
Also how to make a curve plot instead of straight line

채택된 답변

Shubham Khatri
Shubham Khatri 2021년 7월 30일
Hello,
I have written a code which can help you find out the values of p1,p2,p3,p4,v1,v2,v3,v4,t1,t2,t3,t4. I have tried plotting the graph in the end. Please take a look at the values in order to obtain better results.
clc
clear all
%given values
pmin=2;
pmax=4;
tmin=273;
tmax=1000;
gamma=1.4;
m=1;
R=8.3144;
cp=1; %constant pressure air heat capacity
s1=1006; %from the table
%from Brayton cycle
k=gamma;
p1=pmin;
p2=pmax;
t1=tmin;
t3=tmax;
v1=(m*R*t1)/p1;
v2=(p1*(v1^k)/p2)^(-k);
t2= t1*((p2/p1)^((k-1)/k));
p3=p2;
p4=p1;
v3= v2*t3/t2;
t3=v3*t2/v2;
v4=((p3*v3^k)/p4)^-k;
t4=p4*v4/R;
s2=s1;
s3=cp*log(t3/t2)-R*log(v3/v2)+s2;
s4=s3;
%plotting pv
syms p(v)
c=1*8.314*273;
p=c*v^-k;
fplot(p,[v2 v1])
hold on
p=pmax;
plot(p)
xlim([v2 v3])
hold on
c=p1*v1*k;
syms p(v)
p=c*v^-k;
fplot(p,[v3 v4])
hold on
p=pmin;
plot(p)
xlim([v1 v4])
For more information, please take a look at the documentation of fplot and plot.
Hope it helps

추가 답변 (1개)

Vishal
Vishal 2024년 4월 12일 12:09
clc clear all %given values pmin=2; pmax=4; tmin=273; tmax=1000; gamma=1.4; m=1; R=8.3144; cp=1; %constant pressure air heat capacity s1=1006; %from the table %from Brayton cycle k=gamma; p1=pmin; p2=pmax; t1=tmin; t3=tmax; v1=(m*R*t1)/p1; v2=(p1*(v1^k)/p2)^(-k); t2= t1*((p2/p1)^((k-1)/k)); p3=p2; p4=p1; v3= v2*t3/t2; t3=v3*t2/v2; v4=((p3*v3^k)/p4)^-k; t4=p4*v4/R; s2=s1; s3=cp*log(t3/t2)-R*log(v3/v2)+s2; s4=s3;
%plotting pv syms p(v) c=1*8.314*273; p=c*v^-k; fplot(p,[v2 v1]) hold on p=pmax; plot(p) xlim([v2 v3]) hold on c=p1*v1*k; syms p(v) p=c*v^-k; fplot(p,[v3 v4]) hold on p=pmin; plot(p) xlim([v1 v4])

카테고리

Help CenterFile Exchange에서 Thermal Analysis에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by