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

Allow users to separately set the exchange type for groundwater exchange #135

Open
leendertvanwolfswinkel opened this issue Nov 13, 2024 · 1 comment

Comments

@leendertvanwolfswinkel
Copy link

User story

"I want to schematize a underground stormwater storage facility that is fed from the stormwater system, exchanges with the groundwater, but does not itself directly exchange with the surface"

The image below shows the storage facility in grey and the stormwater system in blue:

image.png

Proposed solution

  • Add a field exchange_type_groundwater to the pipe and connection_node layers (integer Enum)
  • This field can have the values 1 "Isolated" or 2 "Connected"
  • In gridbuilder, this will determine whether or not a 1D-Groundwater link is created, independent from the exchange_type. So any combination of surface water exchange type / groundwater exchange type would be possible
  • In the migration, set exchange_type_groundwater to Isolated if Exchange thickness, Hydraulic conductivity in and Hydraulic conductivity out are all NULL, and to Connected if any of those fields is not NULL
@margrietpalm
Copy link
Contributor

Work in threedi-schema

  • Add enum ExchangeTypeGroundwater to constants.py with values 1 (ISOLATED) AND 2 (CONNECTED
  • Add column exchange_type_groundwater to Pipe and ConnectionNode in models.py
  • Write migration
    • add column to tables
    • set column value: Connected if table.exchange_thickness is not None or table.hydraulic_conductivity_in is not None or table.hydraulic_conductivity_out is not None
    • be aware that both tables have geometries, some magic may be needed to fix that

Work modelchecker

  • Correct values are automatically covert
  • @leendertvanwolfswinkel should a not null check be added for exchange_type_groundwater?

Work gridbuilder

  • Include exchange_type_groundwater in get_pipes and get_connections_nodes in interface/db.py and add to Pipe and ConnectionNode classes
  • Modify Pipe.has_groundwater_exchange and ConnectionNode.has_groundwater_exchange to use exchange_type_groundwater

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