Skip to content

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

tannerpolley and others added 29 commits November 19, 2025 12:01
…se test. Uses a FeedFlash unit model rather than a state block to perform the test
…nstraint' based on `has_phase_equilibrium` boolean. Also additional conditional in blocking the activiation of the `equilibrium_constraint` if `mole_frac_phase_comp` is a state variable
…nges were not passing tests and the changes are not necessary for anything. Maybe a potential future feature
…nges were not passing tests and the changes are not necessary for anything. Maybe a potential future feature
@tannerpolley tannerpolley self-assigned this Jan 16, 2026
@tannerpolley tannerpolley added Priority:Normal Normal Priority Issue or PR modular properties labels Jan 16, 2026
@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.67%. Comparing base (e7e13b8) to head (138a434).

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.67%   +0.03%     
==========================================
  Files         394      395       +1     
  Lines       64980    65145     +165     
  Branches    10947    10969      +22     
==========================================
+ Hits        47851    47993     +142     
- Misses      14627    14642      +15     
- Partials     2502     2510       +8     

☔ 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?

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.

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

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.

3 participants