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

improve PC-SAFT flash #2161

Merged
merged 3 commits into from Aug 27, 2022
Merged

Conversation

zmeri
Copy link
Contributor

@zmeri zmeri commented Aug 26, 2022

Description of the Change

The flash algorithm for the PC-SAFT backend was updated to improve its performance. Additionally, the association term for the PC-SAFT EOS was expanded to also support other association schemes, in addition to the default 2B scheme used in the earlier code.

Benefits

The flash algorithm is, generally, faster and more reliable, although it could still be improved. Also, a wider range of association schemes can be used.

Possible Drawbacks

New bugs might have been introduced.

Verification Process

I ran the Catch tests in CoolProp-Tests.cpp. All the PC-SAFT tests passed. Of all the tests only 285/51440 assertions failed, and it appeared that many of these were because I didn't have Refprop installed. For comparison, when I run the tests on the current master branch 306/51436 fail, and some of those that fail are for PC-SAFT tests. So, this update should help correct some of the errors in the current master branch.

struct scheme_info
{
schemes key;
const char *short_desc;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a std::string, avoid C types unless absolutely necessary

Copy link
Contributor

@ibell ibell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the std::string thing I mention, looks good to me.

@zmeri
Copy link
Contributor Author

zmeri commented Aug 27, 2022

I changed it to be a string. Thanks for looking over the changes I made.

@ibell
Copy link
Contributor

ibell commented Aug 27, 2022

Thanks, looks good to me, merging

@ibell ibell closed this Aug 27, 2022
@ibell ibell reopened this Aug 27, 2022
@ibell ibell merged commit e52c26c into CoolProp:master Aug 27, 2022
@jowr jowr modified the milestones: v6.5.0, v6.4.2 Dec 7, 2022
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