idaes-pse icon indicating copy to clipboard operation
idaes-pse copied to clipboard

Add new Complementarity formualtion for VLE with cubic EoSs

Open andrewlee94 opened this issue 1 year ago • 4 comments
trafficstars

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:

  • Infrastructure work to support new formulation, and address some pylint issues in modular properties code.
  • Add new class SmoothVLE2 to implement improved formulation

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.

andrewlee94 avatar Apr 17 '24 19:04 andrewlee94

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
@@            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.

codecov[bot] avatar Apr 19 '24 15:04 codecov[bot]

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

andrewlee94 avatar Apr 23 '24 20:04 andrewlee94

@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.

jghouse88 avatar May 03 '24 21:05 jghouse88

@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).

andrewlee94 avatar May 06 '24 14:05 andrewlee94

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
@@            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.

codecov-commenter avatar May 21 '24 20:05 codecov-commenter