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

Provide return string from PhaseSI() if phase can't be determined. #1645

Merged
merged 1 commit into from Feb 12, 2018

Conversation

henningjp
Copy link
Contributor

Closes #1631

If phase can't be determined, because of an error in PropsSI() or the state point location, PhaseSI() returned a blank string:

In: PhaseSI("T",270.3895839,"P",264626.0542,"R134a")
Out: ''

Modified PhaseSI() to instead return "unknown", appended with any error messages from the call to PropsSI():

In: PhaseSI("T",270.3895839,"P",264626.0542,"R134a")
Out: 'unknown: Saturation pressure [264626 Pa] corresponding to T [270.39 K] is within 1e-4 % of given p [264626 Pa] : PropsSI("Phase","T",270.3895839,"P",264626.0542,"R134a")'

@henningjp henningjp requested a review from ibell February 10, 2018 13:57
@henningjp
Copy link
Contributor Author

@ibell, those error strings can be kind of long. What do you think?

@ibell
Copy link
Contributor

ibell commented Feb 12, 2018 via email

@ibell
Copy link
Contributor

ibell commented Feb 12, 2018

Looks good to me!

@ibell ibell merged commit 4550317 into CoolProp:master Feb 12, 2018
@henningjp henningjp deleted the Phase_Unknown branch February 12, 2018 12:19
@ibell ibell added this to the v6.2.0 milestone Feb 28, 2018
@jowr jowr modified the milestone: v6.2.0 Oct 26, 2018
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

Successfully merging this pull request may close these issues.

None yet

3 participants