User Forum of Software BASEMENT

BASEMENT
Basic Simulation Environment for computation of environmental flow and natural hazard simulation
Laboratory of Hydraulics, Hydrology and Glaciology (VAW)
ETH Zurich
Basement_Logo

You are not logged in.

#1 2023-07-05 14:13:13

Loriann
User
Registered: 2023-07-05
Posts: 11

STRINGDEF : how to know if upstream is left or right ?

In BASEMENT v4.0.1, geometry setup, I would like to have 2 strings, "inflow" and "outflow", which I have defined as lines in a layer in QGIS and included in the mesh generation. Now how do you know whether upstream is left or right to the string ? This info is needed in the model setup but I am not able to know the element or node IDs in QGIS, so I don't know which way it goes.

Thanks

Offline

#2 2023-07-06 07:26:57

Matthias Bürgler
Developer
From: Zürich
Registered: 2019-04-04
Posts: 150

Re: STRINGDEF : how to know if upstream is left or right ?

Hi Loriann,

I usually do this the following way:

1. Open .2dm in a text editor and scroll to the last lines where the nodestrings are defined, i.e. lines starting with NS and ending with the stringdef names.
2. Note the ID of the first node of the each nodestring.
3. Check the choordinates of the first node in .2dm file (nodes start with ND, first column is the ID, second to fourth column are the x-, y-, and z-coordinates).
4. Find the location of the first node in the mesh in QGIS.
5. Imagine that you are standing on the first node and look in the direction of the nodestring.
6. Determine whether the upstream direction is on your left or right.

I hope this helps.

Best regards,
Matthias

Offline

#3 2023-07-06 09:26:57

Loriann
User
Registered: 2023-07-05
Posts: 11

Re: STRINGDEF : how to know if upstream is left or right ?

Hi Matthias,

Yes it helps, thank you, but it is a bit tedious so I have a following question for next time :

When I drew my string lines in QGIS I was careful to draw both of them from the left bank to the right bank (looking downstream), and set the upstream to "right" in BASEMENT. I checked the node number like you recommended and it does work. So is it so that if you draw the string from left to right bank you can set the upstream to "right", or was I just lucky this time and will have to check everytime the node ID in the text editor ?

Offline

#4 2023-07-06 09:35:30

Matthias Bürgler
Developer
From: Zürich
Registered: 2019-04-04
Posts: 150

Re: STRINGDEF : how to know if upstream is left or right ?

Hi Loriann,

That's correct. The direction of drawing the nodestring matters. If you know how the nodestring was drawn, you should be able to predict the upstream direction and can avoid this tedious procedure.

Offline

#5 2023-08-17 10:24:20

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 278

Re: STRINGDEF : how to know if upstream is left or right ?

Hi y'all
There's something I do with QGIS to know the direction: change the style of the stringdef layer. I do as follows

  • double click on the layer

  • click on symbology

  • select the 'simple red line style' from the ones suggested

  • click on the '+' in the upper right corner

  • under 'Symbol layer type' select 'marker line'

  • select the 'Simple marker' (should be a red dot)

  • at the bottom select the triangle from the first line of suggested symbols

  • insert 90° as value under 'Rotation'

  • click 'apply

Now you have a line with triangles pointed in the direction of the line-digitalization. If you imagine yourself walking on that line in the direction pointed by the triangles, you will know whether upstream is right or left!

Offline

Board footer

Powered by FluxBB