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
MODIFIED RMM 5/12/87
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
- 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
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
ABCDE ABCDE ABCDE ABCDEFG ABCDEF ABCD
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.
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.
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
TANK ABCDE ABCDE
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 ABCDE ABCDE ABCDE
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.
Go to the site www.wadiso.com for some more information.
Go to the site www.skybusiness.com/sinske for downloading wadiwrk 4.1 evaluation version.
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?
- 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?
- 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.