-
Notifications
You must be signed in to change notification settings - Fork 63
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
Simple OD Nanofiltration model #1536
Open
andrewlee94
wants to merge
22
commits into
watertap-org:main
Choose a base branch
from
andrewlee94:nf0d
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
10d77c9
Cherry picking files from other branch
andrewlee94 2df7d0b
Testing NF0D
andrewlee94 348fc0e
More testing
andrewlee94 95c59c4
Finishing tests of NF0D
andrewlee94 c018b17
MCAS tests and black
andrewlee94 de2d18a
Docs and linting
andrewlee94 62cd994
Running black
andrewlee94 46e9d1c
Fixing duplicae label in docs
andrewlee94 028a598
Merge branch 'main' into nf0d
andrewlee94 d65bae2
Linting
andrewlee94 5121d83
Merge branch 'nf0d' of https://github.com/andrewlee94/watertap into nf0d
andrewlee94 82d0ec5
Standardize momentum balance args
andrewlee94 97c0a70
Switching to rejection
andrewlee94 f7039e7
Working around MCAS issue
andrewlee94 ec88cae
Merge branch 'main' into nf0d
andrewlee94 7a73ebb
Fixing energy balance config arg
andrewlee94 923619f
Pylint
andrewlee94 181614f
Bumping IDAES tag
andrewlee94 57b1fa7
Merge branch 'main' into nf0d
lbianchi-lbl 2741d0e
Deprecation warning fo NF ZO
andrewlee94 dc632ed
Update docs/technical_reference/unit_models/nanofiltration_0D.rst
andrewlee94 11b7584
Rename solvent recovery variable
andrewlee94 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
docs/technical_reference/unit_models/nanofiltration_0D.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
Nanofiltration (0D) | ||
==================== | ||
This nanofiltration (NF) unit model is suitable for non-predictive case studies where the user wishes to specify, constant rejection fractions | ||
whilst preserving electroneutrality in the permeate stream (optional). A single recovery fraction is assumed for all solvents, whilst | ||
individual rejection fractions can be set for all solutes, with the exception of one ion specified for maintaining | ||
electroneutrality. Solutes are assigned default rejection value by grouping them into either two categories, passing and excluded, with | ||
default rejection values for each category. Solutes are categorised using either a user-provided list of species which freely pass the | ||
membrane, or by assuming all neutral and monovalent species pass the membrane. | ||
|
||
Retentate pressure is assumed to be related to feed pressure with an optional pressure drop whilst permeate pressure is assumed to be | ||
a degree of freedom, and temperature equality is assumed. Temperature and pressure constraints can be removed with configuration arguments. | ||
|
||
This model assumes supports a single liquid phase only and assumes steady-state. | ||
|
||
.. index:: | ||
pair: watertap.unit_models.nanofiltration_0D;nanofiltration_0D | ||
|
||
.. currentmodule:: watertap.unit_models.nanofiltration_0D | ||
|
||
Degrees of Freedom | ||
------------------ | ||
The ``Nanofiltration0D`` model has the following degrees of freedom | ||
|
||
* inlet state | ||
* permeate pressure | ||
* solvent recovery fraction (``solvent_recovery``) | ||
* solute rejection fractions (``rejection_comp``) for all solutes EXCEPT the one identified as the electroneutrality species. | ||
|
||
The following additional degrees of freedom may exist depending on configuration options | ||
|
||
* retentate pressure drop (``deltaP``) | ||
|
||
Model Structure | ||
--------------- | ||
The Nanofiltration0D model consists of three state blocks (``properties_in``, ``properties_retentate`` and ``properties_permeate``). | ||
|
||
.. _NF0D_variables: | ||
|
||
Variables | ||
--------- | ||
|
||
.. csv-table:: | ||
:header: "Description", "Symbol", "Variable Name", "Index", "Units" | ||
|
||
"Solvent recovery", ":math:`Q_{solvent}`", "solvent_recovery", None, ":math:`\text{dimensionless}`" | ||
"Solute rejection", ":math:`R_j`", "rejection_comp", [j], ":math:`\text{dimensionless}`" | ||
"Retentate pressure drop", ":math:`\deltaP`", "deltaP", [t], ":math:`\text{pressure}`" | ||
|
||
.. _NF0D_equations: | ||
|
||
Equations | ||
--------- | ||
|
||
Here :math:`F` represents component flowrate and :math:`Z_j` is the charge on species j. | ||
|
||
.. csv-table:: | ||
:header: "Description", "Equation" | ||
|
||
"Component material balances", ":math:`F_{in, j} = F_{retentate, j} + F_{permeate, j}`" | ||
"Solvent recovery",":math:`Q_{solvent} \times F_{in, j} = F_{permeate_j}`" | ||
"Solute rejection",":math:`R_j = 1 - \frac{C_{permeate, j}}{C_{feed_j}}`" | ||
"Permeate electroneutrality",":math:`0 = F_{permeate, j} \times Z_{j}`" | ||
"Retentate pressure balance",":math:`P_{in} = P_{retentate} - \deltaP`" | ||
"Retentate temperature equality", ":math:`T_{in} = T_{retentate}`" | ||
"Permeate temperature equality", ":math:`T_{in} = T_{permeate}`" | ||
|
||
Class Documentation | ||
------------------- | ||
|
||
* :mod:`watertap.unit_models.nanofiltration_0D` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Need to update this
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.
@lbianchi-lbl reminder to check this out and ensure update to latest idaes release works here