Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liquid and vapor saturation pressures are not the same for some fluids #364

Closed
ChenYuChih opened this issue Dec 20, 2014 · 8 comments
Closed
Labels
Milestone

Comments

@ChenYuChih
Copy link

Hello Mr. Bell,

Recently I began to do some detailed test the functions of CoolProp v5. I found that PropsSI("P","T",373,"Q",0,"R134a") is not equal to PropsSI("P","T",373,"Q",1,"R134a").

I know this condition is near critical area, but this problem gradually starts since T=358K.

I think this might also happen to other azeotropic fluids. Is it possible to be fixed?

Thank you very much!

Best Regards,
ChenYuChih(David Chen)

@ibell
Copy link
Contributor

ibell commented Dec 20, 2014

That is a bug. I haven't the foggiest idea why you see this behavior, but
we will fix it ASAP

In [1]: import CoolProp

In [2]: CoolProp.CoolProp.PropsSI('R134a','Tcrit')
Out[2]: 374.21

In [3]: CoolProp.CoolProp.PropsSI('P','T',373.5,'Q',0,'R134a')
Out[3]: 4000617.6959242234

In [4]: CoolProp.CoolProp.PropsSI('P','T',373.5,'Q',1,'R134a')
Out[4]: 4004895.7657442535

On Fri, Dec 19, 2014 at 9:34 PM, ChenYuChih notifications@github.com
wrote:

Hello Mr. Bell,

Recently I began to do some detailed test the functions of CoolProp v5. I
found that PropsSI("P","T",373,"Q",0,"R134a") is not equal to
PropsSI("P","T",373,"Q",1,"R134a").

I know this condition is near critical area, but this problem gradually
starts since T=358K.

I think this might also happen to other azeotropic fluids. Is it possible
to be fixed?

Thank you very much!

Best Regards,
ChenYuChih(David Chen)


Reply to this email directly or view it on GitHub
#364.

@jowr jowr added the bug label Dec 22, 2014
@ibell
Copy link
Contributor

ibell commented Dec 22, 2014

Well, I think this might be an artifact of our solver method. For pure fluids, in the iterative solver we get liquid and vapor pressures and stop when they are close enough to each other. Perhaps the best would be just to always return the mean pressure (between liquid and vapor) to remove this question.

That said, R134a is a problematic fluid since its EOS has two critical points, and also uses a different reducing state than the critical state. I'll make the change to make it more clear.

@ChenYuChih
Copy link
Author

Is it possible to use the same equation for T-P saturation curve of dew&bubble point on azeotropic fluids?

@ibell
Copy link
Contributor

ibell commented Dec 23, 2014

No, you have to use the Maxwell criteria of equal pressure and equal Gibbs
function and iterate to get densities of liquid and vapor. For
pseudo-pure, the situation is different.
On Dec 23, 2014 2:57 AM, "ChenYuChih" notifications@github.com wrote:

Is it possible to use the same equation for T-P saturation curve of
dew&bubble point on azeotropic fluids?


Reply to this email directly or view it on GitHub
#364 (comment).

@ibell ibell changed the title The problem of saturation T-P for some azeotropic fluids Liquid and vapor saturation pressures are not the same for some fluids Dec 24, 2014
@ibell ibell added this to the v5.0.5 milestone Dec 24, 2014
@ibell
Copy link
Contributor

ibell commented Dec 24, 2014

And now:

In [1]: import CoolProp

In [2]: CoolProp.CoolProp.PropsSI('R134a','Tcrit')
Out[2]: 374.21

In [3]: CoolProp.CoolProp.PropsSI('P','T',373.5,'Q',0,'R134a')
Out[3]: 4002756.730834238

In [4]: CoolProp.CoolProp.PropsSI('P','T',373.5,'Q',1,'R134a')
Out[4]: 4002756.730834238

@ibell ibell closed this as completed in db24acf Dec 24, 2014
@ChenYuChih
Copy link
Author

Thanks for your help. :)

Is this fix for all pure fluids or just only for R134a?

@ibell
Copy link
Contributor

ibell commented Dec 24, 2014

All pure fluids. Away from the critical point, difference should be <
0.001 %
On Dec 24, 2014 6:45 PM, "ChenYuChih" notifications@github.com wrote:

Thanks for your help. :)

Is this fix for all pure fluids or just only for R134a?


Reply to this email directly or view it on GitHub
#364 (comment).

@ChenYuChih
Copy link
Author

Got it, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants