Re: [coolprop-users] Ploting saturation curve in matlab

1,270 views
Skip to first unread message

Ian Bell

unread,
Apr 24, 2015, 11:22:24 AM4/24/15
to Igor Blazinic, coolpro...@googlegroups.com
Hi Igor,

Your best bet is to do something like this (pseudocode):

Ts = linspace(Ttriple, Tcrit)
for (i = 0; i < len(Ts); ++i)
    ps = CoolProp.PropsSI('P','T',Ts[i],'Q',0,'R245fa')
end for

Or use python, these things are trivial in python.  And python is a far better overall programming environment than MATLAB.  Also, it's free.

On Fri, Apr 24, 2015 at 5:39 AM, Igor Blazinic <blazin...@gmail.com> wrote:
I'm working on a student projekt of ORC (organic Rankin cycle).

I don't know how to plot saturation curve in matlab using coolprop.

In a folder that I downloaded, there are not folder "coolprop.plots" or something like that.

Where can I find it, or is there another way to plot saturation curve of some fluid?

Igor

--
You received this message because you are subscribed to the Google Groups "coolprop-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-user...@googlegroups.com.
To post to this group, send email to coolpro...@googlegroups.com.
Visit this group at http://groups.google.com/group/coolprop-users.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

mathieu...@gmail.com

unread,
May 8, 2015, 11:28:57 AM5/8/15
to coolpro...@googlegroups.com, blazin...@gmail.com
Hi,
I succeeded to plot the saturation curve on MATLAB but I just want to know the Tcrit and Ttriple.
I manage to calculate it by this way :

Tcrit=CoolProp.PropsSI('Tcrit',R134a);

The error message is :

Warning: function PropsSI requires at least 6
arguments
??? Error using ==> CoolPropMATLAB_wrap
Failure in function PropsSI.

I don't understand why. Just the fluid is needed to calculate Tcrit.

Thank you

Jorrit Wronski

unread,
May 8, 2015, 1:38:40 PM5/8/15
to mathieu...@gmail.com, coolpro...@googlegroups.com

Hi,

it looks like overloading does not work, try
Tcrit=CoolProp.PropsSI('Tcrit',’’,0,’’,0,’HEOS::R134a’)
and you should be fine.

Jorrit

On 08/05/15 17:24, mathieu...@gmail.com wrote:
> Hi,
> I succeeded to plot the saturation curve, But I juste want to know the
> Tcrit and Ttriple.
> I manage to calculate it by this way :
>
>
> Le vendredi 24 avril 2015 11:22:24 UTC-4, Ian Bell a écrit :
>
> Hi Igor,
>
> Your best bet is to do something like this (pseudocode):
>
> Ts = linspace(Ttriple, Tcrit)
> for (i = 0; i < len(Ts); ++i)
> ps = CoolProp.PropsSI('P','T',Ts[i],'Q',0,'R245fa')
> end for
>
> Or use python, these things are trivial in python. And python is a
> far better overall programming environment than MATLAB. Also, it's
> free.
>
> On Fri, Apr 24, 2015 at 5:39 AM, Igor Blazinic <blazin...@gmail.com
> <javascript:>> wrote:
>
> I'm working on a student projekt of ORC (organic Rankin cycle).
>
> I don't know how to plot saturation curve in matlab using coolprop.
>
> In a folder that I downloaded, there are not folder
> "coolprop.plots" or something like that.
>
> Where can I find it, or is there another way to plot saturation
> curve of some fluid?
>
> Igor
>
--
Jorrit Wronski
DTU Mechanical Engineering

Technical University of Denmark
Department of Mechanical Engineering
Nils Koppels Allé
Building 403 Room 105
2800 Kgs. Lyngby

phone: +45 45 25 41 83
email: jo...@mek.dtu.dk
http://www.mek.dtu.dk/english/Sections/TES
Message has been deleted

Leonardo Otávio

unread,
Jun 15, 2019, 7:59:11 PM6/15/19
to coolprop-users
Hey, could you help me implement this in python? I'm still learing this environment :)


On Friday, April 24, 2015 at 12:22:24 PM UTC-3, Ian Bell wrote:
Hi Igor,

Your best bet is to do something like this (pseudocode):

Ts = linspace(Ttriple, Tcrit)
for (i = 0; i < len(Ts); ++i)
    ps = CoolProp.PropsSI('P','T',Ts[i],'Q',0,'R245fa')
end for

Or use python, these things are trivial in python.  And python is a far better overall programming environment than MATLAB.  Also, it's free.
On Fri, Apr 24, 2015 at 5:39 AM, Igor Blazinic <blazin...@gmail.com> wrote:
I'm working on a student projekt of ORC (organic Rankin cycle).

I don't know how to plot saturation curve in matlab using coolprop.

In a folder that I downloaded, there are not folder "coolprop.plots" or something like that.

Where can I find it, or is there another way to plot saturation curve of some fluid?

Igor

--
You received this message because you are subscribed to the Google Groups "coolprop-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coolpro...@googlegroups.com.

Ian Bell

unread,
Jun 15, 2019, 9:27:48 PM6/15/19
to coolpro...@googlegroups.com
Hopefully this gets you started:

import numpy as np
import CoolProp.CoolProp as CP
import matplotlib.pyplot as plt
fld = 'R245fa'
Ttriple, Tcrit = [CP.PropsSI(fld, k) for k in ['Ttriple','Tcrit']]
Ts = np.linspace(Ttriple, Tcrit)
ps = CP.PropsSI('P','T',Ts,'Q',0,fld)
plt.plot(Ts, ps)
plt.show()

To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-user...@googlegroups.com.

To post to this group, send email to coolpro...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages