Why are values not rotated?
Show older comments
clear all; close all; clc
%conversion constant Celsius-Kelvin
c=273.16;
%load PianoTSacqua.mat non necessario->ho direttamente il grafico
T1= py.CoolProp.CoolProp.PropsSI('T','P',101325,'Q',0,'Water')
T_min=0+c;
T_max=600+c;
T = linspace(T_min,T_max,50000);
P = [0.01 0.1 1 5 30 100 250 500 1000]*10^5;
fh = figure;
for i=1:length (P)
for j=1:length (T)
S(i,j)= py.CoolProp.CoolProp.PropsSI('S','P',P(i),'T',T(j),'Water');
if S(i,j)<0
S(i,j)=NaN;
else
S(i,j)=S(i,j);
end
end
end
curve limite-saturazione costruzione diagramma Entropico
T_crit = py.CoolProp.CoolProp.PropsSI('Tcrit','Water')
P_crit = py.CoolProp.CoolProp.PropsSI('Pcrit','Water')
for j=1:length (T)
if T(j)>=T_min && T(j)<=T_crit;
T_sat(j)=T(j);
sliq(j)= py.CoolProp.CoolProp.PropsSI('S','T',T_sat(j),'Q',0,'Water');
svap(j)= py.CoolProp.CoolProp.PropsSI('S','T',T_sat(j),'Q',1,'Water');
else
T_sat(j)=NaN;
sliq(j)= NaN;
svap(j)= NaN;
end
end
figure(1)
hold on
plot (S,T,'--', 'Color',[17 17 17]/255)
ylim([0 T_max])
xlabel('Entropia (J/(kgK)')
ylabel('Temperatura (K)')
for i=1:length(P)
text(S(i,end), T(end), sprintf('%1.1f MPa', P(i)/10^6, 'Rotation',90))
end
plot(svap,T_sat, 'r-')
plot(sliq,T_sat, 'b-')
ylim([0 873])
save

Accepted Answer
More Answers (0)
Categories
Find more on Graphics Objects 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!