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

PS Input Pair Gives Erroneous Result on Saturation Curve in IF97 Backend #2334

Open
henningjp opened this issue Dec 7, 2023 · 2 comments
Open
Assignees

Comments

@henningjp
Copy link
Contributor

Description

IF97 Backend reverse calculation using (P, S) delivering erroneous values when state point is on the saturation
Reporting this issue for a user of CoolProp with Mathcad and SMath interfaces.

Steps to Reproduce

  1. Evaluate PropSI("H","P",<p>,"S",<SsatL @ p>,"IF97::H2O")
  2. Any pressure below the critical pressure can be used,

  3. Any Output parameter will give the same issue

Expected behavior: Liquid saturation point values returned.

Actual behavior: Vapor saturation point values returned. "Phase" returns "gas_phase" erroneously.

image

Versions

CoolProp Version: Latest (6.6.0)
Operating System and Version: Windows 10
Access Method: Mathcad/Python/SMath

Additional Information

  • Probably occurring at the saturated vapor point as well, but since the sat. vapor values are returned, it is not noticeable.
  • Probably the same for reverse calculations using (P, H).
  • Tracked it down so far to phase determination on the saturation curve, not sure yet if the issue is in the CoolProp backend routine, or in IF97 itself. A phase determination function from IF97.h does get called to make this determination.
@henningjp
Copy link
Contributor Author

@ibell Having trouble figuring this one out. IF97.h is fine. Backend makes sense, but won't return the right phase flag on the saturation boundary. I always get confused on your CoolProp convention for points exactly on the saturation curve and recall it was not intuitive to me. Are these points considered part of the 2-phase region (with Q = 1 or 0) or are they considered part of the Liquid or Vapor 1-phase region?

@ibell
Copy link
Contributor

ibell commented Dec 19, 2023

In CoolProp, Q=1 and Q=0 are considered to be two-phase states because the bulk phase is in equilibrium with an infinitely small amount of the incipient phase, and infinitely small is greater than zero :)

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

No branches or pull requests

2 participants