by STEFFEN MACKE
This Manual describes the DC Water Design Extension Version 2.00.
This Document uses Terminology from ArcView and EPANET. Please refer to the respective documentation for in-depth explanations.
The DC Water Design Extension is an Extension to ESRI's ArcView GIS software. Version 2.00 integrates the EPANET 2.00 hydraulic modeling software with ArcView. It allows to store, edit and retrieve EPANET hydraulic models including all options in ArcView. Also it is possible to run the EPANET hydraulic analysis from ArcView and load the results into the GIS. Loading of EPANET models to ArcView is not yet implemented.
Network Traces are be useful to solve problems related to the network geometry. It is possible for example to check the connectivity of the network features in a model. Through specifying network features at which the trace should stop, it is possible to isolate supply zones.
Bit codes are stored as integer numbers in GIS data. They provide a powerful method to store hydraulic models in GIS data. The underlying principle is very simple:
Virtual Lines provide a concept to convert GIS point data (pumps or valves) into the lines used by the hydraulic analysis software. The conversion is done automatically when the GIS data is exported to the hydraulic model. Virtual Lines require exactly two pipes connected to each pump or valve. In addition, the two pipes must have the same digitizing direction (which will be the flow direction in the hydraulic model).
For DORSCH Consult staff, the DC Water Design Extension is available from the DC GIS Database (Lotus Notes).
All others can obtain the DC Water Design Extension including documentation and source code from the DC Water Design Extension homepage:
http://dcwaterdesign.sourceforge.net
To ease the installation process, the installer executable (setup program) is usually the best choice.
In order to install the DC Water Design Extension, one has to run the installer executable. After accepting the license (section 11.5), the installer prompts the user to select the installation path. The installation path should be the path to ArcView's EXT32 folder. Usually this should be the default path (c:\ESRI\av_gis30\arcview\EXT32). It might differ for custom ArcView installations. Than it has to be chosen which components of the extension should be installed. In general, one should install all the components of the extension.
If it is intended to use e.g. a newer version of the XSLT parser and
the new version is already installed,
the user might choose not to install the XSLT parser that comes with
the extension. However, this option should be left to the advanced
user.
The DC Water Design Extension extends the Project GUI by adding a new Menu, called DC Water Design Extension. The Menu contains the following choices:
Shows the Setup Dialog.
The Setup Dialog includes an option to choose the language of the Extension. Currently supported are the following localizations:
Displays the EPANET Tables Dialog.
The Tables in the dialog are used to to store non-spatial EPANET data with ArcView. Typical examples of such data are pump curves or hydraulic analysis options. Before it is possible to use a table with the DC Water Design Extension, it has to be loaded into ArcView. Refer to the ArcView documentation for information on how to load tables into ArcView.
Opens the Result Tables Dialog.
The Result Tables are used to store the results of a hydraulic analysis. There are two tables, one for node results and one for link results. For performance reasons it is recommended to use a RDBMS such as mySQL for storing the data. As of version 2.00, the DC Water Design Extension has only been tested with mySQL result tables.
Displays information about the DC Water Design Extension License. Section11.5 contains details on the license.
The DC Water Design Extension extends the ArcView View GUI with the following elements:
The additional functionality is explained below.
Exports the hydraulic model to an EPANET input file.
The model has to be complete, running ``Make EPANET Model'' and ``Check EPANET Model'' is advisable especially for the novice user before exporting the EPANET input file.
The resulting EPANET input file has the extension *.inp. The *.xml-file
is just an intermediate format (temporary file).
Exports the hydraulic model to an EPANET input file, runs the analysis and loads the results into ArcView.
The model has to be complete, running ``Make EPANET Model'' and ``Check EPANET Model'' is advisable especially for the novice user before exporting the EPANET input file.
After the analysis has been completed, the report created by EPANET is displayed in a window and the user is prompted to select a time step for which the results will be loaded.
Loads the results of an EPANET hydraulic analysis to ArcView.
The hydraulic analysis has to be run from ArcView in order to to enable this feature. The user is prompted to select the time step for which the results should be loaded.
Creates the line-node structure required by EPANET.
This function fills the fields node1 and node2 in the links table with the dc_ids of the connected nodes. The fields will be overwritten by this function, therefore the user has to confirm the action before the script run.
After completion, a report gives an overview of the created model. Model creation errors are also reported. In case of such errors, the features in question are selected after the run.
If there are reports about inconsistent flow direction at pumps or valves, the ``Flip Polylines'' tool of the extension can be used to correct the errors.
Opens the EPANET themes dialog.
The themes dialog is used to select the themes used in the hydraulic model. The line and node theme are required, other themes are optional and can be switched off with the check boxes on the right side.
Most of the extension functions require that the EPANET themes are
properly set up in this dialog.
Setting up the themes should be the first step when using the extension.
The settings of the EPANET themes dialog are also used to determine
which themes should be edited.
Displays the EPANET tables dialog.
The tables in the dialog are used to to store non-spatial EPANET data with ArcView. Typical examples of such data are pump curves or hydraulic analysis options. Before it is possible to use a table with the DC Water Design Extension, it has to be loaded into ArcView. The ArcView documentation contains information on how to load tables.
Allows to set valve states according to EPANET Controls.
If a controls table is registered with the Extension (see EPANET Tables Dialog), the user is offered to select the controls he would like to apply. All chosen controls are applied: The status of the respective valves is set to ``open'' or ``closed'' depending on the controls. This is very useful in combination with Network Traces as the extension allows to stop traces at closed valves.
Creates a straight pipe between tanks and junctions which share an id.
This function requires some preparatory work: Each tank of the tanks theme needs to know to which junction it should be connected. This is expressed with a field in the tanks attribute table that contains the dc_id of the junction the tank should connect to. Such fields can be established e.g. by using the spatial join function of the ArcView Geoprocessing Wizard.
Note that this functionality has been included mainly for the purpose
of modeling intermittent supply with household storage tanks.
It might be taken out or in future versions of the DC Water Design
Extension. In fact, the best solution will be to create another extension
specialized on intermittent supply modeling that depends on the DC
Water Design Extension.
Calculates a coded text that shows when a node is supplied with water.
This might only be used after successfully running an EPANET hydraulic analysis from ArcView. The function will query the the nodes results table for pressures above zero. Each pressure above zero will yield a ``1'' in the supply string, a pressure below or equal zero will yield a ``0'' in the supply string. For each node, the supply strings are written to a user-selectable text field. The field has to been long enough to contain as many characters as there are time steps in the EPANET results.
Note that this functionality has been included mainly for the purpose
of modeling intermittent supply with household storage tanks.
It might be taken out in future versions of the DC Water Design Extension.
The ideal solution will be to create another extension specialized
on intermittent supply modeling that depends on the DC Water Design
Extension.
This function calculates the length of the pipes connected to a junction.
A user selectable number field in the junctions attribute table is filled with the length of the pipes connected to each junction. In order not to double the overall pipe length, each pipe length is divided by two. Thus every part of a pipe is assigned to the nearest node.
Creates new themes with features which have the same bit set in a bit code.
The functions works with all active themes in the view. First, the user is prompted to select the bit which has to be set for the clipped themes. Then the field containing the bit code has to be chosen. (The script assumes that the bit code field names are the same throughout all the active themes.) The user can select the filename and location for each clipped theme. He can also choose whether the new themes should be added to the view.
Bit codes make it possible to use the same network features in different supply zones. This requires extraction of the features into separate themes. See section 11.1.1 for details on bit codes.
Displays information about the DC Water Design Extension License. See section11.5 for the license details.
This tool allows to flip the digitizing direction of lines.
The theme containing the lines to be flipped has to be set up as the pipe theme in the EPANET themes dialog. Simple clicking on the line will switch the digitizing direction.
Tip: ArcView's symbology can be used to display the digitizing direction
with arrowheads.
A tool to move network nodes including rubber-banding.
With this tool it is possible to move network nodes (junctions, tanks, reservoirs, pumps, valves) along with the connected pipes. The network stays intact and fully connected (rubber-banding).
The respective themes have to be registered with the extension in the EPANET themes dialog.
A tool that allows to split a pipe into two pipes. Adds a new junction at the split point.
The two new pipes inherit the attributes from the original pipe. However, the length gets recalculated based on the shapes.
Pipe and junction themes have to be chosen in the EPANET themes dialog.
Allows to re-shape pipes.
Vertices determine the route of a pipe. The tool makes it possible to move all the vertices of a pipe. Additional, it is possible to add vertices to the pipe. Unlike the ArcView tool ``Vertex Edit'', ``Edit Pipe Vertices'' ensures network connectivity - it is impossible to disconnect a pipe from a node with this tool.
The pipe theme has to be set up in the EPANET themes dialog in order to use this tool.
Note that the pipe length is not recalculated.
The pipe length has to be calculated manually in the pipe theme attribute
table. The Questions and Answers section of this manual contains an
entry that deals with calculating the pipe length.
A tool to convert nodes from one class to another.
The Change Node Class tool allows to convert e.g. a junction into pump. Attributes shared between the two classes are copied. After selecting an existing node, the user is prompted to select the class to which the node should be moved. The old node is deleted in order to prevent node duplication that would corrupt the hydraulic model.
Obviously, the respective themes have to be registered with the extension in the EPANET themes dialog.
A tool to delete network features.
Allows one-click deletion of network features. The user is prompted to confirm the deletion. It is important to know that there's no undo support with the DC Water Design Extension.
The themes containing features that should be deleted have to be selected in the EPANET Themes dialog.
The Digitize Junction tool is used to digitize junctions.
The junctions are added to the junction theme selected in the EPANET themes dialog.
The Digitize Pipe tool is used to digitize pipes.
The pipes are added to the pipe theme selected in the EPANET themes dialog. In order to maintain the network integrity, the tool automatically adds junctions at the pipe end if the pipe end does not snap onto an existing node.
The Digitize Tank tool is used to digitize tanks.
The tanks are added to the tank theme selected in the EPANET themes dialog.
The Digitize Valve tool is used to digitize valves.
The valves are added to the valve theme selected in the EPANET themes dialog. The tool is disabled if the valve theme is not enabled in the EPANET themes dialog.
The Digitize Reservoir tool is used to digitize reservoirs.
The reservoirs are added to the reservoir theme selected in the EPANET themes dialog. The tool is disabled if the reservoir theme is not enabled in the EPANET themes dialog.
The Digitize Pump tool is used to digitize pumps.
The pumps are added to the pump theme selected in the EPANET themes dialog. The tool is disabled if the pump theme is not enabled in the EPANET themes dialog.
Pop-up menu item that allows to show the attributes of a pipe.
Right-clicking on a pipe and selecting this menu item opens the pipe attribute table, selects and promotes the pipe.
The appropriate pipe theme has to be selected in the EPANET themes dialog.
Pop-up menu item allowing to edit the attributes of a pipe.
Right-clicking on a pipe and selecting this menu item opens the pipe attribute table, makes it editable, selects and promotes the pipe record. After that, the attributes of the pipe can be edited. The DC Water Design Extension currently provides no undo functionality.
Pop-up menu item that allows to trace the pipes connected to the selected pipe.
Right-clicking on a pipe and selecting this menu item opens a dialog that offers node types at which the trace should stop. Multiple types can be selected. During the trace, the status bar informs what percentage of the network has been covered by the trace so far. The progress bar will not make it to 100% unless the network is fully connected and no stopping features have been selected. The connected pipes up to all stop points are returned as the selection.
Pop-up menu item that shows the attributes of a node.
Right-clicking on a node and selecting this menu item opens the node attribute table, selects and promotes the pipe.
The appropriate node theme has to be selected in the EPANET themes dialog.
Pop-up menu item that allows to edit the attributes of a node.
Right-clicking on a node and selecting this menu item opens the node attribute table, makes it editable, selects and promotes the node record. After that the attributes of the node can be edited. Important notice: Undo is not supported by the extension.
Selects the current node.
Adds the current node to the selection in the node theme.
The appropriate node themes has to be selected in the EPANET themes dialog.
The Bitcode Calculator is accessible from the button bar of the table GUI. It is disabled unless the table is editable and a numerical field is selected.
Bitcodes are a concept that allows to transparently share network features in multiple supply zones. Section 11.1.1 contains more information on bit codes.
This section documents extension scripts that could be used from the field calculator or in queries. In Addition, the script responsible for the localization (extension dictionaries) is documented. In general, the API (Application Programming Interface) documentation should only be of concern for programmers.
performs a bitwise or operation on integer numbers
integer DCWatDes.Bitcode.or(integer a, integer b)
av.run("DCWatDes.Bitcode.or", {[a], [b]})
performs a bitwise and operation on integer numbers
integer DCWatDes.Bitcode.and(integer a, integer b)
av.run("DCWatDes.Bitcode.and", {[a], [b]})
return whether the n-th bit of an integer is set or not
integer DCWatDes.Bitcode.isSetAsNumber(integer a, integer n)
av.run("DCWatDes.Bitcode.isSetAsNumber",{[example], 3}) = 1
Note that the bit numbering starts at 0. ``= 1'' is used to convert the numbers 0 and 1 to the boolean values to true or false, respective.
Creates the localization dictionaries of the extension.
In order to add another dictionary, the new dictionary has to be created first:
dicNew = Dictionary.make(100)
Next, dictionary entries can be added to the new dictionary:
dicNew.add(``English Term'', ``New translated term'')
The German dictionary contains most of the terms that have to be translated. After all the terms have been added to the new dictionary, the Dictionary has to be added to the Dictionary of Dictionaries:
_dcwDicDictionaries.add(``tr'', dicNew)
Where ``tr'' is the text that shows up in the setup dialog of the extension.
The provided AVENUE functions are more flexible this way. Bit codes can be useful for quite a number of operations. Try using the functions with the field calculator and the query. Examples are given in 11.3.6.
The Extension depends on several software packages. The Setup Dialog allows to choose other versions of these software packages than the ones supplied with the Extension itself.
The Pipe 2000 data model, API and documentation are inferior to EPANET. Full integration of Pipe 2000 into ArcView was impossible. With EPANET it is possible to store the complete model, including all hydraulic analysis options in the GIS.
Try the following:
Undo support had to be taken out for the sake of editing multiple
themes at the same time. Make frequent backups.
You have been warned.
Please send your bug reports to Steffen_Macke@dorsch.com.jo
DC Water Design Extension 2.00. This ArcView Extension integrates EPANET with ArcView.
Copyright (C) 1998-2001 DORSCH Consult
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Appendix 14 contains a copy of the GNU Lesser
General Public License.