EPANET Programmer’s Toolkit

Wednesday 22 June 2005 @ 9:49 pm

I have mentioned the EPANET toolkit several times before but didn’t post any information about it yet. The following info is from the toolkit readme file:

EPANET is a program that analyzes the hydraulic and water quality behavior of water distribution systems. The EPANET Programmer’s Toolkit is a dynamic link library (DLL) of functions that allows developers to customize EPANET’s computational engine for their own specific needs. The functions can be incorporated into 32-bit Windows applications written in C/C++, Delphi Pascal, Visual Basic, or any other language that can call functions within a Windows DLL. The Toolkit DLL file is named EPANET2.DLL and is distributed with EPANET. The Toolkit comes with several different header files, function definition files, and .lib files that simplify the task of interfacing it with C/C++, Delphi, and Visual Basic code.

The freeware FireFlow utility was written using the EPANET toolkit.

For more information and download see EPANET web page.





EPANET Toolkit adaption to GNU/Linux

Wednesday 1 June 2005 @ 6:39 am

Manuel López-Ibáñez, currently at the School of the Built Environment of Napier University in Edinburgh (UK), adapted the EPANET Toolkit version 2.00.10 to GNU/Linux.

A number of new features were added:

  • Calculation of pump switches
  • Saves time of day (in seconds) when a pump changes its status. The vector of pump scheduling is obtained using ENgetlinkvalue()
  • ENgetnodevalue() can return the initial (EN_INITVOL) and current volume (EN_VOLUME) of a tank.
  • ENgetcount() returns the number of pumps and the number of reservoirs in the network.
  • When ENgetcount(EN_CONTROLCOUNT, &count), a control may be added dynamically calling ENsetcontrol() with cindex = count + 1

New toolkit functions:

  • ENgettotalenergycost() : calculates total energy cost per pump plus demand cost.
  • ENgetpumpswitches() : number of switches of a pump.
  • ENaddleveltrig() : adds rule with the following format
    IF SYSTEM CLOCKTIME >= start_time (in seconds)
    AND SYSTEM CLOCKTIME < stop_time (in seconds)
    AND TANK id(tank_index) LEVEL [BELOW|ABOVE] level
    THEN PUMP id(pump_index) STATUS IS status
  • ENgetminstoptime() : returns the shortest time interval (in seconds) that a certain pump was not active.
  • ENgettankindex() and ENgetpumpindex() : allow to find a pump or tank without knowing its id or index.
  • ENaddpattern() adds a new pattern to the database.

This version is highly experimental but Manuel is doing a serious effort to document the changes. He is using a Control Version System (CVS) to keep track of the development, so this version is open to contributions from anyone. Manuel is hoping to obtain feedback in the form of code, testing, reports, acknowledge or just complains. :)

For more information, and download, please see Manuel López-Ibáñez web page.





OOTEN (Object-Oriented Toolkit for EPANET)

Wednesday 26 January 2005 @ 11:18 am

The following information was received from Professor JE (Kobus) van Zyl (Department of Civil and Urban Engineering at the University of Johannesburg):

OOTEN (Object-Oriented Toolkit for EPANET) was developed to provide the EPANET Programmers Toolkit functionality in a way that better suits object-oriented programming. There are many advantages to object-oriented programming such as ease of developing, checking, expanding, sharing and maintaining programming code.

OOTEN was mainly developed to support our own research efforts in the modeling of water distribution systems, but is made available free of charge to the wider research and modeling community.

OOTEN has all the functionality of the EPANET Programmers Toolkit, but also expands the functionality of the EPANET Programmers Toolkit, for instance to handle Curves. Work is underway to extend the functionality of OOTEN further.

OOTEN is provided as a collection of standard C and C++ source code files (.c, .cpp and .h files) and uses the EPANET source code directly. In some instances, functions were added to the EPANET source code to support for the expanded functionality of OOTEN. However, the existing EPANET functions were not amended and should thus work normally.

http://general.rau.ac.za/civil/wrg/ooten.htm





FireFlow

Wednesday 22 December 2004 @ 10:17 pm

FireFlow is a Freeware, EPANET based tool, which will calculate the available flow at network junctions while a minimal pressure is kept at demand junctions. FireFlow can run in a “Steady State” mode or perform an “Extended Period Simulation” (EPS). Using the EPS mode you can find how long can a specified flow be delivered? Or, what is the maximal flow that can be delivered for a specified period?

For details