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

Wrap 0D Fixed Bed TSA unit model in extra_models/fixed_bed_tsa0d for Flowsheet Processor UI #1493

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

Conversation

dangunter
Copy link
Member

@dangunter dangunter commented Oct 2, 2024

Fixes

Documentation: https://idaes-pse.readthedocs.io/en/latest/reference_guides/model_libraries/models_extra/temperature_swing_adsorption/fixed_bed_tsa0d.html
Example: https://idaes-examples.readthedocs.io/en/latest/docs/flowsheets/temperature_swing_adsorption/temperature_swing_adsorption_doc.html

Summary/Motivation:

Initial UI wrapper for IDAES

Changes proposed in this PR:

  • Wrap the model so it can be displayed in the Flowsheet Processor UI

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.

@dangunter
Copy link
Member Author

dangunter commented Oct 3, 2024

One issue I see immediately is that the "model options" for the TSA has a number of values and they will probably be changed at the same time / along with the model's other parameters and variables. However currently the UI sets these options in different, initial step, as shown by this screenshot for a watertap model:

image

This is, imho not ideal. We should have these sorts of model options more included in the main configuration page, even though they are not Pyomo vars.

@Daison2102 Do I have this roughly right about the FixedBedTSA0D model class?
@sspoon, @MichaelPesce thoughts on the design?

@MichaelPesce
Copy link

@dangunter the original purpose of those options were to allow for pre-build configurations, so it had made sense to be able to view them before running the build. however, they should also be available from the main workflow (after build step), where the model can be re-built with different model configurations

@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Oct 3, 2024
@dangunter
Copy link
Member Author

@MichaelPesce ok, though I think it might be better to have them as normal parameters

@dangunter dangunter assigned CopyDemon and unassigned dangunter Oct 17, 2024
@lbianchi-lbl lbianchi-lbl changed the title Wrap 0D Fixed Bed TSA unit model in extra_models/fixed_bed_tsa0d for Flowsheet Runner UI Wrap 0D Fixed Bed TSA unit model in extra_models/fixed_bed_tsa0d for Flowsheet Processor UI Nov 4, 2024
Copy link
Contributor

@lbianchi-lbl lbianchi-lbl left a comment

Choose a reason for hiding this comment

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

Before merging, we should (* denotes items that are not strictly required):

  • Add a dev dependency on idaes-flowsheet-processor @ git+https://github.com/watertap-org/idaes-flowsheet-processor@0.1.dev1
  • (*) Add an entry point in setup.py pointing to the idaes.model_extra.temperature_swing_adsorption.fixed_bed_tsa0d_ui module under the idaes.flowsheets group
  • (*) Enable testing using the idaes-flowsheets pytest plugin

UI exports for 0D Fixed Bed TSA unit model.
"""
from datetime import datetime
from watertap.ui import fsapi as api
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
from watertap.ui import fsapi as api
from idaes_flowsheet_processor import api

import pytest
import logging
import pandas as pd
from idaes.models_extra.temperature_swing_adsorption.util import tsa_summary
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
from idaes.models_extra.temperature_swing_adsorption.util import tsa_summary
from idaes.models_extra.temperature_swing_adsorption.util import tsa_summary
pytest.importorskip("idaes_flowsheet_processor.api", reason="idaes-flowsheet-processor must be installed to run this test")

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.

5 participants