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

BSM2-P Effluent Metrics w/ Flowsheet Constraints #1503

Draft
wants to merge 60 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
0ed0d42
Add effluent metrics to prop pack
MarcusHolly Sep 12, 2024
9541a6a
Add preliminary effluent violations to the BSM2-P flowsheet
MarcusHolly Sep 12, 2024
07ea01a
Revert TSS change
MarcusHolly Sep 12, 2024
56b5145
Make BOD5_factor a parameter
MarcusHolly Sep 13, 2024
e2ac3b0
Update BSM2 GUI images
MarcusHolly Sep 13, 2024
4d05c61
Define effluent metrics as expressions (as done in ASM1) rather than …
MarcusHolly Sep 13, 2024
a09c691
Initial attempt at adding optimization to BSM2-P
MarcusHolly Sep 13, 2024
a19f1c6
Disable phosphorus effluent violation
MarcusHolly Sep 13, 2024
26df31e
Solves to Acceptable Level
MarcusHolly Sep 13, 2024
ef4f5e6
Update unit model tests
MarcusHolly Sep 13, 2024
c2ee4ac
Touch effluent metrics before scaling
MarcusHolly Sep 18, 2024
ec483ba
minor updates
MarcusHolly Sep 18, 2024
dc28584
Modify tear guess
MarcusHolly Sep 18, 2024
520d01a
Remove optimization functions
MarcusHolly Sep 18, 2024
229bcc8
Revert changes to BSM2
MarcusHolly Sep 19, 2024
3b12b77
Clean up files
MarcusHolly Sep 19, 2024
b3fcf2e
Add scaling for metrics
MarcusHolly Sep 19, 2024
08473d6
Add scaling factors for effluent metrics
MarcusHolly Sep 19, 2024
63408ac
Merge branch 'main' into bsm2_P_metrics
MarcusHolly Sep 19, 2024
9d30168
Touch SNOX property
MarcusHolly Sep 19, 2024
0390d43
Add SNOX to custom properties
MarcusHolly Sep 20, 2024
e3b6f8b
Try reverting some changes
MarcusHolly Sep 20, 2024
6877407
Re-add scaling
MarcusHolly Sep 20, 2024
4354d5a
Re-add SNOX
MarcusHolly Sep 20, 2024
a2f512a
Effluent properties don't need to be touched anymore
MarcusHolly Sep 23, 2024
043a544
Add effluent metrics to BSM2-P documentation
MarcusHolly Oct 1, 2024
6c450b4
Tune effluent metric scaling factors for the bio_P=True case
MarcusHolly Oct 1, 2024
4282759
Try removing all scaling factors for effluent concentrations
MarcusHolly Oct 2, 2024
d61ffc9
Merge branch 'main' into myfork-watertap-bsm2_P_metrics
MarcusHolly Oct 2, 2024
845cead
Minor adjustments to AD scaling factors
MarcusHolly Oct 2, 2024
6e215d0
Try more AD scaling changes
MarcusHolly Oct 2, 2024
c957bb6
Revert AD scaling changes
MarcusHolly Oct 2, 2024
bb7db6e
Another attempt at modifying AD scaling
MarcusHolly Oct 2, 2024
fc505ad
Resolve remaining test failures
MarcusHolly Oct 2, 2024
daaefa9
Clean up modified asm2d thermo test
MarcusHolly Oct 2, 2024
f6a7cb6
Address pylint issue
MarcusHolly Oct 2, 2024
399ba95
Initial implementation for effluent constraints
MarcusHolly Oct 2, 2024
65f20fb
Address merge conflicts
MarcusHolly Oct 3, 2024
f8c5366
Fix pylint issue
MarcusHolly Oct 3, 2024
410b6b7
Bio_P=True solving to acceptable level
MarcusHolly Oct 8, 2024
aab4dcc
Clean up BSM2-P flowsheet
MarcusHolly Oct 8, 2024
69d48d4
Update BSM2-P test
MarcusHolly Oct 9, 2024
2c06edc
Add config option for enabling effluent constraints
MarcusHolly Oct 9, 2024
748f619
Try applying new IDAES constraint scaling to bio_P=False
MarcusHolly Oct 9, 2024
473ca0a
temporarily point to IDAES main to access autoscaling tools
adam-a-a Oct 10, 2024
f1d3257
Revert changes to BSM2
MarcusHolly Oct 10, 2024
4e1e83f
Re-add tests for BSM2-P optimization
MarcusHolly Oct 10, 2024
fdea237
Merge branch 'bsm2_P_metrics_constraints' of https://github.com/Marcu…
MarcusHolly Oct 10, 2024
6de5d3c
Add ScalerBase import to testing
MarcusHolly Oct 10, 2024
4484a59
update idaes-pse dependency to tag with autoscaling
adam-a-a Oct 10, 2024
ed8d42c
try dependency on tag again
adam-a-a Oct 10, 2024
fdf252b
Minor flowsheet cleanup
MarcusHolly Oct 10, 2024
54182d0
Merge branch 'bsm2_P_metrics_constraints' of https://github.com/Marcu…
MarcusHolly Oct 10, 2024
c74c6d3
Merge branch 'main' into bsm2_P_metrics_constraints
MarcusHolly Oct 11, 2024
d0745e3
Address typo in thickener
MarcusHolly Oct 11, 2024
3268c23
Address typo in dewatering unit
MarcusHolly Oct 11, 2024
d555946
Test changes to BSM2-P flowsheet
MarcusHolly Oct 24, 2024
3fef663
Correct import in BSM2_P testing
MarcusHolly Oct 24, 2024
c114991
Add try/except to AD initialization
MarcusHolly Oct 24, 2024
2c67477
Test improvements made to bio_P = False configuration
MarcusHolly Nov 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/technical_reference/flowsheets/extended_BSM2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ Additional Variables
"Reactor 6 oxygen mass transfer coefficient",":math:`KLa_{R6}`", "240", ":math:`\text{hr}^{-1}`"
"Reactor 7 oxygen mass transfer coefficient",":math:`KLa_{R7}`", "240", ":math:`\text{hr}^{-1}`"
"Dissolved oxygen concentration at equilibrium",":math:`S_{O, eq}`", "8e-3", ":math:`\text{hr}^{-1}`"
"Maximum total suspended solids concentration", ":math:`TSS_{max}`", "0.03", ":math:`\text{kg/}\text{m}^3`"
"Maximum chemical oxygen demand", ":math:`COD_{max}`", "0.1", ":math:`\text{kg/}\text{m}^3`"
"Maximum total phosphorus concentration", ":math:`P_{max}`", "0.002", ":math:`\text{kg/}\text{m}^3`"
"Maximum total nitrogen concentration", ":math:`N_{max}`", "0.018", ":math:`\text{kg/}\text{m}^3`"
"Maximum 5-day biological oxygen demand", ":math:`BOD5_{max}`", "0.01", ":math:`\text{kg/}\text{m}^3`"

Additional Constraints
----------------------
Expand All @@ -202,6 +207,11 @@ Additional Constraints
"Reactor 5 mass transfer", ":math:`injection_{R5, S_{O2}} = KLa_{R5} * V_{R5} * (S_{O, eq} - S_{O, out})`"
"Reactor 6 mass transfer", ":math:`injection_{R6, S_{O2}} = KLa_{R6} * V_{R6} * (S_{O, eq} - S_{O, out})`"
"Reactor 7 mass transfer", ":math:`injection_{R7, S_{O2}} = KLa_{R7} * V_{R7} * (S_{O, eq} - S_{O, out})`"
"Total suspended solids concentration", ":math:`TSS_{out} <= TSS_{max}`"
"Chemical oxygen demand", ":math:`COD_{out} <= COD_{max}`"
"Total phosphorus concentration", ":math:`P_{out} <= P_{max}`"
"Total nitrogen concentration", ":math:`N_{out} <= N_{max}`"
"5-day biological oxygen demand", ":math:`BOD5_{out} <= BOD5_{max}`"

Future Refinements
------------------
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# update with a tag from the nawi-hub/idaes-pse
# when a version of IDAES newer than the latest stable release from PyPI
# will become needed for the watertap development
"idaes-pse==2.6.0",
"idaes-pse @ git+https://github.com/watertap-org/[email protected]",
]

# Arguments marked as "Required" below must be included for upload to PyPI.
Expand Down
Loading
Loading