-
Notifications
You must be signed in to change notification settings - Fork 234
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
Proposal for higher level abstraction of flowsheet models, flowsheet units, and automated flowsheet construction #1503
Comments
I'll try to get to this tomorrow if possible, but one initial comment I had was whether |
Yes, I am open to suggestions on if we want to adopt/modify existing blocks/code or inherit them. the reality is flowsheetbase and flowsheetunit share alot of the same innards but have just minor differences. so its likely the should inherit from same base class and (probably flowsheetblock) and add functionality on top of it. |
My first reaction reading through the proposal PDF is that much of this can be accomplished using existing standalone flowsheets and Pyomo Config blocks. A lot of the things in the "metadata" category can be accomplished by creating sets with standard names on the |
My initial thoughts after reading through the document is that this is really a proposal for a few different things (but all important) and that it would probably pay to look at each of the individually. As I see it, the different aspects are:
The other thing I see is that we have a lot of stakeholders in with an interest in this, and we should involve all of them in the planning stage to make sure we don't inadvertently exclude anyone. My suggestion is to start by asking the stakeholders involved (modular flowsheet builders, UI team, Project Ahuora, anyone else who is interested) to compile a list of use-cases of interest to them and the associated metadata/APIs/utilities they wish they had to support this. We can then use this to start building out a more concrete proposal for what metadata is needed and how to use it. Some more specific questions/clarifications about the proposal:
|
@dallan-keylogic yes- i think alot of basic structure/tooling exists but just needs to be standarized/packaged - as right now I don't actually see many flowsheets being built with these @andrewlee94 : To all your points yes, I think the key thing is standardization and ensuring all the tools can work with "control API" (e.g. Ahuora, UI, etc), specifically providing access to standard expected methods and data. Much of it really is just a metadata management issue. For specific questions:
The key practical difference between FlowsheetBase and FlowsheetUnit is the functions necessary for managing the flowsheet by a Control API. For example, a key difference is initialization routines. The FlowsheetBase needs to have methods to initialize/scale starting points and termination points separately, so its two separate functions. Meanwhile, FlowsheetUnit should only have a single initialize function that initializes everything. This is because the control API would need to inject the initialization routine of all units in between starting and terminal point initialization. So your initialization order would go to FlowsheetBase Starting points (and props/etc) -> All flowsheetUnits -> FlowsheetBase terminal points (and props/etc, for example, costing prop package). This can be done through a config option and single initialize function as well - in fact we could have a single FlowsheetBlock class, that supports many configurations - this feels like it will get messy and is a case of an overgeneralization, where I think explicit structure might be better for this. There might also be other use-specific functionalities that are needed for FlowsheetUnits vs FlowsheetBase, but they would have to be identified by stakeholders.
I also agree on the suggestion to get stakeholders to provide input on what's needed - and how they would want to interact with an API. The proposal lacks details on API and implementation as I want to get everyone's perspective. I believe current stakeholders are: |
@avdudchenko I am not sure I understand the distinction between If so, I think that we do not need to make that distinction - feed and product states can easily be viewed as just another component in the process (especially if we encourage the use of the To put it another way, the execution of the initialization for the two approaches is functionally the same on the inside; some initial conditions are set for the starting state(s) outside the initialization function (by the modeler for a top-level flowsheet feed, or by propagating a state for a sub-flowsheet), then we call the initialization routine that does whatever is necessary to take that starting states and propagate them throguh the entire (sub)flowsheet and ensures that all variables have a suitable initial value. Thus, to me the differences are internal to the initialization routine, and not at the API level. |
That makes sense - I have been sort of torn between treating feed/product etcs as just another unit or not. I think the other thing I did not mention is FlowsheetBase provided a common ground/default properties for all units on the flowsheet, including costing etc... maybe its not as much as FlowesheetBase as FlowsheetBaseProperties? Specifically, FlowsheetBase needs to:
|
OK, based on that then I think we actually already have a lot of the capability you are suggesting, and what we are mostly lacking is a set of standards and example of how to use these.
|
There is a need for an abstraction layer that can support developing preconfigured unit models and flowsheets, that could enable automated construction of complex flowsheets and their use in GUI. Currently, unit models in IDAES/WaterTAP, etc are designed as abstract units that can be modified/used in an infinite number of ways, but many users want standard units that can be used right away for typical process simulation and analysis (example: Reverse osmosis, requires pump, RO unit and maybe ERD. This means a user needs to build a flowsheet with at least these three unit models to do a basic analysis, or adapt another flowsheet)
Furthermore, there is a need to be able to easily assemble flowsheet units in any number of configurations, for example multi-stage processes or where unit order is changed. Right now this is done manually, resulting in the development of bespoke flowsheets and unit model configurations that are not portable, in many cases these flowsheets grow in complexity and become impossible to maintain or navigate.
If a standard rigid structure is adopted for how flowsheet units are configured and built, it is possible to:
I propose the development of three classes within IDAES to support this capability:
o This houses utilities/properties/functions accessible to all unit models on the flowsheet, and all unit models are built on the FlowsheetBase
gned to be built on a flowsheet base, unlike a normal unit model, these units have to be preconfigured for a standard rigid operation expected of the underlying sub-unit model.
o This might not be a block constructed on a model, but a separate tool entirely
The detailed proposal that includes the functions for each class and requirements or more or less are in the attached word doc/pdf
Proposal for the higher level abstraction of flowsheet models.pdf
Proposal for higher level abstraction of flowsheet models.docx
Related Issues:
The text was updated successfully, but these errors were encountered: