Modeller Interface

Viewing results with the Modeller Interface

Results

After a simulation is finished the results will be stored on our servers for 7 days. The files can be download via the RESULTS button in the “3Di Models and Simulations”. These files are a gridadmin.h5, results_3di.nc (the NetCDF) and log files. For information on the results, see Results 3Di.

Example CSV

These same files can be extracted from lizard, including post-processing maps that are created when ‘Post-processing in Lizard’ is activated in the wizard. See :ref:`simulate_api_qgis_post_processing`.

After download the NetCDF can be loaded together with the spatialite using the 3Di Toolbox as described below.

Overview of the 3Di Toolbox

After installation of the plugin a toolbar is added to the QGIS interface. The different tools are explained below. In the Modeller Interface the 3Di toolbar is directly available.

Plugin overview
  1. Clear cache

  2. Load 3Di model and results

  3. Toolbox for working with 3Di models

  4. Graphs of time series

  5. Side view tool

  6. Statistical tool

  7. The water balance tool

  8. Animation tool

Load 3Di model and results

A model schematisation can be loaded by clicking the database icon with the blue plus-sign (number 2 in the Figure above). A new window will be opened.

1) Under ‘Model’ you need to load the Sqlite containing your model In case you are loading you model schemetisation for checking and editing your Sqlite, step 2 is not necessary. 2) Under ‘Results’ you can load the NetCDF containing your simulation results (usually named results_3di.nc). It is important to select a result file that belongs to the model you used for your simulation (i.e. your NetCDF must be generated by the sqlite you loaded. Do not use an old or changed Sqlite). 3) After the loading finished, click ‘Close’ to return to the QGIS interface

Load 3Di model and results

Analyzing results with the modeller interface

Viewing and Analysing 3Di results

We have various tools developed to assist users in analysing a viewing their results. In this section, some of these are described.

The water balance tool

The water balance tool computes the water balance in a sub-domain of your model. It uses the incoming and outgoing flows in that domain and visualizes the various contributions of the flow in graphs. The development was an initiative of Deltares and jointly developed with Nelen & Schuurmans. The water balance tool is co-funded by the Top Sector Water (Ministry of Economic Affairs)

This is the only results tool that requirers the generation of specific results. Therefore, we also discuss the input requirements of this tool.

Settings to use the water balance tool

To be able to use the water balance tool, aggregated results are required for a range of variables. This to ensure, that the shown water balance is consistent and complete.

The aggregation settings can be found and configured in the spatialite-table v2_aggregation_settings. For more information on the aggregation settings, see Aggregated output. The default settings for the water balance tool are listed below.

Table 1 Aggregation settings for water balance tool

id

timestep

var_name

aggregation_in_space

aggregation_method

flow_variable

1

300

pump_discharge_cum

FALSE

cum

pump_discharge

2

300

lateral_discharge_cum

FALSE

cum

lateral_discharge

3

300

simple_infiltration_cum

FALSE

cum

simple_infiltration

4

300

rain_cum

FALSE

cum

rain

5

300

leakage_cum

FALSE

cum

leakage

6

300

interception_current

FALSE

current

interception

7

300

discharge_cum

FALSE

cum

discharge

8

300

discharge_cum_neg

FALSE

cum_negative

discharge

9

300

discharge_cum_pos

FALSE

cum_positive

discharge

10

300

volume_current

FALSE

current

volume

11

300

qsss_cum_neg

FALSE

cum_negative

surface_source_sink_discharge

12

300

qsss_cum_pos

FALSE

cum_positive

surface_source_sink_discharge

Of course, the time step, cq, the period over which is aggregated, is adjustable. For new models, these settings are included in the empty spatialite database (empty_database). For existing models, these settings must be added to the v2_aggregation_settings -table. These SQL queries will help you in doing so:

Empty v2_aggregation_settings table:

DELETE FROM v2_aggregation_settings;

Add aggregation settings for all rows in the global settings table:

INSERT INTO v2_aggregation_settings(global_settings_id, var_name, flow_variable, aggregation_method, aggregation_in_space, timestep)
SELECT id, 'pump_discharge_cum', 'pump_discharge', 'cum', 0, output_time_step FROM v2_global_settings
UNION
SELECT id, 'lateral_discharge_cum', 'lateral_discharge', 'cum', 0, output_time_step FROM v2_global_settings
UNION
SELECT id, 'simple_infiltration_cum', 'simple_infiltration', 'cum', 0, output_time_step FROM v2_global_settings
UNION
SELECT id, 'rain_cum', 'rain', 'cum', 0, output_time_step FROM v2_global_settings
UNION
SELECT id, 'leakage_cum', 'leakage', 'cum', 0, output_time_step FROM v2_global_settings
UNION
SELECT id, 'interception_current', 'interception', 'current', 0, output_time_step FROM v2_global_settings
UNION
SELECT id, 'discharge_cum', 'discharge', 'cum', 0, output_time_step FROM v2_global_settings
UNION
SELECT id, 'discharge_cum_neg', 'discharge', 'cum_negative', 0, output_time_step FROM v2_global_settings
UNION
SELECT id, 'discharge_cum_pos', 'discharge', 'cum_positive', 0, output_time_step FROM v2_global_settings
UNION
SELECT id, 'volume_current', 'volume', 'current', 0, output_time_step  FROM v2_global_settings
UNION
SELECT id, 'qsss_cum_pos', 'surface_source_sink_discharge', 'cum_positive', 0, output_time_step FROM v2_global_settings
UNION
SELECT id, 'qsss_cum_neg', 'surface_source_sink_discharge', 'cum_negative', 0, output_time_step FROM v2_global_settings
;

Note that the above query sets the aggregation time step equal to the output time step. If you want to use different aggregation time step, make sure to use the same time step for all aggregation variables in order to enable the use of the water balance tool.

UPDATE v2_aggregation_settings SET time_step = [fill in a number];

Using the water balance tool

In a few steps, one can get insight in the water balance of their own system.

  1. Define a spatialite and the results that are to be analysed by loading your model and results using the ‘Select 3Di results’-button in the toolbox.

  2. The water balance tool is activated by clicking the balance icon in the 3Di-Toolbox bar.

3Di Toolbox Bar

In case, the aggregated results are missing or incomplete the following error pops up:

Error no aggregation settings
  1. Draw a polygon to define the domain of the model for the area of interest. This can be done by clicking at multiple locations within the model domain. Click Finalize polygon to finish the polygon. The graph shows the water balance over time for the selected area.

  2. By right-clicking the graph, a menu appears in which the range of the x-axis and y-axis can be adjusted. The visible x-axis determines the period over which the water balance is calculated.

  3. The button Hide on map the polygon over which the water balance is calculated is hidden.

Draw polygon to define water balance area

Display settings

  1. The different colours show the different flow types, explained in the legend on the right.

  2. By hovering over a flow type in the legend, the corresponding plane lights up in the graph and the corresponding flow lines will be marked with red dotted lines in the map of the model.

  3. The different flow types can be activated and deactivated in the graph by clicking the box next to the flow type name.

  4. All flow types can be activated or deactivated using the buttons activate all and deactivate all.

  5. In the water balance menu different display options can be chosen. In the first drop-down menu (default = ‘1d and 2d’) you can choose to display only 1D-flow (‘1d’) or 2D-flow (‘2d’) or both (‘1d and 2d’).

  6. In the second drop-down menu (default = ‘everything’) you can choose to display all flows (‘everything’) or only the main flows (‘main flows’).

  7. In the last drop-down menu (default = ‘m3/s’) you can choose to display flow (‘m3/s’) or cumulative volume (‘m3’).

Note: the different flow types are ‘stacked’ in the graph. This means the flow volumes are added to each other when activating multiple flow types.

Volume change is shown in the graph as well. In this case, the volume change is the result of the total positive and negative flow (inflow and outflow of the area). The volume change is not stacked but shown as a separate line in the graph.

Marked flow types

Total balance

  1. By clicking the button Show total balance a new screen will pop-up, showing the total volume balance over the period set on the x-axis of the graph (shown in title).

  2. To adjust this period, close the screen with the bar diagrams, right click on the water balance graph, open the option x-axis, activate the option manual and set the minimum and maximum time. Then, click again on Show total balance to create the water balance diagrams for the new time range.

Adjust axis range

The top diagram shows the net water balance from all domains. The bottom diagrams show the water balance per domain.

Total balance

It is possible to save the graphs as an image or export the water balance data to a CSV-file.

  1. To save an image of the graphs, right-click on one of the graphs. Choose ‘Export’ in the menu that opens. A new window opens.

  2. In the first box you can choose the items you want to export. Click ‘Entire Scene’ to export all graphs or choose one of the ‘Plot’-items to export a graph seperately.

  3. In the second box you can choose the export format. Choose ‘Image file’ for an image and choose ‘CSV from plot data’ to export the actual data.

  4. Click ‘Export’ to generate your figure.

Export waterbalance graph

Explanation of flow types

In the overviews the flow is split in several domains. These distinguish themselves based on how the flow is computed. Therefore, you will find the 2D flow, groundwater and the 1D flow domain. Below a more detailed doscription of the various components.

2D Surface water domain

  • 2D Boundary flow: Inflow and outflow through 2D boundaries

  • 2D Flow: Inflow and outflow in the surface domain crossing the borders of the polygon

  • Lateral flow to 2D: Sources or sinks based on 2D laterals

  • 2D: 2D flow to 1D: Flow exchange between the 2D surface domain and the 1D network elements within your polygon (for example, surface run-off from rain into a 1D-channel or water that overflows the banks in your channel).

  • 2D: 2D flow to 1D (domain exchange): Flow exchange between the 2D surface domain and the 1D network elements crossing the borders of your polygon

  • In/exfiltration (domain exchange): Flow exchange between the 2D surface domain and the 2D groundwater domain

  • Rain: Incoming water from rain

  • Constant infiltration: Flow out of the 2D domain based on simple infiltration

  • Interception: Intercepted volume

2D Groundwater domain

  • Groundwater flow: Inflow and outflow through the 2D groundwater domain crossing the borders of your polygon

  • In/exfiltration (domain exchange): Flow exchange between the 2D surface domain and the 2D groundwater domain (generally inflowing water through infiltration).

  • Leakage: sources or sinks based on leakage

1D Network domain

  • 0D Rainfall runoff on 1D: Inflow volume from 0D module

  • 1D Boundary flow: Inflow and outflow over a 1D boundary

  • 1D Flow: Inflow and outflow in 1D network elements crossing the borders of your polygon

  • 1D Laterals: Sources and sinks based on 1D laterals

  • 1D: 2D flow to 1D: Flow exchange between the 2D surface domain and the 1D network elements (e.g. surface runoff from rain into a 1D-channel) within your polygon

  • 1D: 2D flow to 1D (domain exchange) Flow exchange between the 2D surface domain and the 1D network elements crossing the borders of your polygon

  • Pump: pumped volume

Graphs of time series

The graph tool can be used for visualizing model results over time. for example, it allows users to quickly plot the water level variation of a specific node or the discharge variation of a flow link (e.g. a channel or pipe) over time. The information is quickly at hand in just a few steps. All the variable that are saved in the NetCDF are available. They are structured on flow lines and nodes, depending on how they are defined in the computational core. An overview of the variables in the NetCDF can be found in the section Results 3Di.

The following steps are required to view your results: 1) First, make sure you have loaded a model schematisation and the corresponding results (NetCDF) into your QGIS project using Load 3Di model and results. 2) Activate the graph tool by clicking the graph button in the 3Di toolbar. A new panel with the title 3Di result plots is launched in your QGIS-project. 3) In the layer overview window go to the layer group results: results_3di and activate the ‘flow-lines’ layer or the ‘nodes’ layer:

Results layers
  1. Activate the Select features tool in QGIS, by clicking this logo in the Attributes toolbar from QGIS:

Selection tool
  1. Select the specific nodes or flow lines. You can select multiple nodes or flow lines simultaneously, but for speed purposes it is advised to limit it to a maximum of 20 features.

  2. Click the Add button in the 3Di results plot panel. The results for the selected features are loaded from the NetCDF and visualized over time in the graph.

