Skip to content

METAB-ASM1 Flowsheet - #1804

Open
MarcusHolly wants to merge 75 commits into
watertap-org:mainfrom
MarcusHolly:metab_bsm2
Open

METAB-ASM1 Flowsheet#1804
MarcusHolly wants to merge 75 commits into
watertap-org:mainfrom
MarcusHolly:metab_bsm2

Conversation

@MarcusHolly

@MarcusHolly MarcusHolly commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Fixes/Resolves:

Replaces #1595 and builds on top of #1635

Summary/Motivation:

Creates a flowsheet where the effluent from METAB is treated as the feed into the ASM1 process

Changes proposed in this PR:

  • Creates METAB-ASM1 flowsheet
  • Adds testing

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.

Maojian Wang and others added 30 commits May 30, 2025 16:05
@MarcusHolly MarcusHolly self-assigned this Jun 1, 2026
@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Jun 4, 2026
@ksbeattie
ksbeattie requested a review from luohezhiming June 4, 2026 20:07
@ksbeattie
ksbeattie marked this pull request as ready for review June 4, 2026 20:07
Comment thread watertap/flowsheets/METAB/model_connector.py Outdated
Comment thread watertap/flowsheets/METAB/METAB_ASM1_flowsheet.py Outdated
Comment on lines +188 to +206
@m.fs.R3.Constraint(m.fs.time, doc="Mass transfer constraint for R3")
def mass_transfer_R3(self, t):
return pyo.units.convert(
m.fs.R3.injection[t, "Liq", "S_O"], to_units=pyo.units.kg / pyo.units.hour
) == (
m.fs.R3.KLa
* m.fs.R3.volume[t]
* (m.fs.S_O_eq - m.fs.R3.outlet.conc_mass_comp[t, "S_O"])
)

@m.fs.R4.Constraint(m.fs.time, doc="Mass transfer constraint for R4")
def mass_transfer_R4(self, t):
return pyo.units.convert(
m.fs.R4.injection[t, "Liq", "S_O"], to_units=pyo.units.kg / pyo.units.hour
) == (
m.fs.R4.KLa
* m.fs.R4.volume[t]
* (m.fs.S_O_eq - m.fs.R4.outlet.conc_mass_comp[t, "S_O"])
)

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.

These are part of AerationTank. Could be cleaner, but then I don't know if you'll have subtle convergence issues to deal with.

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 does result in convergence issues... I can try to diagnose tomorrow, and if I can't find a solution, I can make an issue to revisit this in the future.

Comment thread watertap/flowsheets/METAB/model_connector.py Outdated
Comment thread watertap/flowsheets/METAB/METAB_BSM1_flowsheet.py

@adam-a-a adam-a-a 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 couple of simple changes to make

@MarcusHolly
MarcusHolly requested a review from adam-a-a July 20, 2026 15:54
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.

4 participants