Skip to content

Add METAB Models and Integrate with BSM2 Flowsheet #1595

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

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

Morgan88888888
Copy link

@Morgan88888888 Morgan88888888 commented Jun 16, 2025

Summary/Motivation:

This PR serves as the central hub for all models related to the METAB project. The goal of the project is to evaluate the performance of the Encapsulated Two-Stage Anaerobic Biological (METAB) system as part of a wastewater treatment plant. The original METAB model was developed in the QSD-San platform [1] and has been adapted for integration with the BSM flowsheet in WaterTAP.

To enable this integration, a surrogate modeling infrastructure was developed to interface with the external METAB model, generate samples, and train surrogate models. These surrogate models are used to predict key outputs required by the BSM flowsheet.

[1] Zhang, Xinyi, et al. "Prioritization of early-stage research and development of a hydrogel-encapsulated anaerobic technology for distributed treatment of high strength organic wastewater." Environmental Science & Technology 58.44 (2024): 19651-19665.

Changes proposed in this PR:

  • METAB Models
  • BSM Flowsheet integration

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.

# "https://github.com/watertap-org/watertap/"
#################################################################################

# Model example , which needs to run in QSD-San evironment
Copy link
Contributor

Choose a reason for hiding this comment

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

One instance of running qsdsan purely


# input space generation

import csv
Copy link
Contributor

Choose a reason for hiding this comment

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

take input data, run qsdsan simulation, export outputs

@@ -0,0 +1,116 @@
{
Copy link
Contributor

@adam-a-a adam-a-a Jun 18, 2025

Choose a reason for hiding this comment

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

Demo-not complete yet

@@ -0,0 +1,21 @@
inf_fr,temp,hrt
9.62,24.21,9.97
Copy link
Contributor

Choose a reason for hiding this comment

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

after sampling

@adam-a-a adam-a-a marked this pull request as draft June 18, 2025 18:44
@adam-a-a
Copy link
Contributor

@lbianchi-lbl any guidance on whether adding exposan as an optional dependency would be OK or raise issues?

@lbianchi-lbl lbianchi-lbl added the Priority:Normal Normal Priority Issue or PR label Jun 26, 2025
@lbianchi-lbl
Copy link
Contributor

The additional dependencies are needed to create (train) the surrogate models. An alternative to this could be to use a separate workflow to create the surrogate models and commit the serialized models to the WaterTAP codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iedo Priority:Normal Normal Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants