Skip to content

Add Multi-Stage RO Flowsheet and UI - #1759

Draft
kurbansitterley wants to merge 34 commits into
watertap-org:mainfrom
kurbansitterley:multi-stage-ro-fs
Draft

Add Multi-Stage RO Flowsheet and UI#1759
kurbansitterley wants to merge 34 commits into
watertap-org:mainfrom
kurbansitterley:multi-stage-ro-fs

Conversation

@kurbansitterley

Copy link
Copy Markdown
Contributor

Fixes/Resolves:

Adds multi-stage RO flowsheet and UI file.

Summary/Motivation:

This flowsheet was created for a separate analysis effort and would be useful to have in main WaterTAP since there isn't something similar, and multi-stage RO might be a common system for users to need to model.

The code is written such that a user can create a flowsheet with any number of stages for any inlet condition (flow and concentration). From the build function, the user can specify:

  • flow rate
  • salinity
  • number of stages
  • to include booster pumps or not (and where they should be in the process flow)
  • to an include an ERD or not
  • the property package to use (temp dep NaCl or SW supported currently)
  • membrane parameters
  • max allowable pumping pressure
  • max allowable permeate concentration

The test file represents the spectrum of conditions that I have tested that the default settings for flowsheet is stable for.

  • salinity: 5-75 g/L (note can be extended to 100 g/L)
  • flow: 1-10 L/s
  • number of stages: up to 3 with booster between 1 + 2
  • recovery: 40-60%

Extensions of these ranges may be stable but haven't been tested. More fine-grained tests could be added but would extend testing time. Currently runs ~5 min locally for testing time.

Changes proposed in this PR:

  • add multi-stage RO flowsheet file
  • add multi-stage RO UI file
  • add test file

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.

@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Apr 23, 2026

stage.RO.length.setlb(1 * pyunits.meter)
stage.RO.width.setlb(0.1 * pyunits.meter)
stage.RO.feed_side.velocity[0, 0].setub(0.3)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems like a pretty restrictive upper bound on inlet crossflow velocity. How necessary is this?

stage.RO.length.setlb(1 * pyunits.meter)
stage.RO.width.setlb(0.1 * pyunits.meter)
stage.RO.feed_side.velocity[0, 0].setub(0.3)
stage.RO.feed_side.velocity[0, 0].setlb(0.1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same question here- is this lower bound really necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this may have just been necessary for the analysis implementation, but there also may be a practical/design reason that @avdudchenko can maybe comment on

@adam-a-a

Copy link
Copy Markdown
Contributor

@kurbansitterley before I go further, any reason why this is still in draft mode?

@kurbansitterley

Copy link
Copy Markdown
Contributor Author

@kurbansitterley before I go further, any reason why this is still in draft mode?

I need to create a figure/pfd for it

@MarcusHolly MarcusHolly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM - just a few comments to address as well as the failing test. I've tested the GUI and everything seems to be working fine

Comment on lines +117 to +121
# salinity = [35]
# flows = [1]
# recovery = [0.5]
# n_stages = [2]
# add_erd = [True]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Delete?

Comment thread watertap/flowsheets/multistage_RO/multistage_RO.py Outdated
Comment on lines +284 to +285
# stage.RO.feed_side.velocity[0, 0].setub(0.3)
# stage.RO.feed_side.velocity[0, 0].setlb(0.1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be deleted?

Comment thread watertap/flowsheets/multistage_RO/multistage_RO.py Outdated
Comment thread watertap/flowsheets/multistage_RO/multistage_RO_ui.py
Comment thread watertap/flowsheets/multistage_RO/multistage_RO_ui.py
Comment thread watertap/flowsheets/multistage_RO/multistage_RO_ui.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority:Normal Normal Priority Issue or PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants