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

Fraction analysis tool #1068

Open
12 tasks
leendertvanwolfswinkel opened this issue Nov 19, 2024 · 0 comments
Open
12 tasks

Fraction analysis tool #1068

leendertvanwolfswinkel opened this issue Nov 19, 2024 · 0 comments
Assignees

Comments

@leendertvanwolfswinkel
Copy link
Collaborator

leendertvanwolfswinkel commented Nov 19, 2024

Introduction

Water quality simulations can include multiple substances. An example use case is illustrated in the image below: the user defines 2 zones (A and B); rain that falls in zone A is given a concentration of 100% "Zone A", rain that falls in zone B is given a concentration of 100% "Zone B".

image.png

Downstream, water originating from these two zones mixes, and the user wants to analyse how the composition of the dischare wave changes over time; a name for this analysis is "fraction analysis". The visualisation of such a fraction analysis could look something like in the image below, with the following features:

  • User can display multiple variables (substance concentrations) in one plot
  • The variables can be stacked, i.e. if 30% of the water is from Zone A and 70% from Zone B, it should add up to 100% in the plot.

image.png

Why a separate tool?

The visualisation is very similar to the Time series plotter, so it would make sense to extend the functionality of the Time series plotter to let users makes these kinds of graphs. However, I think this is a bad idea because it would combine to many "dimensions" into one plot: multiple simulations, multiple locations/nodes, multiple variables. A separate tool would make the user experience much cleaner I think.

Suggested implementation

  • Add a new tool to the toolbar, called "Fraction analysis"
  • Fraction analysis is available only when at least one simulation with water quality results has been added to the Results Manager
  • The tool UI is a dockwidget at the bottom, similar to the Time series plotter
  • Opening the tool again creates a new tab in the dockwidget, to allow users to compare (similar to the logic in e.g. the Side view tool)
  • The user selects a simulation from a dropdown menu. The dropdown contains all simulations with water quality results that were added to the Results Manager. It should default to e.g. the first/last/top/bottom simulation in the Results Manager with WQ results.
  • The user selects the y axis units from a dropdown menu. The dropdown contains all unique units defined in the simulation. Example, a simulation has the following substances:
    • Substance A (%)
    • Substance B (%)
    • Substance C (g/L)
    • Substance D (mg/L)
    • Substance E (None)
      The dropdown will contain the options "%", "g/L", "mg/L", "-". We may add support for converting g/L to mg/L later, but I think we can leave that out atm.
  • The user can pick a single node/cell to visualize in the plot. Note that it the map tool should only be active for nodes/cells that belong to the selected simulation's computational grid.
  • Once the user has clicked a node/cell, the substances with the selected unit are added to the plot. E.g. the user has chosen % as y axis unit, so Substance A and Substance B are added to the plot
  • If the user changes the y-axis units, the substances with that unit are displayed in the plot.
  • Option to changes the time units, similar to Time series plotter
  • Legend, containing columns "active", "pattern", and "substance"
  • Option to switch "Stacked" on and off. If switched off, lines are displayed without fill, each of them drawn at their actual value (i.e. not added together). If switched on, the lines are displayed with fill. The color of the fill should have 50% of the saturation of the line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants