-
Notifications
You must be signed in to change notification settings - Fork 62
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
Ion pp mod #508
Ion pp mod #508
Conversation
@aladshaw3 - Yeah, which was what I was worried about. The NF certainly needs refinement, but that's something that I need to work on for the quarter. Maybe we'll get by with a subtle adjustment so that tests pass for this PR. Otherwise, we might want to consider creating a separate dev branch for this (or some other solution) so that the refinement of the NF model doesn't impede your workflow with ED. |
Given there are relatively minor changes here, shouldn't we question if the scaling changes made in this PR are correct? I think it would be better to make the minimal changes required for this feature first and then maybe in a separate PR make unrelated changes to the way this property package is scaled, being sure to test it against every place its used. |
That makes sense. However, I was able to get the NF test working just now locally. I just had to reduce the default scaling factors that I had set for two ions and adjust some regression tests (for a variable that has already been problematic in NF model). I just can't push the changes because @lbibl needed to enable permission to do so. |
Are the changes significant? Can you just use the GitHub interface to commit those changes directly in this PR? |
@lbibl You will also need to run black on both these files to pass the format check. You can do this in terminal as:
|
Hi all, thanks for your messages. Before I opened the PR, |
@adam-a-a I think there is something fundamentally wrong with the scaling in the nanofiltration model (since we are getting different model results / failing tests on different python versions and OSs). I can have a look at it more today, but we may need to just disable the nanofiltration model and revisit it later. |
@adam-a-a I have checked the log during initialization for the nanofiltration model. The results indicate that the unit model itself (nanofiltration_DSPMDE) is causing the issue. The properties are properly scaled and solve well during initialization, but the unit model never solves. (see attached). nanofiltration_DSPMDE_initialization_log.txt This tells me that any issue with failing tests is caused by the nanofiltration model and not the changes made in the property package. I think we may want to consider disabling the nanofiltration model tests and revisiting at another time so that this PR can get done soon. |
For some reason, there is a documentation failure now. It is from the newly merged docs (#500). That PR passed all its checks, so I am not sure why it is failing now. |
@aladshaw3 Yes, I'm aware of the issue and realized that some tests pass on Windows while Linux tests fail. The NF model requires a bunch of refinement (outlined in issue #464 ). At first, I was alarmed by your suggestion, until I realized that you only intended to skip specific tests rather than the whole set of tests for NF DSPM. So-- I think I'm OK with that. |
Codecov Report
@@ Coverage Diff @@
## main #508 +/- ##
==========================================
- Coverage 94.72% 94.19% -0.54%
==========================================
Files 171 171
Lines 14018 14057 +39
==========================================
- Hits 13279 13241 -38
- Misses 739 816 +77
Continue to review full report at Codecov.
|
I noticed this issue elsewhere too, but I think I managed to make that go away by rerunning the failed test. In any case, we probably want to resolve this sooner rather than later (i.e., updating IDAES tag as you mentioned in issue #503 ). |
As another point of comparison, I ran the nanofiltration model before the changes made in this PR and here is that log. Comparing to the new log (with the changes proposed in this PR), you can see that the initialization of the properties section has improved because of the changes made by @lbibl. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct me if I am wrong, but I thought we had discussed changing the 'bounds' on many of these variables because they didn't go low enough. Especially, for things like mole fractions and concentrations, we will need to allow for smaller concentration values if we want to consider very dilute systems.
Same to be said of the variables on lines (784 - dens_solvent
, 854 - conc_mass
, 912 - molality
, and 960 - act_coeff
). I don't think the bounds on these variables are correct or accurate. For example, the activity coefficient can go greater than 1 and mass concentration should be allowed to go lower than 1e-8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to go. We are skipping some nanofiltration_DSPMDE tests for now. That model needs to be refined in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I am correcting a few minor issues per comments above. Please wait for at least another commit from me before merging. |
…osm, conductivity and ionic strength; fixed an index issue for the conductivity var
In the latest commit (25aa85b) I fixed minor issues and added initialization method for a few other vars. Test for ion property package passed. Maybe @adam-a-a or @aladshaw3 may try if the added initialization for osmosis pressure improves the nanofiltation model. This would be good to go if no other input at this stage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes/Addresses:
electrical_mobility_comp
andelectrical_conductivity_phase
and related methods.Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: