0% found this document useful (0 votes)
20 views225 pages

RiverFlow2D Tutorials

Uploaded by

Alejandro Baron
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views225 pages

RiverFlow2D Tutorials

Uploaded by

Alejandro Baron
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

RiverFlow2D

Two-Dimensional Flood and


River Dynamics Model
TUTORIALS
June, 2023

Hydronia LLC
OilFlow2DTM , RiverFlow2DTM models, and documentation produced by Hydronia, LLC, Pembroke Pines, FL. USA.
Information in this document is subject to change without notice and does not represent a commitment on part of Hydronia,
LLC. The software described in this document is furnished under a license agreement.
RiverFlow2D, OilFlow2D, RiverFlow2D, and RiverFlow2D GPU are copyrighted by Hydronia, LLC. 2011-2023.
OilFlow2DTM and RiverFlow2DTM are registered trademarks of Hydronia, LLC.
All other products or service names mentioned herein are trademarks of their respective owners.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form
or by any means electronic, mechanical, photocopying, recording or otherwise, without the prior written permission of
Hydronia, LLC.
Last document modification date: June, 2023.
Technical Support: [email protected]
Web site: www.hydronia.com
Content

List of Figures vi

1 Introduction 1

2 Creating your first RiverFlow2D project 2


2.1 Starting a new project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.2 Start a new project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Load elevation data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.4 Create the limits of the modeling area . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.5 Generating the triangular-cell mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.6 Setting up the boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.7 Assigning Manning’s n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.8 Exporting the files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3 Simulating levees using weirs 16


3.1 Open an existing project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2 Create a Weirs layer and the weir polyline . . . . . . . . . . . . . . . . . . . . . . . 18
3.3 Generate the mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.4 Exporting files to RiverFlow2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.5 Running the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.6 Review the output files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

4 Simulating bridges 27
4.1 Create a bridge geometry file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.2 Open an existing project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.3 Enter the bridge polyline in the Bridges layer . . . . . . . . . . . . . . . . . . . . . 30
4.4 Generate the mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.5 Exporting files to RiverFlow2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.6 Running the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5 Simulating culverts 38
5.1 Open an existing project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.2 Create Culverts layer and draw the culvert . . . . . . . . . . . . . . . . . . . . . . . 41
5.3 Generate the mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.4 Exporting files to RiverFlow2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.5 Running the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

ii
5.6 Review culvert output file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

6 Simulating dam breaches 48


6.1 Open an existing project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.2 Create the DamBreach layer and draw the line that defines the dam . . . . . . . . 49
6.3 Generate the mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.4 Exporting files to RiverFlow2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.5 Running the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
6.6 Review the output files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

7 Establishing initial water, mud, or tailings elevations 58


7.1 Open an existing RiverFlow2D project . . . . . . . . . . . . . . . . . . . . . . . . . 59
7.2 Importing the Initial WSE raster layer . . . . . . . . . . . . . . . . . . . . . . . . . . 59
7.3 Exporting files to RiverFlow2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

8 Simulating bed load sediment transport with limited erosion bed areas 62
8.1 Open an existing project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
8.2 Add MaximumErosionDepth layer and draw the polygon that defines the area of
limited erosion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
8.3 Generate the mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
8.4 Exporting files to RiverFlow2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
8.5 Running the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
8.6 Check the output files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

9 Hydrologic simulations 71
9.1 Create the rainfall and evaporation time series data file . . . . . . . . . . . . . . . . 72
9.2 Create the infiltration parameters data file . . . . . . . . . . . . . . . . . . . . . . . 73
9.3 Open an existing project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
9.4 Add the RainEvap component layer, and the rainfall/evaporation polygons . . . . . 74
9.5 Add the Infiltration component layer, and the Infiltration polygons . . . . . . . . . . 76
9.6 Generate the mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
9.7 Exporting files to RiverFlow2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
9.8 Running the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
9.9 Review the output files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

10 Urban Drainage using RiverFlow2D and EPA-SWMM 85


10.1 Storm drain configuration in EPA-SWMM . . . . . . . . . . . . . . . . . . . . . . . 87
10.1.1 Starting QGIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
10.1.2 Start a new RiverFlow2D project . . . . . . . . . . . . . . . . . . . . . . . . 94
10.1.3 Load elevation data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
10.1.4 Import the surface-storm drain exchange node connections from the SWMM
.INP file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
10.1.5 Create the limits of the modeling area . . . . . . . . . . . . . . . . . . . . . 100
10.1.6 Assigning Manning’s n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
10.1.7 Imposing the boundary conditions . . . . . . . . . . . . . . . . . . . . . . . 103
10.1.8 Generating the triangular-cell mesh . . . . . . . . . . . . . . . . . . . . . . 104
10.2 Exporting the files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

11 Simulating a tailings dam failure with RiverFlow2D MT 110


11.1 Start a new project for a tailing dam break simulation . . . . . . . . . . . . . . . . . 111
11.2 Load elevation data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
11.3 Create the limits of the modeling area . . . . . . . . . . . . . . . . . . . . . . . . . 116
11.4 Create more detail for the mesh down the main flow area . . . . . . . . . . . . . . 117
11.5 Generating the triangular-cell mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
11.6 Setting up the boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
11.7 Assigning Manning’s n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
11.8 Providing the Initial Concentrations for the tailings material . . . . . . . . . . . . . . 125
11.9 Exporting the project from QGIS to RiverFlow2D . . . . . . . . . . . . . . . . . . . 126
11.10Configure final model parameters in the Hydronia Data Input Program (DIP). . . . 127
11.10.1Control Data Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
11.10.2Mud/Tailings Flow Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
11.10.3Updating the Inflow Boundary Condition File . . . . . . . . . . . . . . . . . 129
11.11Running the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
11.12Generating maps for the Mud/Tailings Flow module . . . . . . . . . . . . . . . . . . 131
11.13Generating animations for the Mud/Tailings Flow module . . . . . . . . . . . . . . . 133

12 Wind driven circulation 135


12.1 Open an existing project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
12.2 Wind velocity time-series data file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
12.3 Create the template for the wind layer and the wind speed polygons . . . . . . . . 137
12.4 Generate the mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
12.5 Exporting files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
12.6 Running the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
12.7 Check the wind output files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

13 Using Manning’s n ESRI shape files 145


13.1 Open an existing project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
13.2 Load the shape file with the Manning’s n polygons . . . . . . . . . . . . . . . . . . 146
13.3 Import the Manning’s n geometry and values to the Manning N layer . . . . . . . . 147

14 Post-processing calculations 151


14.1 Open an existing project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
14.2 Create a template of the layers ObservationPoints, CrossSections and Profiles and
draw the output controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
14.3 Generate the mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
14.3.1 Exporting files to RiverFlow2D . . . . . . . . . . . . . . . . . . . . . . . . . 160
14.4 Running the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
14.5 Review the output files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

15 Advanced digitization/snapping 166


15.1 Open an existing project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
15.2 Activate the Snapping tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
15.3 Configure the snapping tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
15.4 Draw contiguous or adjacent polygons using the Snapping tool . . . . . . . . . . . 171
15.5 Delete a polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176

16 Creating raster elevations from X Y Z data sets 178

17 Creating high-impact graphics and animations using Paraview 184


17.1 Paraview basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
17.2 Two-dimensional (2D) visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . 186
17.2.1 Create a 2D bed elevation map . . . . . . . . . . . . . . . . . . . . . . . . . 186
17.2.2 Creating 2D velocity vector fields . . . . . . . . . . . . . . . . . . . . . . . . 188
17.3 Three-dimensional (3D) visualizations . . . . . . . . . . . . . . . . . . . . . . . . . 192
17.3.1 Create a 3D water elevation graphic adding a (h+z) layer . . . . . . . . . . 197
17.3.2 Create a velocity field graphic . . . . . . . . . . . . . . . . . . . . . . . . . . 200
17.4 Generating animations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
17.5 Steamlines representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

18 Multiple Scenario Project Tool 205


18.1 New interface elements for managing multi-scenario projects in RF2D . . . . . . . 205
18.2 Creating a new RiverFlow2D multiple-scenario project using QGIS . . . . . . . . . 206
18.3 Create a new scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
18.4 Switching scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
18.5 Deleting scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
18.6 Import an RiverFlow2D project into Multi-scenario mode . . . . . . . . . . . . . . . 210
List of Figures

2.1 Files with data required for the example. . . . . . . . . . . . . . . . . . . . . . . . 2


2.2 QGIS interface indicating window areas. . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Plugins window showing activated RiverFlow2D. . . . . . . . . . . . . . . . . . . 3
2.4 Coordinate Reference System Selector dialog window. . . . . . . . . . . . . . . . 4
2.5 Create New RiverFlow2D Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.6 Layers created for the project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.7 Dialog to create a layer from a raster file. . . . . . . . . . . . . . . . . . . . . . . . 5
2.8 Digital elevation model in raster format. . . . . . . . . . . . . . . . . . . . . . . . . 6
2.9 Window to change the raster layer render style. . . . . . . . . . . . . . . . . . . . 6
2.10 Digital elevation model with Hillshade render. . . . . . . . . . . . . . . . . . . . . 7
2.11 CellSize defined for the Domain Outline layer. . . . . . . . . . . . . . . . . . . . . 8
2.12 Domain Outline layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.13 Resulting mesh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.14 Message panel of the registry with GMSH messages. . . . . . . . . . . . . . . . 9
2.15 Polygon that covers the nodes defining the Inflow boundary condition segment. . 10
2.16 Inflow boundary condition parameters. . . . . . . . . . . . . . . . . . . . . . . . . 10
2.17 Hydrograph loaded from the QIN.DAT file. . . . . . . . . . . . . . . . . . . . . . . 11
2.18 Polygon that defines the outflow boundary condition segment. . . . . . . . . . . . 11
2.19 Parameters for the uniform flow outflow open boundary condition. . . . . . . . . . 11
2.20 Polygons that define the inflow and outflow boundary conditions. . . . . . . . . . 12
2.21 Manning N layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.22 Dialog to input ManningN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.23 Export RiverFlow2D dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.24 Hydronia Data Input Program window. . . . . . . . . . . . . . . . . . . . . . . . . 15
2.25 Window displayed while the model runs. . . . . . . . . . . . . . . . . . . . . . . . 15

3.1 The weir polyline representing the levee is shown in red. . . . . . . . . . . . . . . 16


3.2 Example of the tutorial loaded in QGIS. . . . . . . . . . . . . . . . . . . . . . . . 17
3.3 Text file with weir alignment data. . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.4 Plugin to add a new template layer. . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.5 Window to input Weir parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.6 Window for weir geometry data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.7 Weir alignment loaded from the file. . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.8 The mesh generated. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.9 Plugin window to export the files to RiverFlow2D. . . . . . . . . . . . . . . . . . . 23

vi
3.10 Control data panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.11 Weirs component data panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.12 RiverFlow2D output graphics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.13 Extract of the output file of the Weir1. . . . . . . . . . . . . . . . . . . . . . . . . . 26

4.1 Bridge geometries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28


4.2 Front view of the bridge. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3 Data of the bridge geometry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.4 Bridges panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.5 Project screen loaded in QGIS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.6 RiverFlow2D dialog to add new layer. . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.7 Bridge drawing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.8 Attribute dialog window of the Bridges layer. . . . . . . . . . . . . . . . . . . . . . 33
4.9 Mesh aligned with bridge polyline. . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.10 Export RiverFlow2D tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.11 Control Data panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.12 Bridges component data panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.13 RiverFlow2D output graphics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.14 Bridge hydrograph file .bridgeh. . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5.1 Culvert scheme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39


5.2 Example of the tutorial loaded in QGIS. . . . . . . . . . . . . . . . . . . . . . . . 40
5.3 Plugin to add a New Template Layer. . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.4 Culvert alignment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.5 Window to input Culvert parameters. . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.6 Final mesh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.7 Plugin window to export the files. . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.8 Control data panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.9 Culverts component data panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.10 Runtime graphics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.11 Culvert1 output file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

6.1 Final dimensions of the dam breach. . . . . . . . . . . . . . . . . . . . . . . . . . 48


6.2 Project loaded in QGIS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.3 Dialog to add a new layers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.4 Dam axis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.5 Dialog to input the dam breach parameters. . . . . . . . . . . . . . . . . . . . . . 51
6.6 Evolution of the breach of the dam. . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.7 Dam axis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.8 The resulting dam breach mesh. Detail show mesh along the dam axis. . . . . . 53
6.9 Export dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
6.10 Hydronia Data Input Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
6.11 Dam Breach component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
6.12 RiverFlow2D output graphics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
6.13 Extract of the DamBreach.dambreachh file . . . . . . . . . . . . . . . . . . . . . . 57

7.1 Project screen loaded in QGIS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59


7.2 Initial WSE raster layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
7.3 Plugin window to export the files to RiverFlow2D. . . . . . . . . . . . . . . . . . . 61

8.1 Project screen loaded in QGIS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63


8.2 Plugin to add a New Template Layer. . . . . . . . . . . . . . . . . . . . . . . . . . 64
8.3 Polygon of the area with limited erosion. . . . . . . . . . . . . . . . . . . . . . . . 65
8.4 Window for input the polygon parameters of MaximumErosionDepth layer. . . . . 65
8.5 The mesh generated. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
8.6 Plugin window to export the files to RiverFlow2D. . . . . . . . . . . . . . . . . . . 67
8.7 Control data panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
8.8 RiverFlow2D Sediment Transport Module. . . . . . . . . . . . . . . . . . . . . . . 68
8.9 RiverFlow2D output graphics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.10 Maps of elevation difference of the river bed between the initial time and at the
end of the run. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

9.1 Rain intensity time series. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73


9.2 Rainfall and infiltration tutorial loaded in QGIS. . . . . . . . . . . . . . . . . . . . 74
9.3 Dialog to add a new layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
9.4 Polygon with the spatial distribution of Rainfall/evaporation data. . . . . . . . . . 76
9.5 Plugin to add a new template layer. . . . . . . . . . . . . . . . . . . . . . . . . . . 77
9.6 Infiltration areas of the watershed. . . . . . . . . . . . . . . . . . . . . . . . . . . 78
9.7 Polygon of the infiltration2 area of the watershed. . . . . . . . . . . . . . . . . . . 78
9.8 Window to input the parameters for the infiltration2 polygon. . . . . . . . . . . . . 79
9.9 Polygons of the infiltration areas of the watershed. . . . . . . . . . . . . . . . . . 79
9.10 Dialog to enter the parameters for the infiltration1 polygon. . . . . . . . . . . . . . 80
9.11 Final mesh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
9.12 Export dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
9.13 Control data panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
9.14 Rainfall/Evaporation component data panel. . . . . . . . . . . . . . . . . . . . . . 82
9.15 Infiltration component data panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
9.16 RiverFlow2D output graphics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
9.17 Output hydrograph of output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

10.1 DEM used, with the location of the manhole. The course of the storm drain is
indicated, although irrelevant to the modeling. Purple lines: outline of roads and
pavements. Black lines: building outlines. Triangles: output point locations. . . . 86
10.2 Inflow hydrograph applied at upstream end of storm drain. . . . . . . . . . . . . . 86
10.3 Storm drain profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
10.4 QGIS interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
10.5 Coordinate Reference System Selector dialog window. . . . . . . . . . . . . . . . 95
10.6 Create New RiverFlow2D Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
10.7 Layers created for the project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
10.8 Digital elevation model in raster format. . . . . . . . . . . . . . . . . . . . . . . . . 97
10.9 Window to change the raster layer render style. . . . . . . . . . . . . . . . . . . . 98
10.10 Digital elevation model with color render. . . . . . . . . . . . . . . . . . . . . . . . 98
10.11 Import EPA-SWMM INP file command . . . . . . . . . . . . . . . . . . . . . . . . 99
10.12 .INP successfully loaded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
10.13 Surface water-SWMM exchange nodes. . . . . . . . . . . . . . . . . . . . . . . . 99
10.14 Menu buttons for digitalization toolbar. . . . . . . . . . . . . . . . . . . . . . . . . 100
10.15 Modeling area delimitation on the Domain Outline layer. . . . . . . . . . . . . . . 100
10.16 CellSize defined for the Domain Outline layer. . . . . . . . . . . . . . . . . . . . . 101
10.17 Domain Outline layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
10.18 Editing the Manning N layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
10.19 Dialog to input Manning N Feature Attributes. . . . . . . . . . . . . . . . . . . . . 103
10.20 Polygon that covers the nodes defining the Outflow boundary condition segment. 103
10.21 Outflow Boundary Condition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
10.22 Resulting mesh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
10.23 Export RiverFlow2D dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
10.24 Hydronia Data Input Program window. . . . . . . . . . . . . . . . . . . . . . . . . 106
10.25 Storm Drain Dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
10.26 Morel Report Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
10.27 Maximum depths. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

11.1 Files with data required for the example. . . . . . . . . . . . . . . . . . . . . . . . 111


11.2 Coordinate Reference System Selector dialog window. . . . . . . . . . . . . . . . 112
11.3 Create new project window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
11.4 Layers created for the project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
11.5 Dialog to create a layer from a raster file. . . . . . . . . . . . . . . . . . . . . . . . 114
11.6 Digital elevation model in raster format. . . . . . . . . . . . . . . . . . . . . . . . . 115
11.7 Digital elevation model with Hillshade render. . . . . . . . . . . . . . . . . . . . . 115
11.8 Domain Outline polygon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
11.9 First mesh density line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
11.10 Second mesh density line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
11.11 Finished MeshDensityLine layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
11.12 Triangular mesh generated for the tailings dam break tutorial. . . . . . . . . . . . 120
11.13 Polygon that covers the nodes defining the Inflow boundary condition segment. . 121
11.14 Inflow boundary condition parameters. . . . . . . . . . . . . . . . . . . . . . . . . 122
11.15 Hydrograph loaded from the inlet1.QVT file. . . . . . . . . . . . . . . . . . . . . 122
11.16 Polygon that defines the outflow boundary condition segment. . . . . . . . . . . . 123
11.17 Parameters for the free outflow open boundary condition. . . . . . . . . . . . . . 123
11.18 Polygons that define the inflow and outflow boundary conditions. . . . . . . . . . 124
11.19 Manning N layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
11.20 Dialog to input ManningN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
11.21 Initial Concentrations polygon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
11.22 Parameters for the Export to RiverFlow2D dialog. . . . . . . . . . . . . . . . . . . 127
11.23 Hydronia Data Input Program window with Control Data parameters for the tail-
ings dam break tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
11.24 Hydronia Data Input Program window with Mud/Tailings Flow parameters for the
Brumadinho Tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
11.25 Section containing table with Boundary Conditions set for this run. . . . . . . . . 129
11.26 Dialog for correcting the Boundary Conditions file automatically. . . . . . . . . . . 130
11.27 RiverFlow2D model execution window. . . . . . . . . . . . . . . . . . . . . . . . . 131
11.28 Concentrations and Properties vs Time button in RiverFlow2D Plugin toolbar. . . 131
11.29 Concentrations and Properties vs Time Maps window. . . . . . . . . . . . . . . . 132
11.30 Results map of Conc 1 at hour 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
11.31 RF2D Animation dialog window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
11.32 RF2D Animation panel indicating the status bar and generated animation layer. . 134

12.1 Example of the tutorial loaded in QGIS. . . . . . . . . . . . . . . . . . . . . . . . 136


12.2 Plugin to add a New Template Layer. . . . . . . . . . . . . . . . . . . . . . . . . . 138
12.3 Window to input the Wind polygon parameters. . . . . . . . . . . . . . . . . . . . 139
12.4 Wind layer polygon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
12.5 The resulting mesh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
12.6 Plugin window to export the files. . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
12.7 Hydronia Data Input ProgramControl data panel. . . . . . . . . . . . . . . . . . . 141
12.8 Hydronia Data Input ProgramWind panel. . . . . . . . . . . . . . . . . . . . . . . 142
12.9 Model window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
12.10 Map with the speed field for the time 20 hours. . . . . . . . . . . . . . . . . . . . 144

13.1 Project loaded in QGIS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146


13.2 Window to find and open the shape file. . . . . . . . . . . . . . . . . . . . . . . . 146
13.3 SaltRiver ManningsN Layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
13.4 Attribute table of the SaltRiver ManningsN layer. . . . . . . . . . . . . . . . . . . 148
13.5 Properties the SaltRiver ManningsN layer. . . . . . . . . . . . . . . . . . . . . . . 148
13.6 Field properties of the edited SaltRiver ManningsN layer. . . . . . . . . . . . . . 149
13.7 Selecting all the polygons in the SaltRiver ManningsN layer. . . . . . . . . . . . . 149
13.8 Attribute table of the Manning N layer. . . . . . . . . . . . . . . . . . . . . . . . . 150

14.1 Project screen loaded in QGIS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152


14.2 Plugin to add the new templates layer. . . . . . . . . . . . . . . . . . . . . . . . . 153
14.3 Attribute windows for the three cross sections. . . . . . . . . . . . . . . . . . . . . 154
14.4 Transversal sections incorporated into the model. . . . . . . . . . . . . . . . . . . 155
14.5 Attribute window for the profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
14.6 Profile (green line) incorporated into the model. . . . . . . . . . . . . . . . . . . . 157
14.7 Attribute windows for the two observation points. . . . . . . . . . . . . . . . . . . 158
14.8 Observation points incorporated into the model. . . . . . . . . . . . . . . . . . . . 159
14.9 The mesh generated. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
14.10 Plugin to export the files to RiverFlow2D. . . . . . . . . . . . . . . . . . . . . . . . 161
14.11 Control data panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
14.12 RiverFlow2D output graphics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
14.13 OutControl.xsece file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
14.14 OutControl.prfe file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
14.15 RESvsT Point1.oute file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

15.1 Areas with overlap and empty spaces in manual digitization of adjacent polygons. 166
15.2 Project screen loaded in QGIS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
15.3 QGIS Options / Digitizing Window. . . . . . . . . . . . . . . . . . . . . . . . . . . 169
15.4 QGIS with snapping panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
15.5 Snapping configuration panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
15.6 The first polygon sketch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
15.7 Drawn of the second polygon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
15.8 Final draw of the second polygon. . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
15.9 Preliminary draw of the third polygon. . . . . . . . . . . . . . . . . . . . . . . . . 173
15.10 Final draw of the third polygon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
15.11 Preliminary draw of the fourth polygon. . . . . . . . . . . . . . . . . . . . . . . . . 174
15.12 Final draw of the fourth polygon. . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
15.13 Preliminary draw of the fifth polygon. . . . . . . . . . . . . . . . . . . . . . . . . . 175
15.14 Final draw of the fifth polygon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
15.15 Final draw of the Manning N layer. . . . . . . . . . . . . . . . . . . . . . . . . . . 176
15.16 Polygon to be deleted selected. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
15.17 Manning N layer with the polygon removed. . . . . . . . . . . . . . . . . . . . . . 177

16.1 File containing terrain elevation points. . . . . . . . . . . . . . . . . . . . . . . . . 178


16.2 Dialog to create a layer from delimited data text file. . . . . . . . . . . . . . . . . . 179
16.3 How to zoom a layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
16.4 Layer of points created from delimited data file. . . . . . . . . . . . . . . . . . . . 180
16.5 Loading to the QGIS interpolation plugin. . . . . . . . . . . . . . . . . . . . . . . 181
16.6 Interpolation plugin window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
16.7 Digital elevation model in raster format created by interpolation. . . . . . . . . . . 182
16.8 Window to change the render style of a raster layer. . . . . . . . . . . . . . . . . 182
16.9 Digital elevation model with color render. . . . . . . . . . . . . . . . . . . . . . . . 183

17.1 Main Paraview window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185


17.2 View after opening the BridgeTutorial..vtk file. . . . . . . . . . . . . . . . . . 185
17.3 VCR and Time Control toolbars. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
17.4 View for Time = 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
17.5 Variable selector. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
17.6 Bed elevation z representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
17.7 Predefined color maps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
17.8 Bed elevation z representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
17.9 XRay Color Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
17.10 White-to-blue color map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
17.11 White-to-blue color map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
17.12 Water depth (h). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
17.13 Velocity vector field on water depth. . . . . . . . . . . . . . . . . . . . . . . . . . . 191
17.14 Velocity vector field detail. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
17.15 Bed elevation z. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
17.16 Cell Data to Point Data filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
17.17 Cell Data to Point Data interpolation. . . . . . . . . . . . . . . . . . . . . . . . . . 194
17.18 Wrap By Scalar filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
17.19 3D option. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
17.20 Coloring parameter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
17.21 3D bed elevation representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
17.22 Viewpoint Toolbar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
17.23 Alternative 3D bed elevation representation. . . . . . . . . . . . . . . . . . . . . . 197
17.24 Camara Control Toolbar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
17.25 Water surface elevation representation. . . . . . . . . . . . . . . . . . . . . . . . 198
17.26 Threshold Filter application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
17.27 Three dimensional water depth h representation. . . . . . . . . . . . . . . . . . . 199
17.28 Three-dimensional velocity field representation. . . . . . . . . . . . . . . . . . . . 201
17.29 Animation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
17.30 Animation time frames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
17.31 StreamLines representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

18.1 Drop-down list for displaying and selecting project scenarios . . . . . . . . . . . . 206
18.2 Tool to create a new scenario within the project . . . . . . . . . . . . . . . . . . . 206
18.3 Tool to convert existing project to multi-scenario . . . . . . . . . . . . . . . . . . . 206
18.4 Menu to create a new project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
18.5 Dialog window to create a new RF2D project . . . . . . . . . . . . . . . . . . . . 207
18.6 Menu for creating a new scenario in an RF2D project . . . . . . . . . . . . . . . . 208
18.7 Window to create a new scenario. . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
18.8 Switching scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
18.9 Confirmation window for switching the scenario. . . . . . . . . . . . . . . . . . . . 209
18.10 Menu button to delete a scenario. . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
18.11 Menu to import a project to multi-scenario mode . . . . . . . . . . . . . . . . . . 210
18.12 Import tool window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Introduction
1
RiverFlow2D is a combined hydrologic and hydrodynamic, mobile bed, and pollutant transport
finite-volume model for rivers, estuaries, coastal areas, and floodplains. It can simulate floods
and inundation over complex terrain at high resolution and with remarkable stability, accuracy and
speed. The use of adaptive triangular-cell meshes enables the flow field to be resolved around
key features in difficult river environments.
Hydronia computational engines use an accurate, fast and stable finite-volume solution method
that eliminates the boundary and hot start difficulties of some two-dimensional flexible mesh mod-
els. RiverFlow2D also includes capability to represent dam or levee breaches and can integrate
hydraulic structures such as culverts, weirs, bridges, and gates. The hydrologic capabilities in-
clude spatially distributed rainfall, evaporation and infiltration. This current version can integrate
the effect of spatially distributed wind stresses on the water surface.
The user interface of Hydronia models is based on QGIS, a powerful software for the analysis of
geographic information systems of free distribution. This software system integrated with GMSH
mesh generation plugin provides interactive functions to generate and refine the finite-volume
flexible mesh, and uses familiar GIS objects to construct a high level representation of the model.
QGIS also offers a complete set of visualization tools that include rendering, for the representation
of the results generated by the model.

1
Creating your first RiverFlow2D project
2
This section provides a step-by-step guide to help you get started with a RiverFlow2D project
using the QGIS interface. The example illustrates the model application to simulate flow in a river
with a single inflow upstream and a single outflow downstream. It includes instructions to enter
the terrain elevation data, create the mesh, prepare the layers with the input information, and run
the model.

2.1 Starting a new project


In this tutorial we will use the data of the example included in the Hoh QGIS Metric Units folder
under Documents\RiverFLow2D QGIS\ExampleProjects. The folder contains the files shown:

Figure 2.1 – Files with data required for the example.

The first step is to start the QGIS software clicking the QGIS desktop icon . If this icon is not
available, you can run the qgis-bin.exe executable on the QGIS bin subdirectory. After loading,

2
3 Creating your first RiverFlow2D project

you will see a window similar to the one shown below:

Figure 2.2 – QGIS interface indicating window areas.

If you don’t see the toolbar with the model icons as shown, you will need to activate the plugin
using the Manage and Install Plugins... command under the Plugins menu.

Figure 2.3 – Plugins window showing activated RiverFlow2D.

2.2 Start a new project

1. To create a new RiverFlow2D project, click on the New RiverFlow2D Project button in
the toolbar. to start a new RiverFlow2D project. A dialog window appears where you select
the layers that will be created, the Coordinate Reference System (CRS), and the directory
path where the layers will be saved. This example will use the basic layers: Domain Outline,
Manning N, and BoundaryConditions
2.2 Start a new project 4

2. Select None in the Layers drop down menu.

3. Select the Projection button. Note that QGIS sets EPSG:4326 by default, but it should be
changed to the actual projection code corresponding to the project data.

4. In the Filter textbox, type 2855 and select the Coordinate Reference System as shown:

Figure 2.4 – Coordinate Reference System Selector dialog window.

5. Click OK.

6. Select EPSG:2855 that corresponds to the NAD83(HARN)/Washington North Coordinate


Reference System (CRS):

Figure 2.5 – Create New RiverFlow2D Project.


5 Creating your first RiverFlow2D project

7. Click the button to provide a path to store the project files in the Project Directory
textbox. This will be the folder where the model will write all results and output files.

8. After clicking OK, the layer templates are created, and displayed on the Layers Panel

The model will use the unit system as that defined in the projection you selected. If the
projection has coordinates in feet, units will be set to English. If the projection coordinates
are in meters, units will be set to Metric/SI.

Figure 2.6 – Layers created for the project.

9. On the QGIS Project menu, click Save, to save the project in the same directory that you
previously selected in the Create New Project dialog above.

2.3 Load elevation data


In this tutorial we will use a raster file that contains the terrain and river bed bottom elevation data
in ASCII grid format.

1. To load an ASCII grid file, click the Add Raster Layer button .

2. In the dialog search for the tutorial folder and select the hohdem2.asc file as shown:

Figure 2.7 – Dialog to create a layer from a raster file.

3. While on the dialog, click Add and then select the CRS for this layer that should be the same
used in the project EPSG: 2855). Then click OK and Close.
2.3 Load elevation data 6

4. Click OK.

5. Use the Zoom Full button to center the image.


Once the process is completed, the raster will be displayed on the screen, by default it is
rendered in gray gradient as shown.

Figure 2.8 – Digital elevation model in raster format.

Right-clicking on the label of the new raster layer and selecting Properties allows you to
change the rendering style for a more informative palette such as Hillshade for instance.

Figure 2.9 – Window to change the raster layer render style.

And now the raster layer is displayed with the new palette selected:
7 Creating your first RiverFlow2D project

Figure 2.10 – Digital elevation model with Hillshade render.

6. You may move the raster layer dragging it to the end of the list of layers to avoid that it would
hide or interfere visually with the other layers.

2.4 Create the limits of the modeling area


We define the limits of the modeling area drawing a polygon on the Domain Outline layer. To
create it do as follows:

1. Click the Domain Outline layer to activate it and then click Toggle Editing (pencil) in the
toolbar

2. This activates the rest of the editing buttons. Now click the Add Feature tool which is the
bean-looking polygon .
Proceed to delineate the outline of the polygon by clicking the vertices with the left mouse
button.

Make sure that the polygon is contained within the limits of the raster layer since the program
will not extrapolate elevations to areas that are outside of the available data on the raster
layer.

3. To finalize and close the polygon, right-click on the map view area. A dialog window to input
the cell size attribute of the newly created polygon will appear. The CellSize value for the
reference size of the mesh cell is indicated. Enter a value of 20 m.
2.5 Generating the triangular-cell mesh 8

Figure 2.11 – CellSize defined for the Domain Outline layer.

If you want to make any correction in the outline of the created polygon, use the Node Tool
.

4. Save the polygon by clicking the Save button .

5. and click on Toggle Editing button to deactivate the layer Edit mode
The Domain Outline is now complete.

Figure 2.12 – Domain Outline layer.

2.5 Generating the triangular-cell mesh


Now that the Domain Outline layer has been created, proceed to create the mesh by clicking on
the Generate Trimesh button The following figure shows the generated mesh. You will
also see in the Layers panel the new layer: Trimesh
9 Creating your first RiverFlow2D project

Figure 2.13 – Resulting mesh.

You can see the mesh generation statistics, and other messages produced by the mesh genera-
tion program while creating the mesh,in the Log messages panel. This window is accessed from
the View menu, then by clicking Panels.

Figure 2.14 – Message panel of the registry with GMSH messages.

2.6 Setting up the boundary conditions


Inflow boundary conditions:

1. Select the BoundaryConditions layer in the Layers panel.


2.6 Setting up the boundary conditions 10

2. Click the Toggle Editing button to add the polygons that will indicate the open boundary
segments where inflow and outflow conditions are imposed. Draw a polygon at the upper
end of the mesh as indicated in the figure:

Figure 2.15 – Polygon that covers the nodes defining the Inflow boundary condition segment.

3. To finish the polygon, right-click on desired location. A window to enter the attributes of the
newly created polygon is displayed.

4. In the Boundary Cond. ID enter the desired name or leave the default.

5. From Type of Open Boundary list, select 2. Discharge vs. Time

6. Click Import BC File button, and search for the QIN.DAT hydrograph file as shown below:

Figure 2.16 – Inflow boundary condition parameters.


11 Creating your first RiverFlow2D project

Figure 2.17 – Hydrograph loaded from the QIN.DAT file.

7. Click OK to close the dialog and then click Save .

Outflow boundary conditions:

1. Draw the polygon defining the outflow boundary condition at the downstream end of the
channel as shown.

Figure 2.18 – Polygon that defines the outflow boundary condition segment.

2. Right click to close the polygon. A dialog window will appear to enter the parameters. Select
the condition type Uniform flow conditions and enter the channel slope. Slope is entered in
So as shown:

Figure 2.19 – Parameters for the uniform flow outflow open boundary condition.

3. Save the changes made to the layer by clicking the Save button .

4. Deactivate editing mode by clicking on the Toggle Editing button .


2.7 Assigning Manning’s n 12

The figure below shows how the BoundaryConditions layer should look:

Figure 2.20 – Polygons that define the inflow and outflow boundary conditions.

2.7 Assigning Manning’s n


To assign Manning’s n values, we enter polygons with given n’s. There can be as many polygons
as those required to reproduce the spatial variability of this parameter. In this example, a single
polygon will be drawn for the entire area.

1. Select the Manning N layer and click the Toggle Editing button .

2. Draw a polygon that covers the entire domain. The polygon may extend beyond the mesh
area as shown:
13 Creating your first RiverFlow2D project

Figure 2.21 – Manning N layer.

3. Close the polygon by right-clicking on the end vertex and enter a Manning’s n equal to 0.035:

Figure 2.22 – Dialog to input ManningN.

4. Click Save , and then click the Toggle Editing button to deactivate editing mode.

Save the QGIS project using the Save command in the Project menu. Name the project file
Hoh.qgs.
2.8 Exporting the files 14

2.8 Exporting the files


Once the layers with the input data to the model have been created, we need to export data files
required to run RiverFlow2D.

1. In the RiverFlow2d plugin toolbar, click the Export files for RiverFlow2d button and select
Export RiverFlow2d ...

2. In the export dialog window indicate the Project Name and the raster layer of the Digital
Elevation Model (DEM).

3. Click OK.

Figure 2.23 – Export RiverFlow2D dialog.

A message at the top of the Map area shows the progress of the Export process.
Once the model files have been created, the Hydronia Data Input Program will appear au-
tomatically with the main control data file loaded, in this case: Hoh.DAT.
15 Creating your first RiverFlow2D project

Figure 2.24 – Hydronia Data Input Program window.

4. Click the Run RiverFlow2D button to run the model. An image similar to the one shown
below should appear:

Figure 2.25 – Window displayed while the model runs.

Take some time to explore the information included in this window.

This concludes the Creating your first RiverFlow2D application tutorial.


Simulating levees using weirs
3
This tutorial illustrates how to incorporate a levee to an existing RiverFlow2D project using the
Weirs Component in the QGIS interface. The problem consists in modeling a lateral weir along
the right margin of a river, as can be seen in the following figure:

Figure 3.1 – The weir polyline representing the levee is shown in red.

The procedure to incorporate the weir in a RiverFlow2D simulation involves the following steps:

1. Open an existing RiverFlow2D project.

16
17 Simulating levees using weirs

2. Add the Weirs layer

3. Draw the weir polylines

4. Input the weir parameters or attributes

5. Export the files to RiverFlow2D

6. Run the RiverFlow2D model

7. Review the output files.

The files required to follow this tutorial can be found in the following directory:

...MyDocuments\RiverFlow2D QGIS\ExampleProjects\WeirsTutorial

3.1 Open an existing project


1. Open QGIS.

2. On the Project menu click Open... and browse to select the existing project: WeirsTutorial.qgs.
This project contains the following layers: Domain Outline, Digital Elevation Model (DEM)
of the river bed in raster format, aerial photography, polygon with the Manning coefficient
and the polygons with the boundary conditions where the flow entrance is in the upper left
corner and exit in the lower left corner. The boundary conditions are a hydrograph with a
peak discharge of 220,000 f t3 /s, and outflow condition is set to uniform flow. When you
open the project you will have a project image loaded in QGIS as shown in Figure 3.2:

Figure 3.2 – Example of the tutorial loaded in QGIS.


3.2 Create a Weirs layer and the weir polyline 18

3.2 Create a Weirs layer and the weir polyline


The weir location can be drawn on the Weirs layer or it can be imported from an existing file. In
this tutorial, the polyline that indicates the location of the weir will be imported from a text file. The
structure of the file should be as follows:

• The first line must indicate the number n of nodes that contains the polyline.

• The n successive lines will contain three columns with the X, Y coordinates.

• The elevation of the weir crest separated by space as shown in Figure 3.3:

Figure 3.3 – Text file with weir alignment data.

Adding the Weirs layer involves the following steps:

1. Create Weirs layer: for this click on the New Template Layer button in the RiverFlow2D
toolbar

2. Activate the checkbox Weirs, as shown in the Figure below:


19 Simulating levees using weirs

Figure 3.4 – Plugin to add a new template layer.

3. Edit the Weirs layer: In the layer panel, select the Weirs layer and in the digitalization toolbar
click on the Toggle Editing button

A pencil icon will appear in the Weirs layer indicating that the layer is in edit mode:

4. Draw the line representing the weir: Using the Add Feature tool from the digitalization bar

Draw a line anywhere in the map area (just mark two vertices or nodes. This line will then
be replaced by the coordinates of the file to be imported)

5. Right-click to finish the layout and a dialog window will appear to input the weir parameters.

6. Input the weir parameters: The window to input the weir attributes contains two tabs. In the
first one there are the fields of the general parameters, within which has:
3.2 Create a Weirs layer and the weir polyline 20

• Weir Name (ID): Weir1


• Weir discharge coefficient: 3.2
• Weir crest elevation for all the weir: since a file will be imported this field will be left
empty.
• Size Element: 150
• Import Geometry File: Click the [...] button and point to the file LeveeRB Breakline.txt
which is found in the tutorials folder.

The weir parameters window should look like the image shown below:

Figure 3.5 – Window to input Weir parameters.

In the second tab ’Weir crest elevation for vertex’ the data contained in the file LeveeRB Breakline.txt
is displayed, as shown in the following Figure:

Figure 3.6 – Window for weir geometry data.

7. Then click on the [OK] button

8. Save the changes in the layer using the Save button of the digitalization toolbar
21 Simulating levees using weirs

9. Disable the editing mode of the layer with the Toggle Editing button

and we will have on screen an image similar to the one shown below where you can see the
layout of the weir:

Figure 3.7 – Weir alignment loaded from the file.

3.3 Generate the mesh


The mesh is generated with the Generate TriMesh plugin

result should look similar to the image on Figure 3.8.


3.4 Exporting files to RiverFlow2D 22

Figure 3.8 – The mesh generated.

3.4 Exporting files to RiverFlow2D


Now that you have generated the mesh and you have the other layers ready with the necessary
data, you should export the files in the format required by RiverFlow2D.

1. Click the Export to RiverFlow2D button.

2. When running the plugin a window is displayed, here we must select the raster layer that
contains the Digital Elevation Model (DEM) and the name of the project to be exported.
Enter the name without any extension.

3. Before executing the plugin, activate the layer with the DEM (if it is disabled) and turn off the
MeshDensityLine layer since it does not have any element.
Once the plugin is executed, a window will be shown (Figure 3.9), as it should be for our
example.
23 Simulating levees using weirs

Figure 3.9 – Plugin window to export the files to RiverFlow2D.

4. After inputting the data, click on the OK button and the export process will begin. Once it is
finished, Hydronia Data Input Program will be loaded as shown in Figure 3.10

Figure 3.10 – Control data panel.

3.5 Running the model


Make sure that the Weirs Component appears selected in the Control Data panel.

1. In the list of components, select ’Weirs’ and the panel of the Weirs component will appear.
In this window the contents of the .WEIRS file content as prepared by RiverFlow2D will be
displayed (Figure 3.11).
3.5 Running the model 24

Figure 3.11 – Weirs component data panel.

2. Leave all other parameters at their default values.

3. Click on the Run RiverFlow2D button in the lower section of Hydronia Data Input Program.
A window will appear indicating that the model began to run. The window also informs the
simulation time, the volume conservation error, the total input and output discharge and
other parameters as the execution progresses (Figure 3.12).

Figure 3.12 – RiverFlow2D output graphics.


25 Simulating levees using weirs

3.6 Review the output files


RiverFlow2D creates an output file with the name of the project and extension .WEIRI for metric
units and .WEIRE for English units. The files report results for each weir and for each output
interval. Output includes the following information:

• EDGE: The segments into which the weir is divided and is given by the length of the cells in
contact with the weir,

• N1 and N2: The numbers that identify the cells that share the EDGE segment in the weir,

• WSE1 and WSE2: The elevations of the water surface in the cells indicated by N1 and N2,

• D1 and D2: The depths of the flow in the cells indicated by N1 and N2,

• Distance: The length of the EDGE segment,

• Q: The discharge that passes through the EDGE segment.

The .WEIRE file contains the following:


3.6 Review the output files 26

Figure 3.13 – Extract of the output file of the Weir1.

This concludes the Simulating Levees using Weirs Tutorial.


Simulating bridges
4
This tutorial illustrates how to incorporate a bridge into an existing RiverFlow2D project using the
Bridge Component through the QGIS interface. The procedure involves the following steps:

1. Create the bridge geometry data.

2. Open an existing RiverFlow2D project.

3. Enter the bridge polyline.

4. Enter the bridge data.

5. Generate the mesh.

6. Export the files of RiverFlow2D.

7. Running the model.

The files required to follow this tutorial can be found in the following directory:

...MyDocuments\RiverFlow2D QGIS\ExampleProjects\BridgesTutorial

4.1 Create a bridge geometry file


Integrating bridges in RiverFlow2D requires preparing the bridge cross section geometry data
prior to running the model. With the QGIS interface you have the option of creating a simplified
bridge geometry from the terrain profile obtained from the digital elevation model, and then you

27
4.1 Create a bridge geometry file 28

can use the Bridges panel in the Hydronia Data Input Program to perform the adjustments nec-
essary to the geometry generated by QGIS. This option is useful when the bridge is located on a
natural section of the river, and the geometry of the bridge is simple (Figure 4.1a). However, other
cases may involve more complex bridge geometries (Figure 4.1b), that require a more detailed
preparation of the bridge geometry file.

Figure 4.1 – Bridge geometries.

Figure 4.2 shows the front view of the bridge that you will to incorporate into the model for this
tutorial. The data is also in the file BRIDGEGEOMETRY.DAT contained in the directory of this tutorial.

Figure 4.2 – Front view of the bridge.

It represents the cross section of a bridge with only one central pier, although this is just for
the purpose of illustrating the Bridges component in this tutorial since the actual bridge in this
location has about 12 sets of piers. This geometry is represented in the RiverFlow2D model using
the bridge geometry file shown below, where the header row is presented only to describe the
parameters, and they should not be included in the actual data file:
29 Simulating bridges

Figure 4.3 – Data of the bridge geometry.

You may use the Bridges panel in Hydronia Data Input Program to create to some extent, or edit
a bridge geometry file (see Figure 4.4). The program lets you enter data in tabular form and view
a graph of the bridge geometry. You may also manipulate the graphical lines, which will make that
the tabular data be modified.

Figure 4.4 – Bridges panel.


4.2 Open an existing project 30

An alternative way to create the bridge geometry file is to use a spreadsheet. In the folder for this
tutorial there is a MS-Excel sheet (BridgesGeometryPlot.xlsx) that allows editing and plotting
bridge geometry files.

4.2 Open an existing project


On the Project menu click Open... to load the existing project: BridgeTutorial.qgs. This project
contains the layers of the domain contour, the Digital Elevation Model DEM of the river bed in
raster format, the polygons with the Manning’s n for the different land coverages, an aerial image,
and the boundary conditions. Inflow is located in the upper right segment, and outflow in the lower
left. The boundary conditions are a hydrograph with a peak discharge of 220,000 f t3 /s (cfs), and
outflow condition is set to uniform flow. When you open the project you will have an image of the
project loaded in QGISas shown in Figure 4.5.

Figure 4.5 – Project screen loaded in QGIS.

4.3 Enter the bridge polyline in the Bridges layer


This step ensures that the mesh will conform to the bridge alignment, so that there will be nodes
generated along the bridge. In this case we will enter the bridge is a straight line approximately
1740 feet long as follows:

1. Create a new Bridges layer: for this, go to the RiverFlow2D toolbar of and click with the
mouse on the New Template Layer button
31 Simulating bridges

in the plugin window we activate the Bridges checkBox, as shown in the Figure below

Figure 4.6 – RiverFlow2D dialog to add new layer.

2. Edit the Bridges layer: In the layers panel we select the Bridges layer then in the digitaliza-
tion toolbar we click with the mouse on the Toggle Editing button

A pencil icon will appear in the Bridges layer that tells us that the layer is in edit mode:

3. Draw the line representing the bridge: (if necessary, turn off the DEM layer so that it does
not interfere with the identification of the bridge site in the aerial photograph).

4. Using the Add Feature button of the digitalization toolbar

draw the line indicating the location of the bridge. In the case shown, to demarcate the line
that indicates the location of the bridge, it is only necessary to indicate two vertices (initial
4.3 Enter the bridge polyline in the Bridges layer 32

and final), then click with the right button to finish the drawing and we will have an image
similar to the one shown in the following figure:

Figure 4.7 – Bridge drawing.

5. Enter the bridge data: After the bridge layout is finished, the window to input the attributes
of the bridge created is immediately displayed, these are:

• Bridge Name (ID): Bridge1


• Size Element: 150 feet
• Bridge file: Bridge1.txt (In this case, we will let QGIS build the bridge file, so we only
indicate the name of the file)
• Elevation of the lower bridge deck (LOWCHORD): 138
• Elevation of the bridge deck (DECKELEV): 142

The figure below shows the attributes window of the Bridges layer:
33 Simulating bridges

Figure 4.8 – Attribute dialog window of the Bridges layer.

6. After entering the values, click on the [Check Fields] button, then click the [OK] button.

7. Save the changes in the layer using the save button of the digitalization toolbar:

and disable the editing mode of the layer with the Toggle Editing

4.4 Generate the mesh


The mesh is generated with using the RiverFlow2D emphGenerate TriMesh icon:

check that the resulting mesh is perfectly aligned with the bridge as shown in Figure 4.9.
4.5 Exporting files to RiverFlow2D 34

Figure 4.9 – Mesh aligned with bridge polyline.

4.5 Exporting files to RiverFlow2D


Now that you have generated the mesh, and you have the other layers with the necessary data
ready, you should export the files in the format required by RiverFlow2D.

1. Click on Export RiverFlow2D button:

In the export files dialog we need to make sure that the appropriate raster layer correspond-
ing to the Digital Elevation Model (DEM) is selected. Also enter the name of the project; only
the name must be indicated without any extension.
Once the complement is executed, a window is presented as shown in Figure 4.10, as it
should be for our example.
35 Simulating bridges

Figure 4.10 – Export RiverFlow2D tool.

2. After input the information, click on the OK button and the export process will begin.
Once finished, the RiverFlow2D program will be loaded with the .DAT file of the specific
example.

4.6 Running the Model


After exporting the files, the RiverFlow2D program is loaded with the project file of the bridge.DAT
example, and the Control Data panel is shown (Figure 4.11).

Figure 4.11 – Control Data panel.

Select the Bridges panel to review the contents of the bridge geometry file (Figure 4.12). Note
how the bridge profile was discretized every 150 feet according to the element size imposed to
the bridge line.
4.6 Running the Model 36

Figure 4.12 – Bridges component data panel.

Leave all other parameters at their default values.


To run the model, click on the Run RiverFlow2D button in the lower section of Hydronia Data Input Program.
A window will appear indicating that the model run started. The window also reports the simulation
time, the volume conservation error, the total input and output discharge, and other parameters
as the execution progresses (Figure 4.13).

Figure 4.13 – RiverFlow2D output graphics.

You may take some time to review the BridgeTutorial.bridgeh file:


37 Simulating bridges

Figure 4.14 – Bridge hydrograph file .bridgeh.

This concludes the Simulating bridges tutorial.


Simulating culverts
5
This tutorial shows how to incorporate culverts in an existing RiverFlow2D project using the QGIS
interface. The problem consists of a natural channel crossed by a road embankment. A culvert
structure is to be used to connect the upstream and downstream parts of the channel divided by
the embankment as shown in the following figure:

38
39 Simulating culverts

Figure 5.1 – Culvert scheme.

The water enters from upstream with a constant discharge of 1000 cfs, and outflows downstream
along the indicated section. The area is initially dry. The culvert has a circular cross section, and
other characteristics as summarized in the following Table (CulvertA). CulvertB data is provided
in case that you wanted to extend the tutorial adding a second culvert to the project.

Parameter Description Culvert A Culvert B


Nb Number of identical barrels 1 1
Ke Entrance Loss Coefficients 0.5 0.7
n Manning’s n Coefficient 0.014 0.015
Kp Inlet Control Coefficient 0.3 0.4
M Inlet Control Coefficient 2 2
Cp Inlet Control Coefficient 1.28 1.1
Y Inlet Control Coefficient 0.67 0.69
m Inlet Control Coefficient -0.5 -0.5
Dc Diameter (feet) 3 2
- Inlet Inverted elevation -9999 -9999
- Outlet Inverted elevation -9999 -9999

The procedure to integrate this culvert into a RiverFlow2D simulation involves the following steps:

1. Open an existing RiverFlow2D project.

2. Add a Culvert component layer.

3. Draw the line of culvert alignment.


5.1 Open an existing project 40

4. Input the data or attributes for the culvert.

5. Export the files to the RiverFlow2D program.

6. Running the model.

7. Review culvert output files.

The files required to follow this tutorial can be found in the following directory:

...MyDocuments\RiverFlow2D QGIS\ExampleProjects\CulvertTutorial

5.1 Open an existing project


1. Open QGIS.

2. On the Project menu click Open... and browse to the existing project: CulvertTutorial.qgs.

This project contains the following layers: Domain Outline, Digital Elevation Model (DEM) in raster
format, polygon with the Manning’s n coefficient, and the boundary condition polygons. The inflow
is located in the upper left, and the outflow in the lower left. The boundary conditions corresponds
to a constant discharge of 1000 f t3 /s, and outflow conditions is set to free. Figure 5.2 shows the
opened project.

Figure 5.2 – Example of the tutorial loaded in QGIS.


41 Simulating culverts

5.2 Create Culverts layer and draw the culvert


1. To create the Culverts layer, in the RiverFlow2D toolbar click on the New Template Layer
icon

2. In the window select the Culverts checkBox, as shown:

Figure 5.3 – Plugin to add a New Template Layer.

3. Edit the Culverts layer: In the layers panel, select the Culverts layer and in the digitalization
toolbar we click on the Toggle Editing button

A pencil icon will appear in the Culverts layer indicating that the layer is in edit mode:

4. Draw the line representing the culvert alignment: Using the tool Add Feature from the digi-
talization toolbar
5.2 Create Culverts layer and draw the culvert 42

draw the line that represents the culvert. It is only necessary to indicate two vertices.

5. Click with the right button to finish, and you should get an image similar to the one shown in
the following Figure:

Figure 5.4 – Culvert alignment.

6. Enter the culvert data: After the culvert drawing is finished, the window to input the culvert
attributes immediately appears. The dialog window has 2 tabs, in the General tab you enter
the basic data for circular and box culverts:

• Culvert Name (ID): CULVERT 1,


• Type of culvert: Type 2 (Circular culvert)
• The rest of the parameters are coefficients that needed to compute the culvert dis-
charge. To help with the introduction of these parameters, the window presents a list
with default values for different types of culverts. If one of the values of the list param-
eters is not appropriate, you can choose the option where the value is defined by the
user (user defined). The window of the culvert parameters should be similar to the one
shown in the Figure below:
43 Simulating culverts

Figure 5.5 – Window to input Culvert parameters.

7. After inputting the values, click on the OK button.

8. Save the changes in the layer using the Save button of the digitalization toolbar

9. Disable the editing mode of the layer with the Toggle Editing button

5.3 Generate the mesh


The mesh is generated with the Generate Trimesh tool

the results obtained as shown in Figure 5.6.


5.4 Exporting files to RiverFlow2D 44

Figure 5.6 – Final mesh.

5.4 Exporting files to RiverFlow2D


Now that you have generated the mesh and you have the other layers ready with the necessary
data, you should export the files in the format required by RiverFlow2D.

1. Click the Export RiverFlow2D button

2. Select the raster layer that contains the Digital Elevation Model (DEM) and the name of the
project to be exported. Indicate a name without any extension, in this case, CulvTutorial.

3. Before running the plugin, activate the layer with the DEM (if it is disabled) and deactivate
the MeshDensityLine layer, since it does not have any element.

Once the plugin is executed, a window will be shown (Figure 5.7), as it should be for our example.
45 Simulating culverts

Figure 5.7 – Plugin window to export the files.

After input the information, click on the OK button and the export process will begin, once finished,
the RiverFlow2D program will be loaded with the CulverTutorial.DAT file.

5.5 Running the model


After exporting the files, the RiverFlow2D program is loaded with the project file from the CulverTutorial.DAT
example and shows the Control Data panel to it as illustrated in Figure 5.8.

Figure 5.8 – Control data panel.

Note that the Culverts Component appears selected. On the left side of the Control Data panel, in
the list of components select Culverts to activate the Culverts panel. The contents of the culvert
file prepared by QGIS will be displayed (Figure 4.10).
5.5 Running the model 46

Figure 5.9 – Culverts component data panel.

Leave all other parameters at their default values.


To run the model, click on the Run RiverFlow2D button in the lower section of Hydronia Data Input Program.
A window will appear indicating that the model began to run. The window also reports the simu-
lation time, volume conservation error, total input and output discharge, and other parameters as
the execution progresses (Figure 5.10).

Figure 5.10 – Runtime graphics.


47 Simulating culverts

5.6 Review culvert output file


For each culvert, RiverFlow2D creates an output file called: CULVERT culvertID.out, where
culvertID is the name (ID) entered when we created the culverts. Output includes the series
of discharge versus time through the culvert and the elevations of the water surface at the inflow
and outflow locations. For this tutorial, you will find a file called CULVERT CULVERT 1.out, whose
content is shown in the following figure:

Figure 5.11 – Culvert1 output file.

This concludes the Simulating culverts tutorial.


Simulating dam breaches
6
This tutorial illustrates how to incorporate dam breach simulation into an existing RiverFlow2D
project using the QGIS interface. The exercise consists of modeling the a dam break flood. The
dam is approximately 1575 feet long, the breach center is 550 feet from the right margin of the
dam, the opening of the breach has the final dimensions shown in the following Figure, a top width
of 160 feet, and at the bottom width of 100 feet, the final breach height is 30 feet.

Figure 6.1 – Final dimensions of the dam breach.

For this exercise, a file with the time evolution of the breaching dimensions is required, this file can
be prepared before setting the model or it can be created when entering the input the parameters.
The procedure to model the dam break involves the following steps:

1. Open an existing RiverFlow2D project.

48
49 Simulating dam breaches

2. Create a DamBreach layer and to draw a line that represent the transverse axis of the dam.

3. Generate the mesh.

4. Run the model.

5. Review the output files.

The files required to follow this tutorial can be found in the following directory:
...MyDocuments\RiverFlow2D QGIS\ExampleProjects\DamBreachTutorial

6.1 Open an existing project


1. Open QGIS

2. On the Project menu click Open... and browse to the existing project: DamBreach.qgs.

This project contains the Domain Outline layer, the digital elevation model DEM of in raster format,
outflow conditions are set to free outflow in the lower left, and an initial condition of water surface
elevation behind the dam. Figure 6.2 shows the project in QGIS.

Figure 6.2 – Project loaded in QGIS.

6.2 Create the DamBreach layer and draw the line that
defines the dam
Creating the dam involves the following steps:

1. Create the template for the DamBreach layer: in the RiverFlow2D toolbar click on the New
Template Layer button
6.2 Create the DamBreach layer and draw the line that defines the dam 50

2. In the dialog select DamBreach, as shown in the figure below:

Figure 6.3 – Dialog to add a new layers.

3. Edit the DamBreach layer: In the layers panel, select the DamBreach layer.

4. In the digitalization toolbar we click on the Toggle Editting button

A pencil icon will appear in the DamBreach layer, indicating that the layer is in edit mode:

5. Draw the line that defines the axis of the dam: Using the Add Feature tool of the digitalization
toolbar
51 Simulating dam breaches

6. Draw the line that defines the dam axis. Keep in mind that the breach centroid is measured
from the first vertex of the dam line. In this example it occurs 550 feet from the left margin
of the dam (Figure 6.1). The dam axis is drawn from the top of the channel (point v0) to
the bottom (point v1) along one side of the polygon that defines the initial water surface
elevation, as illustrated in the image below.

Figure 6.4 – Dam axis.

7. Once finished drawing the dam axis, the window to input the parameters of the DamBreach
appears.

8. Input the information as seen below in the figure and click the Check Fields button:

Figure 6.5 – Dialog to input the dam breach parameters.


6.3 Generate the mesh 52

9. Click the Temporal evolution tab and click on the Import Dam Breach File button. Select the
Breach1.txt file in the project folder. Click OK to close.

10. The temporal evolution of the Breach1.TXT file is shown in the Temporal evolution tab below:

Figure 6.6 – Evolution of the breach of the dam.

Figure 6.7 – Dam axis.

6.3 Generate the mesh


The mesh is generated using the Generate TriMesh tool

Figure 6.8 shows the resulting mesh of almost 11,000 cells


53 Simulating dam breaches

Figure 6.8 – The resulting dam breach mesh. Detail show mesh along the dam axis.

6.4 Exporting files to RiverFlow2D


1. Click on the Export RiverFlow2D button.

2. Select the raster layer that contains the Digital Elevation Model (DEM) and the name of the
project.

3. Input the name without any extension. For this example it will be: DamBreach.
6.5 Running the model 54

Figure 6.9 – Export dialog.

4. Once finished inputting the information, click on the OK button and the export process will
begin. Once it is finished, RiverFlow2D will be loaded with the DamBreach.DAT file.

6.5 Running the model


After exporting the files, Hydronia Data Input Programis loaded with the project file of the DamBreach.DAT
example and shows the Control Data panel as illustrated in Figure 6.10.

Figure 6.10 – Hydronia Data Input Program.


55 Simulating dam breaches

It can be seen that the Dam Breach component is selected as well as the initial condition that
indicates that the initial elevation of the water surface of the .FED file will be read. Selecting from
the list on the left panel the Dam Breach component will show the panel where you can see the
parameters of the dam breach as shown in the figure below:

Figure 6.11 – Dam Breach component.

1. Before running the model, set the simulation time to 4 hours.

2. Leave all other parameters at their default values.

3. To run the model, click on the Run RiverFlow2D button in the lower section of Hydronia Data Input Program.

4. Save the changes with the same name as the DamBreach.DAT file.

A window will appear indicating that the model has started running. The window thatRiverFlow2D
presents while running the model shows simulation time information, volume conservation error,
the total input and output discharge as well as other parameters as execution progresses (Figure
6.12).
6.6 Review the output files 56

Figure 6.12 – RiverFlow2D output graphics.

6.6 Review the output files


RiverFlow2D output the dam breach hydrograph in a file with extension .dambreachh. Figure 6.13
shows a section of that file for this exercise.
57 Simulating dam breaches

Figure 6.13 – Extract of the DamBreach.dambreachh file

This concludes the Simulating dam breaches tutorial.


Establishing initial water, mud, or tailings
7
elevations

Sometimes it is practical to use a raster layer to establish the initial condition of the water surface
elevation (Initial WSE). For instance, when modeling tailings dam breaks, it is often necessary to
define the initial surface of the tailings behind the dam.
This tutorial illustrates how to use a raster file that contains the initial elevations of the fluid con-
tained by a dam with the purpose of simulate a dam breach and determine the fluid runout after
the dam collapses.
The procedure of modeling a dam-breach using an initial condition of fluid surface elevation in-
volves the following steps:

1. Open an existing RiverFlow2D project.

2. Import a raster layer with the initial values of the water surface elevation (WSE).

3. Export the files to RiverFlow2D by setting the option to use the raster layer with the Initial
WSE.

The files used in this tutorial can be found in the following directory:

...\Documents\RiverFlow2D QGIS\ExampleProjects\initalWSE RasterTutorial

58
59 Establishing initial water, mud, or tailings elevations

7.1 Open an existing RiverFlow2D project


Start QGIS and in the Project, use the Open... command to load the existing project: InitialWSE RasterTutorial.q
The project corresponds to a model of a dam breach with an initial elevation of the fluid surface
that is not horizontal but varies in space.
When you open the project you will have an image of the project loaded in QGIS as shown in the
Figure 7.1.

Figure 7.1 – Project screen loaded in QGIS.

7.2 Importing the Initial WSE raster layer


The procedure to import the Initial WSE raster layer to the project includes the following steps:

1. Open the ASCII grid file representing the initial condition elevations clicking on on the Add
Raster Layer button and selecting the InitiaWSE r.tif file.

2. Confirm the CRS 2229 projection that will be used for this layer

3. If necessary, move the new layer under the group MESH SPATIAL DATA. You should have
an image on the screen like the one shown below:
7.3 Exporting files to RiverFlow2D 60

Figure 7.2 – Initial WSE raster layer.

The image shows the InitialWSE r raster layer in grays gradient where there is a change in
the WSE ranging from 135.0 to 135.4 ft.

The window above has the Trimesh layer disabled for clarity. Re-enable it for the export
process in the next section.

7.3 Exporting files to RiverFlow2D


1. Export the files in the format required by the RiverFlow2D using the Export to RiverFlow2D
plugin. When executing the plugin a window like the one shown in the Figure 7.3 is shown.
61 Establishing initial water, mud, or tailings elevations

Figure 7.3 – Plugin window to export the files to RiverFlow2D.

As shown in the figure, click the Options arrow to display the group of options that appear
hidden by default.

2. Select the DEM raster in the DEM (Single Raster) drop down.

3. Check the box Using Initial WSE Raster Layer. Select the InitialWSE r layer from the drop-
down list.

4. Click OK button and the export process will begin.

From this point on, run the model in the usual manner as explained in previous tutorials.
Simulating bed load sediment transport with
8
limited erosion bed areas

In the Sediment Transport model you can define areas with a maximum erosion depth. This is
useful to represent pavements, rock outcrops or any surface that does not erode or that it has
a known erodible layer of sediment above it. This tutorial illustrates how to perform a sediment
transport simulation in which there is a non-erodible area using the QGIS interface. The procedure
includes the following steps:

1. Open an existing RiverFlow2D project.

2. Create a MaximumErosionDepth layer and the polygons that define the limited erosion areas.

3. Generate the mesh.

4. Running the model.

The files required to follow this tutorial can be found in the following directory:

...\Documents\RiverFlow2D QGIS\ExampleProjects\MaxErosionDepth

8.1 Open an existing project


1. Open QGIS

2. In the main menu go to Project → Open... browse to the existing project: MaxErosionDepth.qgs.

62
63 Simulating bed load sediment transport with limited erosion bed areas

This project contains the layers of the domain outline, of the digital elevation model DEM of the
river bed in raster format, the layer with the boundary conditions where inflow is located in the
upper left and outflow in the lower left. The boundary conditions are a hydrograph with a peak
discharge of 6,500 f t3 /s and outflow condition is set to free outflow. When you open the project
you will have a project image loaded in QGIS as shown in Figure 8.1.

Figure 8.1 – Project screen loaded in QGIS.

8.2 Add MaximumErosionDepth layer and draw the


polygon that defines the area of limited erosion
Defining the limited erosion areas involves the following steps:

1. Create the template for the MaximumErosionDepth layer: In the RiverFlow2D toolbar click
on the New Template Layer button

2. Activate the checkbox MaximumErosionDepth, as shown in the Figure below:


8.2 Add MaximumErosionDepth layer and draw the polygon that defines the area of limited
erosion 64

Figure 8.2 – Plugin to add a New Template Layer.

3. Edit the MaximumErosionDepth layer: In the layers panel, select the MaximumErosionDepth
layer and in the digitalization toolbar we click on the Toggle editing button

A pencil icon will appear in the MaximumErosionDepth layer, indicating that the layer is in
edit mode:

4. Draw the polygon of the limited erosion area: Using the Add Feature tool

draw the polygon that defines the area of limited erosion. The polygon should cover all the
cells that will have limiting erosion. In this tutorial we will assume that an area on the river
has the maximum erosion depth limited to 0.1 feet, at the end you should have an image
similar to the one shown in the following figure:
65 Simulating bed load sediment transport with limited erosion bed areas

Figure 8.3 – Polygon of the area with limited erosion.

Once you finish drawing the polygon, the window to input the area parameters immediately
appears. Input a maximum depth of erosion of 0.1 feet, as shown below:

Figure 8.4 – Window for input the polygon parameters of MaximumErosionDepth layer.
8.3 Generate the mesh 66

8.3 Generate the mesh


Generate the mesh using the Generate TriMesh button

The results obtained as shown in Figure 8.5 (mesh of close to 17,500 cells).

Figure 8.5 – The mesh generated.


67 Simulating bed load sediment transport with limited erosion bed areas

8.4 Exporting files to RiverFlow2D


Now that you have generated the mesh and you have the other layers with the necessary data,
export the files in the format required by RiverFlow2D.

1. Click on the Export RiverFlow2D button

2. When run the plugin a window is displayed, select the raster layer that contains the Digital
Elevation Model (DEM) and the name of the project to be exported. Input the name without
any extension. For this example it will be: MaxErosion.

3. Before running the plugin activate the layer with the DEM (if it is deactivated).
Once the plugin is executed, a window will be shown (Figure 8.6), as it should be for our
example.

Figure 8.6 – Plugin window to export the files to RiverFlow2D.

4. Once finished inputting the information, click on the OK button and the export process will
begin.

Once it is finished, tRiverFlow2D will be loaded with the MaxErosion.DAT file of the specific ex-
ample.

8.5 Running the model


After exporting the files, RiverFlow2D is loaded with the project file of the MaxErosion.DAT exam-
ple and shows the Control Data panel to it as illustrated in Figure 8.7
8.5 Running the model 68

Figure 8.7 – Control data panel.

Note that the sediment transport module appears selected and displays a message warning that
the file with the sediment information must be created. The procedure includes the following
steps:

1. To create the .SEDB file with the parameters to calculate sediment transport: in the Modules
list select SedimentTransport.

2. Enter the parameters for transport in suspension and bed load transport, for this example
the transport of sediments in suspension is deactivated and bed load transport is left active.

3. Add the sediment fractions to be considered: for this example add a single fraction with the
default values presented by the Hydronia Data Input Program, we will have an image similar
to the one shown in the following Figure:

Figure 8.8 – RiverFlow2D Sediment Transport Module.


69 Simulating bed load sediment transport with limited erosion bed areas

Leave all other parameters at their default values.

4. Click the [Save SED* Files] button and leave the default name provided.

5. To run the model, click on the Run RiverFlow2D button in the lower section of Hydronia Data Input Program.

6. Save the changes with the same name of the MaxErosion.DAT file, then a window will ap-
pear indicating that the model started running.

The window presented while running the model shows: information of the simulation time, the
volume conservation error, the total discharge of the liquid flow in and out and in this case also
shows the sediment load at the inlet and outlet as well as other parameters as the execution
progresses (Figure 8.9).

Figure 8.9 – RiverFlow2D output graphics.

8.6 Check the output files


RiverFlow2D creates the following files for output time interval defined in the Control Data panel:

CELL TIME METRIC DDDD HH MM SS.TEXTOUT (Metric Units) or

CELL TIME ENG DDDD HH MM SS.TEXTOUT (English Units)

where DDDD indicates the date, HH, hour, MM minutes and SS seconds.
Column 6 reports the changes in the elevation of the river bed with respect to the initial elevation.
We can also visualize the changes in the elevation of the riverbed generating layers in vectorial
8.6 Check the output files 70

format map from the aforementioned files using the Maps of Results vs Time plugin in QGIS,
specifically the Delta Bed Elevations map:

In the following figure, the river elevation difference map for the end of the run. At the time
0000:02:00:00 it can be observed that the zone where the erosion was limited, does not present
erosion, but deposition:

Figure 8.10 – Maps of elevation difference of the river bed between the initial time and at the end of the
run.

This concludes the Simulating bed load sediment transport tutorial.


Hydrologic simulations
9
The conceptual model of a hydrologic simulation with RiverFlow2D requires a series of non-
overlapping polygons where the rainfall/evaporation and infiltration data will be assigned to the
mesh. Only areas covered by polygons will receive rainfall or consider infiltration depending on
the case. Each Rainfall/Evaporation polygon should be associated with a file containing a rainfall
and evaporation time-series file. Similarly, each Infiltration polygon should correspond with a file
containing the infiltration calculation method and its parameters for the polygon. The user will
need to generate the rainfall and infiltration data files associated with each polygon, and copy
them to the project folder prior to running the model.
This tutorial illustrates how to perform a hydrologic simulation accounting for rainfall, evaporation
and infiltration. The procedure includes the following steps:

1. Create the rainfall and evaporation time series data files.

2. Create the infiltration data files.

3. Open an existing RiverFlow2D project.

4. Add the template of the RainEvap component layer and the rain/evaporation polygons.

5. Add the template of the Infiltration component layer and the Infiltration polygons.

6. Generate the mesh.

7. Running the model.

8. Visualize model results.

71
9.1 Create the rainfall and evaporation time series data file 72

Note: The files required to follow this tutorial can be found in the following directory:

...MyDocuments\RiverFlow2D QGIS\ExampleProjects\RainfallInfiltrationTutorial

9.1 Create the rainfall and evaporation time series data


file
To run a hydrologic simulation with RiverFlow2D, polygons will be created on which the rainfall/
evaporation data will be applied, but you must first create the ASCII text files with the rainfall and
evaporation time series that will be associated with each polygon. These files can be created
with any text editor, such as Notepad or Wordpad. The rainfall/evaporation file has the following
format:
Line 1: NPRE Number of points in the time series of rainfall and evaporation
Then follows NPRE lines containing:
Time (hr) Precipitation intensity (mm/h or in/h) Evaporation (mm/h or in/h)
The following table is an excerpt of the Rainfall1.dat file that is included in the folder for this
tutorial. In this example, evaporation is assumed to be zero at all times. Figure 9.1 shows the
graphical representation of the rainfall time series in the Rainfall1.dat file.
18
0.0 0.0 0.0
0.08 1.8 0.0
0.17 3.5 0.0
0.25 7.8 0.0
0.33 12.0 0.0
0.42 15.0 0.0
...
1.17 9.0 0.0
1.25 4.7 0.0
1.33 3.0 0.0
1.42 2.4 0.0
73 Hydrologic simulations

Figure 9.1 – Rain intensity time series.

9.2 Create the infiltration parameters data file


To take into account infiltration, polygons will be created in which you specify the infiltration calcu-
lation method, and its corresponding data. The infiltration polygons are completely independent
from the precipitation polygons. Each polygon can use a different method with its associated
parameters. You will need to create the infiltration ASCII text files for each polygon. These files
can be created with any text editor, such as Notepad or Wordpad. The infiltration file is described
in detail in the RiverFlow2D Reference Manual. For this tutorial, given that the watershed has an
area with natural coverage in the upper area, and another with urban use in the lower area of
watershed, we will use two infiltration files using the the SCS-CN method to calculate the infiltra-
tion. File Infiltration1.dat will be used for the upper watershed, and for the lower urban zone,
Infiltration2.dat file. Both files are provided in the folder for this tutorial.

9.3 Open an existing project


1. Open QGIS

2. On the Project menu click Open... and browse to the existing project: RainfallInfiltrationTutorial.qgs.
This project contains the information to simulate the rainfall runoff resulting from a 10 yr
storm. The layers contained are the following:

• Domain Outline
• Digital Elevation Model (DEM) in raster format
• Aerial photography
• Polygons with the Manning’s n coefficients
• Cross section at watershed outlet
• Outflow boundary conditions set to free outflow
9.4 Add the RainEvap component layer, and the rainfall/evaporation polygons 74

When you open the project you will have an view similar as that shown in Figure 6-2.

Figure 9.2 – Rainfall and infiltration tutorial loaded in QGIS.

9.4 Add the RainEvap component layer, and the


rainfall/evaporation polygons
To add the RainEvap where the polygons are drawn with the rainfall and evaporation data, do the
following:

1. To create RainEvap layer use the New Template Layer button

2. In the window check RainEvap, as shown in the Figure below. Then click OK:
75 Hydrologic simulations

Figure 9.3 – Dialog to add a new layer.

3. Edit the RainEvap layer: In the layers panel, select the RainEvap layer and click on the
Toggle Editing button in the digitization bar

A pencil icon will appear in the RainEvap layer, indicating that the layer is in edit mode:

4. Draw the polygon that demarcates the spatial distribution of rainfall and evaporation: Using
the Add Feature tool from the digitalization bar

draw the rainfall/evaporation polygon, as only one file will be used. The polygon should
9.5 Add the Infiltration component layer, and the Infiltration polygons 76

covers the entire Domain Outline as shown in the figure below:

Figure 9.4 – Polygon with the spatial distribution of Rainfall/evaporation data.

5. Input the parameters or attributes of the RainEvap polygon: just after the polygon is fin-
ished, the dialog to input the parameters will open, clicking on the button [...] search the
Rainfall1.dat file in the folder of this tutorial.

9.5 Add the Infiltration component layer, and the


Infiltration polygons
To add the infiltration information, do as follows:

1. To create the Infiltration layer y use the New Template Layer button

2. In the dialog select Infiltration, as shown in the Figure below:


77 Hydrologic simulations

Figure 9.5 – Plugin to add a new template layer.

3. Edit the Infiltration layer: In the layers panel, select the Infiltration layer and click on the
Toggle Editing tool

A pencil will appear in the Infiltration layer, indicating that the layer is in edit mode:

4. Draw the polygon that demarcates the spatial distribution of the infiltration: Using the tool
Add Feature tool of the digitalization bar, draw the infiltration polygons
9.5 Add the Infiltration component layer, and the Infiltration polygons 78

Figure 9.6 shows the polygons that define the two infiltration zones of the watershed that
are based on the land use and vegetation cover.

Figure 9.6 – Infiltration areas of the watershed.

5. Draw a polygon for the infiltration2 area trying to maintain the shape as indicated in the
previous figure and that protrudes from the polygon of the Domaine Outline as shown in the
figure below:

Figure 9.7 – Polygon of the infiltration2 area of the watershed.

6. Once completing the polygon, the dialog to input the parameters opens. Browse to the input
79 Hydrologic simulations

file Infiltration2.txt, as shown below:

Figure 9.8 – Window to input the parameters for the infiltration2 polygon.

7. To draw the second polygon corresponding to infiltration2 use the snapping option as shown
in the section Advanced Digitalization/Snapping Tutorial and there should be a polygon like
the one shown in the following figure:

Figure 9.9 – Polygons of the infiltration areas of the watershed.


9.6 Generate the mesh 80

8. Once finished drawing the polygon, enter the file name Infiltration1.txt as shown:

Figure 9.10 – Dialog to enter the parameters for the infiltration1 polygon.

9.6 Generate the mesh


The mesh is generated using the Generate TriMesh icon

Figure 9.11 shows the resulting mesh of about 140,000 cells.

Figure 9.11 – Final mesh.


81 Hydrologic simulations

9.7 Exporting files to RiverFlow2D


Now that once you have generated the mesh, and the other layers are ready with the necessary
data, you should export the files in the format required by RiverFlow2D. We will use the Export
RiverFlow2D icon.

1. Click on the Export RiverFlow2D icon.

When running the export command, you need to select the raster layer that contains the
Digital Elevation Model (DEM), and the name of the project to be exported, only the name
must be indicated without any extension.
When the export files finalizes, a window will be appear as shown in Figure 9.12.

Figure 9.12 – Export dialog.

2. After entering the data, click on the OK button and the export process will begin. Once
finished, the RiverFlow2D program will be loaded with the RainfallInfiltration.DAT file.

9.8 Running the model


After exporting the files, the RiverFlow2D program is loaded with the project file from the RainfallInfiltration.DAT
example and shows the Control Data panel to it as illustrated in Figure 9.13
9.8 Running the model 82

Figure 9.13 – Control data panel.

As shown above, the Rainfall Components Evaporation/Infiltration are selected in the data panel.

1. Under Time control data set the Output interval for components (hrs) to 0.1.

If you have an nVidia GPU installed, you may select the RiverFlow2D GPU radial button
under Model Selection to accelerate the model execution

2. Click [Save .DAT] to overwrite the existing RainfallInfiltration.dat file.

3. Select Rainfall/Evaporation and the rainfall data contained in the rainfall1.txt file will
appear (Figure 9.14). In the Infiltration panel the data contained in the Infiltration1 and
Infiltration2 files is shown (Figure 9.15).

Figure 9.14 – Rainfall/Evaporation component data panel.


83 Hydrologic simulations

Figure 9.15 – Infiltration component data panel.

4. Leave all other parameters at their default values.

5. To run the model, click on the Run RiverFlow2D button. A window will appear indicating that
the model began to run. The window also report the simulation time, volume conservation
error, total input and output discharge, and other parameters as the execution progresses
(Figure 9.16).

Figure 9.16 – RiverFlow2D output graphics.


9.9 Review the output files 84

9.9 Review the output files


The outflow hydrograph can be visualized using the cross section tool as shown in Figure 9.17:

Figure 9.17 – Output hydrograph of output.

This concludes the Hydrologic simulations tutorial.


Urban Drainage using RiverFlow2D and
10
EPA-SWMM

This tutorial illustrates how to apply the RiverFlow2D Urban Drainage module that integrates
surface flooding with EPA-SWMM storm drain model. The project objective is to assess the
shallow inundation originating from a surcharging underground pipe. The procedure involves
the following steps:

1. Create a SWMM application.

2. Open an existing RiverFlow2D model.

3. Import the surface-storm drain exchange points from the.INP SWMM file.

4. Generate the mesh.

5. Export the files of RiverFlow2D.

6. Run the model.

The files required to follow this tutorial can be found in the following directory:

...MyDocuments\RiverFlow2D QGIS\ExampleProjects\UrbanDrainageTutorial
The pipe is modeled in 1D and connected to the 2D mesh through a manhole. The modeled area
is approximately 0.4 km by 0.96 km (see Figure 10.1). A storm drain of circular section of 1.4m in
diameter and 1340 m in length is assumed to run through the modeled area. The pipe Manning’s
roughness is set to n=0.017. An inflow boundary condition is applied at the upstream end of the
pipe, illustrated in Figure 10.2. A free outfall is considered as downstream boundary condition. A

85
86

base initial flow of 1.6 m3 /s is set as uniform initial condition. A surcharge is expected to occur
at a vertical manhole of 1 m2 cross-section located 467 m from the top end of the culvert at the
coordinates (x=264,896 m,y=664,747 m). The profile geometry of the culvert is given in Table
10.1 and shown in Figure 10.3.

Figure 10.1 – DEM used, with the location of the manhole. The course of the storm drain is indicated,
although irrelevant to the modeling. Purple lines: outline of roads and pavements. Black lines: building
outlines. Triangles: output point locations.

Figure 10.2 – Inflow hydrograph applied at upstream end of storm drain.


87 Urban Drainage using RiverFlow2D and EPA-SWMM

Node Distance from upstream inlet (m) Invert level (m) Reach length (m) X Y
N1 0 39.17 - 264896.000 664747.000
N2 manhole 467 29.46 467 264896.000 664747.000
N3 571 27.70 104 265633.232 664154.002
N4 677 26.37 106 266474.164 663829.787
N5 877 25.70 200 267730.496 663302.938
N6 991 24.64 114 268470.111 662978.723
N7 1145 24.29 154 269533.941 662725.431
Out1 1340 23.49 195 271874.367 661752.786
Table 10.1 – Pipe longitudinal profile

Figure 10.3 – Storm drain profile.

10.1 Storm drain configuration in EPA-SWMM

If you want to skip this step, you may want to use the SWMM TEST8B.INP in the tutorial folder. In
that case, please go to section 10.1.1.

1. The first step consists in setting the position of all the nodes that conforms the drainage
network by means of the button Add a junction node:

On the Study area map window, click as many times as nodes should be added to the net-
work. In this project there will be 8 nodes. Note that the position of the nodes is schematic:
10.1 Storm drain configuration in EPA-SWMM 88

2. Configure the node data by double-clicking on each node. The node properties window
should appear:

In this example, the most relevant parameters are: Name, X- and Y-Coordinates, Inflows,
Invert elevation and Max. depth. The only inflow nodes are N1 and N2 manhole. Node
N2 manhole should have Max. depth=2 m. Node N1 is the discharge input and should
follow the time series given in Figure 10.2.
89 Urban Drainage using RiverFlow2D and EPA-SWMM

The time series can be inserted point-by-point or read from file. On the other hand, node
N2 manhole will be the connection with the surface domain and the baseline values should
be 0.0:

The outfall node Out1 should be configured as free:


10.1 Storm drain configuration in EPA-SWMM 90

3. Join the nodes by means of the Add a conduit link tool:

The result should look like the following figure:


91 Urban Drainage using RiverFlow2D and EPA-SWMM

4. Configure the link properties by double-clicking on each one:

The most relevant properties are: Name, Inlet node, Outlet node, Shape, Max. depth,
Length, Roughness and Initial flow.

5. Once the network is completely configured, the project should be saved in order to generate
the .INP file that should be similar to the one shown below.
10.1 Storm drain configuration in EPA-SWMM 92

[EVAPORATION]
;;Data Source Parameters
;;-------------- ----------------
CONSTANT 0.0
DRY_ONLY NO

[JUNCTIONS]
;;Name Elevation MaxDepth InitDepth SurDepth Aponded
;;-------------- ---------- ---------- ---------- ---------- ----------
N1 39.17 0 0 0 0
N2_manhole 29.46 2 0 0 0
N3 27.7 0 0 0 0
N4 26.37 0 0 0 0
N5 25.7 0 0 0 0
N6 24.64 0 0 0 0
N7 24.29 0 0 0 0

[OUTFALLS]
;;Name Elevation Type Stage Data Gated Route To
;;-------------- ---------- ---------- ---------------- -------- ----------------
Out1 23.49 FREE NO

[CONDUITS]
;;Name From Node To Node Length Roughness InOffset OutOffset InitFlow MaxFlow
;;-------------- ---------------- ---------------- ---------- ---------- ---------- ---------- ---------- ----------
L1 N1 N2_manhole 467 0.017 0 0 1.6 0
L2 N2_manhole N3 104 0.017 0 0 1.6 0
L3 N3 N4 106 0.017 0 0 1.6 0
L4 N4 N5 200 0.017 0 0 1.6 0
L5 N5 N6 114 0.017 0 0 1.6 0
L6 N6 N7 154 0.017 0 0 1.6 0
L7 N7 Out1 195 0.017 0 0 1.6 0

[XSECTIONS]
;;Link Shape Geom1 Geom2 Geom3 Geom4 Barrels Culvert
;;-------------- ------------ ---------------- ---------- ---------- ---------- ---------- ----------
L1 CIRCULAR 1.4 0 0 0 1
L2 CIRCULAR 1.4 0 0 0 1
L3 CIRCULAR 1.4 0 0 0 1
L4 CIRCULAR 1.4 0 0 0 1
L5 CIRCULAR 1.4 0 0 0 1
L6 CIRCULAR 1.4 0 0 0 1
L7 CIRCULAR 1.4 0 0 0 1

[INFLOWS]
;;Node Constituent Time Series Type Mfactor Sfactor Baseline Pattern
;;-------------- ---------------- ---------------- -------- -------- -------- -------- --------
N1 FLOW discharge_inflow FLOW 1.0 1
N2_manhole FLOW "" FLOW 1.0 1.0 0.0

[TIMESERIES]
;;Name Date Time Value
;;-------------- ---------- ---------- ----------
discharge_inflow 0:00 1.6
discharge_inflow 0:02 1.6
discharge_inflow 0:04 1.6
discharge_inflow 0:06 1.6
discharge_inflow 0:08 1.61644
discharge_inflow 0:10 1.6336
discharge_inflow 0:12 1.65472
discharge_inflow 0:14 1.67188
discharge_inflow 0:16 1.68904
discharge_inflow 0:18 1.70488
discharge_inflow 0:20 1.71808
discharge_inflow 0:22 1.71808
discharge_inflow 0:24 1.7392
discharge_inflow 0:26 1.75636
discharge_inflow 0:28 1.77352
discharge_inflow 0:30 1.7986
discharge_inflow 0:32 1.82764
discharge_inflow 0:34 1.8448
discharge_inflow 0:36 1.88704
discharge_inflow 0:38 1.92136
discharge_inflow 0:40 1.95436
discharge_inflow 0:42 1.98868
discharge_inflow 0:44 2.02168
discharge_inflow 0:46 2.056
discharge_inflow 0:48 2.09824
discharge_inflow 0:50 2.1484
discharge_inflow 0:52 2.19988
discharge_inflow 0:54 2.25928
discharge_inflow 0:56 2.32264
discharge_inflow 0:58 2.3728
discharge_inflow 1:00 2.4784
discharge_inflow 1:02 2.56288
93 Urban Drainage using RiverFlow2D and EPA-SWMM

discharge_inflow 1:04 2.66056


discharge_inflow 1:06 2.77012
discharge_inflow 1:08 2.8876
discharge_inflow 1:10 3.0064
discharge_inflow 1:12 3.17536
discharge_inflow 1:14 3.29416
discharge_inflow 1:16 3.44992
discharge_inflow 1:18 3.61888
discharge_inflow 1:20 3.78784
discharge_inflow 1:22 3.9568
discharge_inflow 1:24 4.168
discharge_inflow 1:26 4.33696
discharge_inflow 1:28 4.50592
discharge_inflow 1:30 4.67488
discharge_inflow 1:32 4.83988
discharge_inflow 1:34 4.99168
discharge_inflow 1:36 5.16064
discharge_inflow 1:38 5.27944
discharge_inflow 1:40 5.41012
discharge_inflow 1:42 5.54476
discharge_inflow 1:44 5.67148
discharge_inflow 1:46 5.77312
discharge_inflow 1:48 5.89984
discharge_inflow 1:50 6.00148
discharge_inflow 1:52 6.10312
discharge_inflow 1:54 6.1876
discharge_inflow 1:56 6.24096
discharge_inflow 1:58 6.28111
discharge_inflow 2:00 6.28111
discharge_inflow 2:02 6.24096
discharge_inflow 2:04 6.1876
discharge_inflow 2:06 6.10312
discharge_inflow 2:08 6.00148
discharge_inflow 2:10 5.89984
discharge_inflow 2:12 5.77312
discharge_inflow 2:14 5.67148
discharge_inflow 2:16 5.54476
discharge_inflow 2:18 5.41012
discharge_inflow 2:20 5.27944
discharge_inflow 2:22 5.16064
discharge_inflow 2:24 4.99168
discharge_inflow 2:26 4.83988
discharge_inflow 2:28 4.67488
discharge_inflow 2:30 4.50592
discharge_inflow 2:32 4.33696
discharge_inflow 2:34 4.168
discharge_inflow 2:36 3.9568
discharge_inflow 2:38 3.78784
discharge_inflow 2:40 3.61888
discharge_inflow 2:42 3.44992
discharge_inflow 2:44 3.29416
discharge_inflow 2:46 3.17536
discharge_inflow 2:48 3.0064
discharge_inflow 2:50 2.8876
discharge_inflow 2:52 2.77012
discharge_inflow 2:54 2.66056
discharge_inflow 2:56 2.56288
discharge_inflow 2:58 2.4784
discharge_inflow 3:00 2.3728
discharge_inflow 3:02 2.32264
discharge_inflow 3:04 2.25928
discharge_inflow 3:06 2.19988
discharge_inflow 3:08 2.1484
discharge_inflow 3:10 2.09824
discharge_inflow 3:12 2.056
discharge_inflow 3:14 2.02168
discharge_inflow 3:16 1.98868
discharge_inflow 3:18 1.95436
discharge_inflow 3:20 1.92136
discharge_inflow 3:22 1.88704
discharge_inflow 3:24 1.8448
discharge_inflow 3:26 1.82764
discharge_inflow 3:28 1.7986
discharge_inflow 3:30 1.77352
discharge_inflow 3:32 1.75636
discharge_inflow 3:34 1.7392
discharge_inflow 3:36 1.71808
discharge_inflow 3:38 1.71808
discharge_inflow 3:40 1.70488
discharge_inflow 3:42 1.68904
discharge_inflow 3:44 1.67188
discharge_inflow 3:46 1.65472
discharge_inflow 3:48 1.6336
discharge_inflow 3:50 1.61644
discharge_inflow 3:52 1.6
discharge_inflow 3:54 1.6
10.1 Storm drain configuration in EPA-SWMM 94

discharge_inflow 3:56 1.6


discharge_inflow 3:58 1.6
discharge_inflow 5:00 1.6

[REPORT]
;;Reporting Options
INPUT NO
CONTROLS NO
SUBCATCHMENTS ALL
NODES ALL
LINKS ALL

[TAGS]

[MAP]
DIMENSIONS 260000.000 660000.000 270000.000 670000.000
Units Meters

[COORDINATES]
;;Node X-Coord Y-Coord
;;-------------- ------------------ ------------------
N1 264903.824 664753.843
N2_manhole 264896.000 664747.000
N3 265633.232 664154.002
N4 266474.164 663829.787
N5 267730.496 663302.938
N6 268470.111 662978.723
N7 269533.941 662725.431
Out1 271874.367 661752.786

[VERTICES]
;;Link X-Coord Y-Coord
;;-------------- ------------------ ------------------

10.1.1 Starting QGIS


Start the QGIS software. After loading we will have a window similar to the one shown below:

Figure 10.4 – QGIS interface.

10.1.2 Start a new RiverFlow2D project


1. In the RiverFlow2D toolbar, click on the New RiverFlow2D Project button
95 Urban Drainage using RiverFlow2D and EPA-SWMM

to start a new RiverFlow2D project. A dialog window appears where you select the layers
that will be created, the Coordinate Reference System (CRS), and the directory path where
the layers will be saved. This example will use the basic layers: Domain Outline, Manning
N, and BoundaryConditions

2. Select None in the Layers dropdown menu.

3. Select the Projection button. Note that it is EPSG:4326 is set as default, but should be
changed!.

4. In the Filter textbox, type 7405 and select the Coordinate Reference System as shown:

Figure 10.5 – Coordinate Reference System Selector dialog window.

5. Click OK.

6. The Coordinate Reference System (CRS) EPSG code: 7405 should be selected, and the
dialog window will look like this:
10.1 Storm drain configuration in EPA-SWMM 96

Figure 10.6 – Create New RiverFlow2D Project.

7. Click the ”...” button to provide a path to store the project files in the Project Directory textbox.
This will be the folder where the model will write all results and output files.

8. After clicking OK, the layer templates are created, and displayed on the Layers Panel:

Figure 10.7 – Layers created for the project.

RiverFlow2D will use the unit system as that defined in the projection you selected. If the
projection has coordinates in meters, units will be set to Metric. If the projection coordinates
are in feet, units will be set to English.

9. On the QGIS Project menu, click Save, to save the project in the same directory that you
previously selected in the Create New Project dialog above.

10.1.3 Load elevation data


RiverFlow2D uses elevation data in raster format. To load an ASCII grid file, from the Layer
menu, click Add Layer, and then click Add Raster Layer... You may also click the Add Raster
Layer button:
97 Urban Drainage using RiverFlow2D and EPA-SWMM

Search for the TEST8BDEM.ASC in the tutorial folder:

1. Click Add, assign the EPSG:7405 projection code to the file, and raster will be displayed on
the screen, by default it is rendered in gray gradient as shown in Figure 16.6.

Figure 10.8 – Digital elevation model in raster format.


10.1 Storm drain configuration in EPA-SWMM 98

Right-clicking on the label of the created layer and selecting Properties allows you to change
the rendering style for a more informative color palette.

Figure 10.9 – Window to change the raster layer render style.

And now the raster layer is displayed with the new color palette selected:

Figure 10.10 – Digital elevation model with color render.

It is convenient to move the raster layer created to the end of the list of layers, thus it does
not interfere with the display of other layers.
99 Urban Drainage using RiverFlow2D and EPA-SWMM

10.1.4 Import the surface-storm drain exchange node


connections from the SWMM .INP file

To connect the surface water mesh with the storm drain components, we will import the
exchange nodes from the .INP file created in the first part of this tutorial. For that we will
use the Import EPA-SWMM INP file command from the RiverFlow2D tools drop down icon:

Figure 10.11 – Import EPA-SWMM INP file command

Select the TEST8B.INP file and a message will indicate the transfer was successful:

Figure 10.12 – .INP successfully loaded

You will note that there is a new StormDrain layer created and the imported exchange nodes
are displayed:

Figure 10.13 – Surface water-SWMM exchange nodes.


10.1 Storm drain configuration in EPA-SWMM 100

10.1.5 Create the limits of the modeling area


The limits of the modeling area are defined using a polygon on the Domain Outline layer. To
create it do as follows:

1. Click the Domain Outline layer to activate it and then click Toggle Editing (pencil) in the
toolbar:

Figure 10.14 – Menu buttons for digitalization toolbar.

2. This activates the rest of the editing buttons. Now click the Add Feature tool which is the
bean looking polygon.

Proceed to delineate the outline of the polygon by marking the vertices clicking with the left
mouse button:

Figure 10.15 – Modeling area delimitation on the Domain Outline layer.

Make sure that the polygon is contained within the limits of the raster layer since
RiverFlow2D will not extrapolate elevations to areas that are outside of the available data
on the raster layer. Also, the SWMM exchange nodes should be inside the Domain Outline
polygon.
101 Urban Drainage using RiverFlow2D and EPA-SWMM

3. To finalize and close the polygon, right-click anywhere on the map view area. A dialog win-
dow to input the cell size attribute of the newly created polygon. The value for the reference
size of the mesh cell is indicated. Enter a value of 10 m.

Figure 10.16 – CellSize defined for the Domain Outline layer.

Now click on Toggle Editing button to deactivate the layer Edit mode and save the changes.

The Domain Outline is now complete.

Figure 10.17 – Domain Outline layer.


10.1 Storm drain configuration in EPA-SWMM 102

10.1.6 Assigning Manning’s n


To assign Manning’s n roughness values, we will enter polygons with given n’s. There can be
as many polygons as those required to reproduce the spatial variability of this parameter. In this
example, a single polygon will be drawn for the entire area.

1. Select the Manning N layer and click the Toggle Editing button:

2. Draw the polygon around the entire domain taking care that it covers all the cells.
You should have an image like the one shown below:

Figure 10.18 – Editing the Manning N layer.

3. Close the last vertices on the polygon by right-clicking on the desired position. The following
dialog window is presented where you must input the Manning’s n value associated to the
polygon. For this case, enter 0.03:
103 Urban Drainage using RiverFlow2D and EPA-SWMM

Figure 10.19 – Dialog to input Manning N Feature Attributes.

4. Click the Save button

and then click the Editing Tool button

to deactivate editing mode.

10.1.7 Imposing the boundary conditions


By default all boundaries are closed unless we set open boundary conditions. Since in this project
flow is input from the storm drain, we will set only outflow conditions. To define the boundary
conditions draw a polygon that includes the nodes or vertices at the left end of the mesh as
indicated in the figure:

Figure 10.20 – Polygon that covers the nodes defining the Outflow boundary condition segment.
10.1 Storm drain configuration in EPA-SWMM 104

1. Select the BoundaryConditions layer in the Layers panel.

2. Click the Toggle Editing button to add the polygons that are going to indicate the nodes on
which the inflow and outflow conditions are established.

3. To finish the polygon, right-click on desired location. A window to enter the attributes of the
newly created polygon is displayed.

4. The window contains a list to select the name of ID of this BC (Boundary Cond. ID), set Id
to OUTFLOW condition, and from the list of boundary condition Types select Free Outflow.
Enter the data as shown in Figure 2.16 below:

Figure 10.21 – Outflow Boundary Condition.

5. Click the Save button:

10.1.8 Generating the triangular-cell mesh


Now that the Domain Outline has been set, the Manning’s n entered, and the SWMM nodes have
been imported, we can proceed to create the mesh using the GMSH program. To run the plugin,
on the the Plugins menu, click Generate TriMesh, or click on the icon:
105 Urban Drainage using RiverFlow2D and EPA-SWMM

The following figure shows the generated mesh. You will also see in the Layers panel two new
layers: Trimesh and Trimesh point:

Figure 10.22 – Resulting mesh.

Before using the Export plugin, save the QGIS project. To accomplish this, from the Project
menu, click Save. Name the project file Test8B.qgs. Also, uncheck the MeshDensityLine and
MeshBreakLine layers that will not be used in this tutorial.

10.2 Exporting the files


Once the layers with the input information to the model have been created, the next step is to
export from QGIS the data files required by the RiverFlow2D model.

1. Run the Export RiverFlow2D plugin

2. A dialog window is presented. We must indicate the raster layer of the Digital Elevation
Model (DEM), as this layer is not created by the plugin and its name may be different.

3. Using the ”...” button, select the path, and enter the file name. Please, ensure that the path
is the same as that previously selected, and the one corresponding to the .qgs project file.

4. Click OK.
10.2 Exporting the files 106

Figure 10.23 – Export RiverFlow2D dialog.

The plugin will begin to process the information. A message bar at the top will indicate the
approximate progress of the process.
Once the process of creating the files with the input data is finished, the Hydronia Data Input Programprogram
is opened automatically and a dialog window is presented with the model project to run. In
this case: Test8B.DAT should already be set.
Then the window with the input parameters of RiverFlow2D is presented, as shown in the
image below:

Figure 10.24 – Hydronia Data Input Program window.

Enter 5 hours for the Simulation time and click on the Storm Drain EPA-SWMM panel. Enter
for the N1 node CD = 0 since we don’t want exchange with that inflow node to the conduit.
107 Urban Drainage using RiverFlow2D and EPA-SWMM

Figure 10.25 – Storm Drain Dialog.

5. Click [Save .LWSMM] and overwrite the existing file, for this tutorial the filename will be the
name of the project when it was exported with the .lwsmm extension.

6. Click the Run RiverFlow2D button to run the model. The model will show a window reporting
on the model progress.
10.2 Exporting the files 108

Figure 10.26 – Morel Report Window.

When the run finishes, close the window and you can import results back in QGIS to prepare
maps and animations. An example of the maximum depths is shown below:
109 Urban Drainage using RiverFlow2D and EPA-SWMM

Figure 10.27 – Maximum depths.

This concludes the Urban Drainage using RiverFlow2Dand EPA-SWMM tutorial.


Simulating a tailings dam failure with
11
RiverFlow2D MT

This tutorial will show how to set up a tailings dam failure simulation with the RiverFlow2D model
with the Mud and Tailings Flow Module (MT) using the QGIS interface. The exercise consists of
modeling a tailings dam failure flood and creating results maps for the impacted areas. The data
is based on the Brumadinho dam disaster occurred on 25 January 2019 when a tailings dam at
the Córrego do Feijão iron ore mine, east of Brumadinho town, in Minas Gerais, Brazil, suffered a
catastrophic failure.

In this tutorial we will use the data included in the BrumadinhoRF2D folder under
Documents\RiverFlow2D QGIS\ExampleProjects\BrumadinhoRF2D. The folder contains the files
shown:

110
111 Simulating a tailings dam failure with RiverFlow2D MT

Figure 11.1 – Files with data required for the example.

11.1 Start a new project for a tailing dam break


simulation
1. To create a new RiverFlow2D project, open QGIS and click on the New RiverFlow2D Project
button in the toolbar. A dialog window appears where you select the layers that will be
created, the Coordinate Reference System (CRS), and the directory path where the layers
will be saved. This example will use the layers: Domain Outline, Manning N, BoundaryCon-
ditions, MeshDensityLine, and InitialConcentrations.

2. Select None in the Layers drop-down menu, then click the MeshDensityLine and the Initial
Concentrations check boxes.

3. Click the Projection button and in the Filter text box, type 31983 and select the Coordinate
Reference System and click OK as shown:
11.1 Start a new project for a tailing dam break simulation 112

Figure 11.2 – Coordinate Reference System Selector dialog window.

4. Click the button to provide a path to store the project files in the Project Directory text
box. This will be the folder where the model will write all results and output files. Browse
to the tutorial directory Documents\RiverFlow2D QGIS\ExampleProjects\BrumadinhoRF2D
then click Select folder. The dialog window should look like the following:
113 Simulating a tailings dam failure with RiverFlow2D MT

Figure 11.3 – Create new project window.

5. After clicking OK, the layer templates are created, and displayed on the Layers Panel

Figure 11.4 – Layers created for the project.

On the QGIS Project menu, click Save, to save the project in the same directory that you
previously selected in the Create New Project dialog above.

11.2 Load elevation data


In this tutorial we will use two Digital Elevation Model or DEM raster files that contain the terrain
elevation data and tailings dam volume data.
11.2 Load elevation data 114

1. To load the DEMs, click the Add Raster Layer button . You may also use the QGIS
shortcut Control+Shift+R.

2. In the dialog search for the tutorial folder and select the RasterBRUMADINHO.tif and RasterDAM10.tif
files as shown:

Figure 11.5 – Dialog to create a layer from a raster file.

3. Click Add and then Close.

4. Click on the RasterBRUMADINHO layer. Use the Zoom Full button to center the image.
The raster will be displayed on the screen, by default it is rendered in gray gradient as
shown.
115 Simulating a tailings dam failure with RiverFlow2D MT

Figure 11.6 – Digital elevation model in raster format.

Right-clicking on the label of the new raster layer and selecting Properties, in the Symbology
panel you can change the Render type for a more informative palette such as Hillshade for
instance.

Figure 11.7 – Digital elevation model with Hillshade render.


11.3 Create the limits of the modeling area 116

You may move the raster layer by dragging it to the end of the list of layers to avoid that it would
hide or interfere visually with the other layers.

11.3 Create the limits of the modeling area


We define the limits of the modeling area drawing a polygon on the Domain Outline layer. To
create it do as follows:

1. Click the Domain Outline layer to activate it and then click Toggle Editing (pencil) in the
toolbar

2. Click the Add Polygon Feature tool . Proceed to delineate the outline of the polygon by
clicking the vertices with the left mouse button.

3. To finalize and close the polygon, right-click on the map view area. A dialog window to input
the cell size attribute of the newly created polygon will appear. The CellSize value for the
reference size of the mesh cell is indicated. Enter a value of 50 m.
The Domain Outline should look similar to the following figure:

Figure 11.8 – Domain Outline polygon.


117 Simulating a tailings dam failure with RiverFlow2D MT

4. Save the polygon by clicking the Save Layer Edits button .

5. Click on Toggle Editing button to deactivate the layer Edit mode

11.4 Create more detail for the mesh down the main
flow area
Once the Domain Outline is created, a Mesh Density Line will provide the necessary detail down
the main channel for more accuracy.

1. Select the MeshDensityLine layer making sure it is activated as shown

and click the Toggle Editing button .

2. Click the Add Line Feature button then Left-click to draw the points down the middle of
the channel all the way to the river entrance at the bottom of the Domain Outline.

3. Right-click to finish the line. A dialog requesting input for the MeshDensityLine Feature
Attributes will appear. Input 25 as the CellSize for the MeshDensityLine layer. The first line
should look as follows:
11.4 Create more detail for the mesh down the main flow area 118

Figure 11.9 – First mesh density line.

Another line will need to be drawn to finish adding detail down the main path on the river in
the south.

4. Click the Add Line Feature button then Left-click to draw the points starting from the the
south-western part of the Domain Outline along the riverbed and right-click to finish the line,
joining it to the first line as follows:

Figure 11.10 – Second mesh density line.

5. Right-click to finish the second line. A dialog requesting input for the MeshDensityLine
119 Simulating a tailings dam failure with RiverFlow2D MT

Feature Attributes will appear. Input 25 as the CellSize for the MeshDensityLine layer.

6. Save the polygon by clicking the Save Layer Edits button .

7. Click on Toggle Editing button to deactivate the layer Edit mode


The finished MeshDensityLine layer should look as follows:

Figure 11.11 – Finished MeshDensityLine layer.

11.5 Generating the triangular-cell mesh


Now that the Domain Outline and Mesh Density Line layer have been created, proceed to gener-
ate the mesh by clicking on the Generate Trimesh button.
The following figure shows the generated mesh. You will also see in the Layers panel the new
layer: Trimesh
11.6 Setting up the boundary conditions 120

Figure 11.12 – Triangular mesh generated for the tailings dam break tutorial.

11.6 Setting up the boundary conditions


Here we will explain how to enter boundary conditions that are needed in any inflow or outflow
sections of the model area where flow can enter or leave the mesh. In this tutorial we will have
one inflow and one outflow condition.
We first enter the inflow boundary condition imposing a hydrograph (discharge vs time).

1. Select the BoundaryConditions layer in the Layers panel.

2. Click the Toggle Editing button to add the polygons that will indicate the open boundary
segments where inflow and outflow conditions are imposed. Draw a polygon at the bottom
end of the mesh as indicated in the figure:
121 Simulating a tailings dam failure with RiverFlow2D MT

Figure 11.13 – Polygon that covers the nodes defining the Inflow boundary condition segment.

3. To finish the polygon, right-click on desired location. A window to enter the attributes of the
newly created polygon is displayed.

The exact form of the polygon is not important. You only need to make sure that the polygon
covers the segment length at which you want to impose the condition. All cells falling within
that polygon will be open boundary cells.

4. In the Boundary Cond. ID enter the desired name or leave the default.

5. Select 2. Discharge vs. Time from the Type of Open Boundary list.

6. Click Import BC File button, and search for the inlet1.QVT hydrograph file as shown below:
11.6 Setting up the boundary conditions 122

Figure 11.14 – Inflow boundary condition parameters.

Figure 11.15 – Hydrograph loaded from the inlet1.QVT file.

7. Click OK to close the dialog and then click Save Layer Edits .

All boundary condition files, such as inlet1.QVT in this tutorial, need to be in the same directory
as all the other project files.

Now we will enter an free outflow condition where the fluid will be let to flow out from the mesh.
123 Simulating a tailings dam failure with RiverFlow2D MT

1. Click the Add Polygon Feature tool . Proceed to delineate the outline of the polygon
by clicking the vertices with the left mouse button. Draw the polygon defining the outflow
boundary area at the downstream end of the river as shown:

Figure 11.16 – Polygon that defines the outflow boundary condition segment.

2. Right click to close the polygon. A dialog window will appear to enter the parameters. Select
the condition type Free outflow and should look like the following:

Figure 11.17 – Parameters for the free outflow open boundary condition.

3. Save the changes made to the layer by clicking the Save Layer Edits button .
11.7 Assigning Manning’s n 124

4. Deactivate editing mode by clicking on the Toggle Editing button .


The figure below shows how the BoundaryConditions layer should look:

Figure 11.18 – Polygons that define the inflow and outflow boundary conditions.

11.7 Assigning Manning’s n


Manning’s n is the parameter determining the bed roughness. The model requires that all cells in
the model area have a defined n. In a project application we should have n’s that vary through the
mesh since variable vegetation and terrain characteristics will have different roughness. However,
for simplicity, in this tutorial we will assume a single n.

1. Select the Manning N layer and click the Toggle Editing button .

2. Click the Add Polygon Feature to draw a polygon that covers the entire domain. The
polygon may extend beyond the mesh area as shown:
125 Simulating a tailings dam failure with RiverFlow2D MT

Figure 11.19 – Manning N layer.

3. Close the polygon by right-clicking on the end vertex and enter a Manning’s n equal to 0.035:

Figure 11.20 – Dialog to input ManningN.

4. Click Save Layer Edits , and then click the Toggle Editing button to deactivate editing
mode.

11.8 Providing the Initial Concentrations for the tailings


material
The RiverFlow2D MT model allows defining initial volume concentrations that vary in space. In
order for the model to assign this initial state, one or more polygons must be drawn over the
tailings raster or initial water surface elevation polygon. This polygon will then be assigned a data
11.9 Exporting the project from QGIS to RiverFlow2D 126

table attribute that gives the concentrations for each sediment class.

1. Select the InitialConcentrations layer in the Layers and click the Toggle Editing button

2. Click the Add Polygon Feature button and draw the polygon, keeping within the edges
of the RasterDAM10 raster:

Figure 11.21 – Initial Concentrations polygon.

3. An InitialConcentrations - Feature Attributes dialog will appear. Browse to select the Deposit Initial.txt
file from the project folder and then click OK.

4. Save the changes made to the layer by clicking the Save Layer Edits button .

5. Click the Toggle Editing button to disable editing mode.

Save the QGIS project using the Save Project button or by using the Project menu. Name the
project file Brumadinho.qgs.

11.9 Exporting the project from QGIS to RiverFlow2D


Once the layers with the input data to the model have been created, we need to export data files
required to run RiverFlow2D.

1. In the RiverFlow2D plugin toolbar, click the Export files for RiverFlow2D button and select
Export RiverFlow2D ...

2. In the export dialog window indicate the Project Name, Brumadinho in this tutorial.

3. In the drop-down menu for DEM Single Raster select RasterBRUMADINHO

4. Click on the Options arrowhead to view the additional parameters for the export.
127 Simulating a tailings dam failure with RiverFlow2D MT

5. Click to enable the checkbox for Using Initial WSE Raster Layer, then on the drop down
menu select the RasterDAM10 as your InitialWSE layer.
Your Export RiverFlow2D dialog window should look like this:

Figure 11.22 – Parameters for the Export to RiverFlow2D dialog.

6. Click OK.

11.10 Configure final model parameters in the


Hydronia Data Input Program (DIP).
Once the model files have been created, the Hydronia Data Input Program will appear automati-
cally with the main control data file loaded, in this case: Brumadinho.DAT.

11.10.1 Control Data Panel


The following parameters will need to be changed as indicated:

1. In the Control Data panel under the Time control data section, Set the Output interval (hrs.):
to 0.01.

2. In the Modules section click the Mud/Tailings Flow radial button.

*Optional* If you have an nVidia graphics card installed on the system, you can enable the
RiverFlow2D GPU under the Model Selection section to accelerate the computation speed
for the simulation.
11.10 Configure final model parameters in the Hydronia Data Input Program (DIP). 128

The Control Data panel should look like the following:

Figure 11.23 – Hydronia Data Input Program window with Control Data parameters for the tailings dam
break tutorial.

3. Click the Save .DAT button. Save the file as Brumadinho.dat and click Yes to replace the
existing file.

11.10.2 Mud/Tailings Flow Panel


The Mud/Tailings Flow module needs to be configured with the tailings properties and other rhe-
ological parameters. Please do the following:

1. Click on the Mud/Tailings Flow on the left side panel to activate it.

2. In the Mud/Tailings Flow panel, click the Open .MUD button.

3. A dialog will appear asking for a file ending with the .MUD extension. Select the one named
brumDam.MUD and click Open.
You will now see that the panel has changed most of the parameters. More importantly, the
Variable properties-Erosion-Deposition Model has been enabled, and there are six sediment
classes loaded. Take some time to familiarize yourself with the parameters.
The parameters that have been loaded need to be saved with the same name as the project
name so that the model will use it upon execution.

4. Click the Save .MUD button and the project name Brumadinho.MUD should already be set.
Click Save.
The Mud/Tailings Flow panel should look like the following:
129 Simulating a tailings dam failure with RiverFlow2D MT

Figure 11.24 – Hydronia Data Input Program window with Mud/Tailings Flow parameters for the Bru-
madinho Tutorial.

11.10.3 Updating the Inflow Boundary Condition File


It is critical to update the Open Boundary Conditions data file with additional columns of
data that represent the new sediment classes. By default this file contains a table of time
and discharges, but the model requires for all inflow conditions the volume concentration for
each sediment or material class. In case of water flow, all concentrations must be set to 1.
To update it do the following:

5. Click on the Open Boundary Conditions under Components in the side panel of the Hydronia Data Input Progra

6. Click on the cell in the first table that contains the inlet1.QVT variable:

Figure 11.25 – Section containing table with Boundary Conditions set for this run.

Upon clicking the cell, a dialog box should appear that will allow us to automatically update
the existing data table in the inlet1.QVT file with the additional rows needed, and setting
each to 0:
11.11 Running the model 130

Figure 11.26 – Dialog for correcting the Boundary Conditions file automatically.

7. Click Yes to update the inlet1.QVT file.


You can verify the contents have been updated by scrolling to the right in the file contents
section or by opening the inlet1.QVT file in Windows Explorer.

11.11 Running the model


The simulation is now ready to run. Proceed as follows:

1. Click on Control Data in the side panel of the DIP and then click the Run RiverFlow2D button
at the bottom.

2. The DIP will ask to save changes to the .DAT file, click No.
A few windows should appear, the last one will be the graphical model windows that displays
the status of the model. When the model is finished running, it should look as follows:
131 Simulating a tailings dam failure with RiverFlow2D MT

Figure 11.27 – RiverFlow2D model execution window.

3. Click Close and let the program finish writing the remaining output files.

11.12 Generating maps for the Mud/Tailings Flow


module
Once the model has finished running we can create maps for various outputs. This tutorial will
focus on some of the specific maps that can be generated once the Mud/Tailings module with
variable properties-erosion deposition enabled.

1. In QGIS , in the RiverFlow2D plugin toolbar, click on the drop down menu for Results vs
Time Maps and select Concentrations and Properties vs Time Maps

Figure 11.28 – Concentrations and Properties vs Time button in RiverFlow2D Plugin toolbar.

2. Click on , select the Brumadinho.MUD file then click Open.


11.12 Generating maps for the Mud/Tailings Flow module 132

The Concentrations and Properties vs Time Maps window will provide maps for each Sed-
iment class, labeled Conc # under the Maps subsection. Users can also create maps for
each of the variables in the list.

3. Select one of the Maps, then select an Output Times of interest. You can hold Control key
while clicking on multiple Maps and / or Output Times.

4. Once all outputs of interest are selected, click on the Right Arrow button to move them
to the Output Maps subsection.

Figure 11.29 – Concentrations and Properties vs Time Maps window.

5. Click the OK button to generate the maps.


The Layers panel on the left side will have a group named OUTPUT RESULTS where the
resultant map or maps will be placed.
133 Simulating a tailings dam failure with RiverFlow2D MT

Figure 11.30 – Results map of Conc 1 at hour 2.

Repeat these steps to create maps for each of the concentrations if desired.

11.13 Generating animations for the Mud/Tailings Flow


module
An animation can best illustrate the mud / tailings flow over time. This section will show how to
generate results for the specific variable properties-erosion deposition enabled model outputs.

On the QGIS Project menu, click Save, to save the project in the same directory that you previ-
ously selected in the Create New Project dialog above. This is required for the Animations panel
to function.

1. Start by activating the Animations panel in the RiverFlow2D plugins toolbar


A panel will appear below the Layers panel on the bottom left.

2. Click on the Select layer drop-down menu and select Mud/Tailings Flow.

3. Click Add Layer. A dialog box will appear asking for the specific Animation we would like to
create:
11.13 Generating animations for the Mud/Tailings Flow module 134

Figure 11.31 – RF2D Animation dialog window.

4. Click on the drop-down menu to see the available outputs. They will be the same as the
ones from Concentrations and Properties vs Time Maps plugin.

5. Choose any of these and click OK.

6. Select the output range desired, or just leave the default for the entire range of output inter-
vals. Click OK
There is a status bar underneath the Select layer drop-down showing the progress of the
animation generation. When it is finished, the layer previous choice of animation will appear
in the box underneath the status bar.

Figure 11.32 – RF2D Animation panel indicating the status bar and generated animation layer.

7. Click and hold to drag the newly created ANIMATION group in the Layers panel and move
it above the Raster layers so that the animation will be visible.

8. Click on the layer that was generated in the RiverFlow2D Animation panel then click the Play
button to view the animation.
Repeat these steps to create animations for each of the concentrations if desired.

This concludes the tutorial for Simulating tailings dam Failures utilizing the Mud/Tailings Flow
module in RiverFlow2D.
Wind driven circulation
12
RiverFlow2D and OilFlow2D allow defining wind velocity on the water surface to account for the
effect of the wind stress on the flow velocities. The conceptual model of a wind driven simulation
require a series of non-overlapping polygons that determine the wind velocity data to the model.
Only areas covered by polygons will be affected by the wind stress. Each wind velocity polygon
should be associated with a file containing a wind velocity time-series file containing the two
components of the wind velocity vector for each time. The user will need to generate the wind
velocity data file associated with each polygon, and copy them to the project folder, prior to running
the model.
This tutorial illustrates how to perform a wind drive simulation using the QGIS interface. The
procedure includes the following steps:

1. Create time series data for wind speed.

2. Open an existing RiverFlow2D/ OilFlow2D project.

3. Create the template of the wind layer and the wind speed polygons.

4. Generate the mesh.

5. Running the model.

6. Review wind output files.

Note: The files required to follow this tutorial can be found in the following directory:

...\Documents\RiverFlow2D QGIS\ExampleProjects\WindTutorial

135
12.1 Open an existing project 136

12.1 Open an existing project


1. Open QGIS

2. On the Project menu click Open... to load the existing project: WindTutorial.qgs.

This project contains the layers of the domain contour and the layer of the Digital Elevation Model
(DEM) of Lake Champlain in the USA. When the project is opened, a project image will be loaded
in QGIS as shown in Figure 12.1.

Figure 12.1 – Example of the tutorial loaded in QGIS.

12.2 Wind velocity time-series data file


To run a wind driven simulation you create polygons over which the wind velocity data will be
applied. Each polygon will have an associated velocity time series. These files can be created
with any text editor such as Notepad or Wordpad. The wind velocity file has the following format:
Line 1: Number of points in the time series of wind velocity
NP
137 Wind driven circulation

NP lines containing:
TIME Wvx Wvy
where Wvx and Wvy, are the wind velocity components in x and y directions respectively in m/s or
ft/s.
The following table is an excerpt of the WindVelocDATA.TXT file that is included in the Data folder
for this tutorial:

6544
0 5.97 -2.17
1 5.09 8.83
2 3.84 6.63
3 5.87 4.92
4 0.00 0.00
5 -3.31 -1.90
...
6543 3.84 -6.63

12.3 Create the template for the wind layer and the
wind speed polygons
To add the template where the polygons are drawn with the wind speed time series data involves
the following steps:

1. Create the template for the Winds layer: In the model toolbar click on the New Template
Layer command

2. In the plugin window, activate the Wind checkBox, as shown in the Figure below:
12.3 Create the template for the wind layer and the wind speed polygons 138

Figure 12.2 – Plugin to add a New Template Layer.

3. Edit the Wind layer: In the layers panel, we select the Wind layer and in the digitalization
toolbar we click on the Toggle Editing tool . A pencil icon will appear in the Wind layer,
indicating that the layer is in edit mode:

4. Draw the polygon that demarcates the Wind area: Using the Add Feature tool from the
digitalization toolbar .
Draw the polygon that defines the wind area. In this case, the tracing of the polygon must
be done in such a way that it covers all the cells of the mesh. Once you finish drawing the
polygon a window to input the polygon parameters is immediately opens, which are three:

• Wind stress coefficient CD: 0.009,


• Air density: 1.225, and
• Wind speed time series File: WindVelocDATA.txt.

The parameter window should be as shown below:


139 Wind driven circulation

Figure 12.3 – Window to input the Wind polygon parameters.

5. After input the values, click OK and accept the changes. There should be an image similar
to the one shown in the following figure:

Figure 12.4 – Wind layer polygon.


12.4 Generate the mesh 140

12.4 Generate the mesh


Then the mesh is generated with the Generate TriMesh button

The results obtained as shown in Figure 12.5 (mesh of around 17,500 cells).

Figure 12.5 – The resulting mesh.

12.5 Exporting files


Now that the mesh is generated and the other layers are ready with the necessary data, export
the files in the format required by the model.

1. Click on the Export button

2. In the dialog, select the raster layer that contains the Digital Elevation Model (DEM) and the
name of the project to be exported.

3. Use the Zoom Full button to center the image.

4. Input the name without any extension. For this example it will be: WindTutorial.

5. Before executing the plugin activate the DEM layer (if it is deactivated).
Once the plugin is executed, a window will be shown (Figure 10.6) as it should be for our
example.
141 Wind driven circulation

Figure 12.6 – Plugin window to export the files.

6. Click on the OK button.

12.6 Running the model


After exporting the files, Hydronia Data Input Program is loaded with the project file from the
WindTutorial.DAT example and shows the Control Data panel to it as illustrated in Figure 12.7

Figure 12.7 – Hydronia Data Input ProgramControl data panel.

The Wind component should be selected.

1. Select the Wind component from list in the left side of the panel. The window with the
information of the wind parameters will appear as can be seen in the figure below:
12.6 Running the model 142

Figure 12.8 – Hydronia Data Input ProgramWind panel.

2. Set simulation time 24 hours, and output interval 0.5 hours.

3. In the Initial conditions select Horizontal water surface elevation and 0 on the text box. Leave
all other parameters at their default values.

4. Click on the Run RiverFlow2D button in the lower section of Hydronia Data Input Program.

5. Save the changes with the same name as the WindTutorial.DAT file, then a window will
appear indicating that the model started running.

The model window that appears during the run model shows several runtime parameters.
143 Wind driven circulation

Figure 12.9 – Model window.

12.7 Check the wind output files


The model creates the following files for each output time as defined in the Control panel:

CELL TIME METRIC DDDD HH MM SS.TEXTOUT (Metric Units) or

CELL TIME ENG DDDD HH MM SS.TEXTOUT (English Units)

where DDDD indicates the day, HH, hour, MM minutes and SS seconds.
In these files, columns 1, 2 and 3 report the velocity components in Vx, Vy and the module
respectively. We can visualize the water velocity fields generating layers either in raster or vectorial
format from the aforementioned files using the Maps of Results vs Time

The following figure shows the water velocity field map for time 0000:20:00:00:
12.7 Check the wind output files 144

Figure 12.10 – Map with the speed field for the time 20 hours.

This concludes the Wind driven circulation tutorial.


Using Manning’s n ESRI shape files
13
This tutorial illustrates how to use Manning’s n files in ESRI shape file format to assign Manning’s
n values to an existing project using the QGIS interface. The procedure includes the following
steps:

1. Open an existing RiverFlow2D project.

2. Load the shape files with the Manning’s n polygons.

3. Import the Manning’s n geometry and values to the Manning N layer

The files required to follow this tutorial can be found in the following directory:

...\Documents\RiverFlow2D QGIS\ExampleProjects\ManningsNShapefileTutorial

13.1 Open an existing project


1. Open QGIS

2. On the Project menu click Open... and browse to the existing project: ManningsN shapefile.qgs.
This project contains the layers of the domain contour, the Digital Elevation Model (DEM) of
the river bed in raster format, an aerial photograph, and the boundary conditions layer where
the inflow is located in the upper right and outflow in the lower left. The inflow boundary
condition is a hydrograph with a peak discharge of 220,000 ft3 /s, and the outflow conditions
is set to Free outflow. When you open the project you will have an image of the project
loaded in QGIS as shown in 13.1.

145
13.2 Load the shape file with the Manning’s n polygons 146

Figure 13.1 – Project loaded in QGIS.

13.2 Load the shape file with the Manning’s n polygons


1. In order to load the shape file with the polygons containing the Manning’s n values, click on
Add Vector Layer button

of Manager layer toolbar or from the main menu Layer → Add layer → Add Vector Layer...

2. In tutorial folder, point to the SaltRiver ManningsN.shp file (Figure 13.2).

Figure 13.2 – Window to find and open the shape file.

When loading the file, an image similar to the one shown in the following figure will be
147 Using Manning’s n ESRI shape files

displayed on the screen:

Figure 13.3 – SaltRiver ManningsN Layer.

13.3 Import the Manning’s n geometry and values to


the Manning N layer
To transfer spatial and attributive information from the shape file to the Manning N layer, a copy
and paste operation is performed, but it must be ensured that both layers have a field or column
with the same name. The procedure is as follows:

1. Check the fields name of shape file: Right-click on the layer label and in the pop-up menu
select the option Open attribute table (Figure 13.4).
13.3 Import the Manning’s n geometry and values to the Manning N layer 148

Figure 13.4 – Attribute table of the SaltRiver ManningsN layer.

You can see that the shape file loaded has two fields, LUCode and N Value, the first one with
the coding of the land cover type and the second corresponds to the value of the Manning’s
n, in the case of the Manning N layer, it has a single field called ManningN.

2. Proceed to change the name of the field N Value to ManningN. Close the table of attributes
and right-click on the layer label. In the pop-up menu, select Properties then in window that
opens select the Fields tab as shown in Figure 13.5:

Figure 13.5 – Properties the SaltRiver ManningsN layer.

3. Click on the Toggle Editing button


149 Using Manning’s n ESRI shape files

then change the N Value field name by ManningN (Figure 13.6), and click on the Toggle
Editing button again, and save.

Figure 13.6 – Field properties of the edited SaltRiver ManningsN layer.

4. Copy the polygons of the shape file: select the SaltRiver ManningsN layer in the Layers
Panel.

5. With the select tool we draw a rectangle that covers the entire layer:

Figure 13.7 – Selecting all the polygons in the SaltRiver ManningsN layer.

6. Copy the spatial elements by clicking on the Copy button of the digitization toolbar

7. Paste the spatial elements in the Manning N layer: select Manning N layer of the Layers
13.3 Import the Manning’s n geometry and values to the Manning N layer 150

Panel and set it in edit mode by clicking on the Toggle Editing button .

8. Click on the Paste Feature button .


and a message will appear that indicates that features were successfully pasted.

9. Click on the Toggle Editing button again .


Confirm and save the changes made to the layer.

To verify the operation was successful, open the attribute table of the Manning N layer and you
can see that the polygons have been copied with their Manning n values. As shown in the Figure
below:

Figure 13.8 – Attribute table of the Manning N layer.

You can now remove the SaltRiver ManningsN layer from the Layer Panel.
This concludes the Using Manning’s n ESRI shape files tutorial.
Post-processing calculations
14
RiverFlow2D has three output controls that make it easier for the user to analyze the results of
the runs at specific sites in the domain calculator. These output controls are: Observation points,
Cross sections and Profiles.
This tutorial illustrates how to incorporate the output controls in a model using the QGIS interface.
The procedure includes the following steps:

1. Open an existing RiverFlow2D project.

2. Create ObservationPoints, CrossSections and Profiles layers, and draw the output controls.

3. Generate the mesh.

4. Running the model.

5. Review output files.

The files required to follow this tutorial can be found in the following directory:

...\Documents\RiverFlow2D QGIS\ExampleProjects\OutControlTutorial

14.1 Open an existing project


1. Open QGIS

2. On the Project menu click Open... and browse to the existing project: OutControlTutorial.qgs.

151
14.2 Create a template of the layers ObservationPoints, CrossSections and Profiles and draw
the output controls 152

This project contains the layers of the domain outline, the Digital Elevation Model DEM of
the river bed in raster format, the layer with the boundary conditions where inflow is located
in the upper left and outflow in the lower left. The boundary conditions are a hydrograph
with a peak discharge of 6,500 f t3 /s and outflow condition set to Free outflow. When you
open the project you will have an image of the project loaded in QGIS as shown in Figure
14.1.

Figure 14.1 – Project screen loaded in QGIS.

14.2 Create a template of the layers


ObservationPoints, CrossSections and Profiles
and draw the output controls
To add the templates where the different output controls are drawn involves the following steps:

1. Create the templates of the layers ObservationPoints, CrossSections and Profiles: for this
in the RiverFlow2D toolbar click on the New Template Layer button

2. In the plugin window activate the checkBox ObservationPoints, CrossSections and Profiles,
as shown in the Figure below:
153 Post-processing calculations

Figure 14.2 – Plugin to add the new templates layer.

3. Edit the layers and draw the output controls: Select in the layers panel, the Observation-
Points, CrossSections and Profiles layers one by one.

4. Click on the Toggle Editing button:

A pencil will appear on the label of the layers, indicating that the layers are in edit mode:

5. Draw the lines or points that represent the output control: To draw the cross sections, profiles
or observation points, the Add Feature tool will be used.
for the CrossSections and Profiles layers, the icon for the Add Feature button is

in the case of a point layer like ObservationPoints, the icon is


14.2 Create a template of the layers ObservationPoints, CrossSections and Profiles and draw
the output controls 154

6. Drawing the cross sections: Select the CrossSection layer, and activate the Add Feature
button.

7. Proceed to draw three sections: One at the beginning of the channel, another in the middle
and the third almost at the end of the channel, identify (XSECID) as: Section1, Section2
and Section3, with intervals (ND CS) of 10, 15 and 20 respectively. The attribute tables of
the sections will be as shown in Figure 14.3 and at the end of the drawing a similar image
should appear as shown in the following Figure 14.4.

Figure 14.3 – Attribute windows for the three cross sections.


155 Post-processing calculations

Figure 14.4 – Transversal sections incorporated into the model.

8. Save the polygon by clicking the Save button and click on the Toggle Editing button
to deactivate Edit mode on the CrossSections layer.

9. Drawing the Profile: Select the Profile layer and activate the Add Feature button, we proceed
to draw the profile along the channel central axis, identifier (PROFILEID) is Profile1 and the
number of intervals (ND PR) equal to 50. The attribute table will be as shown in Figure 14.5.
Once finished drawing, it should appear like the one shown in the following Figure 14.6.
156 Post-processing calculations

Figure 14.5 – Attribute window for the profile.


14.2 Create a template of the layers ObservationPoints, CrossSections and Profiles and draw the output controls15

Figure 14.6 – Profile (green line) incorporated into the model.


14.2 Create a template of the layers ObservationPoints, CrossSections and Profiles and draw
the output controls 158

10. To finalize the profile drawing, save the polygon by clicking the Save button and click on
Toggle Editing button to deactivate Edit mode on the Profile layer.

11. Drawing the observation points: Select the ObservationPoints layer, and activate the Add
Feature button, proceed to draw two observation points, the first between sections 1 and 2
and the second between sections 2 and 3. As an identifier, (Obsid) is assigned Point1 and
Point2 respectively. The attribute tables will be as shown in Figure 14.7 and at the end of
the drawing you should have an image similar to the one shown in the following Figure 14.8.

Figure 14.7 – Attribute windows for the two observation points.


159 Post-processing calculations

Figure 14.8 – Observation points incorporated into the model.

12. To finish the drawing of the observation points, you click again on the Toggle Editing button
to disable the editing mode of the ObservationPoints layer.

14.3 Generate the mesh


The mesh is generated with the Generate TriMesh button

The result is a mesh of approximately 9,400 cells, as shown in Figure 14.9.


14.3 Generate the mesh 160

Figure 14.9 – The mesh generated.

14.3.1 Exporting files to RiverFlow2D


Now that the mesh is generated and the other layers are ready with the necessary data, export
the files in the format required by RiverFlow2D.

1. Click on the Export RiverFlow2D button

2. When run the plugin a window is displayed, select the raster layer that contains the Digital
Elevation Model (DEM) and the name of the project to be exported.
161 Post-processing calculations

3. Input the name without any extension. For this example it will be: OutControl.

4. Before executing the plugin, activate the layer with the DEM (if it is deactivated).
Once the plugin is executed, a window will be shown (Figure 14.10), as it should be for our
example.

Figure 14.10 – Plugin to export the files to RiverFlow2D.

5. Once finished inputting the information, click on the OK button and the export process will
begin.

Once it is finished, RiverFlow2D will be loaded with the OutControl.DAT file.

14.4 Running the Model


After exporting the files, RiverFlow2D opens with the project file of the OutControl.DAT sample
and shows the Control Data panel to it as illustrated in Figure 14.11.

Figure 14.11 – Control data panel.

You can observe in the control panel in Output Options the outputs of results for cross sections,
profiles and observation points are selected.
14.5 Review the output files 162

Leave all other parameters at their default values.


To run the model, click on the Run RiverFlow2D button. The window that RiverFlow2D presents
while running the model shows: simulation time information, volume conservation error, total
discharge of inflow in and outflow, as well as other parameters as execution progresses (Figure
14.12).

Figure 14.12 – RiverFlow2D output graphics.

14.5 Review the output files


RiverFlow2D generates the files with the extensions .xseci (metric units) and .xsece (English
units) which report the results along the cross sections. it generates files with extensions .prfi
(metric units) and .prfe (English units) which report the results along the profiles and generates
the files with the extensions .outi (metric units) and .oute (English units) that report the results
in the observation points.
Figure 14.13 shows an extract of the OutControl.xsece file with results at the cross sections:
163 Post-processing calculations

Figure 14.13 – OutControl.xsece file.

Figure 14.14 shows an extract of the OutControl.prfe file with the report of the profile results:
164 Post-processing calculations

Figure 14.14 – OutControl.prfe file.


165 Post-processing calculations

Figure 14.15 shows an extract of the RESvsT Point1.oute file with the report of the results of the
observation point Point1:

Figure 14.15 – RESvsT Point1.oute file.


Advanced digitization/snapping
15
In many cases the drawing of polygons that share borders (contiguous) is required. Trying to do
this manually usually produces polygon overlap errors, or it may generate gaps as illustrated in
the following figure:

Figure 15.1 – Areas with overlap and empty spaces in manual digitization of adjacent polygons.

166
167 Advanced digitization/snapping

This tutorial illustrates how to use the QGIS Snapping tool to facilitate the scanning of adjacent
polygons. The procedure includes the following steps:

1. Open an existing RiverFlow2D project.

2. Activate the Snapping tool.

3. Configure the Snapping tool

4. Draw contiguous or adjacent polygons using the Snapping tool.

The files required to follow this tutorial can be found in the following directory:

...\Documents\RiverFlow2D QGIS\ExampleProjects\SnappingTutorial

15.1 Open an existing project


1. Open QGIS

2. In the main menu go to Project → Open... browse to the existing project: SnappingTutorial.qgs.

This project contains the basic templates of a RiverFlow2D project and a raster with 4 areas with
different Manning’s n coefficients derived from land cover and land use maps. From this raster,
the polygons of the Manning N layer will be drawn. When the project is opened, a project image
will be loaded in QGIS as shown in Figure 15.2.
15.2 Activate the Snapping tool 168

Figure 15.2 – Project screen loaded in QGIS.

15.2 Activate the Snapping tool


To have the Snapping tool, you must activate it beforehand:

1. Open the configuration options window: In main menu → Settings → Options...

2. In the Settings window, click on the Digitizing tab.

3. In Snapping, activate the option Open snapping options in dock window (Figure 15.3). As
indicated by the label

4. After accepting the changes, exit and restart QGIS.


169 Advanced digitization/snapping

Figure 15.3 – QGIS Options / Digitizing Window.

Once you restart QGIS and open the project again you should have an image similar to the one
shown in Figure 15.4 where you can see the Snapping tool panel at the bottom. If it does not
appear, Open the main menu → Configuration → Snapping options..., to load panel.
15.3 Configure the snapping tool 170

Figure 15.4 – QGIS with snapping panel.

15.3 Configure the snapping tool


Before starting to draw the Manning’s n polygons, the snapping tool should be configured as
follows:

1. In Layer selection, chose Advanced

2. In the list of layers, you unselect all but the layer where the polygons will be drawn. In this
case the Manning N layer is selected.

3. Select the box to avoid intersections in the Manning N layer.

The configuration window of the Snapping tool should be as shown in the following Figure:

Figure 15.5 – Snapping configuration panel.


171 Advanced digitization/snapping

15.4 Draw contiguous or adjacent polygons using the


Snapping tool
To draw the polygons with the information of the Manning’s n coefficients we proceed as follows:

1. Edit the Manning N layer: In the layers panel, select the Manning N layer

2. In the digitalization toolbar click on the Toggle Editing button

A pencil icon will appear in the Manning N layer indicating that the layer is in edit mode:

3. Draw the polygon that demarcates the Manning’s n area: Using the Add Toggle Editing
button in the digitalization toolbar

proceed to draw the polygons. Start by drawing the polygon in the bottom of the watershed
shown in gray which corresponds to n = 0.02. After completing the drawing you should have
an image similar to the one shown in the following figure:

Figure 15.6 – The first polygon sketch.


15.4 Draw contiguous or adjacent polygons using the Snapping tool 172

4. Proceed to draw the second polygon. This will be the small yellow polygon to which cor-
responds to n = 0.30. To draw the polygon, follow the boundary with the green polygon
as indicated by the raster, but in the boundary with the polygon already drawn (the gray)
an overlap will be made so that the snapping tool takes the edge that already exists and
completes the polygon. Try to make a path as shown in the figure below:

Figure 15.7 – Drawn of the second polygon.

5. Right-click to finish the drawing.

6. Enter the Manning coefficient, n = 0.30 and you will have an image like the one shown below
where you can see how the final drawing of the second polygon took the vertices of the first
adjacent polygon:

Figure 15.8 – Final draw of the second polygon.

7. The third polygon to be drawn will be the large yellow polygon. Just as in the previous case,
the contour of the polygon according to the raster is faithfully followed, but in the adjacent
173 Advanced digitization/snapping

polygons it is already drawn overlapped. The figure below shows the initial drawing, with an
approach in the area where the overlap is made with the existing polygon:

Figure 15.9 – Preliminary draw of the third polygon.

8. After finishing the drawing and assigning the Manning N umber to the polygon, the final
drawing of the third polygon will be shown as shown below:

Figure 15.10 – Final draw of the third polygon.

9. The fourth polygon to draw will be the green polygon which corresponds to n = 0.45. To do it
will follow the outer boundary of the same and the boundary with the brown polygon. Then
a thick overlap will be made within the polygon already drawn, the yellows and the gray, as
shown in the figure below:
15.4 Draw contiguous or adjacent polygons using the Snapping tool 174

Figure 15.11 – Preliminary draw of the fourth polygon.

10. After finishing the drawing and assigning the Manning’s n value to the polygon, you will have
the final layout of the third polygon as shown below:

Figure 15.12 – Final draw of the fourth polygon.

11. To finish, draw the fifth polygon of brown color, which corresponds to n = 0.03. For this the
outer limit is drawn following the contour of the raster and for the shared limits an overlap is
175 Advanced digitization/snapping

made inside the neighboring polygons as shown in the figure below:

Figure 15.13 – Preliminary draw of the fifth polygon.

12. After finishing the drawing and inputting the Manning coefficient to the polygon, you will have
the final drawing of the third polygon as shown below:

Figure 15.14 – Final draw of the fifth polygon.

13. To finish, click on the Toggle Editing button


15.5 Delete a polygon 176

changes are accepted and saved. Then the layer of the raster Manning Map n is deacti-
vated, and the Manning N vectorized layer can be observed as shown in the Figure below:

Figure 15.15 – Final draw of the Manning N layer.

15.5 Delete a polygon


Suppose you want to delete the last polygon created because you are not satisfied with the result.
In that case you can proceed doing as follows:

1. The Manning N layer is edited using the Toggle Editing button

2. Then the polygon to be eliminated is selected using the Select Feature button

3. With the active select Feature tool, click on the polygon to be deleted and it will be high-
lighted in yellow to indicate that it is selected (Figure 15.16).
177 Advanced digitization/snapping

Figure 15.16 – Polygon to be deleted selected.

4. Then the polygon is deleted either with the Delete key on the keyboard or with the Delete
selected button

Figure 15.17 – Manning N layer with the polygon removed.

5. Finally, the changes are saved and the editing mode of the layer is deactivated by clicking
on the Toggle Editing button.
Creating raster elevations from X Y Z data sets
16
RiverFlow2D uses elevation data in raster format. For instance, to load an ASCII grid file, from
the Layer menu, click Add Layer, and then click Add Raster Layer... You may also click the Add
Raster Layer button:

In this example we will use elevation data available in a tab delimited X Y Z file, and create an
interpolated raster layer.
The X Y Z file can be formatted as comma, space or tab delimited data, where the first two
columns correspond to point X and Y coordinates and the third column is the point elevation Z as
shown in the following figure.

Figure 16.1 – File containing terrain elevation points.

First, the X Y Z file is loaded to create an event layer. This can be accomplished as follows:

178
179 Creating raster elevations from X Y Z data sets

1. From the Layer menu, click Add Layer, and then click Add Delimited Text Layer... Alterna-
tively, you may also click the Add Delimited Text Layer button:

the following dialog is presented:

Figure 16.2 – Dialog to create a layer from delimited data text file.

2. Here you must indicate the location and name of the file with the X Y Z data.

3. Make sure that the first row has the names of the fields, and this is assigned to X field,
field 1 and Y field, field 2, then click OK to load the points in the project window. The
Coordinate Reference System Selector dialog box appears again and we can click OK to
continue making sure that the CRS is the appropriate one.

4. As surely the points are not within the extension of the window, you will have to click with
the right mouse button on the label of the created layer and select the option Zoom to the
layer.
180

Figure 16.3 – How to zoom a layer.

5. The points should appear in the project window:

Figure 16.4 – Layer of points created from delimited data file.

6. The raster is created interpolating from the data in the point layer. For that we will use
the Interpolation command which is found on the Raster menu under Interpolation. This
command is a plugin that is installed by default in QGIS. If for any reason it does not appear,
on the Plugins menu, click Manage and Install Plugins..., type Interpolation on the search
field, and then then select the Interpolation Plugin checkbox to enable it.
181 Creating raster elevations from X Y Z data sets

Figure 16.5 – Loading to the QGIS interpolation plugin.

When executing it, the following dialog window appears:

Figure 16.6 – Interpolation plugin window.

7. In this window select the layer to be interpolated to create the raster, in this example we
assume it is a point layer that we just created named HohRiverBedElevations. Change it
by selecting the dropdown for Vector Layers. We select the field that has the attribute that
was used as the value to interpolate, in this case the z field. This is done by clicking the
dropdown for Interpolation Attribute, selecting Z, then clicking the Add button.

8. Once added, go to select the interpolation method. There are 2 options: triangular interpo-
lation (TIN), or Inverse Distance Weighting (IDW). In this case the TIN method is selected,
then the resolution of the raster is defined, which is fixed to cells of 10f t × 10f t, which
generates a raster of 315 columns x 514 rows.

9. Select the path to the folder where the raster layer is to be created. It is recommended to
point to the project folder directory chosen earlier in the tutorial.

10. Click OK.


182

Once the process is completed, the raster resulting from the interpolation will be displayed on the
screen, by default it is rendered in gray gradient as shown in Figure 16.6.

Figure 16.7 – Digital elevation model in raster format created by interpolation.

Note: Right-clicking on the label of the created layer and selecting Properties allows you to change
the rendering style for a more informative color palette.

Figure 16.8 – Window to change the render style of a raster layer.


183 Creating raster elevations from X Y Z data sets

And now the raster layer is displayed with the new color palette selected:

Figure 16.9 – Digital elevation model with color render.

It is convenient to move the raster layer created to the end of the list of layers, thus it does not
interfere with the display of other layers.
Creating high-impact graphics and animations
17
using Paraview

ParaView is an open-source, multi-platform data analysis and visualization application. You can
quickly build visualizations to analyze model results using qualitative and quantitative techniques.
The data exploration can be done interactively in 2D and 3D, or using ParaView’s batch processing
capabilities.
This tutorial will demonstrate the use of Parview to generate high quality graphics, including depth
maps, velocity fields, 3D visualizations, and animations of RiverFlow2D results.

This tutorial requires ParaView version 5.8.1 or later. You can download and install ParaView
version 5.8.1 or later from the website www.paraview.org. To create the ParaView graphs, the
RiverFlow2D model needs to generate during runtime the .vtk files using the Create graphic
output files option in the Hydronia Data Input Program Graphic Output Options panel.

17.1 Paraview basics


After loading Paraview, the following components can be identified in the main window (see Figure
17.1):

184
185 Creating high-impact graphics and animations using Paraview

Figure 17.1 – Main Paraview window.

To open the tutorial example group file, click in the Menu bar and double-click the file group
BridgeTutorial..vtk in the ParavirewTutorial folder. The group contains multiple .vtk files,
where each file corresponds to a specific simulation time.
Make it visible clicking Apply in the Properties tab. The following graphic in the Render View
layout will look as follows:

Figure 17.2 – View after opening the BridgeTutorial..vtk file.

Using the Time control toolbar (see Figure 17.3), select a time to visualize the selected variable.
17.2 Two-dimensional (2D) visualizations 186

Figure 17.3 – VCR and Time Control toolbars.

The graphic will change according with the selected simulation time. For example, for Time = 2 it
should look similar to this:

Figure 17.4 – View for Time = 2.

An adequate visualization depends on the selection of a color scale of a defined variable. In the
previous figure, the default color scale was selected associated with the depth variable (h). The
next section shows how to customize color rendering.

17.2 Two-dimensional (2D) visualizations

17.2.1 Create a 2D bed elevation map


Paraview has many filters for full visualization of 1D, 2D and 3D data. In this part of the tutorial we
will create a 2D bed elevation graphic. Select the bed elevation variable z in the Variable selector :
187 Creating high-impact graphics and animations using Paraview

Figure 17.5 – Variable selector.

The representation of the bed elevation z will look like this:

Figure 17.6 – Bed elevation z representation.

Although it is possible to customize the color maps, we will see how to do it later in this tutorial,
for this example we will use a predefined color.
Click in the Properties tab to pick up the Rainbow Desaturated color map in the Choose Preset
dialog box. Once selected, Apply/Close.
17.2 Two-dimensional (2D) visualizations 188

Figure 17.7 – Predefined color maps.

The result graph visualizes of the bed elevation z.

Figure 17.8 – Bed elevation z representation.

17.2.2 Creating 2D velocity vector fields


In order to create a 2D visualization of the flow and its magnitude with our project data, we will
start with a water depth h representation in a white-to-blue color scale. The first step is to select
h in the Variable selector. To change the color map for water depth h to a white-to-blue, click
and choose the XRay preset color then Apply/Close. The Mapping Data should look as:
189 Creating high-impact graphics and animations using Paraview

Figure 17.9 – XRay Color Map.

Double click in the right circle of the range marker bar and select any blue color from the Select
Color dialog box. This example uses Red = 0, Green = 85 and Blue = 255 and Click OK

Figure 17.10 – White-to-blue color map.

The Mapping Data will look as follows:


17.2 Two-dimensional (2D) visualizations 190

Figure 17.11 – White-to-blue color map.

Set the Time = 20 and the result should look as follows:

Figure 17.12 – Water depth (h).

To create a 2D velocity vector map for this example, follow these steps:

• Select BridgeTutorial* in the Pipelines Browser

• In the Filters menu select Common/Glyph

• Click Apply in the Properties panel. You will adjust the big arrows after

• Configure the Vector field configuration in the Properties panel as follows:


191 Creating high-impact graphics and animations using Paraview

– Glyph type: 2D Glyph


– Scale Array: modU (velocity modulus)
– Scale Factor: 35
– Glyph mode: Every Nth Point
– Click Apply to visualize the the filter setup. The user can press this button each time
changes are made
– Coloring: modU

• Choose the Rainbow Desaturated color scale clicking in and Apply/Close.

Figure 17.13 – Velocity vector field on water depth.


17.3 Three-dimensional (3D) visualizations 192

Figure 17.14 – Velocity vector field detail.

In order to save the Paraview project, select File/Save State. This will save a .pvsm file.

17.3 Three-dimensional (3D) visualizations


In this part of the tutorial we will explain the steps to create a 3D visualization using Paraview. We
start where section 17.2 ends. This assumes that we have a visualization of the bed elevation (z)
variable using the Rainbow Desaturated color map.
Open the BridgeTutorial..vtk group as explained in section 17.1 and select the bed elevation
variable z in the Variable selector. The render view should look as the following figure:
193 Creating high-impact graphics and animations using Paraview

Figure 17.15 – Bed elevation z.

Generating a 3D visualization in ParaView requires an interpolation from Cell Data to Node Data
as follows.

• Select Cell Data to Point Data in the Filters/Alphabetical menu. Then, press the Apply
button in the Properties tab.

Figure 17.16 – Cell Data to Point Data filter.

• Select again z in the Variable selector. Note that the color view is smoother due to the
interpolation. The result should look as follows:
17.3 Three-dimensional (3D) visualizations 194

Figure 17.17 – Cell Data to Point Data interpolation.

The 3D appearance is obtained by extruding one of the data variables z or (h+z).

• With the CellDatatoPoint selected in the Pipeline Browser, select Warp by Scalar in the
Filters/Alphabetical menu to do the extrusion and then click Apply.

• Configure the Properties tab as follows:

– Scalars = z
– Scale Factor = 25

• Click Apply

• Choose z in the Variable selector.


195 Creating high-impact graphics and animations using Paraview

Figure 17.18 – Wrap By Scalar filter.

• Switch from 2D to 3D visualization in the Layout Render view to manipulate the project in
3D.

Figure 17.19 – 3D option.

• Remove the color map of the bed elevation z by selecting Solid Color in the Coloring drop-
down menu of the Properties tab:

Figure 17.20 – Coloring parameter.

• The Solid Color can be customized clicking the Edit color map icon in the Proper-
ties tab. Once the desired color has been chosen at the Pick Solid Color tab (this example
uses HTML=#ecb57d), the Render view should look as:
17.3 Three-dimensional (3D) visualizations 196

Figure 17.21 – 3D bed elevation representation.

To view the terrain from different points, use the left mouse button to rotate, press down the mouse
wheel to translate, and scroll the mouse wheel to zoom in or out the image.
Using the Viewpoint Toolbar (Figure 17.22), you can add different view points of your graphic
clicking .

Figure 17.22 – Viewpoint Toolbar.

The following image was generated using an alternative view point.


197 Creating high-impact graphics and animations using Paraview

Figure 17.23 – Alternative 3D bed elevation representation.

To return to prearranged views use the Camara control toolbar.

Figure 17.24 – Camara Control Toolbar.

A more sophisticated visualization can include additional layers. In the next section we will add
two more layers: the water elevation (h+z) and the velocity vector field.

17.3.1 Create a 3D water elevation graphic adding a (h+z) layer


Follow the following steps to create the (h+z) layer:

• Click on the CellDataToPointData item in the Pipeline Browser and select Warp by Scalar
in Filter/Alphabetical. A WrapByScalar2 item will be created in the Pipeline Browser.

• Select a time ̸= 0 in the Time control toolbar, e.g.

• Configure the Properties panel as follows:

– Scalars = (h+z)
– Scale factor = 25 (very important)

• Click the Apply button. Check that h is in the Variable selector

• Click and choose the Rainbow Desaturated color map, then Apply/Close.

The resulting Render view should look similar to:


17.3 Three-dimensional (3D) visualizations 198

Figure 17.25 – Water surface elevation representation.

As seen in this figure, the layers corresponding to z and (h+z) variables are overlapped in the
dry areas of the domain, generating a confusing presentation. One easy way to fix this issue is
to remove the water depth h values below a user-defined value to avoid overlapping, doing as
follows:

• Click WrapbyScalar2 in the Pipeline Browser and select Threshold in Filter/Common in the
main menu

• Click Apply in the Properties panel, and check that h is in the Variable selector

• Set the minimum value equal to 0.01 m. Depths (h) below this minimum will not appear in
the color representation.

• Click Apply and the result should be as follows:


199 Creating high-impact graphics and animations using Paraview

Figure 17.26 – Threshold Filter application.

With the Threshold layer selected, change the color map for water depth h to a white-to-blue as it
was explained in Section 17.2.2 of this tutorial. The result graph should look as follows:

Figure 17.27 – Three dimensional water depth h representation.


17.3 Three-dimensional (3D) visualizations 200

17.3.2 Create a velocity field graphic


Follow the following steps to create a velocity field graphic:

• Select the Threshold item in thePipeline Browser

• In the Filters menu select Common/Glyph and click the Apply

• Configure the Properties panel as follows:

– Glyph type = 2D Glyph


– Orientation Array = velocity
– Scale Array = modU (velocity modulus)
– Scale Factor = 25
– Glyph mode = Every Nth Point (to prevent a saturation of arrows in the visualization)
– Click the Apply button to visualize immediately the filter setup, the user can press this
button after each of the previous steps
– Set Coloring as (modU) for the color map representation and choose the preset color
Rainbow desaturated then Apply/Close

• Select Time ̸= 0 as the current time control tool bar. In this example chose for instance
Time=3.

After these steps, the graphic should look like this one:
201 Creating high-impact graphics and animations using Paraview

Figure 17.28 – Three-dimensional velocity field representation.

In order to save this Paraview project select File/Save State and create a .pvsm file. To load any
of the saved projects select emphFile/Load State and select a .pvsm file.

17.4 Generating animations


With your Paraview project loaded in your computer to create an animation or movie go to
File/Save Animation and create a file type .avi. The Save Animation Options dialog will be
displayed:

Figure 17.29 – Animation.

In this dialog, the user can configure the video frame rate, the number of frames per time step, the
resolution (in pixels) and the range of time steps. In order to reduce the size of the output video
file, a compression mode is also available for the video. Note that this will also reduce the video
quality of the animation. As an example, the next figures show three frames of the output video
17.4 Generating animations 202

generated in this way, corresponding to six different simulation times.

Figure 17.30 – Animation time frames.


203 Creating high-impact graphics and animations using Paraview

17.5 Steamlines representation


Streamlines represent the instantaneous direction of the velocity and is drawn as unending lines
that may converge or diverge from one another. They are drawn at roughly even intervals to
capture the flow in all areas.
To create Streamlines with Paraview, follow these steps:

• Open the Paraview application in your computer

• Load the plugin StreamLinesRepresentation in Tools/Manage Plugins in the main menu

• Open the BridgeTutorial..vtk Group file and Select Apply

• Select a time different than 0 in the time control tool bar

• Select velocity in the Variable selector

• In the Properties panel select:

– Representation = StreamLines
– Step Length = 1
– Number of Particles = 1000
– Max Time to Live = 600

• To have Streamlines in one color, select in the Property panel Coloring = Solid and then
click on and select a color.

The next figure shows how the StreamLines look:


17.5 Steamlines representation 204

Figure 17.31 – StreamLines representation.

If you load a Paraview project .pvsm file, you have to deactivate the filters in the Pipeline Browser
by clicking the open eyes so that only the *.vtk file layer is open.
Multiple Scenario Project Tool
18
When establishing a mathematical model of a system, it is very common to perform a variety of
runs with different values of the most significant parameters to see their effects. In some cases, it
is also useful to have the model run the scenario without a project and within a project. In previ-
ous versions of the plugin this had to be done in separate QGIS projects, which involved making
copies of the project folders and data, which can bring problems with data handling and access.

This new version of the RiverFlow2D plugin for QGIS allows the management of multiple scenar-
ios within the same project. In this way variants of the same model can be created as subprojects,
thus bringing with it the advantage of having all the variants organized in the same project which
facilitates access and management of information.

The following describes the new features of the QGIS interface for RiverFlow2D that allow the
handling of multiple scenarios.

18.1 New interface elements for managing


multi-scenario projects in RF2D
This section provides a description of the new elements in the QGIS user interface for handling
RiverFlow2D multi-scenario projects. The RiverFlow2D toolbar now features three new items:

• A drop-down list that shows the user the list of scenarios contained in the project.

• An option to generate new scenarios in the New RiverFlow2D Projects button.

205
18.2 Creating a new RiverFlow2D multiple-scenario project using QGIS 206

• An option in the RF2D tools menu that allows you to import an existing RF2D project into
the multi-scenario mode.

The figures below show the three new elements.

Figure 18.1 – Drop-down list for displaying and selecting project scenarios

Figure 18.2 – Tool to create a new scenario within the project

Figure 18.3 – Tool to convert existing project to multi-scenario

18.2 Creating a new RiverFlow2D multiple-scenario


project using QGIS
• To create a new project into a multi-scenario project, access the first button on the toolbar
and select the New RiverFlow2D Project menu option as shown in the figure below:

Figure 18.4 – Menu to create a new project

The dialog window a field is presented to indicate the name of the initial scenario (highlighted in a
red box in the figure below), by default this field is labeled 'base'. The drop-down list for displaying
scenario names is limited in length, we recommend that you assign short names to scenarios for
ease of viewing and to assign names without spaces.
207 Multiple Scenario Project Tool

Figure 18.5 – Dialog window to create a new RF2D project

When creating a multi-scenario project, within the folder selected for the project a subfolder is
created with the name given to the initial scenario, (in this example the folder name base)and
within that sub-folder another subfolder is created with the name shape where QGIS creates the
templates of the layers used by the model for that scenario. Each other scenario will have its own
shape subfolder that contain the layers for that particular scenario.

18.3 Create a new scenario


Once we have a project created with the new Multi-scenario tool, we can start to create additional
scenarios by following the steps in this section.
Please make sure to have either created a new project with the tool or have already converted an
existing project before doing the following.

• To create a new scenario, access the first button on the toolbar and select the New Scenario
menu option as shown in the figure below:
18.3 Create a new scenario 208

Figure 18.6 – Menu for creating a new scenario in an RF2D project

• A window will be presented, input the scenario name keeping in mind to use short names
without spaces.

Figure 18.7 – Window to create a new scenario.

The new scenario is based on the layers with the input data of the current scenario. The
plugin will proceed to create a subfolder with the name of the new scenario within the project
folder. In this folder the files corresponding to the layers of the RiverFlow2D project will be
copied with the input geospatial information it requires.

Please note that the model layers will not copy post-processing products such as maps
or animations. The plugin then updates the paths of the sources of the layers to the files in
the new folder and finally the drop-down list in the RF2D toolbar is updated with the name
of the new scenario.
209 Multiple Scenario Project Tool

18.4 Switching scenarios


• To switch between the different scenarios that you have in a project, simply display the
scenario list located in the RF2D toolbar and select the desired scenario as shown in the
following figure:

Figure 18.8 – Switching scenarios

• Then a Dialog window will ask for confirmation to switch scenarios, as shown in the figure:

Figure 18.9 – Confirmation window for switching the scenario.

When you switch scenarios, the state of the layers in the current scenario is automatically
saved.

18.5 Deleting scenarios


To safely delete scenarios, the tool also contains a menu option to delete them when needed:

• Use the button below the New RiverFlow2D Project dropdown, and select Delete Scenario:

Figure 18.10 – Menu button to delete a scenario.

*IMPORTANT* Please note that deleting a scenario folder manually from the project directory will
cause the entire project to be unusable. This tool must be used in order to avoid this.
18.6 Import an RiverFlow2D project into Multi-scenario mode 210

18.6 Import an RiverFlow2D project into Multi-scenario


mode
The RiverFlow2D Multi Scenario tool has a feature that allows you to import an existing project(mono-
scenario) and convert it to a maulti-scenario project.
• Open this tool in the options menu of the RF2D Tools button as shown in the figure below:

Figure 18.11 – Menu to import a project to multi-scenario mode

• When you start the import tool a window is displayed as illustrated in the figure below, you
must specify the project file. DAT to import.

Figure 18.12 – Import tool window

• Once you click [OK], a subfolder with the name of the file is created inside the folder where
the original project is located.
211 Multiple Scenario Project Tool

• All files and sub directories in that main project folder are copied, and the metadata of the
project QGZ is updated with the new location of the layers.

• Finally the drop-down list on the RF2D toolbar is updated with the name of the new scenario.

The files of the original project are kept in the project folder, it is at the discretion of the user delete
it if you think it necessary, the only one that is required then is the QGIS project file (.qgz)

This concludes the tutorial on using the Multiple Scenario Project tool within the QGIS RF2D
toolbar.

Common questions

Powered by AI

1. Create the bridge geometry data: Use the QGIS interface to generate the bridge cross section geometry from the terrain profile obtained from the digital elevation model . 2. Open an existing project: Load the existing RiverFlow2D project in QGIS, ensuring the project contains required layers such as the domain contour and DEM . 3. Enter the bridge polyline in the Bridges layer: Create and edit a new Bridges layer, draw the bridge line using the digitalization toolbar, and ensure it's correctly positioned . 4. Enter the bridge data: Input attributes like bridge name, size element, and elevation details in the Bridges layer attribute dialog . 5. Generate the mesh: Use the Generate TriMesh feature to align the mesh with the bridge polyline . 6. Export files to RiverFlow2D: Select the appropriate DEM layer and export the project in the required format . 7. Run the model: Load the project file in the RiverFlow2D program, review the bridge geometry file, and initiate the simulation .

To create a digital elevation model (DEM) using a raster file, elevation data must first be loaded from an ASCII grid file. This involves adding the raster data as a layer, selecting the appropriate CRS, and rendering it, possibly using Hillshade for a more informative display. This model enhances hydrological modeling by providing a detailed topographical surface, which is critical for simulating water flow and understanding terrain impact on hydrological processes .

Paraview basics are essential for creating high-impact graphics and animations because they provide tools for both 2D and 3D visualizations. For 2D, it includes creating bed elevation maps and velocity vector fields; for 3D, it is used to develop water elevation graphics and velocity field graphics. Paraview also helps in generating animations and streamlines which enhance the visualization and understanding of hydrological data .

Managing multi-scenario projects in RiverFlow2D involves using QGIS to handle different scenarios within a single project framework. This starts with creating a new scenario through the interface elements provided and switching between scenarios using scenario management tools. Scenarios can also be deleted using the scenario menu options. Additionally, existing RiverFlow2D projects can be imported into multi-scenario mode, allowing for comprehensive management and comparison of various hydrological scenarios within the same project .

Creating elevation graphics and velocity field graphics for 3D visualizations in Paraview is essential for comprehending water dynamics and aiding in better decision-making for hydrological infrastructures. The methodology includes creating 3D water elevation graphics by adding a layer that considers height and elevation (h+z), and representing velocity fields using vector graphics. This approach allows for detailed visualization of how water flow varies in a 3D space, facilitating more accurate analyses of hydrological phenomena .

Boundary conditions are vital in hydrological modeling as they specify the entry and exit points of water flow in the system. They are applied by defining segments for inflow and outflow within the model using polygons. Parameters for these segments are loaded from relevant files, such as hydrographs for inflow. This helps in accurately capturing the interactions of different water forces and guides the simulation of flow patterns under various conditions .

To enhance terrain visualization in QGIS, strategies such as creating detailed meshes using the GMSH mesh generation plugin allow for the refinement of finite-volume meshes and the representation of hydraulic structures like dams and levees . Implementing rendering tools available in QGIS, such as the creation of observation points, cross sections, and profiles, helps in detailed data interpretation by providing focused analysis of specific terrain sections . Additionally, employing plugins for tasks like interpolating DEM data can enhance the resolution and detail of terrain visualization . These strategies increase the accuracy of data interpretation and help in identifying subtle terrain features and hydrological impacts .

The use of Manning’s N coefficient in hydrological models significantly impacts the simulation of water flow by accounting for the resistance exerted by the riverbed and banks on the flow of water. It is a crucial parameter for determining flow resistance and velocity, thus affecting water level predictions and flow patterns . To integrate Manning’s N into a project, one needs to follow a systematic process using a GIS interface like QGIS. First, open the existing project and load the shape files containing the Manning’s N polygons. These polygons include spatial variations of Manning’s N values . You import these polygons into the model by ensuring they align with the Mannings N layer, possibly modifying field names for consistency. After that, copy and paste these polygons into the Manning N layer, ensuring to save changes . Finally, export the modified data to a simulation tool like RiverFlow2D, which uses this data to run the hydrological models ."}

Raster elevations from X, Y, Z datasets enhance hydrological analysis in RiverFlow2D by providing a detailed digital elevation model (DEM). To generate this data, the process begins by creating a layer from delimited data containing X, Y, Z points, which represent spatial coordinates and elevation, respectively. These points are loaded into QGIS, ensuring the correct assignment of fields . Next, using the Interpolation plugin in QGIS, the point data is interpolated into a raster format. The interpolation can be done using methods like Triangular Irregular Network (TIN) or Inverse Distance Weighting (IDW), with TIN selected in this process. This produces a raster of specific resolution (e.g., 10ft x 10ft cells). Once created, the raster can be styled and moved appropriately within the layer panel to not interfere with other data . This raster is then used in RiverFlow2D simulations by exporting it as a DEM raster layer. The export process involves selecting the raster layer and confirming its use for hydrological modeling, which supports the simulation of features like initial water surface elevation and bed topography in hydrological models .

The snapping tool in RiverFlow2D is used to accurately draw hydrological boundaries by creating contiguous polygons without overlaps or gaps. It facilitates the precise alignment of adjacent polygon borders, which is crucial for defining hydrological features such as Manning’s n coefficients distributed across a mapped area . By configuring the snapping tool appropriately, users can ensure that polygons align perfectly along shared edges, which is significant for preventing errors associated with manual polygon digitization, such as unintended overlaps and empty spaces . This precision is essential for creating accurate hydrological models that reflect realistic terrain and land use conditions, enabling reliable simulation results in RiverFlow2D .

You might also like