Results graph example
  1. You can switch between node and flow line results by activating the tab Q-graph for flow lines and H-graph for nodes.

  2. In the drop-down menu on the right side of the panel you can choose the type of results you want to see. The y-axis shows the corresponding range and unit of the results type. The x-axis shows the time. Note: the time is often displayed in kilo-seconds (ks). 1 ks = 1000 seconds ≈ 16.7 minutes.

  3. Below the drop-down menu there is an overview of the nodes/flow lines you selected, with the id of the node/flow line and the type. In this overview you can activate or deactivate the results in the graph by clicking the checkbox next to it. A feature can be deleted by first selecting it in this overview and then clicking the Delete button below the overview.

  4. The data from the graph can also be exported to an image or csv-file. Right-click the the graph figure and choose ‘Export’ from the drop-down menu. A new window pops-up in which you can choose the output format and settings.

Animation tool

To understand the behaviour of your water system, it is important to get insight in the flow that changes in space and in time. The Animation tool allows a spacial view of the results, which can be played back and forth in time. Water level, velocities and discharges can be visualized by this tool.

  1. Activate the Animation tool by clicking ‘Animation on’. A blue progress bar appears at the top of the map-window. Wait till this progess bar has disappeared before you continue.

  2. The first drop-down menu defines the kind of results you will see on the flow lines (e.g. discharge, velocity).

  3. The second drop-down menudefines the kind of results you will see on the nodes (e.g. water level).

  4. The slider scrolls through time and allows you to go back and forth through the results of your simulation.

  5. The timestep of the slider is shown in the box on the right side. Time notation is in DAYS:HOURS:MINUTES from the start of the simulation.

Animation on bar

When the Animation tool is activated, temporary layers are created to show the chosen results:

Animation layers

The thickness of the lines scale with the the size of the flow over the lines. The arrows indicate the flow direction. The colours of the nodes, represent different values of the node results.

When groundwater is not used in the model, the layers ‘line_results_groundwater’ and ‘node_results_groundwater’ can be turned off.

An example of the animated flow lines is shown in the figure below.

Animation flow

Here, the purple arrows show flow over the 2D domain. The pink arrows show the flow from the 1D domain to the 2D domain or vice versa. In this case this is flow from the terrain into a sewerage manhole. The blue arrows show the flow in the 1D network.

The line results can also be filtered to distinguish between type of flow. To do this, right click on the ‘line_results’ layer and choose ‘Filter’ from the drop-down menu. A new window will pop up:

Filter

Double click on ‘type’ and click ‘Sample’ to see which types are available. In the ‘filter expression’ field you can specify the types of flow lines you want to show, e.g. “type” = ‘2d’. In the Figure below, an example of filtered 2D flow is shown.

Filter

Side view tool

Sideview tool
  1. Activate the Show side view tool by clicking the map icon in the 3Di toolbar.

  2. A new panel opens. Click ‘Choose sideview trajectory’.

  3. A new layer is created and is directly shown with yellow lines. These yellow lines are all possibile trajectories for a sideview. Choose a starting point by clicking on a yellow line (point A). By clicking on a second yellow line (point B), the end of your trajectory is defined. The tool automatically detects the shortest route from point A to B. The trajectory is shown as a red line on the map. The sideview of this trajectory is shown in the graph.

  4. A trajectory can contain multiple points. Just click on the next point on the yellow line (point C) and the sideview of the shortest route from point B to C is automatically added to the graph.

  5. The graph contains the following elements:

    1. The pipe/channel dimensions, represented by the grey area.

    2. Dimensions and locations of manholes.

    3. Green line: surface levels of manholes

    4. Green dotted line: drain levels of manholes

    5. Blue line: the water level.

  6. The slider in the Animation tool can be used to scroll through time.

Statistical tool

The statistical tool can ben used to calculate sewerage statistics from 3Di results. To use it, first make sure you load a 3Di model together with the results you want to calculate the statistics from.

