METAB-ASM1 Flowsheet - #1804
Open
MarcusHolly wants to merge 75 commits into
Open
Conversation
…plete the model evaluation.
…/watertap into workflow_tutorial
ksbeattie
marked this pull request as ready for review
June 4, 2026 20:07
ksbeattie
requested review from
adam-a-a,
avdudchenko,
ksbeattie,
kurbansitterley and
sufikaur
as code owners
June 4, 2026 20:07
adam-a-a
reviewed
Jun 29, 2026
adam-a-a
reviewed
Jun 29, 2026
adam-a-a
reviewed
Jun 29, 2026
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"]) | ||
| ) |
Contributor
There was a problem hiding this comment.
These are part of AerationTank. Could be cleaner, but then I don't know if you'll have subtle convergence issues to deal with.
Contributor
Author
There was a problem hiding this comment.
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.
adam-a-a
reviewed
Jun 29, 2026
adam-a-a
reviewed
Jun 29, 2026
adam-a-a
requested changes
Jun 29, 2026
adam-a-a
left a comment
Contributor
There was a problem hiding this comment.
LGTM - just a couple of simple changes to make
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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:
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: