0% found this document useful (0 votes)
66 views50 pages

QGISRed 0.16 Usermanual en

QGISRed is a QGIS plugin that allows users to build and analyze advanced water distribution network models and digital twins. Version 0.16 of the plugin is described. It relies on a relational database of SHP and DBF files based on the EPANET data model. The plugin seamlessly integrates with QGIS to allow georeferencing of network elements, using background layers, editing graphical and alphanumeric data, geoprocessing, data visualization, and customizing symbology. It provides tools for creating and importing projects, managing layers, adding and editing network elements, verifications, analysis, and developing digital twins of water networks.
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)
66 views50 pages

QGISRed 0.16 Usermanual en

QGISRed is a QGIS plugin that allows users to build and analyze advanced water distribution network models and digital twins. Version 0.16 of the plugin is described. It relies on a relational database of SHP and DBF files based on the EPANET data model. The plugin seamlessly integrates with QGIS to allow georeferencing of network elements, using background layers, editing graphical and alphanumeric data, geoprocessing, data visualization, and customizing symbology. It provides tools for creating and importing projects, managing layers, adding and editing network elements, verifications, analysis, and developing digital twins of water networks.
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
You are on page 1/ 50

QGISRed v. 0.

16
qgisred.upv.es

QGIS PLUGIN TO BUILD AND ANALYZE ADVANCED WATER


DISTRIBUTION NETWORK MODELS AND DIGITAL TWINS

USER'S MANUAL

Directed
Fernando Martínez Alzamora
[email protected]

REDHISP Group
www.redhisp.upv.es
Institute of Water and Environmental Engineering
Technical University of Valencia
València, Spain
July, 2022

Developed
Néstor Lerma
[email protected]
CONTENTS
INTRODUCTION ............................................................................................................................. 1
DETAILS OF CURRENT VERSION .................................................................................................... 2
Version 0.16 .............................................................................................................................. 2
DETAILS OF PREVIOUS VERSIONS .................................................................................................. 3
Version 0.15 .............................................................................................................................. 3
Version 0.14 .............................................................................................................................. 4
Version 0.13 .............................................................................................................................. 4
Version 0.12 .............................................................................................................................. 5
Version 0.11 .............................................................................................................................. 5
Version 0.10 .............................................................................................................................. 6
Version 0.9 ................................................................................................................................ 7
Version 0.8 ................................................................................................................................ 7
Version 0.7 ................................................................................................................................ 8
Version 0.6 ................................................................................................................................ 8
INSTALLATION ............................................................................................................................. 10
Repository ............................................................................................................................... 10
Local ........................................................................................................................................ 11
Dependencies .......................................................................................................................... 12
GETTING STARTED ....................................................................................................................... 13
File ........................................................................................................................................... 14
Project Manager .................................................................................................................. 14
Create Project...................................................................................................................... 15
Import data ......................................................................................................................... 15
Project ..................................................................................................................................... 16
Summary ............................................................................................................................. 16
Layer management.............................................................................................................. 17
Add data .............................................................................................................................. 17
Project Settings ................................................................................................................... 17
Default Values ..................................................................................................................... 18
Materials table .................................................................................................................... 19
Create project backup ......................................................................................................... 19
Edition ..................................................................................................................................... 19
Multiple selection................................................................................................................ 19
Move nodes ......................................................................................................................... 20
Vertex Editing ...................................................................................................................... 20
Tools on network elements................................................................................................. 20
Remove elements................................................................................................................ 21
Properties ............................................................................................................................ 21
Patterns ............................................................................................................................... 21
Curves .................................................................................................................................. 22
Simple Controls ................................................................................................................... 22
Rules .................................................................................................................................... 23
Verifications ............................................................................................................................ 23
Tools ........................................................................................................................................ 24
Analysis.................................................................................................................................... 26
Hydraulic Options ................................................................................................................ 27
Run Model and Show Results .............................................................................................. 27
Export model to INP ............................................................................................................ 29
Digital Twin .............................................................................................................................. 29
INPUT DATA................................................................................................................................. 32
Pipes ........................................................................................................................................ 32
Links......................................................................................................................................... 32
Patterns, Curves, Controls, Rules ............................................................................................ 32
Default Values ......................................................................................................................... 33
TIPS .............................................................................................................................................. 34
EXAMPLES ................................................................................................................................... 35
Example 1 ................................................................................................................................ 35
Example 2 ................................................................................................................................ 38
INTRODUCTION
QGISRed is a freeware QGis plugin developed to assist in building and analyzing hydraulic models
of water distribution networks of any complexity, up to the level of detail required by Digital
Twins. The plugin works seamlessly with QGis which enables the user to georeference all
network elements, use geographic background layers, edit graphical and alphanumeric data, use
geoprocessing tools, visualize data by layers, customize the symbology, etc.
QGISRed relies on an easy-to-use relational database of SHP and DBF files based on the EPANET
data model, which has been extended to add new capabilities. Starting from the EPANET data
model significantly reduces the learning curve.
In fact, the previous skills required on QGis are minimum because QGISRed provides numerous
tools to help building hydraulic models, to manage demand scenarios and to analyze the results
without the need to use the QGis environment, such as:
• Project manager for easy project loading and storage
• Automatic creation of new empty projects
• Creation of a project backup
• Import/export EPANET INP files
• Import basic network components from Shapefiles and other auxiliary components
managed by the Digital Twin (DT) such as service connections and isolation valves.
Shortly also meters, hydrants, purge valves, etc.
• Automatic generation of topological relationships between all the network elements
• Graphical editing tools for all network elements including those of the DT (add, delete,
move, edit vertices and nodes, reverse links, multiple selection, etc.)
• Tools to debug the network layout and verify its connectivity
• Default values to newly created elements
• Property editor for all model and DT component attributes, including a browser
• Complete editor of analysis options and default values
• Automatic calculation of pipe lengths from the coordinates of the vertices
• Automatic interpolation of node elevations from DTM
• Automatic estimation of pipe roughness from material and age of pipes
• Conversion of roughness coefficients between different headloss formulas and unit
systems
• Visualization of multiple demands and quality sources as distinct layers and edition of
its properties integrated with those of nodes
• Automatic nodal demand allocation from punctual or sectorial consumptions
• Automatic pattern and hydraulic efficiency allocation by sector
• Scenario management for various model parameters by importing/exporting files
• Demand scenarios management by importing/exporting files
• Powerful editors of curves, patterns, controls and rules
• Validation anywhere of model properties against typical data entry errors
• Management of service connections and isolation valves as differentiated elements
• Load of demands to service connections from the meter readings, and move them to
the closest nodes
• Detection of isolated zones when closing the isolation valves and canceling the demands
on them
• Optional integration of service connections into the model
• Declaration of the meter sensors as distinct elements and the association of signals to
them
• Reading field data for the simulation period from files and export to EPANET
• Automatic identification of hydraulic sectors and demand zones

1
• Model simulation by using the EPANET toolkit 2.2
• Visualization of simulation results by means of tables, color coded layers, arrows and
floating or static labels
• Automatic creation of legends and symbols for the results (customizable with QGis
tools)
• Navigation bar to display simulation results

Nevertheless, in case the user decides to use the QGis tools to edit the data, QGISRed provides
powerful facilities to detect potential editing errors before simulating the model, or to fill in the
missing information.
The development of the new QGISRed plugin is an initiative of the REDHISP Research Group of
the Institute of Water and Environmental Engineering (IIAMA) of the Polytechnic University of
Valencia, UPV (Spain), led by Professor Fernando Martínez Alzamora. Its implementation is
carried out by the WaterPi company under the direction of Néstor Lerma, PhD Eng.
The QGISRed extension for QGis is an update of the old GISRed application developed by our
group for the ArcView 3.1 environment (see launching paper). Currently the name GISRed has
been kept concerning to the libraries developed in .net, which are used by QGISRed to improve
the processing time and constitutes the core of the GISRed standalone application.
For more information the user can check the official website of QGISRed or the section of
QGISRed in the official QGis plugin repository.

DETAILS OF CURRENT VERSION


Version 0.16
QGis versions: 3.2-3.99

What's new:

- New options in the nodal demand manager to declare consumption for the entire
network or by zones.
- Option to export, edit and re-import links between point consumption and junctions
- New options for importing/exporting/deleting demand scenarios by categories
- New tools in the nodal demand manager to consider water efficiency or assign
consumption patterns by sectors
- New scenario manager to store and retrieve some model parameters in block

- Automatic calculation of pipe lengths from the coordinates of the vertices


- Automatic service connection layout, creating a perpendicular to the nearest pipe or a
link to the nearest junction
- Possibility to automatically trace connections of predefined length from a point on a
pipe or a junction
- New option to mirror a service connection with the invert tool
- New option to import service connections as points, creating perpendiculars to the
nearest pipe or junctions
- New IsActive field in service connections to define if it is operational or not
- Verification of the contact point of a service connection with a pipe or junction at both
ends

2
- Before calculating the hydraulic sectorization, the status of the manual valves is now
transmitted to the pipes
- When exporting to INP the loss coefficient of the shut-off valves is transmitted to the
pipes
- Declaration, editing and deletion of meters of various types, as new elements of the
Digital Twin
- Editing, reading and saving of signals associated with meters
- New dialog for reading field data and exporting to CSV those corresponding to the
simulation interval
- New option to export the field data, together with the INP file

- New fields in the import dialog, to be able to import more element information
- New option to show in the auxiliary themes the elements with some incidence, during
the shapefile importing process
- New buttons and new slider in the results panel
- Improvements in the labels to display the results
- New type of result to display the Status of lines
- Improvements in the search from the property editor
- When exporting INP, a new list of EPANET executable paths is offered to automatically
open the exported file
- When importing an INPs file, patterns are now classified by type
- New warning has added when autocompleting the ID of an element
- Changes in the order and names of some toolbar buttons
- Changes in the visual styles of some of the elements
- New link to QGISRed website in the info window

- Fixed an error when reading the IDcurve in GPV valves and editing it from the properties
dialog
- Fixed an error when assigning default values to bulk and wall reaction coefficients while
importing an INP file
- Fixed a bug and message displayed when reading quality sources in reservoirs and tanks
- Fixed a problem that caused the point selection tools to stop for certain features
- Fixed a bug in the tool to create T-connections massively
- Fixed a bug with the multiple selection tool
- Fixed a bug in the polygon selection tool, when the reference system was not assumed
by default
- Fixed a bug with the snapping tool (point selection of elements) in QGis version 3.26

DETAILS OF PREVIOUS VERSIONS


Version 0.15
QGis versions: 3.2-3.99

Features:

- Management of isolation valves (import, creation, deletion, property editing,


interaction with pipeline status...)
- New tool to change the status of linear elements and manual valves

3
- New symbolization of pipes, pumps, regulating valves and isolation valves according to
their status
- Cancellation of isolated demands due to pipe or valve closure during simulations
- Assignment of nodal demands from demand sectors and pinpointed demands, with
various options
- Improvements in the property editing window (multiple selection, connected elements,
visited elements, center selected element)
- Revision and extension of the analysis options (hydraulic, quality, time and energy)
- Addition of new Epanet 2.2 parameters to forms (tank overflow, pressure dependent
demands)
- Highlighted main toolbar buttons/menus
- Default and only English language (for now)
- Improved editing of rules (with times and clocktimes)
- Fixed bug when typing demand values with more than 4 digits to the left of decimal
point
- Fixed bug in time labels for result selection
- Fixed bug when converting numbers in the dimension interpolation process
- Fixed bug when reading and writing rules
- Fixed bug in the order of rules
- Fixed bug with rules using comma as decimal separator
- Fixed problem with project projection assignment
- Fixed bug when editing properties working with raster layers

Version 0.14
QGis versions: 3.2-3.99

Features:

- Fixed major bug when reading metadata from previous models that prevented working
with them
- Fixed error when installing the plugin without previously having the necessary
dependencies
- Fixed error with the time format in simple control laws
- Display of user-defined decimal separator in the different windows of the plugin
- New tool for editing the geometry of the service connections
- The hydraulic option Demand multiplier now supports a value with decimal places
- Prioritization of DT elements when selecting objects for editing their properties or
deleting them

Version 0.13
QGis versions: 3.2-3.99

Features:

- New menu to group the tools for the management of Digital Twins.
- Specific button to create service connections and its integration on the global deletion
tool.
- Specific tab for editing service connection properties
- Loading demands to service connections or model nodes from automatic meter
readings (AMR) in different formats

4
- Integration of service connection demand patterns into the pattern editor dialog
- New demand manager to complete the import tool from file, with the selective export
to file and deletion of the nodal base demands and patterns
- Improved access time to the element properties editor for large networks.
- Opening the INP file with EPANET when exporting it is now optional.
- New options for defining the units and the headloss formula when importing data from
GIS
- The loss coefficient converter checks now for declared pipes before launching the
converter
- Corrected the format of the time options to allow entering days in addition to hours,
minutes and seconds.
- Removal of patterns on multiple demands is now limited to removed demands only
- Corrected date reading from metadata
- Fixed bug that prevented importing SHPs when selecting the same field for different
properties
- Fixed bug that caused some SHP fields to be imported without being explicitly selected
- Translated into English some texts that were displayed only in Spanish
- Fixed bug in the graphical selection tools when the QGIS CRS is different from that of
the QGISRed data
- Fixed SHPs import error when some feature does not have its geometry declared
- Fixed a display error in result layers

Version 0.12
QGis versions: 3.14-3.99

Features:

- Editor of the roughness-material table for the estimation of roughness according to


material and age
- New option to import and export patterns/curves in CSV format
- New tool to import base demands at junctions (single or multiple) and its Id patterns
from CSV file
- Added import of service connections from SHP
- New tool to obtain the minimum spanning tree of the network
- Updated the Epanet library to version 2.2
- Improved the interface for converting roughness coefficients
- Fixed error when displaying quality results
- Refresh of current units and headloss formula in the status bar when loading a QGis
project
- Projects imported from INP are now also displayed in the list of projects
- Fixed error when nodes have no coordinates
- Negative lengths are now avoided when inserting valves or pumps
- Fixed error to access Patterns when TimeStep Pattern is 0:00
- Service connections are now read correctly

Version 0.11
QGis versions: 3.2-3.99

5
Features:

- Created a Json file to define the different projections (.prj file content) in case the
Internet is not available
- Implemented the reading of the PUMPS section formats inherited from Epanet version
1.1
- New single installer for both architectures (x86 and x64)
- The units and headloss formula are displayed in the status bar.
- The estimation of roughness coefficients as a function of age and material support
different headloss formulas and unit systems
- Conversion of roughness coefficients between different headloss formulas and unit
systems
- Tool to create a project backup (manual restoration)
- Fixed error when loading the plugin in QGIS version 3.14.15
- Fixed error for not allowing to express the hours in a format other than AM/PM in the
Controls section
- Fixed error when not being able to take the user information from Windows in some
computers
- New blue color labels in results for line elements
- Fixed error when cloning the project and losing the metadata
- Fixed error when saving a result scenario and freezing the map
- New alphabetical order in the link and node lists in the Simple Controls

Version 0.10
QGis versions: 3.0-3.14.1

Features:

- Fixed not correct behaviour in create/import tools when other layers are open.
- Headers of the INP sections written in English.
- Validation in element properties to prevent same final node in lines.
- Fixed error when importing tanks.
- Improved simplification of vertices to eliminate repetitions at the starting point.
- Fixed error writing the Times of Options.
- Metadata restructuring, now unified in the *_Metadata.txt file.
- Fixed error joining pipes with the same characteristics when they start and end in the
same node.
- Check for new versions and notify the user.
- Fixed icons display in the legend for QGis version 3.12
- Fixed bug that prevented saving result styles.
- Fixed error in decimal symbol reading when the user uses the English format and
changes the decimal symbol by comma.
- EditProject switches to LayerManagement to control visibility of layers and their
creation.
- Now the projection is correctly saved in the PRJ file.
- New window with project options.
- Separation between Import (without project - INP or SHPs) and Add data (with project -
only SHPs).
- Spatial tolerance when importing/adding data from SHPs.

6
- Manual includes ascii file format for elevation interpolation and classification of the 4
types of hydraulic sectors.
- Simplified 4 layers of meters in only 1.
- Fixed error when writing SHPs of issues in valves and pumps.
- Methods to assign roughness, check overlapping elements, aligned vertices, lengths,
material, diameter or installation date now also for selected elements.
- Fixed error in very specific case when creating individual T-connections.
- New dependency management to avoid errors if they are in use.
- Some improvements on the features already offered in previous versions

Version 0.9
QGis versions: 3.0-3.99

Features:

- A new logo for the QGISRed plugin


- Easy creation of pipes, reservoirs and tanks, with snapping tool
- Tool to create (add as you click), move or delete (right click) vertices of links
- Fixed valve/pump orientation when inserted into pipes
- Tool to reverse links (pipes, valves and pumps)
- Tool to split and join pipes
- Tool to join / separate nodes
- Tool to create / undo T connections
- Tool to create / undo pipe crossings
- Tool to move valves and pumps
- Multiple selection of elements from different layers in one step (Ctrl adds, and Shift
removes)
- Deletion of all selected elements within a polygonal region
- Removed most of double buttons and replaced by a new option in the dialog window
- New button to access the latest results without running the model again
- Results menu can be expanded and compressed to allow coupling other QGIS windows
- Fixed error when working with long paths
- Some improvements on the features already offered in previous versions

Version 0.8
QGis versions: 3.0-3.99

Features:

- Editing properties of the main elements through a dialog window, being able to navigate
from it through the different elements contained in the model.
- Insertion/Elimination of valves and pumps in pipes. In the first case, by clicking on a
point in the pipe, the pipe will be split or shortened (whichever the case may be) to
introduce the new element. In the second case, by clicking on the valve or pump
element, it will be eliminated by joining the adjacent pipes if possible.
- Editing the network layout, being able to move nodes of the model so that the rest of
the connected elements also move accordingly.
- Rearrangement of all the buttons of the plugin in 5 categories to facilitate the handling
of the different options.
- Correction of some bugs as control rules are read.

7
- Dialogs for editing analysis options and default values.
- Verification of repeated Ids during their generation.
- Hiding of legend data tables (Patterns, Curves, Controls, Rules, Options and Default
Values).
- Changes in the results selection menu to show a single variable per node or per line.
Reduction of refresh time.
- Option to visualize the value of the chosen parameter for each element by using static
labels.
- Elimination of administrator permissions to install the necessary dependencies.
- Some improvements on the features already offered in previous versions.

Version 0.7
QGis versions: 3.0-3.99

Features:

- Abstract report with the number of elements of each type, as well as the flow units, the
pressure loss formula and if any quality parameter is modeled.
- Modulation Curves Manager: Allows you to edit, create, delete, clone, export and
import new patterns. Adds the option to define the pattern type. It also indicates which
elements are associated with that pattern. Finally, it includes the functionality of
working with real values (depending on the base value associated with the pattern) or
with a multiplier or factor (traditional form).
- Curves Manager: Allows you to edit, create, delete, clone, export and import new
curves. For curves associated with pumps, in the case of 1 or 3 points, the equation of
the approximate curve is specified. The elements associated with these curves are also
specified.
- Simple Controls Manager: Allows editing, adding, deleting, cloning and ordering Simple
control laws. It includes the option of being able to disable a control law.
- Rules Manager: Allows editing, adding, deleting, cloning and ordering Rules. It includes
the option of being able to disable a Rule. You can combine different conditions through
the OR and AND operators, as well as select the appropriate combined condition to
apply to the Rule.
- In both Controls managers its definition is done interactively and not by typing text
(traditional way).

Version 0.6
QGis versions: 2.0-3.99

Features:

- Manage QGISRed projects. It is possible to open, create, import, clone or delete


projects.
- Create or edit a QGISRed project. It allows to create vector layers (SHPs) of the basic
elements that the EPANET software works with. If the user removes any of these SHPs,
it is possible to recreate them.
- Data import from INP (EPANET) or SHPs files. In the first format you can import complete
models developed with the popular EPANET software. Using SHPs, you can create or
complete a model specifying for each type of element, the SHP from which you want to
import information and which fields contain certain information needed for the model.

8
- Validation of the model, informing if there has been any error or warning when
processing the information contained in the SHPs.
- Export to EPANET INP file, with the option to open this software once the file is
generated.
- Simulation with the EPANET Toolkit to show the hydraulic and quality results.
- Plugin includes a set of tools associated with the layout (elimination of overlapped
elements, simplification of aligned vertices, creation of T-type connections, pipe union
with the same characteristics or analysis of network connectivity), with the properties
of the elements (analysis of lengths, diameters, materials, installation dates, change of
state of pipes or elevation interpolation), to add components (connections, hydrants,
drains) or to sectorize (hydraulic sectors and demand sectors).

9
INSTALLATION
The QGISRed plugin requires the installation of dependencies (as detailed below). The QGISRed
dependencies work under Windows operating system and require the installation of version 4.5
of the Windows .Net Framework component. Therefore, the QGISRed plugin will only work
under these conditions.

Repository
To install the plugin or an update from the official QGis repository, follow these steps:

1. Start QGis v3.x


2. Go to Plugins menu→Manage and Install Plugins…

3. Select the "All" tab, in the top bar type QGISRed. Then select the only item that appears
and finally press the button to install it in the lower right corner ("Install Plugin").

4. Once installed, a message will appear indicating that the plugin has been installed.

10
5. Close the window at the end of the process.
6. A new button bar and a new item should appear in the top menu.

Local
To install an update of the plugin locally, prior to the steps discussed below, it is necessary to
uninstall it. To do this, you can uninstall it from the QGis plugin manager, or manually deleting
the corresponding directory.

1. Start QGis v3.x


2. Go to Plugins menu→Manage and Install Plugins…

3. Select "Install from ZIP" tab, select the QGISRed.zip file. Then click on "Install Plugin"
and if the warning message appears, click on "Yes".

11
4. Close the window at the end of the process.
5. A new toolbar and a new item should appear in the top menu.

Dependencies
1. Once installed, when the user wants to use some plugin tool, a message will appear
indicating the need to install the QGISRed dependencies mentioned above.

2. Clicking on the "Yes" button will download and install the necessary dependencies for
the operation of the plugin (does not require administrator permissions).
3. In the case of pressing the "No" button, when the user tries again to use any tool of the
plugin will indicate the need to install the plugin dependencies.

12
GETTING STARTED
This section briefly introduces each tool available in the plugin. In the following sections more
details will be presented.

The plugin is mainly divided into six categories, each with a set of tools shown below.

Categories:

- File
- Project
- Edition
- Verifications
- Tools
- Analysis
- Digital Twin

13
File
This category contains the tools related to the management of a project, that is, the basic utilities
to open, create, import and close.

Project Manager

This window allows the user to manage recently opened QGISRed projects, but also to load
projects that do not appear in the list, to unload those that the user do not want to appear, to
make a copy of one, to create a new project, import data or to access to the project directory.

Load

For importing a project it is necessary to specify the name of the network and the directory
where the SHPs are stored.

14
Clone

To clone a project, the user must specify the new name of the network and the directory where
he wants to copy it. If the network name is different from the original, the directory can be the
same. In other words, there can be several QGISRed projects in the same directory.

Create Project

From this window it is possible to create a QGISRed project, i.e. the SHPs needed to build a
model of a hydraulic network.

The required data to create a project is the name of the network and the directory where the
information will be stored. It is possible to specify the Coordinate Reference System (CRS) too.
If the default value "Temporary folder" is maintained in the directory field, the program will
create a temporary directory that can be consulted in the Project Manager.

Once created, the following content will appear in the legend: A group with the name of the
network which, in turn, will include another group titled "Inputs", thus indicating that this
information is input data to build the model. Within the group, at least 6 SHPs are included, one
for each type of EPANET base element.

Import data
QGISRed allows to import a complete model from an EPANET INP file or import data from SHPs
files. In the first case, you only need to select the INP file. In the second case, it is necessary to
select the directory where the layers are stored, and then, for each type of element, select the
corresponding layer and the fields to be imported. In this second case, a specific value for the
spatial tolerance it is possible to stablish.

- From INP:

15
- From SHPs:

Project
This category allows you to edit the project, see a summary of what it contains, manage layers,
add data from shapefiles, edit project options, defaults, materials and even create a backup.

Summary
Allows access to a window where the elements contained in the template are summarized, as
well as some units and formulas of interest.

16
Layer management
This tool allows you to control which layers to see in the legend or, if they do not exist, to create
the layer associated with an element. In addition, you can specify in which projection the
information is (this tool does not reproject).

Add data
This tool is the same as Import data, but in this case, it does not allow you to add information
from an INP to your current project.

Project Settings
In the General tab, this window also allows you to specify a scenario name, write down a series
of notes related to the scenario and edit the creator’s name.

17
The Digital Twin tab includes a series of options that allow certain operations to be performed
automatically when carrying out particular actions, such as simulating or exporting the INP file.

Default Values
Also, it is possible to edit the default values used in the creation of the different supported
elements.

18
Materials table
Allows the definition of the material together with the initial roughness and the annual increase.
These data are used for estimating roughness as a function of the material and age of the pipes.

Create project backup


This tool allows you to create a backup of all the project files in a compressed file (ZIP).

To restore it you would have to do it manually by unzipping the content in the project folder.

Edition
This section allows you to edit the layout, element properties and other components such as
curves and controls.

Creation of basic elements

With these buttons it is possible to create the basic elements that Epanet handles for a hydraulic
network. The first, apart from creating a pipe and assigning its default properties, also generates
the two extreme nodes (Junctions type).

The next two buttons allow you to create reservoirs and reservoirs. In this case, it is necessary
to click on an existing node (it is not possible to create an isolated node).

The last two buttons allow you to insert valves and pumps into existing pipes. Therefore, it is
necessary to select a point of a pipe.

Multiple selection
With the button ( ) it is possible to select with a rectangle (by clicking and dragging) or with a
polygon (by clicking on each of the points - without dragging) all the elements that are within

19
the selected region. This allows, for example, to massively delete items. In next versions it will
allow to apply certain tools on the selected elements.

Move nodes
The button ( ) allows to move the nodes of our network (Junctions, Tanks, Reservoirs) and to
move the rest of the elements that coincide spatially with this (other nodes, pipes, valves or
pumps).

Vertex Editing
With this tool ( ) it is possible to move the intermediate vertices of the linear elements (pipes,
valves and pumps), as well as create new vertices (by clicking where you want to add) or delete
them (right click on the vertex).

Tools on network elements

With these tools it is possible:

- Reverse the orientation of a line (pipe, valve or pump)


- Split a pipe or join two pipes with the same properties (diameter, age and material)
- Divide a node into several, one according to the number of lines you connect. Reverse
process of joining nodes. The nodes must be of the Junction type. To divide, right click
on the node. To join, it must be two by two. First select the origin node and then the
destination node (left button).
- Create or reverse connections in T. It works similarly to the previous tool.

20
- Create or reverse pipe crossings. You must click with the left button on the junction
node to merge or on the crossing point of two pipes.
- Move valves or pumps from one pipe to another (or in the same pipe, but in another
position).
- Change the status of line elements (pipes, valves and pumps) and isolation valves. If a
pipeline has an isolation valve on it, the change of status must be done on the isolation
valve.

Remove elements
This tool ( ) allows you to delete elements. You can previously select those that you want to
delete or, otherwise, select the element to be deleted by clicking on it.

Properties
This button ( ) allows you to select any element of our model and access its properties
(through a dialog window) and modify them in a simple and intuitive way.

Using the "Browser” expander menu it is possible to navigate through the elements connected
to the currently selected element or to those previously visited.

Patterns
The button gives access to edit Patterns and Curves. In the first tab of the window it is
possible to manage the Patterns.

21
Curves
From the same button, but in the second tab, you can manage the Curves.

Simple Controls
The button gives access to the editing of the different types of controls (Simple or Rules). In
the first tab of the window you can manage the Simple controls.

22
Rules
From the same button, but in the second tab, you can manage Rules.

Verifications
This category contains a set of tools for verifying the topology and data introduced. The tools
are applied massively to the entire network.

The current utilities allow:

• Consolidate the data introduced.


• Search for overlapping elements and delete them.
• Simplify aligned vertices in linear elements.
• Simplification or union of pipes with the same diameter, material and year of
installation.
• Create T-type connections, that is, if a node with connectivity one coincides on a pipe,
the last one is divided into two new pipes and connected all together.
• Analysis of network connectivity, showing isolated areas. This tool allows to eliminate
subzones with less than a specific value of pipes indicated by the user.
• Analysis of pipe lengths. Compare the length assigned as an attribute with the Euclidean
length. Displays a message if the difference is greater than a percentage specified by the

23
user. There is the option of automatically modifying the length value with the Euclidean
value if the user so indicates.
• Diameter analysis, indicating those higher or lower than pre-established thresholds.
• Analysis of materials, indicating those not recognized or unknown.
• Analysis of pipe installation dates, indicating incorrect or future dates.
• Hydraulic sectors: the tool tries to identify whether all demands can be supplied from
available sources, tanks and reservoirs.
o For each sector, depending on the existence or not of demands and tanks, it is
classified into 4 types:
▪ TYPE A: Sub-network in which there is at least one source of supply, i.e.
a tank, a reservoir or an injection point, and in addition at least one of
its nodes is a flow node and therefore with an assigned base demand.
This sub-network would really be a hydraulically compatible sub-
system, in which all its nodes could be supplied with guarantees.
▪ TYPE B: Sub-network in which there is at least one source of supply, i.e.,
a reservoir, a reservoir or an injection point, but in which none of its
flow nodes has an assigned base demand. This sub-network would be a
hydraulically compatible sub-system, in which there would be no flow
rate because there are no demand points.
▪ TYPE C: Sub-network in which there are no sources of supply, but
nevertheless its flow nodes have a base demand assigned. This sub-
network would form an isolated, hydraulically incompatible sub-
system, in which its nodes could not be supplied as there is no source
of supply.
▪ TYPE D: Sub-network in which there are no sources of supply, and in
addition none of the flow nodes have a base demand assigned. This sub-
network would be an isolated sub-system, but hydraulically compatible,
since its nodes do not need to be supplied, and therefore no sources of
supply are required.

Tools
In this category you have a set of utilities to apply properties massively to all or selected
elements.

Current utilities allow:

• Automatic calculation of pipe lengths from its geometry.


• Massive interpolation of the elevations of node elements (junctions, tanks and
reservoirs) from ASCII files.
o The file format should be as follows:

24
Where NCOLS is the number of columns, NROWS is the number of rows,
XLLCENTER is the X coordinate of the center of the cell in the lower left corner
of the grid, YLLCENTER is the Y coordinate of the center of the cell in the lower
left corner of the grid, CELLSIZE is the cell size and NODATA_VALUE is the default
value of the cell when no data is available.
o The interpolation is made only for the nodes whose elevation is equal to the
default value (different according to the type of element: Junction, Reservoir or
Tank). If the user has previously modified or imported that elevation, it is not
interpolated.
• Assignment of the roughness coefficient according to the material and the year of
installation according to the headloss formula defined in the project.
• Conversion of the roughness between some headloss formulas and others:

Darcy-Weisbach (D-W); Hazen-Williams (H-W); Chezy-Manning (C-M)

o From D-W to H-W:

𝐶𝐻𝑊 = 𝐴 + 𝐵(𝑙𝑜𝑔10 𝜀 + 3)𝐶 , 𝜀 𝑖𝑛 𝑚𝑚


𝐼𝑓 𝜀 < 0.001 → 𝜀 = 0.001 𝑚𝑚
o From H-W to D-W
𝐶 −𝐴 1/𝐶
[( 𝐻𝑊 ) −3]
𝜀 = 10 𝐵
, 𝜀 𝑖𝑛 𝑚𝑚
𝐼𝑓 𝐶𝐻𝑊 > 𝐴 → 𝐶𝐻𝑊 = 𝐴
with:

𝐴 = 157 − 12(𝑒 −5𝐷 ) ; 𝑒 (2.718281828)


𝐵 = −4.89 − 1.15(𝑙𝑜𝑔10 𝐷) ; 𝐷 (𝑚)
𝐶 = 1.97 − 0.263(𝑙𝑜𝑔10 𝐷)

o From D-W to C-M:


𝑛 = 𝐴 + 𝐵(𝑙𝑜𝑔10 𝜀 + 3)𝐶 , 𝜀 𝑖𝑛 𝑚𝑚
𝐼𝑓 𝜀 < 0.001 → 𝜀 = 0.001
o From C-M to D-W:

𝑛−𝐴 1/𝐶
[( ) −3]
𝜀 = 10 𝐵
, 𝜀 𝑖𝑛 𝑚𝑚
𝐼𝑓 𝑛 < 𝐴 → 𝑛 = 𝐴
with:

𝐴 = 0.0101 + 0.00115(log10 𝐷), ;𝐷 (𝑚)


𝐵 = 7.77 ∗ 10−6 + 1.02 ∗ 10−5 ∗ 𝑒 −5𝐷 ; 𝑒 (2.718281828)
𝐶 = 4.84

o From H-W to C-M:


Converting from H-W to D-W and from D-W to C-M

25
o From C-M to H-W:
Converting from C-M to D-W and from D-W to H-W

For more information go to this research.

• Demand manager:
o Allocate base demands to demand nodes from polygons corresponding to
sectors or from punctual elements. In the first case, the total demand of the
sector is distributed among the demand nodes contained in it. In the second
case, the demand node closest to the given point element is found and the base
demand is assigned to it.
o Import of the base demand and pattern id for the demand junctions. File format:
IdJunction; Base Demand; IdPattern (splitted by ; or ,). It also allows to optionally
import the values of the modulation curves.
o Export the base demand and the pattern id for the selected junctions or for all
junctions in the model. It also allows optionally exporting the values of the
patterns associated to the exported demands.
o Deletion of demands (base demand and pattern id) for the selected junctions or
for all junctions in the model. Allows optionally to delete the modulation curves
if they are not used in another demand.
• Scenario manager: Allows export and import of element properties such as pipe
roughness, condition, demand, quality, elevations, etc.

• Demand sectors: it allows the identification of areas of the network delimited by


flowmeters and regulating elements that allow a pipe to be opened or closed.
• Minimum Spanning Tree.

Analysis
This section is dedicated to the analysis of the network, configuring its hydraulic and quality
options, simulating and exporting to Epanet.

26
Hydraulic Options
It is possible to edit the properties associated with the calculation of the hydraulic and quality
model, including simulation times and energy options.

In the case of the headloss formula, when changing the value, you will be asked if you want to
convert the roughness taking into account the new formula chosen.

Run Model and Show Results


Clicking on the button simulates the network and a Result dock (like the following image) is
opened. In this dock which results and which time interval to show can be selected.

27
Once simulated, a window appears containing the simulation report generated by the EPANET
Toolkit and the result selected in the "Browser for Results" group are opened as layers.

From the Result dock it is possible to open or close the different types of results, as well as
change the instant of time to be displayed.

In addition, it is possible to save the simulation results by specifying a scenario name


(corresponding only to the results and not to the data) and comments to indicate, for example,
what characteristics that scenario has or what data has been changed.

28
Export model to INP

This window allows to export to an INP file the model generated from the information contained
in the QGISRed project. In addition, it is possible to export the .dat files with the field data, as
well as to specify with which program to open the resulting file.

Digital Twin
In this category, a set of utilities is available to complete the model from Digital Twin data.

Available tools are:

• Creation of service connections by drawing their geometry on the map


• Creation of isolation valves selecting a point on the map
• Creation of meters, automatically according to the element on which it is placed or by
specifying the type of meter to be created
• Loading demands to service connections or model nodes from automatic meter
readings (AMR) in different formats

29
o Table format: First row of headers (Time; id1, id2, ...) where id1 and id2
correspond to the ids of the connections or nodes of the model. Then, one row
for each record. In each file, the time interval must be constant, for example,
one record every 5 minutes.
o Series format: First row of headers (Id, Time, Demand). Then one row per
record. The time step must be constant in each file.
• Load field data. It currently allows importing field data in table format and exporting
them all to a single CSV for the selected period

30
• Assignment of the initial state of a pipe according to the state of the isolated (or cut)
valves
• Convert connections, both as a punctual node or as a link (pipe)

31
INPUT DATA
This section details which values must be entered in the different fields that exist in the attribute
tables of the elements that appear in the QGis legend and that are part of the QGISRed project.
All data that must be entered with the same values as in EPANET will not be commented (check
the EPANET manual).

Pipes
From version 0.8 this data can be introduced from the properties window and does not need to
know the available options. However, if you want to edit some data manually from the attribute
table:

In the table of attributes of this type of element two additional fields appear with respect to
those of EPANET, in this case, the field Material and InstalDate. The first corresponds to the
material of the pipe, and in versions before 0.12, the values that can be defined are:

• GREY CAST IRON


• DUCTILE CAST IRON
• STEEL
• FIBER CEMENT
• GALVANIZEDIRON
• CONCRETE WITH SHEET METAL JACKET
• CONCRETE WITHOUT SHEET METAL JACKET
• PRESTESSED CONCRETE
• LEAD
• POLYETHYLENE
• ORIENTATED PVC
• UNPLASTICIZED PVC
• COPPER
• HIGHT DENSITY POLYETHYLENE
• LOW DENSITY POLYETHYLENE
• MEDIUM DENSITY POLYETHYLENE
• UNDETERMINED
• UNKNOWN

From version 0.12, the value of Material field corresponds with the acronym of Material table.

In the case of the InstalDate field, this corresponds to the date of installation of the pipe. The
input format is yyyyMMdd, where yyyy corresponds to the four digits of the year, MM is the
month number with two digits (adding a 0 before if necessary) and dd is the day (20190715, for
July 15, 2019). With these two fields it is possible to estimate the roughness of the pipe.

Links
Unlike EPANET or other tools, GISRed and, therefore, QGISRed does not require the definition
of the topology, that is, for each line it is not necessary to define the Id of the initial and final
node. This process is done automatically by spatial analysis.

Patterns, Curves, Controls, Rules


From version 0.7 onwards, new tools are available for entering this information (see the
corresponding section). This data is stored in data tables (DBF) that can be edited from QGis. To

32
modify this type of information directly from the tables, it is entered very similarly to the EPANET
INP file, but rather than separated by spaces, it is separated into different columns.

In the case of Patterns, an additional field is added indicating the order of the factors within the
same modulation pattern or curve.

For the Rules, there are three new fields (RuleOrder, LineOrder y Name). If we import from an
INP file that contains Rules, the first time we open the attribute table it will be unordered
(depending on the QGis version).

In this case, it is necessary to sort by the LineOrder column and then by RuleOrder. In this way,
we will see an aspect very similar to how Rules are written in EPANET, but as two additional
columns at the beginning. These columns will allow us to add or modify components of a specific
Rule. We will have to assign the same RuleOrder for all the rows that correspond to the same
Rule and then specify the appropriate order for each row in the LineOrder field.

The last column "Name" allows you to name each of the conditions or actions defined, so that
through the interface they can be easily recognized.

Default Values
DefaultValues are a set of attributes that are used in the process of reading, building, or
validating the model to correct or complete information. For example, the prefixes of new
elements that are created, the minimum or maximum separation at the time of introducing an
element on a pipe or the default values of some of the attributes of each element. The user can
modify these data making a coherent use of them.

33
TIPS
This section discusses some interesting points to the QGISRed user:

- In the Project Manager, to open a recent project it is enough to double-click on it.


- Importing a model from INP file replaces any previous information. However, the import
of SHPs is incremental, i.e. you can import one layer and then another, obtaining at the
end a combination of both.
- Any tool of the plugin that is used will take the information contained in the project
directory, not only the open layers in QGis.
- Saving the QGis project allows that when reopening the QGISRed project or directly the
QGis project, everything appears as the user left it when saving.
- When “Show Map Tips” option is active, it requires selecting a specific layer for the
labels appear.

34
EXAMPLES
Example 1
The first example illustrates the ease of importing a previous model available in an EPANET INP
file and perform a hydraulic and quality simulation.

With the INP file ("Red1_SI.inp") and QGis opened, click on the import button (in the toolbar or
in the upper menu):

The following window will be opened, in which the user must define the name of the network,
the directory where the SHPs will be stored, as well as the reference system (CRS) and the INP
file. Once this information is indicated, press the "Import Data From INP" button.

In this example there is no warning in the import process, but if there were, a pop-up window
would appear with the log.

In the main QGis window the model layers and tables with non-spatial information will appear:

35
From version 0.7 onwards, data relating to curves (modeling and behavior) can be edited using
the corresponding buttons. From version 0.8, the properties of each element can also be edited
using the tool that allows access to the data through a dialog window. However, it is also possible
to consult the data contained in each of the items that appear in the legend by accessing its
attribute table (secondary button on each layer or with the button available on the top toolbar
). If you want to modify any value, you must enable the editing mode for the selected
layer or table, change or even add some element and finally save the changes.

Assuming in this example that the model is completely defined, the hydraulic and quality
simulation could be run. To do so, click on the "Run model" button and a right menu will appear.

36
After performing the simulation, instantaneously for this example, a pop-up window appears
with the report generated by the EPANET ToolKit, at the same time that the selected results are
loaded (Flow and Pressure) in QGis legend.

From the right menu that appears when clicking on the simulate button, it is possible to show
the different results, as well as change the instant of time to represent.

It is recommended to deactivate the Inputs group visualization, so that the representative colors
of the results are better appreciated.

37
If the "Show Map Tips" option is activated (if not), selecting a layer of results and holding the
cursor over an element displays the value associated with that variable for the selected time.

Example 2
This example shows how to build the model of the previous example (Red1_SI) from the
beginning, without importing, that is, creating the different elements in QGis.

The first thing to do, once QGis is opened, is to click on "Create Project". This can be done from
the top menu or from the QGISRed plugin's own toolbar.

A window will be opened where the user must fill in the network name, the working directory
and the reference system (CRS). For this example, that does not have a specific spatial location
we can select the WGS 84. Then click on the "Create Project" button.

38
A message will appear showing that the process has been successfully completed and the legend
will include the layers and tables (empty or with default values).

Before continuing and, as the process of create the network can take time, it is advisable to save
the project with QGis. Thus, the next time we want to continue, whether we open the QGis
project or the QGISRed project, everything will be the same as we left it the last time we saved
it.

From version 0.9, the following operations can be performed using the tools of the QGISRed
plugin.

Before starting to draw the layout of our model it is convenient to activate the option of
"Snapping" of QGis. This option will facilitate the creation of an element from a previous point
of our model. To do this, show the "Snapping Toolbar" and activate the first button.

39
At this point we can begin to draw the layout. Possibly the most convenient thing is to begin
with the pipes, then valves and pumps and, finally, tanks and reservoirs. Therefore, we should
activate the Pipes layer in edit mode , select the button to create a new line.

The model we must build is the following. As a starting point we can choose the pipe that starts
from the upper tank.

40
First steps:

1) 2) 3)

41
4) 5)

1) After selecting the second point of our pipe, we press right button to accept that link.
At that moment a window appears to introduce the data associated to the model and
that are contained in the table of attributes. In any case, when we generate or
consolidate the model, the necessary empty data will be filled in.

2) The fuchsia square facilitates the selection of the end of the previous pipe.
3) We finish drawing the rest of the pipes.
4) Draw the pump (activate layer edition) and the valve (activate layer edition).
5) Draw the tank (activate layer edition) and the reservoir (activate layer edition).

Once the topology has been built, the data for each element must be filled. To do this, we must
save all the changes in the different edited layers. Once done, selecting the properties editing
tool we can click on each element and modify its data.

42
It is also possible to modify the data, maintaining the editing mode, opening the attribute table
of a type of element, in which all the elements created for that type appear and complete the
information. Another option is to use the object identifier by selecting the "Auto open form"
option from the right menu. This allows clicking on an element to open a pop-up window to
enter data for that element only.

43
An additional option when the value of a field is repeated in all or almost all elements (e.g. the
roughness coefficient of the pipes in the example), it is possible to use the field calculator .
Select the option to update existing field, select the field and complete the desired value.

Once all the element data has been entered, the pump characteristic curve data must be
completed. To do this, press the button and we access the edition of curves. In this example
it is only necessary to enter a point of the curve and specify the type of curve.

The procedure is: add a new curve, edit the curve type with the icon , select the PUMP option
and then add the corresponding pair of Flow-Head values.

It is also necessary to enter the modulation curve data. From the same window, but in the
corresponding tab, enter the values of the example.

44
Once you have finished entering these data, click on the "Accept" button to save these changes.
Then, it will be necessary in the pump to specify the Id of the curve in the IdHFCurve field.

As the reader will have observed, no junctions have been introduced at this time. They could be
added manually one by one and complete their information or, once we validate and commit
the model, these elements will be created and it will be enough to complete the data such as,
for example, those related to the base demand.

At this point, we can validate the topology and data entered. Pressing the button will show
a list of messages, corresponding only to the creation of nodes (junctions) from pipes.

If we consider it correct, when clicking on the Accept button (pop-up window), we will see how
the missing nodes have been created in the layout.

45
Once we have the nodes, we can complete their data, as has been done with the rest of the
elements.

If we validate again, we'll see how no messages appear in the log pop-up window.

Another aspect to complete are the simple controls that are defined for this example. It is
accessed with the button and, in the first tab, we create the two simple controls.

To finish, before proceeding with the simulation, it is necessary to modify the relevant options,
to do so we press the button and modify the following.

HEADLOSS D-W
UNBALANCED CONTINUETO
CONTINUETO 10
QUALITY TYPE CHEMICAL

46
CHEMICAL LABEL Cloro
CONCENTRATION UNITS mg/l
DURATION 24:00 (1.00:00:00)
QUALITY TIMESTEP 00:05
STATUS YES
SUMMARY NO
It should be mentioned that, the PATTERN by default that appears in the options is the Id 1. In
this example corresponds to the Id of the pattern that has been created. Otherwise, it would be
necessary to change it if we want to assign to all the junctions that curve or, to specify the
corresponding Id in each node.

If we simulate in the same way as in the Example 1, we will see that the same results are
obtained.

47

You might also like