Skip to content

Comments

Resubmitting pull request for new state definition FpTPxpc with testing#1723

Open
tannerpolley wants to merge 32 commits intoIDAES:mainfrom
tannerpolley:tanner/FpTPxpc
Open

Resubmitting pull request for new state definition FpTPxpc with testing#1723
tannerpolley wants to merge 32 commits intoIDAES:mainfrom
tannerpolley:tanner/FpTPxpc

Conversation

@tannerpolley
Copy link
Contributor

New State Definition FpTPxpc which has flow_mol_phase and mole_frac_phase_comp as the state definitions with required testing

@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

❌ Patch coverage is 89.69697% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.78%. Comparing base (e7e13b8) to head (ff2616d).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...es/modular_properties/state_definitions/FpTPxpc.py 89.69% 12 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1723      +/-   ##
==========================================
+ Coverage   73.63%   73.78%   +0.14%     
==========================================
  Files         394      399       +5     
  Lines       64980    65260     +280     
  Branches    10947    10976      +29     
==========================================
+ Hits        47851    48153     +302     
+ Misses      14627    14599      -28     
- Partials     2502     2508       +6     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Just a few minor comments.

Comment on lines 1536 to 1559
#
# m = model.fs.state[0]
#
# m.display()
# #
# # for v in m.component_data_objects(Var, active=True):
# # print(f"{v.name}: value={v.value}, lb={v.lb}, ub={v.ub}")
# #
# # print()
# #
# # for c in m.component_data_objects(Constraint, active=True):
# # print(c.name, c.expr)
#
# # As the phase equilibrium constraints were not solved, we expect these to have a large residual
# large_res = large_residuals_set(model.fs.state[0])
# print(large_res)
# assert len(large_res) == 4
# for i in large_res:
# assert i.name in [
# "fs.state[0.0].phase_fraction_constraint[Liq]",
# "fs.state[0.0].phase_fraction_constraint[Vap]",
# "fs.state[0.0].equilibrium_constraint[Vap,Liq,H2O]",
# "fs.state[0.0].equilibrium_constraint[Vap,Liq,CO2]",
# ]
Copy link
Contributor

Choose a reason for hiding this comment

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

What's happening with this commented code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Uncommented the code and the test works. Was probably testing different configurations or options at some point and commented this out and didn't revert it

Comment on lines 351 to 354
print()
print(j)
print(value(m.fs.state[1].flow_mol_phase_comp_apparent["Liq", j]))
print(value(m.fs.state[1].flow_mol), value(m.fs.state[1].mole_frac_comp[j]))
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't have print statements in the final test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed these print statements

@dallan-keylogic
Copy link
Contributor

@tannerpolley , could you get to this PR soon?

@ksbeattie
Copy link
Member

@tannerpolley (and/or @agarciadiego )will you be able to get to this for the Feb (this month's) release?

@tannerpolley
Copy link
Contributor Author

Sorry everyone that I did not get to these earlier. I normally get notified when comments are made in the PR but I did not see a single comment or get notified. I will look into the settings and ensure I get notified in the future

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.

Just a bit more cleanup.

…inux versions 3.12 and 3.13 so added the less strict complementarity conditions from the scaler object version to the legacy scaling version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

modular properties Priority:Normal Normal Priority Issue or PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants