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
PropsSI failed ungracefully with Water::IF97 #1999
Comments
Is that statepoint valid? And the only problem is the value that is returned for Q? How about density? |
Other props return values in the liquid phase, Q is undefined here. This point is just outside the vapor dome in the liquid region. HEOS returns Q = -1 (i.e.. undefined) and does not throw an error. Nudging the IF97 enthalpy value up to 1239.795 returns a sensible Q value (Hsat is 1239.7942 at this pressure). I think the point here is that IF97 should return something other than an ungraceful failure if Q is undefined. Workaround: The calling code should check to make sure H is inclusively between the saturated liquid value and the saturated vapor value before making the call. |
@henningjp can you add an exception for Q < 0 or Q > 1 for surface tension? |
Yes, once I get through this current project. I’ll tag it. Should be a
quickie.
…On Sat, Feb 20, 2021 at 11:52 AM Ian Bell ***@***.***> wrote:
@henningjp <https://github.com/henningjp> can you add an exception for Q
< 0 or Q > 1 for surface tension?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1999 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AECSHMGIEWJDNH3PQDCM5MDS77SFFANCNFSM4XQUXJQQ>
.
|
Thanks, yes I should think so. |
@ibell Finally getting back to this issue. Was intending to modify IF97 to make Q return an undefined value (-1) in all single-phase regions; like HEOS behavior. However, your request above has me confused as you mentioned surface tension. Did we not address surface tension in #1755 ? Not sure how surface tension relates here. Unfortunately, it was so long ago, you may not remember either! 😕 I'll proceed with the original issue above at risk until apprehended. |
@ibell - Maybe you meant, "like" for surface tension? |
NVM. Surface Tension error thrown is just wrong for IF97 backend when Q < 0 or Q > 1. Fixed. |
I haven't the foggiest about what is meant about surface tension. I think that it should not be allowed for Q < 0 or Q > 1? |
Description
PropsSI failed ungracefully, with IF97::Water
Steps to Reproduce
import CoolProp.CoolProp as cp
cp.PropsSI('Q', 'P', 6.4743994800040303e+06, 'H',1.2394090698400016e+06 , 'IF97::Water')
Expected behavior:
Expected to return zero, or something indicating that the fluid in fully liquid.
Actual behavior:
Raised an exception:
ValueError: PropsSI failed ungracefully :: inputs were:"Q","P",6.4743994800040303e+06,"H",1.2394090698400016e+06,"IF97::Water"; please file a ticket at https://github.com/CoolProp/CoolProp/issues
Versions
CoolProp Version: 6.4.1
Operating System and Version: Windows 10
Access Method: Python
Additional Information
The text was updated successfully, but these errors were encountered: