US Army Corps

of Engineers

Construction Engineering

Research Laboratories

Approved for public release; distribution is unlimited.

USER REPRESENTATION

RES1

1 2

3

6

7

8

10

4 5 9

C1 C2 C3 C4 C6

C5

11

TURB

TW

EXP CON VLV2

ST

(SERIAL) BRANCH 1

1 2 3 4 5 6

CES RES1 VLV1 C1 EXP C2 CON C3 VLV2

External Node

Internal Node

Matrix Q Variable X(1)

Matrix H Variable

1 2 3 4 5 6 7 8 9

7 9 10

CG TURB TW

17 19

X(9)

10 11

X(2)

X(3)

13

X(6)

X(7)

GTJ1

(JUNCTION)

BRANCH 2

(SERIAL)

BRANCH 4

COMPUTATIONAL REPRESENTATION

USACERL ADP Report 98/129

September 1998

Water Hammer and Mass Oscillation

(WHAMO) 3.0 User's Manual

Robert Fitzgerald and Vicki L. Van Blaricum

Fluid distribution systems and

hydropower plants can be severely

damaged by water hammer, a forceful

slam, bang, or shudder caused by a

sudden change in fluid pressure within

the system. Water hammer can be

mitigated by designing and operating

these systems to minimize sudden

changes in water velocity, which lie at

the root of water hammer problems. 

WHAMO 3.0, a modeling and simulation

application for desktop computers, was

specifically developed for this purpose. 

WHAMO provides dynamic simulation of

fluid distribution systems and

hydropower plants. It calculates the

time-varying flow and head in networks

comprised of pipes, valves, pumps,

tanks, and turbomachines. WHAMO

Version 3.0 is a major upgrade that implements a

graphical user interface for operation under Microsoft

Windows 95. This report gives procedures and

examples for the use of the WHAMO program, and

includes a complete command reference plus

documentation of the algorithms upon which WHAMO

is based.
USACERL ADP 98/129 1

SF 298
2 USACERL ADP 98/129

Foreword

This study was conducted for Headquarters, U.S. Army Corps of Engineers

(HQUSACE) under Civil Works Investigations and Studies Work Unit 32867,

“Program 315-Electrical/Mechanical.” The Technical Monitor was Andy Wu,

CECW-EE.

The work was performed by the Materials Science and Technology Division (FL-M)

of the Facilities Technology Laboratory (FL), U.S. Army Construction Engineering

Research Laboratories (CERL). The CERL Principal Investigator was Vicki L. Van

Blaricum, CECER-FL-M. Dr. Ilker R. Adiguzel is Acting Chief, CECER-FL-M, and

L. Michael Golish is Acting Operations Chief, CECER-FL.

Dr. Michael J. O'Connor is the Director of CERL.
USACERL ADP 98/129 3

Contents

SF 298 ................................................................ 1

Foreword .............................................................. 2

List of Figures and Tables ................................................ 5

1 Introduction ....................................................... 7

1.1 Background ................................................... 7

1.2 Objective ..................................................... 9

1.3 Approach ..................................................... 9

1.4 Mode of Technology Transfer ..................................... 10

2 The WHAMO Modeling System ...................................... 11

2.1 Introduction to the WHAMO Simulation Program ...................... 11

2.2 WHAMO System Elements ...................................... 14

2.3 System Construction ........................................... 17

2.4 System Boundary Conditions ..................................... 19

2.5 System Operating Conditions ..................................... 20

2.6 Computational Procedure ........................................ 22

2.7 Initial Steady State Conditions .................................... 23

3 How To Use WHAMO .............................................. 25

3.1 Installing the WHAMO System .................................... 26

3.2 Data Preparation .............................................. 27

3.3 Creating an Input File Using a Text Editor and Commands ............... 37

3.4 Creating an Input File Using the WHAMO Network Builder ............... 43

3.5 Running the WHAMO Simulation .................................. 56

3.6 Diagnostics .................................................. 57

3.7 Using WHAMGR to Display WHAMO Results ........................ 59

4 Command Reference .............................................. 65

4.1 Element Commands ............................................ 65

4.2 System Command ............................................ 117

4.3 Output Commands ............................................ 121

4.4 Simulation Control Commands ................................... 133

4.5 Execution Control Commands ................................... 154
4 USACERL ADP 98/129

5 Example Applications ............................................. 156

5.1 Valve Closure in a Simple Pipeline ................................ 156

5.2 Simple Pipeline With a Surge Tank ............................... 158

5.3 Oahe Pumping and Power Plant ................................. 160

5.4 Clinton Lake Pumping Plant—Case Study .......................... 168

5.5 Ponape Power Plant—Case Study ................................ 179

6 Basic Algorithms ................................................. 191

6.1 Governing Equations .......................................... 191

6.2 Unsteady, Compressible Flow in Elastic Conduits .................... 192

6.3 Algorithms for Flow Elements .................................... 196

6.4 Algorithms for Turbo-machines .................................. 204

6.5 Governor Algorithms .......................................... 211

6.6 Algorithms for Surge Tanks ..................................... 220

6.7 Algorithms for Junctions ........................................ 233

6.8 Special Options for Valve, Gate, and B.C. Schedules .................. 234

6.9 Branch Reduction Scheme ...................................... 237

6.10 Steady State Generation ....................................... 242

6.11 Interpolation ................................................. 244

7 Conclusion ..................................................... 245

References .......................................................... 246

Appendix: Index of Primary Commands in WHAMO 3.0 ...................... 248
USACERL ADP 98/129 5

List of Figures and Tables

Figures

1 System connectivity ............................................. 19

2 Procedure for using the WHAMO simulation system .................... 25

3 Schematic diagram of hypothetical system ............................ 29

4 Two representations of four-way junction ............................. 36

5 WHAMO Network Builder opening screen ............................ 45

6 Reservoir data entry screen ....................................... 46

7 Pump data entry screen .......................................... 46

8 Pump characteristics box ......................................... 50

9 Valve schedule dialog box ........................................ 51

10 Time history dialog box. .......................................... 52

11 Display options dialog box ........................................ 52

12 Exporting a file to WHAMO ....................................... 54

13 WHAMGR display of plot file ...................................... 61

14 WHAMGR display of pump characteristic curves from .INP file ............ 63

15 Definition sketch for diameter change elements ........................ 70

16 Speed-Discharge characteristics plot for Pump-Turbines ................. 85

17 Definition sketch of Tee Junction .................................. 105

18 Schematic diagram of simple pipeline system ........................ 156

19 Input for valve closure in a simple pipeline ........................... 157

20 Simple pipeline with surge tank ................................... 158

21 Input for simple pipeline with surge tank ............................. 159

22 Proposed Oahe installation ...................................... 161

23 Input for Oahe Power Plant ...................................... 163

24 Schematic of Clinton Lake Pumping Plant ........................... 170

25 Simulated pump behavior (Case 8) ................................ 173

26 Simulated pipeline pressures (Case 8) .............................. 174

27 WHAMO input for Clinton Lake ................................... 175

28 Ponape system schematic ....................................... 181

29 Simulation results for small turbine unit (Run #4) ...................... 183

30 Simulation results for small turbine unit (Run #4) ...................... 184

31 Simulation results for big turbine unit (Run #4) ........................ 185

32 Simulation results for big turbine unit (Run #4) ........................ 186

33 Maximum energy grade line (Run #4) ............................... 187

34 Ponape input file .............................................. 188

35 Definition sketch for diameter change elements ....................... 203
6 USACERL ADP 98/129

36 Complete characteristics diagram ................................. 206

37 Speed-discharge characteristics plot for pump-turbines ................. 209

38 Block diagram for mechanical governor ............................. 215

39 Block diagram for electrical governor ............................... 218

40 Differential surge tank .......................................... 224

41 Non-linear final closure curve ..................................... 236

42 Aberration in continuous parabolic interpolation ....................... 244

Tables

1 Element list for hypothetical system ................................. 31

2 Data requirements for system elements .............................. 47

3 Element list for simple pipeline system .............................. 156

4 Element list for pipe and surge tank system .......................... 160

5 Element list for Oahe power and pumping system ..................... 162
USACERL ADP 98/129 7

1 Introduction

1.1 Background

Fluid distribution systems and hydropower plants can be severely damaged by

water hammer. Water hammer is the forceful slam, bang, or shudder that occurs

in pipes when a sudden change in fluid velocity creates a significant change in fluid

pressure. Water hammer can destroy turbomachines and cause pipes and

penstocks to rupture. Water hammer can be avoided by designing and/or operating

these systems such that unfavorable changes in water velocity are minimized.

The WHAMO computer program has been developed to assist engineers in

mitigating water hammer by simulating Water Hammer And Mass Oscillation in

networks that convey fluids such as water or fuel. Some typical applications for

WHAMO include analysis of hydropower plants, pumping facilities, jet fueling

systems, and wastewater collection systems. The program determines time varying

flow and head (transients) in a network which may include pipes, valves, pumps,

turbines, pump-turbines, surge tanks, and junctions arranged in any reasonable

configuration. Such transients are generated due to any variation in the operation

of a turbomachine or valve within the network, or due to changes in the head or

discharge at boundaries of the network. The rotational speed, torque, and power

of machines are computed along with the system hydraulic variables.

WHAMGR is an associated graphics program used for creating time history plots

from WHAMO simulations. It is also used for plotting turbomachine characteristics

input to WHAMO.

The WHAMO Network Builder is an associated program which allows the user to

create WHAMO input files using a graphical, point-and-click method to “draw” the

network on the computer screen and specify simulation parameters. In previous

versions of WHAMO, the user was required to use a complex series of commands

to define the network and simulation parameters. WHAMO 3.0 allows either

method of data input to be used, and instructions for both are given in this manual.

WHAMO, WHAMGR, and the WHAMO Model Builder run on IBM-compatible

personal computers under Microsoft Windows 95.
8 USACERL ADP 98/129

This manual documents WHAMO version 3.0. Many enhancements and new

capabilities have been added since the original release of the mainframe version of

the program in 1979-80; however, the fundamental input, computation, and output

processing schemes remain largely unchanged. The current Windows-based version

of the program is still "input compatible" with the original mainframe version,

which means that any input file which successfully ran on previous versions of the

program will run on the current version with essentially the same results.

The original WHAMO Program was an outgrowth of and logical extension to

previous special purpose programs utilized by the Corps of Engineers. The earliest

predecessor program to WHAMO is the MIT-MRD program, developed at the

Massachusetts Institute of Technology for the Missouri River Division (Perkins

1964 and 1965). Subsequently, that model was revised and extended to include

pumps in order to model the Oahe Power and Pumping Plant for the Omaha

District (Resource Analysis, Inc. 1976 and 1978). Over the years that followed, the

programs were further modified and enhanced to include more diverse elements and

permit their interconnection in any reasonable configuration.

New model capabilities and program modifications made since the original WHAMO

release are listed below:

1994-1997

C Ported to MS Windows operating system

C New graphical user interface (GUI)-based WHAMGR for display of program

results and characteristic curves of pumps and valves

C New GUI-based WHAMO Network Builder for point-and-click construction of

input files

C One-way surge tank

C Turbine startup

C Tabular output improvements including better spreadsheet compatibility, and

the ability to specify the number of lines per page and number of decimal

places in printed output tables

C Increased array dimensions for machine characteristics

1990-1991

C Ported to DOS operating systems on "IBM-compatible" PCs (including

WHAMGR)

C Fluid density may be specified
USACERL ADP 98/129 9

C Optional output in gallons/minute for discharge and pounds/square inch for

pressure

C Pump characteristics may be read from separate files

C Internal branch structure modified to reduce roundoff error on microcomputers

C "Leakage" computed for closed valves reduced by a factor of 10

C New pressure control valve element

C Steady state outflow or overflow from a surge tank

C Starting air chamber surge tank pressures may exceed pipeline pressure

1984

C Variable area surge tanks

C Surge tank outflow option

C Air chamber surge tanks (vented or unvented)

C Pressure actuated valves

C Non-return valves

C Spherical and Howell-Bunger valve characteristics

C Differentiated forward and reverse flow characteristics for valves

C Electric governors

C New governor input options and defaults

C New pump-turbine characteristics input option

C Standard wicket gate cushioned closure option 

C Sinusoidal variation optionally superimposed on schedules

C Increased number of system branches and variable diameter conduits allowed

C Graphical plotting of machine characteristics (WHAMGR)

1.2 Objective

The objective of the WHAMO program is to perform dynamic simulation of fluid

distribution networks comprising components such as pipes, valves, pumps,

turbines, pump-turbines, surge tanks, and junctions. The program calculates timevarying flows, pressures, and heads throughout the network.

1.3 Approach

WHAMO 2.0 for DOS was upgraded to bring it into the Microsoft Windows

operating system. A new Windows-based graphics package was developed to enable

users to print out or display the program results to any printer or monitor that is
10 USACERL ADP 98/129

supported by Windows. A graphical point-and-click method of data input was

developed to replace the old command-line method that was used in previous

versions of the program.

1.4 Mode of Technology Transfer

It is anticipated that distribution, support, and maintenance of WHAMO 3.0 will

be transferred to the Corps of Engineers Hydroelectric Design Center, CENWPHDC-P.
USACERL ADP 98/129 11

2 The WHAMO Modeling System

Before proceeding further, it is important to understand some basics about how

WHAMO is structured and how it works. The complete WHAMO modeling system

includes three separate programs interconnected via data files. These are the main

WHAMO simulation program, the WHAMGR graphics package, and the WHAMO

Network Builder.

The main WHAMO simulation program may receive input from either (1) an ASCII

text file that has been created with a word processor as described in Section 3.3, or

(2) an input file that has been created using the new graphical point-and-click

WHAMO Network Builder as described in Section 3.4. Thus, use of the WHAMO

Network Builder is optional, but it is much easier and more efficient than using the

command language for most users.

The WHAMGR graphics package reads the output file produced by the WHAMO

simulation program and allows the user to print the output and/or display it to the

computer screen. A variety of display options are available. These will be described

later in the manual. WHAMGR can also be used in a pre-processor mode to plot

certain input data.

The WHAMO simulation program is the heart of the WHAMO system. It will be

described in the sections that follow.

2.1 Introduction to the WHAMO Simulation Program

The main WHAMO simulation program uses an implicit finite difference method

for calculating time-varying flows and pressures throughout the network that is

being modeled. Details are in Chapter 6. Numerical techniques used to approximate partial differential equations such as the water hammer equations can be

generally classified as implicit or explicit. Implicit methods generally require

simultaneous solution of a set of equations while explicit formulations can be solved

directly. Explicit methods are constrained according to system geometry to work

at computational time steps which are typically very small, while the implicit

methods are not so constrained. Implicit methods require greater computational
12 USACERL ADP 98/129

effort per time step because of the necessity of solving simultaneous equations. The

amount of effort required for a simulation can be reduced by varying the length of

the time step during the simulation. WHAMO allows this. Any initial, high

frequency water hammer response in a system should be modeled with short time

steps, but in simulations where the water hammer dissipates and mass oscillation

becomes predominant, the time step can be greatly increased during the simulation

with no significant loss of accuracy.

Implicit, finite difference techniques, such as used in WHAMO, average time

derivatives over conduit reaches and time steps. Therefore, it might be expected

that the solution would be less accurate at sharp wave fronts. The implicit solution

technique is, in fact, able to accurately model very sharp wave fronts (Perkins

1963). Perkins showed that results obtained with implicit method simulations of

rapid and instantaneous valve closure in a pipe agreed favorably with results

obtained by the explicit method of characteristics. In some cases, however, a

spurious, minor oscillation can be superimposed on simulated solutions in the

vicinity of particularly sharp transients resulting from pump station power failure

or very rapid valve closure in pipelines. This noise damps out quickly without

altering the overall solution and can sometimes be eliminated or minimized by

careful selection of time steps ()t = n*) x / c) during the period of sharp transients

(Perkins 1963).

The WHAMO simulation program is constructed in a modular fashion to make it

more general, ease the addition of new capabilities, and produce a more efficient

code and storage structure. This is transparent to the user. The following basic

elements form the program modules:

1. A set of building block subroutines which represent the one-dimensional

continuity and momentum equations for compressible liquid flow in closed

conduits.

2. A set of building block routines which represent the head discharge relations

across typical elements such as turbomachines, valves, and junctions.

3. A set of input routines which accept a description of the preceding elements

and their interconnection.

4. A set of organizational routines which restructure the input data into a matrix

form representative of the system to be modeled, and a routine for solving the

resulting equations.
USACERL ADP 98/129 13

5. A set of computational routines which automatically generate an initial

steady-state condition for the system, consistent with input boundary

conditions.

6. A set of output routines which allows the program user to specify the type,

amount, and form of computational results to be produced. Output may be

printed in either a tabular or graphical form, exported to a spreadsheet, or

saved as an ASCII text file. Where simulations are long, time steps short, or

the system complex, the program produces a huge amount of output, therefore

the user may select the locations and parameters for which an output history

is desired.

WHAMO follows certain basic steps during a simulation run. These are:

1. Read and check input data — The user's commands and associated data are

read in. The data are processed as necessary and checked for errors.

2 Build system connectivity — The user's specifications of the system structure

are reinterpreted to a form compatible with computation. The resulting

system is checked to insure that it is physically reasonable.

3. Display input data and system structure — All data input as well as the

system structure and other information determined by the program are

printed in tabular form. This allows easy verification of the input data by the

user.

4. Steady state generation — An initial, steady state condition compatible with

the specified boundary and operating conditions is determined for the system.

5. Transient simulation — System response to specified transient machine

operation or boundary condition is simulated. Computational difficulties are

monitored by the program's self-checking algorithms.

6. Output — The simulation results are printed or stored for later processing

according to the user's instructions.

The WHAMO program considers a hydraulic system as constructed of a number of

individual components of various types, interconnected in a particular network

configuration. This information must naturally be supplied to the program by the

user. The model further requires specification of system boundary conditions and

operating conditions for the simulation period. These data are interpreted and
14 USACERL ADP 98/129

processed by the program and computations are performed to simulate the

transient state hydraulics of the system.

Various aspects of the system specification by the program user, the interpretation

and processing of these data by the model, and the computational strategy

employed in the hydraulic simulation are introduced in the following sections. The

intent is to acquaint the user in a general way with the modeling operation. The

details of program input and computational algorithms are presented in subsequent

sections of this manual.

2.2 WHAMO System Elements

The basic physical elements considered by WHAMO fall into four main categories:

flow elements, turbomachines, boundary elements, and junctions. Altogether,

nearly 20 specific element types are available to the user for construction of a

system.

For each element type, the model employs special forms of mathematical equations

to represent the hydraulics of a given component. These equations are utilized in

pairs, one based on the continuity principle and one based on the momentum (or

energy) conservation principle as applied to a particular element. These are

described in Chapter 6.

When the user specifies an element of a particular type, he must designate a name

by which it can be referenced and supply data on the properties which are relevant

to the hydraulics or mechanics of that element. For example, the length, diameter,

roughness, and celerity of a conduit must be specified. Simply stated, enough data

must be supplied for an element that continuity and momentum equations can be

written under all conditions to be simulated. Input data requirements are

presented in detail in Chapter 4.

2.2.1 Flow Elements

2.2.1.1 Conduits. The conduit element is a closed conveyance element of circular

cross-section whose hydraulic performance can be expressed in terms of the

one-dimensional continuity and momentum equations for compressible liquid flow.

Total head, pressure head, piezometric head, and discharge are computed at the

conduit element end points. For computational reasons, a conduit element may

include a number of segments.
USACERL ADP 98/129 15

2.2.1.2 Variable Diameter Conduits. These are conduits identical to those above,

except in the respect that the conduit diameter varies along the axis of the conduit.

2.2.1.3 Dummy Elements. Not a physically realistic element, dummy elements are

simply a connector supplied for user flexibility in constructing systems.

2.2.1.4 Control Valves. Control valve elements are applicable to throttling devices

for which a discharge coefficient or head loss coefficient is specified versus valve

opening, and a schedule of valve openings is supplied. Characteristics for butterfly,

gate, spherical, and Howell-Bunger valves are supplied by the program. The user

supplies characteristics for other types of valves.

2.2.1.5 Pressure Control Valves. The opening of these valve elements is

determined according to user-specified functions of pressure at one or two reference

points in the system, instead of a predetermined schedule.

2.2.1.6 Non-Return Valves. These elements allow flow in one direction only. A

single head loss coefficient may be applied to flow in the allowed direction.

2.2.1.7 Expansions and Contractions. These elements are used to model the head

losses resulting from abrupt changes in conduit diameter within a pipeline.

2.2.2 Turbomachines

2.2.2.1 Pumps. Pump elements represent hydraulic machinery which can add

energy to the hydraulic system using mechanical energy supplied externally. The

hydraulic performance of the machinery is represented through performance data

which consists of dimensionless tables of head and torque versus speed and

discharge through all four quadrants of pump and turbine direction performance

data. The input also includes specification of the operating mode of each pump.

Output includes pump speed, torque, discharge, and head difference.

2.2.2.2 Turbines. The turbine element models turbomachinery operating with flow

in the turbine direction only which can remove energy from the hydraulic system.

The hydraulic performance is expressed by input tables in either of two forms. The

tables may be of prototype data consisting of discharge and efficiency as functions

of wicket gate opening and head across the turbine. More usually, homologous

model data is supplied, in which model discharge and power are given as functions

of the gate opening and peripheral velocity factor (phi). In either case, the speed,

discharge, gate opening, power production, and head across the turbine are

calculated. In addition, the governor element (see below) is available for use with
16 USACERL ADP 98/129

the turbine element to model automatic governance of the turbine under small

changes in speed or load.

2.2.2.3 Pump-Turbine. The pump-turbine element represents hydraulic machinery

designed to operate in both pumping and turbine mode for pumped storage-power

generation and similar operations. The hydraulic performance of the machinery is

represented through model performance data which consists of tables of discharge

and torque vs. speed and gate opening under unit head conditions. When in the

turbine mode, automatic governance of the machinery may be modeled using

governor element (see below). The pumping mode operations are controlled through

input histories of gate position versus time rather than by modeling any automatic

control mechanisms which may exist. The program calculates speed, torque, power,

head difference, discharge, and gate opening for output purposes.

2.2.2.4 Turbine Governors. Turbine governor elements control the operation of

turbines and pump-turbines under small changes in speed or load. The governing

algorithms are not applicable to large changes, such as full load rejection, since the

limits, discontinuities, and non-linearities of the actual governing mechanisms are

not modeled by the program element.

2.2.3 Boundary Elements

2.2.3.1 Surge Tanks. Simple and differential surge tanks may be modeled by the

surge tank element. The effect of restricted entrance orifices may be considered as

desired. Output for this element includes the water surface elevation in the tank,

as well as discharge.

2.2.3.2 One Way Surge Tanks. One way surge tank elements allow the surge tank

water surface to be below the hydraulic grade of the pipeline. They must be

separated from the pipeline by a non-return valve.

2.2.3.3 Air Chambers. Pressurized air chamber surge tanks may be modeled.

Restricted air inflow and outflow to the air chamber may be simulated.

2.2.3.4 Free-Surface Boundaries. Boundary water surface elevations, such as at

reservoirs, are specified through this element either as constants or as functions of

time.

2.2.3.5 Flow Boundary. Flow boundary elements specify discharge boundaries to

the system either as constant or time-varying flows.
USACERL ADP 98/129 17

2.2.4 Junctions

2.2.4.1 Simple Junctions. Junctions of six or fewer elements may be modeled as

simple junctions. Such junctions consider the conservation of flow, but do not

compute head loss due to the junction.

2.2.4.2 Tee Junctions. Junctions of three elements are considered by the Tee

Junction element, which computes the loss of head using the relations developed by

Gardel (1955).

2.3 System Construction

The interconnection of the individual elements must be completely defined for a

system in order for simulation to be possible. This information is supplied by the

program user as part of the data input. Based on the configuration in which the

elements are assembled, the program can organize the individual governing

equations which represent the various elements into a unified set of equations

written in terms of common variables which can be solved simultaneously to

accurately represent the hydraulics of a system.

The basic building blocks by which the user constructs a system are nodes and

elements. A node represents a point of the system at which two or more elements

are joined or at which boundary conditions (or diameter changes) are located. The

nodes of a system are linked together by elements and every element links two

nodes, except for boundary conditions and diameter changes. Nodes which are

linked by three or more elements receive special treatment. These junction nodes

are in themselves elements, either simple junctions or Tee junctions. The

connectivity input then consists of a series of statements which list each element

by name along with the designation of the two nodes which it links, or the single

node at which the element is located.

With this input from the user, the program prepares a list of elements in order of

their appearance in the connectivity input statements. This list is referred to as the

Computational Element Sequence (CES) to distinguish it from another element list

which is formed as the component elements are individually defined and their

properties specified. This second list is called the Defined Element List. Each

element in the Defined Element List is unique, but may appear more than once in

the Computational Element Sequence. Subsequently, the CES is reordered such

that elements linked to the same node are listed consecutively, in upstream to

downstream order, where the flow convention is defined by the user in the syntax
18 USACERL ADP 98/129

of the input statements. Associated with the CES list, the program stores the

upstream and downstream node bounding each element as well as cross references

to the Defined Element List.

After completion of all program input, a coherent description of the system and its

components is constructed. At this point, the program must introduce some

internal definitions of the system which are more consistent with the mathematical

formulation of the problem than the external representation supplied by the user.

In particular, the external node system defined by the user is duplicated and

expanded into an internal node system, and the system is separated into branches.

The internal node system is constructed so that all points between which head and

continuity equations will be solved are represented. For example, a Surge Tank

Boundary condition is represented by a single external node in the SYSTEM input

command. However, for mathematical purposes at least three internal nodes are

defined: one internal node where the surge tank joins the preceding element, one

at the free surface, and at least one more to break the tank into two segments —

an infinitesimal segment over which an entrance loss can be calculated and a finite

segment over which head and discharge variations from the bottom of the tank to

the free surface are calculated. At least four internal nodes are defined for

differential surge tanks. Similarly, expansions and contractions require the

addition of one internal node; conduits require the addition of one internal node for

each segment after the first; and junctions require an additional internal node for

each pipe joined at the junction after the first. The system of internal nodes are

cross-referenced to the external nodes through a number of external node arrays.

Thus, all references by the program user may be in terms of external nodes only.

The identification of branches is also accomplished in this process. Originally, for

the purposes of the computation, a branch was defined as a series of linearly

connected elements with endpoints that are either boundary conditions or junctions.

For implementation on PCS, branch definition has been modified due to numerical

precision limitations such that each specified conduit is assigned to a separate

computational branch. The elements within the branch may be conduits, pumps,

valves, turbines or diameter changes. Such branches are distinguished by the

convenient property of being reducible to a single set of momentum and continuity

equations. The reduction process will be explained in Sections 2.6 and 6.7.

With the branch structure, element structure, and internal node structure of a

system so defined, the program now has a logical basis with which to structure a

system matrix (plus associated right hand side vector) organizing the numerous
USACERL ADP 98/129 19

USER REPRESENTATION

RES1

1 2

3

6

7

8

10

4 5 9

C1 C2 C3 C4 C6

C5

11

TURB

TW

EXP CON VLV2

ST

(SERIAL) BRANCH 1

1 2 3 4 5 6

CES RES1 VLV1 C1 EXP C2 CON C3 VLV2

External Node

Internal Node

Matrix Q Variable X(1)

Matrix H Variable

1 2 3 4 5 6 7 8 9

S( ERIAL)

BRANCH 3

7 9 10

8 CG TURB TW

17 19

X(9)

10 11

X(2)

X(3)

13

X(6)

X(7)

ST C5

16X(8)

15 14 12

X(4)X(5) GTJ1

(JUNCTION)

BRANCH 2

(SERIAL)

BRANCH 4

COMPUTATIONAL REPRESENTATION

Figure 1. System connectivity.

element equations into a unified, comprehensive set which can be solved simultaneously in an efficient manner.

Figure 1 summarizes the connectivity of a hypothetical example system, first from

the point of view of a user preparing connectivity input and then from a computational point of view after this input has been processed by the program. The

designated matrix Q and H variables shown in the figure will be referred to in later

sections of this manual. It is worth noting at this point that one of the prime ends

of the connectivity process is to determine which variables are included in the

system matrix.

2.4 System Boundary Conditions

At the boundaries, or end points of a system only certain types of elements may be

specified. These are the boundary elements introduced in Section 2.2: reservoir

elements, flow boundary elements, or surge tank elements. These provide

information to the model which is essential to the solution of any and all of the

system equations. This information consists of the head value, discharge value, or

a function relating head and discharge at each boundary point. Additionally,
20 USACERL ADP 98/129

boundary condition elements signal the program to end an old branch or start a new

branch during connectivity processing (Section 2.3).

The reservoir element is used to assign a specified head value (or schedule of

values) at a boundary. This is representative of a headwater condition, tailwater

condition, or free outfall at the end of a system. This will probably be the most

commonly used boundary element.

The flow boundary element is used to assign a specified discharge value (or schedule

of values) at a boundary. This element does not have a simple physical analogy.

It is very useful, however, for representing a connecting portion of a system not to

be explicitly modeled. For example, one branch of a system made up of parallel

generating units might be modeled explicitly while the others, including penstocks,

surge tanks, and turbines etc., are represented with a constant discharge. This

saves both data preparation and computational expense.

Where a surge tank element occurs at the end of a branch, a function relating the

head and discharge at the boundary is implicitly defined. See Chapter 6 for

elaboration on the nature of this function.

2.5 System Operating Conditions

For any system which includes a pump, turbine, pump-turbine, or valve, instructions specifying the operation of these components must be part of the input data.

A variety of common modes of operation of these elements can be simulated with

WHAMO. These are outlined briefly below.

Valve operation must be specified explicitly for each valve in a system by the use

of a schedule of position (in terms of percent opening or angle) versus time. For

pressure control valves, valve position is determined according to a specified

function of pressure at one or two reference points in the system. Obviously, the

equation to be written across a valve depends significantly on the valve opening.

Three options for pump operation are available:

1. Constant synchronous speed pumping in which as much power is drawn as is

necessary to maintain speed.
USACERL ADP 98/129 21

2. Synchronous operation until power shut-off, after which no power reaches the

pump and speed is allowed to vary according to the mechanics and hydraulics

of the situation.

3. An "off" option which is equivalent to not having the pump in the system at

all.

A turbine may be operated in one of five modes:

1. Synchronous speed generation in which the generator power output is equal

to the hydraulic power to the turbine minus losses.

2. Synchronous generation until load rejection, after which the generator load on

the turbine is zero and the turbine speed is allowed to vary according to the

hydraulic and mechanical conditions.

3. Turbine startup, in which turbine acceleration from 0 rpm under non-governor

wicket gate control is simulated.

4. Governor controlled generation, in which a schedule of generator load is

specified and turbine speed and wicket gate position vary according to a

specified governor function.

5. An "off" option which is equivalent to replacing the turbine with a closed

valve.

For the first three operating modes above the user must supply a complete schedule

of wicket gate openings, while for the fourth option, as stated, a schedule of

generator loads and a specification of governor properties is necessary to the

simulation.

The options listed above for pumps and turbines are all available for

pump-turbines. For pump-turbines, a wicket gate schedule must be supplied for the

pump and pump shut-off options as well as for the generate, startup and load

rejection options.

Complete specification of system boundary conditions and operating conditions is

clearly a prerequisite to a hydraulic simulation. Furthermore, these are the only

means by which transients can be generated in WHAMO. Unsteady hydraulic

response will result from varying conditions at the boundaries of the system, from

varying the opening of valves or wicket gates, and from changes in machine
22 USACERL ADP 98/129

operation, e.g., pump shut-off, turbine load rejection, or load variation under

governor control.

2.6 Computational Procedure

The computational strategy adopted for the transient simulation is briefly

introduced in this section. The main dependent variables of interest are the total

head, H, and discharge, Q, at each internal node of the system. Beginning with

time 0 (zero) the computation proceeds from time step to time step to the end of the

simulation. A complete solution of the system is computed at each time before

proceeding to the next time step. The length of each time step and the total length

of the simulation is specified by the user.

Between each pair of linked internal nodes, two governing equations can be written

in terms of the Hs and Qs at the nodes. These equations are based on momentum

or energy conservation and continuity principles. The exact form of the equations

depends on the type of element which links the two nodes. If the equations are

differential equations, a finite difference approximation is formulated, and if

non-linear, a linear approximation is formulated. The linear finite difference

equations written between each pair of linked internal nodes are termed the inner

equations. At each time step these equations are determined anew, depending on

the properties, operating mode (where applicable) and past history of each element.

It can be seen that two equations in four unknowns can be written for each segment

(that portion of a system bounded by two linked nodes). For each branch of N

segments there are a total of 2N inner equations and 2(N+l) unknowns, one H and

one Q at each of the N+l internal nodes contained in the branch. The deficiency of

two equations will be made up by the introduction of appropriate boundary and/or

junction equations at the ends of the branch.

The set of 2N equations in 2N+2 unknowns for each branch is reduced for reasons

of economy to a set of 2 equations in 4 unknowns by a recursive procedure called

forward construction. The procedure is described in Section 6.7 and in Resource

Analysis, Inc. (1976). The two branch equations which result from forward

construction are termed the outer equations, for these are written in terms of only

the Hs and Qs at the ends of the branch.

The branch outer equations of a system can now be solved simultaneously with the

junction equations and boundary equations to determine H and Q at all the branch

end points. In fact, instead of adding boundary equations to the set, unknowns are

removed from the set by inserting the known boundary H or Q values into the outer
USACERL ADP 98/129 23

equations where those variables appear. (Note: Subsequently in this manual,

junctions will be considered branches in themselves, and junction equations will be

considered outer equations.)

The set of outer equations is organized into matrix form (referred to hereafter as the

system matrix, including both the coefficient matrix and right hand side vector) for

solution. The structure of this matrix was formed as part of the connectivity

process (Section 2.3). Referring back to Figure 1, note that those variables which

will be included in the system matrix are predetermined from the connectivity and

numbered. At the same time, matrix row numbers are assigned to each branch for

the outer equations which will be written for that branch.

A standard, "off the shelf" matrix solver is utilized to solve the set of equations.

This routine uses the Gauss elimination technique with complete pivoting on the

largest element. This is often the most computationally costly part of the process.

The cost of solving an n-dimensional matrix is proportional to a factor between n2

and n3. The branch reduction process was therefore adopted to minimize the size

of the system matrix for the sake of economy. In contrast to matrix solution, the

cost of branch reduction is roughly proportioned to the number of inner equations

to the first power.

After H and Q at the branch end points have been calculated by simultaneous

solution of the outer equations, a process of back substitution uses the end values

to determine the H and Q at the intermediate nodes of a branch. This process is

outlined in Section 6.9 and in Resource Analysis, Inc. (1976). Essentially, it is the

reverse of the forward construction process.

Finally, in a separate computation at the end of each time step the mechanical

speed, power, and torque at machines is determined. The model is now ready to

repeat the entire process, beginning with forward construction, at the next time

step.

2.7 Initial Steady State Conditions

Prior to the transient simulation, the initial steady state heads and discharges must

be determined for the entire system. The initial steady state is generated

automatically by the model for the boundary conditions and the machine and valve

operating conditions specified. Computational procedure used for the steady state

determination is almost exactly that of the transient simulation, with the following

modifications.
24 USACERL ADP 98/129

First, the program makes an initial guess of the discharge in each branch. This is

necessary to form the inner equations for most element types. This guess, if not

supplied by the user is made on the basis of boundary conditions at the ends of

branches, the operating characteristics of machines which are part of branches, and

continuity relations at the junctions.

Another steady state modification is that the governing equations for conduits are

altered to eliminate unsteady and compressible terms and the governing equations

for surge tanks are altered to allow no flow (see Chapter 6). Otherwise, the

development of inner equations, forward construction, matrix solution, and back

substitution proceed as described in the preceding section. The final distinction is

that the steady state computation is not a repetitive process proceeding from time

step to time step, but an iterative process which is cycled until convergence to a

solution. This convergence is achieved when the discharge estimates used at the

beginning of a computational iteration agree closely with the calculated discharges

at the end of an iteration. If they do not agree, the calculated discharges from the

old iteration are used as the estimates for the new iteration and the computation

is begun anew. If, after a given number of cycles, convergence is not achieved, the

program will request that new discharge estimates be supplied by the user. This

is not a common circumstance. However, the user always has the option of

specifying estimates of branch discharges, machine operating heads and wicket gate

positions in order to speed the convergence process.
USACERL ADP 98/129 25

Figure 2. Procedure for using the WHAMO simulation system.

3 How To Use WHAMO

This section is a detailed guide to the application of the WHAMO model to hydraulic

transient simulation. It is designed to guide the user through the entire process of

performing a WHAMO simulation. The flow chart in Figure 2 shows the sequence

of steps to be followed, along with a reference to the corresponding section in this

manual.

Please note that there are two possible methods of creating a WHAMO input file.

They are:

C Command file method (old method)

C WHAMO Network Builder (new method).

Experienced WHAMO users may feel more comfortable using the command file

method, in which a word processor or text editor is used to create an input file as

explained in Section 3.3.. This is the method that has been used in previous

versions of WHAMO. It requires the user to be familiar with the WHAMO

command language. The other method is to use the WHAMO Network Builder as

described in Section 3.4. The Network Builder allows the user to create an input

file by drawing the network graphically on the computer screen. New users may
26 USACERL ADP 98/129

prefer this method because familiarity with the WHAMO command language

syntax is not required. However, users of both methods will want to refer to the

command glossary in Chapter 4 for detailed information on the data that is

required.

3.1 Installing the WHAMO System

The required computer configuration is as follows:

• IBM-compatible PC

• Windows 95 operating system

• 8 Mb RAM minimum

• 7 Mb available disk space minimum.

Because WHAMGR and BUILDER are Windows programs, they can be used with

any true Windows-compliant display (monitor) or printer.

You will need to install the main WHAMO program (WHAMO.EXE), the WHAMGR

program, and the WHAMO Network Builder.

First, create a new directory (folder) on your computer's hard drive for the main

WHAMO program. (If you do not know how to create a new directory, please refer

to your Windows 95 user’s manual.) It is recommended that you name the new

directory C:\WHAMO, but the directory can be given any name you wish. To

install the main WHAMO program, copy the compressed file "WHAMOSIM.ZIP"

from the floppy disk labeled "WHAMO" to the directory you have just created.

Decompress the file with WINZIP or a similar decompression utility.

The WHAMGR and WHAMO Network Builder installation disks each contain a file

called SETUP.EXE that launches the Windows 95 setup procedure. The default

directory for WHAMGR is C:\Program Files\WHAMGR. The default directory for

the Network Builder is C:\Program Files\Builder. You may change these directory

names or locations during the setup procedure if you wish; some users may wish to

install all of the programs in the same directory (e.g., C:\WHAMO). Follow these

steps to install each application.

1. Insert Disk #1 and open the folder for the A:\ drive

2. Double-click on the SETUP.EXE icon

3. Follow the on-screen instructions to load the program. Insert any additional

disks when prompted.
USACERL ADP 98/129 27

VERY IMPORTANT: After you have completed the initial setup, you must register

the system file named “vcf132.ocx” with Windows. If you skip this step, the

Network Builder and WHAMGR will not operate properly! Use the following steps

to register this system file:

1. Open an MS-DOS window. After the prompt, change directories to

C:\Windows\System. (If you do not know how to do this, please consult

your Windows 95 documentation.)

2. After the DOS prompt, key in and enter the following command:

C:\Windows\System> regsvr32 vcf132.ocx

Type in the character string exactly as it appears in bold letters above.

3.2 Data Preparation

The basic steps to preparing WHAMO input data for simulation of a hydraulic

system are outlined below, followed by discussion of further input options and

modeling issues. The terminology in the following steps is directed at the user who

is utilizing the command file method of creating input. However, the same steps

still apply to a user who is utilizing the WHAMO Network Builder method to create

the file. Instead of writing and inputting commands, the Network Builder user will

be using the mouse to place system elements on the screen and will be using the

pull-down menus to enter data about the system elements and the simulation

parameters. This should be kept in mind when reading this section.

The steps are:

1. Data gathering

2. Preparation of system schematic diagram

3. Listing of elements leading to preparation of the SYSTEM command

4. Input of element properties data

5. Organization and input of machine and valve characteristics tables

6. Definition of system operation

7. Specification of output requests

8. Specification of computational parameters

9. Adding execution control statements to complete the input file

10. Review and verification of input data
28 USACERL ADP 98/129

11. Updating input data for subsequent simulations.

In detail, the steps are:

1. The first step is to assemble all of the available data related to the hydraulics

of the system under consideration. The source of this data will vary depending

on whether an existing system, or the proposed design of a new system, is

being analyzed. The full extent and exact nature of the data required for

WHAMO modeling will become clear as the user progresses through this

manual. The first requirement is a sketch, drawing, or set of drawings which

depicts the pipe geometry and location of all key components of the system.

2. A simple schematic diagram is prepared to represent the system configuration

in the same terms as the WHAMO model input; that is, as a series of

individual elements which are joined at uniquely numbered node points (see

Figure 3). Each individual element is a component of a type introduced in

Section 2.2: conduit, valve, turbo-machine, surge tank, diameter change,

junction or boundary condition. Except for tapered conduits, a conduit

element has constant properties along its length. Where the hydraulic

properties change, a new conduit element is created and joined to the

preceding one by a node. Also, since head and discharge output is only

available at nodes, when the user is interested in getting this output at

intermediate points of a conduit, he must place nodes at those points and

break the conduit into individual elements which link the nodes together.

Intakes, bends, and orifices, etc., where special losses are calculated for a

conduit need not be individual elements but are modeled as part of the conduit

element. Wicket gates and governors that control turbines and pump-turbines

should not be shown as individual elements but are considered part of the

machine they serve.

As described in Section 2.4, appropriate boundary elements must be located

at the end points of the system. Boundary elements cannot form an entire

branch, so that they may not be joined directly to another boundary element

or a junction. For example, where a surge tank connects directly to a junction,

the user must show an intervening dummy conduit in the schematic. Further

details on the definition of system elements can be found in Chapter 4.

Node points are placed where elements join, and at the ends of the system.

Nodes serve as locations by which the user can interpret output data and by

which the program can determine the interconnection of elements (See Section

2.3). Junctions, boundary elements (including surge tanks), and diameter
USACERL ADP 98/129 29

changes are located at nodes, in contrast to all the other element types which

link between two nodes. Therefore, at a junction, all branching pipes are

linked to the same node — the node at which the junction is located.

Similarly, a node is not placed between a boundary element and the next

element of the branch. The node at which the boundary element is located is

the upstream or downstream node to which the next element is connected.

Neither are nodes placed between a diameter change element and the pipes

upstream and downstream. One node serves as the location of the diameter

change and the connecting point of the conduit elements.
30 USACERL ADP 98/129

DUM 2

1 2

HW

DC

FBC

DC2

TW

ST

3 4

5

6 7 8 9

10

11

C1 C2 C3

C4

V1 C5

C7

C6 T1

NOTE: Node 4 is a 

simple junction.

Replace this portion of the system 

with a constant discharge.

T

Figure 3. Schematic diagram of hypothetical system.

Each node and each element in the schematic diagram must be given a unique

designation — a four-character alphanumeric name for elements and an

integer number, one to four digits, for nodes. This includes all the element

types with a single exception, simple junctions. (Tee junctions must be

named.)
USACERL ADP 98/129 31

The final task in preparing the schematic is to designate the direction of

positive flow for each branch of the system. A branch is defined in Section 2.3

as a series of linearly connected elements with endpoints that are either

boundary conditions or junctions. The choice of positive flow direction is

arbitrary unless a turbo-machine or surge tank is included in a branch. A

surge tank must be at the downstream end of a branch, while positive flow

must be in the pumping direction for a pump, and in the turbine (or

generating) direction where a turbine or pump-turbine is part of a branch. A

sample schematic diagram for a hypothetical system is shown in Figure 3.

3. From the schematic diagram, a list is to be made of all the component

elements of a system. Each simple junction should be included in this list

even though these are not named. Beside each element list the upstream and

downstream node, or the node location for B.C.'s, junctions, and diameter

changes, and the element type. An example of the element list for the system

of Figure 3 is shown in Table 1. This list, plus the schematic, is the key to

preparing model input and interpreting the output. The SYSTEM command,

used to input system connectivity, can be written directly from the element list

(Chapter 4).

4. The next step is to go through the list element by element, excepting only

simple junctions, preparing the input data specifying the properties of each

using the appropriate primary command for the element type (e.g., CONDUIT,

PUMP, etc.). Details of the data required and the commands for each element

type are included in Chapter 4. It will be noted when writing VALVE,

RESERVOIR, and FLOWBC commands, that operating schedules may be

required. These may be omitted at this stage of the process and taken up

later.

If a turbine or pump-turbine is to be simulated under governor control, the

governor properties should be input for that element at this time using the

GOVERNOR command. The VALVE, RELIEF, PUMP, TURBINE, and P-T

commands require specifications of a characteristics type. Machine

characteristics are dealt with in the next step.
32 USACERL ADP 98/129

Element I.D. Type

Node

Location

Upstream

Node

Downstream

Node

HW Head Boundary 1- — —

Cl Conduit — 1 2

C2 Conduit — 2 3

DC Diameter Change 3 — —

C3 Conduit — 3- 4

— Simple Junction 4 — —

DUM Dummy Conduit 4 5 —

FBC Flow Boundary 5 — —

C4 Conduit — 4 6

V1 Valve — 6 7

C5 Conduit — 7 8

TJ Tee Junction 8 — —

C6 Conduit — 8 9

Tl Turbine — 9 10

TW Head Boundary 10 — —

C7 Conduit — 8 11

DC2 Diameter Change 11 — —

ST Surge Tank 11 — —

Table 1. Element list for hypothetical system.

5. Characteristics tables for machines and valves are input not for a particular

element (using, say, the PUMP command), but separately so that one set of

characteristics can apply to two or more similar or homologous elements

without having to be input more than once. (For example, characteristics for

a pump are input using a separate PCHAR command.) The input data for

each machine or valve element must include a reference to a particular

characteristics table (or TYPE). Characteristics tables are input according to

the directions in Chapter 4. The form that these tables must take is specified

for each machine type. If the data available for a machine or valve does not

fit one of the forms allowable for that type, then the data must be altered

using appropriate similarity or physical relations. It may sometimes be

possible to avoid or minimize this task by designating a pump or turbine unit

as a pump-turbine. In this way, the pump-turbine form of the characteristics

may be utilized if more convenient without altering the simulation options.
USACERL ADP 98/129 33

For a pump, fictitious characteristics for "wicket gate" values other than 100

will have to be input.

6. At this point, the physical properties and configuration of a system are

completely defined. The remaining input relates to the particular simulation

to be performed for the system defined above.

As outlined in Section 2.5, the operation of each machine and valve of the

system must be specified for the simulation. The options available for

machines are described in Section 2.5 and Chapter 4. These are input using

commands such as OPPUMP, referring to a particular pump element. The

OPTURB and OPPT commands require specification of a schedule number as

well as the operating mode of a particular element. The schedule number

refers to a wicket gate schedule or load schedule (depending on the operating

mode) input separately using the SCHEDULE command. Thus, to specify

load rejection for a turbine, the statement REJECT will appear along with a

schedule number under the OPTURB command, and the wicket gate schedule

will appear separately under a SCHEDULE command with an identifying

number the same as that designated under OPTURB.

The operating schedules for valves and/or boundary elements (not including

surge tanks) with time varying conditions are also input using the

SCHEDULE command. It will be necessary at this point to either go back to

the original VALVE command for each valve element to add the schedule

number which applies or, possibly to enter additional VALVE commands

which include only the schedule number and element identification. This

applies to boundary elements as well as to valves.

7. The physical system and its operation have now been completely defined.

Next, the user decides what variables are of interest for this simulation and

specifies that the simulated time histories of these variables be printed or

saved for plotting. The HISTORY, PLOT, or SPREADSHEET command is

utilized. In addition, if displays of input data are desired, they can be

requested using the DISPLAY command. There is also the SNAPSHOT

output option. With this option, the user requests printing of the heads and

discharges for the entire system at specified times.

8. The computational parameters are input using the CONTROL command.

These include the computational time step and output interval to be used for

different portions of the simulation, and the total length of the simulation.

This data must be included even if a check run or initial conditions run is
34 USACERL ADP 98/129

being requested. A computational weighting factor (THETA) may also be

specified as described in Section 4.4. The default value for THETA equal to

0.6 is usually suitable so this input may be omitted. The computational time

step selected for portions of a simulation when water hammer is significant is

typically of the order of 0.1 seconds. When the slower, more gradual mass

oscillation predominates, time steps as long as 10 seconds may be appropriate.

In general, the nature of the system and the simulation, along with the

experience of the user, will dictate the time step lengths selected.

9. The input file is now almost complete. A title line must be added to the front

of the file. This first line is not processed as the other input, but is simply read

as alphanumeric input. It is output in all header boxes and identifies the

output tables and the plot files. Following the input data, a GO command

causes the input editor to stop processing input data and to start execution.

The command following GO must be either GOODBYE, NEWRUN, or

RERUN. GOODBYE terminates execution, NEWRUN introduces a complete

new input stream for a new simulation, and RERUN is used to modify certain

items of the system or the simulation specifications, and then re-start the

simulation. The RERUN option should be used sparingly for it can lead to

wasted simulations. (Please note: users of the WHAMO Network Builder do

not need to perform this step.)

10. Prior to performing actual simulations, it is advisable to first do a CHECK run

with all display tables printed. When a CHECK command is included in the

input data, the program processes the data, checks for logic errors, and

displays the data, but does not execute the simulation. The user can then

review the displays and check for errors in the input data. When the input

processor detects logic errors in the input data, the run automatically becomes

a CHECK run. After the input data has been corrected and verified, the user

may choose to turn off some or all of the input displays in subsequent runs.

11. After the input data has been prepared, reviewed, and corrected, and the first

simulation successfully completed, the user will probably want to do additional

simulations with the same system, altering somewhat the system operation

or physical properties. The nature of the free format input makes it easy to

update the input data for a new run. Essentially, if a particular data item is

specified more than once in the input, the program uses the data as it last

appears. Therefore, changes in element properties can be effected by either

repeating or replacing the applicable element command. The operating mode

and schedule number for an element can be changed in the same manner.

Numerous schedules can be included with the input data, with the operation
USACERL ADP 98/129 35

commands referring only to those schedules which apply for a given

simulation. In fact, numerous elements can be defined in the input, while only

those included in the SYSTEM command will be included for that simulation.

The above examples are only some of the ways in which the user can take

advantage of the free format input language. The use of the RERUN

command further allows different simulations to be performed in the same

run.

3.2.1 Further Input Options and Modeling Issues

1. In addition to CHECK runs and full transient simulation runs, the user may

request computation of only initial steady state conditions. The model

computes these automatically as part of every simulation, but if an IONLY

command is included with the input, output is printed after the steady state

determination and execution is terminated. Two of the possible uses of the

IONLY option are these. (a) The user wants to replace a portion of a system

with a flow boundary element in order to save computational expense. In

order to determine the constant discharge value which he should use at the

flow boundary, he first specifies an IONLY run for the complete system. (b)

The user wants to simulate a generating system with a turbine under

governor control beginning (and/or ending) at a particular wicket gate

position. He needs to know the initial load to specify which corresponds to

that wicket gate position. He first does an IONLY run with the turbine

operating in the GENERATE mode, the wicket gate set to the desired value,

and the turbine power specified as output. There are many other possible

applications of the IONLY option. Obviously, time history plots cannot be

made from IONLY runs, but the SNAPSHOT output option is available.

2. Although it was not suggested in the step-by-step procedure, it is possible for

the same element with the same identifying name and properties to be

included in more than one location in the system. This short cut is not

recommended in general because it tends to be confusing. It is prohibited for

machines, valves, and differential surge tanks. A better shortcut to use when

two or more elements in a system have identical properties is to define AS

command to indicate that the properties of one are identical to those of

another. When two elements have close, but not identical properties, the AS

command can still be used, followed by the value of the distinguishing

property(s).

3. The computational time of WHAMO modeling is a function primarily of the

complexity of the system to be simulated and the number of simulation time
36 USACERL ADP 98/129

intervals. The latter factor is quite straight-forward. After subtracting the

time (which is not great) of loading the program into memory and processing

the input data, the simulation cost is roughly proportional to the total number

of time steps requested, which is to say, the number of times the

computational process is repeated. It therefore behooves the program user to

limit the length of a simulation to the time period of particular interest and

to choose time steps as long as computational accuracy will permit.

Advantage should be taken of the WHAMO capability to vary the length of the

time steps during the simulation period, allowing short time steps while water

hammer predominates and long time steps during mass oscillation. System

complexity increases the computational cost per time step. To a lesser extent,

this cost increases as the number of system elements and conduit segments

increase. The more important factor controlling computational cost is the

number of branches in the system, including both junction branches and serial

branches, for this dictates the size of the matrix to be inverted at each time

step. Time spent doing matrix solution, usually the most time consuming part

of the computation, is a function of the dimension of the matrix raised to the

second to third power. It is for this reason that substantial savings can

sometimes be achieved by replacing a complex portion of a system with a flow

boundary element when that portion of the system is not under study.

Additionally, judicious representation of the system can sometimes minimize

the number of branches. Figure 4 shows schematically a pipe flow splitting

in four directions. If modeled exactly as constructed, ten system branches are

included. A slightly modified version reduces the total to six.

4. Truncation error, or the error inherent in approximating the governing

differential equations using discrete intervals of time and segments of space,

is reduced as the time intervals and spatial segments are diminished in size.

Accordingly, at some cost in computational expense, the user should expect

greater computational accuracy using smaller time steps and finer

segmentation of long conduits. Ideally, these would be reduced until there is

an insignificant change in the simulation results.

Another source of error in digital computer processing is related to the fact

that only a fixed number of digits can be stored for any given number. This

is termed round-off error. The matrix solving routine in WHAMO can be

susceptible to inaccuracies due to round-off error. Contrary to truncation

error, round-off error tends to increase with finer conduit segmentation and

shorter time steps. Both the matrix solver and subsequent computations

include accuracy checks, so that the user is warned when round-off error
USACERL ADP 98/129 37

TEN BRANCH REPRESENTATION

10

9

8

4

2

1

7

6

5

3

6

2

1

5 4 3

SIX BRANCH REPRESENTATION

Figure 4. Two representations of four-way junction.

becomes significant. In this event, the number of segments for long conduits

should be reduced and/or the time step length should be increased.
38 USACERL ADP 98/129

When the truncation errors are not random in nature but have a definite

tendency to one direction or the other, the errors accumulate rather than

compensate and large inaccuracies soon develop. This phenomenon is termed

numerical instability. It was never encountered in the development and

testing of the WHAMO model but has been a serious problem with other

similar models. In those cases, numerical stability has been very sensitive to

small adjustments in the computational weighting factor, THETA (Sections

4.4 and 6.4). In general, greater stability is achieved as the value is increased

from 0.5 toward 1.0, but this cannot always be said to be the case. Generally,

the default value of 0.6 gives good results. As mentioned in Section 2.1, when

simulating very sharp transients due to pump shutdown or rapid valve

closure, there may be some "noise" in the results. This "noise," a high

frequency oscillation superimposed on the real solution in the vicinity of sharp

wave fronts, can be minimized or eliminated by selecting a time step during

the period of sharp transients which is an even multiple of the segment length

divided by the celerity or, /\t = n /\x/c.

5. The results of any computer model should be reviewed very critically by the

user. Besides making certain that the input data is accurate, he should

experiment with different time step lengths and different segmentation of long

conduits to be sure that the important features of a simulation are not

sensitive to small changes in these computational parameters. He should also

analyze the sensitivity of this simulation to changes in system and operational

properties — such as friction factor, celerity, and gate closure rates — which

may not be known precisely. The water hammer effect has often been found

sensitive to very small changes in gate closure schedule. It is also

recommended that a WHAMO user check turbo-machine simulation results

to be sure that they adhere faithfully to the machine characteristics. This is

done by using the applicable similarity relations presented in Chapter 6 to

scale down the simulation output to be compatible with the characteristics,

then plotting simulated operation along with the characteristics to be sure

that they agree. Speed change can also be checked by making some hand

calculations based on equation (6.24). Further, any other analytical tools

which can reasonably be applied should be used to check simulation results.

Finally, the user must test every simulation against his experience and

understanding of the phenomena and be satisfied before accepting the

computer model results.
USACERL ADP 98/129 39

3.3 Creating an Input File Using a Text Editor and Commands

3.3.1 Input Conventions

The WHAMO program employs a free format Problem Oriented Language (P.O.L.)

input code. This is a command structure where each data value being entered is

identified by an alphanumeric "tag" and thus assigned to its desired location. The

Appendix contains reference indexes that may be used to locate input command

instructions for particular aspects of WHAMO simulations. Input files are created

with a word processor or text editor. Almost any of the commercially available word

processing programs can be used. The only requirement is that the file must be

saved in ASCII text format.

The input data consists of two levels of commands referred to as primary and

secondary commands. The PRIMARY level commands are used to specify the type

of data which follow, i.e., does the data refer to a conduit element, system

connectivity, etc. Each primary command sequence will begin with a single

alphanumeric word, contain a set of secondary commands, and terminate with a

FINISH command. SECONDARY level commands normally will consist of an

alphanumeric command tag followed by the required numeric data value or values.

On occasion, a secondary command will consist solely of a single alphanumeric

command.

In order to enhance user interaction with the system, the data will be read in a free

format fashion. Using such a format, each command tag and/or data value will

have no fixed location in an input line but will be simply separated from the other

data by one or more blanks acting as delimiters of the data string. Such a format

also permits the sequence of secondary commands within a primary command block

to be as desired, rather than dictated by programming considerations. A typical

command sequence in a data input file might look as follows:

CONDUIT ID Cl DIAM 6 LENGTH 100.3 FINISH

Tag Data Tag Data Tag Data

Primary Secondary Secondary Secondary Terminates

Command Command Command Command Primary

Block Block Block Command

Block

Basically, the above commands serve to define a conduit element with the following

properties:
40 USACERL ADP 98/129

Identifier: Cl

Diameter: 6 (feet)

Length: 100.3 (feet)

Some other aspects of the input editor are worth noting:

1. Comments may be included in a set of secondary commands by enclosing them

in parentheses (). The parentheses must be offset from both the preceding and

succeeding data or comment by at least one space. All comment sequences

should be terminated by a) or will be automatically terminated by the end of

record.

2. Processing of an input record is terminated if an open bracket character [ is

read. The bracket must have at least one blank on each side of it.

3. Comment lines may be included between primary command blocks by use of

the primary command, C.

C COMMENT IN PRIMARY SEQUENCE

4. It is possible to abbreviate all commands (primary and secondary) to four

characters in length, e.g.:

COND and CONDUIT

DIAM and DIAMETER

are equivalent commands. It is recommended however, that enough of the

command be retained to preserve the meaning of the command.

3.3.2 Command Groups and Input Sequence

Following is a list of the P.O.L. primary commands and a brief description of their

use. These commands fall logically into five groups: those which define the

individual system elements, those which define the interconnection of these

elements within the system, those which specify the output information desired by

the user, those which specify the operating conditions to be simulated, and those

which initiate and control program execution.

Element Commands
USACERL ADP 98/129 41

The following primary commands are used to define the properties of the hydraulic

elements. Each element in the network must be defined by such a command,

followed by the data which specifies its hydraulic properties.

CONDUIT Defines a circular, closed conveyance element which has constant

properties along its length (except that the diameter may vary

gradually).

DCHANGE Defines an expansion or contraction element between conduits of

different diameter.

FLOWBC Defines a specified discharge condition at a boundary of the system.

GOVERNOR Defines a governing mechanism for pump-turbines and turbines.

ONEWAY Defines a non-return or check valve.

PCVALVE Defines a pressure control valve.

PUMP Defines a pump.

P-T Defines a machine which can be operated in either the pump or

turbine mode.

RELIEF Defines a pressure actuated valve. The function of this element is

similar to the PCVALVE element, but operation is specified in a

different manner.

RESERVOIR Defines a free water surface boundary which may be headwater,

tailwater, or a canal, etc.

SURGETANK Defines a simple surge tank, one way surge tank, Johnson

differential surge tank, or air chamber surge tank.

TJUNCTION Defines a three way Tee Junction for which head losses are

calculated across the junction.

TURBINE Defines a turbine.

VALVE Defines a throttling device of a certain type.
42 USACERL ADP 98/129

Machine and Valve Characteristics Commands

These commands provide further definition of machine and valve elements. Each

set of characteristics may apply to any number of machine and valve elements.

PCHAR Defines the characteristics of each type of pump with dimensionless

four quadrant curve data of head and torque versus speed and

discharge.

PTCHAR Defines the characteristics of each type of pump-turbine with model

data relating discharge and torque to speed and wicket gate opening.

TCHAR Defines the characteristics of each type of turbine with prototype or

model data relating head (or phi), wicket gate opening, power, and

discharge.

VCHAR Defines the characteristics of each specific type of valve with a

discharge or head loss coefficient versus opening curve.

System Command

The following primary command is used to specify the interconnection of all the

system elements except the GOVERNOR element (also, VCHAR, PCHAR, TCHAR,

and PTCHAR, which are used to define the characteristics of certain elements and

not the elements themselves).

SYSTEM This command specifies the connection of the system elements by

defining the node points which bound each element.

Output Commands 

With these primary commands the user can specify the form and extent of the

computer output.

DISPLAY Specifies which portions of the input data should be displayed

in tabular form as part of the printed output.

ECHO/NOECHO Specifies whether the input commands should be echoed in the

output or not. Input commands are echoed by default.
USACERL ADP 98/129 43

HISTORY Specifies the elements and variables for which time histories

are to be printed as part of the computer output.

PLOTFILE Specifies the elements and variable for which time histories are

to be saved for plotting by WHAMGR.

SNAPSHOT Specifies printing of the heads and discharges throughout the

system at certain times.

SPREADSHEET Specifies the elements and variables for which time histories

are to be saved to file in a spreadsheet compatible format.

TEXT Used to enter a text message to be printed with the header of

simulation results output tables.

Simulation Commands

With these primary commands the user controls the system operating conditions

which are to be simulated, and the computational parameters of the simulation.

CLOSURE Defines a dimensionless, non-linear curve for the "cushioning"

portion of the special gate closure option.

CONTROL Controls the computation parameters such as the time step and the

numerical weighting ratio.

FLUID Specifies density for fluids other than water.

INITIAL Allows specification of preliminary estimates of discharge, head,

and/or wicket gate opening to be used in the initial conditions 

determination.

OPPUMP Specifies the operation of each pump.

OPPT Specifies the operation of each pump-turbine.

OPTURB Specifies the operation of each turbine.

SCHEDULE Defines the operating schedule for valves, turbine gates, and

generator loads, as well as the head or flow schedules for boundary

conditions.
44 USACERL ADP 98/129

SEPARATION Specifies the pressure below which a message will be printed

warning of possible water column separation.

Execution Commands

A number of commands control the execution of the simulation run. These include

the CHECK, GO, IONLY, NEWRUN, RERUN, and GOODBYE commands.

Input Sequence

Except for execution commands, WHAMO primary commands may be input in any

sequence. A recommended input sequence of command groups, corresponding with

the data preparation steps given in Section 3.2, is presented below:

1. Simulation Title (must be first line)

2. SYSTEM Command

3. Element Commands

4. Machine and Valve Characteristics Commands

5. Output Commands

6. Simulation Commands

7. IONLY or CHECK (if applicable)

8. GO (indicates end of input data for this simulation)

9. GOODBYE (must be last line)

3.4 Creating an Input File Using the WHAMO Network Builder

WHAMO Network Builder is a Windows application which is used to graphically

build the system network and create the WHAMO input file. WHAMO and

Network Builder are linked by the WHAMO input file. Through Network Builder,

you can construct the system network, input the element descriptions and

operational information, and provide the simulation control information. Network

Builder exports a WHAMO input file which contains all the information necessary

to run a WHAMO simulation.

IMPORTANT NOTE: There is a difference in network construction philosophy

between using the Network Builder and using a text file to define the network. In

Network Builder, two system elements which are not conduits cannot be joined

together directly. Conduits must be used to link these elements. This is different

than the text file method, which does allow elements that are not conduits to be

joined together directly.
USACERL ADP 98/129 45

3.4.1 Starting WHAMO Network Builder

The following instructions assume that Network Builder is already installed on your

computer. If it is not, see Section 3.1 for installation instructions.

Start WHAMO Network Builder by clicking the Windows 95 “Start” button and

selecting “Run”. Click the “Browse” button and go to the directory in which the

WHAMO Network Builder was installed. Select BUILDER.EXE, then click OK and

the program will start. You may also start BUILDER.EXE from the Windows

Explorer. Frequent users may find it convenient to create a shortcut to

BUILDER.EXE and place it on the Windows 95 desktop.

The Network Builder main menu window will appear on the screen (Figure 5). The

menu bar contains eight selections that control the basic operation of Network

Builder. The eight selections on the menu bar are:

File Controls program functions such as file opening and closing plotting,

printing, and exiting

Edit Provides input windows for computational parameters, machine

component characteristics, and schedules; and controls for some screen

manipulations

View Controls the display characteristics of the Main Menu Window

Structure Controls the display grouping of system elements

Align Controls the alignment of system elements

Graphics Controls graphics options

Window Toggles display window

Help Online help facility

In addition to the menu bar, an input grid and icon palette will appear. The icon

palette contains icons which represent the different network elements, as well as

graphics/text features which can be added to enhance the network diagram.
46 USACERL ADP 98/129

Figure 5. WHAMO Network Builder opening screen.

3.4.2 Creating a WHAMO Network

A blank input grid is displayed when Network Builder is started (see Figure 5).

Additional blank input grids can be obtained by clicking on "File" on the main menu

bar, then on "New". Whenever a new input grid is displayed, an icon palette is also

displayed.

The network schematic is created by placing system elements (valves, machines,

boundary conditions) on the input grid, then linking them with conduits. The

program prompts for descriptive information about each component after it is placed

on the grid. Detailed instructions for placing and describing system components are

given in the following sections.

3.4.2.1 Elements. The first step in creating a WHAMO network is to define and

place the system elements. These elements include valves, turbines, surge tanks,

and boundary elements. All elements are added by clicking on the appropriate icon

on the icon palette, then moving the cursor to the desired location on the grid and
USACERL ADP 98/129 47

clicking again. Hold the cursor over an icon to display its name or function. The

required number of nodes will be automatically associated with the element (for

example, two nodes for a valve: an inflow and an outflow node; and one node for a

surge tank). The position of these nodes can be changed to simplify the layout of

the system. If you click on the node, a dashed box will appear. Move that box to

the desired location of the node.
48 USACERL ADP 98/129

Figure 6. Reservoir data entry screen.

Figure 7. Pump data entry screen.
USACERL ADP 98/129 49

After you have placed each element, you will be prompted for data that further

describes it. Figure 6 shows a reservoir that has been placed on the grid and

expanded in size, along with its data entry box. Figure 7 shows a pump and its

data entry box. It is usually easiest to enter the descriptive data as the network is

created, however, it may also be added or edited later on by simply clicking on the

element. The appropriate dialog box will appear and you may enter or edit the

data. Table 2 lists the available elements and describes the data requirements for

each. For further details on any of the data requirements, consult the Command

Reference in Chapter 4.

Table 2. Data requirements for system elements.

Element

Category

Element Name Descriptive 

Data Requirements

Flow

Elements

Diameter

Change

Element

A diameter change element is used to represent head losses for

locations where there is a significant change in conduit

diameter. The positive and negative head loss coefficients can

be specified directly, or you can specify the geometry of the

diameter change, and the head losses will be computed.

Control Valve Within the valve input dialog box, you are asked to identify the

valve type and assign a valve schedule number to it. If the

valve type is undefined, then you must input the valve

characteristics through the Edit option of the Main Menu Bar as

discussed in Section 3.4.3. The valve schedule is also entered

through the Edit option.

One Way Valve The physical parameters of the one way valve are entered

through the input dialog box. You can reverse the direction of

allowed flow through the input dialog box.

Pressure

Control Valve

The physical parameters and flow characteristics are entered

through the input dialog boxes. If the valve is user defined,

then you must input the valve characteristics as discussed in

Section 3.4.3.

Turbo

Machines

(cont’d on

next page)

Pump The required physical parameters of the pump are entered

through the pump input dialog box. If the pump has the same

physical parameters as a previously defined pump then the

parameters can be transferred as described for conduits, and

re-specification of the parameters is not needed. You may

assign the pump a characteristic type through the pump input

dialog box. The pump characteristic data is entered through the

Edit option of the Main Menu Bar. The operation specification

of the pump is also entered through the pump input dialog box.
50 USACERL ADP 98/129

Turbo

Machines

(cont’d)

Turbine The required physical parameters of the turbine are entered

through the turbine input dialog box. If the turbine has the

same physical parameters as a previously defined turbine then

the parameters can be transferred as described for conduits,

and re-specification of the parameters is not needed. Operation

parameters are also transferred in this process. The turbine

characteristics are entered through the Edit option of the Main

Menu Bar. The gate schedule is entered as a valve schedule

through the Edit option, and a generator load schedule is

entered as a load schedule through the Edit option. The

operation specification of the turbine is entered through the

turbine input dialog box. An estimate of initial gate position and

head is needed only if you are simulating governor control.

Pump-Turbine The physical parameters and schedules for the pump-turbine

are entered in the same manner as for the pump and turbine

described above.

Boundary

Elements

Flow Boundary When you add a flow boundary condition, an input menu for the

boundary element appears. The boundary ID must be specified

together with either a constant discharge amount or a discharge

schedule. The discharge schedule is specified by checking the

flow discharge box and assigning a schedule number in the

accompanying box. The actual discharge schedule is entered

through the schedule menu (discussed in Section 3.4.3).

Free Surface

Boundary

A free surface boundary is created by inserting a reservoir

element. You must specify the reservoir ID, and the reservoir

water surface elevation as either a constant elevation or an

elevation schedule. If specifying an elevation schedule the

head schedule box is checked, and a schedule number is

assigned. The actual head schedule is entered through the

schedule menu (discussed in Section 3.4.3).

Simple Surge

Tank

Through the input dialog box, enter the surge tank ID and the

physical parameters of the surge tank as specified in Chapter 4.

Differential

Surge Tank

A Johnson differential surge tank can be represented by a

differential surge tank element. Specify the differential surge

tank ID and the physical parameters of the differential surge

tank as specified in Chapter 4.

Air Chamber

Surge Tank

For an air chamber surge tank, you must specify the element

ID, and physical and thermodynamic properties of the surge

tank.

3.4.2.2 Conduits and Flow Direction. In Network Builder, conduits are used to

link elements, and no nodes are automatically associated with a conduit. The

conduits can represent actual physical pipes, or can serve as a dummy link between
USACERL ADP 98/129 51

two elements. The start and end point elements of a conduit must be placed on the

grid (as described in 3.4.2.1) before the conduit can be added. Those elements are

then linked by clicking on the link (conduit) icon, and then clicking on the nodes

associated with the start and end point elements.

It is important to maintain a consistent direction of flow throughout the system

network. When elements such as pumps or valves are added to the system

schematic, a default direction of flow is indicated through the associated nodes.

This direction can be reversed by moving the position of the associated nodes from

one side of the element to the other. In a conduit the positive direction of flow is in

the direction of the end point of the conduit.

The required descriptive information for conduits is entered through the element

dialog box. Entrance and exit losses, and additional losses can also be specified.

Conduits with variable diameters can be specified by checking off the variable

diameter box, and then specifying the length and diameter of each section through

the variable diameter schedule box. If multiple conduits have exactly the same

physical properties, after one conduit is specified its properties can be transferred

to other conduits. To do this, left click on the conduit to be copied, select Copy from

the Edit Menu on the Main Menu Bar, then click on the new conduit with the right

mouse button. If properties have been transferred then a message appears on the

screen which says "Conduit properties transferred." A conduit can also be

designated as a dummy conduit by checking off the dummy conduit box, in which

case no descriptive information is required.

3.4.2.3 Nodes, Simple Junctions. As previously mentioned, nodes are

automatically associated with system elements. Additional nodes can be added to

the system as needed, for example when joining two or more conduits. A simple

junction is therefore created by adding a new node to the system and connecting 3

or more conduits to that node. No descriptive information about a node is required.

You can specify the elevation of the node and request time history data of discharge

and head at the node.

3.4.2.4 Removing Elements or Links, Revising Connectivity. You can revise the

network and can remove elements or conduits from the network. To remove a

system component, select it, then click on Delete under Edit on the Main Menu Bar.

It is very important to remove components with the Delete option instead of the Cut

option, because Cut may not remove the component completely from the network.

You must remove both the element and the associated nodes when removing an

element such as a pump from a network. If you delete either the start point node

or end point node of a conduit, then the linking conduit will also be deleted.
52 USACERL ADP 98/129

Figure 8. Pump characteristics box.

3.4.2.5 Tee Junctions. Tee junction elements are used in place of simple junctions

in order for WHAMO to automatically compute head losses at junctions of 3

conduits. Only conduits or dummy conduits can be connected directly to tee

junctions. The tee junction parameters are defined in Chapter 4.

3.4.3 Inputting Schedules and Characteristics

Schedules and machine characteristics are input through the Edit option on the

Main Menu Bar. To enter machine characteristics, select Characteristics, then the

class of machine to be described: Valve, Pump, Turbine, or Pump-Turbine. For any

of these elements, enter the assigned type number (corresponding to the assigned

type number from the element dialog box), and then enter the characteristics, as

described in Chapter 4, through the characteristics dialog box. Figure 8 shows the

pump characteristics dialog box.

To enter a schedule, select Schedule and then the type of schedule to be entered:

Valve, Load, Head Boundary Condition, or Flow Boundary Condition. Once the

schedule dialog box is open, click Add Schedule, then enter the schedule data. The

schedule information is entered as described in Chapter 4. Figure 9 shows the

valve schedule box.
USACERL ADP 98/129 53

Figure 9. Valve schedule dialog box.

3.4.4 Output Control

Element specific time history data is specified through the input dialog box for that

element. Figure 10 shows the time history box for the pump that was shown in the

previous figures. Click on the history box , then choose one or more of the output

parameters to be displayed. Choose the file type to which the output is sent.

Output data can be written to a simulation log file, a plot file to be plotted in

WHAMGR, or a spreadsheet file. Some element types provide multiple history

buttons. This provides flexibility to send the various parameter data to different

output files, or to send the data to multiple output files. Time history data for flow

boundary and free surface boundary elements can be obtained by specifying time

history output for the nodes associated with those elements.

The formatting of output is controlled through the Edit option on the Main Menu.

Select Output Options from the options under Edit, then select History Format and

specify the format you wish to use.

You can also specify what input data is printed out in tables. Select Edit from the

main menu bar, then Output Options, then Display. Select which input parameters

are to be repeated in the output (Figure 11).
54 USACERL ADP 98/129

Figure 10. Time history dialog box.

Figure 11. Display options dialog box.
USACERL ADP 98/129 55

3.4.5 Simulation Controls

The execution controls for a simulation are entered through the Edit option on the

Main Menu Bar. Select Control from the options under Edit, and then enter the

simulation control parameters as described in Chapter 4.

3.4.6 Specifying Initial Branch Estimates

The specification of initial branch discharge is an infrequently used function, and

is not normally required input for a WHAMO simulation. However, if the steady

state computation does not converge to a solution, it may be necessary to input

estimates of initial conditions. To specify these conditions, input the serial branch

number and the estimated initial steady state discharge by selecting Initial Branch

Flow under the Edit option on the Main Menu Bar. A previous simulation of the

system is required to obtain the serial branch numbers from a printout of the

system schematic in the log file.

3.4.7 Saving and Retrieving WHAMO Schematic Files

Network Builder saves the WHAMO network, element characteristics and

schedules, and simulation control information to a *.whm file type. This file can be

subsequently read by Network Builder to revise the model network. This file type

is not readable with a text editor or by WHAMO.

Clicking on the File menu item displays 12 sub-menu items: New, Open, Close,

Save, Save As, Export, Print, Print Preview, Page Setup, Print Setup,

Recent Files, and Exit.

WHAMO schematic files can be saved using either the Save or Save As commands.

When saving a newly created schematic file for the first time the Save and Save As

commands function in the same manner. A dialog box appears which allows you to

specify the name of the file, the file type (either *.whm WHAMO schematic, or *.*

all files as yet undefined), and the directory path to where the file will be saved.

When saving edits to a file that had previously been saved, the Save command

saves to the default schematic file name.

When Network Builder is started the most recently edited schematic files are listed

in the sub-menu, and can be retrieved by clicking on the desired file name.

Otherwise, clicking on Open creates a dialog box for listing directories and files from

which to select a data file for retrieval. Click on the desired schematic file (causing

it to be highlighted) then click Open to retrieve the file.
56 USACERL ADP 98/129

Figure 12. Exporting a file to WHAMO.

3.4.8 Exporting to a WHAMO Input File

Creating a WHAMO input file is accomplished using the Export command on the

File menu (Figure 12). You must do this for WHAMO.EXE to be able to run the

simulation. Only files with the *.inp file extension are created using Export. The

WHAMO input file contains all the information required to run a WHAMO

simulation. The WHAMO input file is an ASCII file which can be edited with a text

file. Input files cannot be reopened and edited in Network Builder.

3.4.9 Printing

The diagram of the WHAMO schematic can be printed. Clicking on the File menu

item will display the following submenu items related to printing:

Page Setup You can set the orientation of the figure on the page, either portrait

or landscape, and can set the width of the borders

Printer Setup You can select the printer destination, paper selection, and other

printer settings
USACERL ADP 98/129 57

Print Preview Allows you to preview the schematic as it will appear on the printed

page.

3.4.10 Modifying View

There are several options for modifying the appearance of the input screen. These

options are found under the View item on the Main Menu Bar.

Grid When the Network Builder opens an input screen, a grid

automatically appears. You can remove the grid by

removing the check next to Grid Visible under the View

option. When components are added to the network, by

default they snap to the nearest grid square corner. You

may turn off this option by removing the check next to Snap

to Grid. This allows flexibility in locating network

components.

Zoom Controls the size of the entire network image. Click on the

option Zoom, then either choose a pre-set magnification or

define a specific magnification. You can also interactively resize individual network components by clicking on the

component and re-sizing the rectangular box that pops up

associated with that component.

Display Element

IDs

Toggles the display of element IDs on and off. Select View

from the Main Menu Bar, then click on Display Element

IDs to toggle the display.

Display Node

IDs

Toggles the display of node IDs on and off. Select View from

the Main Menu Bar, then click on Display Node IDs to

toggle the display.

Aligning

Network

Components

Network components are aligned using the options found

under Align on the Main Menu Bar. Select the components

to be aligned, then choose the type of alignment you wish to

apply from the Align menu.

3.4.11 Enhancing the Diagram

Several options are available to you if you want to enhance the network schematic

diagram. You can add text, lines, and shapes to the diagram without altering the

system network. These are added by clicking on the appropriate icon on the palette
58 USACERL ADP 98/129

and then placing the shape or text at the desired location on the diagram. When

you select "text," you can type the desired text into the box that appears.

Through the Graphics option on the Main Menu Bar, you can customize the color,

font, and fill of lines and text added to the diagram. Changes to the color and font

settings impact only those shapes or text subsequently added to the diagram.

Previously added text or shapes are unaffected. You can also import bitmaps into

the diagram using the Import Bitmap option found under the Graphics menu item.

3.4.12 Online Help

Online help is available in Network Builder. Select Help from the Main Menu Bar,

then select Help Topics. Choose a topic from the contents page that appears.

3.5 Running the WHAMO Simulation

WHAMO is executed under the Windows 95 operating system. This manual

assumes you are familiar with the Windows 95 environment including the use of a

mouse and window controls; if not, please refer to your Windows 95 documentation.

To run WHAMO, press the Windows 95 “Start” button and select “Run.” Click the

“Browse” button and go to the directory in which WHAMO was installed. Select

WHAMO.EXE, then click OK and the program will start. Or, you may simply

double-click on the file WHAMO.EXE. You may also start WHAMO.EXE by

double-clicking on it in the Windows Explorer. Frequent users may find it

convenient to create a shortcut to WHAMO.EXE and place it on the Windows 95

desktop.

WHAMO runs in an MS-DOS text window. When the program starts, you will be

prompted to type the names of 4 files associated with the simulation you are

running. They are:

Input Data File This is the ASCII text file which contains the input commands

and data used to define a WHAMO simulation. The file is

created using a text editor or word processor as described in

Section 3.3, or by using the WHAMO Network Builder as

described in Section 3.4.

Output File This is an ASCII text file that will be created by WHAMO and

will contain tabular input data and results for this simulation.
USACERL ADP 98/129 59

Press <enter> to create a file with the same root name as the

input file with an extension of .OUT. To give the file a different

name, type it at the prompt. However, using the default name

makes it easier to keep track of your work.

Plot File This is an unformatted file that will be created by WHAMO for

storing simulation results for graphical plotting by the

WHAMGR program. Type <enter> to create a file with the

same root name as the input file with an extension of .PLT. To

give the file a different name, type it at the prompt. However,

using the default name makes it easier to keep track of your

work.

Spreadsheet This is an ASCII text file created by WHAMO for storing simuFile lation results in a tabular form generally compatible with

spreadsheet programs. Type <enter> to create a file with the

same root name as the input file with an extension of .TAB. To

give the file a different name, type it at the prompt. However,

using the default name makes it easier to keep track of your

work.

After the file names have been input, the WHAMO simulation will run without

further user interaction according to the instructions contained in the input file. 

The current simulation time will be displayed on the screen so that you can track

its progress. Diagnostic and error messages generated by the WHAMO program,

if any, will be written to the specified output file. When the simulation is finished,

the DOS window in which WHAMO was running will close. You are now ready to

view the results.

3.6 Diagnostics

The WHAMO model provides extensive error checking for input syntax, and for

completeness and reasonableness of the input data before embarking on the

simulation computations. A diagnostic message is printed for each error when it is

detected. These messages are self-explanatory. As with any system of error

diagnosis, a single input error can lead to numerous diagnostic messages as the

effect of that error is felt in different parts of the program. Particular attention

should be paid to the first diagnostic message. One of the most common input

errors is to omit the FINISH statement at the end of a primary command group.

When this occurs, a diagnostic will be printed indicating that the subsequent
60 USACERL ADP 98/129

primary command is not a recognized secondary command under the previous

primary command.

If the steady state computation fails to converge, a message is printed which directs

the user to assist the program by including an INITIAL command with the input.

This message includes a display showing the program designated branch numbers.

If steady state convergence cannot be achieved, even with the use of the INITIAL

command, it may be necessary to begin the simulation with no flow by closing a

valve or wicket gates, then slowly bring the system to the desired initial state

during the transient simulation.

As mentioned previously, the program checks during the computation for

inaccuracies resulting from round-off error. On detection of such an error, a

message is printed which begins either

*** LETAM-TEST ***

or

*** SOLVER ***

If one of these messages is encountered, the user should adjust the segmentation

of conduits or the time step as described in Section 3.2. If ONEWAY or RELIEF

elements are used, a minimum time step length can be specified with DTMIN under

CONTROL.

Other errors encountered in the computation phase of the program will cause the

computation to terminate, and the results up to that time will be printed followed

by a "fatal" error message. Two examples of this type of error message are as

follows:

*** TRANS *** NO CORRECT TRANSIENT SOLUTION

AFTER ITERATIONS AT TIME ,-- FATAL

*** SETPT *** AT TIME , NO CONVERGENCE TO

COEFFICIENTS OF LINEAR H-Q EQUATION

FOR ELEMENT -- FATAL

If these or other errors are encountered during computation, the cause could be an

obscure error in the input data. In some cases, reducing the length of the

computational time step is the solution. Another likely source of problems is the

machine characteristics data. These data need to be carefully checked for

transcribing errors. Moreover, if these data are not "smooth," if not enough table
USACERL ADP 98/129 61

points have been supplied to insure precise interpolation, or if the simulated

conditions exceed the bounds of the characteristic tables, program computations

may not converge. The characteristics plotting capability of WHAMGR should be

utilized to check for input errors or poor interpolation. In general, if computational

time steps of about 0.025 seconds are not short enough to get past a "sticky" point

in the simulation then the characteristics data should be checked and augmented

in the region where difficulties occur.

As mentioned above, if the simulated operating condition of a machine exceeds the

range of the characteristics table, computational difficulties may arise. Warning

messages will be printed, for example:

***NXSTEP*** SIMULATION MAY EXCEED RANGE OF

CHARACTERISTICS FOR ELEMENT AT TIME -- WARNING

The user must take particular care that sufficient characteristics data are input,

especially for turbine simulations where machine speed will change significantly

(whether model or prototype scale data are given).

3.7 Using WHAMGR to Display WHAMO Results

As explained previously, WHAMGR works in conjunction with WHAMO to plot

simulated time histories and machine characteristics. WHAMGR is a Windows 95

application and can be installed and run on any Windows 95-compliant computer.

Likewise, WHAMGR can be used with any true Windows-compiant monitor and

printer.

WHAMGR and WHAMO are linked by two types of data files. The first type is the

WHAMO input file that contains characteristics of WHAMO machine components:

valves, pumps, turbines, and pump-turbines. Creation of WHAMO input files is

described previously in this manual. The second type of file WHAMGR reads is a

plotting file produced by WHAMO during simulation. Such files contain simulated

time histories of variables such as discharge, head loss, and piezometric head at

nodes and elements specified in the simulation input.

3.7.1 Running WHAMGR

WHAMGR is run from the Windows File Manager which is located in the Main

window. To run WHAMGR, start the File Manager and go to the directory in which
62 USACERL ADP 98/129

WHAMGR was installed (as discussed in the Section 3.1). WHAMGR.EXE should

be listed by the file manager.

To start WHAMGR, simply double-click on the file WHAMGR.EXE. This will result

in the WHAMGR Main Menu Window appearing on-screen. The menu bar contains

three selections that control basic operation of WHAMGR:

File controls program functions such as file opening and closing, plotting,

printing, and exiting

View toggles Windows tool displays

Help a help facility (not currently implemented)

These selections are discussed in the subsections that follow.

3.7.2 Retrieving Data Files

Clicking on the File menu item causes four sub-menu items to be displayed: Open,

Print Setup, Files, and Exit.

If the desired data file is listed in the sub-menu, then it is retrieved by clicking on

that file name. Otherwise, clicking on Open creates a dialog box for listing

directories and files from which to select a data file for retrieval. Click on the

desired directory file (causing it to be highlighted) then click OK to retrieve the file.

The List Files of Type button at the bottom of the dialog box is designed to list

files with a .PLT extension, typical of time history data files, or an .INP extension

for plotting machine characteristics from a WHAMO input file. Files with extension

(*.*) may also be listed.

An empty WHAMGR plot window will appear after you have selected a time history

data file or a WHAMO input file. The window will contain the message “No

Selection.” PLEASE NOTE: “NO SELECTION” IS NOT AN ERROR MESSAGE.

It simply means that you have not yet selected which parameters you wish to

display in the WHAMGR plot window.

You will also notice that the main menu bar selections have changed. If you have

selected a WHAMO time history plot file, the following menu bar items are

displayed: File, Data..., Options, View, Window, and Help. These can be seen

near the top of Figure 13. If you have selected a WHAMO input file, the menu

display is almost the same: File, Data Select, Options, View, Window, and

Help.
USACERL ADP 98/129 63

Figure 13. WHAMGR display of plot file.

The menu items File, View, Window, and Help are identical for both types of

files. File is discussed in the present section and Section 3.7.5. View, Window,

and Help are described in Section 3.7.6. The functions of the menu items Data...,

Data Setup, and Options depend on the type of file loaded. These functions are

discussed in Section 3.7.4.

3.7.3 Making Plots

Time Histories

Clicking on the Data... menu item creates a dialog box containing a list of elements

and nodes and associated variables for which simulation results can be plotted.

Element/node and variable combinations can be selected by clicking on the

combination desired. More than one element/node and variable combination can

be plotted. Accept the selections by clicking on the OK button. The dialog box will

be replaced by a plot of time histories of the selected variables. The variables will

be plotted with default settings. A time history plot of discharge and head is shown

in Figure 13.
64 USACERL ADP 98/129

Features of the plot may be modified using the Options menu. The Options menu

item contains seven sub-menu items:

Title creates a dialog box for reviewing and modifying the main title

and sub-title

X axis creates a dialog box for reviewing and modifying the x axis title,

minimum and maximum x axis values, and the x axis tick

interval

Y axis creates a list of all y axes in use in the current plot (one for each

variable selected for plotting). Select one to create a dialog box

for reviewing and modifying the axis, title, minimum and

maximum axis values, and axis tick interval.

Series... menu listing all the variables in use in the current plot

Legend toggle for including the legend box or not

Legend Inside toggle for location of legend inside or outside plot

All creates a dialog box displaying all of these selections.

The legend will be displayed only if the Legend toggle is on (as indicated by a

check). The default location for the legend is the right side of the plot. The legend

can be moved by clicking and dragging the legend to the desired location. The

legend cannot be dragged across plot boundaries, i.e., if the legend is currently

inside the plot area, it cannot be dragged outside the plot area and vice versa.

Instead, use the Legend Inside menu item to toggle the location of the legend

between inside and outside the plot area.

Machine Characteristics

Machine characteristics are plotted from an .INP file. After the file is opened,

clicking on the Data Select menu item creates a menu containing two items:

Machine and Plot Variables. Upon first opening a file, only Machine will be

available for selection. Only after specifying a machine can Plot Variables be

selected. Clicking on Machine creates a dialog box that lists machine elements

(valves, pumps, pump-turbines, and turbines) available for plotting. Select a

machine by clicking on the name of the machine desired. Only one machine
USACERL ADP 98/129 65

Figure 14. WHAMGR display of pump characteristic curves from .INP file.

element can be selected at a time. Click on the OK button to accept the selection

and plot the machine characteristics with default plot settings.

If a different combination of variables is desired, click on the Plot Variables item

under Data Select. The resulting dialog box lists variables available for plotting

on the Horizontal and Vertical Axes, as well as a Contour Variable. Variable

selection is subject to two constraints: (1) variables cannot be selected for plotting

on more than one axis, and (2) the two variables which form the bodies of the

characteristics tables cannot be plotted together, e.g., head ratio and torque ratio

for pumps and model discharge and power for turbines. Figure 14 shows a plot of

Head Ratio as a function of Discharge. Speed Ratio is the contour variable. Also,

note the Options menu is displayed.

Options available for machine characteristic plots are identical to those available

for time history plots with the following exception: since only one variable can be

plotted on the y axis, clicking on the Y Axis menu item will lead directly to the Y

axis dialog box as described above for time history plots.

Error Messages
66 USACERL ADP 98/129

During each WHAMGR session, a CHAR.LOG file is created. WHAMGR error

messages are directed to this file. If the user experiences difficulty creating a plot,

error messages contained in CHAR.LOG should provide some indication of the

cause of the difficulties.

3.7.4 Printing

After a plot has been created on the screen, clicking on the File menu item will

display the following submenu items related to printing:

Print Setup Clicking on this item will create a dialog box for reviewing and

modifying printer specifications such as the type of printer,

printer part connections, paper size, paper orientation

(landscape or portrait), etc.

Print Preview Clicking on this item will cause a preview of the hardcopy

output to be displayed on the screen.

Print Clicking on this item causes the current plot to be sent to the

printer.

The File menu also includes an Exit item. Clicking on this causes WHAMGR

execution to terminate.

3.7.5 View, Window, and Help Menu Items

These menu items are not directly related to making plots with WHAMGR. They

are described briefly below.

View View controls the appearance of the Toolbar located at the top of the

window and the Status bar located at the bottom of the window. Each

of these can be toggled on and off by clicking.

Window The Window menu item controls window arrangements. It is typical

of Windows applications and contains the following four menu items:

New, Cascade, Tile, and Arrange Icons. New opens a new window

of the current file. Both Cascade and Tile arrange multiple windows.

Cascade places the windows in an overlapping arrangement and Tile

places the windows in a non-overlapping arrangement. Arrange

Icons arranges icons at the bottom of the screen.

Help Self-explanatory.
USACERL ADP 98/129 67

4 Command Reference

As stated previously, each primary command introduces a series of related

secondary commands which accompany the numeric (and sometimes alphanumeric)

data required for simulation. A list of the secondary commands associated with

each primary command is given below. The symbol in the "Data" column next to

the command indicates the type of data required. The following conventions are

used:

a - alphanumeric data required

i - integer value

r - real value

rl, r2, .... multiple real values can follow a single tag

If left blank, no data is required with that secondary command. For some data, the

program fixes a default value in the event that the user specifies no value. Default

values are shown in the glossary for the appropriate commands.

4.1 Element Commands

The element commands define the various components which make up the

hydraulic system. The commands are similar in the use of a four character

alphanumeric name for each element. This name, specified by the ID secondary

command, must be the first secondary command to appear in the element command

string.

Up to 300 elements may be defined for a single system. (Not including

characteristics "types," etc.)

The element commands are described on the following pages in alphabetical order,

including the commands for machine and valve characteristics (PCHAR, PTCHAR,

TCHAR, and VCHAR).
68 USACERL ADP 98/129

CONDUIT

The properties of an individual conveyance element are input as shown below.

There will be a CONDUIT command for each conduit element of the system.

Secondary Commands Data Comments

Identifier

ID a User-defined four-character identifier of the

conduit. It must be the first secondary

command.

Geometric Data

LENGTH r Total length of the conduit in feet.

DIAMETER r Diameter of conduit in feet.

THICKNESS r Wall thickness of pipe in inches.

ELASTICITY r Young's modulus of elasticity for the pipe

material in psi.

CELERITY r Pressure wave celerity within the conduit in feet

per second. This may be specified as an alternative to specifying THICKNESS and ELASTICITY, particularly where the conduit is a tunnel.

FRICTION r Darcy-Weisbach friction factor.

Computational Data

NUMSEG i Number of computational segments within the

conduit. This defines x in the finite difference

equations. In most cases, x should not exceed

about 500 feet, though larger values are some

times appropriate.

Entrance and Exit Loss Data
USACERL ADP 98/129 69

Hydraulic losses at a pipe intake or exit may be specified at the boundary between

a CONDUIT element and a RESERVOIR element. The command specifies the loss

using a multiplicative coefficient which is applied to the velocity head in the pipe.

The applicable subcommands are:

ENDLOSS Command to indicate that entrance or exit losses

are to be computed for this conduit.

AT a The identifier of the reservoir element to which

the conduit is joined where the loss will

take place.

CPLUS r The head loss coefficient for flow in the assumed

positive direction.

CMINUS r The head loss coefficient for flow in the assumed

negative direction.

The head loss coefficients default to 0.0 if not specified. Only one ENDLOSS may

be specified for a conduit.

Added Loss Data

Added losses may be used to model orifices, bends, and other local geometries in a

pipe which introduce head losses in addition to conduit friction. The command

specifies the loss via a multiplicative coefficient which is applied to the velocity

head. The applicable sub-commands are:

ADDEDLOSS Command to indicate that added losses are to be

computed in the conduit.

AT r The location, in feet downstream from the

upstream end of the conduit, where the loss is to

be included.

CPLUS r The head loss coefficient for flow in the assumed

positive direction.

CMINUS r The head loss coefficient for flow in the negative

direction.
70 USACERL ADP 98/129

The head loss coefficients default to 0.0 if not specified.

Up to 3 ADDEDLOSS commands may be included per conduit. If more are needed,

the conduit must be subdivided. Each loss will be specified by a complete set of

subcommands above. To specify an added loss at a dummy conduit location (see

below), the AT command need not be included but a diameter must be specified in

order that a velocity head can be calculated.

Variable Diameter Conduit Data

For a non-prismatic conduit whose diameter varies along its length, the

DIAMETER command is replaced by a specified cross-sectional area versus distance

relationship. The data are given by alternating DISTANCE and AREA commands.

The program will interpolate values of area intermediate to those specified.

VARIABLE Command to indicate that the conduit has a

varying diameter.

The next two commands must be input in pairs.

DISTANCE or r Distance in feet from the upstream end of the

D conduit. The first value must be 0.0 with

subsequent values in increasing order.

AREA or r Cross-sectional area of the conduit (square feet)

A at the distance specified.

No more than 20 variable diameter conduits may be included in a single system.

Computations for variable diameter conduits are based on the average end area of

each segment (see Chapter 6), so the user may often wish to specify more segments

than for constant diameter conduits.

Dummy Conduits

The dummy conduit is a connector included to give the user flexibility in

constructing systems. Generally, the head and discharge at the two nodes which

it joins are equated. Four common uses are listed as follows:

1. Temporarily replace another element.
USACERL ADP 98/129 71

2. Link a boundary element (including surge tank) to a junction. The dummy

element must intervene because the connectivity logic will not accept single

element branches.

3. Link any element other than a conduit to a Tee Junction.

An added loss may be included as part of a dummy conduit. A diameter must be

specified for application 3 above.

DUMMY Indicates that a conduit is a dummy conduit

Miscellaneous Data

AS a The AS command is used to request that data from

conduit "a" which has already been defined, be

copied and used for the current conduit. These data

will be altered by subsequent secondary commands.

FINISH This must be the last command of the conduit input

data set.

Examples: CONDUIT Command

CONDUIT ID C1 LENGTH 46. DIAMETER 17.0 THICKNESS 0.5

ELASTICITY 30000000 FRICTION 0.008. FINISH

CONDUIT ID C3 AS C1 LENGTH 500

NUMSEG 2 FINISH

CONDUIT ID C3 LENGTH 3280. DIAMETER 20.0

CELERITY 4000. FRICTION .008 ENDLOSS AT RES1

CPLUS 0.5 CMINUS 1.0 ADDEDLOSS AT 300.

CPLUS 0.4 CMINUS 0.4 NUMSEG 8 FINISH

CONDUIT ID C4 VARIABLE DISTANCE 0.0

AREA 314. D 30 A 227. LENGTH 30.

CELERITY 4000. FRICTION .008 FINISH

CONDUIT ID DUMMY DIAMETER 17.0

ADDEDLOSS CPLUS 0.4 CMINUS 0.4 FINISH
72 USACERL ADP 98/129

EXPANSION CONTRACTION

DUP DDOWN DUP DDOWN

ASSUMED

FLOW

0

0

0

0

Figure 15. Definition sketch for diameter change elements.

DCHANGE

The DCHANGE command allows the user to specify head loss coefficients for

locations in the system where there is a significant change in conduit diameter

(Figure 15). The command uses the common convention that the head loss

coefficient is applied to the velocity head (v2

/2g) of the smaller diameter conduit.

For convenience, the more descriptive primary commands EXPANSION or

CONTRACTION may be used as alternative to DCHANGE. Since all cases must

consider reversed flow, the three commands are entirely synonymous. The

secondary commands are:

Secondary Commands Data Comments

Identifier

ID a User defined identifier, a four character alphanumeric word. This must be the first secondary

command.

Head Loss Characteristics

The head loss characteristics of the diameter change may be specified directly, or

computed from the geometry by the algorithm presented in Chapter 6. The

alternative commands are shown below.
USACERL ADP 98/129 73

Coefficient Specification

CPLUS r Head loss coefficient for flow in the assumed

positive direction.

CMINUS r Head loss coefficient for flow in the assumed

negative direction.

If a CPLUS or CMINUS value is not specified, it will be computed from the

geometry. The default is not 0.0.

Geometric Data

DUP r The pipe diameter upstream of the diameter

change (feet). This is required data only if the

upstream element is not a conduit or surge tank.

DDOWN r The pipe diameter downstream of the diameter

change (feet). This is required data only if the

downstream element is not a conduit or a surge

tank.

ANGLE r The angle s shown in the definition sketch

(degrees). This is required only if the head loss

coefficients are to be calculated. The default

value is 90o

.

Miscellaneous Command

FINISH The last command of the input stream.

Examples: DCHANGE Command

DCHANGE ID DC1 FINISH

The coefficients for DC1 will be computed from the geometry using the default value

of the flare angle.

DCHANGE ID DC2 CPLUS 0.4 CMINUS 0.2 FINISH
74 USACERL ADP 98/129

FLOWBC

This command is used to specify a flow boundary condition. Such a condition may

be used as a substitute for a detailed model of a portion of the hydraulic system.

Secondary Commands Data Comments

Identifiers

ID a User defined identifier. This must be the first

secondary command.

Boundary Condition Data

Q r Constant discharge at the boundary in cfs.

QSCHEDULE i Specifies the number of a time variant discharge

schedule defined with a SCHEDULE command.

Miscellaneous Command

FINISH The last secondary command of the input string.

Examples: FLOWBC Command

FLOWBC ID FBC1 Q 3820. FINISH

FLOWBC ID FBC2 QSCHEDULE 1 FINISH
USACERL ADP 98/129 75

a1

d

3G

dt 3

% a2

d

2G

dt 2

% a3

dG

dt

% a4(G&Gr) ' a5

d

2T)

dt 2

% a6

dT

)

dt

% a7(T

)

) % a8

GOVERNOR

WHAMO includes algorithms for mechanical and electrical governing mechanisms

for turbines. These algorithms model wicket gate movements and speed variations

during minor load variations, as specified with the GOVERN option under the

OPTURB or OPPT command. For load rejection or major load adjustments, the

governor equations may not be applicable. In these cases, wicket gate operation

should be specified with the SCHEDULE command.

Governors are modeled using equation (6.37) of Section 6.5.

For electrical governors, o' includes a generation feedback term as well as speed

variation.

Secondary Commands Data Comments

Identifier

ID a Identifier of the turbine or pump-turbine element

which is to be controlled by this governor unit.

Mechanical Governors

The coefficients of equation (6.37) may be input directly for mechanical-type

governors without power generation response. The following subcommands are

used. In each case, the default value is zero.

Governor Characteristics

AONE r The coefficient a1

 in Equation (6.37).

ATWO r The coefficient a2

 in Equation (6.37).

ATHREE r The coefficient a3

 in Equation (6.37).
76 USACERL ADP 98/129

AFOUR r The coefficient a4 in Equation (6.37).

AFIVE r The coefficient a5

 in Equation (6.37).

ASIX r The coefficient a6

 in Equation (6.37).

ASEVEN r The coefficient a7

 in Equation (6.37).

AEIGHT r The coefficient a8

 in Equation (6.37).

Alternatively, a set of parameter values commonly associated with mechanical

governors may be input. Coefficients of Equation 6.37 are automatically computed

from these parameters according to relations given in Section 6.5. Typical

parameter values are given in Section 6.5.

TG r Governor promptitude time constant (seconds).

TR r Dashpot relaxation time constant (seconds).

PDROOP r Permanent speed droop (per unit).

TDROOP r Temporary speed droop (per unit).

Electric Governors

The coefficients of Equation 6.37 may also be input directly for electric-type

governors with power generation response. The same subcommands, AONE

through AEIGHT, are used, but the ELEC and THETA subcommands must also be

entered. Also, RPOWER should be input if the initial power is not to be taken as

the reference power.

ELEC Input in conjunction with the governor equation

coefficients (AONE through AEIGHT) to indicate

an electric-type governor.

THETA r Speed regulation term. This is the multiplicative

factor applied to per unit power generation in the

o' term of Equation 6.37 for electric governors.

It is similar to speed droop except response is to

generator power output. Typical value is

0.05.
USACERL ADP 98/129 77

RPOWER r Reference power output (HP) used to normalize

power into per unit terms in the electric governor

equation. Typically this is the turbine rated

power. Defaults to the specified initial power

output in isolated load simulations.

Electric governor characteristics may also be specified using the following

parameters. These are defined in Section 6.5 and typical values are given there.

The ELEC command need not be included when these parameters are used.

KP r Proportional gain.

KI r Integral gain (1/seconds).

KD r Derivative gain (seconds).

THETA r Speed regulation term.

TT r Pilot servomotor time constant (seconds).

Typical values range from 0.05 to 0.1.

RPOWER r Reference power (HP). Defaults to the specified

initial power output in isolated load simulations.

Default Governor Characteristics

Default governor characteristics will be computed using the relations given in

Section 6.5. It is necessary only to specify the water starting time and to indicate

whether a mechanical or electrical governor is to be modeled. The reference power

may also be specified. This value will be used to compute the mechanical starting

time, and also to normalize the power term in the electric governor equation.

TW r Water starting time (seconds), as defined in

Equation 6.42, used to compute default governor

characteristics. Compute TW from the turbine to

the nearest surgetank or reservoir. Do not

include this command if default values are not to

be used.

ELEC Indicates that an electric-type governor is to be

modeled.
78 USACERL ADP 98/129

MECH Indicates that a mechanical-type governor is to

be modeled. (Default)

RPOWER r Reference power (HP). Defaults to the specified

initial power in isolated load simulations.

Governor Limits

If desired, maximum wicket gate opening and closing rates may be specified.

Though discontinuities of governor behavior may not be completely accounted for,

gate movement during simulation will not be allowed to exceed the specified rates.

OPENMAX r Maximum rate of wicket gate movement to a

higher percent valued position in percent per

second.

CLOSEMAX r Maximum rate of wicket gate movement to a

lower percent valued position in percent per

second.

Miscellaneous Command

AS a (See CONDUIT)

Terminating Command

FINISH

Examples: GOVERNOR Command

GOVERNOR ID TUR1 MECH TW 1.0 FINISH

GOVERNOR ID PT1 TG 0.15 TR 5.8

PDROOP 0.05 TDROOP 0.1 FINISH

GOVERNOR ID TURB KP 1.0 KI 0.5 KD 0.8

TT 0.05 THETA 0.05 FINISH
USACERL ADP 98/129 79

ONEWAY

This element acts as a simple non-return valve, but it does not simulate a real nonreturn valve where reverse flow may sometimes occur, causing valve slamming and

pressure surges. No reverse flow is allowed with a ONEWAY element. Forward

flow is unrestricted, but a head loss coefficient may be applied.

In order to prevent significant reverse flow during simulation, the program may

sometimes compute at a time step shorter than specified. If this causes

computational difficulties, the user can specify a minimum time step with the

DTMIN command under CONTROL.

Normally, flow in the positive direction is allowed and flow in the negative direction

is restricted. This convention can be reversed by entering a REVERSE command.

Secondary Commands Data Comments

Identifier

ID a User-defined; must be first secondary command.

Physical Data

DIAMETER r Valve diameter in feet.

CLOSS r Head loss coefficient for flow in the allowed

direction.

Miscellaneous Command

REVERSE Specifies that flow is allowed in the assumed

negative direction and restricted in the positive

direction. If this command is not entered, flow is

restricted in the negative direction.

Terminating Command

FINISH

Example: ONEWAY Command

ONEWAY ID CHEC DIAM 2.5 CLOSS 0.8 FINISH
80 USACERL ADP 98/129

PCVALVE

This element simulates pressure control valves. Like VALVE elements, the flow

characteristics are defined to be of a particular type, either pre-programmed or

input elsewhere with a VCHAR command. Unlike VALVE elements for which a

schedule of valve opening is input, valve opening and closing rates are specified as

a function of pressure at one or two reference points in the system.

The PCVALVE element can be used to represent pressure relief, pressure control,

differential pressure control, and flow control valves as shown in the examples.

Note that this is not a boundary element. There must be a boundary element or

junction at the ends of branches containing a PCVALVE element.

Secondary Commands Data Comments

Identifier

ID a User-defined identifier. This must be the first

secondary command.

Geometric Data

DIAMETER r Diameter of the valve in feet.

Flow Characteristics

GATE Specifies that the valve is a disk type gate valve.

BUTTERFLY Specifies that the valve type is a butterfly valve.

HOWELL Specifies that the valve type is a HowellBunger valve.

SPHERICAL Specifies that the valve type is a spherical valve.

TYPE i The flow characteristics for the valve are defined

by TYPE i under a VCHAR command. The

characteristics are discharge or head loss versus

valve position.
USACERL ADP 98/129 81

Reference Nodes

The valve responds to computed pressure at one or two specified reference nodes in

the system. If only one reference node is specified then the valve will respond to the

computed pressure at that node as described below under Pressure Control. If two

reference nodes are specified, then the valve responds to the difference between the

pressures at the two nodes. This difference is defined as the pressure at the first

reference node specified minus the pressure at the second reference node.

REFERENCE Indicates that specification of reference node(s)

follows

NODE i Reference node number

The elevation of reference nodes must be entered with the SYSTEM primary

command so that pressure may be computed at those locations.

Pressure Control

A target pressure is defined at which the valve will tend to neither open nor close,

no matter what the current valve position is. This pressure refers to the gage

pressure in psi at the reference node if only one reference node is specified. If there

are two reference nodes, then this refers to the difference in gage pressures at the

nodes as described above.

Note that if a PCVALVE is at a limit, either fully open or fully closed, it will not

necessarily move even if the computed pressure differs from the target pressure.

For example, a closed PCVALVE configured as a pressure relief valve will remain

closed as long as the computed pressure is less than the target.

PTARG r Target pressure (psig)

For both the opening and closing direction, a maximum rate of movement, and the

pressure (or pressure difference) at which that rate is achieved, must be specified.

If the computed pressure (or pressure difference) is between the target pressure

(corresponding to zero valve movement) and the pressure at maximum rate, then

the valve movement rate will be interpolated as either a linear or square root

function as specified by the user.
82 USACERL ADP 98/129

OPENING Indicates that the PMAX, MAXRATE, and

interpolation specification commands which

follow apply to valve opening.

CLOSING Indicates that the PMAX, MAXRATE, and

interpolation specification commands which

follow apply to valve closing.

MAXRATE r Maximum rate of valve movement expressed as

the time of valve travel in seconds from closed to

fully open or fully open to closed.

PMAX r Pressure or pressure difference (psig) at which

the maximum rate of valve movement is

achieved.

LINEAR Indicates that a linear interpolation function will

be used to determine the valve movement rate

when the pressure is between PTARG and

PMAX (Default).

ROOT Indicates that a square root interpolation

function will be used to determine the valve

movement rate when the pressure is between

PTARG and PMAX.

Note that if PMAX for valve opening is greater than PTARG then PMAX for valve

closing must be less than PTARG. Similarly, if PMAX for opening is less than

PTARG, PMAX for closing must be greater.

Terminating Command

FINISH

Examples: PCVALVE Command

Pressure Relief Valve - For a pressure relief valve, a single reference node

upstream of the valve is specified. PTARG will be the pressure at which the valve

opens. PMAX for opening will be greater than PTARG and PMAX for closing will

be less than PTARG.
USACERL ADP 98/129 83

PCVALVE ID RELF GATE DIAM 0.8

REFERENCE NODE 100 PTARG 200.

OPENING MAXRATE 30. PMAX 210. LINEAR

CLOSING MAXRATE 30. PMAX 190. LINEAR

FINISH

Pressure Reducing Valve - For a pressure reducing valve a single reference node

downstream of the valve is specified. PTARG will be the desired downstream

pressure. PMAX for opening will be less than PTARG and PMAX for closing will

be greater than PTARG.

PCVALVE ID REDU BUTTERFLY DIAM 1.0

REFERENCE NODE 200 PTARG 100.

OPENING MAXRATE 60. PMAX 75. ROOT

CLOSING MAXRATE 60. PMAX 125. ROOT

FINISH

Differential Pressure Control Valve - In this case, two reference nodes are

specified, one on each side of the valve. The reference node on the upstream side

of the valve is specified first for convenience, i.e., to work with positive numbers.

PTARG is the desired pressure difference between the two points. PMAX for

opening will be greater than PTARG and PMAX for closing will be less than

PTARG.

PCVALVE ID DIFF BUTTERFLY DIAM 1.2

REFERENCE NODE 100 NODE 200 PTARG 50.

OPENING MAXRATE 60. PMAX 65. ROOT

CLOSING MAXRATE 60. PMAX 40. ROOT

FINISH

Flow Control Valve - For a flow control valve, two reference points are specified,

both either upstream or downstream of the valve. The upstream reference node is

specified first for convenience. PTARG will be the pressure difference between the

two points which corresponds to the desired flow rate. PMAX for opening will be

less than PTARG and PMAX for closing will be greater than PTARG.

PCVALVE ID FLOW BUTTERFLY DIAM 0.75

REFERENCE NODE 50 NODE 100 PTARG 10.

OPENING MAXRATE 25. PMAX 6. ROOT

CLOSING MAXRATE 25. PMAX 14. ROOT

FINISH
84 USACERL ADP 98/129

P-T

The identifier and specifications of each pump-turbine are input using the P-T

command. Pump-turbine characteristic tables will be input separately using the

PTCHAR command, while the operation of this pump-turbine will be specified using

the OPPT command.

Secondary Commands Data Comments

Identifier

ID a User defined identifier. This must be the first

secondary command.

TYPE i i is a user defined number designating which set

of P-T characteristics defined under PTCHAR

corresponds to this pump-turbine. No more than

6 pump-turbine types may be specified for a

system. (Defaults to 1)

Pump-Turbine Specifications

FRICTION r Friction loss at synchronous speed in H.P.

(Default to 0.0)

WINDAGE r Windage loss at synchronous speed in H.P.

(Default to 0.0)

WR2 r Rotational inertia, WR2

, in lb-ft.2.

SYNCSPD r Synchronous speed in RPM when the same in

both directions.

PSYNC r Synchronous speed in the pumping direction in

RPM.

TSYNC r Synchronous speed in the turbine direction in

RPM.

DIAMETER r Diameter of the runner/impeller in feet.
USACERL ADP 98/129 85

Miscellaneous

AS a (See CONDUIT)

FINISH

Example: P-T Command

P-T ID PTI TYPE 1

WR2 66000000. SYNCSPD 300.

DIAMETER 10.545 FINISH

Default values (=0.0) of friction and windage are used and the synchronous speed

is the same in both directions.
86 USACERL ADP 98/129

PTCHAR

The characteristics of each pump-turbine TYPE are input with a PTCHAR

command in the form of tables derived from model test data. These test data apply

to a model of one foot diameter under one foot of driving head. The input includes

lists of operating points defined by speed, discharge, and torque which apply at

specified gate positions — one list for each gate position.

To simplify computations and still accommodate all portions of typical pump-turbine

curves, the program stores the data in terms of a radial coordinate system of speed

vs. discharge. It is necessary, therefore, that the data points input be selected at

the intersection points of the gate curves and a set of radial lines drawn on a

speed-discharge plot, such as shown in Figure 16.

Suggested input steps are:

(1) Draw a set of radial lines on a speed-discharge plot such that the intersection

points adequately define all of the gate curves over the expected range of

machine operation.

(2) Begin with the highest gate position to be tabulated (usually 100 percent).

Enter the value with a GATE subcommand.

(3) Begin with the most extreme radial in the normal pump quadrant (i.e., the

radial most removed from the negative speed axis and closest to the negative

discharge axis). Record the speed and discharge values at the intersection

with the gate curve.

(4) Use the torque-speed characteristics plot to determine the torque at the

operating point defined by (3).

(5) Enter the speed, discharge, and torque values for this radial and gate with the

NQT sub-command.

(6) Repeat steps (3) through (5) for each radial in sequence moving

counterclockwise.

(7) Repeat steps (2) through (6) for each gate value in sequence down to 0 gate (in

most cases).
USACERL ADP 98/129 87

Figure 16. Speed-Discharge characteristics plot for Pump-Turbines.

Note in Figure 16 that the first radial (indicated by the dashed line) intercepts only

the curve for gate G5. For gates G1-G4, the user should enter NODATA instead of

the NQT subcommand to indicate that data are unavailable for this radial.

More than one pump-turbine in a system may be of the same TYPE (i.e., for which

the same characteristics apply). Up to 6 sets of pump-turbine characteristics may

be input for a single system.

Secondary Commands Data Comments

Identifier

TYPE i i corresponds to a TYPE number specified under

P-T. This must be the first secondary command.

Characteristics

Up to 50 gate positions (including 0 gate) may be specified in ascending or

descending order.
88 USACERL ADP 98/129

GATE r Specified wicket gate position (percent opening).

The data which follow apply for this gate

position.

For each gate position, up to 50 operating points may be specified. Each operating

point given corresponds to the intersection of the gate curve and a radial line drawn

on a speed-discharge plot. Referring to Figure 16, the data are given for radials in

clockwise sequence beginning in the normal pump quadrant. Data must be entered

for the same radials in the same order. The total number of gate positions

multiplied by the number of radials cannot exceed 625.

NQT r1

, r2, Operating point on characteristics curve. r1 is a

r3

... model speed (rpm). r2 is a model discharge (cfs).

r3 is model torque (ft-lbs). Positive speed and

discharge are in the turbine (generating)

direction. Positive torque is also in the turbine

direction (resists pumping, impels generating).

NODATA i Enter this command instead of NQT to indicate

that data is not available for the current radial

position and GATE. i is the number of

consecutive radials for this gate for which data is

unavailable (Defaults to 1).

ZERO i Enter this command instead of a set of NQT

commands under GATE 0.0 if all speed,

discharge, and torque values are zero. i is the

number of radial positions in the table.

Terminating Command

FINISH

Example: PTCHAR Command

Referring to Figure 16, assume that data is to be entered for 6 gate positions

(including 0 gate) and only 4 radials as shown (this is unrealistic). The form of the

input commands would be as follows.

PTCHAR TYPE 1

GATE 100
USACERL ADP 98/129 89

NQT -100.0 -2.0 5.3

NQT - 25.2 1.0 3.4

NQT 95.7 0.8 4.8

NQT 121.2 -0.9 -3.6

GATE 80

NODATA 1

NQT - 23.6 0.9 3.0

NQT 92.0 0.75 3.1

NODATA 1

GATE 60

NODATA 1

NQT - 20.7 0.75 2.6

NQT 83. 2 0.68 2.4

NODATA 1

GATE 0

ZERO 4

FINISH

Pump-Turbine Characteristics - Old Method

The first version of WHAMO used different conventions for pump-turbine

characteristics input. Tables were input of model discharge versus speed and gate

position and model torque versus speed and gate position. This method proved

unsatisfactory because in many cases multiple values of discharge or torque can

exist at a given speed and gate. For this reason, the radial method described above

was adopted.

The present version of WHAMO will accept input and make computations based on

the old representation of characteristics. The following commands are entered in

the old method:

Secondary Commands Data Comments

TYPE Same as above

DMODEL Diameter (inches) of model for which the

characteristics apply. (Default to 12 inches).

GATE Values of wicket gate positions (in percent open)

which head the columns of the characteristics

table.
90 USACERL ADP 98/129

SPEED Values of model speed (RPM) to head the rows of

the characteristics tables.

Q A table of model discharge values (cfs)

corresponding to the specified GATE and SPEED

values. These must be listed in row order.

(GATE values varied over constant SPEED

values.)

TORQUE A table of model torque values (ft-lbs)

corresponding to the specified GATE and SPEED

values.

FINISH
USACERL ADP 98/129 91

PUMP

The identifier and specifications of each pump are input using the PUMP command.

Pump characteristics tables will be input separately using the PCHAR command,

while the operation of the pumps will be specified using the OPPUMP command.

Secondary Commands Data Comments

Identifiers

ID a User defined; must be first secondary command.

TYPE i i is a user defined number designating which set

of characteristics defined under PCHAR

corresponds to this pump. No more than 6 pump

TYPEs may be specified for a system.

Pump Specifications

RHEAD r Rated head in feet.

RQ r Rated discharge in cfs.

RSPEED r Rated speed in rpm.

RTORQUE r Rated torque in lb-ft.

WR2 r Rotational inertia, WR2

 , in lb-ft2.

Miscellaneous Commands

AS a (see CONDUIT)

FINISH

Example: PUMP Command

PUMP ID P1 TYPE 1 RHEAD 150. RQ 300.

RSPEED 450. RTORQUE 47670 WR2 250355.

FINISH
92 USACERL ADP 98/129

PCHAR

The dimensionless characteristics of each pump TYPE are input with a PCHAR

command in the form of two tables which express ratios of actual parameter values

to specified rated values. The input includes four lists: first, lists of the speed ratios

and discharge ratios which head the columns and rows of the tables, then lists of

head ratios and torque ratios which form the body of the two tables. These lists

must be in the particular order described below. Up to six sets of pump

characteristics may be input for a single system.

Secondary Commands Data Comments

Identifier

TYPE i corresponds to a TYPE number specified under

PUMP. There may be several pumps for which

the same characteristics apply and therefore

have the same TYPE number. This must be the

first secondary command.

Pump Characteristics

SRATIO rl, r2, A list of specified speed ratios which head the

r3... columns of the pump characteristics tables,

where the speed ratio is the actual pump speed

divided by the rated pump speed. A "four

quadrant" table will include negative speed

ratios in the turbine direction as well as positive

speeds in the pumping direction. There must be

at least 3 and no more than 50 values listed in

ascending or descending order.

QRATIO rl, r2, A list of specified discharge ratios which head the

r3... rows of the pump characteristics tables where

the discharge ratio is the actual discharge

divided by the rated discharge. A "four

quadrant" table will include negative discharges

in the turbine direction as well as positive

discharges in the pumping direction. There must
USACERL ADP 98/129 93

be at least 3 and no more than 50 values listed in

ascending or descending order.

The SRATIO and QRATIO commands must precede the HRATIO and TRATIO

commands within the PCHAR primary commands.

HRATIO rl, r2, A characteristic table of head ratios correspond

r3... ing to the specified SRATIO and QRATIO values.

Head refers to the head difference across the

pump. This array must be listed in row order.

(SRATIO values are varied over constant

QRATIO values.) There may be up to 625

values.

TRATIO rl, r2, A characteristic table of torque ratios correspond

r3... ing to the specified SRATIO and QRATIO values.

Positive torque resists pumping. This array

must be listed in the same order as HRATIO.

There may be up to 625 values.

Miscellaneous Command

FINISH

Example: PCHAR Command

To illustrate the order in which the data must be input, suppose both the head ratio

and torque ratio tables were as shown:

QRATIO

SRATIO

1 2 3 4 5

1 1 2 3 4 5

2 6 7 8 9 10

3 11 12 13 14 15

Then the PCHAR command would be as follows:

PCHAR TYPE 1
94 USACERL ADP 98/129

SRATIO 1. 2. 3. 4. 5.

QRATIO 1. 2. 3.

HRATIO 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.

11. 12. 13. 14. 15.

TRATIO 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.

11. 12. 13. 14. 15.

FINISH
USACERL ADP 98/129 95

RELIEF

This element simulates pressure actuated valves. It is similar to the PCVALVE

element, in that the valve opening is a function of pressure at a reference point in

the system. The operating function is defined differently from PCVALVE; a table

of valve opening versus pressure is specified.

The valve typically responds to upstream pressure relative to the specified datum

(generally the elevation of the valve). As an option, the user may specify that the

valve responds to pressure at any particular node point in the system.

Note that this is not a boundary element. There must be a boundary element or

junction at the downstream end of branches containing a RELIEF element. Up to

5 different RELIEF elements can be simulated. If more relief elements are

required, use the AS command when identical pressure-opening tables apply.

Secondary Commands Data Comments

Identifier

ID a User-defined; must be first secondary command.

Geometric Data

DIAMETER r Diameter of the valve in feet.

ELEV r Elevation of the valve or datum from which

upstream pressure is calculated (feet).

Flow Characteristics

GATE Specifies that the valve is a disk type gate valve.

BUTTERFLY Specifies that the valve type is a butterfly valve.

HOWELL Specifies a Howell-Bunger valve.

SPHERICAL Specifies that the valve type is a spherical valve.

TYPE i The flow characteristics for the valve are defined

by TYPE i under a VCHAR command. The
96 USACERL ADP 98/129

characteristics are discharge or head loss versus

valve position.

Pressure Actuation

A table of upstream pressure versus valve opening must be supplied for each

RELIEF element. An ACTUATION command is used, followed by pairs of PRES

and OPENING commands.

ACTUATION Indicates that a table of valve opening versus

pressure follows.

At least 2 and up to 15 PRES-OPEN pairs are entered in ascending order of

pressure. At pressures less than the first value or greater than the last value, the

first or last value of valve opening will apply.

PRES r Gage pressure upstream of the valve in psi

P relative to the specified elevation. This should

precede OPENING.

OPENING or r Gate or valve position in percent opening or

O degrees depending on the type of valve specified.

Maximum Opening and Closing Rates

The maximum rate of the opening and the maximum rate of valve closing may be

specified with ORATE and CRATE commands. If the valve position determined by

pressure implies a rate of movement greater than the specified maximum rate, the

valve position will be recalculated based on the maximum rate.

ORATE r Time of valve travel in seconds from closed to

fully open position. Defaults to 0.

CRATE r Time of valve travel in seconds from fully open to

closed position. Defaults to 0.

Location of Pressure Response

NODE i The valve will respond to pressure computed at

node i. If this subcommand is omitted, response
USACERL ADP 98/129 97

will be to pressure immediately upstream of the

valve.

AREA r Flow area for computing velocity to determine

pressure at reference node. If this subcommand

is omitted, the flow area will be computed from

the valve diameter.

Error Tolerance

The valve opening at a given time step is estimated based on the pressure computed

at the previous time step. If the new computed pressure corresponds to a valve

opening significantly different from the estimated opening, the time step length is

reduced and the computations repeated. The user may specify the error tolerance.

A small tolerance will reduce valve oscillation in some simulations. A large

tolerance will reduce CPU time for some simulations. Also, the user may specify the

minimum computational time step with the DTMIN subcommand under

CONTROL.

TOLERANCE r Error tolerance in RELIEF element estimated

valve position (percent opening or degrees).

Defaults to 2.0.

Miscellaneous Command

AS a Same as for CONDUIT command.

Terminating Command

FINISH

Example: RELIEF Command

RELIEF ID PRV HOWELL DIAM 5.0 ELEV 327

ACTUATION

PRES 0.0 OPEN 0.0

P 300 O 0.0

P 325. O 50.0

P 350. O 100.0

ORATE 10. CRATE 30.0

FINISH
98 USACERL ADP 98/129

RESERVOIR

A boundary water surface elevation is defined by the RESERVOIR element.

Secondary Commands Data Comments

Identifiers

ID a User defined identifier. This must be the first

secondary command.

Boundary Condition Data

ELEV r Constant elevation of the water surface in feet.

HSCHEDULE i Specifies the number of a time variant elevation

schedule, defined with a SCHEDULE command.

Miscellaneous Command

FINISH The last secondary command of the input string.

Examples: RESERVOIR Command

RESERVOIR ID HW 1124. FINISH

RESERVOIR ID TW HSCHEDULE 1 FINISH
USACERL ADP 98/129 99

SURGETANK

Either a simple surge tank, one way surgetank, Johnson differential surge tank, or

pressurized air chamber type surge tank may be modeled. A simple surge tank may

include an outflow port which allows water to leave the system. An air chamber

may be vented or unvented.

To simulate a oneway surge tank, it is necessary for the user to also

specify a check valve (ONEWAY) element upstream of the surgetank to

prevent flow into the surgetank. This is not done automatically by the

program. WHAMO conventions for positive flow direction dictate that a

REVERSE subcommand must be included with the ONEWAY command specifying

the check valve to prevent flow into the surge tank.

Surge tank calculations are done in two parts. First, conduit type computations are

made, where the "conduit" length depends on the water surface elevation. Next, the

boundary equation at the water surface is developed. Therefore, celerity, or wall

thickness and elasticity, and a friction factor must be input as for conduits.

Up to 10 SURGETANK elements may be specified in a simulation.

Secondary Commands Data Comments

Identifiers

ID a User-defined identifier. This must be the first

secondary command.

The type of surge tank is entered immediately after the identifier. If omitted, a

simple surge tank is assumed.

SIMPLE Indicates that the surge tank is a simple surge

tank (Default condition).

ONEWAY Indicates that the surge tank is a oneway surge

tank. Oneway surge tanks in WHAMO function

exactly as simple surge tanks, and input

specifications are the same, except:
100 USACERL ADP 98/129

# The starting water level may be lower than

the initial operating head in the pipeline.

# In this case, the starting water level is

specified by the user with the ELTOP

subcommand.

DIFFERENTIAL Indicates that the surge tank is a Johnson

differential surge tank.

AIR Indicates that the surge tank is an air chamber,

either vented or unvented.

TWOSTAGE The 2-stage surge tank capability of the original

WHAMO has been retained in this version. It is

not further documented here because a single

tank of that geometry can now be more

accurately modeled with a simple surge tank of

variable area.

Physical Data for Simple Surge Tanks and Oneway Surge Tanks

ELBOTTOM r Elevation of the bottom of the tank in feet.

ELTOP r Elevation of the top of the tank in feet for simple

surge tanks, starting water level for oneway

surge tanks.

THICKNESS r Wall thickness of surge tank in inches.

ELASTICITY r Young's modulus of elasticity for the surge tank

material in psi.

CELERITY r Pressure wave celerity within the surge tank in

feet per second. This may be specified as an

alternative to specifying THICKNESS and

ELASTICITY.

FRICTION r Overall Darcy-Weisbach friction factor for the

surge tank.
USACERL ADP 98/129 101

DIAMETER r Diameter of the surge tank in feet. Specified

when the tank is cylindrical with uniform

diameter.

SHAPE When the tank is not a uniform cylinder this

command precedes a table of elevation versus

area points which define its geometry.

Pairs of elevation and area values are input in ascending order of elevation, with

a maximum of 25 points. The first elevation entered must equal the ELBOTTOM

value, and the last elevation entered must equal ELTOP. Areas are assumed to

vary linearly between specified elevation points.

ELEV r Elevation in feet.

E

AREA r Area in square feet.

A

Outflow Data for Simple Surge Tanks

Surge tank overflow will be computed when the water surface elevation exceeds the

top of the tank. The standard weir flow equation, using the circumference at the

top of the tank, is applied.

CWEIR r Weir coefficient for surge tank overflow

calculation (Default is 3.3).

An orifice at the side of the surge tank may be specified which allows outflow from

the system depending on the water level. Orifice equations are used (see Section

6.6) which apply when the water surface either partially or completely submerges

the outlet. Note that if the water level exceeds the top of the tank, overflow is

computed in addition to flow through a side outlet.

OUTLET Indicates that the commands which follow define

an outlet which allows water to leave the system.

ELOUT r Bottom elevation of outlet in feet.

DOUT r Diameter of outlet if circular (feet).
102 USACERL ADP 98/129

WOUT r Width of outlet if rectangular (feet).

HOUT r Height of outlet if rectangular (feet).

CDOUT r Orifice discharge coefficient. (Defaults to 0.61.

This is equivalent to a weir coefficient of 3.3 for

a partially submerged rectangular outlet.)

Physical Data for Differential Surge Tanks

ELBOTTOM r Same as for simple surge tanks.

RTOP r Elevation of the top of the riser in feet.

TTOP r Elevation of the top of the outer tank in feet.

RDIAM r Diameter of the riser in feet.

TDIAM r Diameter of the outer tank in feet.

THICKNESS r Wall thickness of the riser in inches.

ELASTICITY r Young's modulus of elasticity for the riser

material in psi.

CELERITY r Pressure wave celerity within the riser in feet

per second. This may be specified as an

alternative to specifying THICKNESS and

ELASTICITY.

FRICTION r Darcy-Weisbach friction factor for the riser.

CWEIR r Weir coefficient for riser overflow calculation

(Default is 3.3).

AORIFICE r Area in square feet of the orifice between the

riser and the outer tank.

CDIN r Orifice coefficient of discharge for flow entering

the outer tank from the riser. Represented by Cd

in the equation:
USACERL ADP 98/129 103

Q ' CDA 2g H

CDOUT r Orifice coefficient of discharge for flow leaving

the outer tank to the riser.

Physical Data for Air Chamber Surge Tanks

ELBOTTOM r Elevation of the bottom of the tank in feet.

ELTOP r Elevation of the top of the tank in feet.

THICKNESS r Wall thickness of surge tank in inches.

ELASTICITY r Young's modulus of elasticity for the surge tank

material in psi.

CELERITY r Pressure wave celerity within the surge tank in

feet per second. This may be specified as an

alternative to specifying THICKNESS and

ELASTICITY.

FRICTION r Darcy-Weisbach friction factor.

DIAMETER r Diameter of the tank in feet. Specified when the

tank is an upright cylinder with uniform

diameter.

SHAPE When the tank is not a uniform cylinder, this

command precedes a table of elevation versus

area points which define its geometry.

Pairs of elevation and area values are input as described for a simple surge tank.

ELEV r Elevation in feet.

E

AREA r Area in square feet.

A
104 USACERL ADP 98/129

Thermodynamic Data for Air Chamber Surge Tanks

TEMP r Ambient temperature in oF. This is assumed

to be the initial internal temperature as well

as the constant external temperature

(Defaults to 68 oF).

PBAR r Ambient barometric pressure in psi (Defaults to

14.7 psi).

Two alternative methods, described in Section 6.6, are used for computing the air

pressure-volume relation in the tank. These are the polytropic gas equation and

rational heat transfer (RHT) methods.

N r Exponent in the polytropic gas equation PVn

 = K.

The allowable range is 1.0 to 1.4 (Defaults to

1.25).

RHT Indicates that the RHT method is used. If this is

not entered, the polytropic gas equation is

adopted.

Initialization for Air Chamber Surge Tanks

In order that the initial air chamber conditions can be computed, the user must

supply either the initial air pressure, initial water surface elevation, or the initial

air mass. One, and only one, of the three options must be selected.

PINIT r Initial absolute air pressure in the chamber in

psi.

WSINIT r Initial water surface elevation in the air chamber

in feet.

AINIT r Initial air mass in the chamber in terms of

cubic feet at standard temperature and

pressure (68 oF, 14.7 psi).
USACERL ADP 98/129 105

Venting for Air Chamber Surge Tanks

Air chambers may be vented by open orifices, pressure relief valves, or other means.

Air flow is modeled using equations (6.85) and (6.86) in Section 6.6. The orifice

discharge coefficient, C, multiplied by the area, A, is entered as a function of

pressure in the tank. If no table is entered, it is assumed that no air is allowed into

or out of the chamber.

VENT Indicates that a table follows of discharge

coefficient times area versus pressure.

Following the VENT sub-command, up to 15 PRES-CA pairs are entered in

ascending order of pressure. At pressure less than the first value or greater than

the last value, the first or last value of CA will apply. A single pair may be entered.

PRES r Absolute air pressure in the chamber in psi. This

should precede CA.

CA r Orifice discharge coefficient multiplied by the

orifice area (inches). This is C*A in equations

(6.85) and (6.86) in Section 6.6.

Terminating Command

FINISH

Examples: SURGETANK Command

SURGETANK ID ST ELBOTTOM 1515.

ELTOP 1660. DIAM 70. CELERITY 2840.

FRICTION 0.02 FINISH

A simple surge tank is specified above by default.

SURGETANK ID OWST ONEWAY

ELBOTTOM 232. ELTOP 238. DIAM 25.

CELERITY 3000. FRICTION 0.012 FINISH

To simulate oneway surge tank as indicated above, the user must also specify a

check valve element upstream.
106 USACERL ADP 98/129

SURGETANK ID DST DIFFERENTIAL

ELBOTTOM 851. RTOP 939. TTOP 944.

RDIAM 13.5 TOIAM 32. CELERITY 3471.

FRICTION 0.01 AORIFICE 8.4 CDIN 0.7

CDOUT 0.7 FINISH

SURGETANK ID CHAM AIR

ELBOTTOM 340. ELTOP 393.

CELERITY 3200. FRICTION 0.02

SHAPE ELEV 340. AREA 950.

E 350. A 1070. E 360. A 1122.

E 370. A 1122. E 380. A 1070.

TEMP 70.

PBAR 14.5 N 1.4

WSINIT 353.2

FINISH
USACERL ADP 98/129 107

Figure 17. Definition sketch of Tee Junction.

TJUNCTION

A definition sketch for a Tee Junction is shown below (Figure 17). Only CONDUIT

elements may join a TJUNCTION element. Where appropriate, the user may add

a dummy conduit between a TJUNCTION and another element type. In this case,

the diameter of the connector must be specified as the diameter of the dummy

conduit.

As noted in Chapter 6, Tee Junction losses are computed using formulae developed

by Gardel (1965). According to these formulae, with no flow in the riser, the loss of

total head from the junction inflow to the riser will be 0.95 times the incoming

velocity head. The user has the option of specifying a different value, if desired.

This will alter some of the coefficients in the Gardel formulae, affecting computed

head losses for other regimes of flow as well.

Secondary Commands Data Comments

Identifier

ID a User-defined identifier. This must be a four

character alphanumeric word, and must be the

first secondary command.

Geometric Data

FILLET r Fillet radius in inches at the riser-conduit

junction (Defaults to 0.0).
108 USACERL ADP 98/129

Special Option

CRISER r Specifies the head loss coefficient, in terms of the

velocity head associated with inflow to the

junction, from the junction inflow to the riser

when riser flow is 0. This will affect computed

head losses for other flow regimes as well. The

default value of 0.95, based on Gardel (1955),

should generally be used.

Terminating Command

FINISH

Example: TJUNCTION Command

TJUNCTION ID TJI FINISH

A fillet radius of 0.0 is specified for the above element by default.
USACERL ADP 98/129 109

TURBINE

The identifier, dimensions, and specifications of each turbine are input using the

TURBINE command. Turbine characteristics tables are input separately using the

TCHAR command, while the operation of turbines is specified using the OPTURB

command.

Secondary Commands Data Comments

Identifiers

ID a User defined identifier. This must be the first

secondary command.

TYPE i i is a user defined number designating which set

of characteristics defined under TCHAR

corresponds to this turbine. No more than six

turbine types may be specified for a system.

Turbine Specifications

SYNCSPD r Synchronous speed in rpm.

FRICTION r Friction loss of the turbine-generator unit at

synchronous speed in H.P. (Default = 0.0).

WINDAGE r Windage loss of the turbine unit at synchronous

speed in H.P. (Default = 0.0)

WR2 r Rotational inertia, WR2

, in lb-ft.2

DIAMETER r Diameter of turbine runner throat in feet.

Miscellaneous Command

AS a (see CONDUIT)

FINISH
110 USACERL ADP 98/129

Example: TURBINE Command

TURBINE ID T1 TYPE 1

SYNCSPD 100. FRICTION 250. WINDAGE 250.

WR2 148000000. DIAMETER 20.

FINISH
USACERL ADP 98/129 111

TCHAR

The characteristics of each turbine TYPE are input with a TCHAR command in the

form of two tables of either model test data or prototype scale data. The input

includes four lists: first, lists of wicket gate position and phi or head which head the

columns and rows of the tables then lists of discharge and power or efficiency which

form the body of the two tables. These lists must be in the particular order

described below.

It is important that the range of characteristics data entered include all operating

conditions to be simulated. In particular, care must be taken that the range of phi

values is not exceeded due to turbine speed changes. This applies as well when

prototype scale data are input, for the values given apply at synchronous speed, and

are adjusted according to homologous formulae when speed changes.

There may be one, two, or more turbines in a system of the same TYPE (i.e., for

which the same characteristics apply). Up to six sets of turbine characteristics may

be input for a single system.

Secondary Commands Data Comments

Identifier

TYPE i i corresponds to a TYPE number specified under

TURBINE. This must be the first secondary

command.

Model Scale Characteristics

DMODEL r Characteristic table values are for a model r

inches in diameter. (Defaults to 12 inches.)

GATE rl, r2, A list of specified wicket gate positions (in per

r3... cent opening) which head the columns of the

turbine characteristics tables in either model

scale or prototype scale form. There must be at

least 3 and no more than 50 values given in

ascending or descending order.

PHI r1, r2, A list of specified values which head the rows of
112 USACERL ADP 98/129

r3... the model scale characteristics tables. The term

is defined in Section 6.4 by Equation 6.26:

M '

TD

2

/ 2g)h

where w is in radians/second. Only positive

values can be included. There must be at least 3

and no more than 50 values in ascending or

descending order.

The GATE and PHI commands must precede the QMODEL and POWER

commands.

QMODEL r1, r2, A characteristics table of model scale discharge

QM r3... values (cfs) corresponding to the specified GATE

and PHI values. Only positive discharges in the

turbine direction can be included. These must be

listed in row order (GATE values varied over

constant PHI values). There may be up to 625

values.

POWER rl, r2, A characteristics table of model scale power outHP r3... put values (H.P.) corresponding to the specified

GATE and PHI values. These must be listed in

the same order as QMODEL. It is assumed that

a Moody-stepup adjustment has been made to

these values. There may be up to 625 values.

Prototype Scale Characteristics

GATE r1, r2, Same as for model scale characteristics.

r3...

HEAD rl, r2, For a prototype scale characteristics table, a list

r3... of specified values of head difference across the

turbine (feet) will be given in place of PHI

values. There must be at least 3 and no more

than 50 values.

The GATE and HEAD commands must precede the Q and EFFICIENCY

commands.
USACERL ADP 98/129 113

Q r1, r2, A characteristics table of prototype scale disr3... charge values (cfs) corresponding to the specified

GATE and HEAD values. Only positive

discharges in the turbine direction can be

included. These must be listed in row order

(GATE values varied over constant HEAD

values). There may be up to 625 values.

EFFICIENCY r1, r2, A characteristics table of efficiency values (in

r3... decimal form) corresponding to the specified

GATE and HEAD values. These must be listed

in the same order as Q. There may be up to 625

values.

Miscellaneous Command

FINISH

Example: TCHAR Command

The example given for PCHAR illustrating the prescribed order of data input will

be repeated in terms of model scale turbine characteristics. Suppose that both the

discharge and power tables were as shown:

PHI

GATE

1 2 3 4 5

1 1 2 3 4 5

2 6 7 8 9 10

3 11 12 13 14 15

Then the TCHAR command would be as follows:

TCHAR TYPE 1 DMODEL 12.0

GATE 1. 2. 3. 4. 5. PHI 1. 2. 3.

QMODEL 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.

11. 12. 13. 14. 15.

POWER 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.

11. 12. 13. 14. 15.
114 USACERL ADP 98/129

FINISH
USACERL ADP 98/129 115

VALVE

To save the user from repeated input of the characteristics of identical valves, each

valve is defined to be of a particular type. This type may be GATE, BUTTERFLY,

HOWELL, or SPHERICAL, in which case pre-programmed characteristics are

invoked (see Section 6.3), or a TYPE number may be specified, the characteristics

for this TYPE being input elsewhere with a VCHAR command.

An operating schedule is required of each valve. A particular valve schedule input

with a SCHEDULE command is referred to by number.

See PCVALVE and RELIEF for the pressure control valve elements, and ONEWAY

for the check valve element.

Secondary Commands Data Comments

Identifier

ID a User-defined identifier. This must be the first

secondary command.

Characteristics

GATE Specifies that the valve type is a disk type gate

valve. (0=closed, 100=open)

BUTTERFLY Specifies that the valve type is a butterfly valve.

(90=closed, 0=open)

SPHERICAL Specifies that the valve type is a spherical valve.

(90=closed, 0=open)

HOWELL Specifies that the valve type is a

Howell-Bunger valve. (0=closed, 100=open)

TYPE i Specifies that the valve is a special type, with

discharge characteristics defined by TYPE i

under the VCHAR command.
116 USACERL ADP 98/129

Geometric Data

DIAMETER r Diameter of the valve in feet.

Operating Schedule

VSCHEDULE i A user-defined number designating which

operating schedule specified under SCHEDULE

is to be applied to this valve.

Terminating Command

FINISH Last command of the input data set.

Examples: VALVE Command

VALVE ID V1 GATE DIAMETER 8.0

VSCHEDULE 5 FINISH

Often, it may be convenient to input the type and diameter of a valve and the

operating schedule number using separate commands.

VALVE ID V2 TYPE 1 DIAM 12.5 FINISH

VALVE ID V2 VSCHED 3 FINISH
USACERL ADP 98/129 117

VCHAR

In defining valve characteristics, either ANGLE or GATEPOS is specified, and

either DISCOEF or HDCOEF is specified. The data may be given in either of two

ways: (1) by alternating ANGLE or GATE commands with DISCOEF or HDCOEF

commands, or (2) by single ANGLE or GATE and DISCOEF or HDCOEF

commands, each of which includes the complete list of openings and coefficients.

Separate sets of characteristics may be input for forward and reverse flow within

the same VCHAR command.

Each set of characteristics, whether it applies in both directions or in one direction

only, must include at least 3 points given in ascending or descending order of valve

position. The range of valve positions given must include all valve positions

encountered during simulation. No more than 100 points, including both forward

and reverse flow characteristics if these are different, may be input for a given valve

TYPE.

No more than 6 different valve TYPES (not including BUTTERFLY, GATE,

HOWELL, or SPHERICAL) may be input for a single system.

Secondary Commands Data Comments

Identifier

TYPE i Corresponds to a TYPE number specified under

VALVE or RELIEF. There may be several

valves with identical properties and therefore the

same TYPE Number. This must be the first

VCHAR command.

Flow Direction

If separate tables are input for different flow directions, each table must be

preceded by a FORWARD or REVERSE command. The positive flow direction for

each element is defined with the SYSTEM command (Section 4.2). Neither

command should be used if a single table applies in both directions.

FORWARD Precedes characteristics table input for flow in

the assumed positive direction.
118 USACERL ADP 98/129

REVERSE Precedes characteristics table input for flow in

the negative direction.

Characteristics

ANGLE r1, r2, A single value or a list of specified opening

angles

r3... (in degrees) in a valve characteristics table.

GATEPOS r1, r2, A single value or list of specified gate or valve

G r3... positions (in percent opening) in a OPENING in

a valve characteristics table.

DISCOEF r1, r2, Asingle value or a list of discharge coefficients

DC r3... corresponding to the specified ANGLE or

GATEPOS values. If these are listed, they must

be in the same order as the corresponding

ANGLE or GATEPOS values. These coefficients

represent CQ

, in equation (6.16) of Section 6.3:

Q ' CQ D

2

g )H

HDCOEF r1, r2, A single value or a list of head loss coefficients

HC r3... which may be specified as an alternative to

DISCOEF. These represent CH in equation

(6.20) of Section 6.3:

CH'

)H

v

2

/2g

Miscellaneous Command

FINISH

Examples: VCHAR Command

VCHAR TYPE 1 ANGLE 0. DISCOEF 1.67

A 45 DC 0.30 A 90 DC 0.08 FINISH

VCHAR TYPE 2
USACERL ADP 98/129 119

FORWARD OPENING 0. 50. 100.

HDCOEF 1000000. 2.0 0.18 ..

REVERSE OPENING 0. 25. 50. 75. 100.

HDCOEF 1000000. 10. 3.0 1.0 0.30

FINISH

In general, the user will want to input more complete tables than those shown.
120 USACERL ADP 98/129

4.2 System Command

SYSTEM

The SYSTEM primary command defines the connection of the individual element

components, identifies the location of boundary conditions, and specifies the

character of system junctions. This input information is used by the program to

assemble mathematical equations for the system in a matrix structure.

Preparation of the SYSTEM data is greatly simplified by the construction of a

schematic diagram and an element list as described in Section 3.2 and illustrated

in Figures 3 and 4. In this diagram, the user identifies system node points, which

are the points where elements join. These nodes may be simple connections, or

contraction junctions between two conduit elements. Nodes which are junctions of

multiple elements involve special considerations further described below. The node

numbers defined by the user need not be in any particular order, although it is

generally convenient to use an ordered number scheme.

Also identified in the schematic diagram are the presumed flow directions within

the system. This establishes a convention for differentiating positive and negative

flow in the program output. The assumed positive flow direction in any particular

branch of the system is communicated to the program by the order of appearance

of the node numbers (upstream to downstream order) which locate the individual

elements in the SYSTEM command. The flow direction conventions are listed

below:

1. Each element in a branch must have the same assumed flow direction.

2. For PUMP elements, the positive flow direction is in the pumping

direction.

3. For TURBINE elements, the positive flow direction is in the generating

direction.

4. For PUMP-TURBINE elements, the positive flow direction is in the

generating direction.

5. A SURGETANK element is always at the downstream end of a branch.
USACERL ADP 98/129 121

The secondary commands for the SYSTEM primary command are described below.

Each element of a system must be included within the SYSTEM command. This

includes simple junctions, which are not defined elsewhere with a separate primary

command. The only exceptions are governor elements. Only one SYSTEM

command should appear in the input.

Secondary Commands Data Comments

Linking Elements

CONDUIT, VALVE, PCVALVE, RELIEF, ONEWAY, PUMP, TURBINE, and

PUMP-TURBINE elements link two system nodes. They are located in the system

via the ELEMENT secondary commands.

ELEMENT a Alphanumeric element identifier defined in the

EL various element primary commands.

LINK i,i The numerical identifiers of the upstream and

downstream nodes, respectively, linked by this

element.

Boundary Condition Elements

RESERVOIR, SURGETANK, and FLOWBC elements identify the system boundary

conditions. The ELEMENT secondary command also locates these in the system.

ELEMENT a Alphanumeric element identifier defined in the

EL various element primary commands.

AT i The numerical identifier of the node point where

the boundary condition applies.

Diameter Change Elements

DCHANGE elements may occur at nodes joining two conduits of different

diameters. The ELEMENT secondary command is used to locate these in the

system.

ELEMENT a The alphanumeric element identifier defined in

EL the DCHANGE primary element command.
122 USACERL ADP 98/129

AT i The numerical identifier of the node point where

the diameter change is located.

System Junctions

Node points which are the junctions of more than two elements must be identified

by either the JUNCTION subcommand or ELEMENT subcommand. Use of the

JUNCTION subcommand implies a junction without associated head loss.

Mathematically, the program requires only a continuity equation to model a

junction of this type. As many as six branches may be joined to JUNCTION nodes.

JUNCTION Indicates a simple junction without head losses.

AT i The numerical identifier of the node point where

the simple junction is located.

If head losses are to be considered in the junction, the properties must be defined

via the TJUNCTION primary element command (see last section). This

TJUNCTION element is then identified with its node location by the ELEMENT

subcommand below. Mathematically, such a node is represented with both

continuity and momentum equations.

ELEMENT a Alphanumeric element identifier defined in the

EL TJUNCTION primary element command.

AT i The numerical identifier of the node point where

the TJUNCTION element is located.

RISER i The numerical identifier of the node point to

which the riser pipe of the TJUNCTION is

connected.

Specifying Node Elevations

It is not generally required to specify node point elevations. However, if pressure

head (piezometric head minus elevation) is requested output for any node then the

elevation of that node must be given as part of the SYSTEM command. Also, node

elevations must be given at points where potential column separation is to be

flagged. Pairs of NODE and ELEV subcommands are used for this purpose.
USACERL ADP 98/129 123

NODE i The numerical identifier of the node point whose

elevation is to be specified.

ELEV r Elevation of the node point in feet.

Miscellaneous Command

FINISH The final command of the SYSTEM input

stream.

Example: SYSTEM Command

Refer to Figure 3 and Table 1, which show a schematic diagram and an element list

for a hypothetical system. Based on these, the SYSTEM command would be as

follows:

SYSTEM

EL HW AT 1

EL C1 LINK 1 2

EL C2 LINK 2 3

EL DC1 AT 3

EL C3 LINK 3 4

JUNCTION AT 4

EL DUM LINK 4 5

EL FBC AT 5

EL C4 LINK 4 6

EL V1 LINK 6 7

EL C5 LINK 7 8

EL TJ AT 8

EL C6 LINK 8 9

EL T1 LINK 9 10

EL TW AT 10

EL C7 LINK 8 11

EL DC2 AT 11

EL ST AT 11

NODE 9 ELEV 121.7

NODE 3 ELEV 147.3

FINISH
124 USACERL ADP 98/129

4.3 Output Commands

Program output is controlled by the DISPLAY, ECHO/NOECHO, HISTORY,

PLOTFILE, SPREADSHEET, SNAPSHOT, and TEXT commands. DISPLAY,

HISTORY, and SNAPSHOT identify the desired printed output, while the

PLOTFILE command specifies data to be stored in a disk file for later plotting by

a graphics program. The SPREADSHEET command specifies time history data to

be stored in a file formatted for easier import by spreadsheet programs. ECHO and

NOECHO are used to control the echo printing of the program input data. Also, a

text message to be printed with the output tables (in addition to the simulation

"title" entered in the first line of input) can be entered using the TEXT command.

The number of lines per page and the number of decimal places to be printed in

output tables can be specified with the HISTORY command.

The number of decimal places to be printed can also be specified with the

SPREADSHEET command.
USACERL ADP 98/129 125

DISPLAY

The DISPLAY command controls the printing of output tables which display the

parameters specified as input data. These tables are useful to check that the

desired data have been properly input, but generally are not necessary for repeated

runs of the same system. The DISPLAY command identifies those tables which are

desired and those not desired.

Secondary Commands Data Comments

ALL Turns all of the display options on.

OFF Turns all of the display options off.

STANDARD Turns on all display options except the machine

and valve characteristics (Default).

CONDUIT This command will print a table displaying the

conduit input data.

MACHINE This command will print a table displaying the

input data for pumps, pump-turbines and

turbines. In addition, it may be followed by the

following modifiers to display the tabular turbomachine characteristics:

PUMP Displays the tables of head and torque versus

speed and discharge for each pump type.

P-T Displays the head and torque tables for each

gate opening for the pump-turbine.

TURBINE Displays the tables of homologous turbine data.

VALVE This command will print a table of the valve

input data. In addition, it may be followed by

the following modifier:

CHARACTERISTICS Displays the tables of coefficient of discharge

versus valve opening for each valve type.
126 USACERL ADP 98/129

TANK Displays the table of surge tank input data.

BC Displays the table of boundary condition input

data.

SCHEDULES Displays tables of the boundary condition, valve,

and load control schedules.

SYSTEM Displays a schematic of the system connectivity.

OUTPUT Displays a table of the output history and plotfile

requests.

FINISH Ends the DISPLAY command.
USACERL ADP 98/129 127

ECHO/NOECHO

The ECHO and NOECHO commands control the program printback of the input

data. The commands consist of single primary commands and are not followed by

the FINISH command. The commands are:

ECHO This command causes the program to reprint all

subsequent input data in its entirety. This is the

default value and is generally necessary only if

the NOECHO command is used previously.

NOECHO This command suppresses echo printing of

subsequent input commands.
128 USACERL ADP 98/129

HISTORY

To specify that a time history of a certain element should be printed as output, the

identifier of that element must be listed under a HISTORY primary command,

followed by the secondary command(s) which indicates the variable(s) of interest.

In the same manner, the heads and discharges at any node point may be specified

as output.

Optional format specifications for tabular output may also be entered.

Secondary Commands Data Comments

Node Identification

Location

NODE i The identifier of the node point for which an

output time history is desired.

UPSTREAM For nodes associated with multiple head values

DOWNSTREAM (e.g., diameter changes) or discharge values (e.g.,

surge tanks with outlets) these qualifiers specify

which of the possible values are to be output. In

the absence of these commands, the upstream

value will be output.

TONODE i When a junction node is specified, the particular

branch for which variable values are desired is

specified by following the NODE sub-command

with a TONODE sub-command which indicates

the node number which is part of that branch

and adjacent to the junction node.

Variables

Q Discharge at the specified node in cfs.

HEAD Total head in terms of the energy gradient

elevation in feet at the specified node.
USACERL ADP 98/129 129

PIEZHEAD Piezometric head in terms of the piezometric

elevation in feet at the specified node.

PRESSURE Pressure head (piezometric head minus node

elevation) at the specified node. When this

variable is requested output for a node, the node

point elevation must be supplied in the SYSTEM

command.

GPM Discharge at the specified node in gallons per

minute.

PSI Pressure head at the specified node in pounds

per square inch.

Element Identification

Location

ELEMENT a Alphanumeric identifier of the element at which

the history of a particular parameter is desired.

ATNODE i The upstream node point of the element of

interest. This additional specification is

necessary only when an element appears more

than once in the system. (This must follow the

element command!)

Parameters

Q Discharge at upstream end of element.

HEAD Head difference across a machine element.

SPEED Rotational speed of turbomachine.

POSITION Wicket gate or valve position.

ELEV Water surface elevation (in surge tank or riser of

differential surge tank).
130 USACERL ADP 98/129

ELTANK Water surface elevation of the outer tank of a

differential surge tank.

POWER Power.

TORQUE Torque.

OUTFLOW Flow which leaves the system from a surge tank

side outlet.

VOLUME Air volume in air chamber surge tank.

PRESSURE Air pressure in an air chamber surge tank.

TEMP Air temperature in an air chamber surge

tank.

QAIR Air mass inflow (positive value) or outflow rate

for a vented air chamber surge tank.

AMASS Air mass in an air chamber surge tank.

Format

LINES i Number of lines per page desired in printed

output. (Defaults to 50.)

DECIMAL i Number of decimal places displayed in the

output. This will apply to all values printed in

the time history output table. The maximum is

3 and the minimum is 0. (Defaults to 1.)

Terminating Command

FINISH

Example: HISTORY Command

HISTORY NODE 6 PIEZ Q FINISH

HISTORY ELEM T1 SPEED

NODE 3 TONODE 8 Q
USACERL ADP 98/129 131

 LINES 60 DECIMAL 2

FINISH

The first request will cause the printing of the piezometric head and discharge

versus time at node number 6. The second will cause the rotational speed of

turbine T1 to be output as a function of time, and the third request will cause the

discharge at junction node 3 in the branch leading from node 3 to node 8 (where

node 8 is the next adjacent node in that branch) to be output.
132 USACERL ADP 98/129

SPREADSHEET

The secondary commands associated with SPREADSHEET are exactly the same

as those of HISTORY. The SPREADSHEET command causes the data to be

written to a file formatted for easier import by spreadsheet programs. This is an

ASCII file which includes only the time history output tables without a summary

table or other extra text. Column headers are written only once, there are no page

breaks, and output is written to as many columns as necessary without "wrapping."

Each column header looks like a single word without spaces, for example

"NODE_NO_80."
USACERL ADP 98/129 133

PLOTFILE

The secondary commands associated with PLOTFILE are exactly the same as those

of HISTORY. PLOTFILE causes data to be written to a file for subsequent plotting

using the graphics program, while HISTORY causes data to be printed as output.
134 USACERL ADP 98/129

SNAPSHOT

With the use of the SNAPSHOT command the user may obtain printed output

showing the values of head and discharge at all points throughout the system at a

specified time — obtaining, in a sense, an instantaneous hydraulic picture of the

system.

Secondary Command Data Comments

TIME r Time at which SNAPSHOT output is desired.

Up to 10 separate times may be requested for a

single simulation.

FINISH

Example: SNAPSHOT Command

SNAPSHOT TIME 0.0 10.0 20.0 FINISH
USACERL ADP 98/129 135

TEXT

Text entered in the following two lines will be printed with the headings of the

simulation summary and output tables (in addition to the simulation "title" entered

on the first line of input). Text entered on the same line as the TEXT subcommand

is ignored. Any commands entered on the two lines following TEXT will not be

processed. If desired text is only one line, leave the second line blank. No FINISH

command is necessary. Up to 80 characters may be entered per text line.

Example: TEXT Command

TEXT

Load Rejection Simulation Number 3

30 Second Wicket Gate Closure Time
136 USACERL ADP 98/129

4.4 Simulation Control Commands

The simulation control commands define the computational parameters, the

operation of hydraulic machinery, and schedule of valve and gate opening,

generator load, and boundary conditions.
USACERL ADP 98/129 137

CLOSURE

This command is an adjunct to the SCHEDULE command. When specifying wicket

gate operation, using SCHEDULE, a special option may be selected which defines

a linear, constant rate closure with "cushioning" (i.e., reduced rate of gate

movement) at final closure. The CLOSURE command is used to specify a

dimensionless curve representing a final, non-linear "cushioned" portion of the gate

closure. The linear gate closure rate and the dimensions of this non-linear curve

are input separately under SCHEDULE.

This command must be entered only if the special gate closure option is invoked

under SCHEDULE and the CURVE subcommand is given there.

Secondary Commands Data Comments

Pairs of dimensionless time and gate position points are entered. Up to 20 pairs

may be entered. Figure 42 depicts TF and GF.

TFRAC r Fraction of time from the beginning of the

TF cushioning curve to complete closure. The

first value must be 0.

GFRAC r Fraction of the gate position at which the

GF cushioning curve begins. The first value

must be 1.

FINISH

Example: CLOSURE Command

CLOSURE TFRAC 0. GFRAC 1. TF 0.25 GF 0.6

TF 0.5 GF 0.3 TF O.75 GF 0.1 TF 1.0 GF 0.0

FINISH
138 USACERL ADP 98/129

CONTROL

The computational and output time steps may have different values for different

periods of the simulation. This requires repeated groups of DTCOMP, DTOUT, and

TMAX subcommands under the same CONTROL primary command. The

computational time step will typically range from about 0.05 seconds to 5 seconds

(see Sections 3.2 and 3.6).

Secondary Commands Data Comments

THETA r User-specified weighting ratio to be used in the

finite difference numerical solution of the

differential equations of flow in the system. This

is a number from 0 to 1 which will usually range

from 0.4 to 0.6. The default value is 0.6.

DTCOMP r Computational time step in seconds. Up to 10

different values may be specified.

DTOUT r Time interval (in seconds) at which the output

parameters are printed or stored. Up to 10

different values may be specified.

TMAX r Last value of time (in seconds) for which

DTCOMP and DTOUT apply. The last TMAX

value which appears defines the time at which

the simulation terminates.

Minimum Computational Time Step

When RELIEF or ONEWAY elements are simulated, computations may sometimes

be performed at time steps shorter than specified with DTCOMP. If, as a result,

simulation time becomes excessive or matrix solution problems arise, the user may

want to specify a minimum time step.

DTMIN r Minimum computational time step in seconds.

Defaults to 0.001.
USACERL ADP 98/129 139

Accuracy Test Control Commands

The WHAMO computational routines include checks for numerical errors. These

can sometimes result from the round off necessary to store a real number in a finite

digital memory space. In particular, the matrix solver can be subject to numerical

inaccuracies if the matrix is near singular.

If such an inaccuracy is detected, a warning message is printed with the output.

If the user desires, however, he may either suppress the accuracy check or he may

request printing of the results for each check at each time step. He may,

additionally, adjust the tolerance of the error tests.

This is accomplished by including the ACCUTEST subcommand under CONTROL,

followed by any of the options described below.

ACCUTEST FULL Specifies full printout during simulation.

ON Specifies printout if error is detected (Default

condition).

OFF No testing.

HTEST r Tolerance (in feet) in a test which compares, at

certain points in the system, the head values

computed by matrix solution and by back

substitution (Defaults to 0.1 ft).

QTEST r Tolerance (in cfs) in a similar test comparing

computed discharges (Defaults to 1.0 cfs).

EPSILON r Relative tolerance in the S.S.P. matrix solver

routine DGELG (IBM, 1970). The default value

of 10-14 is as recommended in the SSP manual.

Miscellaneous Command

FINISH

Examples: CONTROL Command

CONTROL DTCOMP 0.1 DTOUT 0.5 TMAX 10.0 FINISH
140 USACERL ADP 98/129

CONTROL DTCOMP 0.1 DTOUT 0.5 TMAX 10.0

 DTCOMP 0.5 DTOUT 0.5 TMAX 15.0

 DTCOMP 1.0 DTOUT 1.0 TMAX 30.0

 DTCOMP 5.0 DTOUT 5.0 TMAX 120.0 FINISH

Note that THETA, DTMIN, and the accuracy test control commands do not

normally need to be specified.
USACERL ADP 98/129 141

FLUID

The FLUID command is used to specify the fluid density when simulating fluids

which have a density different from that of water. Other fluid properties such as

viscosity and compressibility may affect the values of friction factor and celerity

which the user specifies using the CONDUIT and SURGETANK commands.

Secondary Commands Data Comments

DENSITY r Fluid density in pounds per cubic foot. The

default value is 62.4.

FINISH
142 USACERL ADP 98/129

INITIAL

This command is not normally required input. The initial steady state of a system

is automatically computed as part of every simulation. However, if the steady state

computation does not converge to a solution, it will be necessary for the user to

input estimates of initial conditions. In most cases, steady state convergence can

be achieved by supplying an estimate of the initial discharge for some or all of the

serial branches of the system. This is done with pairs of BRANCH and QEST

commands.

If steady state convergence cannot be achieved, even with the use of the INITIAL

command, it may be necessary to begin the simulation with no flow by closing

wicket gates or a valve, then slowly bring the system to the desired initial state

during the transient simulation.

Secondary Commands Data Comments

Branch Estimates

BRANCH i Serial branch number. The WHAMO output

B will display each branch of a system and show its

designation number. This command must

precede each QEST command.

QEST r Estimated initial steady state discharge (cfs) the

Q branch designated in the preceding BRANCH

command.

For simulations involving a turbine or pump-turbine generating under governor

control, the program must hunt for the wicket gate position which produces the

specified power output. If a successful steady state solution is not reached, the user

should input an estimate of initial turbine wicket gate position and differential

head.

Turbomachine Estimates

ELEMENT a Identifier of the turbo-machine for which an

estimate is being made. This must precede the

GATE and HEAD command.
USACERL ADP 98/129 143

GATE r Estimated (or pre-computed) initial wicket gate

position.

HEAD r Estimated (or pre-computed) initial head

difference across the turbomachine.

If steady state solution does not converge and there are one or more PCVALVE or

RELIEF elements in the system, it may be necessary to specify the initial valve

position. Normally, PCVALVE or RELIEF valve position is computed as a function

of pressure according to a user defined relation. At the start of steady state

computations, however, pressures are unknown so the program automatically

assigns an initial estimate of PCVALVE or RELIEF valve position. In some cases,

errors in initial estimates may lead to diverging oscillations of pressure and valve

positions during steady state computations which preclude a stable solution. The

user may then specify an initial PCVALVE or RELIEF valve position with an

INITIAL command.

RELIEF Element Specification

ELEMENT a Identifier of the PCVALVE or RELIEF element

for which the specification is being made. This

must precede the OPEN command.

OPENING r Initial valve position.

ANGLE

GATE

Miscellaneous Command

FINISH

Examples: INITIAL Command

INITIAL BRANCH 1 QEST 3460.

B 2 Q 484. B 5 Q 800.

FINISH

Initial estimates of steady state discharge in 3 branches of a system are supplied

with the INITIAL command above. Often, an accurate discharge estimate for one

main stem branch of a system is sufficient to insure convergence in those cases

where an INITIAL command is required.
144 USACERL ADP 98/129

In the example below, an initial head difference and gate position is estimated

across machine element P1.

INITIAL ELEMENT P1 HEAD 120. GATE 88. FINISH
USACERL ADP 98/129 145

OPPUMP

An operation specification must be supplied for each pump system. Only one of the

operational schemes below may be chosen for each unit. It will usually be more

convenient and less confusing to include separate OPPUMP commands for each

pump element.

Secondary Commands Data Comments

Identifier

ID a Identifier of the pump whose operation is being

specified. This must be the first operation

specification command.

Operation Specification

PUMP Specifies constant speed operation of the pump.

SHUTOFF Specifies constant speed operation until shutoff

at time TOFF.

TOFF r Time of pump shutoff in seconds. (Default to 0.0.)

OFF Pump not operated, i.e. has no impact on head

and flow computations in the simulation.

Miscellaneous Command

FINISH

Example: OPPUMP Command

OPPUMP ID P1 SHUTOFF FINISH

A shutoff time of 0.0 seconds has been specified by default.
146 USACERL ADP 98/129

OPPT

An operation specification is required of each pump-turbine in the system. Only one

of the operational schemes below may be chosen for each unit. It will usually be

more convenient and less confusing to include separate OPPT commands for each

pump-turbine element.

Unless the OFF mode is specified, a schedule of wicket gate position or governor

load is required of each pump-turbine. This schedule is input separately with a

SCHEDULE command and referred to by number under OPPT.

Secondary Commands Data Comments

Identifier

ID a Identifier of the pump-turbine whose operation is

being specified. This must precede the operation

and schedule specification commands.

Operation Specification

PUMP Specifies synchronous speed operation in the

pump mode.

SHUTOFF Specifies synchronous speed pump operation

until shutoff at time TOFF.

GENERATE Specifies synchronous speed operation in the

turbine mode.

REJECT Specifies synchronous speed turbine operation

until load rejection at time TOFF.

TOFF r Time of shutoff or load-rejection in seconds.

(Default to 0.0.)

GOVERN Specifies governor controlled operation in the

turbine mode serving an isolated load. (Turbine

speed is allowed to vary.)
USACERL ADP 98/129 147

STARTUP Specifies turbine startup from 0/ rpm under nongovernor wicket gate control. Turbine speed is

allowed to vary, with no transition to

synchronized operation. (Startup in pumping

mode is not simulated.)

OFF Pump-turbine not operated. Wicket gates closed.

Schedule Designation

VSCHEDULE i Designates the operating schedule specified

under SCHEDULE to be applied to the wicket

gates of this pump-turbine. This is required

input if the PUMP, SHUTOFF, GENERATE,

REJECT, or STARTUP mode is selected.

LSCHEDULE i Designates the schedule of generator load

applied to the pump-turbine specified separately

under SCHEDULE. This is required input if the

GOVERN mode is selected.

Note that a gate schedule and a load schedule cannot both be specified for the same

unit in the same simulation.

Miscellaneous Command

FINISH

Examples: OPPT Command

OPPT ID PT1 SHUTOFF VSCHEDULE 5

FINISH

A time of 0.0 has been specified above for the pump shutoff by default.

OPPT ID PT2 GOVERN LSCHED 2 FINISH
148 USACERL ADP 98/129

OPTURB

An operation specification is required of each turbine in the system. Only one of the

operational schemes below may be chosen for each unit. It will usually be more

convenient and less confusing to include OPTURB commands for each turbine

element.

Unless the OFF mode is specified, a schedule of wicket gate position or governor

load is required of each turbine. This schedule is input separately with a

SCHEDULE command and referred to by number under OPTURB.

Secondary Commands Data Comments

Identifier

ID a Identifier of the turbine whose operation is being

specified. This must precede the operation and

schedule specification commands.

Operation Specification

GENERATE Specifies synchronous speed operation of the

turbine.

REJECT Specifies synchronous speed operation until load

rejection at time TOFF.

TOFF r Time of load rejection in seconds. (Default of

0.0.)

GOVERN Specifies governor controlled turbine operation

serving an isolated load. (Turbine speed is

allowed to vary.)

STARTUP Specifies turbine startup from 0/ rpm under nongovernor wicket gate control. Turbine speed is

allowed to vary, with no transition to

synchronized operation.

OFF Turbine not operated. Wicket gates closed.
USACERL ADP 98/129 149

Schedule Designation

VSCHEDULE i Designates the operating schedule specified

under SCHEDULE to be applied to the wicket

gates of this turbine. This is required input if

the GENERATE, REJECT, or STARTUP mode

is selected.

LSCHEDULE i Designates the schedule of generator load

applied to the turbine specified separately under

SCHEDULE. This is required input if the

GOVERN mode is selected.

Note that a gate schedule and a load schedule cannot both be specified for the same

unit in the same simulation.

Miscellaneous Command

FINISH

Examples: OPTURB Command

OPTURB ID T1 REJECT VSCHEDULE 4

FINISH

A time of 0.0 has been specified above for the load rejection by default.

OPTURB ID T2 GOVERN LSCHED 1 FINISH
150 USACERL ADP 98/129

SCHEDULE

Operating schedules of valves as well as schedules of generator load, wicket gate

opening, reservoir elevation, and flow boundary discharges are specified with the

SCHEDULE command. A single valve schedule may apply to more than one valve,

a single load schedule to more than one turbine, and elevation or discharge

schedules may apply to multiple boundary conditions.

Up to 25 points may be included in a single schedule. If the simulation time

exceeds the last specified time value, the operating value will be held constant for

the remainder of the simulation at the last specified value in the schedule.

It is important to specify a sufficient number of points to completely define the

curve. Often, a number of points will be needed even for linear portions of the

curve, due to the nature of the cubic interpolation routine. It is recommended that

the schedule variable be plotted after simulation to check the interpolation.

A number of schedules may be included in a single SCHEDULE command, or each

schedule may be given in separate SCHEDULE commands. A total of 15 schedules

may be specified for a simulation.

Secondary Commands Data Comments

Valve or Gate Schedule

Identifier

VSCHEDULE i Corresponds to a VSCHEDULE or

GSCHEDULE GSCHEDULE number specified under

VALVE, OPTURB, or OPPT. This identifier

must precede the schedule definition

commands. (Note: VSCH and GSCH are

synonymous).

Schedule Definition

The valve (or wicket gate) opening as a function of time is defined through a series

of time versus opening data pairs. The data may be given by alternating the TIME

and ANGLE or GATEPOS commands, or by a DELT command and a single ANGLE

or GATEPOS command followed by a list of specified values.
USACERL ADP 98/129 151

TIME r The time value of the data pair (seconds).

T The first value must be 0.0 with subsequent

values in increasing order.

ANGLE r The valve opening angle (degrees) at the

A time specified. Fully open is 0 degrees; Shut

is 90 degrees. Applies to butterfly, spherical

and user-defined valve types.

GATEPOS r The valve or gate opening position percent

G of fully open at the time specified. Applies 

OPENING to wicket gates and gate, Howell-Bunger and

user-defined valve types.

DELT r When a valve history is given in constant

time intervals beginning at 0.0, the user may

specify that interval instead of listing each

time value.

If desired, a sinusoidal variation may be superimposed on the specified valve

schedule using the following commands.

AMPLITUDE r Amplitude of superimposed sinusoidal

variation (degrees or percent) (Defaults to 0).

FREQUENCY r Frequency of superimposed sinusoidal

variation (1/second).

PHASE r Initial phase angle in degrees (Defaults to 0).

DURATION r1, r2 Beginning and ending time, respectively,

during which the superimposed sinusoidal

variation applies (seconds). If this command

is not entered, any specified variation will

apply for the entire simulation.

Special Gate Closure Option

Instead of, or in addition to, entering a table of time and gate position, the user may

call upon a standard gate closure curve. The standard gate closure includes 4 parts:

an initial starting time for the gate to accelerate to a specified closing rate, straight
152 USACERL ADP 98/129

line closure at the specified rate, a decelerating time during which the closure rate

is reduced to the slower, cushioned rate, and finally straight line closure at the

cushioned rate.

Alternatively, a non-linear final closure may be specified instead of a decelerating

time and final linear closure rate. In this case, the user must specify a

dimensionless final closure curve elsewhere with a CLOSURE command. The

dimensions of this curve (i.e., the gate position at which it begins and the time

duration from beginning of the curve to complete closure) must be specified here.

The initial gate position at time 0 must be input with TIME and GATE

sub-commands. Standard closure need not start at time 0. It will start at the last

time for which the gate position is explicitly given.

Details of the standard gate closure are given in Section 6.8.

TACCEL r Time of acceleration in seconds from stationary

gate to closure at the specified rate. Defaults to

0.25.

RTCLOSE r Rate of closure in terms of seconds for full stroke.

Sometimes defined as twice the elapsed time

from 75 percent gate to 25 percent gate.

GCUSHION r Gate position (percent opening) at which gate

deceleration or the non-linear closure curve

begins. Normally, this will occur at or slightly

below speed-no-load gate. Typical values are 20

percent for Kaplan turbines and 10 percent for

Francis turbines. Defaults to 10 percent.

The TDECEL and RTCUSH commands below apply only for linear final closure.

TDECEL r Time of deceleration in seconds from rapid gate

closure to cushioned gate closure. Defaults to

1.0.

RTCUSH r Rate of cushioned final closure in terms of

seconds for full stroke. Defaults to 150.

The CURVE and TCUSH commands below apply only for non-linear final closure.
USACERL ADP 98/129 153

CURVE Indicates that final, cushioned closure is defined

by a dimensionless curve specified with a

CLOSURE command.

TCUSHION r Time in seconds from the beginning of the

cushioned final closure curve to complete closure.

Typical values are 25 seconds for Kaplan

turbines and 15 seconds for Francis turbines.

Defaults to 15 seconds.

Generator Load Schedule

Identifier

LSCHEDULE i Corresponds to a LSCHEDULE number specified

under OPTURB or OPPT. This identifier must

precede the schedule definition commands.

Schedule Definition

The generator load as a function of time is defined through a series of time versus

load data pairs. The data may be given by alternating TIME and LOAD

commands, or by a DELT command and a single LOAD command in a manner

similar to the valve schedule.

TIME r

T

DELT r

LOAD r The generator power demand which must be

L supplied by the turbine given in (HP), at the time

specified.

If desired, a sinusoidal variation may be superimposed on the specified load

schedule using the following commands described for valve schedules.

AMPLITUDE r Amplitude of superimposed sinusoidal variation

(HP). Default to 0.

FREQUENCY r
154 USACERL ADP 98/129

PHASE r

DURATION rl, r2

Time Varying Boundary Conditions

Identifiers

HSCHEDULE i Corresponds to an HSCHEDULE number

specified under RESERVOIR.

QSCHEDULE i Corresponds to a QSCHEDULE number specified

under FLOWBC.

The identifier must be given before the schedule definition commands.

Schedule Definition

The discharge or head as a function of time is defined through a series of time

versus discharge or head data pairs. The data may be given by alternating TIME

and Q or HEAD commands, or by a DELT command and a single Q or HEAD

command, in a manner similar to the valve schedule.

TIME r

T

DELT r

ELEV r The elevation or head (ft.) at a reservoir

H boundary at the time specified.

Q r The discharge (cfs) at a flow boundary at the

time specified.

If desired, a sinusoidal variation may be superimposed on the specified boundary

condition schedule using the following commands described for valve schedules.

AMPLITUDE r Amplitude of superimposed sinusoidal variation

(ft. or cfs). Defaults to 0.
USACERL ADP 98/129 155

FREQUENCY r

PHASE r

DURATION r1, r2

Terminating Command

FINISH

Examples: SCHEDULE Command

A valve closure history from an opening of 90 degrees to 0 degrees in sixty seconds

is specified in the first command group below.

SCHEDULE VSCHEDULE 1 TIME 0.0 ANGLE 90.0

T 10.0 A 73.0 T 20.0 A 57.0

T 30.0 A 40.0 T 40.0 A 23.0

T 50.0 A 7.0 T 55.0 A 2.0

T 58.0 A 1.0 T 59.0 A 0.4

T 60.0 A 0.0

An alternative to specifying each data pair is illustrated below for a boundary

discharge schedule.

SCHEDULE QSCHED 1 DELT 1.0

0 200.0 150.0 100.0 50.0 0.0

FINISH

The final example includes the special option gate closure plus a specified constant

load with a superimposed sinusoidal variation. (It is unlikely that both would be

invoked in the same simulation.)

SCHEDULE GSCHEDULE 2 TIME 0. GATE 78.5 

TACCEL 0.8 RATE 8. GCUSHION 20.

TDECEL 0.5 RTCUSH 100.

LSCHEDULE 1 TIME 0. LOAD 43260.

AMPLITUDE 1500. FREOUENCY 0.12

FINISH
156 USACERL ADP 98/129

SEPARATION

A special message is printed warning of potential column separation at node points

for which elevations have been input (see SYSTEM command) if computed pressure

drops below the critical value. The critical pressure head is set at -20 feet

(piezometric head 20 feet below specified node elevation) unless the user modifies

it using this command. Potential column separation will not be flagged at nodes for

which elevations have not been specified.

Secondary Commands Data Comments

PRESSURE r If the computed pressure head (piezometric head

minus node elevation) is less than r at any node

with elevation specified a warning message is

printed. The default value is -20 feet. (Note that

this is gage pressure so a negative value denotes

less than atmospheric pressure.)

FINISH
USACERL ADP 98/129 157

4.5 Execution Control Commands

A number of commands are used to control program execution. These are single

word commands which do not require a FINISH command.

The CHECK and IONLY commands are used to limit computations.

CHECK Indicates that the run is a 'check' run and should

not proceed with the transient simulation or

calculation of initial conditions. Network data

will be processed and checked. The command

can be placed anywhere prior to a GO command.

IONLY Indicates that only the initial conditions should

be generated, without subsequent simulation of

the transient conditions. This command can be

placed anywhere prior to a GO command.

The GO command must follow all data and simulation specification commands.

GO Indicates that the end of the data defining the

system has been reached and that execution

should begin.

Simulation computations initiated by the GO command are carried out to

completion, including output. It is possible to have any number of simulations

performed as part of a single job submission. If this is desired, the GO command

should be immediately followed by a RERUN or NEWRUN command, which in turn

will be followed by a title line, a set of data and simulation specification commands,

and another GO command to initiate the new simulation.

RERUN Placed after the GO command to indicate that

the previous simulation should be repeated with

certain modifications. This command must be

followed by a new title line and then commands

to modify the input data given for the previous

simulation. If not specifically altered with new

commands, data and specifications from the

previous simulation will apply to the new

simulation.
158 USACERL ADP 98/129

NEWRUN Place after the GO command to indicate that an

entirely new set of input data for a new

simulation follows. Input data and specifications

from the previous simulation do not apply to the

new simulation.

The final entry must always be GOODBYE, which indicates that there is no

subsequent simulation to be performed.

GOODBYE Terminates program execution.
USACERL ADP 98/129 159

HW

100

300

TW

400

C1 C2 V1

200

Figure 18. Schematic diagram of simple pipeline system.

Element I.D. Type Node Location U.S. Node D.S. Node

HW Head Boundary 100 — —

C1 Conduit — 100 200

C2 Conduit — 200 300

V1 Valve — 300 400

TW Head Boundary 400 — —

Table 3. Element list for simple pipeline system.

5 Example Applications

Examples of input data for some hydraulic systems are presented in this section.

Please note that this input data was prepared with the command file method using

a text editor.

5.1 Valve Closure in a Simple Pipeline

This example is taken from Parmakian (1963). A schematic diagram for this

system is shown in Figure 18 and an element list in Table 3. Both of these are as

described in Section 3.2. The input file is shown in Figure 19.

The valve characteristics shown in the input are artificial. They were synthesized,

along with the valve schedule, to duplicate the gate closure time relation shown in
160 USACERL ADP 98/129

 VALVE CLOSURE IN A SIMPLE PIPELINE

 

 C THE TITLE CARD ABOVE MUST BE THE FIRST DATA CARD

 C SYSTEM CONNECTIVITY IS SPECIFIED BELOW WITH THE "SYSTEM" COMMAND

 

 SYSTEM

 EL HW AT 100

 EL C1 LINK 100 200

 EL C2 LINK 200 300

 EL V1 LINK 300 400

 EL TW AT 400

 FINISH

C ELEMENT PROPERTIES 

 

 RESERVOIR ID HW ELEV 500. FINISH

 CONDUIT ID C1 DIAM l0. CELERITY 300. FRICTION 0.0000l LENGTH 1500.

 NUMSEG 5 FINISH

 CONDUIT I3 C2 AS C1 FINISH

 VALVE ID Vl DIAM 10. TYPE 1 FINISH

 RESERVOIR ID TW ELEV 0. FINISH

 

 C VALVE 

 CHARACTERISTICS

 

 VCHARACTERISTICS TYPE 1

 GATE 0. 10. 20. 40. 60. 80. 100.

 DISCOEF 0. 0.0067 0.0200 0.0332 O.0465 0.0598 0.0664

 FINISH

 

 C VALVE OPERAT ION

 

 VALVE ID V1 VSCHED 1 FINISH

 SCHEDULE VSCHED 1

 DELT 1.0 GATE 100. 80. 60. 40. 20. 10. n.

 FINISH .

 

 C OUTPUT REQUESTS

 

 HISTORY

 NODE 200 HEAD

 NODE 300 HEAD

 FINISH

 DISPLAY ALL FINISH

 

C COMPUTATIONAL PARAMETERS

 CONTROL DTCOMP 0.1 DTOUT 0.5 TMAX 14.5 FINISH

 

C EXECUTION CONTROL

 

 CHECK

 GO

 GOODBYE

 

 

 

 

Figure 19. Input for valve closure in a simple pipeline.
USACERL ADP 98/129 161

HW

PIPE

100

300 TANK

DUM1 

DUM 2

FBC

200 400

Figure 20. Simple pipeline with surge tank.

Figure 24 of Parmakian. The important point is to show how valve characteristics,

no matter how determined, are input to the model.

Note that DISPLAY ALL and CHECK commands are included with the input. The

former causes all available (and relevant) input data display tables to be printed,

while the latter aborts execution of the simulation. After checking the input data,

these commands can be removed and a simulation performed.

The pipe was divided into two conduit elements in order to get output at the

midpoint.

5.2 Simple Pipeline With a Surge Tank

This example also comes from Parmakian (1963). It is taken from Section 68

beginning on page 124.

Simple use of a flow boundary element and dummy conduit elements is illustrated.

Figure 20 shows the system, Table 4 shows the element list, and Figure 21 shows

the program input. The flow boundary represents a gate closure while the dummy

conduits are needed to prevent "one element branches" which result when boundary

elements are joined to junction elements. As in the previous example, a very low

conduit friction is used to approximate an ideal frictionless pipeline. High values

of celerity are used to reduce the effect of water hammer on the surge.
162 USACERL ADP 98/129

SIMPLE PIPELINE WITH A SURGE TANK

 

 C SYSTEM CONNECTIVITY

 

 SYSTEM

 EL HW AT 100

 EL PIPE LINK 100 200

 JUNCTION 4T 200

 EL DUM1 LINK 200 300

 EL TANK 4T 300

 EL DUM2 LINK 200 400

 EL FBC AT 400

 FINISH

 

 C ELEMENT PROPERTIES

 

 RESERVOIR ID HW ELEV 500. FINISH

 CONDUIT ID PIPE LENGTH 3000. NUMSEG 10 DIAM 10. FRICTION 0.00001

 CELERITY 6000. FINISH

 CONDUIT ID DUM1 DUMMY FINISH

 SURGETANK ID TANK DIAM 20. ELTOP 600. ELBOTTOM 450. FRICTION 0.00001

 CELERITY 6000. FINISH

 CONDUIT ID DUM2 DUMMY FINISH

 FLOWBC ID FBC QSCHED 1 FINISH

 

 C FLOW BOUNDARY OPERATING SCHEDULE

 

 SCHEDULE QSCHED 1

 TIME O. Q 843. T 0.01 Q 0.0

 FINISH

 

 C OUTPUT REQUESTS

 

 HISTORY

 ELEM TANK ELEV

 NODE 300 0

 FI N ISH

 DISPLAY ALL FINI SH

 SNAPSHOT TIME 30.3 FINISH

 

 C COMPUTATIONAL PARAMETER

 

 CONTROL

 DTCOMP 0.1 DTOUT 5.0 TMAX 10.0

 DTCOMP 1.0 DTOUT 5.0 TMAX 25.0

 DTCOMP 1.0 DTOUT 1.0 TMAX 35.0

 FINISH

 

 C EXECUT ION CONTROL

 

 CHECK

 GO

 GOODBYE

 

Figure 21. Input for simple pipeline with surge tank.
USACERL ADP 98/129 163

Element I.D. Type Node Location U.S. Node D.S. Node

HW Head Boundary 100 — —

PIPE Conduit — 100 200

— Simple Junction 200 — —

DUM1 Dummy Conduit — 200 300

TANK Surge Tank 300 — —

DUM2 Dummy Conduit — 200 400

FBC Flow Boundary 400 — —

Table 4. Element list for pipe and surge tank system.

5.3 Oahe Pumping and Power Plant

The next example illustrates the data input for a very complex system, the proposed

Oahe power and pumping plant (Resource Analysis 1978). The schematic diagram

shown in Figure 22 is taken directly from this source, with some minor

modifications. Gate valves upstream of the pumps are not included here because

they are not operated as part of any of the simulations. Table 5 shows the element

list. Program input is shown in Figure 23.

Some particular features of the input data worth noting are: (1) all six pumps, even

those of different sizes, use the same dimensionless characteristics. (2) All six

valves use the same characteristics. (3) The boundary element CANL appears at

three separate node locations. Though it is not generally recommended to use the

same element at different locations, in this case it is not confusing because the same

physical component, the canal, is represented at each location. An alternative

representation would show a junction at the end of the three discharge lines, with

a dummy conduit leading from the junction to a single CANL element. This has the

disadvantage of adding two new branches to the system. (4) With such a large,

complex system, it is easy to forget the simple junctions when preparing the

element list and the SYSTEM command. Care must be taken in this regard. (5)

The specified operating conditions for this simulation are load rejection at the

turbine and simultaneous shutdown of four pumps with closure of the discharge

valves. The two larger pumps are not operated and their discharge valves are

closed.
164 USACERL ADP 98/129

Figure 22. Proposed Oahe installation.
USACERL ADP 98/129 165

Element I.D. Type Node Location U.S. Node D.S. Node

HW Head Boundary 1 — —

C1R1 Conduit — 1 2

C1R2 Conduit — 2 3

C1R3 Conduit — 3 4

HLJ1 Tee Junction 4 — —

C12 Conduit — 4 5

HLJ2 Turbine 5 — —

C13 Conduit — 5 7

T Turbine — 7 8

TW Head Boundary 8 — —

C2 Conduit — 4 9

— Simple Junction 9 — —

C3 Conduit — 9 10

DC1 Diameter Change 10 — —

ST1 Surge Tank 10 — —

C4 Conduit — 9 11

P1 Pump — 11 12

BV1 Valve — 12 13

C7 Conduit — 13 14

CANL Head Boundary 14 — —

C5 Conduit — 9 15

P2 Pump — 15 16

BV2 Valve — 16 17

C8 Conduit — 17 18

— Simple Junction 18 — —

C6 Conduit — 9 19

P3 Pump — 19 20

BV3 Valve — 20 21

C9 Conduit — 21 18

C10 Conduit — 18 22

— Simple Junction 22 — —

C11 Conduit — 22 23

CANL Head Boundary 23 — —

C14 Conduit — 5 24

— Simple Junction 24 — —

C15 Conduit — 24 25

DC2 Diameter Change 25 — —

ST2 Surge Tank 25 — —

C16 Conduit — 24 26

P4 Pump — 26 27

BV4 Valve — 27 28

C19 Conduit — 28 29

CANL Head Boundary 29 — —

C17 Conduit — 24 30

P5 Pump — 30 31

BV5 Valve — 31 32

C20 Conduit — 32 33

— Simple Junction 33 — —

C18 Conduit — 24 34

P6 Pump — 34 35

BV6 Valve — 35 36

C21 Conduit — 36 33

C22 Conduit — 33 22

Table 5. Element list for Oahe power and pumping system.
166 USACERL ADP 98/129

 OAHE POWER PLANT - LOAD REJECTION

 C SYSTEM CONNECTIVITY

 

 SYSTEM

 EL HW AT 1

 EL C1R1 LINK 1 2

 EL C1R2 LINK 2 3

 EL C1R3 LINK 3 4

 EL HLJI AT 4 RISER 9

 EL C12 LINK 4 5

 EL HLJ2 AT 5 RISER 24

 EL C13 LINK 5 7

 EL T LINK 7 8

 EL TW AT 8

 EL C2 LINK 4 9

 JUNCTION AT 9

 EL C3 LINK 9 10

 EL DC1 AT 10

 EL ST1 AT 10

 EL C4 LINK 9 11

 EL Pl LINK 11 12

 EL BVI LINK 12 13

 EL C7 LINK 13 14

 EL CANL AT 14

 EL C5 LINK 9 15

 EL P2 LINK 15 16

 EL BV2 LINK 16 17

 EL C8 LINK 17 l8

 JUNC AT 18

 EL C6 LINK 9 19

 EL P3 LINK 19 20

 EL BV3 L INK 20 21

 EL C9 LINK 21 18

 EL C10 LINK 18 22

 JUNC AT 22

 EL C11 LINK 22 23

 EL CANL AT 23

 EL C14 LINK 5 24

 JUNC AT 24

 EL C15 LINK 24 25

 EL OC2 AT 25

 EL ST2 AT 25

 EL C16 LINK 24 26

 EL P4 LINK 26 27

 EL BV4 LINK 27 28

 EL C19 LINK 28 29

 EL CANL AT 29

 EL C17 LINK 24 30

 EL P5 LINK 30 31

 EL BV5 LINK 31 32

 EL C20 LINK 32 33

 JUNC AT 33

 EL Cl8 LINK 24 34

 EL P6 LINK 34 35

 EL BV6 LINK 35 36

 EL C21 LINK 36 33

 EL C22 LINK 33 22

 FINISH 

 

Figure 23. Input for Oahe Power Plant.
USACERL ADP 98/129 167

C ELEMENT PROPERTIES

 RESERVOIR ID HW ELEV 1618.5 FINI

 CONDUIT ID C1R1 LENGTH 1387.50 DIAMETER 24. CELERITY 4730 FRICTION .008

 NUMSEG 3

 ENDLOSS AT HW CPLUS .525 CMINUS 1.24

 FINISH

 COND ID CIR2 LENG 1263.7 DIAM 24. CELE 3950 FRIC .008 NUMSEG 3 FINI

 COND 1D CIR3 LENG 1135.7 DIAM 26. CELE 2840 FRIC .008 NUMSEG3 FINI

 TJUNCTION ID HLJI FILLET 0 FINI

 COND ID C12 LENG 39 DIAM 24. CELE 2501.6 FRIC .008 FINI

 TJUNCTION ID HLJ2 FILLET 0 FINI 

 COND ID C13 LEN 108.1 DIAM 24. CELE 2456.6 FRIC .008 FINI

 TURBINE ID T TYPE 1 SYNCSPD 100 WR2 148000000. FRICTION 250.

 WINDAGE 750 DIAMETER 20 FINISH

 RESE ID TW ELEV 1426.1 FINI

 COND ID C2 LENG 35 DIAM 17. CELE 2840 FRIC .008 FINI

 COND ID C3 LENG 46 DIAM 17. CELE 2840 FRIC .008 FINI

 DCHANGE ID DCI CPLUS 3.2 CMINUS 2.8 FINI

 SURGETANK ID ST1 ELBOTTOM 1515 ELTOP 1660 DIAM 70. CELE 2840 FRIC 0.02 FINI

 COND ID C4 LENG 208 DIAM 11.5 CELE 2434.2 FRIC .008 FINI

 PUMP ID Pl TYPE I RQ 1000 RHEAD I5O RSPEED 250 RTORQUE 286000

 WR2 3220000. FINISH

 VALVE ID BVI TYPE 1 DIAM 10. FINI

 COND ID C7 LENG 3210 NUMSEG 8 DIAM 8. CELE 2762.2 FRIC .009

 ENDLOSS AT CANL CPLUS 1.0 CMINUS 0~5

 FINI

 RESE ID CANL ELEV 1716 FINI

 COND ID C5 LENG 206 DIAM 7. CELE 2450.6 FRIC .010 FINI

 PUMP ID P2 TYPE I RQ 300 RHEAD 150 RSPEED 450 RTOROUE 47670

 WR2 250000 FINISH

 VALVE ID BV2 TYPE 1 DIAM 5.5 FINI

 COND ID C8 LENG 133.5 DIAM 5.5 CELE 2668.3 FRIC 0.012 FINI

 COND ID C6 LENG 204 DIAM 7. CELE 2450.6 FQ1C .010 FINI

 PUMP ID P3 AS P2 FINI

 VALVE ID BV3 TYPE 1 DIAM 5.5 FINI

 COND ID C9 AS C8 LENG 141.8 FINI

 COND ID C10 AS C7 LENG 77.3 FINI

 COND ID Cll LENG 3000 NUMSEG 7 DIAM 10.B3 CELE 2854.9 FRIC .008

 ENDLOSS AT CANL CPLUS 1.0 CMINUS 0.5

 FINI

 COND ID C14 AS C2 FINI

 COND ID C15 AS C3 FINI

 DCHANGE ID DC2 CPLUS 3.2 CMINUS 2.8 FINI

 SURGETANK ID ST2 AS ST1 FINI

 COND ID Cl6 AS C4 FINI

 PUMP ID P4 AS Pl FINI

 VALVE ID BV4 TYPE 1 DIAM 10. FINI

 COND ID C19 AS C7 FINI

 COND ID C17 AS C5 FINI

 PUMP ID P5 AS P2 FINI

 VALVE ID BVS TYPE 1 DIAM 5.5 FINI

 COND ID C20 AS C8 FINI

 COND ID Cl8 AS C6 FINI

 PUMP ID P6 AS P2 FINI

 VALVE ID BV6 TYPE 1 DIAM 5.5 FINI 

 COND ID C21 AS C9 FINI

 COND ID C22 AS C10 FINI

 

Figure 23 continued.
168 USACERL ADP 98/129

 C VALVE, PUMP, AND TURBINE CHARACTERISTICS

 

 V CHARACTERISTICS TYPE 1

 ANGLE 0.0 DISCOEF 1.71 A 5.0 DC 1.63 A 10.0 DC 1.40 A 15.0 DC 1.30

 A 20.0 DC 1.025 A 25.0 DC 0.775 A 30.0 DC 0.61 A 35.0 DC 0.485

 A 40.0 DC 0.375 A 45.0 DC 0.280 A 50.0 DC 0.205 A 55.0 DC 0.165

 A 60.0 DC 0.125 A 65.0 DC 0.090 A 70.0 DC 0.055 A 75.0 DC 0.030

 A 80.0 DC 0.017 A 85.0 DC 0.012 A 88.0 DC 0.005 A 90.0 DC 0.00

 FINISH

 P CHARACTERISTICS TYPE 1

 SRATIO

-1.5 -1.25 -1.0 -0.75 -0.5 -0.25 0.0 0.25

0.50 0.75 1.00

 QRATIO

 -1.1 -0.9 -0.7 -0.5 -0.25 0.0 0.25 0.50

 .75 1.00 1.25 1.50

 HRATIO

0.95 0.90 0.93 1.00 1.25 1.40 1.55 1.75

2.10 2.76 3.60 0.79 0.64 0.60 0.65 0.73

0.88 1.07 1.30 1.60 2.20 2.80 0.76 0.54

0.40 0.36 0.40 0.50 0.65 0.85 1.20 1.75

2.35 0.74 0.52 0.35 0.23 0.20 0.25 0.34

0.50 0.64 1.34 2.00 0.74 0.52 0.34 0.18

0.12 0.12 0.15 0.27 0.53 1.10 1.70 0.74

0.52 0.33 0.18 0.06 0.02 0.0 0.13 0.40

0.94 1.55 0.65 0.41 0.22 0.04 0.00 -0.10

 -0.12 0.06 0.35 0.83 1.48 0.44 0.20 0.00

-0.20 -0.32 -0.40 -0.33 -0.08 0.25 0.74 1.37

0.00 -0.30 -0.50 -0.70 -0.85 -0.87 -0.70 -0.40

0.05 0.60 1.25 -0.65 -1.00 -1.30 -1.40 -1.45

-1.38 -1.20 -0.80 -0.30 0.30 1.00 -1.50 -1.85

-2.10 -2.30 -2.30 -2.00 -1.70 -1.20 -0.74 -0.11

0.64 -2.55 -2.85 -2.90 -3.40 -3.40 -2.73 -2.20

-1.6 -1.3 -0.6 0.25

 TRATIO

0.10 0.40 0.80 1.10 1.40 1.65 1.90 2.08

2.25 2.48 3.00 -0.32 0.0 0.33 0.63 0.82

1.10 1.30 1.50 1.70 2.00 2.45 -0.70 -0.31

0.00 0.20 0.40 0.60 0.80 0.92 1.20 1.60

2.10 -1.00 -0.60 -0.29 -0.04 0.13 0.27 0.40

0.53 0.76 1.20 1.70 -1.38 -0.92 -0.56 -0.25

-0.05 0.05 0.13 0.20 0.43 0.78 1.25 -1.80

-1.23 -0.80 -0.46 -0.25 -0.11 0.00 0.12 0.26

0.57 1.00 -2.70 -2.0 -1.3 -0.90 -0.60 -0.30

-0.12 0.07 0.25 0.53 0.90 -3.50 -2.75 -2.10

-1.60 -1.20 -0.77 -0.34 -0.04 0.25 0.58 0.97

-4.40 -3.60 -3.00 -2.35 -1.90 -1.35 -0.80 -0.32

0.15 0.55 1.02 -5.40 -4.60 -4.00 -3.35 -2.70

-2.00 -1.40 -0.80 -0.10 0.44 1.00 -6.10 -5.50

-4.90 -4.30 -3.50 -2.75 -2.15 -1.30 -0.54 0.19

0.85 -6.50 -6.30 -5.70 -5.20 -4.30 -3.60 -2.90

-2.00 -1.20 -0.20 0.50

 FINISH

Figure 23 (continued)
USACERL ADP 98/129 169

TCHARACTERISTICS TYPE 1

 GATEPOS

0.00 10.00 25.00 43.38 53.23 65.08 70.50 75.92

81.34 86.77 97.61

 HEAD

0.0 40.0 80.0 100.0 120.0 130.0 140.0 150.0

160.0 170.0 180.0 190.0 200.0 210.0 220.0

 Q

0.0 54.0 165.0 1086.0 1828.0 2390.0 2844.0 3090.0

3300.0 3562.0 3968.0 0.0 267.0 637.0 1718.0 2514.0

3195.0 3622.0 3920.0 4196.0 4481.0 4934.0 0.0 480.0

1110.0 2350.0 3200.0 4000.0 4400.0 4750.0 5093.0 5400.0

5900.0 0.0 585.0 1345.0 2666.0 3543.0 4402.0 4789.0

5165.0 5540.0 5859.0 4383.0 0.0 693.0 1581.0 2982.0

3886.0 4805.0 5178.0 5580.0 5990.0 6319.0 6866.0 0.0

779.0 1749.0 3158.0 4079.0 5035.0 5440.0 5853.0 6261.0

6584.0 7151.0 0.0 889.0 2000.0 3327.0 4259.0 5258.0

5685.0 6104.0 6506.0 6835.0 7419.0 0.0 996.0 2275.0

3494.0 4434.0 5478.0 5922.0 6337.0 6724.0 7073.0 7673.0

0.0 1015.0 2311.0 3650.0 4615.0 5693.0 6140.0 6561.0

6951.0 7306.0 7926.0 0.0 1046.0 2382.0 3782.0 4792.0

5903.0 6324.0 6765.0 7259.0 7535.0 8168.0 0.0 1076.0

2451.0 3906.0 4948.0 6094.0 6501.0 6959.0 7417.0 7761.0

8409.0 0.0 1106.0 2519.0 4032.0 5098.0 6259.0 6672.0

7145.0 7591.0 7982.0 8643.0 0.0 1143.0 2584.0 4160.0

5242.0 6405.0 6836.0 7326.0 7795.0 8194.0 8870.0 0.0

1162.0 2648.0 4284.0 5377.0 6554.0 6995.0 7507.0 7985.0

8397.0 9095.0 0.0 1190.0 2710.0 4403.0 5505.0 6702.0

7148.0 7687.0 8167.0 8590.0 9318.0

 EFFICIENCY

0.000 0.380 0.560 0.563 0.567 0.570 0.573 0.657

0.707 0.770 0.835 0.000 0.380 0.560 0.570 0.594

0.643 0.677 0.739 0.779 0.823 0.858 0.000 0.380

0.560 0.605 0.727 0.758 0.781 0.821 0.851 0.876

0.881 0.000 0.380 0.660 0.680 0.793 0.815 0.833

0.862 0.887 0.903 0.893 0.000 0.380 0.560 0.755

0.860 0.873 0.885 0.903 0.923 0.929 0.904 0.000

0.380 0.560 0.793 0.879 0.892 0.904 0.922 0.933

0.931 0.907 0.000 0.380 0.560 0.825 0.894 0.907

0.918 0.934 0.937 0.928 0.906 0.000 0.380 0.560

0.849 0.904 0.916 0.927 0.938 0.936 0.926 0.904

0.000 0.380 0.560 0.864 0.908 0.922 0.934 0.936

0.931 0.924 0.901 0.000 0.380 0.560 0.867 0.906

0.925 0.936 0.931 0.915 0.920 0.897 0.000 0.380

0.560 0.863 0.905 0.925 0.930 0.925 0.916 0.915

0.892 0.000 0.380 0.560 0.859 0.902 0.920 0.922

0.918 0.914 0.909 0.887 0.000 0.380 0.560 0.855

0.900 0.911 0.915 0.911 0.905 0.902 0.881 0.000

0.380 0.560 0.852 0.888 0.903 0.907 0.903 0.898

0.896 0.875 0.000 0.380 0.560 0.848 0.896 0.894

0.901 0.895 0.890 0.890 0.870

 FINISH

Figure 23 (continued)
170 USACERL ADP 98/129

C OPERATION SPECIFICATIONS

OPTURB ID T REJECT VSCHEDULE 10 FINI

OPPUMP

ID P1 OFF

ID P2 SHUTOFF

ID P3 SHUTOFF

ID P4 OFF

ID P5 SHUTOFF

ID P6 SHUT

FINISH

VALVE ID BV1 VSCHEDULE 1 FINI

VALVE ID BV2 VSCHED 3 FINI

VALVE ID BV3 VSCHED 3 FINI

VALVE ID BV4 VSCHED 1 FINI

VALVE ID BV5 VSCHED 3 FINI

SCHEDULE

VSCHEDULE 1 TIME 0 ANGLE 90

VSCH 2 T 0 A 0

VSCH 3 

T 0.0 A 0.0 T 10 A 17 T 20 A 33 T 30 A 50 T 40 A 67 T 50 A 83 T 55 A 88

T 58 A 89 T 59 A 89.6 T 60 A 90

VSCH4

 T 0 A 90 T 10 A 73 T 20 A 57 T 30 A 40 T 40 A 23 T 50 A 7 T 55 A 2 T 58 A1 

T 59 A 0.4 T 60 A 0

FINISH

SCHEDULE

VSCHED 10 T 0 G 77 T 0.3 G 75,85 T 0.5 G 71.84 T 2.5 G 24.72 T 3.1 G 11.47

T 3.6 G 5.75 T 4.1 G 2.87 T 4.6 G 1.15 T 5.1 G 0.0

VSCHED 11 T 0 G 97.6 T 0.6 G 96.1 T 1.0 G 91.1 T 5.0 G 31.3 T 6.2 G 14.5

T 7.2 G 7.29 T 8.2 G 3.63 T 9.2 G 1.45 T 10.2 G 0

VSCHED 12 T 0 G 97.6 T 0.5 G 97.6 T 0.8 G 97.6 T 2.0 G 83.0 T 4.0 G 59.9

T 6.0 G 35.0 T 7.0 G 25.0 T 7.5 G 20.0 T 8.0 G 15.0 T 8.6 G 10.0 T 9.0 G 6.0

T 9.5 G 3.0 T 10.0 G 1.0 T 11.5 G 0.0

FINISH

C OUTPUT REQUESTS

HISTORY

NODE 7 Q HEAD PIEZ

ELEM T SPEED

NODE 4 TONODE 3 Q

FINISH

PLOT

NODE 7 Q HEAD PIEZ

ELEM T SPEED POSITION

ELEM ST1 ELEV

FINI

DISPLAY OFF FINI

C COMPUTATIONAL PARAMTERS

CONTROL

DTCOMP 0.1 DTOUT 1.0 TMAX 12

DTCOMP 1.0 DTOUT 5.0 TMAX 60.

DTCOMP 5.0 DTOUT 10.0 DTMAX 400.

FINI

C EXECUTION CONTROL

CHECK

GO

GOODBYE

Figure 23 (continued)
USACERL ADP 98/129 171

5.4 Clinton Lake Pumping Plant—Case Study

The following case study was provided by the Omaha District of the Corps of

Engineers.

5.4.1 Introduction and Purpose

The Clinton Lake pumping plant is owned and operated by the City of Lawrence

(Kansas). The plant's water supply is obtained from the normal discharge line of

the Corps of Engineers Clinton Lake Reservoir on the Wakarusa River. Personnel

from the Kansas City District and Missouri River Division noticed vibration at a

manhole on the normal discharge line and were concerned that it was a result of

water hammer caused by operation of the pumping plant. The Omaha District,

because of their experience with hydraulic transients, was recommended to perform

a hydraulic transient study for the plant.

The scope of this study was limited to the determination of hydraulic pressures in

the system resulting from transient operation of the pumping plant and reservoir

discharge gate.

5.4.2 Study Method

The Corps of Engineer's WHAMO computer program was used to model the

pumping plant and its operation including intake and discharge lines and the

reservoir's normal discharge valve. The most recent version of the WHAMO

program can model all of the elements of the Clinton pumping plant configuration,

except for the air valves on the pump discharge line. However, as of this time, the

plotting routine is not available for use and printed output data were manually

plotted.

Omaha District personnel made a field trip to gather data on plant operation and

verify drawings supplied by the Kansas City District. It was also necessary to get

name tag data off the plant equipment and get dimensional data off the City of

Lawrence drawings for the plant's discharge line.

Transient pressures for a pumping plan system are dependent on the particular

characteristics of the pump. The 4-quadrant performance curves necessary for best

model simulation of the pumps used at the plant were not available. Available

characteristics for constant speed operation of those units were modified using

hydraulic machinery equations for first quadrant representation. It was necessary

to model the pumps in the reverse direction of rotation so 4-quadrant curves for
172 USACERL ADP 98/129

pumps of both higher and lower specific speeds were substituted. This was done

assuming that the actual performance of the Clinton Lake pumping plant pumps

would fall between those two. The Clinton Lake pumps have a specific speed of

3111. The speeds of the other two are 3852 and 1935.

It was assumed that the most severe water hammer pressures would result from

intentional pumping shutdowns or accidental tripout of the pumps. Cases to be

modeled would include variations of those cases with the pump's pneumatic shutoff

valves and/or the check valve failing. Cases were modeled with the reservoir's

normal discharge valve both open and closed. Transient operation of the normal

discharge valve was not considered since it is manually operated and cannot be

moved quickly.

5.4.3 Plant Configuration and Operation

The pumping plant intake line taps on to the normal discharge line of the reservoir

near the downstream end (see Figure 25). The plant has three pumps each with a

rated capacity of 7.80 cfs and provisions for one more pump. Each has an air

operated shutoff valve that closes in approximately 27 seconds during either normal

or emergency shut-downs. During pump trip-offs, the pumps are still rotating in

the pumping direction after the valves have closed. Inertia of the pumps and their

motors was obtained from manufacturers.

The plants discharge line is 36 inches in diameter, 9200 feet long and has a one-way

check valve with an 8 in. bypass near the pumps. The discharge line has high

points at distances of approximately 900 feet and 2500 feet from the plant. Both

high points are equipped with air valves. The valves are designed to let air in, in

case of a water column separation, and air out for positive pressure conditions. The

reservoir normal discharge valve is located at the end of the reservoir's discharge

line. It is a manually operated gate type valve. Maximum discharge is limited to

35 cfs. Reservoir discharge and pumping usually occur simultaneously.

5.4.4 Results And Recommendations

Results of this study indicate that no abnormal pressure surges can occur in the

reservoir discharge line or the pumping plant intake line. For the cases modeled,

a pressure of 27 feet above reservoir elevation is the maximum pressure expected

and that would occur in the pump intake line near the pumps, during a power loss

with all three units previously pumping and with the pump shut off valves working.

Failure of the valves would not increase that pressure.
USACERL ADP 98/129 173

Figure 24. Schematic of Clinton Lake Pumping Plant.
174 USACERL ADP 98/129

Results also indicate that no abnormal pressure surges would occur in the pump

discharge line. The lowest pressure expected would be 10 feet below atmospheric

pressure and would occur at the first air valve after a power loss of all three pumps.

The highest pressure predicted by the WHAMO program would be 65 feet above

static head and would occur near the pumps. Actual maximum pressure could be

different if the air valves let air into the system because the WHAMO program does

not model mixed flow conditions. It is not likely that much air would enter the line

because the time that the line is below atmospheric pressure is short.

The results indicate the following conclusions as far as valve operation is concerned.

(1) If the reservoir discharge valve is open, pressures throughout the system are less

severe. (2) The pneumatic shutoff valves for the pumps are only to prevent wasting

water, pressures are actually slightly higher with them closing as designed. (3) The

system was modeled with the check valve slamming shut after a power loss and

that was not a critical case.

The system was modeled for the most critical case which is a pumping power loss

with all valves working properly and with the 4th pump installed. Maximum and

minimum pressures become only slightly more severe.

5.4.5 Confidence Level of Study

The most significant factors which could cause errors in the study results would be

inaccuracy in modeling the pump characteristics and not accurately modeling

closure of the pump shutoff valves.

As stated previously, three different sets of pump characteristics were used in the

WHAMO program. It is unlikely that the actual pump characteristics would

produce water hammer characteristics more severe than obtained for the most

severe of those three. The results are very similar for all three.

Exact valve closure rates were not measured in the field but a rate of as quick as

full closure in 14 seconds could be made with little increase in pressures. That

rapid a closing rate is probably not possible. Actual valve closure rate is about 27

seconds.

Severe water hammer in the pumping plant discharge line is not likely and could

not occur in the pumping plant intake line as a result of operation of the pumps.
USACERL ADP 98/129 175

5.4.6 Cases Modeled

The following is a description of the cases modeled.

Normal Pump Shutoffs: Case 1. This case assumes that only one pump is being

used and is then shut off. The reservoir discharge valve is open. Patterson pump

characteristics are used. Not a critical case.

Case 2. Same as Case No. 1 except that the reservoir discharge valve is closed. No

critical pressures but most severe for a normal shut off.

Case 3. This case assumed that all three pumps are running and one of them is

shut off. The reservoir discharge valve is open. Not a critical case.

Case 4. Same as Case No. 3 except that the reservoir discharge valve is closed.

Pump Trip-Offs (All Valves Work): Case 5. This case assumes all three pumps lose

power simultaneously and pump shutoff valves close in 27 seconds. The discharge

valve is open and Patterson pump characteristics are used. Not a critical case.

Case 6. Same as Case No. 5 except that the reservoir discharge valve is closed.

Produces most severe pressure in the pump discharge line.

Case 7. Same as Case No. 5 but uses Oahe pump characteristics; not a critical

case.

Case 8. Same as Case No. 5 except uses Oahe pump characteristics and the

reservoir discharge valve is closed. Produces the most severe pressures in the pump

intake line. Some of the results are plotted in Figures 25 and 26. WHAMO input

data are shown for this case in Figure 27.

Case 9. Same as Case No. 5 except uses Kittredge pump characteristics. Not a

critical case.

Case 10. Same as Case No. 5 except uses Kittredge pump characteristics and the

reservoir discharge valve is closed.

Case 11. This case is the same as Case No. 6 but assumes that the 4th pump is

installed and initially pumping.
176 USACERL ADP 98/129

Case 12. This case is the same as Case No. 8 but assumes that the 4th pump is

installed and initially pumping.
USACERL ADP 98/129 177

Figure 25. Simulated pump behavior (Case 8).
178 USACERL ADP 98/129
USACERL ADP 98/129 179

Figure 26. Simulated pipeline pressures (Case 8).
180 USACERL ADP 98/129

CLINTON LAKE POWER LOSS 3 PUMPS VALVES OPER, OAHE CHAR., VLB CLOSED

SYSTEM

EL RES1 AT 100

EL RES2 AT 195

EL RES3 AT 400

EL C01 LINK 100 110

EL C02 LINK 110 120

EL C03 LINK 120 130

EL C04 LINK 130 140

EL C05 LINK 140 150

EL C06 LINK 150 160

EL VLA LINK 160 170

EL C07 LINK 170 180

EL VLB LINK 180 190

EL C08 LINK 190 195

EL C11 LINK 150 200

EL C12 LINK 200 210

EL C13 LINK 200 221

EL C14 LINK 210 222

EL C15 LINK 210 223

EL P1 LINK 221 231

EL P2 LINK 223 233

EL C16 LINK 231 241

EL C17 LINK 232 242

EL C18 LINK 233 243

EL VL1 LINK 241 251

EL VL2 LINK 242 252

EL VL3 LINK 243 253

EL C19 LINK 251 260

EL C20 LINK 252 260

EL C21 LINK 253 270

EL C22 LINK 260 270

EL C23 LINK 270 280

EL C24 LINK 280 281

EL VCK LINK 281 282

EL C25 LINK 282 290

EL C26 LINK 280 290

EL C27 LINK 290 295

EL VLC LINK 295 300

EL C30 LINK 300 310

EL C31 LINK 310 320

EL C32 LINK 320 330

EL C33 LINK 330 340

EL C34 LINK 340 350

EL C35 LINK 350 360

EL C36 LINK 360 400

JUNC AT 150

JUNC AT 280

JUNC AT 290

JUNC AT 200

JUNC AT 210

JUNC AT 260

JUNC AT 270

NODE 320 ELEV 861

NODE 340 ELEV 867

 FINISH

Figure 27. WHAMO input for Clinton Lake.
USACERL ADP 98/129 181

C ELEMENT PROPERTIES

RESERVOIR ID RES1 ELEV 875.5 FINISH

RESERVOIR ID RES2 ELEV 828.5 FINISH

RESERVOIR ID RES3 ELEV 965.75 FINISH

 

 COND ID C01 LENG 79.3 D1AM 3.5 CELE 4000 FRlC 0.0065

 ADDEDLOSS AT 000.0 CPLUS 0.50 CMINUS 1.00

ADDEDLOSS AT 14.8 CPLUS 0.42 CMINUS 0.42

 ADDEDLOSS AT 53.3 CPLUS 0.42 CMINUS 0.42 FINISH

COND ID C02 LENG 33.0 DIAM 3.5 CELE 4000 FRlC 0.0065

 ADDEDLOSS AT 000.0 CPLUS 0.60 CMINUS 0.60

ADDEDLOSS AT 9.0 CPLUS 0.24 CMINUS 0.24

 ADDEDLOSS AT 18.0 CPLUS 0.24 CMINUS 0.24 FINISH

COND ID C03 LENG 10.0 CELE 4000 FRlC 0.0065

VARI DIST 0.0 AREA 9.62

VARI DIST 10.0 AREA 7.06

 ADDEDLOSS AT 000.0 CPLUS 0.20 CMINUS 0.20 FINISH

COND ID C04 LENG 526.8 D1AM 3.0 CELE 4000 FRlC 0.0065

 ADDEDLOSS AT 526.8 CPLUS 0.42 CMINUS 0.42 FINISH

COND ID C05 LENG 113.8 D1AM 3.0 CELE 4000 FRlC 0.0065

 ADDEDLOSS AT 8.0 CPLUS 0.20 CMINUS 0.20

ADDEDLOSS AT 84.4 CPLUS 0.20 CMINUS 0.20

 ADDEDLOSS AT 91.7 CPLUS 0.42 CMINUS 0.42 FINISH

COND ID C06 LENG 2.0 D1AM 2.0 CELE 4000 FRlC 0.0065 FINISH

COND ID C07 LENG 54.6 D1AM 2.0 CELE 4000 FRlC 0.0065

 ADDEDLOSS AT 9.2 CPLUS 0.15 CMINUS 0.15

ADDEDLOSS AT 14.2 CPLUS 0.20 CMINUS 0.20

 ADDEDLOSS AT 32.4 CPLUS 0.20 CMINUS 0.20 FINISH

COND ID C08 LENG 4.0 D1AM 2.0 CELE 4000 FRlC 0.0065

 ADDEDLOSS AT 4.0 CPLUS 1.0 CMINUS 1.0 FINISH

COND ID C11 LENG 10.0 D1AM 3.0 CELE 4000 FRlC 0.0065 FINISH

COND ID C12 AS C11 FINISH

COND ID C13 LENG 10.0 D1AM 1.0 CELE 4000 FRlC 0.0065

 ADDEDLOSS CPLUS 3.00 CMINUS 3.00 FINISH

COND ID C14 AS C13 FINISH

COND ID C15 LENG 20.0 D1AM 1.0 CELE 4000 FRlC 0.0065

 ADDEDLOSS CPLUS 3.75 CMINUS 3.75 FINISH

COND ID C16 LENG 8.0 D1AM 0.8 CELE 4000 FRlC 0.0065 FINISH

COND ID C17 AS C16 FINISH

COND ID C18 AS C16 FINISH

COND ID C19 LENG12.0 D1AM 0.8 CELE 4000 FRlC 0.0065

 ADDEDLOSS CPLUS 2.50 CMINUS 2.50 FINISH

COND ID C20 LENG 2.0 D1AM 0.8 CELE 4000 FRlC 0.0065

 ADDEDLOSS CPLUS 1.80 CMINUS 1.80 FINISH

COND ID C21 AS C20 FINISH

COND ID C22 AS C11 FINISH

COND ID C23 AS C11 LENG 6.0 FINISH

COND ID C24 AS C11 LENG 2.0 FINISH

COND ID C25 AS C24 FINISH

COND ID C26 LENG 6.0 D1AM 0.7 CELE 4000 FRlC 0.0065

 ADDEDLOSS CPLUS 1.50 CMINUS 1.50 FINISH

COND ID C27 AS C11 LENG 4.0 FINISH

COND ID C30 AS C11 LENG 277.0 FINISH

COND ID C31 LENG 647.0 DIAM 3.0 CELE 4000 FRIC 0.0065 FINISH

COND ID C32 AS C31 LENG 935.0 FINISH

COND ID C33 AS C31 LENG 665.0 FINISH

COND ID C34AS C31 LENG 1195.0 FINISH

Figure 27 (continued)
182 USACERL ADP 98/129

COND ID C35 AS C31 LENG 4895.0 FINISH

COND ID C36 AS C31 LENG 610.0 FINISH

VALVE ID VL1 BUTTERFLY DIAM 0.70 VSCHEDULE 1 FINISH

VALVE ID VL2 BUTTERFLY DIAM 0.70 VSCHEDULE 1 FINISH

VALVE ID VL3 BUTTERFLY DIAM 0.70 VSCHEDULE 1 FINISH

VALVE ID VLA BUTTERFLY DIAM 2.00 VSCHEDULE 4 FINISH

VALVE ID VLB GATE DIAM 2.00 VSCHEDULE 5 FINISH

VALVE ID VLC BUlTERFLY DIAM 3.00 VSCHEDULE 4 FINISH

ONEWAY ID VCK DIAM 3.0 FINISH

PUMP ID P1 TYPE 1 RHEAD 110.0 RQ 7.80 RSPEED 1786.0

RTORQUE 356.1 WR2 115.0 FlNlSH

PUMP ID P2 AS P1 FINISH

PUMP ID P3 AS P1 FINISH

C PUMP CHARACTERISTICS

 

 PCHARACTERISTICS TYPE 1

 

 SRATIO -1.50 -1.25 -1.00 -0.75 -0.50 -0.25 0.00 0.25 0.50 0.75 1.00

 QRATIO -1.1 -0.9 -0.7 -0.5 -0.25 0.0 0.25 0.5 0.75 1.0 1.25

 1.50

 

 HRATIO 0.95 0.90 0.93 1.00 1.25 1.40 1.55 1.75 2.10 2.76 3.60

 0.79 0.64 0.60 0.65 0.73 0.88 1.07 1.30 1.60 2.20 2.80

 0.76 0.54 0.40 0.36 0.40 0.50 0.65 0.85 1.20 1.75 2.35

 0.74 0.52 0.35 0.23 0.20 0.25 0.34 0.50 0.64 1.38 2.00

 0.74 0.52 0.34 O.18 0.12 O.12 O.15 0.27 0.53 1.10 1.70

0.74 0.52 O.33 0.18 0.06 0.02 0.00 0.13 0.4O 0.94 1.55

0.65 0.41 0.22 0.08 0.00 -0.10 -0.12 0.06 0.35 0.83 1.480

 0.44 0.20 0.00 -0.20 -0.32 -0.40 -0.33 -0.08 0.25 0.74 1.37

0.00 -0.30 -0.50 -0.70 -0.85 -0.87 -0.70 -0.40 0.05 0.60 1.25

 -0.65 -1.00 -l.3O -1.40 -1.45 -l.38 -1.20 -0.80 -0.30 0.30 1.00

 -1.50 -l.85 -2.10 -2.3O -2.30 -2.00 -1.70 -1.20 -0.74 -0.11 0.64

 -2.55 -2.85 -2.90 -3.40 -3.40 -2.73 -2.20 -1.60 -1.30 -0.60 0.25

 TRATIO 0.10 0.40 0.80 1.10 1.40 1.65 l.9O 2.08 2.25 2.48 3.00

-0.32 0.00 0.33 0.63 0.82 1.10 1.30 1.50 1.70 2.00 2.45

-0.70 -0.31 0.00 0.20 0.40 0.60 0.80 0.92 1.20 1.60 2.10

-1.00 -0.60 -0.29 -0.04 0.13 0.27 0.40 0.53 0.78 1.20 1.70

-1.80 -1.23 -0.80 -0.46 -0.25 -0.11 0.00 0.12 0.26 0.57 1.00

-2.70 -2.00 -1.30 -0.90 -0.60 -0.30 -0.12 0.07 0.25 O.53 0.90

-3.50 -2.75 -2.10 -1.60 -1.20 -0.77 -0.34 -0.04 0.25 0.58 0.97

-4.40 -3.60 -3.00 -2.35 -1.90 -1.35 -0.80 -0.32 0.15 0.55 1.02

 -5.40 -4.60 -4.00 -3.35 -2.70 -2.00 -1.40 -0.80 -0.10 0.44 1.00 

 -6.10 -5.50 -4.90 -4.30 -3.50 -2.75 -2.15 -1.30 -0.54 0.19 0.85

-6.50 -6.30 -5.70 -5.20 -4.30 -3.60 -2.90 -2.00 -1.20 -0.20 0.50

 

FINISH

C PUMP OPERATION

OPPUMP ID P1 SHUTOFF TOFF 0.0 FINISH

OPPUMP ID P2 SHUTOFF TOFF 0.0 FINISH

OPPUMP ID P3 SHUTOFF TOFF 0.0 FINISH

Figure 27 (continued)
USACERL ADP 98/129 183

C VALVE OPERATION SCHEDULES.

SCHEDULE

 VSCHEDULE 1 T 000 A 0.0

 T 10.0 A 60.0

 T 27.0 A 90.0

 VSCHEDULE 2 T 0.0 G 90.0

 VSCHEDULE 4 T 0.0 A 0.0

 VSCHEDULE 5 T 0.0 G 0.0

 FINISH

 

 HISTORY

 ELEM P1 SPEED POWER Q

 ELEM P2 SFEED POWER Q

 ELEM P3 SPEED POWER Q

 NODE 221 HEAD

 NODE 222 HEAD

 NODE 223 HEAD

 NODE 231 HEAD

 NODE 232 HEAD

 NODE 233 HEAD

 NODE 300 HEAD Q

 NODE 140 HEAD

 NODE 320 HEAD PRES

 NODE 340 HEAD PRES

 ELEM VLB POSITION

 ELEM VL1 POSITION

 ELEM VL2 POSITION

 ELEM VL3 POSITION

 NODE 190 Q

FINISH

CONTROL

 DTCOMP 0.5 DTOUT 0.5 TMAX 10.0

 DTCOMP 1.0 DTOUT 1.0 TMAX 50.0

 FINISH

 

 DISPLAY OFF FINISH

 DlSPLAY ALL FINI

 

 CHECK

 GO

GOODBYE

 

 

Figure 27 (continued)
184 USACERL ADP 98/129

Pump Trip-Offs (Pneumatic Valves Fail): Case 13. This assumes that all three

pumps lose power and their shut-off valves fail to close. The reservoir discharge

valve is open and uses Oahe pump characteristics. Not a critical case.

Case 14. Same as Case No. 13 except that the reservoir discharge valve is closed.

Case 15. Same as Case No. 13 except that the reservoir discharge valve is closed

and uses Kittredge pump characteristics.

Pump Trip-Off (Pneumatic Valves Fail and Check Valve Fails): Case 16. This

assumes that all three pumps lose power and their shut-off valves fail to close. The

check valve initially fails to close, then slams shut after 50 seconds. The reservoir

discharge valve is closed.

5.5 Ponape Power Plant—Case Study

The following case study was provided by the North Pacific Division of the Corps of

Engineers.

In 1983 the Corps of Engineers designed the Ponape Hydro-Electric Project located

on the island of Ponape in Micronesia. The project consisted of building a 4600 ft.

long penstock from an existing dam to the new powerhouse. The powerhouse has

two small horizontal shaft Francis turbines directly coupled to synchronous

generators. The two units are capable of producing a total of 1600 kW when

operating under a net head of 200 feet.

Because of its length, the cost of the penstock was a significant fraction of the total

project cost. To minimize the penstock cost, the turbine-generator equipment and

control logic were selected to limit the maximum water hammer pressure to 130

percent of the maximum static pressure. No surge tank was possible due to the

unsuitability of the terrain as well as the high cost. Because the units were small,

it was decided to allow the turbine to achieve runaway speed (in the event of a load

rejection) before the gates would begin to close off the waterflow. It is a

characteristic of Francis turbines to pass less water at runaway than at

synchronous speed. Axial flow (Kaplan) turbines however do not exhibit this

characteristic. The unit discharge for the Francis turbine decreases with increasing

PHI. Thus, pressure rises due to water hammer will always occur in systems with

Francis turbines regardless of the gate closure rate. The minimum pressure rise

is that which will occur when the unit accelerates to runaway while the gates

remain fixed. The rate of acceleration directly influences the magnitude of the

pressure rise and depends only upon the turbine characteristics and the inertia
USACERL ADP 98/129 185

(WR2) of the rotating parts. Therefore, by adding inertia in the form of a flywheel,

the pressure rise can be diminished. For small turbine-generator units such as

these, it is technically and economically feasible to do this.

The Ponape project will consist of a new powerhouse with a 4600 ft (modeled) long

penstock and two different sizes of horizontal Francis turbine-generator units both

rated at a net head of 200 ft. A recent Francis turbine model was used for this

analysis. Prototype runner diameters of 1.33 ft and 1.875 ft and synchronous

speeds of 1200 rpm and 900 rpm respectively, were predicted by this model. The

large turbine was "rated" at approximately 1070 kW and the small turbine at 530

kW to produce the guaranteed plant electrical output of 1600 kW rated at the net

head of 200 feet. The small unit has minimum tailwater and forebay elevations of

139.5 and 362.5 ft respectively, with the elevations of the larger turbine being onehalf foot higher in both instances.

The purpose of running the WHAMO program for the Ponape Project was to model

hydraulic transient (water hammer) pressure rise due to plant load rejection and

subsequent unit runaway. The water hammer phenomenon arises wherever a

change in flow (Q) occurs causing positive pressure waves for decrease in Q and

negative waves for increases in Q. If the initiation of gate closure is delayed until

after the unit is at runaway speed, the magnitude of the hydraulic transient

pressures will be minimized. This was the approach taken. The penstock design

pressure was set at 125 psi (130 percent of maximum static head at the

powerhouse). The Ponape system was modeled for the worst foreseen conditions of

simultaneous full gate load rejection with 1600 kW plant output. The gates would

then be closed at such a rate as to not exceed the penstock design pressure.

The Ponape system construction in terms of the WHAMO program is detailed in

Figure 28. The penstock element arrangement consists of one variable diameter

conduit, seven constant diameter conduits, and one branch, the total of which

connects the forebay to the turbine. The draft tubes are modeled as well. The

elevation of each node is shown with the headwater being at El. 362.4 and the

tailwater being at El. 140.4. The conduit was broken into several individual

elements at every change in property or slope, with a node connecting each. The

estimated diameters and developed lengths of the penstock segment are also shown.

The penstock is of steel reinforced concrete and contains no surge tank.

The WHAMO input data served to link the elements in the Ponape System together

in the appropriate order. Elevations, lengths, areas, celerity, friction coefficients,

windage and turbine speed, diameter, and WR2

 were all entered data. Twelve gate
186 USACERL ADP 98/129

Figure 28. Ponape system schematic.

and twenty-four phi (velocity ratio) values were also entered, forming the basis of

the two 240 element arrays of turbine model data, one for horsepower and the other

for discharge. These values were digitized directly from existing model curves and

are displayed as a table in the output generated under Turbine Characteristics.

WR2

 (moment of inertia of rotating parts) was increased over several runs in order

to delay maximum pressure occurrence. The design energy elevation at the
USACERL ADP 98/129 187

powerhouse was determined to be 428.15 fmsl (125 psi) and corresponds to the

maximum pressure the penstock will be designed to withstand. The results of the

pertinent WHAMO runs are as follows:

Run #

Maximum Energy

Elevation

WR2

Time After Load

Unit 1 Unit 2 Rejection (sec)

1 445.6 1060 3830 2.75

2 413.6 2120 7660 4.0

3 400.5 3180 11490 4.75

4 418.4 1820 7000 3.75 

Run #4 was the final run, with the WR2

 chosen to keep the energy elevation below

the 428.15 fmsl design condition. The results of this run yielded a maximum

pressure surge of 418.4 fmsl (120 psi) at the turbine under full gate conditions.

Shown are computer generated plots displaying the time varying energy elevation,

discharge, speed, and power of each turbine (Figures 29-32). The maximum energy

elevation grade line along the length of the penstock is shown on Figure 33. The

input file is shown in Figure 34.

Immediately after reaching maximum runaway speed, the calculated Q (discharge)

and HP (horsepower) values exceed the range of turbine model data. However,

since this error occurs after the maximum hydraulic transient pressure and

runaway speed are attained, the computer results are accurate. A second hydraulic

transient occurs when the gates begin to close. The magnitude of this transient is

directly influenced by the gate closure rate. Although this could be modeled, there

is no need since the gate timing rate can simply be adjusted in the field by doing

load rejection tests. The closure setting should be one that produces a maximum

pressure of 125 psi in the penstock at the powerhouse.

It should also be noted that the turbine model used by the manufacturer will not

be the same as that used in this study. As explained previously the turbine

"chokes" the flow of water passing through it as it accelerates. The amount of

"choking" is related to the specific speed of the turbine. Generally speaking, the

higher the specific speed the more "choking" occurs during runaway. The model

specific speed is quite close to the proposed turbines' specific speeds (at their rated

points). Therefore the results obtained from this study should be representative

even though the characteristics of the turbine actually furnished could not be

simulated.
188 USACERL ADP 98/129

The penstock and turbine water passages will be hydrostatically tested to 150% of

their pressure. Also the turbine generator units will be designed and tested to be
USACERL ADP 98/129 189

Figure 29. Simulation results for small turbine unit (Run #4).
190 USACERL ADP 98/129

Figure 30. Simulation results for small turbine unit (Run #4).
USACERL ADP 98/129 191

Figure 31. Simulation results for big turbine unit (Run #4).
192 USACERL ADP 98/129

Figure 32. Simulation results for big turbine unit (Run #4).
USACERL ADP 98/129 193

Figure 33. Maximum energy grade line (Run #4).
194 USACERL ADP 98/129

 PONAPE POWER PLANT

 SYSTEM

 ELEM HW AT 100

 

 ELEM VDC1 LINK 100 200 

 ELEM C2 LINK 200 300 

 ELEM C3 LINK 300 400 

 ELEM C4 LINK 400 500 

 ELEM C5 LINK 500 600 

 ELEM C6 LINK 600 700 

 JUNCTION AT 700

 ELEM C7 LINK 700 800

 ELEM ST LINK 800 850 .

 ELEM DTS LINK 850 900

 ELEM TW AT 900

 ELEM C9 LINK 700 910

 ELEM BT LINK 910 915

 ELEM DT10 LINK 915 920

 ELEM TW AT 920

 NODE 300 ELEV 355.5

 MUDE 400 ELEV 352.0

 HDDE 500 ELEV 230.5

 

 NODE 600 ELEV 144.5

 NCLE 800 ELEV 144.5

 NODE 910 ELEV 144.5

 FINISH

 

 RESERVOIR ID HW ELEV 362.44 FINISH

 

 COND ID VDC1 VARIABLE DIST 0.0 AREA 22. DIST 5. AREA 14.19 LENgTH 5.

 CELERITY 3600. FRICTION .0185 FINISH

 COND ID C2 LENGTH 260. DIAM 4.25 CELER 36OO. FRICT .0185 FINI

 COND ID C3 LENG 1940. DIAM 4.25 CELER 35OO. FRICT .0185 NUMSEG 5 FINI 

 COND ID C4 LENG 1700. DIAM 4.25 CELER 36OO. FRICT .0185 NUMSEG 5 FINI 

 COND ID C5 LENG 700. DIAM 4.25 CELER 36OO. FRICT .0185 FINI 

 COND ID C6 LENG 50. DIAM 4.25 CELER 36OO. FRICT .0185 NUMSEG 2 FINI 

 COND ID C7 LENGTH 25. DIAM 2.5 CELER 36OO. FRICT .0185 FINI 

 TURBINE ID ST TYPE 1 SYNCSPEED 1200. DIAM 1.333 WINDAGE 3.5 FRICT1ON

 3.5 WR2 1820. FINI

 COND ID DT8 VARIABLE DIST 0.0 AREA 1.396 DIST 10. AREA 3.67

 LENG 10. CELER 3600. FRICT .Ol85 FlNI

 COND ID C9 LENG 25. DIAM 3.5 CELER 3600. FRICT .0185 FlNI

 TURBINE ID BT TYPE 1 SYNCSPEED 900. DIAM 1.875 WINDAGE 7.5

 FRICTION 7.5 WR2 7000. FINI

 COND ID DT10 VARIABLE DIST 0.0 AREA 2.76 DIST 15. AREA 7.33

 LENGTH 15. CELER 3600. FRICT .0185 FINI

 

 RESERVOIR ID TW ELEV 140.4 FINI

 

 TCHARACTERISTICS TYPE 1

 

 

 (TURBINE CHARACTERISTICS NOT SHOWN. PROPRIETARY INFORMATION)

 

 

Figure 34. Ponape input file.
USACERL ADP 98/129 195

 DISPLAY ALL FINI

 HISTORY

 NODE 300 HEAD

 NODE 400 HEAD

 NODE 500 HEAD

 NODE 600 HEAD

 NODE 800 HEAD Q

 

 ELEM ST SPEED Q POWER POSITION HEAD

 ELEM PT SPEED Q POWER HEAD

 FINISH

 SNAPSHOT TIME 7.0 FIE1SH

 PLOTFILE

 NODE 300 HEAD

 NODE 400 HEAD

 NODE 500 HEAD 

 NODE 600 HEAD

 NODE 800 HEAD Q

 NODE 910 HEAD Q 

 ELEM ST SPEED Q POWER POSITION HEAD

 ELEM PT SPEED Q POWER HEAD

 FINISH

 

 CONTROL

 BTCOMP 0.05

 DTOUT 0.25

 TMAX 20.0

 DTCOMP 0.10

 DTOUT 1.0

 TMAX 50.

 FINISH

 

 OPTURBINE ID ST REJECT TOFF 2.0 GSCHED 1 FINI

 OPTURBINE ID BT REJECT TOFF 2.0 GSCHED 1 FlNI

 

 SCHEDULE GSCHEDULE 1

 

 T 0.0 G 100.

 T 5.0 G 100.

 T 10.0 G 100.

 T 20. G 100.

 T 30. G 100.

 T 32. G 90.

 T 35. G 75.

 T 40. G 50.

 1 45. G 25.

 T 50. G 0.

 FINISH 

 GO

 GOODBYE

 END OF DATA

 

Figure 34 (continued)
196 USACERL ADP 98/129

capable of operating at runaway speed safely and without damage. Load rejection

tests will need to be performed in the field to verify the predicted performance and

set the gate closure rate.

The maximum transient pressure determined by the WHAMO model of the Ponape

System is 418.48 fmsl (120 psi) at the powerhouse which is less than the penstock

design pressure (125 psi). This corresponds to maximum runaway speeds of 2350

rpm and 1675 rpm for the small and large turbines respectively. Minimum values

of WR2

 of the rotating parts of the small and large turbines should be specified to

be 1820 lb-ft2

 and 7000 lb-ft2 respectively.
USACERL ADP 98/129 197

Momentum:

1

gA

MQ

Mt

%

MH

Mx

%

f

D

Q*Q*

2gA2

' 0

Continuity:

MH

Mt

%

c

2

gA

MQ

Mx

' 0

Energy: Hi' Hj& lossij

Hi' Hk& lossik etc.

Continuity: Qi% Qj% Qk% ... ' 0

6 Basic Algorithms

The basic algorithms used to model the hydraulics and mechanics of the WHAMO

elements, along with those used to model the interrelationship of these elements in

an integrated system, are presented in this chapter. The presentation does not

include the theory and technical background of these algorithms. Nor are the

hydraulic or mathematical derivations generally included. These can be found in

the publications referenced in this chapter and elsewhere in the report.

6.1 Governing Equations

Governing equations, which use the momentum or energy conservation and

continuity principles to model the hydraulics of an element, have been introduced

in Chapter 2. The form of these equations for the different element types is

summarized below and elaborated upon in the subsections which follow.

Conduit Equations

Junction Equations
198 USACERL ADP 98/129

Energy: f(Hi& Hj,Q) ' 0

Continuity: Qi' Qj

Energy: Hi' HRES & loss

Continuity: Qi' QBC

Continuity:

dH

dt

&

Q

A

1

g

dv

dt

% 1 ' 0

dH

dt

'

n

v

( H &

v

2

2g

& WS %HB ) %

1

A

%

1

gA

dv

dt

Q

Machine and Valve Equations

Reservoir Boundary Equation

Flow Boundary Equation

Surge Tank Free Surface Equation (no outflow)

Air Chamber Boundary Equation (unvented)

In order to be utilized in the computational scheme of the model, the governing

equations must be approximated (where necessary) to a linear, algebraic form. The

linearization and finite difference techniques are discussed in the subsequent

subsections. The set of linear, finite difference equations which model the

hydraulics of all elements of a system are termed the system inner equations.
USACERL ADP 98/129 199

Momentum:

1

gA

MQ

Mt

%

MH

Mx

%

f

D

Q*Q*

2gA2

' 0 (6.1)

Continuity:

MH

Mt

%

c

2

gA

MQ

Mx

' 0 (6.2)

6.2 Unsteady, Compressible Flow in Elastic Conduits

The form of the partial differential equations of motion (momentum and continuity)

used by this model to represent unsteady, compressible flow in elastic conduits is

presented. This is followed by the general finite difference representation of the

differential equations adopted for WHAMO. The difference scheme is then applied

to the momentum and continuity equations. The result is altered slightly to a

linear form suitable for simultaneous solution with the equations for other system

components. A more complete treatment, including derivations, can be found in

Resource Analysis, Inc. (1976).

6.2.1 Momentum and Continuity Equations

The simplified, one-dimensional continuity and momentum equations utilized in

WHAMO model development are as shown. Note that these use total head, H, and

discharge, Q, as dependent variables and that fluid compressibility and conduit

elasticity are implicit in the celerity term, c.

where,

H = Total head or energy grade

Q = discharge

x = distance along the conduit

t = time

g = gravitational constant

A = cross sectional area of the conduit

D = diameter of the conduit

f = Darcy-Weisbach friction factor

c = celerity of a compression wave traveling through this conduit (see

Section 3.3.2)

6.2.2 Finite Difference Scheme

The WHAMO program is formulated in terms of a four-point implicit finite

difference representation of the governing differential equations. This implicit
200 USACERL ADP 98/129

f(j)x,n)t) ' f

n

j

f(x,t) '

f

n%1

j%1 % f

n%1

j

2

% (1&2)

f

n

j%1 % f

n

j

2

(6.3a)

Mf (x,t)

Mt

'

1

2

f

n%1

j%1 & f

n

j%1

)t

%

f

n%1

j & f

n

j

)t

(6.3b)

Mf (x,t)

Mx

' 2

f

n%1

j%1 & f

n%1

j

)x

% (1&2)

f

n

j%1 & f

n

j

)x

(6.3c)

& H

n%1

j %

)xj

2g2Aj)t

Q

n%1

j % H

n%1

j%1 %

)xj

2g2Aj)t

Q

n%1

J%1

(6.4)

scheme can be summarized by noting how it is applied to an arbitrary function of

space and time, f(x,t), and its derivatives. Thus, using the notation:

the general finite difference scheme is:

where s is a weighting factor included for numerical stability.

This general representation is applied to the momentum and continuity equations

in conduits, to the surge tank free surface equation, and to other differential

equations which govern model algorithms.

6.2.3 Momentum and Continuity in Finite Difference Form

The momentum and continuity equations (6.1, 6.2) can now be represented in

algebraic, finite difference form as follows:

Momentum:
USACERL ADP 98/129 201

'

1&2

2

H

n

j & H

n

j%1 %

)xj

2g2Aj)t

Q

n

j % Q

n

j%1

&

)xjf

j

4g2DjA

2

j

Q

n

j

* Q

n

j

* % Q

n

j%1

* Q

n

j%1

*

H

n%1

j &

22c

2

j )t

gAj)xj

Q

n%1

j % H

n

j%1 %

22c

2

j )t

gAj)xj

Q

n%1

j%1

(6.5)

' (H

n

j % H

n

j%1

) %

2(1&2)c

2

j )t

gAj)xj

Q

n

j & Q

n

j%1

H

n%1

j

, H

n%1

j%1

, Q

n%1

j

and Q

n%1

j%1

.

"j'

22c

2

j )t

gAj)xj

(6.6a)

Valid only for 1 Ö 0

Continuity:

The above equations are faithful to the general finite difference scheme in all but

one aspect. The non-linear Q*Q* term of the momentum equation (6.1) is

represented using only Q at the previous time step, instead of using weighted

averages of Q at the previous and future time steps. As a result, the finite

difference momentum equation (6.4), as well as the finite difference continuity

equation (6.5), is completely linear in terms of the unknown dependent variables,

(Note that the solution proceeds from time step to time step so that H and Q at the

previous time step are always known constant quantities.)

Equations (6.4) and (6.5) can be simplified in appearance by introducing the

following coefficients:
202 USACERL ADP 98/129

$j' (H

n

j % H

n

j%1

) % (

1&2

2

) "j(Q

n

j & Q

n

j%1

) (6.6b)

(j'

)xj

2g2Aj)t

(6.6c)

*j' (

1&2

2

) (H

n

j & H

n

j%1

) % (j(Q

n

j % Q

n

j%1

) & (6.6d)

)xjf

j

4g2DjA

2

j

Q

n

j

* Q

n

j

* % Q

n

j%1

* Q

n

j%1

Momentum: &H

n%1

j % (j Q

n%1

j % H

n%1

j%1 % (j Q

n%1

j%1 ' *j

(6.7)

Continuity: H

n%1

j & "j Q

n%1

j % H

n%1

j%1 % "j Q

n%1

j%1 ' $j

(6.8)

Note that the coefficients, "j and mj, are not functions of time and thus need to be

evaluated only once for each section. The remaining coefficients do vary with time

and must therefore be re-evaluated each time the solution is advanced to a new

time row.

In terms of these coefficients, the numerical equations for the jth segment become:

A pair of equations of this form applies to every segment of a conduit in a system

modeled by WHAMO.

Discussion of the use of finite difference techniques in the solution of differential

equations can be found in Perkins (1964) Part II and in Carnahan (1969).
USACERL ADP 98/129 203

c '

4720

1 % (3@ 105/E) @ (D/WT)

(6.9)

Cadd

Q*Q*

2gA2

Total Loss Term '

f)x

D

Q*Q*

2gA 2

% Cadd

Q*Q*

2gA2

'

f)x

D

% Cadd

Q*Q*

2gA2

6.3 Algorithms for Flow Elements

6.3.1 Prismatic Conduits

The governing equations for conduits are the continuity and momentum equations

introduced in Section 6.2. In linearized finite difference form these are equations

(6.7) and (6.8).

An important term in these equations is the celerity, c. WHAMO allows the celerity

of a conduit to be specified as input or, alternatively, it will be computed by the

program from the conduit properties. The following formula is used by the program

to compute celerity.

where,

c = wave celerity

E = modulus of elasticity of pipe wall

WT = thickness of pipe wall

D = diameter of the conduit

Local head losses in conduits may be accounted for by incorporating an extra term

in the momentum equation for segments where an added loss occurs. This term

takes the form

The coefficient, Cadd, may in general be a function of the flow direction. The friction

and added loss terms in the momentum equation then combine to give the total loss

as:
204 USACERL ADP 98/129

'

f

1

D

Q*Q*

2gA2

H.L. ' Cadd

Q*Q*

2gA 2

(6.10)

g

C

2

v

Mh

Mx

%

Mh

Mt

%

Mv

Mx

%

2v

D

dD

dx

' 0 (6.11)

in which f1 is an equivalent friction factor designed to satisfy the above relations.

In all that follows the momentum equation will be written in terms of this

equivalent friction factor. As far as the program user is concerned, however,

separate values of f and cadd will be required to be specified. For the sake of clarity,

the equivalent friction factor will be represented by f.

Entrance and exit losses at the boundary between a conduit and a reservoir are

calculated using the same formula:

Instead of including this term in the momentum equation of a conduit segment,

however, end loss is subtracted from the specified head value at the reservoir.

6.3.2 Variable Diameter Conduits

The following derivation shows that the continuity equation presented in Section

6.2 applies to variable diameter conduits as well as to prismatic conduits. This

derivation is included because it does not appear elsewhere.

The continuity equation for non-constant diameter conduits given by Wylie (1978)

is reproduced below adopting the notation of this manual and ignoring lateral

inflows.

The term v represents velocity, h is piezometric head, and is the rate of dD

dx

expansion (or contraction ) of the conduit where v << c, the convective acceleration,

is usually ignored (Wylie, p. 306). Additionally, as shown in Resource Analysis, Inc.

(1976), can be replaced by with the result: Mh

Mt

MH

Mt
USACERL ADP 98/129 205

MH

Mt

%

c

2

g

Mv

Mx

%

c

2

g

2v

D

dD

dx

' 0 (6.12)

MH

Mt

%

c

2

g

M(Q/A)

Mx

%

c

2

g

2Q

DA

dD

dx

' 0 (6.13)

M(Q/A)

Mx

'

1

A

MQ

Mx

&

Q

A

2

dA

dx (6.14)

'

1

A

MQ

Mx

&

Q

A

2

BD

2

dD

dx

MH

Mt

%

c

2

g

1

A

MQ

Mx

&

Q

A

2

BD

2

dD

dx

%

c

2

g

2

D

Q

A

dD

dx

' 0 (6.15)

c

2

g

Q

A

2

BD

2

dD

dx

'

c

2

g

2

D

Q

A

dD

dx

MH

Mt

%

c(x)

2

gA(x)

MQ

Mx

' 0

Now replace v with Q/A to give:

Replacing:

in the equation (6.13) gives:

Observe that:

so the simplified form of the continuity equation is

This form is unchanged from equation (6.2) except for the emphasis that A and C

may be functions of distance along a pipe. Evidently, writing the equation in terms

of Q rather than v implicitly allows for a non-constant diameter.
206 USACERL ADP 98/129

Q ' CQ D

2

g )H (6.16a)

Hj& Hj%1'

1

C

2

QD

4

g

* Qj* Qj (6.16b)

Hj& Hj%1' SLOPE @ Qj% CONST (6.17)

The momentum equation given by Wylie (1978) is identical for prismatic conduits

and variable diameter conduits, so that the momentum equation (6.1) in Section 6.2

also applies to variable diameter conduits.

As the governing differential equations of Section 6.2 apply to variable diameter

conduits, so do the linearized, finite difference equations (6.7) and (6.8). The only

difference is that D, A, and c may vary along a conduit. For each segment of a

conduit, values of ", m, are used which are the average of the values computed using

the properties at the ends of the segment. Similarly, the term )xf/(4gsDA2

) used

to compute * for a segment in equation (6.6d) is an average of values computed at

the ends of the segment.

6.3.3 Simple Valves

The calculation of flow through a valve is based on the formula

used in Waterways Experiment Station (1977) for butterfly valves. The term CQ

 is

a discharge coefficient which is a function of valve position and flow direction, D is

the valve diameter, and TMH is the head loss across the valve.

The formula can be rearranged to:

and then linearized to the form

The slope and intercept terms are computed from the derivative of equation (6.16)

and the computed TMH using an estimated value of the discharge, Qest' equal to the

discharge at the previous time step.
USACERL ADP 98/129 207

SLOPE ' 2

1

C

2

QD

4

g

* Qest * (6.17a)

CONST ' &

1

C

2

QD

4

g

Qest * Qest * (6.17b)
208 USACERL ADP 98/129

Qj%1' Qj

(6.18)

CH'

)H

V

2

/2g

(6.19)

CQ'

B

8 CH

(6.20)

Equation (6.17) above is the energy equation used in modeling a valve. The

continuity equation is simply

In order to model a valve, the coefficient CQ

 must be known at every time step. The

user must therefore input a set of valve characteristics, CQ

 versus valve position

and a schedule of valve position versus simulation time. Note that different sets of

characteristics may apply to forward and reverse flow through the valve. As an

alternative to specifying the valve characteristics in terms of the discharge

coefficient, CQ

, in equation (6.16), the user may, if more convenient, specify the

characteristics in terms of a head loss coefficient, CH, defined

The conversion from CH to CQ

 is simply

Default characteristics for butterfly valves, gate valves, Howell-Bunger valves, and

spherical valves have been written into the program. The former were taken from

Waterways Experiment Station (1977), charts 331-1 and 330-1, respectively. The

spherical valve characteristics were taken from a curve developed by Boving and

Co., Ltd., for the "Havasu rotary valve." The discharge coefficient for HowellBunger valves are assumed linear with position and equal to 0.92 at the full open

position.

6.3.4 Non-Return Valves

Equations (6.16-6.20) are applied to flow through non-return valves as well as other

valve types. For non-return valves, a single user-specified discharge or head loss

coefficient applies to forward flow, and an extremely small CQ

 is used in the reverse

direction to essentially shut off reverse flow.
USACERL ADP 98/129 209

Hj%1' Hj& H.L. (6.21)

Qj%1' Qj

H.L. ' C

Q

2

est

2A

2

g

(6.22)

At any time step that flow through a ONEWAY valve element is seen to change to

reverse direction, the computation is repeated and the time step length shortened

to the point that reverse flow is negligible. This is a simple representation of a

check valve. No significant reverse flow is allowed, so check valve "slamming"

which is sometimes experienced, and associated transients, are not modeled.

6.3.5 Pressure Actuated Valves

For RELIEF elements, valve position is specified not as a function of time, but as

a function of pressure upstream (or at some other reference point). During

simulation, the computed reference pressure at the previous time step is used to

estimate current valve position. Computations can then be made as for simple

valves using equations (6.16-6.20). If the newly computed reference pressure

corresponds with a valve position significantly different from the estimated value,

then the computations are repeated at a time step short enough that the difference

between computed and estimated valve position is within a user specified tolerance.

6.3.6 Expansions and Contractions

The diameter change element (Figure 35) simply subtracts energy from the system

at the point specified. The applicable energy equation is

where H.L. is the calculated head loss. The continuity equation is again

The head loss term is calculated using an estimated discharge equal to the

discharge at the previous time step.

The head loss coefficient, C, will in general be different depending on whether flow

is in the expanding direction or the contracting direction.
210 USACERL ADP 98/129

Figure 35. Definition sketch for diameter change elements.

For 2 # 22.5E: Ce' 2.6 sin2 (1&$

2

)

2

(6.23a)

Cc' 0.8 sin2 (1&$

2

) (6.23b)

For 2 > 22.5E: Ce' (1&$

2

)

2

(6.23c)

Cc' 0.5 (1&$

2

) sin2 (6.23d)

The value of the head loss coefficients may be specified as input or they may be

calculated from the geometry by the program. The following formulae are used in

this calculation. These are taken from Crane (1979).

where,

Ce

 is the coefficient for expansion

Cc

 is the coefficient for contraction
USACERL ADP 98/129 211

Continuity: Qj%1' Qj

(see Eq 6.18)

Energy: )H ' SLOPE @ Qj% CONST (see Eq 6.17)

where, )H ' Hj%1& Hj: turbines% pump&turbines

)H ' Hj& Hj%1: pumps

$ '

D1

D2

D1 is the smaller of DUP and DDOWN,

D2

 is the larger of DUP and DDOWN, and

DUP, DDOWN and s are shown in Figure 35.

6.4 Algorithms for Turbo-machines

The continuity-energy equation pair for pumps, turbines, and pump turbines take

the following form.

The energy equation, TMH = f(Q), is derived from a set of machine characteristics

which is supplied as input. These characteristics relate, in some manner, the

discharge, Q, the head difference, TMH, the rotational speed, o, and, for turbines and

pump-turbines, the wicket gate position, G. The exact form of the characteristics

is different for the different types of turbo-machine. In general, the characteristics

are expressed using dimensionless or model scale values.

The determination of a linear TMH vs. Q energy equation from the machine

characteristics at any time step follows this general procedure:

(1) The operating point in the table is estimated. The wicket gate position is

determined from the gate schedule or from the governor equation. The

estimated speed and discharge are extrapolated from the values at the

previous 2 time steps. These variables, rather than TMH, are extrapolated

because their behavior in a transient state is much more regular.
212 USACERL ADP 98/129

P

j

& T ' I

dj

dt (6.24)

(2) The estimated operating point is scaled or normalized to be compatible with

the characteristics table. The table is entered to find the four neighboring TMH,

Q pairs. These are converted to prototype dimensions.

(3) A cubic interpolating function of TMH v. Q is determined from the four points.

Note that this function is applicable only in the vicinity of the estimated

operating point.

(4) The slope of the cubic function is evaluated at the projected Q value. This is

the term SLOPE in the energy equation (6.17).

(5) The value of TMH at the projected Q is computed from the interpolating

function. The CONST term on the energy equation (6.17) is then determined

from SLOPE and the projected (TMH, Q) point.

After solution of the entire system at each time step, the machine speed, o, is

evaluated in a separate calculation. The basic equation for speed change is

where,

P = power supplied by the electric motor to the pump shaft

o = rotational speed

I = moment of inertia of rotating parts

T = torque applied by the fluid on the impeller

dT = angular acceleration

dt

The actual finite difference form used in the program varies slightly with the

different machine types. In order to evaluate this function, a second set of

characteristics is required. These relate the variable TMH or Q, o, and, for turbines

and pump-turbines, G, with a power, efficiency, or torque variable. With this table,

the torque can be determined from the calculated machine operating point.

The computed discharge and speed are compared at the end of each time step with

the estimated values. If these are not sufficiently close, the calculations for that

time step are repeated. The new Q and o estimates will be the values calculated

in the previous iteration.
USACERL ADP 98/129 213

Figure 36. Complete characteristics diagram.

)j ' (

P

j

& T )

)t

I

(6.25)

6.4.1 Pumps

Pump characteristics in WHAMO are expressed using dimensionless head

difference, discharge, speed, and torque variables. These are ratios of actual values

to the rated values for a particular machine. The first table is H/HR

 versus Q/QR

and o/oR, and the second table is T/TR versus Q/QR and o/oR. The subscript R

indicates a rated value. Figure 36 shows a graphical example of typical pump

characteristics (see Knapp [1937]).

When a pump is operating it is restricted to synchronous speed and there is no

speed change. When the pump is off, the speed change over the period t is

calculated using

The power, P, under these conditions will be zero.

6.4.2 Turbines

Characteristics used for turbines are based on test data for a model of specified size
214 USACERL ADP 98/129

M '

TD

2

2g)H

(6.26)

Q ' Qm( D/Dm)

2

( H/)Hm)

1/2

(6.27)

P ' Pm( D/Dm)

2

( H/)Hm)

3/2

(6.28)

P ' 0(Q)H @ factor (6.29)

(usually 1 foot diameter) under 1 foot head. The tables are model discharge, Qm,

and model power, Pm, versus wicket gate positions and peripheral velocity factor,

N, where

Other formulae for conversion between prototype data and model scale data are

listed below, where the model head, TMHm, is 1 foot.

The user may choose to input characteristics in prototype scale. These are tables

of Q and efficiency, 0, versus H and at synchronous speed. The program converts

these to model scale using the formulae above plus the formula for power given as

Because Q is in the turbine characteristics table as a function of N and G, the

operating point cannot be directly located in the table from the G value and the

estimated Q. Therefore, the bisection method is used to determine N given G and

Q. The method converges rapidly when applied to functions that are continuously

monotonic (Perkins, 1964).

Note that N is a function of both o and TMH. The user must take care that the range

of N values supplied in the characteristics tables will not be exceeded due to speed

rise at load rejection or speed reduction with closed wicket gates. This applies as

well to the implicit N specified by TMH at synchronous speed when prototype scale

turbine characteristics are entered.

The new turbine speed at the end of time step is calculated using the following

formula based on equation (6.24).
USACERL ADP 98/129 215

T

n%1 ' Tn

2

% )t (P

n % Pn%1 & Ln & Ln%1

) /I

(6.30)

Q ' QmD 2 )H (6.31)

N ' Nm )H/D (6.32)

The term L is the generator load and the superscripts indicate values at different

time steps. When synchronous speed turbine operation is specified, the speed is not

allowed to change and the generator load is constrained to be equal to the power

delivered.

6.4.3 Pump-Turbine

As for turbines, pump-turbine characteristics are based on test data for a model of

specified size under unit head. However, the organization of the data is different.

Characteristics tables are stored in terms of a radial coordinate system, where

operating locations are defined in terms of 2, the angle of a radial line drawn on a

plot of discharge versus speed with the negative discharge axis, and r2

, the square

of the radial distance from the origin (see Figure 37). There are two tables: one of

r

2

 versus 2 and gate position and model torque, Tm, versus 2 and gate position,

where

2 = tan-1 (Nm/Qm)

r

2 = (Qm2

 + Nm2)/Hm (radius squared)

and

Nm = model speed

Qm = model discharge

Hm = Model head = 1

This representation of characteristics is taken from Marchal (1965).

The operating point at the current time step is estimated in terms of Q, N, and G.

Using the homologous relations
216 USACERL ADP 98/129

Figure 37. Speed-discharge characteristics plot for pump-turbines.

2est ' tan&1( D

3 Nest / Qest ), Qest Ö 0

1 can be determined from Q and N.
USACERL ADP 98/129 217

2est ' 3B/2 , Qest ' 0 and N > 0

2est ' B/2 , Qest ' 0 and N < 0

)H ' SLOPE @ Q % CONST (see Eq 6.17)

r

2 '

Q

2

/D

4 % N2D2

)H

)H '

1

D

4

r

2

Q

2 %

ND 2

r

2

(6.33)

)H ' SLOPE @ Q % CONST (see Eq 6.17)

with SLOPE '

2 Qest

D

4

r

2

CONST '

Q

2

est

D

4

r

2

%

N

2

est D

2

r

2

The characteristics table can then be entered with 2est and G to find r2.

Neighboring table values of 2 and r2

 can be converted using the homologous

relations to )H and Q values from which a linear function of the form

can be developed as for pumps and turbines.

Where N is near zero, another method of developing a TMH-Q relation is adopted.

Using the homologous relations, the expression for r2

 can be rewritten

and then re-arranged to an expression of H as a function of Q

the linear approximation about the estimated Q would be
218 USACERL ADP 98/129

T ' TmD 3)H (6.34)

a1

d

3G

dt 3

% a2

d

2G

dt 2

% a3

dG

dt

% a4(G&Gr)

' a5

d

2T)

dt 2

% a6

dT

)

dt

% a7(T

)

) % a8

(6.37)

T

) ' T & Tr

(mechanical governors)

T

) ' Tr

& T & 2(

P

Pr

) (electrical governors

Tr' reference speed

Gr' reference gate position

P ' generator output power

Pr' reference power

The speed change calculation uses equation 6.25 as for pumps. The torque table is

entered with 2 and gate to determine Tm, which is scaled up using the computed

)H and the homologous relation

6.5 Governor Algorithms

Mechanical governors respond to changes in speed while electrical governors

typically respond to a combination of speed and power feedback. Both types are

modeled in WHAMO with the following general differential equation.

where,

and the coefficients ai

 and 2 are specified characteristics of the governing

mechanism.
USACERL ADP 98/129 219

a4(Go& Gr) ' a7(To& Tr) % a8 (6.37a)

Gr' Go&

a7

a4

(To&Tr) &

a8

a4

(6.37b)

a1

d

3G

dt 3

% a2

d

2G

dt 2

% a3

dG

dt

% a4(G&GO) (6.37c)

' a5

d

2T1

dt 2

% a6

dT

1

dt

% a7(T&To)

a1

d

3G

dt 3

% a2

d

2G

dt 2

% a3

dG

dt

% a4(G&GO)

' a5

d

2T1

dt 2

% a6

dT

1

dt

% a7(To&T

2

Pr

[P&Po]) (6.37d)

For a mechanical governor at initial steady state, equation 6.37 reduces to

and therefore

Substituting equation 6.37b into equation 6.37 and re-arranging terms results in

the following expression written in terms of Go

 and To rather than Gr and Tr.

Following a similar procedure for electric governors, the general differential

equation can be written

Therefore, the following conventions are valid when applied to equation (6.37)
220 USACERL ADP 98/129

Gr' G0

T

1 ' T&T0

(mechanical governors)

T

) ' T0

& T &

2

Pr

(P&P0) (electrical governors)

a8' 0

G ' b2G ̄ % b3q ̄ % b4r ̄ % b5T ̄

1 % b6

s ̄ % b7% b8T

)

(6.38)

where, q '

2

)t

(G&G ̄) & q ̄ (6.39a)

r '

4

()t)

2

(G&G ̄) &

4

)t

q ̄ & r ̄ (6.39b)

s '

2

)t

(T

1&T ̄1

) & s ̄ (6.39c)

and, b

)

1 ' 8a1

% 4a2()t) % 2a3()t)

2 % a4

()t)

3

(6.39d)

Note that the assumption of constant coefficients, ai, limits the applicability of the

model to relatively small variations of gate and speed. The various limits and nonlinearities of the governor and servo-mechanisms are not included.

The finite difference form of equation (6.37) used in the program code is as follows,

where the bar b indicates the known value of a variable from the previous step. A

more complete derivation can be found in Perkins (1965).
USACERL ADP 98/129 221

b

)

2 ' 8a1

% 4a2()t) % 2a3()t)

2 & a4

()t)

3

(6.39e)

b

)

3 ' 4()t) (2a1

% a2)t) (6.39f)

b

)

4 ' 4a1

()t)

2

(6.39g)

b

)

5 ' &)t[4a5

% 2a6()t) & a7()t)

2

] (6.39h)

b

)

6 ' &4a5

()t)

2

(6.39i)

b

)

7 ' 2()t)

3

[a4Gr% a8] (6.39j)

b

)

8 ' )t[4a5

% 2a6()t) % a7()t)

2

] (6.39k)

and, bi'

b

)

i

b

)

1

(i ' 1,2,...8) (6.39l)

The above represents a simple (though messy) relation between the two unknowns,

G and T', at any time step. In the turbine or pump-turbine simulation, under

governor control, the wicket gate position cannot be determined from a specified

schedule. Instead, the governor equation above is solved for G using the projected

value of T'. Recall that if the projected T' does not agree well with the value

calculated after solution of the entire system, the calculation for that time step is

repeated.
222 USACERL ADP 98/129

-1

T

1

S

TrS

Tr S + 1

+ - + + + +

G

Figure 38. Block diagram for mechanical governor.

d

2

dt 2

G

100%

%

TG%(*%F)Tr

TGTr

d

dt

G

100%

(6.40)

%

F

TGTr

(G&Gr)

100%

' &

1

TG

d

dt

T

)

T0

% &

1

TGTr

T

)

T0

An additional WHAMO governor option allows the specification of maximum gate

opening and closing rates. When this option is in effect, neither the governor

equation or its coefficients are altered. Simply, when the new gate position is

calculated the implicit rate is compared with the specified maximum. If the rate is

excessive the new gate position is adjusted so that the rate of gate movement is

equal to the maximum rate allowed.

6.5.1 Mechanical Governors

Figure 38 shows the block diagram for a typical speed-droop type mechanical governor. The term S is the Laplace transform operator and the other parameters shown

are defined for equation (6.40) below. The differential equation described by the

block diagram is written below in terms of normalized, or "per unit", G and T

values.

where, TG = characteristic time of promptitude of the governor; i.e., the

proportionality constant relating speed error to wicket gate velocity

Tr = dashpot relaxation time constant

F = permanent speed droop
USACERL ADP 98/129 223

a1' 0.0 (6.41a)

a2' 1.0 (6.41b)

a3'

TG% Tr(F%*)

TGTr

(6.41c)

a4'

F

TGTr

(6.41d)

a5' 0.0 (6.41e)

a6' &

100

T0TG

(6.41f)

a7' &

100

T0TGTr

(6.41g)

a8' 0.0 (6.41h)

TG' 0.15 seconds

Tr' 3.33 Twseconds

Tw'

ELV

g)H

, water starting time

* = temporary speed droop

With reference to equations (6.40) and (6.37), the following relations can be written:

WHAMO uses these relations to compute the coefficients ai

 from the mechanical

governor parameters. The following are the default values for the mechanical

governor coefficients. These are based on COE test results and Hagihara (1979).
224 USACERL ADP 98/129

ELV ' l

1

v1% l

2

v2% ... % l

n

vn

* ' 1.25 Tw/Tm

F ' 0.05

WR2 ' total inertia(lb&ft 2)

Tm'

wR2n

2

0

1,610,000P

, mechanical starting time (6.43)

0.0225 Tt

d

4

dt 4

(

G

100%

) % (0.0225 % 0.30Tt)

d

3

dt 3

(

G

100%

) (6.44)

% (Tt% 0.30)

d

2

dt 2

(

G

100%

) %

d

dt

(

G

100%

)

' Kd

d

2

dt 2

(

T

)

T0

) % Kp

d

dt

(

T

)

T0

) % Ki(

T

)

T0

)

l = length of conduit of constant area

v = associated velocity at rated discharge (fps)

)H = rated net head (feet)

WR2 = total inertia (lb-ft2

)

n0 = synchronous speed (rpm)

P = rated output (HP)

6.5.2 Electrical Governors

The block diagram for a proportional-integral-differential (PID) electrical governor

with power generation feedback is shown in Figure 39. The differential equation

for this, with G and T

1

 again expressed per unit, is
USACERL ADP 98/129 225

+

-

+

- + +

+

P

’

Figure 39. Block diagram for electrical governor.

a1' 0.0225 % 0.30 Tt

(6.45a)

a2' Tt% 0.30 (6.45b)

a3' 1.0 (6.45c)

in which Tt = pilot servo-motor time constant

Kd = derivative gain

Kp = proportional gain

Ki = integral gain

2 = speed regulation term (similar to droop)

Since Tt

 is of the order of 0.05, the coefficient of the fourth order term is about

1/1000 times the coefficient of the first order term. The fourth order term is

therefore neglected.

The relations between the coefficients of the general governor equation (6.37) and

the electrical governor input parameters are as follows:
226 USACERL ADP 98/129

a4' 0.0 (6.45d)

a5' (

100

T0

) Kd (6.45e)

a6' (

100

T0

) Kp (6.45f)

a7' (

100

T0

) Ki (6.45g)

a8' 0.0 (6.45h)

COE-recommended parameter values computed by default are given below:

Ki' 0.24

Tm

T

2

w

Kp' 0.8

Tm

Tw

Kd' 0.27 Tm

Tt' 0.05

2 ' 0.05

The normal range of adjustment for the gains is:

Online Offline

Kp 0.5 - 18 0.14 - 4.6

Ki 0.3 - 7 0.1 - 1.8

Kd 0.0 - 1.8 0.0 - 1.8
USACERL ADP 98/129 227

dH

dt

&

Q

A

1

gA

dQ

dt

% 1 ' 0 (6.46)

H ' TN & TA @ Q (6.47)

where, TA ' &

)t

2A

1

gA

Q

n&1 & Qn&2

)t

% 1 (6.48a)

TN ' H

n&1 & TA @ Qn&1

(6.48b)

6.6 Algorithms for Surge Tanks

6.6.1 Simple Surge Tanks

The simple surge tank is modeled as a single segment conduit with a variable free

surface boundary. The conduit equations of Section 6.2 are used. For a surge tank

the length of the segment varies as the water surface rises and falls. The segment

length used in the computation is calculated from the water surface elevation at the

previous time step. Since the surge tank area may vary with elevation, the average

segment area used in the conduit computations is calculated by dividing the total

water volume in the tank at the previous time step by the segment length.

The governing equation at the free surface boundary is:

where A is the surge tank area at the water surface.

The finite difference form of this equation is:

Refer to Resource Analysis (1978) and Resource Analysis (1976) for further

treatment.

6.6.2 Surge Tank Outflow

Outflow from a surge tank may occur when the tank is overtopped or when the

water surface reaches the level of a user specified outflow port. Outflow from a

surge tank is considered lost to the system.

Flow through a surge tank outlet is accounted for "below" the water surface. That

is, prior to solving the free surface boundary equation (6.46), the outflow rate is

subtracted from the water surface discharge.
228 USACERL ADP 98/129

Qj' Qj&1& OF (6.49)

OF ' C 2/3 2g B (H&ELOUT)

3/2 & (H&ELOUT&HOUT)3/2

(6.50)

if (H&ELOUT&HOUT) # 0, set (H&ELOUT&HOUT) ' 0

OF ' mH % b (6.51)

m ' C 2g B (H

n&1&ELOUT)1/2 & (Hn&1&ELOUT)1/2

(6.52a)

b ' &mH

n&1%C 2/3 2g B (Hn&1&ELOUT)3/2&(Hn&1&ELOUT&HOUT)3/2

(6.52b)

1) OF ' 0.48 D

2

gD H&ELOUT

D

1.9

, 0 <

H&ELOUT

D

< 0.8 (6.53)

where OF is the outflow rate and location j is at the water surface and j-1 is below

the outlet.

The outflow rate can be expressed as a function of head using orifice or weir

equations. For a rectangular orifice, the equation is:

in which B = width of outlet

C = discharge coefficient

ELOUT = bottom elevation of outlet

HOUT = height of outlet

This equation also applies for weir flow when the water surface elevation is less

than the top of the orifice. By invoking the rule

a discharge coefficient of 0.61 is equivalent to a weir coefficient of 3.26. Equation

(6.50) can be approximated linearly in the form:

with

and

Three relations are given for circular orifice outflow for different depth to diameter

ratios. These are:
USACERL ADP 98/129 229

2) OF ' 0.44 D

2

gD H&ELOUT

D

1.5

, 0.8 <

H&ELOUT

D

< 1.2 (6.54)

3) OF ' C @

B

4

D

2

2g (H&ELOUT&D/2)

0.5

,

H&ELOUT

D

> 1.2 (6.55)

m ' 1.9

0.48D

2

gD

D

1.9

(H

n&1 & ELOUT)0.9

(6.56a)

b ' &mH

n&1 %

1

1.9

m (H

n&1 & ELOUT) (6.56b)

m ' 1.5

0.44 D

2

gD

D

1.5

(H

n&1 & ELOUT)0.5

(6.57a)

b ' &mH

n&1 %

1

1.5

m (H

n&1 & ELOUT) (6.57b)

m ' 0.5 ( C

B

4

D

2

2g ) (H

n&1 & ELOUT & D/2)&0.5

(6.58a)

b ' &mH

n&1 %

1

0.5

m (H

n&1 & ELOUT & D/2) (6.59b)

dH

dt

'

1

A

1

gA

dQ

dt

% 1 (Q & OT) (6.60)

These three equations are linearized in the form of equation (6.51) with:

CASE 1

CASE 2

CASE 3

Surge tank overtopping is accounted for at the water surface by modifying the free

surface boundary equation (6.46) to the form

where OT is overtopping rate. The overtopping rate can be computed using the

rectangular orifice equation (6.52) with
230 USACERL ADP 98/129

B ' 4BA , circumference

( H & ELOUT & HOUT ) ' 0

H ' TN & TA @ Q (see Eq 6.47)

TA ' &

1

2

TERM / (1 % m@TERM) (6.60a)

TN ' &TA@Q

n&1 & TERM@b / (1&m@TERM) % Hn&1

/(1 % m@TERM)

TERM '

)t

A

1

gA

(Q

n&1 & Qn&2

)

)t

% 1 (6.60b)

and

Replacing OT in equation (6.60) with mH + b, the finite difference form of the surge

tank boundary equation with outflow is

6.6.3 Differential Surge Tanks

A definition sketch of the model representation of a differential surge tank is shown

in Figure 40. The computation is carried out for the riser in a manner quite similar

to a simple surge tank. The main difference is that flows into and out of the riser

at the top or at the orifice connection to the outer tank must be accounted for. The

water level in the outer tank is accounted separately, rather than solved

simultaneously with the rest of the system. This is reasonable because transients

will be much more gradual there than in the rest of the system. Also, because

velocities will be very slow (# 1 fps) friction and water hammer effects in the outer

tank will be ignored.

The simulation procedure at each time step involves first making a projection of

HTANK, the water level in the outer tank, based on values at the previous time

steps. The estimated HTANK is used to set up the riser equations for the first and

last segments (see below) and the free surface boundary equation. After solution

of the entire system HTANK is calculated from the hydraulics of the surge tank.
USACERL ADP 98/129 231

DATUM

OUTER TANK

RISER

OVERFLOW

HTANK

QIN HTOP

IL-1

I1

I2

IL

DIFFERENTIAL SURGE TANK

Figure 40. Differential surge tank.

Energy: HI2 ' HI1 (6.61)

Continuity: QI2 ' QI1 % QIN (6.62)

where QIN ' ± Cd@ AD2g *HTANK & HI1 * (6.63)

Cd' discharge coefficient of the orifice

AD' area of the orifice

QI2 ' QI1 % SLOPE @ HI1 % CONST (6.64)

If HTANK is above the top of the

riser, the solution may be influenced

by a small error in the projected

HTANK, in which case the calculated

value is compared with the projection

and, if agreement is unsatisfactory,

the entire system computation is

reiterated for that time step.

The equations governing the riser

modeling and the water level

calculations in the outer tank are

presented on the following page. The

equations for the first segment from

internal node I1 to I2 are the

following:

The plus sign applies where HTANK$ HI1 and the minus sign where HTANK < HI1.

Equation (6.62) is linearized to the form
232 USACERL ADP 98/129

where SLOPE ' &1/2 (CdAO2g) (*H

n&1

I1 & HTANKn&1

*)

&1/2

(6.65a)

CONST ' & SLOPE @ H

n&1

I1 % (Q

n&1

I2 & Q

n&1

I1 ) (6.65b)

Energy: HIL ' HIL&1

(See Eq 6.61)

Continuity: QIL ' QIL&1% QADD (6.66)

QADD ' O : HIL > HTOP (6.67a)

QADD ' O : HTANK < HTOP (6.67b)

QADD ' Cw@CIRC(HTANK&HTOP)

3/2

: HTANK > HTOP and HIL # HTOP

(6.67c)

The equations for the intermediate segment(s) from I2 to IL-1 are simply the

continuity and momentum equations of Section 6.2 as applied to a simple surge

tank.

The last segment, from IL-1 to IL, is added to account for possible overflow from the

outer tank into the riser.

QADD is overflow from the outer tank into the riser.

The term Cw

 is a weir coefficient and CIRC is the circumference of the riser.

The boundary equation at the last node of a differential surge tank is essentially

the same as that shown previously for a simple surge tank, expanded to account for

overflow from the riser into the main tank. Additionally, the area term used in the

calculation can be that of the riser or the riser plus outer tank depending on the

hydraulic conditions.
USACERL ADP 98/129 233

HIL ' TN & TA @ QIL (see Eq 6.47)

TA ' &1/2 TERM / (1 % m @ TERM) (6.68a)

TN ' &TA@Q

n&1&TERM@ b /(1%1m@TERM)%Hn&1

/(1%m@TERM) (6.68b)

TERM '

)t

A

R

*

F

1

gA

(Q

n&1&Qn&2

)

)t

% 1

X

*

L

(6.68c)

m '

3

2

@ Cw@ CIRC @ (H

n&1

IL & HTOP)

1/2

(6.68d)

B ' &m @ H

n&1 % Cw

@ CIRC @ (H

n&1

IL &HTOP)

3/2

(6.68e)

Boundary Equation

If HIL < HTOP

m = 0

b = 0

A = area of riser

If HIL > HTOP and HTANK > HTOP

m = 0

b = 0

A = area of outer tank + riser

The above finite difference equation was developed using the methods of Section

6.6.2.

Prior to the transient claculation at each time step, the head in the main tank is

estimated from the previous values using:
234 USACERL ADP 98/129

HTANK n ' HTANKn&1 % (HTANKn&1 & HTANKn&2) / 2 (6.69)

HTANK n ' HTANKn&1 %

DT

2AT

(QIN n % QINn&1) (6.70a)

QIN ' QI1 & QI2

AT ' area of outer tank

HTANK n ' H(NL) (6.70b)

HTANK n ' HTANKn&1 %

DT

2AT

(QIN n % QINn&1)

&

DT

AT

@ CW@ B ([HTANKn&1 % HTANK est] / 2.0)

3/2

(6.70c)

HTANK n ' HTANKn&1 %

DT

2AT

(QIN n % QINn&1)

%

DT

AT

@ Cw@ ([H

n

(NL) % H

n&1

(NL)]/2.0)

3/2

This should provide a reasonable estimate as HTANK will change slowly and

"smoothly" compared to other system heads and discharges.

At the end of each time step, HTANK is computed from the hydraulic conditions as

follows:

If HTANK < HTOP and HIL < HTOP (no overflow):

If HTANK > HTOP and HIL > HTOP:

If HTANKest > HTOP and H(NL) < HTOP:

If HTANKest < HTOP and H(NL) > HTOP:
USACERL ADP 98/129 235

pV ' mRT (6.71)

pV n ' C (6.72)

dp

dt

' V

&n dC

dt

% C(&n)V

&n&1 dV

dt

dV

dt

' &Q (6.74)

6.6.4 Air Chamber Surge Tanks

The pressure-volume relationship of the air in the tank is incorporated in the air

chamber surge tank boundary equation. The basis of the calculations is the ideal

gas law

with p = absolute pressure

V = air volume

m = air mass

R = gas constant for air

T = absolute temperature

The algorithm presented includes the possibility of air release or air intake to the

tank.

Air chambers and hydropneumatic surge tanks are most commonly modeled using

the polytropic equation, which is an approximation of equation (6.71).

The value of the polytropic exponent, n, may vary from 1.0 for isothermal processes

to 1.4 for adiabatic processes. C is normally a constant depending on the initial

state of the air. However, C may change as a result of air entry or release.

To develop a differential equation relating head and discharge at the water surface

boundary we start by differentiating the polytropic equation (6.72) with respect to

time.

The rate of air volume change is the negative rate of water discharge:
236 USACERL ADP 98/129

C ' mRTV n&1

(6.75)

and dC

dm

' RTVn&1

(6.76)

dC

dt

'

dC

dm

dm

dt

' RTV n&1 dm

dt (6.77)

dp

dt

'

RT

V

dm

dt

% CnV &n&1Q (6.78)

RT

V

'

p

m

C ' pV n

dp

dt

'

p

m

dm

dt

%

pn

V

Q (6.79)

P ' (H &

Q

2

2gA 2

& WS % HB) Dg (6.80)

C varies only if the air mass, m, varies due to venting. Combining equations (6.71)

and (6.72)

If the rate of air inflow, dm/dt, is known, then

Substituting equations (6.74) and (6.77) into (6.73), gives

Recognizing that

and

equation (6.78) can be written

Next, the absolute pressure, p, is converted to total head, H, using the equation
USACERL ADP 98/129 237

dWS

dt

'

Q

A

(6.81)

dp

dt

'

R

*

F

dH

dt

&

Q

gA 2

dQ

dt

&

Q

A

X

*

L

Dg

dH

dt

'

1

m

dm

dt

H %

n

V

QH %

1

gA 2

dQ

dt

%

1

A

&

n

V

(

Q

2

2gA 2

%WS&HB) Q

&

1

m

Q

2

2gA 2

% WS & HB dm

dt

(6.83)

where WS = water surface elevation

HB = atomospheric pressure

D = mass density of water

Recognizing that

the derivative can be expressed

Substituting the above expressions for p and into equation (6.79) results in the dp

dt

following boundary equation for a vented air chamber:

To convert equation (6.83) to linear, finite difference form, the following

approximations are made:

1) An estimated value of Q is used to compute V and ( . Minor inaccuracies n

V

Q)

should be insignficant given that Q)t << V.

2) An estimated Q is used to compute velocity head related terms. These are

minor terms.
238 USACERL ADP 98/129

H ' TN & TA @ Q (see Eq 6.47)

TA '

(

1

gA2

dQ ̄

dt

%

1

A

&

TERM1@n

V

) )t

2 & TERM2

(6.84a)

TN ' &TA@Q

n&1&

2@TERM1

2&TERM2

1

m

dm

dt

)t %

2%TERM2

2&TERM2

H

n&1

(6.84b)

TERM1 '

Q ̄

2

2gA2

% WS & HB (6.84c)

TERM2 ' (

1

m

dm

dt

&

n

V

Q ̄ ) )t (6.84d)

dm

dt

' ±CA p1

7

RT1

[(

p2

p1

)

1.4286 & (

p2

p1

)

1.714], p2

> 0.53 p1

(6.85)

dm

dt

' ± C@A

0.686

RT1

p1, p2# 0.53 p1 (6.86)

3) is assumed known for the time step. Note that for small time steps dm

dt

. Formulae for computing will be presented later in the 1

m

dm

dt

)t « 1

dm

dt

subsection.

The resulting expression is written below.

Note that Q ̄ are estimated average values for the time step. ,

dQ ̄

dt

, A, V, WS, m, and dm

dt

The air mass flow rate through an orifice is computed using formulae given by

Wylie (1978).
USACERL ADP 98/129 239

dH

dt

'

1

m

dm

dt

H %

1.4

V

Q H %

1

gA 2

dQ

dt

%

1

A

&

1.4

V

(

Q

2

2gA2

% WS

&

1

m

Q

2

2gA2

%WS&HB dm

dt

%

0.4

V

1

2gDg

v

2

air

dm

dt

&

0.4

V

1

Dg

dZ

dt

(6.87)

p1 = the greater of tank pressure and atmospheric pressure

p2 = the lesser of tank pressure and atmospheric pressure

C = orifice discharge coefficient

A = orifice area

T1 = temperature associated with p1

C•A as a function of tank pressure is supplied by the user, as well as atmospheric

pressure and temperature. Tank pressure and temperature computed at the

previous time step are used. If atmospheric pressure exceeds tank pressure,

dm

dt

$ 0.

An alternative method of modeling air chambers, known as the rational heat

transfer (RHT) method, has been developed by Graze (1968) and Graze, Schubert,

and Forrest (1976). This method solves the ideal gas equation (6.71) without

making the assumptions implicit in the empirical polytropic equation (6.72).

Rather, all energy transfers are accounted for explicitly.

Following a similar procedure to that shown for the polytropic process, the following

vented air chamber boundary equation can be developed:

vair = air velocity passing orifice

= heat exchange rate between tank and surroundings, not including dZ

dt

air flow

The RHT boundary equation (6.87) is the same as the polytropic boundary equation

(6.83) with no energy transfer (n = 1.4), plus two explicit terms to account for

energy transfer. The first term, which accounts for the flow energy of air leaving

the system, is small enough to be neglected. The heat transfer rate is calculated

using the formula suggested by Graze (1968).
240 USACERL ADP 98/129

where dZ

dt

' 0.19 * Tin & Tex*

1/3

(Tin & Tex) SA (6.88)

Continuity: Qj% Qj%1% Qj%2.... ' 0 (6.89)

Energy: Hj' Hj%1' Hj%2.... (6.90)

Tin = air temperature in tank

Tex = surrounding temperature

SA = tank surface area for heat exchange

Note that latent heat effects, which could be significant if the air chamber

temperature passes through freezing or boiling temperature, are not considered.

The user has the option of specifying either the polytropic or the RHT method for

air chamber calculations.

6.7 Algorithms for Junctions

6.7.1 Simple Junctions

There is no head loss across a simple junction. The governing equations are these:

In programming continuity at junctions, care must be taken that the correct sign

is used with Q. The convention used by the program for continuity may differ from

the convention assigned by the user to a particular branch. The energy relations

shown above are not included explicitly in the matrix of system equations. Rather,

the coefficients of H, Hj+1, ...., for the respective serial branch outer equations are

all placed in the same column of the system matrix, thus equating them implicitly.

6.7.2 Tee Junctions

The algorithms for Tee Junctions differ from simple junctions in that Tee Junctions

are restricted to three linking branches (of certain geometry) and head losses are

calculated from branch to branch. The continuity equation is the same as for a

simple junction
USACERL ADP 98/129 241

Qj% Qj%1% Qj%2' 0 (see Eq 6.89)

Hj& Hj%2' HLj@j%2

Hj%1& Hj%2' HLj%1@j%2 (see Eq 6.21)

BCmod(t) ' BCsched(t) % sine[2B(t@FREQ%PHASE/ 360)]@ AMP (6.91)

and there are two energy equations of the form:

A complete description of the head loss, HL, calculation can be found in Resource

Analysis (1978). This procedure was originally presented in Gardel (1965). The

Gardel coefficients can be modified to achieve a specified head loss coefficient from

the upstream conduit to the riser when there is no flow in the riser. Such a

modification affects head loss calculations for other flow regimes as well.

6.8 Special Options for Valve, Gate, and B.C. Schedules

6.8.1 Superimposed Sinusoidal Variation

To superimpose a sinusoidal variation on a valve, gate, load, reservoir elevation, or

flow boundary schedule, the following equation is applied:

BCmod = modified boundary condition value

Bcsched = boundary condition value from schedule

FREQ = specified sinusoidal frequency

PHASE = specified phase angle

AMP = specified amplitude

6.8.2 Gate Closure

The standard gate closure consists of four distinct portions: gate acceleration,

linear closure, gate deceleration, and final closure at a reduced constant rate.
242 USACERL ADP 98/129

at t

1

' t

0

% TACC,

G(t

1

) ' G(t

0

) &

1

2

TACC 100

RTCLOS (6.92)

G(t) ' G(t

1

) & (t&t

1

)

100

RTCLOS (6.93)

t

2

' t

1

% ( G[t

1

] & GCUSH )

RTCLOS

100 (6.94)

at t

3

' t

2

% TDEC

Alternatively, a non-linear cushioning curve may be specified in place of gate

deceleration and linear final closure.

The acceleration portion is defined by the user as the time to reach the straight line

closure rate, TACC. Assuming a constant rate of acceleration,

where

RTCLOS = user defined closure time for full stroke at constant velocity

The interpolation routine will provide a cubic curve between the points (t0

 , G [ t0

]) and (t1, G [ t1 ]).

From the gate value G(t1

), at which full velocity has been reached, to GCUSH,

where the cushioned closure begins, gate position is determined by

A constant closure rate applies until time t2

 which is calculated

The gate deceleration time, TDEC, is the time specified by the user for the gate

closure rate to be reduced to the final cushioned rate. The computations are similar

to those for gate acceleration.
USACERL ADP 98/129 243

G(t

3

) ' G(t

2

) &

1

2

TDEC 20

RTCLOS%RTCUSH (6.95)

G(t) ' G(t

3

) & (t&t

3

)

100

RTCUSH (6.96)

t

4

' t

3

% G(t

3

)

RTCUSH

100 (6.97)

TCUSH

Gate Linear Closure

(G)

GCUSH

0 t2

TF =1 

GF = 0

TF = 0.5

GF = 0.35

TF = 0

GF = 1

Time (t)

TF = (t-t2) / TCUSH

GF = G / GCUSH

Figure 41. Non-linear final closure curve.

where

RTCUSH = user defined closure rate in terms of time for full stroke

The final closure at constant rate is computed

The gate will be closed at time t4 and remain closed thereafter.

A non-linear final closure curve (Figure 41) may be defined by a set of G/GCUSH

versus (t-t2

)/TCUSH points, where TCUSH is the specified time from the beginning

of cushioned closure to zero gate. Each point ofthe dimensionless curve, is

converted to a point in the gate schedule using the specified GCUSH and TCUSH

values and the computed t2

.
244 USACERL ADP 98/129

H(I) ' CH1(I) ( H(1) % CH2(I) ( Q(1) % CH3(I) (6.98)

Q(I) ' CQ1(I) ( H(1) % CQ2(I) ( Q(1) % CQ3(I) (6.99)

6.9 Branch Reduction Scheme

The system inner equations of Sections 6.1 - 6.8 relate the heads and discharges at

adjacent internal nodes using continuity and momentum (or energy) conservation

principles as applied to the element type which contains the two nodes. As

discussed in Section 2.6 the inner equations of each serial branch are reduced to a

single pair of branch outer equations relating, respectively, the head at the

downstream node and the discharge at the downstream node to the head and

discharge at the upstream node. These are then solved simultaneously with the

junction branch equations.

This process, termed forward construction, is quite similar to the reduction process

described for conduits by Resource Analysis, Inc. (1976). It has been generalized

in the WHAMO model to include the inner equations pertaining to any element

which is part of a serial branch.

The method of forward construction is to go from internal node to internal node in

a branch, beginning with the second internal node from the upstream end,

determining at each node forward construction equations expressing H and Q at

that node as a linear function of H and Q at the upstream end of the branch. The

form of the forward construction equations is:

where H(I) is the energy head at node i

Q(I) is the discharge at node i

CQ1, CQ2, CQ3, CH1, CH2, and CH3 are computed forward construc

-tion coefficients

Node 1 is the upstream node of the branch

Clearly, the forward construction equations for the downstream node of a branch

are equivalent to the reduced outer equations for that branch.

The process of determining equations (6.98) and (6.99) is a recursive process in

which the forward construction coefficients CQ1, CQ2, ..., CH3 at node i are

calculated for those at the preceding node i-1 according to the inner equations

written between the two node points. A separate description follows for the

different forms of inner equations which apply to the various element types.
USACERL ADP 98/129 245

H(I) ' E(I) ( H(I&1) % F(I) ( Q(I&1) % G(I) (6.100)

Q(I) ' R(I) ( H(I&1) % S(I) ( Q(I&1) % T(I) (6.101)

H(I) ' E(I) x H(I&1) % F(I) x Q(I&1) % G(I) (6.102)

' E(I) x [CH1(I&1) x H(1) % CH2(I&1) x Q(1) % CH3(I&1)] %

F(I) x [CQ1(I&1) x H(1) % CQ2(I&1) x Q(1) % CQ3(I&1)] % G(I)

' [E(I) x CH1(I&1) % F(I) x CQ1(I&1)] x H(1) %

[E(I) x CH2(I&1) % F(I) x CQ2(I&1)] x Q(1) %

E(I) x CH3(I&1) % F(I) x CQ3(I&1) % G(1)

CH1(I) ' E(I) x CH1(I&1) % F(I) x CQ1(I&1) (6.103)

CH2(I) ' E(I) x CH2(I&1) % F(I) x CQ2(I&1)

6.9.1 Forward Construction for Conduits

The conduit inner equations of Section 6.2 can be rearranged algebraically to the

form:

where Coefficients E, F, ..., T relate directly to ", $, (, and * of equations (6.7)

and (6.8) as shown in Appendix A of Resource Analysis (1976).

Using these inner equations and the forward construction equations, the recursion

relations for determining the forward construction coefficients at node I from those

at node I-1 can be developed as follows:

Therefore, from equations (6.98) and (6.102), it can be seen that:
246 USACERL ADP 98/129

CH3(I) ' E(I) x CH3(I&1) % F(I) x CQ3(I&1) % G(I)

CQ1(I) ' R(I) x CH1(I&1) % S(I) x CQ1(I&1) (6.104)

CQ2(I) ' R(I) x CH2(I&1) % S(I) x CQ2(I&1)

CQ3(I) ' R(I) x CH3(I&1) % S(I) x CQ3(I&1) % T(I)

CH1(1) ' 1

CH2(1) ' 0

CH3(1) ' 0

CQ1(1) ' 0

CQ2(1) ' 1

CQ3(1) ' 0

(6.105)

H(I) ' H(I&1) % SLOPE x Q(I&1) % CONST (see Eq 6.17)

Q(I) ' Q(I&1) (see Eq 6.18)

In a similar manner, the following recursion relations for CQ1, CQ2, and CQ3 and

be developed:

Inspection of the forward construction equations (6.98, 6.99), reveals that in every

case, no matter what type of element follows, the coefficients for the first node of a

branch are:

The above is simply a statement of the identity principle.

6.9.2 Forward Construction for Turbo-Machine and Valves

The inner equations which pertain to turbo-machines and valves, including

ONEWAY and RELIEF elements, can be written in the general form:

From the above equations it is easy to determine the following formulae for the

forward construction coefficients at node I on the downstream side of a machine or

valve:
USACERL ADP 98/129 247

CH1(I) ' CH1(I&1) % SLOPE x CQ1(I&1) (6.106)

CH2(I) ' CH2(I&1) % SLOPE x CQ2(I&1)

CH3(I) ' CH3(I&1) % SLOPE x CQ3(I&1) % CONST

CQ1(I) ' CQ1(I&1)

CQ2(I) ' CQ2(I&1)

CQ3(I) ' CQ3(I&1)

SLOPE ' 0

CONST ' &HL

H(1) ' HBC

H(2) ' CH1(2) ( H(1) % CH2(2) ( Q(1) % CH3(2)

The above relations can also be employed for diameter changes and dummy

elements by replacing

where HL = calculated head loss.

6.9.3 Forward Construction Including Boundary Conditions

Serial branches which end or begin with boundary conditions receive special

treatment in order to eliminate the known variable from the matrix.

This will be illustrated with the simplest case, a one branch two node system. The

equations for this system are:
248 USACERL ADP 98/129

Q(2) ' QBC

Q(2) ' CQ1(2) ( H(1) % CQ2(2) ( Q(1) % CQ3(2)

1 0 0 0

CH1(2) CH2(2) &1 0

CQ1(2) CQ2(2) 0 0

0 0 0 1

H(1)

Q(1)

H(2)

Q(2)

'

HBC

&CH3(2)

&CQ3(2)

QBC

(6.107)

CH2(2) &1

CQ(2) 0

Q(1)

H(2)

'

&CH3(2) & CH1(2) x HBC

&CQ3(2) & CQ1(2) x HBC % QBC

(6.108)

H(IL) ' CH1(IL) x H(1) % CH2(IL) x Q(1) % CH3(IL) (see Eq 6.98)

Q(IL) ' CQ1(IL) x H(1) % CQ2(IL) x Q(1) % CQ3(IL) (see Eq 6.99)

In matrix form:

with a known head at node 1 being HBC and a known Q at node 2 being QBC. The

variables H(1) and Q(2) can be eliminated from the above matrix as these are

known quantities. The four equation system is thus reduced to the two equationtwo unknown system shown below:

This elimination is done in the program for all reservoirs and flow boundary

conditions.

6.9.4 Forward Construction for Surge Tanks

Forward construction proceeds to the last node at the water surface of a surge tank

in the usual manner described above. Generally, the conduit equations apply. For

the first and last segments of a differential surge tank, the forward construction

integrates the inner equations (6.61, 6.62) and (6.61, 6.64) of Section 6.6.3.

At the last node, IL, of a surge tank, the forward construction equations are initially

of the usual form:

Added to these are the boundary equation 6.47 at the last node
USACERL ADP 98/129 249

H(IL) ' TN & TA x Q(IL) (see Eq 6.47)

H(IL) ' &TA x Q1(IL) x H(1) & TA x CQ2(IL) x Q(1)

& TA x CQ3(IL) % TN (6.109)

The two equations (6.99) and (6.47) are combined, and the variable Q(IL)

eliminated, resulting in a single equation which expresses H(IL) in terms of H(1)

and Q(1).

Equations (6.98) and (6.109) are adopted as the outer equations for this branch,

thus eliminating one equation and one unknown from the system matrix. The

variable Q(IL) is evaluated after solution of the matrix using equation (6.47).

6.9.5 Backsubstitution

The branch reduction process eliminates the necessity of solving for the H and Q at

every internal node of the system simultaneously. This is a great computational

saving. Nevertheless, those H and Q variables which are not explicitly included in

the outer equations still must be evaluated at each time step.

The process is simple. After solution of the system matrix the H and Q at the ends

of each branch are known. The values at the intermediate nodes are then

calculated from the values at the upstream end using the forward construction

equations (6.98, 6.99) and the coefficients which were determined and saved for

each node during forward construction.

As a check for computational accuracy, the H and Q at the last node of a branch are

calculated using backsubstitution and compared to the values determined from

solution of the system matrix. If these do not agree, a warning message is printed.

6.10 Steady State Generation

The strategy of the initial steady state generation is outlined in Section 2.7. In

general, the governing equations for the various elements are the same as those

presented previously for the transient simulation. The exceptions are conduit and

surge tank elements.

For conduits, the steady state governing equations are these:
250 USACERL ADP 98/129

Momentum: Hj& Hj%1' SLOPE x Qj% CONST (6.17)

Continuity: Qj%1' Qj

(6.18)

HL ' (

f)x

D

% Cadd )

Q*Q*

2gA2

CH1(I) ' CH1(I&1)

@

@

@

CQ3(I) ' CQ3(I&1)

(6.111)

Compressible and unsteady effects need not be considered in steady state

calculations. Only friction losses are included in the momentum equation. Losses

are calculated the same as for the transient case.

This term is then linearized in the manner described for values in Section 6.3.3

using a preliminary estimate of Q generated by the program or an estimate of Q

equal to the value calculated at the last iteration. Forward construction proceeds

as before using the altered inner equations.

Under steady state conditions there will be no flow in a surge tank and the head at

each of the internal nodes contained therein will be equal. This is accomplished by

equating the forward construction coefficients at each of the internal nodes of a

surge tank.

Forward construction, system solution, and backsubstitution calculation proceeds

exactly as for the transient simulation, excepting only the alterations enumerated

above for conduits and surge tanks.

6.11 Interpolation

In general, all interpolations performed in WHAMO use the method of continuous

parabolic interpolation. A thorough delineation of this technique is contained in

Appendix G of Perkins (1964) part II or in the original source, Snyder (1961). The
USACERL ADP 98/129 251

KEY:

Data Points

Parabolic Interpolcation

Substituted Straight-line 

Interpolation

Figure 42. Aberration in continuous parabolic interpolation.

same interpolating polynomial is also used in the linearization of machine

characteristics outlined in Section 6.4.

This technique is in general quite satisfactory. An advantage over other techniques

is that it provides a continuous first derivative at all points of the interpolating

curve. Under certain circumstances, however, particularly where there is an abrupt

change of slope implied in the data, the technique has been found to give

unreasonable results. A typical example is illustrated in Figure 42. To guard

against this situation, a check has been built into the interpolation routine. If four

neighboring data points are continuously monotonic, and if the interpolating curve

between the two central points of the four is not continuously monotonic, then the

continuous parabolic interpolation is replaced by a simple straight line interpolation

between those two points.
252 USACERL ADP 98/129

7 Conclusion

WHAMO 2.0 for DOS has been upgraded to WHAMO 3.0 for Windows. WHAMO

3.0 is a valuable design and analysis tool for hydropower plants and fluid

distribution systems that are subject to water hammer. WHAMO performs

dynamic simulation of networks comprised of pipes, valves, pumps, tanks, and

turbomachines and calculates time-varying flows, pressures, heads, and other

parameters throughout the network. WHAMO 3.0 utilizes the same time-tested

algorithms that have been used in previous versions of WHAMO.

The new WHAMO Network Builder has greatly simplified the data input process.

In the past, users had to use a text editor along with a series of complex commands

to create the input file. This method of data input still works, but the new Network

Builder is easier and more efficient for most users. The module is graphically-based

and allows users to “draw” the network on the computer screen and input the

relevant data via a series of easy-to-understand dialog boxes.

The new WHAMGR program for display of WHAMO simulation results is also

Windows-based. In the past, users were restricted to a few printers and monitors

to display output, and output requests had to be entered via complex commands.

 The new WHAMGR allows users to quickly and easily select, display, and print

output on any printer or monitor that is supported by Windows.
USACERL ADP 98/129 253

References

Carnahan, B., H.A. Luther, and J.O. Wilkes, Applied Numerical Methods, New York: John Wiley

& Sons, 1969

Crane Co., Flow of Fluids through Valves, Fittings, and Pipes, Technical Paper No. 410, New York,

New York, 1979

Daily, J.W., "Hydraulic Machinery," in Engineering Hydraulics, ed. H. Rouse, New York: John

Wiley & Sons, 1976

Gardel, A., Chambre D'Equilibre, F. Rouge, and Cie, Lausanne, 1965

Graze, H.R., "A Rational Thermodynamic Equation for Air Chamber Design," Third Australasian

Conference on Hydraulics and Fluid Mechanics, Sydney, 1968

Graze, H.R., J. Schubert, and J.A. Forrest, “Analysis of Field Measurements of Air Chamber

Installations,” Proceedings, Second International Conference on Pressure Surges, BHRA,

London, 1976

Hagihara, S., H. Yokota, K. Goda, and K. Isobe, "Stability of a Hydraulic Turbine Generating Unit

Controlled by P.I.D. Governor," IEEE Power Engineering Society Winter Meeting, New York,

1979

International Business Machines Corporation, System/360 Scientific Subroutine Package, Version

III, Programmer's Manual, White Plains, New York, 1970

Knapp, R.T., "Complete Characteristics of Centrifugal Pumps and Their Use in the Prediction of

Transient Behavior," Trans. ASME, Vol. 59, 1937

Marchal, M., G. Flesch, and P. Suter, "The Calculation of Waterhammer Problems by Means of the

Digital Computer," Proceedings of the International Symposium on Waterhammer in Pumped

Storage Projects, ASME, Chicago, November 1965

Parmakian, J., Waterhammer Analysis, New York: Dover Publications, Inc., 1963

Perkins, F.E., A.C. Tedrow, and P.S. Eagleson, Discussion of Streeter, V.L., and C. Lai, "WaterHammer Analysis including Fluid Friction," Journal of the Hydraulics Division, ASCE, Vol.

89, No. HY1, January 1963
254 USACERL ADP 98/129

Perkins, F.E., A.C. Tedrow, P.S. Eagleson, and A.T. Ippen, "Hydropower Plant Transients, Part II,

Response to Load Rejection," Hydrodynamics Laboratory Report No. 71, Massachusetts

Institute of Technology, Department of Civil Engineering, September 1964

Perkins, F.E., A.C. Tedrow, P.S. Eagleson, and A.T. Ippen, "Hydropower Plant Transients, Part III,

Response to Variable Load," Hydrodynamics Laboratory Report No. 79, Massachusetts

Institute of Technology, Department of Civil Engineering, September 1965

Resource Analysis, Incorporated, "Model for the Investigation of Hydraulic Transients in Pipe

Networks Due to Unsteady Pump/Valve Operation," report to the Omaha District, U.S. Army

Corps of Engineers, August 1976

Resource Analysis, Incorporated, "Results of Mathematical Simulations of the Oahe Power and

Pumping Plant Hydraulic Transients," report to the Omaha District, U.S. Army Corps of

Engineers, February 1978

Snyder, W.M., "Continuous Parabolic Interpolation," Proc. ASCE, Vol. 87, No. HY4, July 1961

Waterways Experiment Station, "Graphics Compatibility System (GCS) Programmers Reference

Manual," Computer Program No. 803-F3-R0200, U.S. Army Corps of Engineers, Vicksburg,

Mississippi, 1979

Waterways Experiment Station, "Hydraulic Design Criteria," U.S. Army Corps of Engineers,

Vicksburg, Mississippi, January 1977

Wylie, E.B., and V.L. Streeter, Fluid Transients, New York: McGraw-Hill Inc., 1978
USACERL ADP 98/129 255

Appendix: Index of Primary Commands in

WHAMO 3.0

CLOSURE .................................................... 134

Defines a dimensionless, non-linear curve for the "cushioning" portion of the

special gate closure option.

CONDUIT ...................................................... 66

Defines a circular, closed conveyance element which has constant properties

along its length (except that the diameter may vary gradually).

CONTROL .................................................... 135

Controls the computation parameters such as the time step and the numerical

weighting ratio.

DCHANGE ..................................................... 70

Defines an expansion or contraction element between conduits of different

diameter.

DISPLAY ..................................................... 122

Specifies which portions of the input data should be displayed in tabular form

as part of the printed output.

ECHO/NOECHO ............................................... 124

Specifies whether the input commands should be echoed in the output or not.

Input commands are echoed by default.

FLOWBC ...................................................... 72

Defines a specified discharge condition at a boundary of the system.

FLUID ....................................................... 138

Specifies density for fluids other than water.

GOVERNOR .................................................... 73

Defines a governing mechanism for pump-turbines and turbines.
256 USACERL ADP 98/129

HISTORY ..................................................... 125

Specifies the elements and variables for which time histories are to be printed

as part of the computer output.

INITIAL ...................................................... 139

Allows specification of preliminary estimates of discharge, head, and/or wicket

gate opening to be used in the initial conditions determination.

ONEWAY ...................................................... 77

Defines a non-return or check valve.

OPPT ........................................................ 143

Specifies the operation of each pump-turbine.

OPPUMP ..................................................... 142

Specifies the operation of each pump.

OPTURB ...................................................... 145

Specifies the operation of each turbine.

PCHAR ........................................................ 90

Defines the characteristics of each type of pump with dimensionless four

quadrant curve data of head and torque versus speed and discharge.

PCVALVE ...................................................... 78

Defines a pressure control valve.

PLOTFILE .................................................... 130

Specifies the elements and variable for which time histories are to be saved for

plotting by WHAMGR.

PUMP ......................................................... 89

Defines a pump.

P-T ........................................................... 82

Defines a machine which can be operated in either the pump or turbine mode.

PTCHAR ....................................................... 84

Defines the characteristics of each type of pump-turbine with model data

relating discharge and torque to speed and wicket gate opening.
USACERL ADP 98/129 257

RELIEF ....................................................... 93

Defines a pressure actuated valve. The function of this element is similar to

the PCVALVE element, but operation is specified in a different manner.

RESERVOIR .................................................... 96

Defines a free water surface boundary which may be headwater, tailwater, or

a canal, etc.

SCHEDULE ................................................... 147

Defines the operating schedule for valves, turbine gates and generator loads,

as well as the head or flow schedules for boundary conditions.

SEPARATION ................................................. 153

Specifies the pressure below which a message will be printed warning of

possible water column separation.

SNAPSHOT ................................................... 131

Specifies printing of the heads and discharges throughout the system at

certain times.

SPREADSHEET ................................................ 129

Specifies the elements and variables for which time histories are to be saved

to file in a spreadsheet compatible format.

SURGETANK ................................................... 97

Defines a simple surge tank, one way surge tank, Johnson differential surge

tank, or air chamber surge tank.

SYSTEM ...................................................... 117

This command specifies the connection of the system elements by defining the

node points which bound each element.

TCHAR ....................................................... 109

Defines the characteristics of each type of turbine with prototype or model

data relating head (or phi), wicket gate opening, power, and discharge.

TEXT ......................................................... 132

Used to enter a text message to be printed with the header of simulation

results output tables.
258 USACERL ADP 98/129

TJUNCTION .................................................. 105

Defines a three way Tee Junction for which head losses are calculated across

the junction.

TURBINE ..................................................... 107

Defines a turbine.

VCHAR ....................................................... 114

Defines the characteristics of each specific type of valve with a discharge or

head loss coefficient versus opening curve.

VALVE ....................................................... 112

Defines a throttling device of a certain type.