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

168 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Shubham Khatri
Shubham Khatri il 30 Lug 2021
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

Più risposte (1)

Vishal
Vishal il 12 Apr 2024 alle 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])

Categorie

Scopri di più su Thermal Analysis in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by