epanet programmer’s toolkit _ water simulation

5
Water security Commercial software Free software Announcements Books Commercial software EPANET related Events & news Free software General Groundwater software Hardware Distance Learning Masters www.rdi.co.uk/masters No Visa. No Travel. Study Online. Browse our courses today! Home Home About About Newsletter Newsletter Contact Contact EPANET Programmer’s Toolkit | Water Simulation http://www.water-simulation.com/wsp/2005/06/22/epanet-programmers... 1 of 5 4/2/2013 4:48 AM

Upload: marting69

Post on 29-Nov-2015

163 views

Category:

Documents


0 download

DESCRIPTION

EPANET Programmer’s Toolkit _ Water Simulation

TRANSCRIPT

Page 1: EPANET Programmer’s Toolkit _ Water Simulation

Water security Commercial software Free software

Announcements

Books

Commercial

software

EPANET related

Events & news

Free software

General

Groundwater

software

Hardware

Distance LearningMasters

www.rdi.co.uk/mastersNo Visa. No Travel. Study

Online. Browse our coursestoday!

HomeHome AboutAbout NewsletterNewsletter ContactContact

EPANET Programmer’s Toolkit | Water Simulation http://www.water-simulation.com/wsp/2005/06/22/epanet-programmers...

1 of 5 4/2/2013 4:48 AM

Page 2: EPANET Programmer’s Toolkit _ Water Simulation

X

Powered by WP Greet Box WordPress Plugin

Posted on June 22, 2005 by Elad Salomons — 54 Comments ↓

Hello there! If you are new here, you might want tosubscribe to my newsletter for updates on this topic.

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-RTX real time extension for the EPANET toolkit

FireFlow

WatDis, the Little Challenger

Matlab wrappers for EPANet and EPANet-MSX

Off topic

Papers and

Research

Programming

Storm & Sewer

software

Water security

Water simulation

Packages

EPANET Programmer’s Toolkit | Water Simulation http://www.water-simulation.com/wsp/2005/06/22/epanet-programmers...

2 of 5 4/2/2013 4:48 AM

Page 3: EPANET Programmer’s Toolkit _ Water Simulation

‹ Hydraulic Programs suite v4.x SynerGee Water ›

‹ Older comments

Posted in EPANET related, Free software, Programming

54 comments on “EPANET Programmer’s Toolkit”

P.Sivakumar says:

September 22, 2012 at 14:19

How can I start modifying the source code of EPANET and

retrieve the result of hydraulic head available at the demand

node by using the toolkit functions of the EPANET for Head

Driven Analysis ?

Reply

witsarut says:

October 19, 2012 at 22:15

I want to write program of EPANET with visual basic 2008 but i

don’t know function So I think you has example for program of

EPANET with visual basic 2008. Can you sent for me?

Reply

P.Sivakumar says:

October 20, 2012 at 13:28

How can I start modifying the source code of EPANET and

retrieve the result of hydraulic head available at the demand

node by using the toolkit functions of the EPANET for Head

Driven Analysis ?And I could not run the program also.

Reply

Lucas Vasconcelos says:

October 26, 2012 at 22:42

The toolkit functions allow you to call an entire simulation through

the ENepanet method, or run a time step by time step simulation.

The toolkit does not allow you to change the time step!

The toolkit is quite well documented. For hydraulic analysis, you

can use the loop (First declare longs t and tstep).

ENopen

EPANET Programmer’s Toolkit | Water Simulation http://www.water-simulation.com/wsp/2005/06/22/epanet-programmers...

3 of 5 4/2/2013 4:48 AM

Page 4: EPANET Programmer’s Toolkit _ Water Simulation

‹ Older comments

ENopenH

ENinitH

while tstep 0

{

ENrunH( pointer to t)

(some toolkit functions to read or set the characteristics you

want and handle it with your algorithm)

ENnextH(pointer to tstep)

{

ENcloseH

ENclose

The only language I’m confident to know enough to take less time

coding than thinking of algorithms (when it comes to math only!)

is c#.net, so this is how the loop looks on c# given that the

wrapper class is called EpanetHandler.

EpanetHandler.ENopen(@”file.inp”, @”file.rpt”, @”file.out”);

EpanetHandler.ENopenH();

EpanetHandler.ENinitH(1);

while (tstep != 0)

{

EpanetHandler.ENrunH(ref t);

EpanetHandler.ENnextH(ref tstep);

}

EpanetHandler.ENsaveH();

EpanetHandler.ENcloseH();

EpanetHandler.ENclose();

The native function changes the values of tstep and t regardless

of what I do. This was a real moodkiller for me!

Reply

Your email address will not be published. Required fields are

marked *

Name *

EPANET Programmer’s Toolkit | Water Simulation http://www.water-simulation.com/wsp/2005/06/22/epanet-programmers...

4 of 5 4/2/2013 4:48 AM

Page 5: EPANET Programmer’s Toolkit _ Water Simulation

Elad Salomons Event detection OptiWater אלעד זלומונס

Baltimore Roll Off Rentals Privacy

© 2013 Water Simulation ↑ Responsive Theme powered by WordPress

E-mail *

Website

Comment

Notify me of followup comments via e-mail

EPANET Programmer’s Toolkit | Water Simulation http://www.water-simulation.com/wsp/2005/06/22/epanet-programmers...

5 of 5 4/2/2013 4:48 AM