Statistical Tool
  1. Activate the Statistical Tool by clicking the statistics icon in the 3Di toolbar. The tool will immediately start calculating the statistics and a progressbar at the top of the map window shows the progress.

  2. When the calculations are finished, new layers are added to the QGIS project. These layers contain statistics from the 3Di results on pipes, manholes, pumps and weirs. The layers are explained below.

Note: DWF = Dry Weather Flow, CSF = Combined Sewer Flow, SWF = Storm Water Flow

Metadata_statistics

  • table: Refers to the table, see below

  • field: Refers to the fieldname, see below

  • from_agg: If set to 0 the statistics are derived using actual values on the output time step. This is the case if no aggregation value is available. Not using an aggregation netcdf makes the statistics derived using this tool less accurate

  • input_param: For advanced users: Refers to the input parameter from the NetCDF

  • timestep: When not derived from aggregation netcdf it is important what timestep has been used. It gives an indication of the accuracy of the value.

Pipes

  • Discharge (max): Maximum discharge which occurs during the simulation

  • Velocity (max): Maximum velocity which occurs during the simulation

  • Gradient (max): Maximum gradient of the waterlevel in the pipe

  • Velocity (end): Velocity in the pipe occuring at the last timestep

  • Velocity DWF and CSF (end): Velocity at the last timestep for DWF and CSF pipes

  • Velocity SWF (end): Velocity at the last timestep for SWF pipes

Manholes

  • Fill level (max): Percentage of manhole that is filled based on maximum water level occuring during the simulation

  • Fill level DWF and CSF (end): Percentage of manhole that is filled based on water level at the last time step of the simulation for DWF and CSF manholes.

  • Fill level SWF (max): Percentage of manhole that is filled based on water level at the last time step of the simulation for SWF manholes.

  • Duration of water on street: The total amount of time the water level in the manhole is higher than the surface level of the manhole during the simulation. Note that the unit is in hours, so 0.25 hr means 15 minutes.

  • Waterdepth (max): The max water depth above the manhole surface level that is occuring during the simulation. Values greater than 0 mean there is water on the street.

  • Waterdepth DWF and CSF (max): The max water depth above the manhole surface level that is occuring during the simulation for DWF and CSF manholes. Values greater than 0 mean there is water on the street.

  • Waterdepth SWF (max): The max water depth above the manhole surface level that is occuring during the simulation for SWF manholes. Values greater than 0 mean there is water on the street.

Pumps

  • Percentage of pump capacity in use (max): The percentage of the total pump capacity that is used at the moment the pump is pumping at max.

  • Percentage of pump capacity in use (end): The percentage of the total pump capacity that is used at the last time step of the simulation.

  • Total pumped volume: The total volume that is pumped over the entire simulation.

  • Pump duration on max capacity: The total amount of time the pump is pumping at its max capacity.

Weirs

  • Head difference (max): The maximum difference in head between the two sides of the weir.

  • Overflow volume (cum): The total cumulative volume that has flown over the weir.

Calculate waterdepth and waterlevel maps

The tool is location in the Processing Toolbox. It can be found via the menu, click ‘Processing’, then ‘Toolbox’. The following window will appear. If there are a lot of tools you can use the text ‘3Di’ in the search bar.

Location water depth tool

The tool requires gridadmin.h5 file, the result_3Di.nc file and the DEM file that was used in the model.

There is a choice between:

  • interpolated water depth

  • interpolate water level

  • non-interpolated water depth

  • non-interpolate water level

Because 3Di calculates using the volumes in a quadtree grid, calculating water depth is done by interpolation water levels and substracting the DEM from this result. In some cases the non-interpolated water level or depth is required, the tool supports those options too.

Screen water depth tool

The resulting file can be stored in the temp folder of the Modeller Interface, or stored in a project folder by the user. The resolution of the resulting map is equatl to the resolution of the DEM.

Please make sure to use the correct gridadmin file (downloaded with each simulation) and the correct DEM.

A sample result looks like this:

Sample result water depth tool

The processing toolbox enables users to generate water depth maps in batch in case this is required. For more information on how this works we refer to the QGIS documentation here: docs.qgis.org/3.16/en/docs/user_manual/processing/modeler.html