You are on page 1of 12

TECHNICAL PAPER Methodological approach for

Journal of the South African


Institution of Civil Engineering the compilation of a water
ISSN 1021-2019
Vol 62 No 4, December 2020, Pages 32–43, Paper 1023 distribution network model
LOUWRENS MULLER, Pr Tech Eng (ECSA),
Inc Eng (ECN), is currently employed by
using QGIS and EPANET
Burmeister and Partners Consulting Engineers
in Windhoek, Namibia. He graduated with an
MEng (Civil) degree from the Central A L Muller, O J Gericke, J P J Pietersen
University of Technology, Free State (CUT) in
2020 and has a special interest in reticulation
design and water resources management. He
has 12 years’ experience in the consulting engineering industry and has This paper presents the development of a methodological approach based on the integration
been involved in various multi-disciplinary projects. of free-of-charge open-source software, e.g. QGIS and EPANET, and engineering practices
Contact details:
applicable to water distribution network design. The use of QGIS and EPANET, as well as the
Department of Civil Engineering integration thereof with sound engineering practices and judgement, proved to be both viable
Faculty of Engineering, Built Environment and Information Technology and practical to enable practitioners to create a water distribution network model of an existing
Central University of Technology, Free State
network in smaller developments or towns. Typically, in the latter smaller developments or
Bloemfontein
South Africa towns, the professional cost associated with the additional time required when commercial
T: +264 61 379 005 licensed software is used, could be lower than the actual cost associated with the procurement
E: louwrensm00@gmail.com of the licensed software itself. Hence, the developed process flow diagrams will not only
potentially save time and money in comparison to a traditional, manual approach in EPANET,
PROF JACO GERICKE Pr Eng, IntPE (SA), is the
but will also provide guidance to practitioners and assist smaller municipalities in southern
Head of Department (Civil Engineering) at the
Central University of Technology, Free State. Africa facing challenges in terms of outdated records and budget constraints. It is envisaged
He obtained his PhD Eng (Agriculture) degree that the implementation of the overall methodology will contribute to improved water
from the University of KwaZulu-Natal in 2016 infrastructure planning, design and management, especially in the southern African context
and has more than 20 years’ professional and
where water resources are scarce and service delivery remains a pressing issue.
academic experience, mainly in the fields of
hydrology, water resources management and
river hydraulics. He has published a number of papers in the design
hydrology field and is currently involved in four research projects funded by INTRODUCTION 2013; Gama et al 2015; Ramana et al 2015;
the Water Research Commission.
Water resources management, plan- Georgescu et al 2016; Kara et al 2016; Shital
Contact details: ning and supply form an integral part of et al 2016). Detailed guidelines on the
Department of Civil Engineering
Faculty of Engineering, Built Environment and Information Technology
the functionality of water utilities (e.g. compilation of a WDN model from existing
Central University of Technology, Free State local authorities, municipalities and/ geographical information systems (GIS)
Bloemfontein or water boards) throughout the world and end-user data are generally not avail-
South Africa
(Ormsbee 2006). This is particularly the able, especially within the southern African
T: +27 51 507 3516
E: jgericke@cut.ac.za case in semi-arid and arid regions where context. According to Berardi et al (2014),
rainfall is low and water resources are data availability is a major issue in many
JACO PIETERSEN Pr Tech Eng is currently scarce. The use of computer modelling water utilities. Although some water utili-
employed by the Central University of systems for the simulation of water dis- ties have network data in GIS format, the
Technology, Free State (CUT). He graduated
tribution networks (WDNs) can aid water accuracy is not always acceptable, and
with B Tech Eng (Civil) and M Tech Eng (Civil)
degrees from the CUT and has a special utilities with the identification of problem some data is missing. In addition, the lack
interest in flood hydrology and water areas within a water supply system, as well of efficient decision-support systems, that
resources management. In addition to his ten as enable the planning processes required might exploit detailed information of the
years’ academic experience, he also worked
for the ever-changing urban landscape. WDN, further reduces the motivation for
at an internationally recognised civil engineering consultancy for five years.
He is currently studying towards a D Eng (Civil) degree at the CUT. Availability of data and the format in improving the accuracy of data collection
which the data is available, pose significant (Berardi et al 2014).
Contact details:
Department of Civil Engineering challenges to the effective management of Saminu et al (2013) and Shital et al
Faculty of Engineering, Built Environment and Information Technology WDNs. By developing a more standardised (2016) described the compilation of a
Central University of Technology, Free State method in which data can be stored, evalu- WDN model by manually entering the data
Bloemfontein
South Africa
ated and processed to enable the modelling into the EPANET interface. However, the
T: +27 51 507 3693 of a WDN, better management practices utilisation of different methods by means
E: jpietersen@cut.ac.za could be implemented, specifically within of which large data sets are processed
the Namibian and South African context. in QGIS, and subsequently exported to
Internationally, substantial research EPANET, have not been fully implemented
has been published on the relevance and in a single study or method (Salmivirta
Keywords: EPANET, GHydraulics, GIS, QGIS, Voronoi polygons, applicability of WDN models implemented 2015). The use of a transitional package, i.e.
water ‑distribution network using EPANET software (Saminu et al plugin, to convert GIS data into EPANET

Muller AL, Gericke OJ, Pietersen JPJ. Methodological approach for the compilation of a water distribution network model using QGIS and EPANET.
32 J. S. Afr. Inst. Civ. Eng. 2020:62(4), Art. #1023, 12 pages. http://dx.doi.org/10.17159/2309-8775/2020/v62n4a4
readable file formats may be required.
Advances in open-source software have
resulted in the development of numerous
such add-in/plugin packages for a wide
range of applications within QGIS. Most
of these add-ins in the public domain are
made available free-of-charge and are
frequently updated. Therefore, it is neces-
sary to realise that the development of new
WDN modelling tools is an on-going pro-
cess that evolves on an almost daily basis
along with advances in technology.
Despite the availability of all these add-
in packages and tools currently available
in QGIS, no comprehensive methodology
for the development of a WDN model
based on existing GIS data is available.
Methodologies that do exist, e.g. Saminu
et al (2013) and Shital et al (2016), do not
address the extensive acquisition and/or
processing of data and the tedious develop-
ment of a WDN model. In essence, the
acquisition of the required data sets may in
some cases even prove to be a more tedious
exercise than the compilation of the WDN
model itself. Unavailability of data and the
lack of record-keeping by water utilities are
some of the factors that further complicate
the practitioner’s task of compiling a
WDN model.
Based on the shortcomings discussed
above, the need for a methodological
approach is highlighted and justified.
Such a methodological approach should
enable practitioners to process large
amounts of data and perform topological
analyses on GIS-based feature classes, to
ultimately create a representative WDN
model. Hence, the primary objective of this
study is to develop such a methodological Figure 1 W
 ater supply schemes to Swakopmund (Christelis & Struckmeier 2011)
approach based on the integration of free-
of-charge open-source software, e.g. QGIS WDN models for any development or 2015). The topography enables the distri-
and EPANET, and engineering practices town should therefore no longer be seen bution of water by means of gravity feed
associated with water distribution network as a tedious exercise, due to the advances for the greater part of the town, with a
design. Since the proposed methodologi- in GIS software to process large data pressure tower and booster pumps for
cal approach would enable practitioners sets, provided that the data sets are up the higher-lying areas in the network.
to create a water distribution network to date and well maintained. A summary Essentially, the coastal towns of Walvis
model of an existing network in smaller of the study area is contained in the next Bay, Swakopmund and Henties Bay are
developments or towns, the professional section, followed by a description of the supplied with fresh water from the Central
cost associated with the additional time methodologies adopted and the results Namib Water Supply Scheme based at
required when commercially licensed obtained. This is followed by the discussion Swakopmund. The scheme is managed
software is used, could be lower than the and conclusions. by NamWater and abstracts groundwater
actual cost associated with the procure- from wellfields in the Omaruru and Kuiseb
ment of the licensed software itself. Hence, Rivers, which are the nearest sources of
the developed process flow diagrams will STUDY AREA potable water to the towns (Christelis
not only potentially save time and money Swakopmund is located on the western & Struckmeier 2011). A vast array of
in comparison to a traditional, manual coastline of Namibia in the Namib Desert consumers are served by the WDN of
approach in EPANET, but it will also in southwestern Africa. The elevations Swakopmund and the analyses conducted
provide guidance to practitioners and assist within the town range from 45 m above in this study are based on information
smaller municipalities in southern Africa. mean sea level to 0 m at the shore (USGS from approximately 8 920 water meters

Journal of the South African Institution of Civil Engineering  Volume 62  Number 4  December 2020 33
used to monitor water consumption on a
continuous basis. The details pertaining to
Wdn compilation methodology
the water supply schemes to Swakopmund
are shown in Figure 1. Shortfalls in the
water supply capabilities at the NamWater Data acquisition Data processing
wellfields are supplemented by desalinated
QQ Consumption figures QQ Data verification
water from the Orano (previously known QQ Elevation data QQ Filling of gaps in data
as Areva) desalination plant. The lat- QQ Cadastral data QQ Topology verification
ter shortfall in water supply, especially QQ Pipe network data QQ Validation of data
surface water, could be ascribed to the QQ Network connectivity QQ Allocate friction factor values to vector line entities
QQ Reservoir data in the attribute table based on pipe material
fact that Namibia is an arid country, with QQ Pump data QQ Compilation of export data sets to EPANET
the mean annual precipitation (MAP) QQ Processing and analysis in EPANET
of Swakopmund being less than 50 mm
(Mendelsohn et al 2003). Hence, with no or
limited fresh surface water sources, the low Figure 2 O
 verview of the WDN compilation methodology
MAP further exacerbates the challenges
faced by the Swakopmund Municipality in QQ Data acquisition – inclusive of con- WDN model. Typically, information was
terms of assurance of water supply. sumption figures, network connectivity obtained from client records (as-built draw-
and elevation, and cadastral, pipe net- ings, GIS data sets, computer aided design
work, reservoir and pump data sets. (CAD) drawings and hard copies of archived
METHODOLOGY AND RESULTS QQ Data processing – inclusive of data drawings), client representatives (mainte-
The methodology described in this section verification, filling of gaps, topology nance personnel, operators and manag-
provides an overview of the processes that verification, data validation, allocation ers), field surveys and in some instances
were followed, whilst the results are pre- of friction factors, the compilation of aerial imagery for above-ground pipes.
sented directly thereafter to highlight the EPANET data sets, and the subsequent Fortunately, with the advent of GIS, data
exact nature and sequence of activities and processing and analysis thereof. is nowadays better structured, maintained
the corresponding results. and stored by the municipality. However,
Data acquisition in some cases alternative data sources
Methodological framework Spatial data pertained to the location were used in the absence of primary data.
The methodological framework developed of pipelines, demand nodes and supply Innovative thinking and sound engineering
consists of process flow diagrams which nodes (e.g. reservoirs and tanks) form the judgement need to be demonstrated by any
could serve as a practitioners’ guideline to backbone of any WDN model. During the practitioner in cases where data sources are
integrate open-source software and engi- compilation of a WDN model, comprehen- either incomplete or unsuitable. For exam-
neering practices when WDN models of sive data collection of the above-mentioned ple, historical aerial imagery may indicate a
an existing network need to be compiled. components is of high importance (Gama et pipeline trench route during construction,
Typically, the framework is inclusive of the al 2015). In this study, various data sources while hand-held GPS devices can be used
following key processes (Figure 2): were identified to compile the Swakopmund to pin site features such as valves, hydrants,

Table 1 S ummary of the preferred (primary) and secondary data sources for the compilation of a WDN (Muller 2020)
Data set Primary source(s) Secondary source(s) Other
QQ Derived consumptions based on zoning
Consumption and design norms Aerial photography to determine the zoning
Consumer billing records
figures QQ Municipal bulk meter readings in category
conjunction with design norms

Demand-time Recorded flow metering at strategic points Combination of peak demand factors from
Peak demand factors as per design norms
patterns in the network, i.e. flow logging design norms and engineering judgement

QQ Detailed survey data


Elevation data SRTM data (USGS) 1:50 000 Topographical maps
QQ Aerial survey data

QQ Municipal records
Cadastral data Aerial photography
QQ SG records

QQ Municipal records QQ Site survey data, e.g. position of valves,


Pipe network QQ As-built data hydrants, etc
data QQ Local knowledge QQ Underground surveys
QQ Detailed survey data QQ Field measurements
Reservoir data QQ Municipal records QQ Aerial photography
QQ As-built data
QQ Municipal records
Pump data QQ Site observations
QQ Data collection

34 Volume 62  Number 4  December 2020  Journal of the South African Institution of Civil Engineering
pipeline routes, etc, after which, the data SRTM data can be downloaded in a can either be closing clockwise or counter-
can be digitised and processed for further GeoTiff format which consists of a raster clockwise, making it difficult to determine
use. A summary of the preferred (primary) with associated numerical values, i.e. eleva- whether a critical zone valve is closed or
and secondary data sources used in this tions, allocated to all cells. The 1:50 000 opened. Especially older isolating valves do
study to compile a WDN model, is listed in topographical maps can be obtained from not have appropriate markings that indi-
Table 1. the Surveyor-General (SG) in raster format. cate the closing direction of the spindle,
It is important to note that special care Contour data from the 1:50 000 topograph- making the determination of their ‘open’
should be taken to ensure that all data ical maps should be converted to vectors or ‘closed’ status a tedious exercise. As an
sets and information received from the by tracing the contour lines with polylines, initial approach for the compilation of the
municipality are stored separately from whereafter the process as described for WDN model, an ‘all-valves-open’ approach
all working files. This measure serves to the creation of a digital elevation model was followed for all pipes, except where the
prevent corruption or alteration of source (DEM) from contour lines can be followed. status of the valves in the network could
data during processing. The use of revi- In South Africa the National Geospatial be confirmed. It is proposed that a similar
sion numbers and unambiguous file name Information (NGI) provides digital contour approach should be followed initially when
allocations for new or processed files will data, 1:50 000 topographical maps in vec- new WDN models are compiled, after
prevent the loss of data and the use of tor format, as well as digital terrain model which the identification of closed valves
incorrect or outdated data for processing (DTM) data files. The digitising of contours and pressure zones may be done as part of
and analysis purposes. to generate a DTM or DEM should only the calibration of the WDN model.
be considered as the last resort, since the All line features representing pipelines
Consumption figures process is regarded as inaccurate. were defined by only two vertices, as the
Account data comprising historical water linking of nodes and line features during
consumption should be available from Pipe network data later stages of the model development
the Financial Department of a water Skeletonisation refers to the process of iden- depended on lines being defined as such.
utility if no data is available from the tifying selected pipes within a WDN that The Explode Lines geo-algorithm in the
Engineering Department. These data sets are deemed to have the greatest importance Processing Toolbox was used for the crea-
were processed using Microsoft Excel, and which need to be included in a WDN tion of single-line features from polylines
and any redundant columns containing model (Mays 2000). The latter process that originated from the data as received
administrative data (i.e. name of owner, largely involves a significant amount of engi- from the municipality. The aforementioned
street address and property valuation) were neering judgement to determine which pipes geo-algorithm creates a new vector layer
discarded in cases where it would not be and/or components are to be included and/ in which each line of the original layer is
required at a later stage. In GIS, the ‘tabular or excluded from a WDN model. Typically, replaced by a set of lines, representing the
joins’ function was used to facilitate the the pipe network data includes GIS shape- segments in the original line. Although
linking of spatial data sets (i.e. shapefiles) files, CAD drawings, scanned as-built EPANET is capable of processing polylines,
and non-spatial table formats, i.e. comma drawings (raster images) and field drawings. the creation of denser Voronoi polygons
separated values (CSV) and database file Where uncertainty existed regarding the (due to an increased number of nodes)
(DBF), provided that there was at least one accuracy of the data, or where there was is more beneficial during the allocation
unique corresponding column in each of contradictive data for certain pipe sections, of demands to the WDN. A preliminary
the data sets. For example, if meter read- field surveys were conducted. check for duplicate entities was done prior
ings are available without GPS coordinates, Network connectivity remained a chal- to commencing with data processing.
the probability is high that erf numbers are lenge for the case study area. Due to the
present in one of the reference columns of age of the infrastructure in the town, the Reservoir data
the data received from the water utility. Erf data from the layouts resulted in numerous The Engineering Department of any
numbers, in turn, are normally associated crossing lines representing pipelines. Where municipality or water utility should be
with projected and coordinated cadastral crossing lines were encountered, uncertainty able to provide the relevant information
shapefiles. By making use of the erf num- arose as to whether these pipelines are con- pertaining to the elevation data and storage
bers as common join field, the consump- nected by a crossing piece, two tee pieces capacities of reservoirs. Typical elevation
tion figures can be linked to the shapefile. or whether there is any connection at all. In levels that are of significance include the
cases where as-built drawings did not clearly full storage level (FSL), floor level (FL) and
Elevation and cadastral data indicate connections between crossing pipes normal service level (NSL). In the event that
Both the elevation and cadastral data of varying diameter, the pipelines were the aforementioned data is not available,
were obtained from the Swakopmund regarded as separate lines. The probability physical measurements can be conducted
Municipality. In some cases, elevation data that crossing pipes of equal diameter were on-site by using conventional methods.
may not be as readily available from the connected was considered high, and these
water utility as expected. Suitable alterna- pipes were modelled accordingly, while the Pump station data
tive sources for elevation data include 1-arc contrary was true for pipes varying signifi- Pump stations in a WDN are largely lim-
second Shuttle Radar and Topography cantly in diameter. ited to booster pump stations and lifting
Mission (SRTM) data from the United The status of isolation valves in the pump stations that supply elevated tanks.
States Geological Survey (USGS), 1:50 000 network, albeit open or closed, may have The pump data used is based on site visits,
topographical maps, or topographical a notable impact on pressures and flow performance criteria provided by the sup-
surveys by means of conventional methods. velocities in the WDN. Isolating valves pliers and actual recordings.

Journal of the South African Institution of Civil Engineering  Volume 62  Number 4  December 2020 35
Data processing
Upon receiving all the data from the vari-
ous sources, as mentioned above, the next
step was to verify the data and conduct
cross-checks between data sources where
possible. Under ideal circumstances it would
be preferable to have multiple data sources
which support each other; however, this is
seldom the case. For Swakopmund, an as-
built database of approximately 28 drawings
was georeferenced. The georeferenced draw- Figure 3 T opology Checker plugin
ings enabled cross-checking of the CAD and
GIS data, which proved to be quite accurate to attribute data and the missing data was that no data was lost in the process. Ill-
for the majority of the WDN in cases where represented visually in QGIS. connected features were identified during
as-built drawings were available. the application of the ‘must not have dan-
Topology verification gles’ rule. The latter identified lines were
Setup of attribute tables and Topology describes the relationships typically not connected to other lines at
verification of attribute data between points, lines and polygons that both ends. In some instances, the dangles
The digitising and conversion of data into represent the features of a geographical were representative of the on-site pipeline
shapefiles commenced after all the data region (QGIS Development Team 2016). The network where single lines terminate at the
had been acquired and verified. During relationship between features proved to be properties of end users, thus not forming
this step, special care was taken to ensure a crucial point of interest, which required part of a ring-feed supply. For the remain-
that the spatial projection of the data was significant attention. Problems regarding ing dangles which were identified, the lines
correct, as all further measurements would topology included duplicate records (both were edited graphically and connected
be dependent thereon. In Namibia, the for pipes and metered data), short pipe as required.
Transverse Mercator projection is used sections, i.e. less than 1 m in length, and ill- The topology of the point file contain-
with the Schwarzeck Datum, while it is not connected lines. Most of the latter instances ing the average consumption figures was
uncommon to encounter data sets using could be ascribed directly to bad draughting evaluated by applying the same rules as
the WGS 84 Datum (Mugnier 2006). In practice during the initial digitising of the used for the line features, except for the
the latter instance it may be necessary to water network drawings. ‘must not have dangles’ rule. Pipelines
apply x and y constants, depending on the In cases where different pipelines did with a length attribute of less than 1 m
source of the data. Open-source data sets not converge at their start or end vertices, were regarded as redundant features. The
may be in geographical (latitude/longitude) the connectivity between the pipes could practical analysis of such short sections of
projection, which in turn needs to be not be accurately exported to EPANET, pipe was not deemed viable; hence, the data
projected and transformed to correspond which ultimately resulted in errors during was filtered to indicate these sections and
with the specific projection and associ- the initial analysis. In addition, duplicate rather combine them into single segments
ated datum under consideration to enable features would also result in erroneous with the longer adjoining pipeline features.
any geometry calculations. Depending on connectivity between entities exported to
the requirements of the water utility and EPANET. On the other hand, if duplicate Validation of processed data
the extent and nature of the project, the pipes were exported and did not register as Subject to the compilation of the data sets
number of and details contained in the errors during the analysis, inaccurate flow containing the WDN data, the data was
initial attribute fields may vary. Attribute and pressure results would be modelled due circulated to the municipal representatives
fields should at least contain the length and to the flow being split between two pipes of in the Technical and GIS Departments
diameter of the pipes, along with a unique the same diameter and length. for comment. The data was presented in
identification number (ID). As for metered data represented by a drawing format and comments thereon
point shapefile, duplicate features would were received. Typical inputs from the
Filling of gaps in data cause an increase in point demand values; Swakopmund Municipality included infor-
Further verification of attribute data entailed hence, an increase in flow and head loss. mation on pipelines that had been decom-
the verification between data sources and A challenge posed by duplicate records/ missioned, new pipelines that were installed,
the contents of the attribute data table, i.e. features is that it cannot easily be identified but that were not digitised and included
pipe diameters in the line vector shapefile visually. The ‘must not have dangles’, ‘must in the GIS database, and clarification on
representing the pipelines should be the not have duplicates’ and ‘must not have connectivity where bulk mains and reticula-
same as the diameter and material as indi- invalid geometries’ rules were applied in tion mains crossed. The distribution and
cated on the georeferenced drawings. With the Topology Checker plugin (Figure 3) to updating of data were done over a period
the attribute tables compiled for the various conduct the topology verification for the of approximately one month, with updated
vector features, columns were sorted, and line vector layers. information being redistributed to repre-
empty data fields were identified. Attribute All duplicate line features were listed in sentatives for further comments. The meet-
data fields were sorted numerically to the ‘Error’ field after the application of the ings held with the team of representatives
identify which features lacked attribute data. ‘must not have duplicates’ rule. Duplicate from the municipality and the use of visual
Alternatively, ‘Styles’ were applied according entities were deleted carefully to ensure aids, e.g. a digital data projector to highlight

36 Volume 62  Number 4  December 2020  Journal of the South African Institution of Civil Engineering
Compilation of data sets for EPANET
The correct setup of attribute fields was
aTTRIBUTE FIELDS FOR EXPORTATION TO epanet
fundamental in the compilation of the
data sets prior to export to EPANET using
Line features (pipes)
the GHydraulics plugin. Despite some
of the automated features built into the
QQ ‘DC_ID’ which contains the pipe’s unique ID reference GHydraulics plugin, a manual approach
QQ ‘LENGTH’ based on the measured geographical length was followed in addition to ensure that the
QQ ‘NODE1’ indicating the start node of the line feature
QQ ‘NODE2’ indicating the end node of the line feature
topology of the exported data was correct,
QQ ‘DIAMETER’ specifying the diameter of the pipe in millimetres especially with regard to junction creation
QQ ‘ROUGHNESS’ according to the pipe material’s friction factor and friction formula applied and connectivity with line features. The
(millimetres for Darcy-Weisbach equation and unitless for the Hazen-Williams equation) required attribute fields for exportation to
QQ ‘MINORLOSS’ showing the minor loss coefficient for bends, tees, etc. located on the line
segment EPANET are listed in Figure 4.
QQ ‘STATUS’ which serves as a function to simulate shut-off valves which can either be set
to ‘Closed’ or ‘Open’ QGIS compilation of a WDN model
QQ ‘START_X’ containing the value of the x-coordinate of the first node of the line feature
This section describes the use of QGIS
(generated by ‘$xat(0)’ python command)
QQ ‘START_Y’ containing the value pf the y-coordinate of the first node of the line feature to compile input data sets for WDN
(generated by ‘$yat(0)’ python command) modelling in EPANET. A brief overview
QQ ‘START_CRD’ containing a combination of the ‘START_X’ and ‘START_Y‘ fields of the setup of project parameters within
QQ ‘END_X‘ containing the value of the x-coordinate of the first node of the line feature
(generated by ‘$xat(1)’ python command) EPANET is also provided.
QQ ‘END_Y‘ containing the value of the y-coordinate of the first node of the line feature
(generated by ‘$yat(1)’ python command) Elevation data
QQ ‘END_CRD‘ containing a combination of the ‘START_X‘ and ‘START_Y‘ fields
Contour data for Swakopmund was sup-
plied by the municipality from their GIS
Point features (junctions)
database. The contours were generated
from a grid aerial survey which was con-
QQ ‘DC_ID’ which contains the junction’s unique ID reference ducted simultaneously with the aerial pho-
QQ ‘NODE’ indicating the node name, typically consisting of the prefix (i.e. ‘J’) and the tography of the town. A DEM was created
unique ID reference (i.e. ‘J1987’)
QQ ‘ELEVATION‘ specifying the elevation of the node
from the contour shapefile. The following
QQ ‘X‘ containing the value of the x-coordinate of the point feature (generated by ‘$x‘ steps were followed during the creation of
python command) the DEM:
QQ ‘Y‘ containing the value of the y-coordinate of the point feature (generated by ‘$y‘ a. Contour lines were split into separate
python command)
QQ ‘CRD’ containing a combination of the ‘X‘ and ‘Y‘ fields line segments by distance. The V.split.
length geo-algorithm splits vector
lines into shorter segments using a
Figure 4 A
 ttribute fields for exportation to EPANET maximum specified distance between
nodes. The resulting length of all seg-
ments is expected to be equal and not
longer than the given length parameter.
Normally 10 m lengths should be suf-
ficient, depending on the processing
capabilities of the computer being used.
b. Nodes were extracted from lines using
the Extract Nodes geo-algorithm, which
uses a line or polygon layer to generate a
point layer with points representing the
nodes in the input lines or polygons.
c. Bearing in mind that the start and end
vertices of the different line segments
Figure 5 A
 dd Raster Values to Points geo-algorithm overlap, duplicate points were created by
the Extract Nodes geo-algorithm. The
the WDN features, yielded much quicker C-factor of 140, which is a common value latter duplication was removed by using
results, since the updating of attribute fields between asbestos cement (AC) and unplas- the Delete Duplicate Geometries geo-
and connectivity of the features could be ticised polyvinyl chloride (uPVC) pipes algorithm. In other words, duplicated
resolved immediately. (Mays 2000). Further calibration, especially geometries are identified and removed
in terms of friction factors, was done at a without considering their attributes.
Allocation of friction factors later stage, since the initial HW C-factor Hence, in cases where two features have
to vector line entities of 140 was deemed to be too high and identical geometries but different attrib-
Friction factors were allocated based on secondary losses would therefore not be utes, only one of them will be added to
a representative Hazen-Williams (HW) accounted for sufficiently. the resultant layer.

Journal of the South African Institution of Civil Engineering  Volume 62  Number 4  December 2020 37
d. The final step in the compilation of the
DEM was completed by using the SAGA
Nearest Neighbour geo-algorithm.
The Add Raster Values to Points geo-­
algorithm (Figure 5 on page 37) was used
to extract data from the specified raster
(DEM) layer and to add attributes from the
DEM to a selected point file (junctions).
Consequently, the geo-algorithm creates
a new point layer based on the sampling
points’ positions and the attributes
extrapo­lated from the underlying raster
cells. In using such an approach, elevation
values from GeoTiff or other elevation
data files in raster format can typically be
applied to the nodes within a WDN model.

Creation of junctions Figure 6 I nput fields applicable to the Voronoi polygons geo-algorithm
Junctions were created by converting
polyline vertices to points using the

–69000
Convert Polygon/Line Vertices to Points Legend
N
Junctions (WDN Nodes)
geo-algorithm. The resultant point
Voronoi polygons
shapefile consisted of numerous duplicate
features which were deleted. Attribute
fields as per Figure 4 were allocated to the

–70000
point features representative of junctions
in the WDN model. All the attribute fields
containing numerical values were entered
as such to have a ‘precision’ of up to 4
decimal places.

–71000
Linking start and end nodes
with line attribute data
The ‘START_CRD’, ‘END_CRD’ and ‘CRD’

–72000
fields (cf. Figure 4) provided common
join fields between the line features layer
and the junctions layer. After selecting
the properties menu of the line features
shapefile, a join was created between the

–73000
‘START_CRD’ attribute field of the line fea-
tures shapefile and the ‘CRD’ attribute field
of the point shapefile. The corresponding
‘DC_ID’ attributes were then copied to the
‘NODE1’ attribute field. The process was
–74000

repeated for the ‘END_CRD’ attribute join


as well, and the corresponding ‘DC_ID’
attributes were populated to the ‘NODE2’
attribute field.
–75000

Creation of Voronoi polygons


from network nodes
Voronoi polygons were created by using
the junctions’ layer as input layer to
–76000

obtain areas of representative demands Compiled by: AL Muller


Date: September 2019
which could be allocated to the junctions. Source: Swakopmund Municipality GIS Department

Figure 6 represents the various input 0 500 1000 1500 2000 2500 m
fields to be completed for the Voronoi
Transverse Mercator, Schwarzeck L022/15, Namibia
polygons function. The created layer was
–49000 –48000 –47000 –46000 –45000 –44000
renamed and saved as a separate polygon
shapefile. The validity of the created Figure 7 L ayout of the Voronoi polygons from junctions (Muller 2020)

38 Volume 62  Number 4  December 2020  Journal of the South African Institution of Civil Engineering
that the attribute summary setting must

–69000
Legend be set to: ‘Take summary of intersecting
N
Voronoi polygons
features’; otherwise the consumption
Swakopmund Water Meter Points
figures would not be inclusive of all records
contained within a Voronoi cell, but would
only include the value of the first data

–70000
record encountered. Statistics for summary
settings were required to be set to ‘SUM’,
since the total sum of the consumption
figures per Voronoi cell is required. The
‘Joined Table’ setting was also selected to

–71000
keep all records, including non-matching
target records, especially in cases where
a Voronoi polygon may not contain any
consumption figures covered by its area. A

–72000
resultant layer was also created which con-
tains the original Voronoi polygon features
and the sum of the consumption figures
located within each polygon area.

–73000
Addition of consumption figures to nodes
A common attribute field, i.e. DC_ID,
exists between the Voronoi polygon and
point shapefiles. Hence, the common
attribute field was also transferred to the

–74000
joined layer to link the consumption fig-
ures to the junctions as shown in Figure 9.
At this point, special care was taken to
ensure that the consumption figures’
units were correct, i.e. litres per second.
–75000

Other units may be used, but it should be


noted that the setup of the project defaults
within EPANET has to align with the unit
values allocated during this step. For the
–76000

Compiled by: AL Muller Swakopmund data set, the average annual


Date: September 2019
Source: Swakopmund Municipality GIS Department daily demand (AADD; kℓ/day) figures
0 500 1000 1500 2000 2500 m were multiplied by a 1 000 and divided
by 86 400, resulting in demand values
Transverse Mercator, Schwarzeck L022/15, Namibia
in litres per second. The calculation was
–49000 –48000 –47000 –46000 –45000 –44000
done during the transfer of the attribute
Figure 8 M
 etering points contained within each Voronoi polygon (Muller 2020) values from the joined attribute column to
the junctions’ demand attribute column.
layer, i.e. intersections, closed holes, and An average consumption figure associ- An expression was compiled using the
fix node ordering, was verified with the ated with each water meter (represented expression dialog for the calculation of
Check Geometry Validity geo-algorithm. by a point in the vector point file) was attribute values.
No errors or validity issues were identified assigned to a specific attribute field in the With reference to Figure 9, it is impor-
during the analysis. However, should such ‘Swakopmund Water Meter Points’ point tant to note that the ‘sumCONSUMPTIO’
errors occur, a systematic approach needs shapefile as shown in Figure 8. field refers to the sum of all the AADDs
to be followed by the visual inspection of The Join Attributes by Location of the demand nodes located within a
each geometry issue and correcting the geo-algorithm was used to combine the Voronoi polygon.
geometries accordingly. The Voronoi poly- consumption figures from the individual
gons applicable to the study area are shown points into a single value for each Voronoi Exportation of data using
in Figure 7. polygon. The Voronoi polygon shapefile the GHydraulics plugin
created from the junctions and the point All the fields that were required for the
Adding consumption figures file containing the consumption data were successful exportation of information were
to Voronoi polygons set as the target vector layer and the join populated and the associated shapefiles
The point file associated with the con- vector layer, respectively. The geometric were created. By selecting the settings tab
sumption figures of each water meter was predicate was set to include all points that under the GHydraulics menu as shown in
overlaid in the GIS model. All these points are contained within the polygon areas of Figure 10, the relevant shapefile layers were
are located within the Voronoi polygons. the Voronoi layer. It is important to note allocated to the correct predetermined

Journal of the South African Institution of Civil Engineering  Volume 62  Number 4  December 2020 39
fields within the GHydraulics plugin. No
reservoirs, pumps, tanks, etc, were added
to the GIS database for export to EPANET.
For smaller networks, inputs can be made
to run the analysis within QGIS using
EPANET as analysis engine. However,
troubleshooting using the latter method
becomes difficult when compared to the
clear error messages generated within the
EPANET interface.
The Darcy-Weisbach (litres per sec-
ond) template was exported, due to the
fact that the demands allocated to the
individual junctions were in litres per
second. Although the friction factor was
specified for the Hazen-Williams equation,
the Darcy-Weisbach template was used
for exportation purposes. The required
adjustments to the head loss equation were
implemented in EPANET.

WDN model setup in EPANET


The hydraulic analysis of the WDN was
done by means of EPANET. It was pre- Figure 9 V
 ector join settings for linking consumption figures to junctions
ferred to conduct all hydraulic analyses
using only the EPANET software to mini-
mise risks of instability where EPANET is
used in the background as analysis engine.
As the software develops in the future, it
may be more feasible to conduct analyses
within the QGIS environment; however,
the functionality of the GHydraulics plugin
did not lend itself towards the full scope of
the analysis, especially in terms of demand
patterns and peak factors.
Figure 10 M
 enu for the multiple GHydraulics commands
Demand patterns
Time-based demand patterns based on be in ‘litres per second’ and the head loss corrective measures were proposed as set
a variable daily consumption can be formula was set to ‘H-W’ for the Hazen- out in the preparatory steps described in
activated in EPANET. These patterns can Williams equation. the previous sections. In essence, error
either be based on actual recorded diurnal identification and verification became an
patterns obtained during flow logging EPANET analysis iterative process of correcting identified
within the WDN, or it could be based on The preceding steps enabled and culmi- errors in the GIS shapefile, exporting
theoretical data. nated into the actual hydraulic modelling data to EPANET, setting up the EPANET
analysis being performed in EPANET. parameters, and data analysis. The error
Hydraulic project parameters According to Rossman (2000), as sum- verification process continued until a suc-
Firstly, the applicable reservoir data was marised below, EPANET will issue spe- cessful performance of the WDN model
entered into EPANET at the appropriate cific ‘Error and Warning’ messages when was achieved.
locations within the model, and subsequent problems are encountered in performing a After several rounds of editing of the
components such as valves, control valves hydraulic modelling analysis: GIS data, exporting of the data to EPANET,
and pumps were added as well. By m ­ aking a. Pumps cannot deliver the flow or head and repeating the analysis, errors regarding
use of the ‘Darcy-Weisbach litres per b. Network is disconnected connectivity became less abundant, and
second’ template within the GHydraulics c. Negative pressures exist corrections were made within EPANET.
plugin, the hydraulic project parameters d. System unbalanced However, it is important to emphasise that
were set up automatically. The GHydraulics e. Hydraulic equations are unsolvable, i.e. all changes to the EPANET model were
plugin does not have a standard template numerically unstable. duplicated in the GIS shapefile to maintain
for the Hazen-Williams equation in The most common error encountered dur- an identical representation of the WDN
combination with the ‘litres per second’ ing the setup of the Swakopmund EPANET in both the GIS and EPANET models.
flow units. Upon accessing the INP-file in WDN model was associated with network The aforementioned process would apply
EPANET, the flow units were confirmed to connectivity. From these identified errors, to minor changes to individual pipes or

40 Volume 62  Number 4  December 2020  Journal of the South African Institution of Civil Engineering
Data Acquisition Consumption figures

Metered data available


QQ Obtain meter readings from municipality

QQ Calculate average consumptions for individual consumers

QQ Link consumption with location data either by:

– GPS coordinates from meter reading database


– Use erf number link with cadastral data
Elevation data No metered data available
QQ Erven information from Town Planning Department

QQ Calculate demands based on zoning category


QQ Contour data
QQ Confirm whether bulk meter data is available to compare with demand calculations based
QQ If no contour data is available from
municipal records the following on zoning category
QQ Use aerial photography for identification of zoning:
sources can be considered:
– 1-arc second SRTM data from – Industrial areas
USGS – Shopping centres/businesses
– 1:50 000 topographical maps – Institutional buildings
– Physical surveys – Residential erven

Pipe network data

Cadastral data As-built drawings


QQ GIS files and/or electronic drawings

QQ Scanned hard copy drawings


QQ Town Planning Department
QQ Georeferenced and scanned drawings digitised in GIS
QQ Surveyor-General
QQ Aerial photography Other sources
QQ Field surveys

QQ Local knowledge and information obtained from technical staff

Network connectivity Pump data

QQ ‘All-valves-open’ approach except for confirmed closed system valves QQ Obtain pump data from relevant sources
QQ Record of decommissioned pipes (to be confirmed by technical staff) QQ Field verification of pump data
QQ Crossing pipes should be resolved by: QQ Physical testing of pumping equipment (where practical)
– Referencing to as-built data sources
– Obtaining data from technical staff
– Field surveys of current network status (especially bulk pipelines)

Reservoir data

Data available
QQ FSL, FL and NSL

No data
QQ Field surveys

Figure 11 D
 ata acquisition flow diagram (Muller 2020)

nodes, as the setup of hydraulic param- and EPANET models are representative of the processing and analysis of all the data
eters and other EPANET functions will the actual on-site conditions. were accomplished by integrating QGIS
not be required. In cases where concerns and EPANET, whilst recognising standard
regarding the practicality and the danger engineering practices associated with water
of ‘duplication’ using the aforementioned DISCUSSION distribution network design. However,
procedure exist, it is recommended that all In this paper, methodological procedures consideration was given to the fact that the
changes be limited to the GIS model and were described to enable the effective inte- context and specific needs of water utilities
the resulting data should subsequently be gration of QGIS and EPANET. Based on may differ and that all the data sets might
exported to EPANET. Such an approach the methodology adopted and the results not be as readily available as in the case of
will ensure identical data sets being used in obtained, summative guidelines in the the study area.
both the GIS and EPANET environment. form of process flow diagrams as part of a QGIS software containing improved fea-
In terms of updating the GIS and hydraulic methodological framework are presented in tures and processing capabilities is released
models upon the installation of new pipes Figures 11 and 12, respectively. on a frequent basis, e.g. QGIS Version 3.8.2
or decommissioning or upgrading of It is evident from these figures that the ‘Zanzibar’ (August 2019) and QGIS Version
existing pipelines, similar procedures are two key processes, i.e. data acquisition and 3.10 ‘A Coruña’ (November 2019). Amongst
recommended to ensure that both the GIS data processing, were achieved. In essence, the plugins that were developed for the

Journal of the South African Institution of Civil Engineering  Volume 62  Number 4  December 2020 41
Data processing Data verification

QQ Use multiple sources as reference


QQ Set up attribute tables and verify initial attribute data
QQ Initial pipe attribute fields:
– ID
– Length
Filling of gaps in data – Diameter
– Friction factor
QQ Optional fields:
QQ Identify all missing records by sorting attribute table columns
– Material
numerically or alphabetically in GIS
– Year of installation
QQ Apply standard engineering principles where data is missing:
– Any other information applicable
– Continuation of 110 mmØ line for a ring feed
– If Pipes 1 and 3 are connected by Pipe 2 and the diameter of
1 = 3, it is logical that 2 should also = 1 and 3
– If all surrounding and connecting pipes are of equal diameter,
it can be assumed that the missing pipe information should
be equal to that of the surrounding diameters
– Obtain input from technical staff Topology verification

QQ Remove duplicate records for pipes as for metered data


QQ Apply a filter to identify all sections of pipe less than 1 m in
length and update network connectivity
QQ Join ‘ill-connected’ pipelines where the start or end vertices do
not coincide
Validation of data

QQ Supply layout drawing with processed network data to


municipality for verification and comment Allocate friction factor values to vector line entities
QQ Update GIS information (if required) in the attribute table based on pipe material
QQ Repeat process until satisfactory results are obtained

Compilation of export data sets to EPANET

QQ Setup of required attribute fields (line features – pipes)


QQ Create nodes at line vertices and then delete duplicate nodes
EPANET which were generated due to overlapping start and end
vertices of line features
Project parameter setup QQ Setup of required attribute fields (point features – junctions)
QQ Head loss formula QQ Link the start and end nodes with line attribute data using a
QQ Units join between the line and point features’ coordinate columns
QQ Time patterns QQ Create Voronoi polygons from network nodes and verify the
QQ Reservoir data layer validity; correct any issues prior to continuing
QQ Pump data QQ Use the sum of all consumptions (consumption data point file)
within the created Voronoi polygons and apply as attributes for
Hydraulic modelling analysis Voronoi polygons
Perform error checking and if any changes are required QQ Apply the attributes from the sum of the cosumptions within
to spatial data (i.e. data originating from GIS), the changes the Voronoi polygons to the network nodes – with this the
should either be applied: demand is allocated, but ensure the correct use of units
QQ In both the spatial GIS data set and the EPANET model
QQ Export the data using the GHydraulics plugin
QQ In the spatial GIS data set and exported to EPANET

Figure 12 D
 ata processing flow diagram (Muller 2020)

latter versions, the QEPANET plugin exhib- consultation fees for the development of a addition, the development of standard
its similar functionalities as the GHydraulics WDN model based on various parameters guidelines stipulating the minimum require-
plugin used in this study. Hence, it is recom- such as: (i) WDN size and area, (ii) data avail- ments (level of detail and methodology) of a
mended that the improved functionalities of ability, (iii) length of pipes in the network, completed WDN model for municipalities in
the QEPANET plugin and further integra- (iv) number of nodes to be analysed, and (v) southern Africa may prove valuable to pro-
tion of analyses within the QGIS package level of modelling detail required. The latter vide municipalities with a benchmark when
should be investigated and the required parameters would provide municipalities the terms of reference need to be compiled
processes should be documented in a meth- with guidelines to be used for budget­ing for the appointment and evaluation of service
odological manner. purposes, while practitioners would also providers. Such a set of standards may also
Future studies should be directed then have a baseline guide to determine the provide common ground for different analy-
towards the quantification of recommended required resources and time to be allocated sis software packages, i.e. commercial and
man-hours and determination of associated for the compilation of a WDN model. In open-source software packages.

42 Volume 62  Number 4  December 2020  Journal of the South African Institution of Civil Engineering
CONCLUSIONS REFERENCES Dissertation. Bloemfontein: Central University of
The developed methodological approach Berardi, L, Liu, S, Laucelli, D, Xu, S, Zeng, W & Technology, Free State.
and associated process flow diagrams will Giustolisi, O 2014. Energy saving and leakage Ormsbee, L E 2006. The history of water distribution
not only provide guidance to practitioners, control in water distribution networks: A joint network analysis: The computer age. Proceedings,
but could ultimately possibly also enable research project between Italy and China. Procedia Water Distribution System Analysis Symposium, of
and assist municipalities in southern Africa Engineering, 70: 152–161. WDSA 2006, 27–30 August 2006, Cincinnati, OH.
facing challenges in terms of technical Christelis, G & Struckmeier, W 2011. Groundwater QGIS Development Team 2016. QGIS User Guide.
skills shortages, service delivery backlogs, in Namibia: An explanation to the hydrogeological Open Source Geospatial Foundation. https://qgis.
outdated records and budget constraints – map. Windhoek, Namibia: Ministry of Agriculture, org/en/site/ (accessed on 4 December 2020).
hence, the justification for such a method- Water and Rural Development. Ramana, G V, Sudheer, V S S & Rajasekhar, B 2015.
ology based on open-source software that Gama, M C, Lanfranchi, E A, Pan, Q & Jonoski, A Network analysis of water distribution system in
does not require annual licensing or addi- 2015. Water distribution network model building, rural areas using EPANET. Procedia Engineering,
tional capital expenditure typically associ- case study: Milano, Italy. Procedia Engineering, 119: 496–505.
ated with commercial software products. 119: 573–582. Rossman, L A 2000. EPANET 2 User’s Manual.
It is envisaged that the implementation Georgescu, S C, Georgescu, A M, Madularea, R A, Cincinnati: US Environmental Protection Agency.
of the methodology and the recommenda- Piraianu, V F, Anton, A & Dunca, G 2016. Salmivirta, T 2015. Water distribution development
tions for future research will contribute to Numerical model of a medium-sized municipal and modelling in Keetmanshoop, Namibia.
improved water infrastructure planning, water distribution system located in Romania. Unpublished MSc Dissertation. Tampere, Finland:
design and management, especially in the Procedia Engineering, 119: 660–668. Tampere University of Technology.
southern African context where water Kara, S, Karadirek, I E, Muhammetoglu, A & Saminu, A, Abubakar, N & Sagir, L 2013. Design of
resources are scarce and service delivery Muhammetoglu, H 2016. Hydraulic modelling of a NDA water distribution network using EPANET.
remains a pressing issue. water distribution network in a tourism area with International Journal of Emerging Science and
highly varying characteristics. Procedia Engineering, Engineering, 1 (9): 5–9.
162: 521–529. Shital, K, Krunali, M, Mehta, D & Yadav, V 2016.
ACKNOWLEDGEMENTS Mays, L W 2000. Water Distribution Systems Simulation of existing water distribution network by
The Swakopmund Municipality is hereby Handbook. New York: McGraw-Hill. using EPANET: A case study of Surat City. Global
thanked for providing all the relevant data Mendelsohn, J, Jarvis, A, Roberts, C & Robertson, T Research and Development Journal for Engineering,
sets and technical support. The Central 2003. Atlas of Namibia. Cape Town: David Philip. 2016: 184–192.
University of Technology, Free State (CUT) Mugnier, C J 2006. Grids and Datums: The Republic of USGS (United States Geological Survey) 2015. SRTM
is likewise thanked for supporting and Namibia. Photogrammetric Engineering and Remote Mission Summary. https://www.usgs.gov/centers/
funding this research. We also wish to Sensing, 72 (8): 883–884. eros/science/usgs-eros-archive-digital-elevation-
thank the anonymous reviewers for their Muller, A L 2020. Development of a water network srtm-mission-summary?qt-science_center_
constructive review comments, which modelling system to evaluate existing municipal objects=0#qt-science_center_objects (accessed on
have helped us to improve the paper water infrastructure in developing countries: Case 4 December 2020).
significantly. study of Swakopmund, Namibia. Unpublished MEng

Journal of the South African Institution of Civil Engineering  Volume 62  Number 4  December 2020 43

You might also like