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 2015-08-17 10:28:45

BHW
User
Registered: 2015-08-17
Posts: 3

How to calculate flow in QGis

Hello,
I am wondering if it is possible to measure the discharge water of a section with QGis. I tried it with Crayfisch and Profiletool and doesn't find a solution.

Regards.

Offline

#2 2015-08-17 14:26:32

Florian Hinkelammert
Developer
Registered: 2014-09-09
Posts: 2

Re: How to calculate flow in QGis

Hi BHW,

This can be done in BASEMENT - but not in Postprocessing using QGIS/Crayfish.

Before starting your simulation, you have to define nodestrings - called 'stringdefs' - in the command file and activate 'stringdef_history' as output.
There are several output options for stringdef_history, for example the water discharge, the sediment discharge mean velocity or mean water surface elevation.

Would this work for you?

Offline

#3 2015-08-17 14:39:25

BHW
User
Registered: 2015-08-17
Posts: 3

Re: How to calculate flow in QGis

OK,
I wanted to try to show the evolution of the water discharge during the animation generate by Crayfisch but I will find an other solution.

Thanks for the answer.

Offline

#4 2025-04-20 16:15:46

UP
User
Registered: 2025-03-23
Posts: 14

Re: How to calculate flow in QGis

"Before starting your simulation, you have to define nodestrings - called 'stringdefs' - in the command file and activate 'stringdef_history' as output.
There are several output options for stringdef_history, for example the water discharge, the sediment discharge mean velocity or mean water surface elevation."

Do we need to first define the nodes for the cross-section as defined as for inflow and outflow and define in special output to get the discharge at a cross-section? I saw stringdef and stringdef_values on special output options.

Offline

#5 2025-04-23 18:41:20

Lukas Vonwiller
Developer
Registered: 2014-09-04
Posts: 146

Re: How to calculate flow in QGis

yes, you have to define a stringdef to get the stringdef_history results.

Offline

#6 2025-08-21 07:25:17

Giampietro
User
Registered: 2021-06-25
Posts: 9

Re: How to calculate flow in QGis

Hi, I join the conversation.

In BASEMENT 4.x in the HPC module, should I add "ns_hyd_discharge" as output in order to extract discharge values for a specific stringdef?
Also, if I only need discharge information, does that mean I don’t have to define the stringdef in the "setup" section? Thanks!
In addition the discharge values are in m3/s?

Giampietro

Offline

#7 2025-08-21 09:19:51

Lukas Vonwiller
Developer
Registered: 2014-09-04
Posts: 146

Re: How to calculate flow in QGis

Hi Giampietro

Yes, in BASEMENT 4.x you have to add "ns_hyd_discharge" in your simulation.json for a hydraulic output of all stringdefs. Note that stringdefs are actually defined in the mesh (at the end of the .2dm file), for example:

NS 23 45 55 76 -100 ns_name

This strindef can (but don't have to) be used in the setup (model.json). Therefore, if you want to use the stringdef (e.g. for boundary condition) or get output on the stringdef, you have to add the stringdef in the setup section ("STRINGDEF").

Yes, the discharge unit is in m3/s.

Hope this helps!
Br, Lukas

Offline

#8 2025-08-21 09:46:09

Giampietro
User
Registered: 2021-06-25
Posts: 9

Re: How to calculate flow in QGis

Thank you Lukas,

I forgot to ask. We can extract the value only via the code: "BMv41NodestringResults.py" ? For the version 4.1.0?

Thank you agan!

Offline

#9 2025-08-21 11:09:15

Lukas Vonwiller
Developer
Registered: 2014-09-04
Posts: 146

Re: How to calculate flow in QGis

James wrote:

We can extract the value only via the code: "BMv41NodestringResults.py" ? For the version 4.1.0?.

Maybe that's the most convenient way to extract the values. Alternatively, you could open (software depends on your OS) or read (with any programming language) the "results.h5" file by yourself. In the "BMv41NodestringResults.py" file you can see the relevant path ('/RESULTS/NodeStrg/StateVar/').

Hope this helps!
Br, Lukas

Offline

Board footer

Powered by FluxBB