How can I plot the Ph grafic of this thermodynamic cycle?
Show older comments
Hi,
I'm trying to simulate a Heat Pump cycle in Matlab. To calculate the fluid properties, I'm using the coolprop package http://www.coolprop.org/coolprop/wrappers/MATLAB/index.html#matlab.
I need to plot this cycle on a Ph or TS grafic and I don't know how. Can you help me please?
% code
gas = 'CO2';
T1=-5+273.15;
P1=CoolProp.PropsSI('P','T',T1,'Q',1,gas);
h1=CoolProp.PropsSI('H','T',T1,'Q',1,gas);
s1=CoolProp.PropsSI('S','T',T1,'Q',1,gas);
P2=10e6;
beta=P2/P1;
s2is=s1;
h2is=CoolProp.PropsSI('H','P',P2,'S',s2is,gas);
eta_is=0.8;
h2=(h2is-h1)/eta_is+h1;
T2=CoolProp.PropsSI('T','H',h2,'P',P2,gas);
s2=CoolProp.PropsSI('S','H',h2,'P',P2,gas);
T3=20+273.15;
P3=P2;
h3=CoolProp.PropsSI('H','T',T3,'P',P3,gas);
s3=CoolProp.PropsSI('S','T',T3,'P',P3,gas);
s4=s3;
h4=CoolProp.PropsSI('H','S',s4,'P',P1,gas);
T4=CoolProp.PropsSI('T','S',s4,'P',P1,gas);
Q4=CoolProp.PropsSI('Q','S',s4,'P',P1,gas);
COP=(h2-h3)/(h2-h1)
1 Comment
Vishal Varadraj
on 15 Nov 2021
@davide semprini did you manage to plot this data on a p-h diagram yet?
Answers (0)
Categories
Find more on Thermal Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!