IDAES / idaes-pse

The IDAES Process Systems Engineering Framework
https://idaes-pse.readthedocs.io/
Other
216 stars 232 forks source link

Add new Complementarity formualtion for VLE with cubic EoSs #1397

Closed andrewlee94 closed 3 months ago

andrewlee94 commented 5 months ago

Replaces #977

Summary/Motivation:

This PR adds an implementation of the improved Smooth VLE formulation originally proposed in #977. This implementation preserves the old implementation for backward compatibility.

Changes proposed in this PR:

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.
codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 53.23194% with 123 lines in your changes are missing coverage. Please review.

Project coverage is 77.52%. Comparing base (3a1d54a) to head (7997adf).

Files Patch % Lines
...ies/modular_properties/phase_equil/smooth_VLE_2.py 16.21% 93 Missing :warning:
...erties/modular_properties/base/generic_property.py 60.60% 16 Missing and 10 partials :warning:
...dels/properties/modular_properties/base/utility.py 94.02% 2 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1397 +/- ## ========================================== - Coverage 77.63% 77.52% -0.12% ========================================== Files 391 392 +1 Lines 64391 64510 +119 Branches 14264 14268 +4 ========================================== + Hits 49989 50010 +21 - Misses 11830 11935 +105 + Partials 2572 2565 -7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

andrewlee94 commented 5 months ago

@viiibhav @jghouse88 Not sure if either of you still receive these, but input and review on this PR would be welcome.

jghouse88 commented 5 months ago

@viiibhav @jghouse88 Not sure if either of you still receive these, but input and review on this PR would be welcome.

Will take a look this week if that works. The best test would be to see if the paper examples work with this pr and see if we get similar results.

andrewlee94 commented 4 months ago

@jghouse88 I have tested this with the existing tests in IDAES, swapping the new formulation for the old one. All but two tests pass with the new formulation, but the two that fail appear to need further investigation - the temperature sweep test is failing to converge to the correct solution (it gets stuck somewhere).

codecov-commenter commented 4 months ago

Codecov Report

Attention: Patch coverage is 83.45324% with 46 lines in your changes missing coverage. Please review.

Project coverage is 77.83%. Comparing base (fff4546) to head (c2a593d). Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
...erties/modular_properties/base/generic_property.py 62.85% 16 Missing and 10 partials :warning:
...ies/modular_properties/phase_equil/smooth_VLE_2.py 88.61% 11 Missing and 3 partials :warning:
...dels/properties/modular_properties/base/utility.py 91.30% 3 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1397 +/- ## ========================================== + Coverage 77.80% 77.83% +0.02% ========================================== Files 393 394 +1 Lines 64797 64926 +129 Branches 14390 14398 +8 ========================================== + Hits 50413 50532 +119 - Misses 11794 11811 +17 + Partials 2590 2583 -7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.