Resubmitting pull request for new state definition FpTPxpc with testing#1723
Resubmitting pull request for new state definition FpTPxpc with testing#1723tannerpolley wants to merge 32 commits intoIDAES:mainfrom
Conversation
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
dallan-keylogic
left a comment
There was a problem hiding this comment.
Just a few minor comments.
| # | ||
| # 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]", | ||
| # ] |
There was a problem hiding this comment.
What's happening with this commented code?
There was a problem hiding this comment.
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
| 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])) |
There was a problem hiding this comment.
We shouldn't have print statements in the final test.
There was a problem hiding this comment.
Removed these print statements
|
@tannerpolley , could you get to this PR soon? |
|
@tannerpolley (and/or @agarciadiego )will you be able to get to this for the Feb (this month's) release? |
|
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 |
dallan-keylogic
left a comment
There was a problem hiding this comment.
Just a bit more cleanup.
idaes/models/properties/modular_properties/state_definitions/tests/test_FpTPxpc.py
Outdated
Show resolved
Hide resolved
idaes/models/properties/modular_properties/state_definitions/tests/test_FpTPxpc.py
Outdated
Show resolved
Hide resolved
idaes/models/properties/modular_properties/state_definitions/tests/test_FpTPxpc_electrolyte.py
Outdated
Show resolved
Hide resolved
idaes/models/properties/modular_properties/state_definitions/tests/test_FpTPxpc.py
Outdated
Show resolved
Hide resolved
…nding the property
…se test. Uses a FeedFlash unit model rather than a state block to perform the test
…ant config properties dictionary and file
…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
…changes to a future potential feature
…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
…and removed print statements from electrolyte test
…r than 4 for this state definition
ff2616d to
9494de6
Compare
…inux versions 3.12 and 3.13 so added the less strict complementarity conditions from the scaler object version to the legacy scaling version
New State Definition FpTPxpc which has
flow_mol_phaseandmole_frac_phase_compas the state definitions with required testing