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

Fix issue with enthalpy based states trying to use EoS before construciton #1505

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

andrewlee94
Copy link
Member

Fixes #1483

Summary/Motivation:

Issue #1483 identified that enthalpy-based state definitions in the modular property framework triggered calls to components constructed by the equation of state module before these had been instantiated. This PR defers the construction of the constraint relating total molar enthalpy to the phase molar enthalpies until after the EoS components have been instantiated.

Changes proposed in this PR:

  • Defer construction of enth_mol_eqn in enthalpy based state definitions.
  • Fix some issues of cross-contamination in tests resulting in unexpected behaviors with this change
  • Added units to partial molar enthalpy in DummyEoS to address unit consistency issue in tests

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 andrewlee94 requested a review from bpaul4 as a code owner October 18, 2024 15:30
@andrewlee94 andrewlee94 self-assigned this Oct 18, 2024
@andrewlee94 andrewlee94 added bug Something isn't working user request Requests from external users Priority:Normal Normal Priority Issue or PR property packages Issues dealing with properties labels Oct 18, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.98%. Comparing base (0e05ed1) to head (be76ce4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1505      +/-   ##
==========================================
- Coverage   76.98%   76.98%   -0.01%     
==========================================
  Files         382      382              
  Lines       61913    61911       -2     
  Branches    10130    10126       -4     
==========================================
- Hits        47665    47660       -5     
- Misses      11848    11852       +4     
+ Partials     2400     2399       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@dallan-keylogic dallan-keylogic left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines -140 to +141
@pytest.fixture(scope="class")
@pytest.fixture()
Copy link
Contributor

Choose a reason for hiding this comment

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

Just out of curiosity, why are we removing these scopes?

Copy link
Member Author

Choose a reason for hiding this comment

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

They resulted in tests polluting other tests which resulted in unexpected failures (mainly the first check for defined state effect had flow on effects to other tests)

@andrewlee94 andrewlee94 merged commit 2515fe8 into IDAES:main Oct 18, 2024
53 checks passed
@andrewlee94 andrewlee94 deleted the issue_1483 branch October 18, 2024 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority:Normal Normal Priority Issue or PR property packages Issues dealing with properties user request Requests from external users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modular Cubic EoS implementation fails with FPhx state
4 participants