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

Support combined supply and drainage #2059

Open
visr opened this issue Feb 13, 2025 · 0 comments
Open

Support combined supply and drainage #2059

visr opened this issue Feb 13, 2025 · 0 comments
Assignees
Labels
needs-refinement Issues that are too large and need refinement physics Physical process representation ribasim-nl Related to Ribasim NL project

Comments

@visr
Copy link
Member

visr commented Feb 13, 2025

Over Outlets and Pumps in the text below I only mention Outlets for brevity. Related to Deltares/Ribasim-NL#221

For Ribasim-NL we want to model Outlets and enable flow over them in two cases:

  • drainage of upstream Basin: set appropriate min_upstream_level and max_downstream_level, $D_u$ and $D_d$
  • supply of downstream Basin: set appropriate min_upstream_level and max_downstream_level, $S_u$ and $S_d$

Now we want to model a single structure that can be used for both cases. We can use two parallel Outlet nodes as done in this test model. This has some issues:

  • In the Dutch model many structures will need two nodes, not ideal for recognizability
  • If we have simultaneously drainage and supply we'd get double flows. This can happen if upstream water levels are too high, and downstream too low, although in practice I suspect this won't be reached quickly because the supply and drainage cases would each work against getting here.

@ghendrickx proposed adding this scenario directly to Ribasim, for instance by having two rows in the static table with the same control_state. With this we can set flow for supply OR drainage to avoid double flows. If we were to allow different Q for the two cases we'd also need a way to select the right Q. So perhaps it would be wise to stick to a single Q.

This explains the situation in a h-h plot where upstream level (Hu) is on one axis and downstream level (Hd) on the other:
Image

Another way to implement this is to use DiscreteControl with 4 conditions:

  1. $h_u > D_u$
  2. $h_u > S_u$
  3. $h_d > D_d$
  4. $h_d > S_d$

If we encode this using the logic table, such that FTFF means only condition 2 is true, we can fill in our plot:

Image

This would allow us to avoid double flows. One difference with using min_upstream_level and max_downstream_level is that there are no reduction factors, which may increase simulation time if there is frequent switching between cases. Although we can combine the two approaches. If we have control_state S, D, and S+D, we can easily determine appropriate flow_rate for each, and set min_upstream_level and max_downstream_level as well to still get reduction factors at the edges of our cases. These should then only be set for S and D, not S+D because you don't want to reduce flows when moving from S+D to S or D.

I think the DiscreteControl option is preferable to double Outlets. But in discussing the issues users can have with double Outlets the idea of compound structures came up, so I created #2074 for that.

@github-project-automation github-project-automation bot moved this to To do in Ribasim Feb 13, 2025
@SnippenE SnippenE moved this from To do to Sprint backlog in Ribasim Feb 13, 2025
@visr visr changed the title Support combined supply and drainage over Outlets Support combined supply and drainage over Outlets and Pumps Feb 13, 2025
@SnippenE SnippenE added ribasim-nl Related to Ribasim NL project physics Physical process representation labels Feb 13, 2025
@evetion evetion added the needs-refinement Issues that are too large and need refinement label Feb 13, 2025
@visr visr changed the title Support combined supply and drainage over Outlets and Pumps Support combined supply and drainage Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-refinement Issues that are too large and need refinement physics Physical process representation ribasim-nl Related to Ribasim NL project
Projects
Status: Sprint backlog
Development

No branches or pull requests

3 participants