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

a new function to create 1d2d links on boundary nodes #27

Open
xldeltares opened this issue Nov 29, 2022 · 1 comment
Open

a new function to create 1d2d links on boundary nodes #27

xldeltares opened this issue Nov 29, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@xldeltares
Copy link

xldeltares commented Nov 29, 2022

Is your feature request related to a problem? Please describe.
This feature is related to create correct 1D2D modells for an urba system, i.e. pipes. Currently the 1d_to_2d function will not setup 1d2d links at the boundaries. This is desired for river systems where boundaries have boundary conditions. However, We use hydromt-delft3dfm for setting up both river and pipe systems. In a pipe system, most of the time, a "boundary node" is no different than other nodes, which can interact with 2D layer via 1D2D links. There are indeed exceptions where a downstream boundary node (an outlet) has a boundary condition representing a water level, but we should allow the user to decide whether they want 1D2D links at these exception locations. See a case below.
image

Describe the solution you'd like
The ability to create 1D2D links including all boundaries. or the ability to create 1D2D links for a subset of nodes.

Describe alternatives you've considered
We tested all available functions in hydrolib-core for creating 1d2dlinks, which all failed to deliver the results desired.

_link_from_1d_to_2d:
self.meshkernel.contacts_compute_single(node_mask=node_mask, polygons=polygon)
self._process()
_link_from_2d_to_1d_embedded:
self.meshkernel.contacts_compute_with_points(node_mask=node_mask, points=points)
self._process()
_link_from_2d_to_1d_lateral:
self.meshkernel.contacts_compute_boundary(
            node_mask=node_mask, polygons=polygon, search_radius=search_radius
        )
self._process()

Additional context
Whether this function also needs to be in hydrolib or hydrolib-core. Related issue can be found here: Deltares/HYDROLIB#128

@xldeltares xldeltares added the enhancement New feature or request label Nov 29, 2022
@xldeltares
Copy link
Author

xldeltares commented Dec 12, 2022

Following up this issue with the help from @lucacarniato:

After checking, it is confirmed that the function contacts_compute_single no longer limits the 1D2D links being generated from boundary nodes.

But in the following tests, when creating 1d2d links using the function contacts_compute_single, no 1D2D links are created at the boundary. The node mask suggests that all nodes are used.

Screenshot of the function:
image

values of node mask:
image

Resulting mesh: note how the boundaries don't have green links.
image

@lucacarniato , could you please help again? I am using meshkernel 1.0.0 release and I tried to switch to git main, but did not change the results. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant