Introduction Managing water distribution networks requires precision, powerful software, and efficient workflows. Quantum GIS (QGIS) is a leading open-source geographic information system, but it needs specialized plugins to handle hydraulic modeling. The GHydraulics plugin bridges this gap by allowing engineers to design, analyze, and optimize water supply networks directly within QGIS.
GHydraulics functions as a critical pipeline to EPANET, the industry-standard software for water distribution modeling. By integrating these tools, you can transform raw geospatial data into a functional, calibrated hydraulic model. Step 1: Prepare Your Geospatial Foundation
Before opening GHydraulics, your base GIS data must be clean, structured, and topologically correct. Hydraulic models are highly sensitive to geometric errors.
Fix Broken Topology: Ensure all water mains (lines) snap precisely to junctions, valves, and pumps (points). Overshoots or undershoots will cause the hydraulic simulation to fail.
Standardize Spatial Reference Systems (SRS): Use a projected coordinate system (like UTM) rather than a geographic one (like WGS84). This ensures that pipe lengths are automatically calculated in meters or feet rather than degrees.
Populate Attribute Tables: Ensure your layer tables include mandatory hydraulic fields. Pipes require diameters and roughness coefficients; junctions require baseline elevations. Step 2: Establish the GHydraulics Environment
Once your layers are prepped, initialize the GHydraulics environment to map your GIS layers to hydraulic components.
Install the Plugin: Navigate to Plugins > Manage and Install Plugins, search for GHydraulics, and install it.
Access the Toolbox: Open the GHydraulics panel or locate its functions within the QGIS Processing Toolbox.
Map the Layers: Use the GHydraulics configuration menu to link your QGIS layers to EPANET elements. Map your line layer to “Pipes” and your point layer to “Junctions.” Step 3: Automate Parameter Extractions
Manually entering elevations and pipe lengths is tedious and prone to human error. GHydraulics optimizes this workflow by automating data extraction.
Automate Pipe Lengths: GHydraulics can automatically calculate the geometric length of your QGIS lines and write them directly into the EPANET pipe length attribute field.
Extract Junction Elevations: Use a Digital Elevation Model (DEM) of your project area. Via QGIS processing tools (like Sample Raster Values), you can extract exact terrain elevations for every node and link them directly to your GHydraulics junction layer. Step 4: Export and Run the Simulation
GHydraulics compiles your geospatial data into an .inp file, which is the native file format for EPANET.
Run the Export Tool: Click the GHydraulics export button to generate the EPANET INP file.
Review Warnings: Look at the export log. GHydraulics will flag disconnected nodes, missing diameters, or unlinked pumps.
Execute in EPANET: Open the generated file in EPANET to run your steady-state or extended-period simulations. Analyze system pressures, flow velocities, and water age. Step 5: Post-Processing and Visualization
The optimization process isn’t finished until the data is visualized for decision-making.
Bring Results Back to QGIS: Import the simulation results back into QGIS.
Apply Advanced Symbology: Use QGIS’s graduated styling to color-code pipes by velocity or junctions by pressure. This instantly highlights problem areas, such as bottleneck pipes with excessive head loss or low-pressure zones during peak demand. Conclusion
Optimizing your QGIS modeling with GHydraulics eliminates double data entry and reduces geometric errors. By using QGIS as the central database and GHydraulics as the translator, engineering teams can build, test, and iterate water network designs faster and with greater accuracy. If you would like to expand this article,
Step-by-step SQL queries to clean attribute data before export.
Advanced visualization techniques using QGIS Rule-Based Symbology.