Skip to content
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

Enable RO0D to be dynamic #1471

Merged
merged 126 commits into from
Oct 30, 2024
Merged

Conversation

fahim831
Copy link
Contributor

Fixes/Resolves: Membrane and RO modules being forced to be steady-state.

(replace this with the issue # fixed or resolved, if no issue exists then a brief statement of what this PR does)

Summary/Motivation:

At the moment, dynamic and has_holdup terms are hardcoded to be False in the membrane channel base class and RO 0D class. I have changed them to be allowed to be Bool and inherit from the model declaration.

Changes proposed in this PR:

  • Changed dynamic and has_holdup domains to Bool in watertap/core/membrane_channel_base.py
  • Changed dynamic and has_holdup in _add_feed_side_membrane_channel_and_geometry method of watertap/unit_models/reverse_osmosis_0D.py to inherit from self.config

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@lbianchi-lbl lbianchi-lbl added the Priority:Normal Normal Priority Issue or PR label Jul 25, 2024
@lbianchi-lbl
Copy link
Contributor

lbianchi-lbl commented Jul 25, 2024

As per @adam-a-a, we should wait to merge this until a prototype of the relevant dynamic model(s) has been implemented.

@adam-a-a adam-a-a changed the title Changed dynamic and has_holdup to not be hardcoded to False Enable RO0D to be dynamic Jul 25, 2024
@adam-a-a adam-a-a marked this pull request as ready for review September 26, 2024 20:36
@adam-a-a adam-a-a enabled auto-merge (squash) October 24, 2024 21:25
Copy link
Contributor

@luohezhiming luohezhiming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I have a minor suggestion that can be addressed in future

time_nfe = len(m.fs.time) - 1
TransformationFactory("dae.finite_difference").apply_to(
m.fs, nfe=time_nfe, wrt=m.fs.time, scheme="BACKWARD"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to add this as a config option in future.

@adam-a-a adam-a-a merged commit 53bd64e into watertap-org:main Oct 30, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamics IDAES Priority:Normal Normal Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants