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

Add ability to specify graphs to add to the WaterTAP UI output #1293

Open
dangunter opened this issue Feb 7, 2024 · 0 comments
Open

Add ability to specify graphs to add to the WaterTAP UI output #1293

dangunter opened this issue Feb 7, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request Priority:Low Low Priority Issue or PR

Comments

@dangunter
Copy link
Collaborator

Description

Extend the export API to allow construction of user-specified graphs for display of results.

Motivation

The ability to draw arbitrary plots to accompany flowsheet solutions would be very useful and cover a wide range of use-cases for simple analysis.

Possible Implementation

Add a new callback to the export that populates a data structure for graphing (and probably laying out those graphs) in a new panel on the WaterTAP UI front end. The callback has access to the entire model and construct Plot.ly JavaScript data structures for a very flexible way to do bar, scatter, etc. charts.

We can also add a 2nd callback to use for parameter sweeps, which would be given the list of solved flowsheets. It would probably be nice to have some utility function to easily get the same variable from each flowsheet in the list and transform that into a vector, e.g. x_values = get_vector(flowsheets, "fs.output.name.of.the.var[0]").

There may even be some clever way to use the specification of the 1st callback to automatically generate some graphs for the 2nd one. ¯\_(ツ)_/¯

Additional Context

Thought of this while incorporating a PROMMIS flowsheet that had a whole bunch of chemical species concentrations and mass fractions (on the outlets) that would probably be best visualized with a bar chart (or similar)

@dangunter dangunter added the enhancement New feature or request label Feb 7, 2024
@ksbeattie ksbeattie added the Priority:Low Low Priority Issue or PR label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Priority:Low Low Priority Issue or PR
Projects
None yet
Development

No branches or pull requests

3 participants