Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Dewatering and thickener unit models BSM2 #1010
Dewatering and thickener unit models BSM2 #1010
Changes from 21 commits
557d05e
7407aed
68c0eac
5f4828c
3e72529
c60a871
8e2d74f
b594424
157dff9
a63274c
9d6b6fc
5dadf22
265e414
5b164da
3fad339
87ed9d4
757a094
ee1d1de
366e5bf
fe75437
5156ca9
b2627fd
84585e5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I would shoot for more elaborate naming schemes. My guess without referring back to the literature is that you went with matching symbols in the literature. While that seems reasonable for the popular ASM and ADM models, I wonder if it might be more useful to offer up our own names in these unit cases for improved clarity. This is a broad comment regarding any parameter/variable names, when I compare those names with the associated doc string and question their alignment.
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.
I think if we are following ASM and ADM convention for names of our property, reaction package, etc. following naming convention from BSM2 paper would avoid confusion for users specially if they are following the paper we added as references.
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.
Fair enough - the documentation will probably help things.
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.
So, for both units, I'm aware that you didn't add
initialize_build
andcalcualte_scaling_factors
methods, likely because the separator handles those. I still wonder though if we should include them here anyway, even if, for example, we just have loggers setup for initialization and runsuper().calculate_scaling_factors()
. @andrewlee94 curious to hear your thoughts.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.
If you inherit from another model or base class, then any methods you do not overload will use that of the parent. For initialization this might be OK as long as the additions in the new model are relatively simple. However, for scaling, the new model is adding new variables and constraints (otherwise it wouldn't be a new model), and the parent's scaling methods won't touch these leaving part of the model unscaled.
On a related note, be aware that IDAES plans to rebuild both initialization and scaling this year. The new scaling API is already in place if you want to start looking at it: https://idaes-pse.readthedocs.io/en/latest/reference_guides/initialization/index.html
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.
Right, I figured we could technically get away with it since the Separator's initialization and calculate_scaling_factors are essentially being used here, but that it might just be good practice and make for better readability/consistency between models for [new] developers. Furthermore, there are probably some unscaled vars that are added here but simple enough that additional scaling doesn't seem necessary at this point. I think we could put a pin in it for now and revisit if issues arise when analyzing the BSM2 flowsheet later.
And thanks for the note on the new scaling API.