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

Entropy of Melinder fluids giving wrong results #429

Closed
ericksonla opened this issue Jan 26, 2015 · 11 comments
Closed

Entropy of Melinder fluids giving wrong results #429

ericksonla opened this issue Jan 26, 2015 · 11 comments
Assignees
Milestone

Comments

@ericksonla
Copy link

The entropy call with Melinder fluids changes with multiple calls. A simple test code:

from CoolProp.CoolProp import PropsSI

print PropsSI('S', 'T', 313.15, 'P', 100000., 'INCOMP::MEA[0.6]')
print PropsSI('S', 'T', 313.15, 'P', 100000., 'INCOMP::MEA[0.6]')
print PropsSI('S', 'T', 313.15, 'P', 100000., 'INCOMP::MEA[0.6]')

returns:
227508.367363
215363.646742
191074.205501

I have done a bit more testing:
-Occurs for other Melinder fluid mixtures
-Does not occur for single component incompressible fluids
-Does not occur for other property calls
-Does not appear to depend on the input values

I just upgraded to the latest version. I don't think this problem occurred before upgrade (4.?), but I can't be 100% sure.

@jowr
Copy link
Member

jowr commented Jan 26, 2015

Hi, thank you for the report. Are you sure that you have the latest version? It looks like bug #413 has nnot been solved entirely. For me, the output is

In [1]: import CoolProp
In [2]: print CoolProp.__version__ 
5.0.7dev
In [3]: from CoolProp.CoolProp import PropsSI
In [4]: print PropsSI('S', 'T', 313.15, 'P', 100000., 'INCOMP::MEA[0.6]')
-227029.535639
In [5]: print PropsSI('S', 'T', 313.15, 'P', 100000., 'INCOMP::MEA[0.6]')
233580.727674
In [6]: print PropsSI('S', 'T', 313.15, 'P', 100000., 'INCOMP::MEA[0.6]')
-227029.535639

It is different, but also wrong. The alternating values tell me that it is the reference states function that does not reset the values properly. I'll have a look.

@ericksonla
Copy link
Author

Just double checked- I'm on 5.0.7

@jowr
Copy link
Member

jowr commented Jan 26, 2015

Sorry, but that version does not exist. Well, it does not matter whether you are you on 5.0.6 or 5.0.7dev, the bug has to be fixed...

@jowr
Copy link
Member

jowr commented Jan 26, 2015

Thanks for reporting the bug. I broke it last week while fixing #413. Should be cool now:

In [1]: import CoolProp                                
In [2]: print CoolProp.__version__
5.0.7dev       
In [3]: from CoolProp.CoolProp import PropsSI         
In [4]: print PropsSI('S', 'T', 313.15, 'P', 100000., 'INCOMP::MEA[0.6]')
239.415862162
In [5]: print PropsSI('S', 'T', 313.15, 'P', 100000., 'INCOMP::MEA[0.6]')
239.415862162
In [6]: print PropsSI('S', 'T', 313.15, 'P', 100000., 'INCOMP::MEA[0.6]')
239.415862162

@jowr jowr added this to the v5.0.7 milestone Jan 26, 2015
@jowr jowr self-assigned this Jan 26, 2015
jowr pushed a commit that referenced this issue Jan 26, 2015
@jowr jowr closed this as completed Jan 26, 2015
@jowr
Copy link
Member

jowr commented Jan 26, 2015

@ericksonla, can you confirm that it works? It looks like you got different results earlier. Are you on Windows, Linux or a Mac?

@ericksonla
Copy link
Author

I'm on Mac. I tried:
pip --upgrade --pre CoolProp
but it couldn't find 5.0.7dev.

Whats the preferred way of getting it?

@jowr
Copy link
Member

jowr commented Jan 26, 2015

The Mac binaries got generated 20 seconds ago, you can force a reinstall of the Python library by running pip install --find-links http://www.coolprop.dreamhosters.com:8010/binaries/Python/ -U --force-reinstall CoolProp or a similar command for your virtual environment. Does that make sense?

@ericksonla
Copy link
Author

The first time I tried it just pulled 5.0.6 again but I added the --pre flag and then got 5.0.7dev. I don't know whether the flag or waiting 15 minutes made the difference but it worked.

I ran the test script again and everything looks good. My original code seems to be working too.

Thanks!

@jowr
Copy link
Member

jowr commented Jan 26, 2015

Good to hear and thanks again for the bug report.

@ibell
Copy link
Contributor

ibell commented Jan 27, 2015

Sometimes a couple of pip uninstall CoolProp in a row helps for future reference

@jowr
Copy link
Member

jowr commented Jan 27, 2015

@jowr jowr reopened this Jan 27, 2015
@jowr jowr closed this as completed in 792c466 Jan 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants