angusmcb / wntr-qgis

A QGIS Plugin for the WNTR water network modelling package. Allows the preperation of water network models and visualisation of simulation results within QGIS.
GNU General Public License v2.0
1 stars 0 forks source link
modelling qgis-plugin water water-network-distribution

WNTR - QGIS Integration

tests codecov.io release

GPLv2 license Ruff pre-commit

This QGIS plugin integrates the US EPA's Water Network Tools for Resiliance (WNTR) with QGIS.

A plugin for doing all aspects of piped water networks analysis directly within QGIS. This includes the creation of the model, the simulation and the visualisation of results.

It is compatible with and import/exports to, EPANET. It uses the EPANET solver by default.

Compared to other QGIS water network modelling plugins, this plugin aims to be:

Feedback on this plugin would be very welcome.

Installation

Install the plugin in QGIS in the normal way (see the QGIS Manual if necessary).

A copy of the WNTR Python package is included in the plugin.

WNTR itself has some python dependencies. A warning will appear when running any of the algorithms from the 'processing toolbox' if there are missing dependencies.

Usage

Key Principles

WNTR will have created three new processing algorithms. If you can't see the processing toolbox activate it in the menu View -> Panels -> Processing Toolbox.

image

Whilst the plugin is very flexible in how it's used, the key principles are the following four steps:

  1. Layer Creation Layers can either be created using the 'Create Template Layers' processing algorithm, or imported from EPANET files using the tools provided in the processing toolbox (or you can create them manually). If you are not sure where to start, type 'Net3.inp' into the 'Import from Epanet .inp file' algorithm. All of the layers are optional - only create what you need.
    • Junctions
    • Reservoirs
    • Tanks
    • Pipes
    • Pumps
    • Valves

input image

  1. Layer Editing. The layers are normal QGIS layers and can be edited / modified / processed / styled / automated in the same ways as any other QGIS layer. In particular:

    • Digitize from any of the enormous range of data that QGIS can handle.
    • Snapping tools can be used when drawing the network to make sure that nodes and links connect.
    • Pipe lengths can be calculated automatically (this expression is added by default to new pipe layers).
    • Elevations can be added to nodes from other sources using either expressions or processing tools..
    • External data sources or any other layers can be used as background maps or data sources for drawing the network.
  2. Running the simulation. The plugin will load your nodes, linkes, patterns, curves and options into WNTR and run the model It will then process the output into a new link and node layer containing all calculated results. Configure your analysis options to exploit the full power or WNTR and EPANET.

  3. Viewing the results. Use all the power of QGIS to view and analyse your results.

    • Use all of QGIS's styling functions to look at all the results in nodes and links - pressure, flow, head, etc.
    • Use QGIS's temporal manager to view how your results change over time.

input image

Limitations

The plugin is currently marked as experimental. Some features which exist in WNTR / EPANET are not yet implemented:

In addition, Shapefile support is limited (due to a limitation of attribute length to 254 characters)

License

This plugin is distributed under the terms of the GNU General Public License, version 2 license.

See LICENSE for more information.