Wadiwrk4 is a Public domain Dos based utility that can be used for the purpose of analyzing Water distribution Networks.

In the words of the creators the program is officially called
WADISO - Water Distribution System Optimization.
Version - March 19,1987
Public Domain Program Developed by GESSKER, SJOSTROM & WALSKI, U.S. Army Corps Of Engineers - Water Ways Experimentation Station.

This paper deals with the following topics

  • Introduction
  • Requirements and Usage
  • Preparation of Data file
  • Running the Program
  • Interpreting the Output
  • More information
  • Trouble shooting


The program WADIWRK4 (henceforth called the program) is a dos based menu driven program. It accepts input from the user, that includes the details of the pipe network he wants to solve. It then allows the user to solve the network and output the result for inspection. The user can then check and change the system so that he gets the desired result. This is the interactive method of running the program.

Requirements and Usage

This method of usage is satisfactory but can be very painful if done for large networks. So knowing the execution pattern of the program it is possible to automate this process in a very intuitive way.

To run the program automatically, we need to prepare a data file that will contain text in it in the exact format as required to be typed when the program is running in the interactive mode. If this were then to be sent to the program as if it were being typed, the program can be run repeatedly by changing this prepared input file.

The required format is given below with commentary as required. The user is however urged to run the program normally in its interactive format so as to be familiar with the program and understand fully the workings of various symbols in the data file.

To proceed one must have a list of details regarding the network that has to be solved. It would be helpful to know the following in advance.

  • Various nodes denoted by numbers (less than a maximum 0f 800)
  • Various pipes identified (not necessarily uniquely) by the starting and the ending node, and by a number (uniquely).
  • The details of various pipes including diameter (inches) and length (feet) and the Hazen Williams Coefficient (To denote the roughness of the pipe) (representative values are about 100 to 150, but vary from case to case).
  • Elevations of the various nodes
  • Demands at the various nodes. (Note that the program cannot handle pipe demands and needs them to be converted to nodal demands).
  • water level height
  • Peak Load factor (connecting normal demand to the peak allowed demand)

Preparation of Data file

For the purpose of creation of the data file we will consider a simple network, shown below.

Given below is sample input file.

*C This is a comment
This is heading
1 1 2 3.15 40 150
2 1 3 3.15 30 130
3 2 3 3.15 50 120
1 10
2 11.5
3 11
1 10
2 12
3 21
ACCURACY .01 .01

The first line can be used as a comment. Use *C to do that. But the program does not take kindly to comments in between the program input. So take care.

The keyword NOM stands for "No messages". You would not normally use this when you are running the program interactively, but this helps keep the prompts to a minimum during the kind of execution we are looking at, so that our output is not cluttered.

The next two numbers are the corresponding menu options in the program. One for starting a new job and the second for starting input. After these two commands the program is ready to take your input.

The first piece of input you give is the name of the job (the heading).

Then you start entering the pipe network details. They can be entered in the format shown below but the maximum width of the fields cannot exceed that given below. To restate, it is enough to delimit the input with spaces, and not necessary to follow a strict column delimitation. In any case the maximum width per field is governed as below


To interpret the earlier letters - each set of letters is a field width, and the blank is mandatory. It is possible to have a smaller width NOT larger.

The various fields (as delimited by the format given above are:

Pipe# BeginningNode EndingNode PipeDiameter(in) PipeLength(m) HazznWillmCoeff

Then we have the keyword ELEVATION, that signals the program to interpret the following input the heights if the various nodes. The format and the data types are as given below.

Node# Elevation(feet)

The keyword OUTPUT comes next to signal the beginning the section that deals with the nodal demands (hence the word output). The format is given below.

Node# Demand(gallons/min)

The next keyword is TANK that denotes the following node number with the status of a supply point and also the head available. The format is


Where the two inputs are Node# and Pressure head(feet) of water at the tank.

The next Keyword is RATIO. This is a ratio of the peak demand to the normal demand. While giving input we take all the demands to be normal demands. This factor allows us to scale the demand a certain number of times. Use 1 if you don't want to scale the demand. This is especially useful to change the total demand proportionally at a later date, without having to change all the demand values. The format is


Where the number is the scaling factor

The Last input keyword defines to what accuracy the calculations have to be performed. The smaller the number better is the accuracy realized. This is however not very critical in a water distribution network, as such accuracies are seldom realized with the kind of items used. Use the values given below. Note that an additional(optional) factor has been left from the listing above. This is the number of times the network has to be solved (iterated) before giving up (in case the accuracies are not reached. This is by default 25 and is not necessary to change it. Specifying too low a value however can cause the iteration to stop before reaching its conclusion. The format is

ACCURACY AccuracyPipes AccuracyNodes MaxIterations

The END keyword causes the program to stop the input section. It takes no other input and looks like below.


The input part is done and it is necessary to run the program, The command given below (that is zero Capital'C') is used to ask the program to balance the system. This causes the input to be used to calculate the network. This will also output the table if the input is right. This output has to be trapped by you so that you can see it later. The process will be explained later.


Finally the quit command. This will close the program returning a 0 (zero)to the system.


Running the Program

Before the executing the program you must prepare the input file. Prepare the file in the format shown above. Use an editor like 'edit' or the 'notepad'. Desist from using the word or the wordpad unless you are sure to be able to save the program in pure text format. Discussion of the details is beyond this paper but the program will fail miserably if the prepared data file is not a text only file. Save the file with a .wad extension. (In notepad you have to enclose the name in quotes "input.wad" <-- like this.)Now you are ready to run the program.

To execute the program type the following on the dos prompt substituting the input.wad to the name you used to save the file. Prefer the .wad extension.

C:\>wadiwrk4 < input.wad

This is assuming both the program and the file are in a single directory. If not create a new directory and copy both the program (WADIWRK$.EXE) and the input file (your '.wad' file). Then cd to that directory and type the above.

If your file is written properly then the program will run causing output to be printed on the screen. (If it does not run go to the trouble shooting section. If you seem to getting some output but it is going so fast that you cannot read it then you need the store the output somewhere. To do this you can store the output in a file called 'output.out' by doing the following.

C:\>wadiwrk4 < input.wad >output.out

Now the output will stored in the file output.out (and will not flash on the screen) Open the output file (using similar tools you used to make the input files) and read through carefully.

What is happening above is that the first part of the statement causes the file input.wad to be read as a text file and it is sent to the program as if someone is typing it on the console. So the program does not differentiate between the two modes of input. DOS is tricking the program to think that the whole process is interactive. And using NOM will ensure that there is no junk in the output (in the form of the various prompts). The second part is that using the '>' symbol we are telling DOS in intercept all output meant for the screen and put it in a file for us to see. so the text in output.out is exactly the same as that printed on the screen.

Interpreting the Output

The output is self explanatory and very well given. But here are a few pointers. The first part is an echo of the input. (Remember DOS is putting everything meant for the screen into this file. The input is just you typing it in.) There will be two tables (split up if necessary) that contain all the items for the nodes and the pipes. Of particular use may be the water head values at the nodes and the velocity values for the pipes. Check for them to satisfy your requirements.

More Information

Go to the site for some more information.

Go to the site for downloading wadiwrk 4.1 evaluation version.

Trouble Shooting

Check the following if you have a problem.

Problem: Program not executing (perhaps exiting with a error)

  • Did you enter the command exactly as shown?
  • Check the redirection symbols (the '<' and the '>' signs?
  • Did you do a mistake earlier that wiped out your input file?
Problem: Simula error
  • Check the input file to see that all the commands (the numbers) are correct. There could be a missing command that is causing the input to abnormally terminate.
  • Check all the keywords. Did you by any chance leave them in small letters, or do you by any chance have a '.' after one of them?
Problem: No Proper output
  • Go through the output file. Check for any place where it gives an error.
  • Check the input for correctness
  • Check that there are no spaces or blank lines
  • Check to see that the field limit is not exceeded anywhere

Wadiwrk is a decent program for network analysis, and despite its clunky interface - worth learning.

July 24, 2001

Popular Posts

Subscribe / Share

Subscribe via email:

 Subscribe in a reader

 Follow me on Twitter

Blog Labels

2.0 (8) 4chan (1) 5800 (12) accounting (1) activities (1) advertising (1) airlines (2) (5) android (16) animation (2) app (1) apple (4) april fools (1) article (13) astronomy (1) athiesm (1) atom (2) awesome (2) battery (2) BBC (1) beta (2) biology (1) blender (1) blog (29) books (2) brain (1) BSG (1) business (7) camera (1) catb (2) chemistry (1) china (1) cloud (1) coca-cola (1) code (2) communication (8) cool (9) cosmology (1) creative (4) cricket (1) crowd sourced (2) currency (1) data (2) democracy (1) DIY (2) DMCA (1) DRM (1) easter egg (1) ebooks (1) economics (3) education (1) emergence (3) english (3) evolution (1) exercise (1) facebook (1) fail (1) fair use (1) fcc (2) feedburner (3) fffuuu (5) fiction (1) fifa (1) finance (1) firmware (7) fitbit (1) fitness (1) flash (1) flight (2) football (1) foss (6) free (2) freedom (2) funny (13) futuristic (1) gadgets (31) Galaxy SII (4) games (9) GDesk (2) gif (1) gimp (5) gmail (3) google (18) groupon (2) guitar (2) hack (2) history (5) hobbies (4) how-to (4) humor (1) iaudio (1) ice cream sandwich (3) ICS (3) ideas (13) IKEA (1) India (1) infographic (9) information (5) informative (3) inkscape (1) input (1) interesting (8) internet (5) iphone (1) japan (1) jellybean (1) kindle (3) knowledge (4) language (3) leet (1) lightning (1) links (13) Linux (5) log (1) LOST (2) LOTR (1) luddite (1) metal (1) microsoft (4) milestone (1) milwaukee (1) MIT (1) mobile (16) money (1) moot (1) morality (2) movies (5) MPAA (1) music (15) NASA (1) net neutrality (3) netflix (1) Netgear 3500L (6) networking (1) news (18) nexus one (3) nokia (13) NPR (9) nuclear (1) operating systems (1) opinion (29) p2p (3) philosophy (19) photography (6) physics (3) physiology (1) pipes (3) piracy (1) prank (1) presentation (1) privacy (3) programming (3) psychology (8) puzzles (1) quiz (1) rage comic (5) ramblings (21) rants (14) review (11) RIAA (1) robots (1) rock (1) root (1) RPG (1) rss (3) RTS (1) Samsung (2) sceptic (1) school (1) science (10) search (3) security (6) short story (1) shorts (1) simplicity (1) slashdot (2) SMB (1) snow (1) social (6) society (9) spam (1) spelling (1) spirituality (2) startup (1) statistics (1) storage (1) strategy (1) string theory (1) sustainability (1) swing (1) swype (2) symbol (1) syndication (1) tablet (4) technology (19) TED (10) television (1) template (1) time travel (2) tips and tricks (3) TomatoUSB (4) tools (6) toshiba thrive (6) travel (3) travelogue (1) triz (1) troll (1) troubleshooting (4) tutorial (5) TV (2) ugly (1) update (2) upgrade (8) useful (2) user interface (13) vacation (1) verizon (1) video (6) visualization (1) volunteering (1) VPN (1) wave (2) webcomics (9) webseries (1) website (1) wifi (2) wii (2) wiki (1) windows (1) wolfram alpha (2) world-cup (1) worldcup (1) www (1) x5 (1) xobni (1) yahoo (2) youtube (1) yro (3) ze frank (1)



Bloggers' Rights at EFF


Support CC


No Connection, Unpaid, My Own Opinions