Sunteți pe pagina 1din 135

NEW & VALUABLE POLLUTION CONTROL BOOKS

FOR ENGINEERS, SCIENTISTS, MANAGERS


Analysis of Flow in Pipe Networks
Air Pollution Control
Environmental Assessment and Impact Statement Handbook
Food, Fertilizer and Agricultural Residues
Land as a Waste Management Alternative
Identification & Analysis of Organic Pollutants in Water
Biochemical Effects of Environmental Pollutants
X-ray Fluorescence Analysis of Environmental Samples
Viruses and Trace Contaminants in Water and Wastewater
Pollution Engineering Practice Handbook
Fine Particles in Gaseous Media
The Particle Atlas—6 Vols.
Second Edition—Treatment & Disposal of Wastewater Sludges
Wastewater Treatment Alternatives for Rural and Semirural Areas
Assessment of Biological Effects of Environmental Pollutants
Perspectives on Lake Ecosystem Modeling *■' .i
PreTreatment-Land Application Systems for Industrial Wastes
Best Management Practices for Agriculture and Silviculture
Land Treatment and Disposal of Municipal and Industrial Wastewater
Water Supply Engineering Design
Water Treatment Plant Design
Industrial Odor Technology
Electrotechnology Series
Air Monitoring Survey Design
Power Generation
Future Energy Alternatives
Perspectives on the Energy Crisis
Solar Energy
Solar Energy Research Directory
Science & Technology of Oil Shale
Environmental Aspects of Nuclear Power
Handbook of Ventilation for Contaminant Control
Fusion Reactor Physics
The Electric Car
Wastewater Treatment Technology
Disinfection
Pump Selection
Environmental Pollution and Control
Particle Size Analysis
Introduction to Energy Technology
Statistical Calculations
Carbon Adsorption
Electrotechnology: Wastewater Treatment & Separation Methods

AKIKI ADDPtD Cf"ICKir'C


MODERN
ANALYSIS AND CONTROL OF
UNSTEADY FLOW IN PIPELINES

By

CARY Z. WATTERS, PE
Professor of Civil and Environmental Engineering
Utah State University
Logan, Utah

ANN ARBOR SCIENCE


PUBLISHERS INC
P.O. BOX 1425 • ANN ARBOR. MICH. 48106
Preface

Those who write books are often criticized by the practicing engineer
for lack of detailed and directly useful information or techniques,
unrealistic levels of mathematics and theoretical manipulations, and
general disregard for the direct application to engineering practice. This
book is an attempt to overcome these objections, dissipate some of the
mystique surrounding unsteady flow analysis, and produce material which
can be of direct practical use to the professional engineer. Regrettably
unsteady flow phenomena and water hammer, in particular, are rather
complex and difficult to understand and analyze. This treatment will
make the phenomena as easy as possible to grasp without seriously
restricting the range of application of the resulting analysis. Although a
certain level of sophistication is necessary, nothing is required beyond that
knowledge usually associated with the Bachelor’s degree of the last 15
years.
This book is not a comprehensive treatise on unsteady flow nor is it
written for the sophisticated analyst or practitioner. It does not cover a
number of topics which could rightfully have been included. Rather, it
addresses mainly those types of unsteady flow problems faced by the
Copyright © 1979 by Ann Arbor Science Publishers, Inc. engineer designing pipelines which convey liquids, mostly water. Within
230 Collingwood, P. 0. Box 1425, Ann Arbor, Michigan 48106 this constraint most of the topics relate to water hammer analysis.
Hopefully, this narrow scope and more detailed development will make it
Library of Congress Catalog Card No. 77-92597 more valuable to the practicing engineer.
ISBN 0-250-40228-9 The only technique of analysis used for solving water hammer
problems is the method of characteristics. It is relatively easy to apply,
Manufactured in the United States of America accurate, inexpensive and reliable; however, it does require a moderate
All Rights Reserved knowledge of FORTRAN programming. Other methods of analysis are
not addressed, because in most cases the method of characteristics holds
every advantage. Those encountering problems requiring special
techniques can turn to other reference works.
The book builds on basic hydraulic theory to give the engineer
self-confidence in solving his own unsteady flow problems. Beginning with
relatively comfortable concepts and problems, the material becomes more
comprehensive as the topic is developed. Most common types of pipeline
configurations and appurtenances which can cause water hammer
problems are discussed and examples of computer analysis are included
regularly. However, it is impossible to anticipate the variety of pipeline
problems to be encountered. Hence, the reader is led to the point of being
competent to solve his own problems, using the book and its programs as a
starting point.
Many problems can be solved on very small computers because the
storage requirements are not large for most programs. Virtually all the
programs included can be converted to BASIC, which is available on most
mini-computers. Because some level of digital computing is available to
virtually all engineering firms, it seems only reasonable to rely on these
accurate, economical, timing-saving devices.
Included are listings of many computer programs ranging from Acknowledgments
simple to rather complicated ones. While all of them have been used to
some extent to solve problems, the author accepts no responsibility for
their correctness. The results obtained from any type of computer analysis
must always be examined carefully. Too often it is a failing of the engineer The author is indebted to many for their contributions to the
to have too much faith in the results of a numerical analysis, simply publication of this book. To Drs. Victor Streeter and E. Benjamin Wylie
because the numbers appear on paper with holes on each side. who, unknown to them, first aroused in me a serious interest in unsteady
To assist the potential user who does not wish to produce the decks flow phenomena, I am most appreciative. To Dean E. J. Middlebrooks, I
himself, the author will provide the service of reproducing and mailing any owe thanks for the encouragement to begin the project. To Professor F.
or all of the programs listed in the book. This service will be provided at a M. Wood of Queens University, I am obliged for the information on water
nominal charge to cover the cost of reproducing, handling and mailing. hammer history. To those individuals and agencies, who shall remain
Interested persons should write for price quotations. unnamed, whose work was pushed aside to permit expeditious completion
The portion of the book on the steady state analysis of pipe networks of this book, I am grateful for their forebearance. To the Civil Engineering
is based on R. W. Jeppson’s “Analysis of Flow in Pipe Networks” also Department and Genevieve Fonnesbeck, I am appreciative of their
published by Ann Arbor Science. Some modifications have been made in support in preparing the draft manuscript. Many thanks are due to
some of Jeppson’s network analysis programs, particularly where Barbara South for preparing the final document. Dr. J. Paul Tullis
interfacing with a water hammer program is required. reviewed the manuscript and made several suggestions for clarification
As a college text, this work is consistent in mathematical and improvement which enhanced the accuracy and readability.
sophistication and engineering content with an advanced undergraduate
or graduate level course. It is presently used in a two-quarter course
sequence at Utah State University attended by both senior and graduate
students. For the engineer in practice, it should be sufficiently detailed in
content to provide a surmountable self-study course in unsteady flow.
In preparing material for this text, the writer was struck with the
absence of textbooks and references dedicated to the engineer initially
attempting to grasp this subject and use the technology. Regrettably, too
much of the state of the art of solving useful engineering problems resides
in proprietary isolation inside consulting engineering firms. Hopefully, as
the technology continues to mature, all engineers will contribute to the
common pool of knowledge their expertise and techniques in analyzing
and controlling unsteady flows.

Gary Z. Watters
Logan, Utah

vi
....

Gary Z, Watters is presently Professor of Civil and Environ- Table of Contents


mental Engineering at Utah State University and head of
the Division of Hydraulics and Fluid Mechanics. He has
also served as Associate Dean for the College of Engineer- Page
Chapter
ing. A native of Illinois, Dr. Watters moved to Arizona,
then California where he graduated in Civil Engineering I Introduction ......................................................................................
and received a Master’s degree from Chico State College in Chico. After three
years of teaching at Chico, he earned a PhD from Stanford University and 1.1 Unsteady Flow Analysis .............................
accepted a position at Utah State University, where he has since been engaged 1.2 History of Water Hammer Analysis ............
in research and teaching.
II Fundamental Concepts .....................................................
Most of his activity in transient analysis over the last several years has
been with consulting firms in the Western United States, though he spent a .......................
year with Stone and Webster in Boston as a Ford Foundation Fellow. 2.1 Simplified Description of Water Hammer
Dr. Watters is a member of the American Society of Civil Engineers and 2.2 Unsteady Flow in Piping Systems ..............
the American Society for Engineering Education. He has been President of 2.3 The U nsteady Flow Equ ation ....................
the Utah Section of ASCE and has been the ASEE Outstanding Young Ill Rigid Water Column Theory ..................................................................... 13
.....................................................
Engineering Teacher in the Rocky Mountain Section. His research and publi-
cation interests include finite element analysis of fluid flow, sprinkler and 3.1 Flow Establishment in a Horizontal Pipe ............................. 13
trickle irrigation system hydraulics, flow in rough channels and hydraulics 3.2 Pressure Caused by Valve Closure in a Horizontal Pipe.. 16
of waste stabilization ponds, as well as hydraulic transients. 3.3 Unsteady Flow in Series Pipes ............................................. 19
3.4 Unsteady Flow in Parallel Pipes ........................................... 21

IV Elastic Theory ...........................................................................................

MW
4.1 The AH Equation ................................................

--1
4.2 ..................................................................
4.3 The a Equation ......................................................

GJ —1
Wave Speeds in Other Types of Conduits ....
4.4 ..............
Basic Differential Equations of Unsteady Flow
Solution by Method of Characteristics ......................................47

-U
5.1 Approximate Method of Characteristics ...............
5.2 Complete Method of Characteristics ....................

O'
M -q
5.3 Some Effects of Parameters on Solution Results ............

-q
viii ix

...............................
...............................
Table of Contents (Continued)
Chapter Page

VI Complex Pipe Systems .............................................................................83

Series Pipes ................................ . ....................................... 83


Branching Pipes ................................................................. 97
Interior Major Losses ......................................................... 101
Real Valves ....................................................................... 103
List of Figures
O' O O O' o o o o o

Pressure Reducing Valves .................................................. 112


Steady State Pipe Network Analysis ................................. 115 Figure Page
Water Hammer in Pipe Networks ....................................... 133
Column Separation and Released Air ................................. 152 2-1 Steady state flow situation for simple water hammer .

Ox
Wave Transmission and Reflection at Pipe Junctions .. 153
2-2 .................... 7
VII Pumps In Pipelines 157 Pressure wave propagation in a simple pipe system....
2-3
7.1 Theory and Operation of Pumps ....................................... Pressure head vs. time at three locations along the pipe ............
7.2 The Pump in the Pipeline .................................................. 2- 4Definition sketch for unsteady flow equation deviation 11
..........

s© Ox O> O>
’e
7.3 Pump Characteristics and Power Failure Rundown... ............
7.4 Selective Pump Tripout .................................................... 3-1 13
Simple system for applying rigid water column theory

o
7.5 Pump Power Failure With Backflow and Windmilling
7.6 Selective Pump Startup ..................................................... 4- 1 38
The effect of wall thickness on C-value for p — 0.30 ..

r-
5- 1 50
VIII Problems Resulting From Unsteady Flow in Pipelines ........................ 199 The s-t plane for the simple pipe of Chapter II ................
8.1 Results of Problems............................................................ 199 5-2
The s-t plane showing characteristics for Equations 50
8.2 Causes of Problems ............................................................ 200
5-8 and 5-9 ........................................................................
IX Control Devices and Techniques .............................................. 205 5-3 52
... The characteristic grid for a typical pipe ..........................
5-4 53
9.1 Valves .................. .
Disturbance propagation on the s-t plane..........................
9.2 Air in Lines ..............
5-5
9.3 Pump Power Failure ....................................................... Computer program for approximate water hammer 59
in a simple pipe .................................................................
References ......................... 68
Appendix I ........................ 5-5
Interpolation of H and V values on a As - At grid ...........
................................................................................ 5-7
Appendix II .................................................................................. 241 Computer program for the complete method of 72
characteristics ...................................................................
Index ............................................................................................ 247
5-8
.........
Model system for showing sensitivity to system .73
parameters ........................................................................

xi
X
List of Figures (Continued) List of Figures (Continued)
Figure Page
Figure Page

5- 9 The progression of frictional effects in a simple pipe 6-12 KL and 1/KL as functions of percent open ............................................108
with sudden valve closure ......................................................... . .. .75
6-13 Linear interpolation computer code ............................................... 110
5- 10 Numerical instability in a simple pipe with sudden valve
closure ........................................................................... 78 6-14 Definition sketch for parabolic interpolation ................................. 110

5- 11 Results of water hammer tests on copper tubing (from 6-15 Parabolic interpolation computer code ........................................... 112
“Water Hammer Analysis Including Fluid Friction” by
Streeter and Lai, ASCE Hydr. Div., 88:3, Nov. 1962) ................... 79 6-16 Water hammer resulting from various gate valve closure
schemes ........................................................................................ 113
5- 12 Results of tests on the oil carrying South European Pipeline
(from “Computation of Oil Pipeline Transients” by Kaplan, 6-17 Definition sketch for the pressure reducing valve .......................... 115
Streeter and Wylie, ASCE Hydr. Div., 93:6, Nov. 1967) ............. 81
6-18 Computer program for Hardy Cross analysis of pipe
5- 13 Results of water hammer tests on buried and unburied networks ........................................................................................ 119
PVC pipe (from “Water Hammer in PVC and Reinforced
Plastic Pipe” by Watters, Jeppson and Flammer, ASCE 6-19 Linear theory program (from Jeppson [19]) ................................... 123
Hydr. Div., 102:7, July 1976) ........................................................ 82
6-20 The Newton-Raphson technique in one dimension ........................ 129
6- 1 The s-t plane for a two-pipe system with equal N’s ..................... 86
6-21 Pipe network used to illustrate the use of the
6- 2 ................................................................................................... The s-t Newton-Raphson program ........................................... 132
plane with equal At’s and large interpolations ........................................... 86
6-22 Newton-Raphson program (from Jeppson [15]) ...................................134
6- 3 The s-t plane with variable N-value and minimum
interpolation ................................................................................... 87 6-23 Three-pipe junction with valve ...................................................... 141

6- 4 .................................................... Computer program for series pipes 6-24 Water hammer program for networks ............................................ 143
88
6-25 Pipe network with a single pipe extending from the
6- 5 ............................................ The one-in, two-out three-pipe junction network ........................................................................................ 151
97
6-26 Column separation caused by sudden valve closure ...................... 154
6-6 The two-in, one-out three-pipe junction ........................................... 98
6-27 Wave transmission and reflection at a series pipe
6-7 The three-pipe junction with a constant demand
junction ......................................................................................... 155
outflow ........................................................................................... 99
6- 28 Wave transmission and reflection at a tee junction ........................ 156
6-8 The one-in, three-out four-pipe junction ........................................ 100

6-9 A model for interior major losses................................................ 101 7- 1 Schematic diagram of centrifugal pump impeller
showing velocities......................................................................158
6-10 Valve in a constant diameter pipeline ............................................ 104
xiii
6-11 Valve and reservoir at the downstream end of a pipeline .... 105

xii
List of Figures (Continued) List of Figures (Continued)
Figure Page Figure Page

7- 2 Multi-characteristics for a given pump at various 9-4 A schematic sketch of a one-way surge tank ............................... 213
speeds ............................................................................165
9-5 One-way surge tanks in a pumped pipeline ................................. .. .
7- 3 214
Typical Hp/N2 and T/N2 curves for a pump ............................... 168
7- 4 9-6 Schematic diagram of an air chamber and its
Typical parallel pump booster configuration ............................... 169 appurtenances ................................................................217

7- 5 Piecewise linear representation of Hp/N2 vs. Q/N values .... 170 9-7 Propagation of negative wave after pump power failure
with an air chamber at the pump ..................................218
7-6 Pressure wave propagation as a result of pump power
failure .............................................................. ... .........173 9-8 Propagation of negative wave after power failure with an
air chamber and a one-way surge tank ..........................218
7-7 Computer program for source pump rundown as a result
of power failure .............................................................174 9-9 Column separation prevention using an air chamber and
one-way surge tanks ......................................................223
7-8 Pressure extremes resulting from power failure in a booster
pump configuration .......................................................182 9-10 Computer program for analyzing the effects of air
chambers and one-way surge tanks ............................................ 224
7-9 Computer program for booster pump rundown as a result
of power failure ........................................................................... 183

7-10 Complete characteristics for a centrifugal pump................................. 194

7- 11 Pumping plant configuration for illustrating effects of


backflow ...................................................................................... 195

8- 1 Filling an initially empty pump discharge line ............................. 201

8- 2 Filling a pump discharge column behind a closed check


valve ............................................................................................ ...
202

8- 3 Propagation of negative wave resulting from pump


power failure ................................................................................ 204

9- 1 Pressure head at the gate valve showing the effects of


surge valves .................................................................................. 208

9- 2 Computer program for a surge valve at the downstream end


of a simple pipe with a line valve closing ................................ 209

9- ....................................................................................................... 3 xv
Open-end surge tank in a hydroelectric installation xiv .................................... 213
List of Tables LIST OF COMPUTER PROGRAMS

Table Page Program Page

4- 1 Moduli of elasticity and Poisson’s ratio for common pipe I Approximate water hammer program for a simple pipe ................... 59
materials ........................................................................................
Complete characteristics method program for a simple pipe ... 72
5- 1 The effects of friction on maximum water hammer pressures
at the valve for sudden closure (N = 6) ......................................... 74 Water hammer in a series pipe .........................................................88
5-2 Effect of N on pressure head at the valve for rapid and Hardy Cross network analysis - simple version .............................119
slow velocity change (V = 5 fps) ............................................... 76 ........................................................................ 1
'J'X
6- 1 Loss coefficients for a gate valve .................................................. 107 Elementary linear theory - Darcy-Weisbach version .....................
...........................
6-2 1/KL for even increments of percent open ............................................. 109 Newton-Raphson network analysis program ..................................134

Water hammer in pipe networks .....................................................143

Program for pump rundown from power failure ........................... 174

Program for booster pump rundown from power failure ............... 183
10 Surge valve in a simple pipe - approximate method
of characteristics ............................................................................ 209

II Program for pump rundown after power failure with air


chamber and one-way surge tanks ................................................ 224

12 Water hammer in series pipe with internal steady flow


calculation ...................................................................................... 236

xvi xvii
1

I. Introduction

Unsteady flow problems in engineering practice are of significant


importance because they can cause excessive pressures, noise, cavitation
and vibration far beyond that indicated by steady flow analysis. In fact,
the problems created by hydraulic transients may be so severe as to
constitute actual or performance failure of a system.

1.1 Unsteady Flow Analysis

The analysis of unsteady flow in pipeline systems can be divided into


two broad categories. The first, called “surge” or “rigid water column”
theory treats the fluid as an inelastic substance wherein pressure changes
propagate instantaneously throughout the system and elastic properties of
the pipe walls are of no consequence. The equations describing this type of
flow are generally ordinary differential equations which can be solved in
closed form or with relatively straight-forward numerical techniques.
Where applicable, this approach is the easiest to apply and should always
be considered as a possibility to adequately approximate problems under
consideration.
The second category of problems are classified under “elastic” or
“water hammer” theory wherein the elasticity of both the fluid and the
pipe walls is taken into account in the calculations. Pressure waves created
by velocity changes depend on these elastic properties and they propagate
throughout the pipeline system at speeds depending directly on these
elastic properties. While the elastic theory more accurately reflects the
behavior of the unsteady flow system, successful analysis hinges on the
ability to solve two nonlinear partial differential equations. As a
consequence, the analysis is more complex and difficult to manage than
for inelastic theory. However, Streeter and Wylie [1] have demonstrated
that with the assistance of a highspeed digital computer, the method of
characteristics can be applied to solve the equations in a relatively general
and easily understood manner. Their text represents a compilation of
computer analysis techniques and is the most significant book in the area
of water hammer analysis to be published in years.
Before computer analysis the general equations describing water
hammer in pipeline systems were simplified in some manner to permit

1
2 UNSTEADY FLOW IN PIPELINES INTRODUCTION 3

solution by arithmetic, graphical or algebraic means. Nonlinear terms water hammer pressure. According to Rouse and Ince [3], Nicolai
were neglected, friction was included by lumping or approximating, or it Joukowsky in 1898 was clearly the first to show that the pressure rise in a
was left out altogether. Matching of boundary conditions at pumps and water line was related to the change in flow velocity, the wave speed and
turbines was, at best, difficult and understood by relatively few engineers. the fluid density. However, Wood [2] states that in a less well known but
Today, modem analysis techniques, including numerical methods of equally important study, J. P. Frizell in 1897 conducted an analysis of the
solving partial differential equations, has brought within reach of most effect of water hammer pressures on speed regulation of a hydroelectric
engineers the capability of solving accurately a wide range of water plant turbine in Ogden, Utah. Apparently, without knowledge of
hammer problems. Although digital computers are needed, they need not European work, he developed his own wave speed and pressure intensity
be large. Undoubtedly in the near future certain simple types of unsteady equations for sudden valve closure. He also noted the effect of branched
flow problems will even be solved on programmable “pocket” calculators. lines and wave reflection including the relationship between gate closure
Accordingly, it is the purpose of this book to make available to the time and wave period.
engineering profession the means of employing both rigid water column At virtually the same time, Nicolai Joukowsky in Moscow published a
theory and elastic theory in solving problems related to the design of report of his analytical and experimental studies of water hammer as it
pipeline systems. Sophisticated and obscure points and developments will related to the Moscow municipal water system. Joukowsky was
not be included. Methods of analysis other than recent computer-oriented well-acquainted with previous work. He derived equations for wave speed
methods will not be addressed. The emphasis will be placed on providing a and pressure increase and considered the problems of pressure wave
readable self-study book with which the engineer can instruct himself on propagation into smaller pipes, wave reflection from open pipes, the
unsteady flow analysis with enough applications and computer programs relationship between gate closure time and wave period, effects of air
included to give him a start in building his own library of programs. chambers, and the use of spring-controlled surge valves. Certainly, in
Because the emphasis in this work is on water hammer analysis, the retrospect, Frizell and Joukowsky would have to share the title of fathers
history of unsteady flow without elastic effects will not be included. Rather of water hammer analysis.
a brief history of water hammer analysis will be presented to give the The next giant to appear in the field of water hammer analysis was
reader a perspective on the evolution of this type of analysis over the last Lorenzo Allievi. According to Rouse et al. [3], in 1913, this Italian
100 years. hydraulician created a mathematical and graphical treatment of water
hammer problems which was the foundation for further developments in
1.2 History of Water Hammer Analysis
the field for the next 50 years. His contribution is too monumental to
review in any detail.
While it is difficult to establish the beginnings of unsteady flow
The first part of the 20th Century was devoted to applying the work of
analysis in pipelines in general, it certainly dates back to early in the 19th
Joukowsky and Allievi to water hammer problems. By a quirk of history,
Century. However, water hammer analysis history is more readily
Frizell’s significant contribution was largely ignored. Much of the work
documented. Some of the earliest work, according to Wood [2], was
seemed directed to the problems associated with hydraulic turbines in
when Wilhelm Weber in the 1850’s measured the effects of pipe wall
hydroelectric plants. Most of the books available today [4, 5, 6, 7] are
elasticity on wave propagation speed. He also developed the continuity
and fluid dynamic equations which were the basis for later analytical largely related to this application.
studies. Wood [2] also states that in 1875 Marey published the results of In the 1930’s, friction was included in the analysis of water hammer
his careful laboratory work which proved wave speed was constant for a problems and the First Symposium on Water Hammer was held in
given situation and depended on pipe elasticity. In 1878, Korteweg Chicago in 1933. Topics covered included high-head penstocks,
considered both pipe and fluid elasticity in developing an equation for compound pipes, surge tanks, centrifugal pump installations with air
wave speed and his equation is essentially that used today. chambers and surge relief valves.
Again from Wood we learn that Jules Michaud first dealt In 1937, the Second Water Hammer Symposium was held in New
experimentally with water hammer in 1878 by using air chambers and York with presentations by both American and European engineers. The
pressure relief valves in pipelines to reduce the effects of sudden gate or leaders in the field were in attendance as papers were presented on air
valve closures. In 1883, Grameka published an analysis showing the chambers, surge valves, water hammer in centrifugal pump lines and
effects of friction but he was unable to solve the equations. effects of friction on turbine governing.
It is less difficult to identify the beginnings of water hammer analysis During this period graphical techniques of analysis thrived under the
wherein fluid and pipe elasticity are important in the computation of work of Allievi, Angus, Bergeron, Schnyder, Wood, Knapp, Paynter, and
Rich. In later years moves were made to more accurately incorporate
4 UNSTEADY FLOW IN PIPELINES

frictional effects into the equations. Also more sophisticated boundary


conditions were employed and more general forms of the basic equations
were used in analysis.
The arrival of the 1960’s and the advent of the high-speed digital
computer heralded the beginning of a new era in water hammer analysis.
The work of Streeter and Wylie [1] in showing the application of the H. Fundamental Concepts
computer to complete and comprehensive water hammer analysis opened
the door to the engineering profession at large to consider water hammer
Before moving into the details of the unsteady flow analysis it is
analysis as part of normal design procedures without the need of hiring
important to develop an understanding of the action of water hammer in a
one of the few individuals previously capable of performing an analysis. In
simple situation. Such an understanding will help determine when to
this way, as much as any other, Victor Streeter should rank along with
apply elastic theory and understand the sequence of events occurring in
Allievi and Joukowsky as one of the outstanding contributors in water
later more complicated problems.
hammer history.
Because including friction in unsteady flow analysis is important and
Today the emphasis on unsteady flow analysis is almost entirely
because it may be necessary to apply the analysis to a wide variety of
concentrated on computer applications. Since the appearance of Streeter
problems including other liquids as well as water, a pipe friction
and Wylie’s [1] book only one other reference in recent years has
formula must be used which is sufficiently versatile to encompass these
appeared. In 1970 Tullis [8] published the proceedings of an institute on
needs. Accordingly, the Darcy-Weisbach formula
the control of flow in closed conduits held at Colorado State University.
Interestingly enough, this year two other works in addition to this one are
appearing in print. Wylie and Streeter [9] are offering a text on hydraulic (2-
transients in closed conduit systems and Martin [10] is also preparing a 1)
will be used in conjunction with the Moody Diagram which can be used to
book on transient analysis. Hopefully, this trend to make available the
fmd the friction factor f. The reader would be well-advised to review the
latest techniques in unsteady flow analysis will continue in future years.
basis for this formula and its application by referring to any recent
elementary fluid mechanics text.

2.1 Simplified Description of Water Hammer

To grasp a basic understanding of the action of a liquid pipe system


under the action of water hammer waves, it is easiest to consider as simple
a system as possible. The system we will examine is shown in Figure 2-1 as
a horizontal, constant-diameter pipe leading from a reservoir to some
unknown destination far downstream. A valve is placed a distance L from
the reservoir. Friction in the line is assumed negligible to simplify the
analysis; and because velocity heads are generally quite small in relation to
water hammer pressures, the difference between the energy gradeline (EL)
and the hydraulic gradeline (HGL) will be neglected.
Water hammer will be introduced into the system by suddenly closing
the valve. The activity will occur both upstream and downstream of the
valve but for our purposes, we will observe only what occurs upstream of
the valve.
Upon sudden closure of the valve the velocity of water at the valve is
forced suddenly to zero. As a consequence, the pressure head at the valve
increases suddenly by an amount AH (see figure). The magnitude of AH is

5
6 UNSTEADY FLOW IN PIPELINES FUNDAMENTAL CONCEPTS 7

EL-HGL
EL=HGL
----------- x

V EZ3 t s 2 L/o

1=5/2
t= 1/2 L/o |
•V
Figure 2-1. Steady state flow situation for simple water hammer.

just the amount of pressure head necessary to change the momentum of


the liquid flowing at velocity V at the valve to zero.

o
The increase in pressure at the valve results in a swelling of the pipe

°I
1
and an increase in the density of the liquid. The amount of pipe stretching
and liquid volume decrease depends on the pipe material and size and the I *= L/° I 3>G ~ .A

liquid elasticity. Generally, for common pipe materials and liquids, the
percentage change is less than 0.5 percent. The deformation has been

Bl'
greatly exaggerated in Figure 2-2 for purposes of illustration. V-0 3
0
The pressure increase propagates upstream at a wave speed of a,
which is determined by the elastic properties of the system and liquid and [7= 7/2 L/o |
the system geometry. The wave speed will remain constant so long as the EL=HGL

above remain constant. Traveling at a speed a, the wave will reach the 0 J
reservoir in a time L/a. At this time the velocity in the pipe is everywhere

I ______
1I
zero, the pressure head is everywhere H + AH, the pipe is stretched and | t- 3/2 L/o~|
the fluid is compressed.
Under these conditions the liquid in the pipe is under a condition of t:4L/0

non-equilibrium because the pressure head in the reservoir is only H. As a -V ' V=O

result, flow begins to occur toward the reservoir as the distended pipe J
ejects liquid in that direction. The reverse velocity is equal in magnitude to J
the initial steady velocity (as a result of neglecting friction) and the source
of liquid for the reverse flow is the liquid previously stored in the stretched
pipe walls as compressed liquid.
This process continues and at time 2 L/a, the pressure has returned
to normal (but with reverse flow occurring) throughout the pipe. However,
there is no source of liquid at the valve to supply the upstream flow hence
the pressure head drops an additional AH to force the reverse velocity to Figure 2-2. Pressure wave propagation In a simple pipe system.
zero. This drop in pressure causes the pipe to shrink and the liquid to
expand.
8 UNSTEADY FLOW IN PIPELINES FUNDAMENTAL CONCEPTS 9

At time 3 L/a this effect has propagated to the reservoir and the
velocity of flow is everywhere zero. However, the pipe pressure head is AH
below that of the reservoir. Consequently, the pipe sucks in liquid from
the reservoir creating a velocity of flow equal to and in the same direction
as the original steady flow. While this is occurring the pressure in the pipe
is also returning to its original value.

Head
After time 4 L/a this wave has reached the valve and at this instant
the flow is identical to its original steady state configuration. This elapsed

1
„ _______________
time constitutes one wave period. As time goes on, this cycle of events will
continue without abatement (in the absence of friction).
Some fundamental concepts can be gained from examining more

Jlo
closely what occurs in this system. For example, it is clear that the time .L. TIME

CD
oir
a
parameter which best describes the sequence of events in a meaningful
fashion is not time alone but the ratio L/a. It is informative to plot the Pressure head vs. time at the valve.

ce
pressure head at various points in the pipeline as a function of time as
shown in Figure 2-3. Note the pressue head as the valve fluctuates between
H ± AH whereas the pressure head at other locations also experiences
periods of time when pressure head is H.

Head^ ________________________________________________ X Heod^_


One basic point can be made from Figure 2-3b. Note that the
pressure does not increase at a point until enough time has occurred for
the wave to travel from the closed valve. Once the pressure head has
increased, it remains there only long enough for “relief’ to arrive back
from the reservoir. This idea of “time of communication” or “message
propagation time” is fundamental to a good understanding of the
happenings in a system undergoing water hammer. 1 —>
A second important point can be seen by examining Figure 2-3a more

_l|o

_l|o
TIME

(XI

to
oil-
closely. Suppose that instead of closing the valve suddenly, we were to
close it in 10 steps, each increasing the pressure head at the valve by b) Pressure head vs. time at the midpoint.
AH/10. A further requirement would be that the complete closure of the
valve would be accomplished before 2 L/a seconds had elapsed. It is clear
that the pressure head at the valve would still build up to the full AH value
because “relief’ from the reservoir could not arrive before 2 L/a seconds.
The point to be made is that a valve need not be closed suddenly to create
the maximum water hammer pressure. Indeed, any closure time less than
the time necessary for relief to return from a reservoir (a larger pipe may
suffice) will result in full water hammer pressures. In fact, as we will see
later, because of the nature of the way a valve shuts off flow in a pipeline
by creating large head losses, it may be necessary to close the valve in a
time much greater than 2 L/a to prevent high pressures from occurring.

2.2 Unsteady Flow in Piping Systems


O

CXI
I'
TIME

oV

CJI
air
a|r

air
r
Unsteady flow in piping systems is a common occurrence. Indeed, c) Pressure head vs. time just inside the pipe at the reservoir.
steady flow is so rare that one might question the advisability of devoting
so much time to a study of its behavior. Virtually, all hydraulic design is
based on steady flow analysis and to a significant degree, the unsteadiness
Figure 2-3. Pressure head vs. time at three locations along the pipe.
10 UNSTEADY FLOW IN PIPELINES FUNDAMENTAL CONCEPTS 11

occurring in the pipeline systems is of little consequence because of its


transient nature and its small magnitude of change. It is with those few
cases wherein significant changes in velocity can cause large changes in
pressure that we are concerned.
As discussed earlier, unsteady flows are divided into two categories,
depending on the type of analysis required to accurately describe the flow
behavior. Often it is not clear which type of analysis should be used
because there is no distinct line of demarcation between the two areas of
application. On the other hand, there are cases where it is obvious which
type of approach should be used. For example, if a large storage tank 50 ft
in diameter and 75 ft tall were to be drained through a 6-inch pipeline
1000 ft long, it would be foolish to use elastic theory in a traditional water
hammer analysis. Yet, if during the draining process, there was the
possibility of having to close the discharge valve suddenly, then significant
water hammer could occur and elastic theory should be used.

2.3 The Unsteady Flow Equation

From earlier discussions it is clear that whenever changes in velocity


Figure 2-4. Definition sketch for unsteady flow equation derivation.
in a pipe system are so slow that the elastic wave has time to propagate
throughout the system many times during the period of change, then rigid
water column theory can be applied. When elastic effects are ignored, the
development of an appropriate equation is relatively easy. The resulting
equation is referred to as the one-dimensional unsteady flow equation. 1 3p 3z 4T
O _ 1 dV ^2-4)..............................................
Two- or three-dimensional equations have no practical application to 7 3s 3s yD g dt
pipeline flow so they will not be considered.
The unsteady flow equation, known widely in differential form as the
Euler equation, is derived by applying Newton’s Second Law to a small where D is the pipe diameter and T0 is the shear stress at the wall.
cylindrical fluid particle. Considering only the streamline direction, Because the above form with the shear stress T0 is not directly useful,
we will substitute a reaction between T0 and the Darcy-Weisbach friction
y. r? dv factor f. The result of this substitution is
SFs - m as = m —

Substituting the force components and mass from Figure 2-4 into this _j_3p__ 3z _ V2 = dV .............................................................. (2-5)
equation results in .................................................................................................
pAA - [ p + A s') AA - W sin 0 - TAs7rd = — 4^- ....................... (2-2) y 3s 3s D 2g g dt
\ 3s] g at
After some manipulation, we end up with the one-dimensional Euler
equation Recognizing that z is a function only of s and represents the elevation
above some datum of the pipe centerline, we can change the partial
derivative to a total derivative. Finally, the equation has the form

1 dp 3z 1 dv ....................................................
(2-3) . 1 _ X X X = 1X
_4T dt " 7 3s " ds ’ D 2g g dt ..................................................................’
3s 3s yd
Expanding the particle diameter to the size of the pipe cross-section Familiarization with the application of the equation will be gained by
and introducing the average velocity V gives a more useful equation examining several different flow situations.
HI. Rigid Water Column Theory
The unsteady flow equation can be used to solve a wide range of
pipeline problems which fall within the domain of rigid water column
theory. We will begin with some of the simple problems and proceed to
more comprehensive ones.

3.1 Flow Establishment in a Horizontal Pipe

If the discharge in the pipeline shown in Figure 3-1 is controlled by


the valve at the downstream end, the pressure in the pipe is everywhere
equal to Ho when the valve is closed. When the valve is suddenly opened,
the pressure at the valve drops instantly to zero and the fluid begins to
accelerate.
The equation describing this flow is obtained by integrating Equation
2-6 with respect to s.

o
I

1
i
VALVE
+


©
L

Figure 3-1. Simple system for applying rigid water column theory.

13
................ ...

RIGID WATER COLUMN THEORY 15


14 UNSTEADY FLOW IN PIPELINES

In a horizontal constant-diameter pipe, the integration is made quite easy Example 3-1
because (dz/ds) = 0 and V is a function of time only. We also assume the
A horizontal pipe 24 inches in diameter and 10,000 feet long leaves a
f-value in unsteady flow is the same as for a steady flow at a velocity equal reservoir 100 feet below the surface and terminates in a valve. The steady
to the instantaneous value. The result is state friction factor is 0.018 and it is assumed to remain constant during
the acceleration process.
If the valve opens suddenly, calculate how long it will take for the
fi^v2 =—— ............................................. (3-1) velocity to reach 99 percent of its final values. Neglect minor losses.
2gD g dt
Solution
Because the pressure head p t/y = constant = Ho and because p2 /y — 0
LV 2.65 x 10,000 x Vo
for t > 0, the equation is reduced to (3.6) <„ « 2.6S » - 322x,00 ■
TV2
Solving for V0>hf = f^^-
dV ...................................................... (3-2)
era | f <
0.018 x 10,000 xV2
dt 100
= ----------- 27644 ---------- >V0 = 8.46 fps

Integration is performed by separating the variables to form


Substituting into (3-6), t„ = 8 46

t99 = 70 sec.
dV ........................................ (3-3)
_ JL. v2
2gD
The following graph illustrates how the velocity approaches its steady
The integration gives the following equation for the time necessary to state value with time.
accelerate the flow to a given velocity V.

...................... (3-4)

y^°-+v
= Vo, the steady state velocity, the
Recognizing that V2g H0D/fL
equation for t becomes
.v
V +V ......................................... (3-5)
0
log
vo-v
Ho
It is important to note that as steady flow is approached, V V o and as a
consequence t -*•<». Of course this answer is unacceptable so we propose
that when V = 0.99 Vo, we have essentially steady flow. With this 10 20 30 40 50 60 70
interpretation, TIME

t99 = 2.65 .................................................... (3-6)


16 UNSTEADY FLOW IN PIPELINES RIGID WATER COLUMN THEORY 17

3.2 Pressure Caused by Valve Closure in a Horizontal Pipe where each of the variables on the right hand side would be evaluated at
time t.
Valve closure can cause some analysis problems beyond those of That there is indeed a limit of applicability to this approach can be
instantaneous valve openings. This possibility is apparent when one seen with Equation 3-7. As faster and faster valve closure times are used,
considers the rapid valve closure which caused the elastic water hammer dV/dt becomes quite large and, in the limit, goes to infinity. According to
problem discussed in an earlier chapter. The difficulty occurring in this Equation 3-7, in the limit p2 /y 00 also. The point at which rigid water
problem is precipitated by the fact that the pressure just upstream of the column theory fails to give acceptable results and a move to elastic theory
valve is no longer zero, but is determined by loss characteristics of the flow is necessary is hard to establish, because it depends on the individual
through the valve. problem and the accuracy in analysis required.
Figure 3-1 can still be used to represent the problem. At t = 0 the
velocity is Vo and the EL - HGL is approximately a straight line between Example 3-2
the reservoir surface and the pipe outlet (neglect minor losses) under
steady flow conditions. Water flows from one reservoir to another through the pipe at a
The differential equation representing this problem is the same as velocity of 10 fps. The shutdown plan calls for a valve closure scheme
Equation 3-1 which will cause the velocity to decrease linearly to zero in 100 seconds.
The valve is located at the center of a 6440-ft long pipeline.
L dV Estimate the maximum and minimum pressures which will occur in
Ho- (3-
g dt 7) the system, locate them and give the time at which they will occur.
Unfortunately, there are two dependent variables so we need another
equation.
The second equation devolves from an energy equation written across
the valve
)2O' ?
STEADY STATE _ > V7
(3-8)

where KL is the valve loss coefficient. Substituting this equation into PIPE MIDPOINT
Equation 3-7 gives

VALVE
3-9)

If KL were a constant, integration would proceed as with the flow


establishment case. However, KL is a function of the amount the valve is
open. Further complicating the problem is the fact that there is not an
equation directly relating KL to either time or velocity. Hence, the
solution to the differential equation must be a numerical one.
The approach would be to write the equation in finite difference Solution
form. With a valve closing schedule specified, the value of KL would be
The general form of the unsteady flow equation applying to this
known at any time and would be assumed constant over each At time
situation is
interval. One form of the equation would be
+ fLV1 + L dV _

o
I
V(t+At) = V(t) 2g D g dt
+
18 UNSTEADY FLOW IN PIPELINES RIGID WATER COLUMN THEORY 19

Given that the velocity will decrease linearly with time, Under steady flow conditions, p3/y = 90 ft. At the instant the valve
begins to move, p3/y drops to 80 ft.
■10
- 0.10 ft/sec2

II
100 At the instant of valve closure, p3/y = 70 ft.
To solve the problem, we will consider it in two sections. In summary,

Upstream section
(p3/y)max = 90 ft at steady flow just before valve begins to close
(p3 /ylmin = 70 ft at t = 100 sec
Both sections
+ L dv =0
dt

er
=
(p/y)max HO ft at upstream side of valve at t = 100 sec

a
3220 (-0.10) (p/y)min = 70 ft at downstream side of valve at t = 100 sec

OX)
8 3.3 Unsteady Flow in Series Pipes
= 100 + 100 (0.10) - V2
3220' Engineers are generally confronted with piping systems which are
y® = 110-^-V2 more complex than single constant-diameter pipes. This section illustrates
2gD how to reduce a series pipe to a dynamically equivalent single pipe so that
the previous analysis techniques for single pipes can be used.
The concept of equivalent pipes is familiar to engineers. It is possible
Because we are looking for extreme values of pressure, it is clear that to replace any minor loss or any given pipe with another pipe of any
(P2/y)max = 110 ft when V = 0 which is at the instant of valve closure. convenient diameter. The only concern is that both the actual system and
The minimum pressure occurs at steady flow where p 2 /y = 90 ft. An the equivalent system have the same frictional losses at the given flow rate.
instant after the valve begins to close, p2/y jumps to 100 ft. In applying the equivalent pipe idea to unsteady flow problems, the
In summary, concept of equivalence must be extended to include dynamic behavior as
well as friction. That is, the inertial effects of the actual and equivalent
(p2 /y)max = 110 ft at t = 100 sec systems must be similar.
Using the three-part series pipe below as a general model, we will
(p2/y)min = 90 ft just before valve starts to close determine the relationships necessary to size the equivalent single
diameter pipe shown.
Downstream section

P4 P3

cr
fL

Q
V2 +
+
I
i
I

2g i

D
P3 3220
(-0.10)

3220

Equivalent Pipe

The first requirement is that the frictional head loss between A and B
be the same in each case. The equation is
20 UNSTEADY FLOW IN PIPELINES RIGID WATER COLUMN THEORY 21

= Hr + Hr + Hr
f
'eq 'l *2
we conclude3
3-10

K>
where K is a collection of numerical values including pi and g. Because the In more general form,
discharge in each section of the series pipe is the same at any instant, an
expression for friction loss equivalent follows from the above.

I—
fxL, f3L (3-12)

tl
w

|a
+
D,s

a
5
a

sq

In more general terms for any number of pipes in series, where N is the number of pipes in series. With Equations 3-11 and 3-12
and an arbitrarily picked f-value for the equivalent pipe, it is possible to
z

solve for the length and diameter of the equivalent pipe. Once the
equivalent pipe configuration is found, Equation 3-1 can be used to solve
for pressures.
where N is the number of pipes in series. 3.4 Unsteady Flow in Parallel Pipes
Now considering the dynamic behavior of the flow in the series pipe,
we begin by writing the unsteady flow equations for each section. The development of an equivalent pipe for a parallel pipe system is
similar to that previously done for series pipes. Again, we will use three
L, dV, I dQ pipes and generalize the results to any number of pipes.
- Hf = —1 =
f
i g dt A. dt

h _2 L
2 1 dQ

JI
IC
g dt 2 dt +
on

. 11___________________ 3 ___________________ 1 „
M1 1D
J-

g dt
w

u ______________________________________________________
Adding the three equations together,

CD
Equivalent Pipe
dQ
dt Following the criterion of frictional head loss equivalence,
Now, let us write the unsteady flow equation for the equivalent pipe.
_ PB _ PJ _ Leg d^eq _ Leq J dQ
7 7 feq g dt " g A£q "dt" This relationship leads to the equations

Noting that pa = p^ and Pjj = pg, and that friction loss equivalence
gives K Q2 = K 3-13)
a
<s
tn
22 UNSTEADY FLOW IN PIPELINES RIGID WATER COLUMN THEORY 23

where
Q,+Q2+Q,=Qeq

4-
Substituting Equation 3-13 into the above expression for continuity gives
Dividing out dQeq,
% % % ro/
£ rf’
eq L^eq £ rf
eq T^eqi
Q+ eq
5
- Deq , L
fi i. eq
L
D 5
n
J2L2J

................ (3-14) Writing the areas in terms of diameter and generalizing

II
O'
4-

eq eq

Dividing out Qeq and regrouping, ................................................................. (3-16)


Z

An example problem is included to illustrate the use of the equivalent pipe


.................................................... (3-15) concept for complex pipe systems.

Example 3*3
Now, addressing the dynamic behavior of the parallel system, we
write a dynamic equation for each pipe A three-unit pumped storage facility is operating in the generating
mode. During emergency shut-down, the wicket gates on the turbines are
dx 1 ±
closed in such a manner that the velocities in the penstocks at the turbines
t"1 OQ I t"*

Aj dt
dt decrease linearly from 60 fps to zero in 30 seconds.
1 dQ
dV
2 2 1 v2
Compute the maximum pressure head at the wicket gates during
dt g A, dt shut-down. Assume f-values are the same for all pipes.

dVa
)—I

J__a
— - —-H dt A, dt
EL 800
bO

7 7 *3
t-1 era

dt
H-
er
a

UNITS

Because of friction loss equivalence, the left hand side of the above L = 2000'
0=8'
T
equations are equal, giving
L dQ L dQ ■ L dQ L dQ n
7
Solution
Aj dt Aj dt A3 dt Agq dt
Writing the equation of continuity in differential form, First, the three parallel pipes are replaced by a single equivalent pipe.

dQ! +dQ2 + dQ3 = dQ^


and substituting expressions for the dynamic equation gives

............ ..
24 UNSTEADY FLOW IN PIPELINES RIGID WATER COLUMN THEORY 25

- 3.5 Accounting For Significant Minor Losses


D5 ’ 8s'
eq
(3-15) =3 = 19.20 If minor losses occur in the pipe system to the extent that they have a
L KO noticeable effect on the results, then they must be incorporated into the
. eq. O simultaneously gives
Solving the above two equations analysis. For a single pipe this can be done in two ways. In the first
method the pipe is broken into two pieces (as in Example 3.2) and each
D = 11.54 ft and Lpn = 555 ft portion is set up separately with the two solutions coupled at the minor
eq eq loss location via an energy equation. The second method includes the
Now, the pipe system has been reduced to the series pipe shown below. minor loss in the differential equation along with the pipe friction term.
L = 2000 L=555' This can be done by absorbing it into the pipe friction term by increasing
6 the friction factor or simply adding it in as a separate term.
* Assuming that the minor loss can be represented as hL = KL
D= 24' (v2/2g), these two latter techniques result in the following modifications
D = 11.54'
Next, using the series pipe equivalence relationships we reduce the of Equation 3-1, respectively
series pipe to a single constant-diameter pipe.

Cu
2000 555 f'L dV ...................................
eq =

II
(3-12)

OO |f
= 7.64 2gD dt
2
242 11.542
Q

eq where

QU
= 0.00296 f' = f + KL ................................................................ (3-18)
(3-11)
11.54s and
Solving these two equations simultaneously gives
dV ................. (3-19)

HJ
OU
D = 13.7 ft and Lpn = 1437 ft

II
dt

I
eq eq
Computing the velocity in the equivalent pipe, It is important not to use the traditional equivalent length method to
represent the minor loss. This technique adds length to the pipe and the
subsequent increase in liquid mass will distort the true dynamic behavior
Now, that we have a single constant diameter pipe, we can use the
of the system.
unsteady flow equation to solve for the maximum pressure.
If the pipe system is complex, the previous techniques must be
fLV2 L dV applied to the individual components of the system. The second method
2g D at discussed earlier is recommended with the technique of computing an f1 to
oo

distribute the minor loss along the entire pipe. After this has been
fLV2 (1437^ 0-61.3 accomplished, the analysis proceeds as before.
400- 2g D y32.2 J 30

fLV2
400+91.2-
2gD
The above equation for p2 /y is good durmg the deceleration process. It is
clear from this equation that the highest pressure will result when V = 0,
hence,

(Pj/y)max = 491 ft (213 psi) at the time valve is completely


closed
IV. Elastic Theory

For situations in which the velocity changes suddenly and the pipeline
is relatively long, the elastic properties of the pipe and liquid enter into the
analysis. In Chapter II we saw how a pipeline behaves under the action of
a sudden closed valve. The suddenly closed valve caused an increase in
pressure head AH to occur, which propagated at a speed a. It remains now
to develop means to calculate AH and a and broaden the range of
applications from that of the simple example in Chapter II.
The previously derived and integrated unsteady flow equations
cannot be used because they have not included elastic effects. We will
employ the impulse-momentum equation and the conservation of mass
principle to develop an appropriate set of equations for an impulsive
change in velocity.

4.1 The AH Equation

The impulse-momentum equation will be used to develop an equation


for AH. We know that a change in velocity AV will cause a pressure head
change AH to propagate upstream at some speed a. To begin, we will use a
piece of pipe dL long, where dL is arbitrarily small but not differentially
small as dL would be. The pressure wave and the pipe bulge (which is
caused by the pressure head change AH) propagate upstream at a speed a.
The wave speed in this work is defined as the speed relative to the observer
at rest with respect to the pipe rather than the speed relative to the flowing
water. In the case of relatively rigid pipes, either approach used gives
essentially the same results. Because this is an unsteady flow situation, the
impulse momentum equation for steady flow cannot be used. However, in

>V-AV
>
1

Unsteady Case
28 UNSTEADY FLOW IN PIPELINES ELASTIC THEORY 29

this case it is possible to use a translating coordinate system to transform The side shear force caused by friction will be neglected because its
the unsteady flow into a “steady” flow. size is limited by a very small dL. Also, because we are considering only
If we move our reference system to the left at a speed a we have, for all relatively rigid pipe (steel, concrete, etc.), the pipe bulge will be very small
appearances, a steady flow. and F3 will also be negligible.
Application of Equation 4-2 gives
Fi -F2 = QP(V-AV + a-V-a) = Qp(-AV)
where Qp = (V + a) AP
If the pressure at (1) were p0 then the pressure at (2) would be p0 +
Ap.
Po A’(P0 +Ap)(A + 6A) = (V+a)Ap(-AV)
Steady Flow
Expanding this equation and recognizing that Ap = yAH and dA is very
From basic fluid mechanics we have available the one-dimensional small compared to Ho, AH, A and y, we can neglect the small terms with
impulse-momentum equation the result
SFext = (SQPV)out.(SQpV).n ..............................................(4.J) -AH? A = (V+a)Ap(-AV)
where Q is the discharge, p is the liquid density and Z Fexf is the sum of In slightly different form, this equation can be written
the external forces acting. The momentum correction factor for
nonuniform velocity profiles has been assigned the value of 1.0. AH = -2-AV(V + a)
Considering only the component of this vector equation parallel to the
pipe and noting that momentum enters and leaves the section of pipe dL or
long at only one section each, we can write AH = aAV

(”«■), = :I
' ''-'i ............................................ <«>
In most cases involving rigid pipes (even PVC with a wave speed of
To apply the impulse-momentum equation we must specify a control about 1200 fps), the value of V/a is less than 0.01. Accordingly, Equation
volume and take into account all forces acting on the fluid in the control 4-3 is generally used (and is always used in this text) as
volume at a particular instant and at that same instant evaluate the
momentum fluxes into and out of the control volume. We will choose a
control volume coinciding with the inside of the pipe walls over the length AH = — AV ................................................ ......... (4-4)
g
dL and including the flow cross-section at each end of the pipe section dL
long. This control volume, the fluid in it and the external forces acting are
shown below. It is clear from Equation 4-4 that AH depends on a and cannot be
determined until a value of a is established.

4.2 The a Equation


To develop an equation for a we will consider conservation of mass
into the section of pipe dL long, which was used in the previous section to
find an equation for AH. The procedure used will be to examine the mass
flow into and out of the portion of pipe dL long over the time period
required for the wave to pass through that portion of the pipe. The net
inflow of mass will be equated to the increased mass storage in dL to yield
an equation for a.
To begin, we will look at the situation when the wave first reaches the
> +X
dL section and then at the time the wave has just passed through the
section dt later.
30 UNSTEADY FLOW IN PIPELINES ELASTIC THEORY 31

SLA (4-7)
8V = - Ap

where dV is the change in volume of the liquid in the pipe section dL long
as the result of a pressure change of Ap.

Change In Pipe Volume

Because the increased pressure stretches the pipe, there is more room
made available to store the net mass inflow of liquid. When the pipe
stretches circumferentially it may also stretch longitudinally so both
time = t time = t + dt
contributions to change in pipe volume should be evaluated.
Before proceeding, it is important to recognize that there is an
It is clear that dL and dt are related via the wave speed by interconnection or relationship between pipe wall strains in two
perpendicular directions. If a material is strained in one direction an
dL = adt
amount £t then a strain E2 will occur in the perpendicular direction
Net Mass Inflow (provided the material is free to strain without developing stress in that
direction) such that E2 = p£j where p is Poisson’s ratio. If there is a
During the time period dt an amount of liquid has accumulated in the restriction to strain in either direction caused either by restraint or applied
section of pipe given by the amount stress, the relationship is more complicated. In any case, Timoshenko [11]
gives, for thin-walled pipes,
8M = Mass accumulated = VApdt - (V - AV) (p + 6 p)(A+6A)6t
+
Expanding parentheses and neglecting small terms gives - 1 ( A
---- —
c
E or gj - -g- (Oj -po2) ........................ (4-8a)
8M = ApAVdt 1-p
or writing in terms of wave speed and dL, ej+pej
E or e2 (o2 - poj ....................... (4-8b)

n
1-M
2 E
8M = ApAV—............................................. (4-5)
a where and £j are the stress and strain, respectively, in the direction
This amount of extra liquid is accumulated in section dL by being parallel to the pipe axis and o2 and s^are the values in the circumferential
compressed slightly and by stretching the pipe slightly to provide storage direction. E is the modulus of elasticity of the pipe wall material.
room. In the case of water hammer waves, there is generally a resident stress
and strain already occurring in the pipe before wave passage. Hence, we
Change In Liquid Volume will write the above equations in incremental form
Because the pressure has increased during the passage of the wave,
Ae, + pAgj
the volume of the liquid in the section will compress slightly to a higher Ao, = E or Aej = (AtJj -pAcr2) (4-9a)
density. The equation describing this relationship is that defining the bulk
modulus of elasticity which can be found in any text on fluid mechanics.

Aea + p Aej
K=- (4-6) A<J2 E or Mo.) .............. (4-9b)
dV- IV
V The change in volume caused by circumferential stretching is
where K = the bulk modulus of elasticity of the liquid and p, V are the
6Vc =

o
pressure and volume, respectively. Recognizing that dp ~ Ap (K is
relatively constant over a wide range of pressure), Equation 4-6 becomes where 7r6D = 7rDAe2
32 UNSTEADY FLOW IN PIPELINES ELASTIC THEORY 33

Combining the two equations gives Because a buried pipeline might be expected to be restrained from
strain by soil friction and anchor blocks, we will pursue case (b) restraint
5V = y 7rD28LAe2 .............................................................. (4-10) to develop an equation for wave speed.
Case (b) restraint — For this restraint, Ae 2 = 0 and Equation 4-9a
The change in volume caused by longitudinal stretching is becomes
PAe2
5VL = j D2 SLACj ............................................................... (4-11) A
^i = T77 E =
1 [J.
Adding the two equations together gives the total volume change
5v=
and Equation 4-13 becomes
y D2 8L + Ae2j............................................................... (4-12)
Change in circumferential stress in the pipe wall caused by Ap is ApD Ae2
2e 1-

K>
Substituting this equation into Equation 4-12 gives
ApD ............................ (4-14)
A<72
2e

m
where e is the pipe wall thickness Now considering conservation of mass, we already have Equation 4-5
So Equation 4-9b becomes expressing the amount of mass which has accumulated in the dL pipe
ApD _ Aea + ^Aei section in dt seconds. We can write a different expression for the mass
4-13 change in the dL pipe section after wave passage. The mass change in the
tn

2e 1-u2 section is
Unfortunately, the longitudinal pipe restraint condition determines
8M = (p + 8p) (A8L + 8 V) - p A8 L
Aoj. For example, if the pipe were anchored at some point and free to
stretch longitudinally (much like a long slender pressure vessel), the Equating this expression with Equation 4-5, expanding and dropping
longitudinal stress would be small terms gives

SpA6L + p§-V = ApAV ..................................................(4-15)

under static conditions. However, the dynamic conditions of a water To arrange this equation in more useable form, note that for a mass of a
hammer situation will cause the pipe to stretch axially in a dynamic given substance, an increase in pressure causes a decrease in volume and
fashion wherein the hardware inertia is important. That is to say, any an increase in density.
valves, fittings, etc. in addition to the weight of the pipe itself must be
displaced by the pressure changes. The pipe may even be partially pV = constant
restrained by supports. In order to determine the value of Ao lt we would V8p + pS’V- = 0
have to solve a rather complex coupled set of equations relating the fluid 5V

O
n
dynamics to the hardware dynamics.

I!
V
Rather than attempt this task, it is suggested that the dynamics of the Substituting Equation 4-6 into this equation gives
pipe be ignored and the above equation for Ao t be used. Because this type
of restraint is rare and because restraint does not have an excessive impact

to

II
Q.

Q.
on wave speeds in typical pipelines, we will not be greatly concerned with
precisely fixing this type of restraint. Replacing Ap with yAH in the above equation, substituting it and
On the other hand, if the pipe were rigidly anchored to prevent axial Equation 4-14 into Equation 4-15
strain then Aoj = pAo2 because A^ = 0. If, however, the pipe had

_______ i
functioning expansion joints throughout its length, then Aoj = 0 and Ac t = Av
7AH a (4-16)
is of no interest. Following Streeter and Wylie [1], we will identify the
above as case (a), (b), and (c) restraints, respectively. In a practical sense, Combining this equation with Equation 4-4 gives
the pipe restraint lies between these values somewhere.
34 UNSTEADY FLOW IN PIPELINES ELASTIC THEORY 35

Table 4-1. Moduli of elasticity and Poisson’s ratio for common pipe
1 materials.

tn
Steel 106 psi 30 x 0.30

W td M td W M
or in a more conventional form for wave speed,
Ductile Cast Iron 106 psi 24 x 0.28
Copper 106 psi 16 x 0.30
[K/p]K Brass 106 psi 15 x 0.34

» ll ll II ll II
(case b) x 10® 0.33

O
tn
(4-17) Aluminum
PVC psi M « 0.45

X
Fiberglass reinforced plastic = 4.0 10s psi = 0.27- 0.30

WWW
(FRP) = 1.3 x 10® = 0.20 0.24
« 3.4 psi - 0.30

3=
Asbestos Cement x 10®

»»
Concrete 57,000 0.30
It is now possible for us to compute wave speed and pressure increase

t
psi
in simple situations where Equation 4-4 can be used. x 10®
Streeter and Wylie [1] have shown that the equation for wave speed where f'c = 28 day strength.
psi
can be more conveniently expressed as
Example 4-1

„= [K/P]1/2 As an illustration of the elastic deformations and pressure head


changes caused by a water hammer situation and the effect of restraint on

HM8 wave speed, the following problem is analyzed.

EL-HGL

where
C = 5/4-p for case (a) restraint ............................................... (4-19a)

200
C = 1-p2 for case (b) restraint ................................................ (4-19b)
-------J- - - - e-a_ A
C = 1.0 for case (c) restraint................................................... (4-19c) Flow in the 24-inch pipeline above occurs at a velocity of 6 fps. The
pipeline is fabricated of steel and has a wall thickness of 0.25 inches,
Recall that this set of equations applies only to thin-walled pipes where a) Calculate the wave speed for all three cases of restraint.
D/e is generally greater than about 40 (see Art. 4.3).
To assist in calculating wave speeds in pipes constructed of common
materials, the following table of E-values and p-values is included. The Case (a) 4720 _______ = 3413 fps
value of K for water can generally be taken as approximately 300,000 psi. _ /i + 3 x 1Q5
- — (5/4-0.30)
In the limit the pipe can become completely rigid without causing the V 3 x 107 -25
wave speed to become infinite. This limiting value is obtained by passing E
to oo in Equation 4-18. With the nominal value of K = 300,000 psi, the
resulting wave speed is approximately 4720 fps. This number has no _______ 4720
practical value in design because it is far too high to serve as even an Case (b) a
approximate wave speed for preliminary design. With even a limited Vl +0.96 (1 -0.302)
amount of experience, the designer can make far better estimates for wave 4720
speed in the pipe he is working with. Case (c) a = 3371 fps
x/1 +0.96 (1.0)
36 UNSTEADY FLOW IN PIPELINES ELASTIC THEORY 37

In a practical sense, the differences are negligible. 4.3 Wave Speeds in Other Types of Conduits
b) Find the head increase resulting from sudden valve closure for all
three cases of restraint. The simplest case of thin-walled pipes has been used previously to
derive equations for wave speed. It is obvious that many hydraulic
3413 conduits are constructed of thick-walled pipe and often using two or more
Case (a) = 636 ft

Ox
X
materials (reinforced concrete). Also tunnels may be carved in rock, lined
with steel and back-filled with concrete. It is necessary to be able to
Case (b) AH = 344° x 6 = 642 ft calculate wave speeds in all these cases.
32.2
A concise summary of the calculation of the wave speeds for these
3371 cases is given by Halliwell [12]. The most obvious extension of the previous
Case (c) AH = 32 2 x 6 = 628 ft example of thin-walled pipes is to thick-walled pipes. In a thick-walled
The variation in head increase among the three cases is about 2 pipe, the wall thickness is so great that stress varies noticeably between the
percent. inner and outer surfaces and this affects the expression for wave speed. An
c) Compute the axial and circumferential pipe wall stresses before analysis reveals that we may continue to use the same basic form for the
and after valve closure for all three cases of restraint. wave speed equation, but we must find a different value for the C in
Equation 4-18.

Case (a) Before a2 = 200x62.4x24 pSj, 2080 psi Thick-walled Pipes


144 x 2 x .25
Summarizing the results for thick-walled pipe for the same restraint
Aa2 = 636x62.4x24 = 13 230 psi Act, = 6615 psi conditions as before with D as the inside diameter,
144 x 2 x.25 *
After = a2 + Aa2 = 17,390 psi, = 8695 psi Case (a) — For pipes free to stress and strain both laterally and
longitudinally (anchored at only one point)
Case (b) = same as above, a, = /da2 = 1250 psi
Before
Aa2 = same as above, AOj = pAcr2 = 3970 psi (5/4-p) + 2D (1 +p.) (l + ^j
........................ (4-2
After a2 = same as above = 17,390 psi, Oj = 5220 psi
Case (c) Before a2 = same as above, Oj = 0
A limiting process shows that as e/D -*■ 0, this equation degenerates to
Aa2 = same as above, = 0
Equation 4-19a.
After a2 = same as above = 17,390 psi, Oj = 0 Case (b) — For pipes anchored against longitudinal strain,
d) Calculate the percent increase in diameter of the pipe caused by
sudden valve closure. (l-/?) + 2^ (1+p)
...................... (4-20b)
100 = 100 Ae2 = -^(Aa2 -MAOJ)
Case (c) — For pipes with functioning expansion joints throughout
their length.
Case (a) % change = - 100 — (13,230 - 0.3 x 6615) = 0.037%
30 x 106 7
1+2 (1 +p) ................................ (4-20c)

Case(b) % change = (13,230 - 0.3 x 3970) = 0.040%


As in case (a), both cases (b) and (c) degenerate to the thin-walled
pipe values when e/D -* 0.
The question arises as to when the more complex thick-walled
Case (c) % change = 3Q^JQ6 (13,230 - 0.3 x 0) = 0.044%
formulas should be applied. For deciding, it is helpful to examine the plot
This result substantiates many of our previous assumptions used in of these equations in Figure 4-1. To assist in making this decision,
neglecting small terms.
38 UNSTEADY FLOW IN PIPELINES ELASTIC THEORY 39

consider the uncertainties of pipe restraint and its effect on wave speed.
Figure 4-1 shows that uncertainty with respect to the type of restraint oc-
curring can cause differences of about 10 percent between C-values at the
two extremes of restraint. If we accept a similar error in deciding whether
to use thin-walled or thick-walled formulas, then a D/e value of 20 is an
appropriate dividing line. If, however, we decide to remove as much
uncertainty as possible, then the thick-walled formulas should always be

80
used. The additional computation required is negligible. In a practical
sense though, because of the relative size of terms in the denominator of
Equation 4-18, using thick-walled formulas beyond D/e values of 40
generally makes no significant improvement in the value of the wave speed

70
except in cases where softer pipes such as PVC are used. It should also be
noted that using the thin-walled formulas leads to higher (more
conservative) wave speeds. To see the effect, consider the following

Figure 4-1. The effect of wall thickness on C-value for p = 0.30.


60
example.

Example 4-2

A steel pipe 10 inches in diameter is used to convey water between two

50
reservoirs. The inside diameter of the pipe is 9.522 inches and the wall
thickness is 0.239 inches.
Compute the C-values and wave speeds using both thin and

D/e
thick-walled formulas and compare results.

40
Wave Speed-fps
30
Restraint Thin-walled Thick-walled Error (D/e = 40)
Case (a) 4023 3999 0.6%
Case (b) 4047 4021 0.6%
20

Case (c) 3994 3971 0.6%

Circular Tunnels
10

Wave speed formulas which apply to circular tunnels can be found by


taking the thick-walled pipe formulas and letting the thickness go to
infinity. The portion of Equation 4-18 that we will use is
060
1.20

(D/e) C = D/e (5/4 - At) + 2 (1+M)


O

lim (D/e) C = — x —
ee = 2(1 + p)
e -> oo

The resulting equation of wave speed is


40 UNSTEADY FLOW IN PIPELINES ELASTIC THEORY 41

constructed by first fabricating the thin steel cylinder, then centrifugally


a- ............................. (4-21) placing a 0.75-inch cement lining inside the pipe.
[ t f (. 7H After curing, the prestressing is accomplished by stressing the wire as
For tunnels which are concrete-lined or steel-lined with concrete it is wrapped around the outside of the steel cylinder. This process places
backfill, the elastic analysis is more difficult. Refer to Halfiwell [12] for the cement lining in compression. The ends of the wrapping wire are
the rather lengthy equations which must be used to find the (D/e)C value welded to the thin steel cylinder to maintain the prestressing. A cover of
for Equation 4-18. concrete is applied over the wire wrap to give a one-inch protective
coating.
Reinforced Concrete Pipe Assuming that the 28-day strength of the concrete is 6,000 psi, we will
compute the wave speed.
For reinforced concrete pipe, the transformed section technique can
be used to convert the pipe into an equivalent homogeneous pipe. Then
analysis can proceed according to the rules for homogeneous pipes.
However, it should be emphasized that the manner in which the pipe is
constructed should be investigated thoroughly. In most cases some of
the concrete section should not be expected to carry load. This is true
particularly if the load to be carried is tensile.
The transformed section technique replaces the steel with concrete
(or vice versa) using the relationship
n
t

A+i cone. ........................................ (4-22)


^steel
steel cone.

The technique of replacing concrete with steel is recommended because


the resulting steel pipe is thin-walled and the computation of the wave
speed is straight forward. If the reverse technique is used, the
cross-section of concrete is too bulky to handle properly.
In working with reinforced concrete pipe that is not prestressed, the
concrete is generally assumed to take no load in tension. The reinforcing
steel is transformed into a thin-walled steel pipe having the same area in
the axial and circumferential directions as did the reinforcing steel in the
same respective directions. The wave speed is then calculated in the
normal manner using the equivalent thin-walled steel pipe.
If the reinforced concrete pipe is pre-tensioned or post-tensioned, the
area of the concrete placed in compression must be included in the
transformed section. This pre-stressing makes the pipe much stronger,
but it also results in higher wave speeds which give higher water hammer cone. = $7,000 76000 = 4.4 x 106 psi
pressures. An example problem is worked out to illustrate the application
of the transformed section technique.
0.3752
Area of steel wire = 0.7854
Example 4-3 1.25 - 0.0884 sq. in/in.

A reinforced concrete pipe, 30 inches inside diameter, is prestressed In this example we will replace the cement lining (prestressed in
using 3/8-inch diameter wrapping wire placed 1.25 inches o.c. The pipe is compression) .by an equivalent area of steel.
42 UNSTEADY FLOW IN PIPELINES ELASTIC THEORY 43

consider this effect as water hammer progresses through the system.


4.4 x 106
0.75 = 0.110 sq. in/in. Because a simple, reduced, constant value of wave speed should not be
30 x 106

II
used in the standard analysis, further discussion of the analysis of water
Now the thickness of the equivalent steel pipe is hammer with entrained air will be deferred to Chapter VI.

4.4 Basic Differential Equations of Unsteady Flow


eeq = 0.105 +0.0884+0.110 = 0.303 in.
To this point we have shown that for a known given impulsive change
The wave speed is computed using Equation 4-18, case (b) restraint.
in velocity at a section in a pipeline, we can compute the pressure head
4720 change AH which will result. It now remains to expand this capability so
that we may find the velocity and pressure head at any pipe section at any
3 x 105 31.5 time as the result of boundary conditions imposed at sections either
1+, (1 -0.32)
30 x 10 6 0.303 within or at the extremities of the system.
To accomplish this we will employ the previously derived unsteady
If the effect of the cement lining is neglected, the wave speed is 2994 flow equation (Euler equation) and develop a second equation based on
fps. The engineer must make the judgment as to the proper wave speed to conservation of mass (continuity).
use or he must analyze the system under both conditions to determine the
Equation 2-4 is recopied here for convenience.
most extreme behavior.

Effect of Air Entrainment on Wave Speed

1—

N 1 co
dV .............................................. (4-24)

CPIQ?
dt
When free air occurs in a substantial portion of a pipeline, either as
small bubbles or in larger discrete lumps, the wave speed in the pipe is
decreased. As a consequence, the pressure extremes and the wave As before, the pipe wall friction will be difficult to evaluate directly.
propagation patterns are altered. Because we will be working with circular cylindrical pipes, we use the
The wave speed of the air-liquid mixture is computed as previously equation
done for a homogeneous liquid, but with the use of an average density for
the mixture. This approach implicitly assumes the mixture is evenly = i pfvivi
distributed throughout a significant portion of the pipe. The elasticity of
the liquid-air mixture is dramatically affected by a small amount of for relating wall shear to the Darcy-Weisbach friction factor. The peculiar
entrained air so the elasticity of both substances must be included. form of the velocity representation is introduced in the above equation to
Application of the momentum equation and conservation of mass point out how the proper shear force direction is preserved when the
leads to the following equation for wave speed from Tullis, Streeter and velocity reverses. If we had used V2 instead, then the negative velocity sign
Wylie [13], occurring on flow reversal would be lost in the squaring process.
^KjAve Substituting this equation into Equation 4-24 gives
(4-23)
Ko D £K dV +J_ ........................... (4-25)

Cfl | N
V|V| =

Q-J co

OIO
+
1 + -g- — C + (void fraction) dt p

OQ
olo

+
a

where the subscripts Z and a refer to properties of liquid and air, It is appropriate to point out at this time that both V and p are functions
respectively, and pave is the average density of the mixture. The value of of time t and location s along the pipe. The term 3z/3's is the slope of the
Ka is dependent on the thermodynamic process, e.g., for an isothermal pipe and can be written as the total derivative dz/ds. Equation 4-25 is an
process, Ka equals the absolute pressure. The void fraction is the volume equation with two dependent variables V (s,t) and p (s,t) hence, we need a
of air per unit volume of mixture at a given pressure. second equation relating the same dependent variables.
Unfortunately, the wave speed depends on the pressure because the To obtain this equation the conservation of mass is applied to a
void fraction is a function of pressure. Hence, an accurate analysis must control volume coinciding with the interior of the pipe and of length ds.
ELASTIC THEORY 45
44 UNSTEADY FLOW IN PIPELINES

Equation 4-27 becomes

dp 1 dA 9V
!{*)■« ........................ (4-28)

•to b-

+
dt A dt 9s

because ds, fixed to the pipe walls, varies only with time.
From the previous section,
d d
P - P
d¥ dp_
V p
Conservation of mass gives so

Q.
■—'I
=_L 22. .............................................................. (4-29)
AV- pAV + ^d(pAV)dsj =A (pAds) dt K dt
(4-26)
' g7^AV)ds = |r(PAds)
To develop a useful expression for dA/dt in terms of pressure, the
elastic pipe deformations must be considered. For stretching of the
At this point we employ a rather unusual form of the control volume cross-sectional area, Equation 4-10 is used to give
concept in that we permit the ends of the control volume to move
longitudinally with the pipe as it stretches. This device is employed dA = VZTTD2
because the pipe stretching affects the storage volume available and the
connection between pipe elasticity and the volume available for the fluid is
dA = -| (do2 - p do j)
identical to that developed in the previous section.
Expanding the parentheses of Equation 4-26 gives In evaluating the stresses we will again use case (b) restraint
- (pA ds + pV ds + AV-^- ds'j
1 9s 9s 9s I " dp £

= PATr<ds)+ ^ds + A ds-tr do-j = p da2


dt St St d0
so 2 -P do'i = (1 - P2) do2 = (1 - P2) dP
Regrouping and dividing by p Ads,
Finally,
-O ] —

a>[a>

Q-J|CU

(4-30)
+
+
<

|*t)

................................................ (4-27)
Considering longitudinal expansion,
Recognizing that d(ds) = de j ds
dp
75 I nJ

+v which for case (b) restraint is zero. So,


11
CO co
Qd co

Q.I +-

at

and
9A = dA ± A (ds) = 0 ........................................................................... (4-31)
+V
CO CO

St dt ds dt
co
. ..................... ............................... ............................... . ......

46 UNSTEADY FLOW IN PIPELINES

Combining all of these terms into Equation 4-28 results in

D dp

4-
>M
1 dp + (1-M2) =0
K dt eE dt
+(1 -^2) D
"Ol’O
pj
K
'•-*
eE

From Equation 4-17 it is clear that the term in brackets is l/(a2p).


This statement is true for case (a) and case (c) pipe restraint as well.
Substituting this term into the previous equation gives
V. Solution by Method
1 42. +a2 = 0 .................................................... (4-32)
of Characteristics
p dt
The history of water hammer analysis is marked by various clever and
We now have the necessary set of two simultaneous independent practical schemes for solving the Euler and Continuity Equations 4-33 and
partial differential equations which will enable us to solve for p (s,t) and V 4-34. The methods generally reflect the level of numerical analysis
(s,t). capability of their time as well as the ingenuity of the practitioners. It
remains, then, in the age of electronic digital computers, to bring their full
power to bear in solving more exactly and inexpensively these equations as
1 dp dz f ...................... (4-33) they apply to a wide range of problems.
V |V| = o
p ds ds 2D At present the most general and exact technique for solving this set of
equations is the method of characteristics. Fortunately this technique is
also very compatible with numerical solution by digital computer. For
................................................... (4-34) these reasons, this work will address only this solution approach and refer
the reader to other works such as Streeter and Wylie [1], Parmakian [6]
and Rich [4] for details on other analysis techniques.

5.1 Approximate Method of Characteristics

The Approximate Equations

In view of the likelihood that many engineers today are unfamiliar


with the method of characteristics as a solution technique, it seems
appropriate to introduce the method using approximate versions of
Equations 4-33 and 4-34. The approximate equations are obtained by
neglecting the spacial variation of V and p whenever both spacial and
time-varying terms appear in the same equation, because in general,
spacial variation is much less than time-varying variation.
In accordance with this approach, Equation 4-33 becomes

dz f .............................. (5-1)
S V|V| = 0
ds 2D

and Equation 4-34 becomes

47
..........................
48 UNSTEADY FLOW IN PIPELINES SOLUTION BY METHOD OF CHARACTERISTICS 49

1 3p

CM
5-2) Choosing A = -a as the other scale factor permits writing Equation

O.
>1 w
cd

4-
p at 5-4 as

The method proceeds by presuming that the pair of Equations 5-1 dV 1 dp dz


|V| = ...................................... (5-7)

4-
Cuj
and 5-2 may be replaced by some linear combination of themselves. Using dt ap dt ds
A as a linear scale factor, one combination is
Remember Equation 5-6 is good only when
+ 1 12 VIVI = 0-...(5-3)

4-

<<
II
4-
p 3s P at

and Equation 5-7 is good only when


Regrouping terms,
A = - a or -a
1 92

o
>
>
4-

+x ...(5-4)
QjICL’

£
4-
\p at The result of these manipulations is that we have replaced two partial
<z>

differential equations with two ordinary differential equations provided we


Note that follow certain rules which relate the independent variables s and t in each
case. If, in addition we replace p with y(H-z), then we can visualize better
av , 2 av . „ . , ,. , dv the propagation of the pressure waves because H is the height of the
+a — is to be replaced by A-?—
3t 8s dt EL-HGL above the datum. This substitution gives

then
dV £ dH ds .............. (5-8)
ID VM '0 only when

4-

4-
and dt a dt dt a
nJ -•-*

32 is to be replaced by 1
►*

+
>

8s
while
<<IQ.
II
— |Q.

then £ dH f
V |V| = 0 .............. (5-9)

4-
I
a dt 2D
Equating the expression for (ds/dt) in each case, we find
The fact that the relation between s and t in Equation 5-8 must satisfy
(ds/dt) = a, has caused the equation (ds/dt) = a to be called the
characteristic of Equation 5-8. A similar line of reasoning suggests that
or .................................................................................... (5-5) (ds/dt) = -a is the characteristic of Equation 5-9.
Because Equations 5-8 and 5-9 apply only along the appropriate
So both equations are satisfied if A = ±a. Arbitrarily picking A = +a characteristics, it is customary to view the situation graphically. This is
permits us to rewrite Equation 5-4 as done by drawing the s-t coordinate system (known also as the s-t plane),
determining the plot of the characteristics on this plane and thereby
deciding how to solve Equations 5-8 and 5-9.
In drawing the s-t coordinate axes, the origin of the s-axis (abscissa)
Dividing through by wave speed gives is placed at the upstream pipe end and extends in the positive direction
along the pipe for a distance L equal to the pipe length. Figure 5-1
1 dz f .................................. (5-6) illustrates how the s-t plane can be used to verify the occurrences that we
V |V| = 0
4-

CTQ

ap ds 2D observed in Figure 2-2.


4-
50 UNSTEADY FLOW IN PIPELINES SOLUTION BY METHOD OF CHARACTERISTICS 51

dV £ dH -3— = 0 where -a
dt a dt
Multiplying by (a/g) dt gives
dH = — dV
g

/-
along the C* characteristic. This equation is identical to the AH — (a/g)
Q
X x
x
X
X
AV equation derived earlier. Basically it means the change in H between
X
two points on the C’ characteristic can be computed from the change in

O
s=L velocity between the same two points. This result is the same conclusion
reached in Chapter II in Figures 2-2 and 2-3. The C" characteristic
Physical Configuration s-t Plane equation also gives
ds = - adt
Figure 5.1. The s-t plane for the simple pipe of Chapter II. which illustrates how long it takes information to travel between the two
points ds apart.
Now that some physical grasp of the meaning of Equations 5-8 and
5-9 is in hand, it seems appropriate to formalize the ideas more carefully.
In order to generate values of H and V at various selected locations in the
pipe as functions of time we must supply initial conditions along the s-axis
in the s-t plane and boundary conditions for all times at s = 0 and s = L.
Then, a solution for values of H and V can march upward on the s-t plane.
To see how the marching process occurs, examine Figure 5-2, which
is the s-t plane for some unknown problem. We know that at any point on
the s-t plane, say point P, the value of H and V is unique (i.e., the H and V
C values are independent of which characteristic they were approached
from). We also know that if we construct the C + and C" characteristics
through this point we have two ordinary differential equations which apply
-T- t along their respective characteristics. The ordinary differential equations
U

can now be expressed in finite difference form. Equation 5-8 becomes

VVLe „ g HP ' HLe fVLe lVLel


At

...................................

Le
►s 2D

ps
o

o
CO
I
CO-
CL
CO

Le Ri
As
(A
t>

and Equation 5-9 becomes


Figure 5-2, The s-t plane showing characteristics for Equations 5-8 and
5-9.
= 0 .............................. (5-11)

CL

4->
CL

O
2D

In the above equations, tp-0 in general is At, and when these equations are
A disturbance is caused by shutting the valve. The disturbance
multiplied by At they become
propagates upstream at speed a making the track shown on the s-t plane.
The negatively sloped dashed line is the negative or C' characteristic along
which Equation 5-9 applies. If friction is negligible, Equation 5-9 gives C+: (Vp-V^) 12)

bQ
+
52 UNSTEADY FLOW IN PIPELINES SOLUTION BY METHOD OF CHARACTERISTICS 53

and This procedure described for point P 2 can be continued ujitil the
values of H and V at points P2 through Pjq are calculated. The values of H
C-: (Vp-VR1)- f (Hp.HR1) + ^ vw IVR1I = 0 .................................... » and V at PpPjq+j must be calculated with the assistance of boundary
conditions. At the left hand end of the pipe (near s = 0) we have only the
C' equation relating conditions between s2 and sv The boundary
Each of the characteristic equations can be integrated to show that
condition at s2 (s = 0) must provide another equation in HPj and/or V Pj
As = a At ............................................................................. (5-14) to solve simultaneously with the C'equation. The same situation and
requirements exist at the downstream end of the pipe with the C+
Once we have committed ourselves to a finite difference numerical characteristic.
solution we must divide our pipe into a discrete number of sections and Once the boundary conditions are established, then velocities and
proceed accordingly. If we decide to divide the pipe into N sections, then total heads at all the grid points at t = At can be calculated. These values
each section will be As = L/N long. Now that As is fixed, At can be are now used to write new equations to solve for values of V and H at the
calculated. It is now possible to construct a grid of characteristics as next time step where t = 2At. This procedure is repeated until the solution
shown in Figure 5-3. has progressed the required amount of time. The result is a set of H and V
Grid points along the s-axis represent points spaced As apart along values at discrete time intervals for N + 1 locations along the pipe.
the pipe and the values of V and H at these points on the s-axis represent Finally, it is possible to generalize from our development some
initial conditions. Initial conditions are generally some steady state flow concepts on disturbance propagation. Because of our previous discussion
situation in the pipe. Picking a point P 2 in the pipe on the s-t plane, concluding that disturbances propagate along characteristic lines, we can
writing Equations 5-12 and 5-13 for the known Vj^ VRJ, HJ^, HRJ, f say that “zones of unawareness” can be identified on the s-t plane which
and D, it is clear the equations each have two unknowns. The two cannot be affected by disturbances occurring at a particular location and
equations can be solved easily for Hp2 and Vp . Note that the known time (see point S on Figure 5-4). Conversely, if a location along the pipe is
velocities are used to represent the friction term. To do otherwise would chosen and a time specified (point P), then no disturbances outside the
render the equations difficult to solve and would not noticeably improve portion of the s-t plane subtended by the C+ and C" characteristics
the solution except when friction losses are very large. In the exceptional through the point can influence values of V and H at the point.
case, an iterative procedure would have to be developed wherein friction
losses would depend on a velocity averaged over the time interval. Setting Up the Numerical Solution

In the previous section we have developed finite difference equations


which permit us to calculate values of H and V at predetermined
intersections of C+ and C" characteristics. The H and V values at the ends

t
I \ \/./ . . ,

u
Zone of Zone of Zone of
Unoworeness Unoworeness Unoworeness

Figure 5-4. Disturbance propagation on the s-t plane.


... .....

54 UNSTEADY FLOW IN PIPELINES SOLUTION BY METHOD OF CHARACTERISTICS 55

of the pipe were determined by using boundary conditions. It remains now The equation for Hp would be (from Equation 5-12)
to set up a solution procedure so that computer techniques can be used.
Looking first at solving Equations 5-12 and 5-13 for interior grid
intersections, we solve these two equations for Vp and Hp.
N+l

» fcro
4-
for any value of VpN+1 (including zero).
fat Constant speed pump boundary conditions — This boundary
2D 1)1 .................................. (5-15) condition offers the added complexity of a boundary condition containing
both H and V. This boundary condition equation must be solved
H
simultaneously with the C" Equation 5-13 to get equations for Hp, and
Ri)
Vp, •

4-
To keep the result uncomplicated at this time, we will assume the
head Hp put out by the pump can be adequately represented by a
16) tic equation

Q*
3
..................................

cd
45
= A'Q2 +B'Q+C'

CL
The boundary conditions at each end of the pipe are comprised of
externally imposed conditions of velocity and/or pressure head. To assist where Q is the discharge through the pump. The Q’s in this equation can
in understanding how to handle boundary conditions, it is best to examine be replaced by VP, x A and the head increase Hp can be added to the
a few common ones. supply sump H-value to give Hp, . The modified pump equation can now
Reservoir boundary condition — Where a pipe exits from a reservoir, be written:
the H-value remains constant for all time (neglecting velocity head). This
fact is symbolized in equation form as = A Vp + B Vp + C .................................................... (5-21)
............................................................................. (5-17) where C includes the H-value of the sump. It is important to point out at
this time that if this curve is to be concave downward and always slope
This equation is solved simultaneously with the C' Equation 5-13 to downward with increasing Q (generally it should do this), then A < 0, B <
yield an expression for velocity 0 and C > 0. These signs will be used subsequently when computerizing
this procedure.
When Equation 5-21 is solved simultaneously with the C" Equation
............................ (5-18) 5-13, the elimination of Hp gives

-V2-{ (AVp’ +BV V2|V,| = 0 ...(5-22)


If the pipe were discharging into a reservoir, then the same approach
would yield an appropriate downstream boundary condition.
Velocity boundary condition — If the velocity were known to vary in Rearranging, we get
some prescribed fashion at the downstream end of a pipe, an expression
for H could be found. For example, suppose a valve were closed in a
manner which caused the velocity to decrease linearly from V o to zero in + -&C-&-H, - f At
oq era

aa2 2D O..(5-23)
Tc seconds. The equation for Vp would be

=V
t1 ’ Tj ’ 0<t<T Using the formula for solving quadratic equations, V P, can be found.
o1 c Back substitution into Equation 5-21 will give the value of Hp .
N+l ....................................(5-19)
As a sidelight, it is interesting to note that if a check valve were
=0 t>T installed downstream of the pump, we would have to check the sign of
N+l c
56 UNSTEADY FLOW IN PIPELINES SOLUTION BY METHOD OF CHARACTERISTICS 57

VPj. If VPj were negative, we would change to VPj =0 and calculate collection of known terms by a single symbol. In this case, looking first at
Hpj from Equation 5-13, not Equation 5-21. the C‘ characteristic, from Equation 5-25,
Computerizing the Numerical Procedure = c, +C2H .......................................... (5-28)
The problem solving approach we have used is relatively easily where
computerized. If a pipe of length L is divided into N sections, the node
= V„ - £ f At V2|V2|
points between sections can be numbered sequentially from 1 to N + 1

ns
2D
beginning at the upstream end. Keeping in mind the parallel between the
subscripts in our equations and the indices of subscripted variables in C2 = g/a
computer programs, we rewrite Equations 5-12 and 5-13 as
Of course, in the computer Ct and C2 are just numbers

CD
</)
p
c
calculated using known values from the previous time step.
f At ........... (5-24) Combining Equation 5-28 with Equation 5-21 to eliminate
ns kra

4-
+

2D

and = A Vp + B Vp + C

.......... Preparing the equation in standard quadratic form,


c■ v«) -f '"p, • )+-yr VHI IVM i = o..................... (5-25)

The equations for interior values of Vp and Hp (Equations 5-15 and 5-16)
=0
are now written

- I KH
+
p kra

Letting C3 = and C4 the above equation becomes


• 2D-(vnlvHltVMlvMl)l ................................................... <S-
26> ............................................................................... Vp +C3Vp +r C4 = 0
r
l l ........................................................ (5-29)

p, ’y «Hi.i+IW +|<v1.rvm) The solution is

............................. -c3 ±
-.-^(VHIVH l-VwIVw()] .............................................. (5-27)

II
-4
for 2 i N. For the boundary conditions previously posed, the resulting C4
or in another form
Equations 5-17, 5-18, 5-19 and 5-20 must be similarly modified where
required. However, when certain boundary conditions require simulta-
neous solution of two equations to obtain H and V values, the algebra
............................... (5-30)
must be performed by the engineer and prepared for the computer. An

CD tO
appropriate illustration of this technique (which will be used many times
in succeeding sections) is the boundary condition for a constant speed It remains only to determine which of the “±” signs to use.
pump which led to Equation 5-22. Because this decision will have to be made in several other instances,
Constant speed pump (computerized) — For purposes of algebraic it is appropriate to discuss it in detail now. We begin by determining the
manipulation it is convenient to simplify the equations by representing a signs (where possible) of the C-terms. From Equation 5-28
..

58 UNSTEADY FLOW IN PIPELINES SOLUTION BY METHOD OF CHARACTERISTICS 59

Cj = unknown sign
C2 = (+) 2
3
C PROGRAM NO. 1
C APPROXIMATE WATER HAMMER PROGRAM FOR A SIMPLE PIPE
From the previous section on the pump curve, 4
c
5
6 C — RESERVOIR AT UPSTREAM END —

< cq O
II II II
7 C — VELOCITY DECREASES LINEARLY WITH TIME TO ZERO AT DOWNSTREAM END —
8 C
9 C IOUT = INDEX WHICH GIVES AN OUTPUT EVERY IOUT-TH TIME STEP
10 C NPARTS = NUMBER OF PARTS INTO WHICH PIPE IS DIVIDED
11 C L = PIPE LENGTH-FT D » PIPE DIAM-IN F » DARCY-WEISBACH F-VALUE
12 C VZERO = VELOCITY-FPS A » WAVE SPEED-FPS HZERO » RESERVOIR ELEV-FT
From the definition equations for C3 and C , 13 C
C
ELEVUP » ELEVATION OF UPSTREAM END OF PIPE-FT
ELEVDN = ELEVATION OF DOWNSTREAM END OF PIPE-FT
14
15 C TMAX = MAXIMUM REAL TIME OF SIMULATION-SEC
16 C TCLOSE « TIME REQUIRED FOR VALVE CLOSURE-SEC
o

17 C
18 DIMENSION X(20),V(20),H(20),HLOW(20),HHIGH(20),HEAD(20),
19 $VNEW(20),HNEW(20),PIPEZ(20)
20 REAL L
(+) + (unknown)L , . A 21
NAMELIST /SPECS/ IOUT,NPARTS,L,D,F,A,VZERO,HZERO,ELEVUP,ELEVDN,
------- = (unknown) 22
STMAX,TCLOSE
READ(5,SPECS)
23
A

II

PI = 3.141592
24
WTT-L/A
25
DELL=L/NPARTS
We conclude C3 is always positive and we are not sure of the sign of C4. 26
T=0 .
27
DELT=DELL/A
Equation 5-30 can be written in terms of signs as 28
C=32.2/A
29 INDEX«TMAX/DELT + 1
30 DELEL’(ELEVDN-ELEVUP)/NPARTS
31 NODES»NPARTS+1
32 WRITE(6,200)
(sign Vp ) = (+) 33 WRITE(6,201) IOUT,NPARTS,L,A,D,F,VZERO,HZERO,ELEVUP,ELEVDN,
r
i 34 $WTT,TCLOSE,TMAX,DELT
35 AK=12»*F*DELT/(2•*D)
36 DELHF=12.*F* DELL*VZERO** 2/(64.4*0)
37 DO 300 1 = 1,NODES
38
At the beginning of the unsteady flow process, V p t is positive, hence, we 39
V(I)=VZERO
B(I}=HZERO-(1-1) *DELHF
should be able to get some positive values from this equation. This can 40
41
HLOW(I)«H(I)
HHIGH(I)=H(I)
only be true if [ ] = (+). Because we would like to also permit negative 42
43
X(I)=(1-1)*DELL/L
PIPEZ(I)=ELEVUP+(1-1)*DELEL
velocities to occur occasionally, then [ ] = (-) must be possible. Because 44 HEAD(I)«H(I)-PIPEZ(I)
45 300 CONTINUE
the square root is always (+), the only way that [ ] can be both positive 46 WRITE(6,202)
47 WRITE(6,204) T,(X(I) ,HEAD(I) , H( I) ,V(I) ,1 = 1 ,NODES)
and negative would be that if the (+) sign in the (±) were used. This line of 48 DO 99 11=1,INDEX
49
reasoning leads us to the final form of the equation 50 C
T=T+DELT
** COMPUTE II AND V AT INTERIOR NODES **
51 DO 20 1=2,NPARTS
52 VNEW(I)=0.5*(V(I-l)+V(1+1)+C*(H(1-1)-H(1+1))-AK*(V(I-1)*ABS(V(I-1)
S)+V(1+1)*ABS(V(1+1))))
4C, 53
54 20 HNEW(I) =0.5* (II (1-1) +H(I + 1) + (V( I-1)-V(l+1) )/C-AK* (V(I-l) *ABS (V(I-l)
..................... (5-31) 55 $)-V(I+l)*ABS(V(I+1)))/C)
U> K>

C ** COMPUTE H AND V AT UPSTREAM END **


o

56
57 C — THIS BOUNDARY CONDITION IS FOR A CONSTANT-HEAD RESERVOIR —
58 KNEW(1)=HZERO
and 59 VNEW(1}=V(2)+C*(HNEW(1)-H(2))-AK*V(2)*ABS(V(2))
60 C ** COMPUTE H AND V AT DOWNSTREAM END **
61 C — THIS BOUNDARY CONDITION IS FOR LINEARLY DECREASING VELOCITY —
..................... (5-32) 62 IF(T.GT.TCLOSE) GO TO 30
63 VNEW(NODES)=VZERO*(1,-T/TCLOSE)
64 GO TO 31
65 30 VNEW(NODES)=0.0
Again, if we were to install a check valve to prevent backflow 66 31 HNEW (NODES) =11 (NPARTS) + (V (NPARTS) - VNEW (NODES) - AK*V ( NPARTS) *
SABS(V(NPARTS)))/C
through the pump, we would have to test V and, if negative, set VPj = 67
68 DO 50 1 = 1 ,NODES
IF(HNEW(I).LT.HLOW(I)) BLOW(I)=HNEW(I)
0. We could then go ahead and calculate Hpj from Equation 5-32. 69
70 IF(HNEW(I).GT.HHIGH(I)) HHIGH(I)=HNEW(I)
However, we could not use Equation 5-21 to compute Hp , because the 71
50 -HEAD(I)=HNEW(I)-PIPEZ(I)
IF(MOD(II,IOUT} .EQ.0) WRITE(6,204) T, (X (I) ,HEAD(I) ,HNEW(I) ,VNEW(I)
72
check valve has isolated the pump from the pipeline. 73
S,1=1,NODES)
IF(T.GT.TMAX) GO TO 400
74
DO 40 1=1,NODES
75
V(I)=VNEW(I)
The Basic Computer Program 76
40 H(I)=HNEW(I)
77
99 CONTINUE
78
79
A basic computer program which can be modified to suit a number of Figure 5-5. Computer program for approximate water hammer in a
different situations is presented in Figure 5-5. The program has simple pipe.
60 UNSTEADY FLOW IN PIPELINES SOLUTION BY METHOD OF CHARACTERISTICS 61

Example 5-1

80: 400 iVRITE ( 6,205)


81: DO 401 1=1,NODES
82 : HEADMX=HHIGH(IJ-PIPEZ(I)
8 3: HEADMN»HLOW(I)-PIPEZ(I)
84: 401 WRITE(6,206) X(I),HEADMX,HEADMN,HHIGH(I),BLOW(I)
85: C
86: 200 FORMAT(1H1 , 19X, 33(1 * 1)/20X,'* WATER HAMMER III A SIMPLE PIPE ‘'/
87: S20X,33('*')) 715.5'^
201 FORMAT(///29XINPUT DATA'/29X,10('-')//28X,'IOUT '',I3/26X,'NPART
88: 700

4
a
89: >S ,I3//31X,’L =■,E7.1,' ET'/31X,'A -',E7.1 , ' EPS'/
90: S31X,'D =',F7.2,' IN'/31X,'F ,F6.4//
91: S27X,'VZERO -',E7.2,' FPS'/27X,'HZERO -',F7.1.' FT'/
92: 326X,’ELEVUP »’,F7.1,' FT'/26X,'ELEVDN =',F7.1,‘ FT’//
93: S29X,'L/A »’,F7.3,1 SEC*//26X,’TCLOSE «',F7.2,’ SEC*/
94 : 528Xf'TMAX =’,F7.2,' SEC'/28XDELT »',F7.3,' SEC')
95: 202 FORMAT(lHl/’ PRESSURE HEADS, H-VALUES AND VELOCITIES AS FUNCTIONS
96: 3 OF TIHE'/2X,60(’-’))
97: 204 FORMAT(//18X,3(5X. ' X HEAD-ET H-FT V-FPS')/' TIME ='.F7.3,
98: S’ SEC',3(5X,’ --------------------------------------------------- ---------------- *)/(18X,3(5X,F5.3,2F7»0,
99 : SF8.2)))
100: 205 FORMAT(1H1/18X,27('*')/18X* TABLE OF EXTREME VALUES **/18X,27(“
101: S')//13X,’X MAX HEAD MIN HEAD MAX H MIN H'/11X , 5( ' - *) ,2X , 8 (
102: S'-') ,2X,8(*-') ,2X ,6 c-') ,2X,6 (’-*))
103: 206 FORMAT (1IX , F5.3,2X , F7.0,3X , F7.0,3X , F6.0 , 2X , F6.0)
104: END

Figure 5-5. Continued.

NAMELIST input because of the ease of reading the data cards that have
been punched. The input parameters are listed in the program under the
NAMELIST /SPECS/ statement and each parameter is defined in The 30-inch steel pipe has a wave speed of 4060 fps and an initial
COMMENT statements at the beginning of the source program. velocity of 5.0 fps. The valve is closed in a manner which causes the
In this basic version of the program, the user must make his own velocity to flow at the valve to decrease linearly with time to a value of zero
steady state hydraulic computations to determine discharges, friction in 1.0 seconds. There is initially negligible head loss in the valve.
factors and EL-HGL location. These values of steady state conditions are Find the maximum pressure head in the system which would occur in
then input into the program to establish the required initial conditions. the first 4.0 seconds after closure begins.
In summary, the program reads in the basic information, generates Solution — If the pipe is divided into 5 sections and if the steady state
steady state H and V values at the grid intersection points (nodes) along hydraulics have been established, it remains only to set up the data for the
the pipe and then begins the unsteady flow calculations. The interior grid computer.
intersection points are first calculated using Equations 5-26 and 5-27. The
upstream and downstream boundary conditions are used to get values of
Hp and Vp at each end of the pipe. The whole process begins again using
the just-computed values of Hp and Vp as the known values. The process
continues to “loop” until the time has reached TMAX. Before execution is DATA CARDS
terminated, “envelope” values of H are printed for each node. These
values are the highest and lowest values of H and pressure head computed
SSPECS IOUT»1,NPARTS-5,L»5000.,D»30.,F«.020,A=4060.,VZERO»5.00,
at each point during the analysis. HZERO®715.5,ELEVUP®100,,ELEVDN»50•,TMAX«4.0,TCLOSE*1«0
SEND
To simulate transient problems with other boundary conditions, it is
necessary only to change those parts of the program listed under upstream
and downstream boundary conditions. Occasionally the input to the The computer output is listed below. A quick scan of the Table of
program must be altered to include new parameters, however, the basic Extreme Values shows the maximum pressure head was 1292 ft at the
program architecture remains the same. valve.
To illustrate the use of the program, we will consider an elementary
example.
62 UNSTEADY FLOW IN PIPELINES
*********************************
* WATER HAMMER IN A SIMPLE PIPE *
*********************************

INPUT DATA

IOUT = 1
NPARTS = 5


L 5000.0 FT
A= 4060.0 FPS
D= 30.00 IN
F
- .0200

VZERO = 5.00 FPS


HZERO = 715.5 FT
ELEVUP = 100.0 FT
ELEVDN = 50.0 FT

L/A = 1.232 SEC

TCLOSE 1.00 SEC


TMAX = 4.00 SEC
DELT = .246 SEC

PRESSURE HEADS, H-VALUES AND VELOCITIES AS FUNCTIONS OF TIME

HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


X HEAD-FT H-FT V-FPS
TIME = .000 SEC
.000 615. 715. 5.00 622. 712. 5.00 .400 629. 709. 5.00
636. 706. 5.00 643. 703. 5.00 1.000 650. 700. 5.00
.600

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME - .246 SEC
• 000 615. 715. 5.00 .200 622. 712. 5.00 .400 629. 709. 5.00
636. 706. 5.00 643. 703. 5.00 805. 855. 3.77
.600 .800 1.000

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME = .493 SEC
• 000 615. 715. 5.00 .200 622. 712. 5.00 .400 629. 709. 5.00
636. 706. 5.00 798. 858. 3.77 961. 2.54

SOLUTION BY METHOD OF CHARACTERISTICS


.600 .800 1.000 1011.

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME = .739 SEC
.000 615. 715. 5.00 .200 622. 712. 5.00 .400 629. 709. 5.00
790. 3.78 952. 2.55 1117. 1167. 1.31
.600 860. .800 1012. 1.000

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME =
.985 SEC
.000 615. 715. 5.00 .200 622. 712. 5.00 .400 783. 863. 3.78
944. 1014. 2.56 1109. 1169. 1.32 1273. 1323. .07
.600 .800 1.000

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


=
TIME 1.232 SEC
.000 615. 715. 5.00 .200 775. 865. 3.79 .400 936. 1016. 2.56
1170. 1.33 1265. 1325. .09 1285. 1335.
.600 1100. .800 1.000 • 00

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME 1.478 SEC
.000 615. 715. 2.59 .200 928. 1018. 2.57 .400 1092. 1172. 1.34
1256 . 1326. 1276. 1336 . 1336.
.600 .10 .800 .01 1.000 1286. .00

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME 1.724 SEC
.000 615. 715. .16 .200 932. 1022. .15 .400 1248. 1328. .11
.600 1268. 1338. .02 .800 1277. 1337. .01 1338. .00
1.000 1288.
X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS
TIME 1.970 SEC
=

UNSTEADY FLOW IN PIPELINES


.000 615. 715. -2.28 . 200 935. 1025. -2.29 .400 1108. 1188. -1.16
1269. 1339. 1279. 1339. 1289. 1339.
.600 .02 .800 .01 1.000 • 00

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME = 2.217 SEC
.000 615. 715. -4.74 .200 791. 881. -3.59 .400 956. 1036. -2.37
1190. -1.18 1340. 1291. 1341.
.600 1120. .800 1280. .01 1.000 • 00

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME 2.463 SEC
=
• 000 615. 715. -4.90 .200 638. 728. -4.82 .400 804. 884. -3.60
968. 1038. -2.38 1131. 1191. -1.19 1292. 1342.
.600 .800 1.000 .00

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME = 2.709 SEC
.000 615. 715. -4.89 .200 629 . 719. -4.90 .400 651. 731. -4.82
-3.61 980. 1040. -2.39 992. 1042.
.600 816. 886. .800 1.000 .00

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT. H-FT V-FPS


TIME = 2.956 SEC
.000 615. 715. -4.90 .200 629. 719. -4.89 .400 642. 722. -4.90
664. 7 34. -4 .82 677. 737. -2.41 689. 7 39.
.600 .800 1.000 .00

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME 3.202 SEC
=
.000 615. 715. -4.89 .200 629. 719. -4.90 .400 642. 722. -4.89
504. 574. -3.70 374. 434. -2.42 384. 434.
.600 .800 1.000 .00

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME 3.448 SEC
=
.000 615. 715. -4.90 .200 629. 719. -4.89 .400 492. 572. -3.71
• 600 353. 423. -2.50 • 800 211. 271. -1.29 1.000 80. 130. .00

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME = 3.695 SEC
.000 615. 715. -4.89 .200 479. 569. -3.71 .400 341. 421. -2.51
.600 200 . 270. -1.30 59. 119. 59. 109.
.800 -.08 1.000 .00

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME = 3.941 SEC ----------- --------------------- — —
.000 615. 715. -2.54 .200 329. 419. -2.52 .400 188. 268. -1.31
.600 48. 47. 107. 58.

SOLUTION BY METHOD OF CHARACTERISTICS 65


118. -.10 1.000 108. .00
.800 -.01

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME = 4.187 SEC
.000 615. 715. -.16 .200 325. 415. -.15 .400 36. 116. -.11
.600 36. 106. -.02 .800 47. 107. -.01 1.000 56. 106. .00

***************************
* TABLE OF EXTREME VALUES *
***************************

X MAX HEAD MIN HEAD MAX H MIN H

.000 615. 615. 715. 715.


.200 935. 325. 1025. 415.
.400 1248. 36. 1328. 116.
.600 1269. 36. 1339. 106.
• 800 1280. 47. 1340 . 107.
1.000 1292. 56. 1342. 106.
66 UNSTEADY FLOW IN PIPELINES SOLUTION BY METHOD OF CHARACTERISTICS 67

5.2 Complete Method of Characteristics

>
4-

>
II

ex
In solving the complete equations, we can proceed in a manner
similar to that for the approximate method. However, we will use the The final set of equations which compare with Equations 5-8 and 5-9 are,
complete equations of Euler and Continuity 4-33 and 4-34.
after replacing p with y(H - z),
The Complete Equations
+. ffH. V — V |V| = 0 only if = V + a • • (5-33)
Again the multiplier A is used to combine the two partial differential dt a ds

4-
P fa
equations. Multiplying A by Equation 4-33 and adding the result to
Equation 4-34 gives

dz 1 dp C-: dV-^dH + i-v^ V|V| = 0 only if A = V-a ..(5-34)


4-

^<| Q.
to)
CU

CO ko
>”
|V| a2 dt a dt a ds

o
OD

4-
4-

ds
CO
c/3

ex
To carry forth the same procedure as was used previously, we must break The ordinary differential equations are quite similar to those for the
dV/dt and dp/dt down into component parts. The result is approximate case. However, the important distinction is that the
characteristic lines on the s-t plane, which were of constant slope before,

CO | CO

CX CX
oo | N

Xg IV | a2 are now curved and their slope is a function of V(s,t). This result
<x|a;
4-

4-

+
w fa

introduces some complications into the numerical solution procedure


which must be addressed.
"O 11—

<73 fa
^l<
4-

4-
S’fe’

o
II
1

The Numerical Solution


Regrouping terms in the equation in a particular manner,
The numerical solution procedure first assumes that we can
(XV + a ) 2 3V 1 dp approximate the characteristic curves as straight lines over each At time
4-

4-

ds interval. This assumption appears to be promising because a » V;


however, it should be carefully noted that the slope of each characteristic
VIVI = 0 is generally slightly different than that of any other. The problem this
4-

creates in the finite difference approximation to the differential equations


as before,
can be seen on Figure 5-6. This grid size As by At has been set (we will see
how, shortly) and once again the procedure is to find the value of V and H
at P. The curved characteristics intersecting at P are approximated by
straight lines. The slope of the straight lines is determined by the known
value of velocity at the earlier time. It is important to note that the
1 dp dp 1 dp 1 ds
■OK
t>l>'

characteristics passing through P do not pass through the grid points L e


+

P dt ds P dt 1 P dt
and Rj, but pass through the t = constant line at points L and R
Rewriting the restriction equations for ds/dt, somewhere in between.
ds v , a2 ds . J_, In this case the finite difference approximation to Equations 5-33 and
dF V+yandir=X + V 5-34 becomes

Equating the two expressions for ds/dt and solving, we get again
Vp-V -£V f ..........
T
X=±a a L ds 5-35)

4-
At At 2D
Our characteristic equations are, in this case,
68 UNSTEADY FLOW IN PIPELINES SOLUTION BY METHOD OF CHARACTERISTICS 69

where
t

Ax
At
Solving for VL and HL gives

V
P L=

+
<
n
and

< Le Ri

L
b R1
As As
Substituting the value of (Ax/At) = a + VL gives
------------- ►
Figure 5-6. Interpolation of H and V values on a As - At grid.
............................................. (5-37)

and

H
The difficulty, of course, is that the values VL> HL, VR, HR are not C+7HHL -Hc)(a + VL) .................................... (5-38)
known. However, the values of VLe, HLe, VR, , HRj , Vc and Hj. are
known. The unknown values of H and V at points L and R can be
estimated by interpolation. In this case, we will use linear interpolation A similar analysis for the C' characteristic gives
and the sketch below illustrates the relationships.

n.
X
and
...................................
H
R’Hc + £<HR|-Hc,(a’V«) ...................................................................................... ,M01

Because (At/As) (VRJ - V^) is of the order V/(a+V) which is very small
compared to 1, it is a good approximation to neglect the second terms in
the denominators of Equations 5-37 and 5-39. The result is

.............................................. (5-41)
and
H
Ax L-HC
............................................. (5-42)
As
70 UNSTEADY FLOW IN PIPELINES SOLUTION BY METHOD OF CHARACTERISTICS 71

The simultaneous solution of Equations 5-35 and 5-36 for Vp and Hp where max |a+V| is the maximum expected absolute value of the sum of
gives the wave speed and flow velocity. If locations of points R and L fall outside
the grid points Le and Rj, numerical stability problems and accuracy
problems begin to develop. (See Art. 5-3.) These problems are associated
(VL + VR) + f (HL - HR) +f At (VL - VR) sin 6
with the previous discussion on “zones of unawareness,” i.e., where points
R and L fall outside the grid points, information from the zone of
unawareness is influencing the values of Hp and Vp. This is improper
numerical procedure, because the disturbances have not had time to reach
point P. As a result, this occurrence must be guarded against to prevent
inaccurate results.

a. fAt (VLIVLI-VRIVR|) .......................................... (5-44) The Computer Program


g 2D
The computer program for the complete method of characteristics
where sin 0 = dz/ds (positive for pipes sloping upward in downstream solution is similar in most respects to the program used with the
direction). approximate method. The main differences occur in the requirements to
include pipe slope in the equations and to include the linear interpolation
The As - At Grid procedure applied to the characteristics. The computer program is shown
in Figure 5-7 with the changes from the approximate method program
Because of the variable curvature of the characteristics and because blocked out.
we have decided to represent each as a straight line over small time Comparison with the approximate method of analysis suggests that
intervals, we are faced with the problem of computing As and At. It should for situations where a » V, the approximate and complete methods give
be recognized that it is always possible to compute a As and At which, for a essentially the same results. One might ask why the complete method be
given piece of characteristic, will lead to no interpolation. However, it is used at all. The answer is, in more complex piping systems the matching
also obvious that the consequences of this approach is a confusing array of of internal boundary conditions requires an interpolation procedure on
As’s and At’s which would render it impossible to keep track of where and the s-t plane regardless of the method used. The rationale is to use the
when things are happening. complete equations because they already have the interpolation procedure
It seems more appropriate to select a uniform grid in space and time built in and entail only a minor amount of extra computation. Further,
which will minimize interpolation and retain all the advantages of they include the effect of sloping pipes, if that is important.
simplicity of programming and data interpretation associated with the
approximate method. This method is referred to as the rectangular grid 5.3 Some Effects of Parameters on Solution Results
method. The logical procedure to follow seems to be to integrate the
characteristic equations holding V constant (corresponds to our earlier It is informative and useful to see the effects on solution results of
assumption of constant slope). The result is two equations for the some of the parameters of the problems. The results analyzed here show
characteristics the effect of friction, the number of parts into which the pipe is divided,
the slope of the pipe and the effect of slower varying of velocity. Also a
As = At lv+aI demonstration of numerical instability and interpolation inaccuracy is
As = At IV-a| given.

The value of As is still determined by the number of sections into which we Effect of Friction
have chosen to divide the pipe. Because our interpolation procedure
implies that the points R and L are between points Rj and Le, we must The effect of friction will be examined by looking at a simple pipe and
choose At so small as to guarantee this always occurs. The above equations seeing how various amounts of friction effect the pressure extremes in the
suggest that pipe. The model system used is shown in Figure 5-8.
The results of three runs with different velocities which cause
At < ------ — ........ ......................................................... (5-45) different frictional losses are shown in Table 5-1. It appears that one can
max |a + VI
72 UNSTEADY FLOW IN PIPELINES SOLUTION BY METHOD OF CHARACTERISTICS 73

73 : GO TO 31
74: 30 VNEW(NODES)=0.0
75: 31 VL=V (NODES)+DTDS*A* (V (NPARTS)-V~(NODES) ) ’
C PROGRAM NO. 2 76: HL»H(NODES)+DTDS*(H(NPARTS)-H(NODES))*(A+VL)
2:
77: HNEW(NODES)«H(NPARTS)+(V(NPARTS)-VNEW(NODES)-AK*V(NPARTS)*
3: C COMPLETE CHARACTERISTICS METHOD PROGRAM FOR A SIMPLE PIPE
78: SABS (V (NPARTS) ) )/C+DELT*VL*SINE ___________________________________________
79 : DO 50 1=1,NODES
c
80: IF(HNEW(I).LT.HLOW(I)) HLOW(I)=HNEW(I)
6: C — RESERVOIR AT UPSTREAM END —
81: IF(HNEW(I).GT.HHIGH(I)) HHIGH (I)-HNEW(I)
7: C — VELOCITY DECREASES LINEARLY WITH TIME TO ZERO AT DOWNSTREAM END —
82: 50 HEAD(I)»HNEW(I)-PIPEZ(I)
8; C
83: IF(MOD(I I,IOUT).EQ.0) WRITE(6,20 4) T,(X(I) , HEAD(I) ,HNEW(I) ,VNEW(I)
9 : C IOUT - INDEX WHICH GIVES AN OUTPUT EVERY IOUT-TH TIME STEP
84 : S,1=1,NODES)
10: C NPARTS » NUMBER OF PARTS INTO WHICH PIPE IS DIVIDED
8 5: IF(T.GT.TMAX) GO TO 400
11: C L = PIPE LENGTH-FT D = PIPE DIAM-IN F - DARCY-WEISBACH F-VALUE
86 : DO 40 1=1,NODES
12: C VZERO = VELOCITY-FPS A - WAVE SPEED-FPS HZERO ~ RESERVOIR ELEV-FT
87: V(I)=VNEW(I)
13: C ELEVUP » ELEVATION OF UPSTREAM END OP PlPE-FT 88 : 40 H(I)=HNEW(I)
14 : C ELEVDN » ELEVATION OF DOWNSTREAM END OF PIPE-FT 89: 99 CONTINUE
IS; C THAX • MAXIMUM REAL TIME OF SIMULATION-SEC 90 : 400 WRITE(6,205)
16: C TCLOSE = TIME REQUIRED FOR VALVE CLOSURE-SEC 91: DO 401 1 = 1 ,NODES
17: C 92: HEADMX-HHIGH(I)-PIPEZ(I)
18: DIMENSION X(20),V(28),H(20),HLOW(20),HHIGH(20),HEAD(20), 93: HEADMN=HLOW(I)-PIPEZ(I)
19 : SVNEW(20) ,HNEW(20) , PIPEZ(20) 94 : 401 WRITE(6,206) X(I),HEADMX,HEADMN,HHIGH(I),BLOW(I)
20: REAL L 95:
21: NAMELIST /SPECS/ IOUT,NPARTS,L,D,F,A,VZERO,HZ ERO,ELEVUP,ELEVDN, 96: 200 FORMAT(1H1,19X,33(’*')/20X,'* WATER HAMMER IN A SIMPLE PIPF *’/
22: STMAX,TCLOSE 97: S20X,33('*'))
23 : READ(5,SPECS) 201 FORMAT(///29X,1 INPUT DATA‘/29X,10('- 1)//28X,’IOUT =’ ,I3/26X,1NPART
98:
24: PI = 3.141592 $S =',I3//31X,1L =’,F7.1,' FT'/31X,'A =’,F7.1,' FPS1/
99:
25: WTT»L/A S31X,'D =’,F7.2,' IN’/31X,'P =',F6.4//
100 :
26: T=0 . S27X, ‘VZERO -'^7.2,’ FPS '/27X , ‘ HZERO =’,F7.1,' FT'/
101:
27: C=32.2/A S26X,'ELEVUP =‘,F7.1,’ FT‘/26XELEVDN =',F7♦1,’ FT1//
102:
28: DELEL«(ELEVDN-ELEVUP)/NPARTS $29X,'L/A »',F7.3,' SEC'//26X,'TCLOSE =’,F7.2,' SEC'/
103:
29: DELL°L/NPARTS _________________ 104: S28X,’TMAX «‘,F7.2, 1 SEC'/28X,'DELT =',F7.3,‘ SEC*)
30 : 202 FORMATCIHI/' PRESSURE HEADS, H-VALUES AND VELOCITIES AS FUNCTIONS
DELT-DELL/(A+VZERO) 105:
31: $ OF TIME'/2X,60(*-'))
DTDS’DELT/DELL 106 :
32: 204 FORMAT(//18X,3(5X,' X HEAD-FT H-FT V-FPS')/' TIME =',F7.3,
SINEaDELEL/DELL _______________ 107:
33: S' SEC',3(5X,' --------------------------------------------------- ---------------- 1 )/(18X.3 (5X,F5.3,2F7.0,
INDEX-TMAX/DELT + 1 108: SF8.2)))
34 :
NODES-NPARTS+1 109 : 205 FORMAT(1H1/18X,27('*’)/18X* TABLE OF EXTREME VALUES *'/18X,27('*
35:
WRITE(6,2O0) 110: S’)//13X,’X MAX HEAD MIN HEAD MAX H MIN H'/l1X,5('-') , 2X , 8 (
36:
WRITE(6,201) IOUT,NPARTS,L,A,D,F,VZERO,HZ ERO,ELEVUP,ELEVDN, 111: $'-'),2X,8(*-'),2X,6(*-*),2X,6(’-’))
37:
SWTT,TCLOSE,TMAX,DELT 112: 206 FORMAT(11X,F5.3,2X,F7.0,3X,F7.0,3X,F6.0,2X,F6.0)
38:
AK = 12.*F*DE LT/(2.*D) 113: END
39 :
DELHF=12.*F*DELL*VZERO** 2/(64.4*D) 114:
40 :
41: DO 300 I-l,NODES
4 2: V(I)=VZERO
43: H(I)-HZERO-(1-1)*DELHF Figure 5-7. Continued.
44: HLOW(I)»H(I)
45: HH IGH(I)= H(I)
46: X (I) = ( I-1)*DELL/L
47: PIPEZ(I)=ELEVUP+(I-l)*DELEL
48: HEAD(I)=H(I)-PIPEZ(I)
49 : 30e CONTINUE
WRITE|6,2«2)
v
50 :
51: WRITE(6,20 4) T, (X(I), HEAD(I) ,H ( I) ,V(I) , 1 = 1 , NODES) EJ=lHGL_
52: DO 99 11=1,INDEX
53: T=T+DELT
54 : C ** COMPUTE H AND V AT INTERIOR NODES **
55: DO 20 I=2,NPARTS _____________________________________________________________________
56 : VL=V(I)+DTDS*A*(V(I-l)-V(I))
57 : VR = V(I)+DTDS*A *(V(I + 1)-V(I))
58 : HL=H(I)+DTDS*(H(I-l)-H(I))*(A+VL)

2000
59 : HR=H(I)+DTDS*(H(1+1)-H(I))*(A-VR)
60: VNEW(I)=0.5*(VL+VR+C*(HL-HP)+C*DELT*(VL-VR)*SINE-AK*(VL*ABS(VL)+
o
61: SVR*ABS(VR)})
62: 20 HNEW(I)=0.5*(HL+HR+(VL-VR)/C+DELT*SINE*(VL+VR)-(AK/C)*(VL*ABS(VL)
T
63: S-VR* ABS-(VR-L-) ) ______________________________________________________________________
64: C ** COMPUTE H AND V AT UPSTREAM END **
65: C — THIS BOUNDARY CONDITION IS FOR A CONSTANT-HEAD RESERVOIR —
80001'24"
66: HNEW(1)=HZERQ _________ _________________________________________________ Datum
67: VR-V(l)+DTDS*A*(V(2)-V(l))
68: HR=H(1)+DTDS*(H(2)-H(1))*(A-VR)
69: VNEW(1)=VR+C*(HNEW(1)-HR)-AX *VR*ABS(VR)-C*DELT*VR*SINE
a = 4000fps
70 : C “ COMPUTE H AND V AT DOWNSTREAM END **
71: C — THIS BOUNDARY CONDITION IS FOR LINEARLY DECREASING VELOCITY —
72 : IF(T.GT.TCLOSE) GO TO 30
VNEW(NODES)=VZERO*(1.-T/TCLOSE) Figure 5-8. Model system for showing sensitivity to system parameters.
Figure 5-7. Computer program for the complete method of
characteristics.
74 UNSTEADY FLOW IN PIPELINES SOLUTION BY METHOD OF CHARACTERISTICS 76

Table 5-1. The effects of friction on maximum water hammer pressures


at the valve for sadden closure (N=6).

hf
TT AH= —AV AH+h,+H
f0
H
min Ho-AH+2hf
Velocity n
max g
(fps) (ft)
(ft) (ft) (ft) (ft) (ft)

2.5 8 2309 311 2311 1698 1697


2000'

Ml.
5.0 31 2616 621 2621 1412 1410
10.0 124 3221 1242 3242 882 882

1500
estimate maximum pressures occurring at the valve for sudden valve 1 = 4.67sec
closure if the following formula is used:

max
« H + hf + AH ..................................................... (5-46) 1000'

It also appears from Table 5-1 that the minimum pressure occurring at the
valve can be estimated with the formula
500

• H0 + 2hf-AH ............................................................(5-47)
The user should keep in mind these are rough approximations which

O
apply well to this case, but should be used with caution if applied to other
situations. .33 .67 1.0

o
To help develop a grasp of how frictional effects develop in a pipe, we x/L

will use the situation in Figure 5-8 with a 10 fps velocity and a suddenly
Figure 5-9. The progression of frictional effects in a simple pipe with
closing valve. Refer to Figure 5-9 which shows how the EL-HGL moves as
sudden valve closure.
the pressure wave propagates through the system. Basically the increase in
head AH caused by sudden valve closure propagates upstream increasing
the steady state head at each point by an amount AH. It might seem that
after a time L/a, the EL-HGL would be a line parallel to the steady-state the maximum head value at the valve can be approximated with Equation
EL-HGL, but positioned AH above it. Actually, a chain of events occurs 5-46. Pursuing this line of reasoning for another 2 L/a seconds would lead
beginning at the end of the first time step At, which causes the pressure to Equation 5-47. Keep in mind, the purpose of this example is to give the
head at each point in the pipe to continue to edge upward after the first engineer a physical feel for what is occurring; it is not intended as a
large AH occurs. This happens, because while V = 0 in the pipe section As substitute method of analysis. It also serves to illustrate the value of a
long, there is a pressure difference (Ah = (hf/N)) occurring (sloping computer program which handles all of the bookkeeping necessary to
EL-HGL). As a result, the system is not in equilibrium and a small include friction.
downstream velocity occurs to try and bring the system into equilibrium.
Each end of the As-long portion of the EL-HGL moves about one-half of Effect of the Size of N
the vertical distance to horizontal. As the pressure wave progresses to the
reservoir and returns to the valve the EL-HGL has had the time to move It would seem reasonable to expect that the greater the number of
upward an amount hf after the initial AH move. This process explains why pieces into which the pipe is divided, the greater the accuracy of the
76 UNSTEADY FLOW IN PIPELINES SOLUTION BY METHOD OF CHARACTERISTICS 77

results. Because As = L/N, it would seem that the larger N, the better the To demonstrate these problems, the simple pipe system in Figure 5-8
accuracy. It is surprising, then, to discover that the choice of N has very was used. The value of As was fixed, the valve was to be closed suddenly
little effect on the numerical solution. For example, for sudden valve and the value of At was calculated so that points L and Le coincided
closure with an initial velocity of 5 fps in the example of Figure 5-8, the (minimum interpolation). Higher values of At would cause L to move
maximum and minimum values of H differ less than 10 ft for N = 3 and N outside of Le and possibly R to move outside Ri and numerical instability
— 18. (See Table 5-2.) For slower velocity change the difference is should occur. Substantially lower values of At should cause points L and R
negligible. to move towards C (see Figure 5-6) thereby leading to interpolation errors.
There are two points to be made here. First, except in the case of In the demonstration, the reference value of At0 for minimum
rapidly varying velocity, there is little to be gained by using a larger interpolation was computed as above and a run was completed to use as a
N-value than necessary. Second, for a given run time, the number of grid standard of comparison. Then runs with At’s of 0.90 At 0, 1.02 At0 and
points vary as N* and so does the cost of computer analysis. However, care 1.10 At0 were made to see what happened. The results are shown on
should be taken not to make N so small that the resulting At would be too Figure 5-10. Note that for At = 0.90 At0, the interpolation error has
great to give good representation of results for time-varying boundary caused rounding of the sharp corners on the H vs t plot. For At = 1.02
conditions such as valve movements. At0, the results are not too different from the base run. However, when At
is increased to 1.10 At0, the solution begins to run wild. This result is
Effect of Sloping Pipes termed numerical instability and it is clear that the admonition in
Equation 5-45 should be followed.
Pipelines ranging in slope over ± 25% were tested to determine the On the other hand, when At is smaller than required, the result is not
effect of slope on the results. For both extremes of slope, the results were
instability, but inaccuracy. It appears then that the At parameter should
virtually identical. While the slope of the pipe should not be ignored (it is
be controlled so that interpolation is minimized, but care is taken to
necessary to include it to obtain pressure head anyway), the engineer
remain within the Le-Ri grid points.
should be comfortable “smoothing" out the pipe profile to include only a
manageable number of constant-slope pipes. By this means, it is possible
to use the series pipe program to obtain good approximations of pressure
head along the line and still exercise control over the As and At Experimental Verification
parameters.
The literature has several examples of comparisons between
Numerical Instability and Inaccuracy computed and measured pressures in systems. The work of Streeter and
Lai [14] illustrate comparisons for a simple pipe system. They employed
Earlier it was stated that At should be kept small enough to insure 0.5-inch and 0.375-inch copper tubing approximately 300 ft long in their
that points L and R in Figure 5-6 remained between grid points Le and Ri experiments. The results in Figure 5-11 represent simple pipes and series
for all situations. If not, numerical instability was presumed to occur as pipes and confirm decisively the accuracy with which the characteristics
well as inaccuracy in the computational results. method can predict pressure variation with time for turbulent pipe flow.
For laminar flow situations the work of Kaplan, Streeter and Wylie
[15] illustrates the accuracy of the method of characteristics. Figure 5-12
Table 5-2. Effect of N on pressure head at the valve for rapid and slow illustrates the comparison between theory and experiments conducted on
velocity change (V = 5 fps). the 465 mile long 34-inch diameter South European Pipeline. These
experiments substantiate the validity of the application of the method of
characteristics to laminar flow problems.
To illustrate the effect of burying the pipe on water hammer
Sudden Valve Closure Valve Closure in 4 L/a
calculations, the work of Watters, Jeppson and Flammer [16] is used.
These experiments on PVC pipe also verify that the theory works well on
max
relatively flexible pipe. Figure 5-13 shows that under unburied conditions
2611 for velocities up to 10 fps, the predicted and measured pressures were
1417 2288 1969
essentially identical. Further, burying the pipe, which might be suspected
2616 1412 2290 1969
of giving support to the pipe to make it act “stiffer,” was discovered to
18 2619 1409 2292 1969
have no effect on the wave speed.
78 UNSTEADY FLOW IN PIPELINES SOLUTION BY METHOD OF CHARACTERISTICS 79

1000

20
i

Figure 5-10. Numerical instability In a simple pipe with sudden valve closure.
J -------- 1 ___ i ____ i ____ i ____ L

1
t , sec

TIME- seconds
10

5
At = 1.02 of Normal
At = 1.10 of Normal
At = 0.90 of Normal
Normal At Value

in

o
0001
1500
3000

2500

2000

500

Figure 5-11. Results of water hammer tests on copper tubing (from


488) - H “Water Hammer Analysis Including Fluid Friction” by
Streeter and Lal, ASCE Hydr. Div., 88:3, Nov. 1962).
THEORETICAL RESULTS
80 UNSTEADY FLOW IN PIPELINES SOLUTION BY METHOD OF CHARACTERISTICS 81
STATIC HEAD
INITIAL HEAD AT Pg
ThEORET CAL RESULTS
STATIC HEAD 1000

NO 3 ----------- ESPERIMEN'AL RESULTS


INITIAL PEAD AT P3 I

IN TIAL HEAD800
AT R

600

PRESSURE.
PSI
400
H , ft

200

0 02 0.4 0.6 0.6 l.O L2 1.4

t, sec

1000 III ~ I ~
NO 4 ----------- EXPERIMENTAL RESULS

800

600

PRESSURE. PSI
X 400

200

100

0
0 25 50 75 100 !25 ISO 175 200
0 0.2 0.4 0.6 0.8 LO 1.3 1.4 TIME - SECONDS

I , SEC.

Figure 5-12. Results of tests on the oil carrying South European Pipe-
line (from “Computation of Oil Pipeline Transients” by
Figure 5-11. Continued Kaplan, Streeter and Wylie, ASCE Hydr. Div., 93:6, Nov.
1967).
82 UNSTEADY FLOW IN PIPELINES

validity of analysis by the method of


serve to substantiate the claim that
versatile as any present or past technique.
included from surge tank and air
of the fact that these items have

VI. Complex Pipe Systems


220

200
A natural extension of the analysis of single pipelines is to consider
180 more complex pipe systems. In actuality, practical situations almost
always involve systems more complicated than simple pipes. We have at
160
hand most of the analysis techniques necessary to handle complex systems
MEASURED PEAK PRESSURE NCREMENT

so we will begin with the simplest which are the series pipe problems.
AT DOWNSTREAM TRANSDUCER (PSI)

140

120
6.1 Series Pipes
IOO

In series pipe systems, each pipe carries the same steady flow
80
discharge, but has its own values of velocity, diameter, wave speed, etc.
60 This does not exclude the single size pipe with breaks in slope which can
be treated as a series pipe; however, the analysis is the same in either case.
40

20
The Internal Boundary Conditions

O The method of characteristics solution for each pipe in series


O 20 40 60 BO OO 120 140 >60 ISO 200 220
THEORETICAL PRESSURE INCREMENT
BASED ON MEASURED WAVE VELOCITY (PSI)
proceeds as before. The principal difference is that there are now internal
boundary conditions at the pipe junctions which must be specified to
complete the solution. Boundary conditions at the pipe ends are treated as
before. At the internal boundary conditions we must employ two
Figure 5-13. Results of water hammer tests on buried and unburled additional equations to combine with the characteristic equations to solve
PVC pipe (from “Water Hammer in PVC and Reinforced for the four unknowns at the pipe junctions.
Plastic Pipe” by Watters, Jeppson and Flammer, ASCE The situation at the junction is shown in the sketch below. In this
Hydr. Div., 102t7, July 1976).

83
84 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 85

case, we will assume that the minor head loss occurring at the junction is
negligible. The equation along the C+ characteristic is The values of the velocities are calculated from Equations 6-2 and 6-4 so
they will not be repeated here.

Computation of At

-2- L At VT sin 0. - H In the previous analysis we have assumed that At is the same in each
a< i 1 a. 6-1

PH
...
pipe. This is rarely true, so it is important to look carefully at this aspect of
the problem. The previous formula for computing At with the complete
or in short form method of characteristics is rewritten here for convenience.

............................................................. (6-2)

HJ
At = .................................................................... (6-8)
N(V + a)
For the downstream pipe the equation along the C' characteristic is
Because each pipe in a series system generally has different lengths, wave
speeds and velocities, it is obvious that strict application of this formula
(even using different N’s in each pipe) will lead to differing values of At in
................................ (6-3) each pipe. As an example, refer to the two-pipe system shown in Figure
6-1. In this example, equal N’s were used to compute At in each pipe. The
result at the internal boundary is that characteristic lines from the two
or in short form pipes do not intersect the internal boundary at the same point in time on
the s-t plane. Because it is also unlikely that we can find two N’s which will
= C, + C, H ....................................................... 6-4) give identical At’s in the two pipes, we must try another strategy.
Figure 6-2 displays another approach based on our knowledge of how
It is clear from Equations 6-2 and 6-4 that we have four unknowns to interpolate when characteristic lines do not intersect grid points. We
and only two equations. The remaining two equations are obtained from can reduce the larger At in one pipe down to the value of At in the
continuity and energy principles. remaining pipe, thereby overcoming our previous problem of matching
In applying the equation of continuity, the point P 2 in pipe 1 and the the At’s at the internal boundary. However, this is done at the risk
point Pi in pipe 2 are assumed to be so close together that there is no room of introducing serious interpolation inaccuracy in the one pipe.
to store any mass. As a result, continuity gives A technique exists to reduce this interpolation error without loosing
internal boundary compatibility. This is done by increasing N in the pipe
VRi Aj = Vp^ A2 .................................................................. (6-5) whose At must be decreased. Figure 6-3 illustrates the effect of this
In this case, when applying the energy equation and neglecting any approach. In practice, N is increased until one of the characteristic
small head loss caused by the contraction (or expansion), intersection points L or R move outside the grid point. The next smaller N
is then used to divide the pipe. The algorithm used to find this N-value is

....................................................................... (6-6) N. = b........... .................................................................... (6-9)


J
At . (V.+a.)
If the head loss were significant (a closing valve, a pressure reducing valve, min v j y
etc.) then the head loss across the valve would have to be included in
Equation 6-6. Integer truncation within the machine will give the proper maximum
Solving Equations 6-2, 6-4, 6-5, and 6-6 simultaneously leads to the N-value. This approach provides the minimum amount of interpolation
following equations for the H-values at the internal boundary. for the “base” N value chosen. If the interpolation is still too great, then a
larger base N-value will generally lead to smaller interpolations in the
C3Aj ■ Ct A2 other pipes.
..........................................(6-7)
C2A2 +C4 A.
86 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 87

PIPE NO. I PIPE NO. 2

N=4

Figure 6-1. The »-t plane for a two-plpe ayatem with equal N’a. PIPE NO. I PIPE NO. 2
'-—-
TRY N = 6 N=4

Figure 6-3. The a-t plane with variable N-value and minimum
interpolation.

The Computer Program

The basic computer program for series pipes is shown in Figure 6-4.
The program is primarily an extension of the program presented earlier
for the complete method of characteristics. As before, the input
parameters are all defined with COMMENT cards and the user must
make all the steady state hydraulic computations by hand. A more
complicated version of this program is given in Appendix I which
performs its own steady state hydraulic computations.
It should be noted that double subscripting of variables now occurs
N=4 N=4 because quantities vary from pipe to pipe. A word of caution in regard to
( SAME AT ) selecting an N-value is advised. If a relatively short pipe occurs in the
system, it will be the “controlling” pipe with the minimum At. If there are
Figure 6-2. The a-t plane with equal At’a and large interpoladona.
other considerably longer pipes in the system, it is possible to end up with
the long pipe having a very large number of sections. Making a computer
run with a very short TMAX value and a small N-value will permit you to
see what is happening for a few At’s and give you the opportunity to make
appropriate adjustments.
This program is set up to handle an upstream reservoir with a gate
valve closure at the downstream end where the pipe exits into another
reservoir. The gate valve, whose loss coefficients are input via a DATA
statement, can be closed at two different rates.
88 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 89

15 c**** ****** •• *• • ** **

2: C PROGRAM NO. 3
3: C WATER HAMMER IN SERIES PIPES
4: C (PROGRAM DIMENSIONED FOR UP TO 8 SERIES PIPES) LA»L(I)/A(I)
83:
84 : 15 WRITE(6,201) I ,0 ( I) , L( I) , A <I) , P IPEZ (I) , F (I) , VZERO (I) ,
6: C 85: SDELTT(I),NPAR(I),SINE(I),LA
7: C — RESERVOIR AT UPSTREAM END — 86: C
8: C — RESERVOIR AT DOWNSTREAM END WITH TWO-STAGE CLOSING VALVE IN LINE --
87: C ** SET UP CONDITIONS FOR STEADY STATE (T=fl) **
9: c 88 : C
10 s c PIPES ARE NUMBERED CONSECUTIVELY BEGINNING WITH PIPE 1 AT UPSTREAM END 89 : H(1,1)-HZERO
11: c — PIPE DATA ARE STACKED IN SEQUENCE BEGINNING WITH PIPE 1 — 90 : V(1,1)=VZERO(1)
12: c IOUT = INDEX WHICH GIVES AN OUTPUT EVERY IOUT-TH TIME STEP 91: DO 20 1=1,NPIPES
13 : c NPARTS = NUMBER OF PARTS INTO WHICH PIPE IS DIVIDED 92: DELL=L(I)/NPAR(I)
14 : c HDOWN = DOWNSTREAM RESERVOIR ELEV-FT 93: DELHF’l2.*F(I)* DELL*VZERO(I)**2/(64.4*D(I))
15: c HZERO » UPSTREAM RESERVOIR ELEVATION-FT 94 : AK(I)=12.*F(I)* DELT/(2.*D(I) )
16 : c NPIPES = NUMBER OF SERIES PIPES 95: K=NPAR(I)+1
17: c TMAX = MAXIMUM REAL TIME OF SIMULATION-SEC 96: X(I,1)=0.
18 : c TCI = TIME AT WHICH STAGE 1 OF VALVE CLOSURE SCHEME IS COMPLETED-SEC 97: HEAD(I,1)=H(I,1)-PIPEZ (I)
19: c TC2 « TIME AT WHICH VALVE IS COMPLETELY CLOSED-SEC 98 : RATIO(I)“DELT/DELL
20 : c PCI = PERCENT VALVE IS OPEN AT END OF STAGE 1 99 : DO 21 J = 2,K
21: c QZERO = STEADY STATE DISCHARGE-GPM 100 : X(I,J)=(J-l)*DELL/L(I)
22: c ZEND = ELEV OF DOWNSTREAM END OF LAST PIPE-FT 101: H (I, J)(1,1)-DELHF*(J-l)
23 : c HATM = ATMOSPHERIC PRESSURE HEAD-FT 102: HEAD(I,J)=H(I,J)-(PIPEZ(I)+X(I,J)*L(I)*SINE(I))
24 : c L() = PIPE LENGTH-FT D() = PIPE DIAM-IN F() * DARCY FRICTION FACTOR 103: 21 V(I,J)*VZERO(I)
25: c A() » WAVE SPEED-FPS PIPEZf) » PIPE ELEVATION AT UPSTREAM END-FT 104 : IF(I.EQ.NPIPES) GO TO 20
26 : c KI() = TABLE VALUES OF 1.0/KL 105: H (1+1,1)=H(I,K)
27: c PCT () = VALUES OF PERCENT OPEN FOR THE ABOVE KI()-VALUES 106: V(1+1,1)=VZERO(1+1)
28 : c 107 : 20 CONTINUE
29: DIMENSION X(8,30),V(8,30),H(8,30),HLOW(8,30),HHIGH(8,30), 108: DO 23 1*1,NPIPES
30: $HEAD(8,30),VNEW(8,30),HNEW(8,30) 109: K=NPAR(I)+1
31: DIMENSION L(8),D(8),A(8),PIPEZ(8),F(8),VZERO(8),NPAR(8), 110 : DO 23 J=1,K
32: $C(8),AK(8),SINE (8),AREA(8),DELTT(8),RATIO(8) BLOW(I,J)“H(I,J)
111:
33: DIMENSION KI (11),PCT(11} 23 !IH IGH (I, J) *H {I, J)
112:
34 : REAL L,LA,KI,KLI 113: PHMAX“-100.
35: LOGICAL PAIL 114: PHMIN=100000 .
36 : DATA (KI (I),1*1,ll)/0,,.0167,,0313,.0556,.100,,1787,.3333,.625, 115: C
37: $1.25,2.50,5.27/ 116: C ** WRITE OUT STEADY STATE CONDITIONS **
38 : DATA (PCT(I) ,I»1,11)/0.,10.,20.,3A.,40.,50.,60.,70.,80.,90., 100./ 117: C
39: NAMELIST /SPECS/ IOUT,NPARTS,HDOWN,HZERO,NPIPES,TMAX,TC1,TC2,PCI, 118 : WRITE(6,204)
40: SOZERO,ZEND,HATM 119: WRITE(6,205) T
41: c
READ(5,SPECS) 120: DO 22 1=1,NPIPES
42: K=NPAR(I)+1
READ(5,10 0) (DC I) ,L(I) ,F(I} ,A(I) ,PIPEZ(I) ,1=1,NPIPES) 121 :
43 :
c 122: WRITE(6,206) I,(X(I,J),HEAD(I,J),H(I,J),V(I,J),J=1,K)
44: 123: 22 CONTINUE
45: PI=3.141593
124: C
46: T»0.
125: C --------------------------------------------------------------------------------------------------------------------------------------------------------
47: FAIL*.FALSE.
126: C BEGIN TRANSIENT ANALYSIS
48: DO 11 1*1,NPIPES
127: c
49: AREA(I)».25*PI‘D(I)*D(I)/144.
128: ----------------------------------------------------------------------------------------------------------------------------------------------------------
50: C (I) => 32.2/A ( I)
IF(I.NE.NPIPES) SINE(I)»(PIPEZ(1+1)-PIPEZ(I))/L(I) 129 : C DO 99 11=1,INDEX
51: 130:
IF(I.EO.NPIPES) SINE(I)*(ZEND-PIPEZ(I))/L(I) T=T+DELT
52:
VZERO(I)=QZERO/(449.‘AREA(I)) 131: C
53: 132:
11 DELTT(I)*L(I)/(NPARTS*(VZERO(I)+A(I))) C ** COMPUTE H AND V AT INTERIOR NODES **
54 : 133 : C
55: c 134 :• DO 30 1=1,NPIPES
56 : c “ COMPUTE MINIMUM DELTA T ** 135:
c K’NPAR(I)
57: 136: DO 30 J=2,K
58 : DELT’DELTT(1) 137 : RA=RATIO(I) * A(I)
59 : KMIN»1
138: VMINUS’V(I,J)-RA*(V(I,J)-V(I,J-1))
60: DO 12 1=2,NPIPES 139: VPLUS=V(I,J)-RA*(V(I,J)-V(I,J+l))
61: I F(DELTT(I) .GT.DELT) GO TO 12 140: HMINUS’H(I,J)-RA*(H(I,J)-H(I,J-l))
62: DELT’DELTT(I) 141: HPLUS=H(I,J)-RA*(H(I,J)-H(I,J+l))
63: KMIN’I 142: VNEW(I,J)=0.5 * (VMINUS+VPLUS+C(I)*(HMINUS-HPLUS)+C(I) *DELT*SINE(I)
64 : 12 CONTINUE 143: $*(VMINUS-VPLUS)-AK(I)*(VMINUS*ABS(VMINUS)+VPLUS*ABS(VPLUS)))
65: DO 13 1*1,NPIPES 144: KNEW(I,J)=0.5*(HMINUS+HPLUS+(VMINUS-VPLUS)/C(I)+DELT*SINE(I)*
66: IF(I.EQ.KMIN) GO TO 14
145: $(VMINUS +VPLUS)-(AK(I)/C(I))*(VMINUS *ABS(VMINUS)-VPLUS*ABS(VPLUS)))
67: ANPAR=L{I)/(DELT*(VZERO(I)+A(I))) 146: 30 CONTINUE
68 : NPAR(I)’ANPAR 147: C
69 : TEST’NPAR(I) 148: C ** COMPUTE H AND V AT INTERIOR JUNCTIONS **
70: IF(ABS(TEST+1-ANPAR).LT..0001) NPAR(I)»NPAR(I)+1 149 : C
71: GO TO 13 KK»NPIPES-1
150:
72: 14 NPAR(I)’NPARTS DO 40 1=1,KK
151:
73 : 13 CONTINUE 152: K=NPAR(I)+1
74 : INDEX*TMAX/DELT + 1 153: VMINUS"V (I, K) - RATIO (I) *A (I) * (V ( I , K) -V (I, K- 1) )
75: c
154: HMINUSMI (I,K)-RATIO(I)*A(I)*(H(I,K)-H(I,K-1))
76: c ** WRITE OUT INPUT DATA **
155: CCC-VMINUS+C(I)»HMINUS+C(I)»VMINUS*DELT'SINE(I)-AK(I)‘VMIHUS*
77: c
156: SABS(VMINUS)
78 : WRITE(6,200) 157: VPLUS=V(I+1,1)-BAT 10(1+1)*A(I +1) » (V (1+1,1)-V (1 +1,2))
79 ; WRITE (6,201) LOUT ,NPARTS ,NPIPES ,Q2ERO,HDOWN ,¥.1 ERO, 7.END, HATM 158: IIPLUS-H (1 + 1 ,1) - RATIO(1 + 1) »A(I+1)*(H(1+1,1)-H(1+1,2))
80 : STMAX,DELT,TC1,PCI,TC2 CC=VPLUS-C(1+1)*HPLUS-C(1+1)*OELT*VPLUS*SINE(1+1)—AK(I+1)*VPLUS*
159:
81: WRITE(6,202) SABS(VPLUS)
82: 160:
DO 15 1=1,NPIPES HNEW(I,K) =■ (—CC*AREA(1+1)+CCC*AREA(I) ) / (C (1 + 1) ‘AREA (1 + 1) tC ( I) •
161:

Figure 6*4. Computer program for series pipes. Figure 6-4. Continued.
90 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 91

162: SAREA(I)) 241: K-NPAR(I)+1


163: HNEW(I+1,1)=HNEW(I,K) 242 : WRITE(6,206) I, (X(I,J) ,HEAD(I,J),HNEW(I,J),VNEW(I,J) ,J-1,K)
164: VNEW(I,K)-CCC-C (I)*HNEW(I,K) 24 3: 73 CONTINUE
165: VNEW(1+1,1)-CC+C(1+1)*HNEW(1+1,1) 244 t IF(FAIL) GO TO 400
166: 40 CONTINUE 245: 72 CONTINUE
167: C 246 : C
168: C ** COMPUTE H AND V AT UPSTREAM END ** 247 : C ** PREPARE FOR NEXT TIME STEP COMPUTATION **
169 : C —THIS BOUNDARY CONDITION IS FOR A CONSTANT HEAD RESERVOIR— 248 : C
170: C 249 : DO 80 I«1,NPIPES
171: HNEW(1,1)=HZERO 250: K»NPAR(I)+1
172: VPLUS’V(1,1)-RATIO(1)*A(1)*(V(1,1)-V(1,2)) 251: DO 80 J-l ,K
173: IIPLUS’H (1,1) “RATIO (I) * A (1) * (H(1,1)-H(1,2)) 252: V(I,J)*VNEW(I,J)
174: VNEW(1,1)“VPLUS+C(1)*(HNEW(1,1)-HPLUS)-C(1)* DELT*VPLUS*SINE(1) 253 : 80 H(I,J)=HNEW(I,J)
175: $-AK(1)*VPLUS*ABS(VPLUS) 254 : IF(T.GT.TMAX) GO TO 400
176: C 255: 99 CONTINUE
177: C ** COMPUTE H AND V AT DOWNSTREAM END ** 256 : C
178: c —THIS BOUNDARY CONDITION IS FOR A GATE VALVE CLOSING AT TWO 257: C -------------------------------------------------- - ------------------------------------------------------------------------------------------------------ --- --
179: c SEPARATE RATES AND FLOWING INTO A RESERVOIR— 258 : C END OF TRANSIENT ANALYSIS
180: c 259 : C -----------------------------------------------------------------------------------------------------------------------------------------------------------------
181: NV=NPAR(NPIPES)+1 260 : C
182: VHINUS-V(NPIPES,NV)-RATIO(NPlPES)*A(NPIPES)*(V(NPIPES,NV)- 261: C ** WRITE OUT MAXIMUM AND MINIMUM HEADS AND H-VALUES **
183: $V(NPIPES,NV-1)) 262: C
184 : HMINUS-H(NPIPES,NV)-RAT IO(NPIPES)*A(NPIPES)*(H(NPIPES,NV)- 263 : 400 CONTINUE
185: $H(NPIPES,NV-1)) 264 : WRITE(6,207)
186: CC-VMINUS+C(NPIPES)*HMINUS+C(NPIPES)*VMINUS*DELT*SINE(NPIPES)- 265: DO 401 1 = 1 ,NPIPES
187: $AK(NPIPES)*VMINUS*A0S(VMINUS) 266 : WRITE(6,208) I
188: IF(T.GE.TC2) GO TO 50 267 : K=NPAR(I)+1
189 : IF(T.GT.TCl) GO TO 49 268 : DO 401 J = 1 ,K
190 : OPEN-100.-(100.-PC1)*T/TC1 269 : HEADMX-HHIGH(I,J)-(PIPEZ(I)+X(I,J)*L(I)*SINE (I) )
191: GO TO 48 270 : HEADMN» HLOW(I,J)-(PIPEZ(I)+X(I,J)*L(I)*SINE(I))
192: 49 OPEN-PCI *(TC2-T)/(TC2-TC1) 271: 401 WRITE(6,209) X(I,J),HEADMX,HEADMN,HHIGH(I,J),HLOW(I,J)
193 : 48 DO 45 1=1,11 272 : WRITE(6,210) PHMAX,IPMAX,XMAX,TTMAX
194 : ITEST-(OPEN-PCT(I))*.10 273: WRITE(6,211) PHMIN,I PM IN,XMIN,TTMIN
195: IF(ITEST.EQ•0) GO TO 46 274 : C
196: 45 CONTINUE 275 :
197: 46 FACT-(OPEN—PCT(I))*.10
C ******* FORMAT STATEMENTS *******
276: C
198: KLI-KI(I)+FACT*(KI(1+1)-KI(I)) 277 :
199 : CCC-64.4*(HDOWN-CC/C(NPIPES)) 100 FORMAT(5 Fl 0»0)
278 : 290 FORMAT(1 Hl//I 4X,33('*')/14X,’* WATER HAMMER IN A SERIES PIPE *’/
200 : CD-64.4/C(NPIPES)
279: S14X,33('*')//25X,'INPUT DATA'/25X,10('-’)/)
201: IF(CCC.GT,0.) GO TO 43 280:
202: VNEW(NPIPES,NV)=0.5*KLI*CB*(-1.0+SQRT(1.0-4.*CCC/(KLI*CB*CB))) 201 FORMAT(25X,’IOUT = ’,13/23X,’NPARTS =',I3//23X,'NPIPES «',I3//
281: S24X,'QZERO *', F7«1,' GPM'//
203: GO TO 51 282:
204 : 43 VNEW(NPIPES,NV)=0.5*KLI*CB*( 1.0-SQRT(1.0+4.*CCC/(KLI*CB*CB))) $24X,’HDOWN =',F7.1,’ FT'/24X,'HZERO =',F7.1,' FT’//
283 : $25X,'ZEND -',F7.1, 1 FT'/25X,'HATM -’,F7.1,' FT1//
205 : GO TO 51 284 :
206: 50 VNEW(NPIPES,NV)=0• $25X,'TMAX ,F7.2, 1 SEC'/25XDELT «1 ,F7.3 , ' SEC1//
285 : $26X,’TC1 »',F7.2,' SEC'/26X,'PCl =',F7.2,' PERCENT OPEN'//
207 : 51 HNEW(NPIPES,NV)=(CC-VNEW(NPIPES,NV))/C(NPIPES) 286: $26X,'TC2 -'^7.2,' SEC-VALVE IS CLOSED')
208: c 287 :
209 : c “ LOCATE MAXIMUM AND MINIMUM HEADS AND H-VALUES ** 202 FORMAT(//22X,1 PIPE INPUT DATA’/22X,15('-')//5X,1 PI PE DIAM-IN LENGT
288 : SH-FT WAVE SPD-FPS PIPEZ-FT F-VALUE VF.L-FPS DELT-SEC PARTS SINE
210: c 289 : SL/A-SEC'/5X,4 ( '-'),1X,7('-’),1X,9('-'),1X,
211: DO 61 1-1,NPIPES 290 : SUC-M.lx^C-'MXJC-'jjxJC-'jax^C-'jjx^C-'j^x,
212: K=NPAR(I)+1 291: $6('-'),1X,7('-'))
213: DO 61 J-l,K 292: 203 FORMAT(5X,I3,2X,F6.2,IX,F9.1,6X,F6.0,4X,F6.0,3X,F5.4,3X,
214: IF(HNEW(I,J).LT.HLOW(I,J)) HLOW(I,J)-HNEW(I,J) 293 : $F5.2,3X,F6«3,3X,I3,2X,F7.5,1X,F6.2)
215: IF(HNEW(I,J).GT.HHIGH(I,J)) HHIGH(I,J)-HNEW(I,J| 294 : 204 FORMAT(1H1/' PRESSURE HEADS, H-VALUES AND VELOCITIES AS FUNCTIONS
216: HEAD(I,J)-HNEW(I,J)-(PIPEZ(I)+X(I,J)*L(I)*SINE(I)) 295: $ OF TIME’/2X,60('-'))
217: IF(HEAD(I,J).LT.PHMAX) GO TO 66 205 FORMAT(//18X,3(5X,' X HEAD-FT H-FT V-FPS')/' TIME =',F7.3,
296:
218: IPMAX-I S' SEC' ,3 (5X, '-------------------- --------------- ------------ --------------- 1 ) )
297 :
219: XMAX-X(I,J) 206 FORMAT(/12X,'PI PE‘,12, 3(5X,F5.3,2F7.0,F8.2) /(18X,3(5X,F5.3,2F7.0
298:
220 : PHMAX-HEAD(I,J) $,F8.2)))
299 :
221: TTMAX-T 207 FORMAT(1H1/18X,27('*')/18X,'* TABLE OF EXTREME VALUES *'/18X,27('*
222 : GO TO 67 300:
301 : $')//13X,'X MAX HEAD MIN HEAD MAX H MIN H*/l1X,5(1- 1
),2X,8 (
223 : 66 IF(HEAD(I,J).GT.PHMIN) GO TO 67 $'-'),2X,8('-'),2X,6('-'),2X,6('-'))
224 : IPMIN-I 302 :
208 FORMAT(2X, 'PI PE ' ,I 2)
303 :
225 : XMIN-X(I,J) 209 FORMAT(11X,F5.3,2X,F7.0,3X,F7.0,3X,F6.0,2X,F6•0)
2 26: PHMIN=HEAD(I,J) 304 : 210 FORMAT(//’ MAXIMUM HEAD «‘,F6.1,‘ FT IN PIPE’,13,’ AT X =’,F5.3,
227 : TTMIN-T 305 : S' AT TIME =' ,F7.2, 1 SEC')
228 : 67 CONTIfJE 306 : 211 FORMAT(/' MINIMUM HEAD »',F6.1,' FT IN PIPE',13,’ AT X •',F5.3,
229 : IF(HEAD(I,J).GT.-HATM) GO TO 62 307: $' AT TIME ,F7.2,' SEC')
230 : WRITE(6,214) T,I,X(I,J) 308 : 214 FORMAT(////2X,1 COLUMN SEPARATION HAS OCCURRED AT',F6.2,' SEC IN PI
231: FAIL-.TRUE. 309 : SPE',13,' AT LOCATION',F5♦3)
232 : 62 CONTINUE 310: END
233 : 61 CONTINUE 311:
234 : c
235: c ** WRITE OUT H,V,AND HEAD VALUES AND TEST FOR TMAX **
236 : c
237 : 70 IF(FAIL) GO TO 71
238 : IF(MOD(II,IOUT).NE.0) GOTO 72
239 : 71 WRITE(6,205) T
240 : DO 73 1 = 1 , NPIPES

figure 6-4. Continued. Figure 6-4. Continued.


92 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 93

To demonstrate the use of the program, an example is presented


following the program listing.

Example 6-1

In demonstrating the series pipe program, it is also possible to see


how the pipeline configuration can affect maximum and minimum
pressure heads.
In configuration no. 1, the small pipe is downstream and the large
pipe is upstream. Input data are shown below followed by some of the
computer output from configuration no. 1. The complete output is too
bulky to be included. Pressure head vs. time at the valve is plotted and
a maximum pressure head of 1910 feet occurs at the valve at 3.2 seconds.
A minimum pressure head of 333 feet occurs at the valve at 2.6 seconds.
In configuration no. 2, the sequence of the pipes is reversed. While
this configuration is not normal, it serves to illustrate a point. The
maximum pressure head is 1460 feet at 2.2 seconds and the minimum
pressure head is 660 feet at 4.1 seconds. The point is that the pipe
configuration can effect the maximum and minimum pressures.

PIPE DIAM-IN LENGTH-FT WAVE VEL-FPS PIPEZ-FT F-VALUE VEL-FPS DELT-SEC PARTS SINE L/A-SEC
SEC-VALVE IS CLOSED
PCI = 100.00 PERCENT OPEN
.75 SEC
.111 SEC

.00 SEC
FT
GPM

FT
FT

32.0
.0

1.00
881.6

935.7
* WATER HAMMER IN A SERIES PIPE *

1
3

HZF.RO = 1000.0 FT
INPUT DATA

PIPE INPUT DATA


O)

HATM =

TMAX =
ZEND =

TC2 =
DELT =

TCI =
IOUT =
NPAPTS =

HDOWN =
QZEP.O =
NPIPES =
1,000' 1,000'
V 2.5 fps f = .O2O VQ= 10
a = 3OOOf fps
ps
Configuration No. 1

DATA
$ SPECS IOUT=1,NPARTS”3,HD0WN»935,7,HZERO=1000,,NPIPES-2,TMAX-4.0,
TCl“0.,TC2*1.0,PCl»100.,QZERO»881.6,ZEND»0.,HATM-32.
SEND
12. 1000. .020 3000. 0.0 I
6. 1000. .020 3000. 0.0
PRESSURE HEADS, H-VALUES AND VELOCITIES AS FUNCTIONS OF TIME

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME .000 SEC

PIPE 1 .000 1000. 1000. 2.50 .333 999. 999. 2.50 .667 999. 999. 2.50
1.000 998. 998. 2.50

PIPE 2 .000 998. 998. 00* IdT .333 977. 977. 10.00 .667 957. 957. 10.00
1.000 936. 936. 00-0T

X HEAD-FT H-FT V-FPS HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS

XI

I
I
I
I
TIME = .111 SEC
94 UNSTEADY FLOW IN PIPELINES

PIPE 1 .000 •000T 1000. 2.50 333


666 666
2.50 667 999 666 2.50
1.000 ’866 998. 2.50

PIPE 2 • 000 998. 998. 10.00 333 977 977 10.00 667 957 957 10.00
1.000 936. 936. 10.00

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME = .221 SEC

PIPE 1 .000 1000. 1000. 2.50 333 666 666 2.50 .667 999. 999. 2.50
1.000 998 . 998. 2.50

PIPE 2 • 0 00 998. 998. 333 977 977 10.00 .667 957. 957. 10.00
1.000 937. 937. 66*6

X HEAD-FT H-FT V-FPS HEAD-FT H-FT V-FPS HEAD-FT H-FT V-FPS


TIME = .332 SEC
I
I
XI
I
1
I
I
I
I
X|

PIPE 1 • 000 1000. 2.50 666 666


333 2.50 667 666 666 2.50
•0001
1.000 998. •866 2.50

PIPE 2 .000 998. 10.00


*866 333 978 978 10.00 667 958 958 66*6
1.000 9.97
939 . *6£6

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME .443 SEC

PIPE 1 .000 1000 . 1000. 2.50 333 666 666 2.59 667 999 666 2.50
1.000 998. 998. 2.50

PIPE 2 •000 998. 998. 9.99 333 978 978 9.99 667 959 959 9.97
1.000 941. 941. 9.94

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME = .554 SEC

PIPE 1 .00 0 1000. *0001 2.50 333 666 999 2.50 667 666 666 2.50
1.000 998. *866 2.50

PIPE 2 .000 998. 998. 9.98 333 980 980 9.97 667 962 962 9.94
1.000 947 . 947. 9.88

X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS X HEAD-FT H-FT V-FPS


TIME = .664 SEC

PIPE 1 .000 1000. 1000. 2.50 1000


333 1000 2.50 667 666 666 2.50
1.000 999. 999 . 2.49

PIPE 2 .000 999. 999. 9.96


1.000 333 992 982 9.94 667 967 967 9.89
957. 957. 9.78
COMPLEX PIPE SYSTEMS 95
96 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 97

6.2 Branching Pipes

The next complication beyond series pipes normally encountered in


complex pipe systems is branching pipes. We will consider three-pipe and

4.0
four-pipe junctions.

Three-Pipe Junctions

The model three-pipe junction is shown below in Figure 6-5, with the
flow directions indicated by vectors whose directions are dictated by the
steady state conditions. That is, the signs of terms in the equations to be
written and the characteristic lines to be followed will be determined by
the steady flow configuration (as has been done in all previous cases).

3.0
For the pipe junction with one in-flowing pipe and two out-flowing
pipes, the following equations can be written to solve for the six
unknowns.

Pipe 1-C. = C, -C„ H (6-10)


X
LARGE PIPE DOWNSTREAM (Configuration No.2)
SMALL PIPE DOWNSTREAM (Configuration No.I)

(
Pipe 2-C = C, + C, II (6-11)

TIME sec
2.0
Pipe 3-C = C, +C< H (6-12)

CM
-

m
Continuity: Vp A, = Vp A2+Vp A3 (6-13)
Q- =0.333 SEC IN EACH PIPE

Energy: (6-14)
VALVE CLOSED

where the numerical subscripts indicate the velocities and H-values to be


solved for in the respective pipes at the junction. Note that the last
O'l

equation is actually two independent equations.

PIPE 3
0001

o
1500
2000

500

-500

A
3A3VA IV QV3H 3dnSS3dd

-
______________________ i

PIPE 2

Figure 6-5. The one-in, two-out three-pipe Junction.


98 UNSTEADY FLOW IN PIPELINES
COMPLEX PIPE SYSTEMS 99

Solving this linear set of equations gives Most three-pipe junctions fit into one of the above categories. However, it
is possible in pipe networks that a constant demand might be specified at
C] Aj ■ C3 A2 - Cs A3 a pipe junction.
(6-15)
C2AI +C4A2 +C6A3 As an example of the three-pipe junction with a constant demand, see
Figure 6-7. Equations 6-10, 6-11, and 6-12 still apply as does Equation
Back substitution into Equations 6-10, 6-11, and 6-12 will give the values 6-14. However, Equation 6-13 must be modified to the form
of the velocities.
If we have, instead, a three-pipe junction with two pipes in-flowing Vp A, = VPj A2 + Vp^ A3 + Q ..................................................... (6-20)
and one out-flowing as shown in Figure 6-6, an analysis similar to the The impact on the solution of the equations is shown below in the equation
above would give the following equations for the unknown velocities and for Hp.
H-values.
CjAj +C3A2 -CSA3 CjAj - C3A2 ~C5A3 -Q
(6-16)
C2AJ + C4A2+C6A3 C2AJ +C4A2 + C6A3 .................. (6-21)

= C, -CH -
Examination of the form of each of the equations for Hp for the
17)
= C3 -C4H various types of junctions reveals a consistency in the form which would
have permitted the engineer to write down the equations for Hp by
CM

CM

(6-18)
inspection.
-
19)

f
rQ

PIPE 3 PIPE 3

O
PIPE I

Q.
PIPE PIPE 2

Figure 6-6. The two-ln, one-out three-plpe junction.


Figure 6-7. The three-plpe Junction with a constant demand outflow.
100 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 101

Four-Pipe Junctions The results of the analysis give the following equation for Hp.
C,A, ■ C3A2 -C5A3 -C7A4 -Q > i(6.28)
The four-pipe junctions are handled using the same techniques as the
three-pipe junctions. We will examine only one possible combination and C2AI + C4A2 +C6A3 +C8A4
conclude that the others can be found by inspection.
Figure 6-8 shows the one-in, three-out four-pipe junction with the As before, back substitution into Equations 6-22, 6-23, 6-24, and 6-25
possibility of a constant demand discharge Q. The equations along the gives values for the velocities.
characteristics for this situation are As we will see subsequently when pipe networks are discussed,
computer programs can be written which investigate the pipes at each
Pipe 1-C. = C. -C ........................................... (6- junction and automatically classify them according to number and
22) junction configuration. The general approach used to perform this
Pipe 2- = C, +C,FI .......................................... classification employs the pattern we have observed in the previous
CM

C": (6- examples.

M
C
= C. + C.H 23)
...
Pipe 3- 6.3 Interior Mqjor Losses
co

co
hi
C": = C„ +C„H (6-

...
CL,
Occasionally a device occurs in the interior of a pipeline which causes
4k

24)
The remaining equations are
Pipe 4-C': a significant loss in the system, either by design (a pressure reducing valve)
(6- or by necessity (a constriction, a meter, a partially closed valve, etc.). In
Continuity: V A, = V A2 + Vp A3 +V A4 + Q ............................... (6-26)
25) any case, if the loss is significant compared to other frictional losses in the
system, it must be included in the analysis.
Energy: Hp = H2 p = H ..................................... Possible approaches to approximating this loss would be to distribute
r
1 r
3
3 r
d (6-27)
i
it uniformly as though the pipe were rougher, lump it into the boundary
•"o
A

conditions at one of the junctions, or treat it at its physical location in the


pipe. Because the latter most resembles the true physical situation, we will
approach the problem with this configuration in mind.
We will assume that the pipe on each side of the loss is a different size
and that the loss through the device is proportional to the square of the
velocity in the downstream pipe. The approach is similar to that used at
series pipe junctions. The equations along the characteristic lines are
L
C

Pipe 1 - C. ............................................ (6-


29)
Pipe 2 - C': = C, +C.H

CM

KJ
............................................ (6-
Continuity gives 30)
an equation.

Continuity: V
PjAi Vp A2 ........................................... (6-31)

PIPE 2
l-ol

i
Figure 6-8. The one-ln, three-out four-pipe Junction.
PIPE I

Figure 6-9. A model for interior mqjor losses.


PIPE 2
102 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 103

The application of the energy equation across the loss assumes that The solution with all three constants must be recalculated and an
the loss would be the same as for steady flow at the instantaneous unsteady alternate equation for Vp2 must be derived.
velocity.
6.4 Real Valves

(6-32) Of all the unsteady flow situations the engineer will face, the largest

r*
single cause will be from valve movement. By virtue of constricting the
2g flow, the closing valve creates increasing head loss in the pipe system
Combining these equations together by substituting Equations 6-29, which causes the flow to decelerate. Different types of valves create head
6-30, 6-31 into 6-32 gives the following equation for Vp . loss in different manners which are determined by the closing procedure
as well as the mechanical design of the valve.
In a traditional sense, for steady flow hydraulics, the head loss
= 0 ............. (6-33) through a valve is characterized by the equation

To solve the quadratic equation we let


where h^ is the head loss, V is the velocity in the pipe (not the velocity
cs I

B= through the valve opening) and KL is the loss coefficient. In many


4-
—<

instances the engineer may have information which gives the head loss of
his valve at only two or three openings. It is important that he can use this
C= information to synthesize a continuous variation of KL with valve position
and make an analysis with some confidence that his results will be
reasonably accurate.
so that Equation 6-33 becomes
In all cases the instantaneous head loss across a valve will be assumed
+ BV„ -C = to be unaffected by the unsteadiness of the flow, i.e., it will depend only on
valve stem position and valve characteristics as determined by laboratory
testing. With this in mind, we will take the approach that if valve stem
Solving,
movement as a function of time is known, and if KL is known as a
function of valve stem position, then a hydraulic head loss equation can be
written across the valve and used as a boundary condition in our method
of characteristics solution technique. Once we see how this approach can
Because C2 and C4 are always positive, B is always positive; therefore, the
provide solutions to water hammer problems, we will examine valves and
(+) sign in front of the radical must be retained. The final equation is
their head loss characteristics in more detail.
pq]cM

Valve in the Interior of a Pipeline


-1+T 1+—/ ........................................................... (6-34)
li

V 2
B
If a valve in the interior of a pipeline is programmed to close or open
as some function of time, water hammer pressures are created. The
The other velocity and the H-values may be found by back substitution solution procedure follows closely the approach used for series pipes
into Equations 6-29, 6-30, and 6-31. except the heads on each side of the valve are unequal (as with major
One additional problem is created by this type of loss. Should V P2 internal head losses). Figure 6-10 illustrates the typical situation of an
become negative, the energy equation (6-32) is likely to be invalid. Under internal boundary condition at the valve.
reverse flow, Again we have four unknowns and we need four equations. The
V2
V
P, equations are:
Energy (reverse flow): Hp +K. ------ -- HD
rev 2g
Pipe 1-C+: = C, -C.H ....................................... (6-35)
COMPLEX PIPE SYSTEMS 105
104 UNSTEADY FLOW IN PIPELINES

This equation is true as long as flow is in the original direction. If solution


of Equation 6-40 gives a negative value of V p2, we would have to solve
again for flow in the opposite direction. The result would be

4CK

r
rev 6-41)

i Note that the C+ and C' characteristics are determined by the steady flow
situation and need not be redefined as the result of a temporary flow
reversal. However, the reverse-flow head loss characteristics of valves are
generally different than the normal flow characteristics. It is also likely
PIPE I PIPE 2
that they will be difficult to find, so it may be necessary to use the
forward-flow loss characteristics as a best estimate.
Figure 6-10. Valve In a conitant diameter pipeline.
Valve at Downstream End of a Pipe Next to a Reservoir
Pipe 2-C : = Ci +C2H (6-
36) One other case of valve location in a pipeline is common enough to
Continuity: warrant an analysis. In this case the valve is at the downstream end of a
(6- pipeline. It is possible that there could be some confusion as to the nature
37) of the boundary condition (it is no longer an interior boundary condition),
Energy: = H„ +K
2g hence, Figure 6-11 is provided to define the situation. There are now only
(6- two unknowns at Pi so only two equations are required. They are:
Because these equations are similar to Equations 6-27, 6-28, 6-29,38)and
6-30, we can write the appropriate form of Equation 6-31 directly. = C. - C. H (6-
42)

= 0 .................. (6-39)

+
2g

r
(6-
43)
To solve the quadratic equation, we let Arranging the simultaneous solution of these two equations in
quadratic form,
B = 2g

C = 2g

so that Equation 6-39 becomes


C4

The solution is

4CK
Q
C

(6-40)
>

II

-1 + Figure 6-11. Valve and reservoir at the downstream end of a pipeline.


2K
CQ
C4
r
106 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 107

where KL0 is the loss Coefficient when the valve is completely open. This

K>
dimensionless form of loss coefficient has the advantage of varying

+
between 0 and 1.0 and is preferred by some engineers. Because head loss
Defining data will occur in both forms, and because it is easy to convert from one
form to another, this work will use the more common KL form.
B= Several attempts have been made to present the water hammer
pressures generated by valve closure in graphical form. Wood and Jones
[17] briefly comment on these methods and present their own more
C= comprehensive graphs. As they point out, it is impossible to cover all the
effects of friction and system configuration in simple graphical form. This
permits us to write the quadratic equation solution as conclusion is valid and it is for this reason that we will not devote time to
understanding the available graphs, but rather work on computerizing the
procedure in a manner which will permit us to utilize any valve in any pipe
........................ (6-44) configuration.
1+ We will begin by synthesizing KL as a function of position for the
situation where there is a minimum of loss coefficient information. In this
or for reverse flow, example, consider a gate valve whose loss coefficients are known for only
four positions (see Vennard [18] and Table 6-1 below). Additional data on
loss coefficients for other types of valves is given in Appendix II. The next
....................... (6-45) step is to make a plot of KL and 1/KL as a function of percent-open by
rev
plotting the values from Table 6-1 and sketching in a smooth curve. The
result is shown in Figure 6-12.
It is now clear that the impact of valve movement on pressures and It is clear that a problem is encountered when sketching KL near the
velocities in the system can be calculated if we can determine the valve closure. To avoid this problem, we will work only with 1/KL which
particular value of KL for a given valve closing (or opening) scheme. We can be sketched in with more confidence. It should be noted also (see
will now examine the technique and resources available to accomplish this Equations 6-40 and 6-44) that 1/KL *S the term appearing in our analysis.
objective. Next, we construct a table of 1/KL values for even increments of
percent-open for the valve by reading the graph just constructed.
The resulting table is given as Table 6-2.
Finding KL Now, if the valve closing schedule is known, i.e., valve stem position
(percent open) is known as a function of time, we need only to read Table
The procedure for solving the transient problem was described 6-2 to find 1/KL an^ so^ve the appropriate equation at the given time step.
previously. It remains now only to find KL as a function of time. If there To accomplish this, the computer must be programmed to perform table
are tests available for the proposed valve which detail KL as a function of interpolation. This is done by fitting a curve (or a straight line) between
several stem positions, then there is little to do except develop an
interpolation scheme between data points in the KL VS. percentage-open
table. If there are only two or three data points available, then more work
is involved in establishing the KL VS. percentage-open table. Table 6-1. Losa coefficient! for a gate valve.
Head loss characteristics of valves are generally expressed one of two
ways. One of these ways is the loss coefficient KL used before. The second
method is by use of the function T where T is defined as % Open IK

to cn <i O 0.1 5.27


..........................................................(6-46) 9 0.87
<n o O

1.1 0.18
II

04
5 0.04
108 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 109

Table 6-2. 1/K^ for even increment* of percent open.

40 Percent Open I/KL

100 5.27
90 2.50
35
80 1.25

o
70 0.625

c
X

<
1“
L2a 60 0.333

I
th
(Vennard " 4 Ed.) 50 0.179
30
40 0.100
30 0.0556
20 0.0313
25
10 0.0167
0 0.0

time, finding the value of 1/KL at 72.4 percent open, we would calculate it
20 *
from the following equation and the data in Table 6-2.
I / Ku

72,4-70.00
1/K (1.25 -0.625)+ 0.625 ............................... (6-47)

II
80.0 - 70.0

ui
-j

Because this procedure is conceptually easy to grasp, it remains only to


establish how the computer can be programmed to do this.
ro

10
The information on 1/KL for various percent-opens is stored in two
one-dimensional arrays by means of DATA statement shown below.
DATA (KI(I),1=1,11)/0.,.0167,.0313,.0556,.100,.1787,.333,.625,
$1.25,2.50,5.27/
DATA (PCT(I),1=1,11)/0.,10.,20.,30.,40.,50.,60.,70.,80.,90.,100./

At the appropriate location in the computer program (usually at internal


boundary conditions or downstream boundary conditions), the following
sequence of statements shown in Figure 6-13 is inserted to find 1/K£ once
o

100 80 60 40 20 the percent-open (called OPEN) is determined.


o

% VALVE IS OPEN Because of its simplicity, the linear interpolation procedure should be
used whenever possible. However, for functions which are sharply curved
Figure 6-12. and 1/K^ a* function! of percent open. or for table points which are too far apart, higher order interpolation
should be used.
two data points in the table and interpolating. In our problems, straight
line interpolation is often adequate and parabolic interpolation (using a Parabolic Interpolation
second degree equation) is broad enough to cover any case.
The purpose of parabolic interpolation is to obtain more accurate
Linear Interpolation interpolation than possible with the linear method. While this result is
generally achieved for relatively smoothly varying functions, those with
Because linear, or straight line, interpolation is easiest to understand, sharp curvatures or points of inflection can result in poor interpolations.
we will cover it first. If the valve closing schedule required, at a particular
xxv UNSIXUADY FIJUW IN nrtjLINEB COMPLEX PIPE SYSTEMS 111

< n+l) ’ f<Xn-l >


f x

DO 32 1=1,11 B= (6-50)
ITEST=(OPEN-PCT(I))*.10 2 Ax
IF(ITEST.EQ.0) GO TO 33
32 CONTINUE Recognizing that the two coordinate systems are related by the
33 FACT=(OPEN-PCT(I))*.10 equations
KLI=KI(I)+FACT*(KI(I+1)-KI(I))
fix ) = fix)

+
Figure 6-13. Linear interpolation computer code.

c
II
X
The technique is to fit a parabola through the three data points which the parabolic equation can be transformed from local coordinates to the
bracket the range over which interpolation is required (see Figure 6-14). original coordinate system.
Once the parabolic equation has been found, the interpolated value is
calculated by direct substitution. The value x in Figure 6-14 can be fix) = f(xn) + { f(xn+1) + f(xn4) - 2f (Xn) }
thought of as the percent-open of the valve and the value fix) can be
thought of as the 1/KL value. A displaced local coordinate system is ...................... (6-51)
located at xn and the parabolic equation is written in terms of this local

+
coordinate system.
While this equation appears bulky, the computer programming is straight
+
CQ
+

n = A£2 (6-48) forward and computation is efficient.


One difficulty is experienced in the first data interval because there is
The C-value is zero because of the location of the origin of the local no q-value on the negative x-axis. For this case we must alter our local
coordinate system. The values of A and B are found by using the known coordinate system so that its origin is at fn.j. For this first Ax interval the
data at points xn.j and xn+j. Assuming a constant x- spacing Ax of data
special equation is
points, the equations for A and B are

A
A
_ f<xn+l ) + f(Xn-l) - 2f (X„) fix) = fix,) + { f(x3) + f(Xl) ■ 2 f (x2) )
T73 ................. ........................................... (6-49)

-^{ f(x3) + 3f(x1)-4f(x2)} .......... (6-52)

The computer code necessary to accomplish this interpolation

Vi co
M O = Data points into computer

TRUE CURVE shown below in Figure 6-15. While the code could be incorporated into
fix) subrputine, it is so brief that this is not necessary.
PARABOLA
Effect of Valve Closure Schedules on
Water Hammer Pressure
f(x)
f(Xn) The use of real valves in an unsteady flow situation has a more
substantial impact on pressures than our previous technique of artificially
f (Xfi-i) varying the velocity at the valve. This effect is more pronounced with gate
valves where the valve must be almost closed before it generates enough
head loss to slow down the flow noticeably. The result is that, for simple
pipe-reservoir systems, the linear valve closure time must be substantially
X
x
n-i x
nx x
n+i greater than 2 L/a in order to reduce the water hammer pressure
appreciably below the value computed for sudden valve closure. To
Figure 6-14. Definition sketch for parabolic interpolation. illustrate this effect an example problem was worked with three closure
schedules.
112 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 113

IF(OPEN.LT.10.) GO TO 9000
DO 9001 1=2,11
ITEST=(OPEN-PCT(I))*.10
IF(ITEST.EQ.0) GO TO 9002
9001 CONTINUE
9002 FACT=(OPEN-PCT(I))*.10
KLI=KI(I)+.5*FACT*FACT*(KI(I+1)+KI(I-1)-2.*KI(I))+.5*FACT*
$(KI(1+1)-XI(1-1))
GO TO 9004

I
9000 FACT=OPEN*.10 FOR SUDDEN VALVE CLOSURE
KLI=KI(1)+.5*FACT*FACT*(KI(3)+KI(1)-2.*KI(2))-.5*FACT*
$(KI(3)+3.*KI(1)-4.*KI (2))
9004 CONTINUE 700
Figure 6*15. Parabolic Interpolation computer code.

Example 6-2

A pipe-reservoir system has a gate valve at the downstream end with a LINEAR VALVE CLOSURE
steady state head of 300 feet at the valve. For sudden valve closure, an 600
increase in head AH = 431 feet is realized. CLOSE TO 10% IN I SEC
The pressure head at the valve for the following three closure CLOSE TO 0% IN 5SEC
schedules is shown to compare with sudden closure.
CLOSE TO 5% IN I SEC

HEAD AT VALVE-ft
a) Linear closure in 6 seconds CLOSE TO 0% IN 5 SEC
b) Close linearly to 10%-open in 1 second; close linearly to 0%-open
in the next 5 seconds.
c) Close linearly to 5%-open in 1 second; close linearly to 0%-open
500
in the next 5 seconds.
The results of this analysis are shown in Figure 6-16. It is clear that the
last 5 percent or less of valve closure is critical in this case. As an
approximation here; it appears from case (a) that the last 2 percent of
valve closure should be accomplished in a time greater than 2 L/a if any
significant reduction in pressure is to be realized.

6.5 Pressure Reducing Valves

It is not uncommon for pressure reducing valves (PR V’s) to be placed


in pipelines, particularly in water distribution networks. Because of their
common occurrence and because they must be handled numerically
somewhat differently than other internal boundary conditions, we will
examine their behavior briefly.

Quick-Response Pressure Reducing Valves

In this case we will assume the pressure reducing valve is spring

10
st
O
r
actuated and undamped so that it responds instantaneously to changes in

<

>
5
o
r
flow conditions. Because the purpose of the PRV is to maintain (within
limits) a specified pressure on the downstream side, the pressure there
TIME - sec
remains fixed as long as the upstream pressure is greater. Figure 6-16. Water hammer resulting from various gate valve closure
schemes.
114 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 115

However, if the upstream pressure drops below the sum of the

\
pressure setting plus head loss through the valve, then the specified
downstream pressure cannot be held and the valve acts as a major interior

\°+
loss in the pipe. If the pressure situation is altered so greatly as to cause

\
\
back flow in the line to begin, the PRV generally acts as a check valve and 2^—
+
prevents back flow.
It is clear that the PRV can operate in any one of three modes. The
PRV 4-
6
\ PIPE 2
equations describing these situations follow. We assume first that the
PRV is operating in its intended manner. If solution for velocity or
pressure indicates it is operating in a different mode, then we must switch Figure 6-17. Definition sketch for the pressure reducing valve.
to the appropriate set of equations to solve.
For normal operation, the equations are derived as though the PRV
then the flow is still positive, but the pressure on the downstream side has
were a major interior loss. Figure 6-17 defines the flow variables. The
equations along the characteristic lines are dropped below the specified value. We must now resort to Equations 6-29,
6-30, 6-31, and 6-34 to find the unknown velocities and H-values.
IfHp becomes larger than Hpt (orVP2 becomes negative), then the
Pipe 1 - C. = -c (6- velocity must be set to zero and Equations 6-53 and 6-54 used to find the
C» 53) respective H-values.
Pipe 2 • C':
= c3 (6- Slower Acting Pressure Reducing or
54) Pressure Sustaining Valves
Continuity and energy give

Continuity: Most valves of this type are operated by a pilot system which senses
the pressure on the downstream side of the valve and actuates a
(6- diaphragm to change the valve setting and maintain the required
Energy: = H„ +K 55) downstream pressure. Because this pilot operation requires a flow of
liquid to move through the pilot system, there is a finite response time to
sudden and large pressure changes which should be of concern.
(6-2 =
These equations are altered for normal PRV operation in that Hp Most of these types of valves were designed to respond to slower
HpRv = constant. This means that for normal operation 56) varying pressures than those normally found in water hammer situations.
Further, the time-varying response of these valves is unknown and varies
(6-57) from valve to valve as well as with the magnitude of the water hammer
pressure increase. In most instances, these problems preclude any
and sophisticated analysis and the system is assumed to respond instanta-
neously. The approach in the previous section is then used to find
velocities and H-values.
ii

.................................................................... (6-58)
n

6.6 Steady State Pipe Network Analysis


After these calculations are made it is necessary to check and see if
the valve has enough pressure difference to operate normally. If the The steady state analysis of flows in pipe networks can be a very
complex problem. Devices such as pressure reducing valves, minor losses,
required minimum pressure difference is AH,^, then test
booster pumps and supply pumps, as well as reservoirs, all serve to
complicate the analysis. The subject is covered comprehensively by
Jeppson [19] and the reader is referred to that text for detailed
If Hp but (Hpr - rHp ) information. The presentation here will be introductory and will apply
V
<

l 2
►o
V

only to relatively simple systems. However, we will discuss all three of the
K>
116 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 117

most popular methods, the Hardy Cross method, the linear theory method To produce the proper sign on AQ, the denominator is kept negative and
and the Newton-Raphson approach. the terms in the summation in the numerator are positive or negative,
depending on whether one moves with or against the flow while proceeding
Hardy Cross Method clockwise around the loop.
Once the AQ is computed for each loop, it is added (or subtracted)
Because of its simplicity of application, its easily understood theory
from the flow rates in each member of the loop to get a better estimate of
and its amenability to hand calculation, the Hardy Cross method has
the true flow rate. Because the decomposition of (Qj + AQ) n with the
enjoyed (and still enjoys) considerable popularity among practicing
binomial theorem was not exact and because pipes which are common to
engineers.
The basic approach is to first estimate flow rates in all the pipes in a more than one loop have multiple AQ corrections, the calculated AQ’s will
network so that continuity is satisfied at each junction (node). Of course it not be correct. Therefore, the process is iterative and must be continued
is unlikely that the EL-HGL is continuous throughout the network until the error is acceptably small (or no convergence to a solution occurs).
because the original estimates of the flow rates are always erroneous to Although this numerical method is not so sophisticated as the other
some degree. Therefore, this method assumes that there can be found a methods, the results are just as valid, provided convergence is obtained.
unique flow rate adjustment which can be applied to each loop in the Actually, a more careful investigation would reveal that Hardy Cross
network which will cause the EL-HGL to be continuous around each loop. analysis is a decoupled Newton-Raphson analysis.
In hydraulic terms this continuity is expressed as To complete the presentation on Hardy Cross analysis, a simple
program is listed and an example is presented. The main purpose is to
illustrate the simplicity of the approach for uncomplicated networks.
Z Mil

Much more sophisticated programs using Hardy Cross analysis can be


(6-59) found throughout engineering practice.

around each loop where “i” is the pipe number and N is the number of
pipes in the loop. Assuming that the head loss can be written in the form Hardy Cross Example 6-3

L. = The pipe network shown below is to be analyzed by the Hardy Cross


2

computer program for network analysis. The hydraulic properties and


and assuming a correction AQ is being added to the loop to satisfy geometry are labeled on each pipe.
Equation 6-59, this equation becomes

N i cfs

S KjCQj + AQ)" = 0 ............................................................... (6-60)


I8OO-I2-.QI9
(-») 38
—Ijoo-io-, pis
■83 (6)
2.23cfs
where Qj is the best estimate for the discharge in each pipe in the loop. It
remains only to solve for AQ.

t=i
2?/(5) / 17J
Because “n” is generally a non-integer, Equation 6-60 is generally O/

I—I

'55
^22e^§
expanded by the binomial theorem to yield an equation for AQ. Retaining

-
only the first two terms of the binomial expansion, we get the following
equation for AQ.
a
(3)
ZZ

2OOQ-I8-.0165
*’ 3
M

t6l
O
,

AQ i=,i 1 1
......................................... . ................. (6-61) \
N 1.78 cfs

-nS K. Qn_1
i=l 11
118 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 119

The Hardy Cross procedure for hand calculation is listed below


because it will help in understanding the computer code.
1;
2i C PROGRAM NO. 4
Procedure for Hardy Cross Analysis 3: c HARDY CROSS NETWORK ANALYSIS - SIMPLE VERSION
4: c CAPACITY - 400 PIPES, 70 LOOPS
5: c HEAD LOSS CALCULATED BY DARCY EQUATION
Draw the network, labeling the loops and the pipes, showing all pipe 6:
7:
c****
c
lengths, diameters-and roughness values. Show the flow rates into 8:
9:
C N-NO. OF PIPES KK-NO. OF LOOPS ACCFS’ACCURACY OF RESULTS IN CFS
C NO( )=PIPE NO. D()=PIPE DIAM.-IN AL()“PIPE LENGTH-FT
and out of the network. 10: C F() “PIPE DARCY FRICTION FACTOR QO-PIPE FLOW RATE-CFS
11: C NP( )-PRIMARY LOOP NO. NS()-SECONDARY LOOP NO.
Show the estimated flow rates in each member of the loops which
bJ

12: DIMENSION SN(100),SD(100).Q(400).AK(400).p(400),AL(400),D(400),


13: 1NS(400) ,NP (400) ,NOt400) ,DEL(100) ,IIL(400)
satisfy continuity. Each Q-value should be accompanied by a vector 14: 1 READ(5,90) H,KK,ACCFS
15: READ(5,91) (NO<I),D(I),AL(I),E(I),Q(I),NP(I),NS(I),I«1,N)
indicating the direction of flow. 16: WRITE(6,92)
Set up a table showing each pipe number and the K-value associated
GJ

17: WRITE(6,93) (NO <I) ,D(I) ,AL(I) ,E(I) ,Q(I) ,NP(I) ,NS(I) ,I = 1,N)
18: IT-0
with it. 19:
20:
DO 3 1 = 1, N
AD=D(I)/12.
4. Construct a table for each loop as an orderly means of computing the 21: 3 AK(I)»F(I)*AL(I)/(64.4‘(AD**5.)*.7854*.7854)
22: 4 DO 2 1 = 1, KK
AQ-value for each loop. 23: SN(I)=0.0
24 : 2 SD( I) =0.0
Enter the first estimate for Q in the second column of the table for
C/i

25: DO.8 1=1,N


each loop. The sign of Q should be fixed as follows: 26:
27:
QA-ABS(Q(I))
AHUM—AK (I) *Q( I) *QA
28: DENOM-2.*AK(I)*QA
29: J = NP(I)
“If when passing around the loop in a clockwise fashion, 30 : K=NS(I)
31: SN (J)-SN(J)+ANUM
we are moving in the same direction as the flow in a pipe, 32: SD(J)-SD(J)+DENOM
33 : IF (K) 8,8,6
then Q is positive. If we are moving against the flow in a 34: 6 SN (K)-SN(K)-ANUM

pipe, then Q is negative.” 35:


36: 8
SD(K)-SD(K)+DENOM
CONTINUE
37: DO 20 1=1,KK
38: IF (SD(I)) 18,20,18
Compute KQn for each pipe giving this term the sign of Q. 39:
43:
18
20
DEL( I)=SN(I)/SD(I)
CONTINUE
Compute nKQn'l for each pipe giving this term a positive sign in all 41:
42:
DO 25 I=1,N
J = NP (I)
cases. 43 :
44 :
K=NS(I)
IF (K) 24,24,23
Add the KQn and nKQn’l terms for all members of the loops. 45:
46:
23 0(I)=0(I)+DEL(J)-DEL(K)
GO TO 25
SKQn 47 :
48 :
24
25
y'I)=0(I)+DEL(J)
CONTINUE
Compute AQ = for each loop. 49 : IT-IT+1
-SnKQ 50:
51: 28
IF (IT-20) 28,28,50
DO 30 I=1,KK
10. Apply the AQ correction algebraically to each member of the loop for 52 :
53: 30
IF (ABS(DEL(I))-ACCFS) 30,30,4
CONTINUE
all the loops. Be sure to include both AQ corrections for common 54:
55 : 34
DO 34 I»1,N
HL( I)=AK(I)‘0(11*Q(I)
members of loops. 5 6: 40 WRITE(6,94) IT,ACCFS
57: 41 WRITE(6,95)
Be very careful of sign during this correction. Until you become 58 :
59:
42 WRITE(6,96) (NO(I) , AK (I) ,0(1),HL(I),I=1,N)
GO TO 999
confident, check continuity after each AQ correction. 60 :
61:
50
90
WRITL(6,99)
FORMAT(2 13,F9.0)
11. Repeat the process for the adjusted Q starting with item 6. 62:
63:
91
92
FORMAT(I10,4Flfl.0,2110)
FORMAT(1H1,47H THE PIPE NETWORK IS COMPOSED O^ THE FOLLOWING /1H0
64 : 1,9H PIPE NO.,2X,11H DIAM. -IN.,2X,10H LENGTH-FT,2X,8H DARCY F,2X,
Ideally AQ should, with some variation, become smaller fairly 65: 27H Q-CFS,2X,13H PRIMARY LOOP,2X,13H SECOND. LOOP )
rapidly. 66:
67:
93
94
FORMAT(17,Fl 3.1,F14,1,Fl 0.4,Fl0.2,110,115)
FORMAT(1H1,41H THE RESULTS OF THE NETWORK ANALYSIS ARE ,/lH0,
68 : 121H NO. OF ITERATIONS TS ,14,ftX,21HFLOW RATE ACCURATE TO ,F7.3,
12. Calculations must be carried on for all loops until accuracy require- 69 : S4H CFS )
ments are met in all loops. 70 :
71:
95 FORMAT(1H0,9IJ PIPE NO.,7X,5H
S-FT )
K, 8X,BH Q-CFS ,6X,l3H HEAD LOSS

The Hardy Cross analysis computer program used in this example is 72 :


73:
96
99
FORMAT(I7,F18.6,F13.2,F15.2/)
FORMAT (1110,5 5 H AFTER 20 ITERATIONS, ACCURACY IS STILL BELOW STANDA
shown in Figure 6-18. Also shown on the following pages are the data 74 : 1RD )
75: 999 CONTINUE
cards which must be punched and the computer output from the analysis. 76 : STOP
77: END
The negative signs indicate that the direction of the original flow rate
estimate was wrong. Figure 6-18. Computer program for Hardy Cross analysis of pipe
networks.
120 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 121

DATA this. In the linear theory the nonlinear equations for the sum of the head
losses around each loop are linearized. Then the complete set of linear
10 4 0.01
1 18. 1600. .0175 2.45 1 equations (the continuity equations are already linear) are solved.
2 15. 2000 . .018 1.00 1 2
3 18. 2400 . .0175 -2.00 To understand how the procedure works, we need to look at the
4 12.
5 12.
1800.
1900 .
.019
.019 .50
.78 2
2 3
equations involved. For each loop in the network the following equation is
6 10.
7 15.
1300.
1700.
.019
.018
-.83
.20
3
3 4
valid.
8 18. 2000 . .0165 -1,50 3
9 24. 1200. .016 2.31 4 N
10 15. 1800. .018 .08 4

MZ
h = s K Qn = 0
L
i i=l

Computer Output
where N is the number of pipes in the loop. To linearize this equation the
Qjn is decomposed into two pieces so that this equation becomes
THE PIPE NETWORK IS COMPOSED OF THE FOLLOWING

zwy
PIPE NO. DIAM. -IN . LENGTH-FT DARCY F O-CFS PRIMARY LOOP SECOND. LOOP S (KiQ.n'1)Qi = =0

O'
1 18.0 1600.0 .0175 2.45 1 0
2 15.0 2000.0 .0180 1.00 1 2
i= 1
3 18.0 2400.0 .0175 -2.00 1 0
4 12.0 1800.0 .0190 .78 2 0
5 12.0 1900.0 .0190 .50 2 3
6 10.0 1300.0 .0190 -.83 3 0 Of course Kj is now a function of Qj so we are still involved in an iterative
7 15.0 1700.0 .0180 .20 3 4
8 18.0 2000.0 .0165 -1.50 3 0
process.
9 24.0
15.0
1200.0 .0160 2.31 4
4
0 As we solve the set of linear plus linearized equations, the estimate of
10 1880.0 .0180 .08 0
Kj’is revised after each solution. After several iterations the values of Qj
and Kj should converge to their final values. The mathematical form of
the iteration equation is
THE RESULTS OF THE NETWORK ANALYSIS ARE

NO, OF ITERATIONS IS FLOW RATE ACCURATE TO .010 CFS

Z M II

o
« =0

o’

O'
PIPE NO. K 0-CFS HEAD LOSS'
1 .092818 2.20 .45

2 .296951 .92 .25

3 .139228 -2.25 .70 where j is the iteration number. For example, if we are making the 8th
4 .860911 .61 .32 iteration (j=8) then we would calculate Kj r’s from the 7th iteration.
5 .908740 -.27 .07 Experience with the linear theory has shown that the numerical
6 1.547161 -.24 .09
solution tends to oscillate around the final values. To damp out this
7 .252408 .65 .11
numerical oscillation, the iteration equation is altered to include the last
8 .109393 -.91 .89
two iterations for Qj in computing Kj.
9 .015104 2.46 .09

10 .267256 .23 .01

+
o
Linear Theory .0) = 0 ..................... (6-62)

O
NJ
J
The linear theory method is a technique for solving a set of network
equations, some of which are nonlinear, for the unknown flow rates in the
pipes. The equations are generated by writing continuity equations for When starting an analysis, only the direction of flow (not the amount)
flow into and out of each junction and by specifying that the algebraic sum has to be specified. This is a substantial savings in effort over the Hardy
of the head losses around each loop is zero. Solving a set of nonlinear Cross approach. For the first iteration, Kj(>) is assumed to be equal to Kj.
equations is an iterative process and there are many techniques for doing For the second iteration, Kj^) will equal KjfQjUljn-l. Thereafter,
Equation 6-62 will be used for each loop.
122 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 123

Linear Theory Example 6-4

The previous example used for the Hardy Cross analysis will now be C'
c PROGRAM NO. 5
solved using the linear theory. The linear theory program used is shown in c
c
ELEMENTARY LINEAR THEORY - DARCY-WEISBACH VERSION
PREPARED BY G. WATTERS FROM PROGRAM BY JEPPSON
Figure 6-19. On the following page, the data cards and the computer C1
c
output from the analysis are shown.
This program is more powerful than the previously listed Hardy Cross c
program in that it calculates its own Darcy-Weisbach friction factor from c
DIMENSION A(50,51)
IF A( , ) CHANGES DIMENSIONS, STATEMENT 8888 AND 9999 ALSO MUST BE CHANGED
the input pipe roughness and liquid viscosity. The simultaneous equation c
REAL L,KP
solver is appended to be used as a subroutine to solve the set of linearized INTEGER XFLOWS
LOGICAL CFS,GPM,CMS
equations. DATA DI/4IHIN) ,4H(FT) ,4H (M) , 4 H (CM)/LE/4 H (FT) , 4 H ( FT) , 4 H (M) ,
$4H (M)/HLS/4H(FT),4H(FT),4H (M),4H (M)/VIS/5HFT-SQ,5HPT-SQ,5H M-SQ
$,5HCM-SQ/VIS 2/4H/SEC/
DATA DJSCHE/5H(GPM)/DISCHC/5H(CFS)/DISCHM/5H(CMS)/
Newton-Raphson Method NAMELIST /SPECS/ NPI PF.S , NJ UNCT, NLOOPS , ITERAT,NUNIT,ACC,VISCOS,
22 : $XFLOWS,CFS,GPM,CMS
23: C
The Newton-Raphson technique has the same conceptual basis as the 24 :
25:
NPIPES«0
30 CONTINUE
Hardy Cross method. The flow rates in each pipe are assumed which 26 :
27:
GPM=.FALSE.
CFS=.FALSE.
satisfy continuity and these flow rates are corrected so that the sum of the 28 :
29:
CMS’.FALSE.
DELQl’0,05
head losses around each loop is equal to zero. In the Hardy Cross method 30:
31 :
IF(NPIPES.EO.fl) GO TO 330
DO 777 I»1,NJUNCT
the flow rates in each pipe are corrected after each AQ computation. In the 32: JZ=NN(I)
33 : NN ( I)=0
Newton-Raphson method the equations containing AQ are written for 34 : OJ(I)=0.
35: DO 777 J-l ,JZ
each loop, then this nonlinear set of equations is solved for the final value 36 : JN (I,J)“0
37: 777 CONTINUE
of AQ in each loop. When the solution is complete, only then are the initial 38 : DO 778 I’l ,NLOOPS
39: JZ’LL(I)
flow rates in each pipe adjusted to their final value. 40: LL (I) =0
41 : DO 778 J»1 ,JZ
The method gets its name from the technique used to solve the 42: LP (J, I)=0
43: 778 CONTINUE
nonlinear set of equations. The Newton-Raphson technique is a frequently 44: DO 779 I=1,NPIPES
45: JC (I)=0
used, powerful method of numerical analysis. In operation, it adjusts 46 : NPIPE(I)=0
47: JUP(I)=0
successive approximations to the solution by computing the way the 48: JDN(I)=0
solution is moving with respect to each variable and then, based on that 49 :
50 :
D ( I)=0 .
L(l)=0.
computation, calculates new trial values for the unknowns. 51:
52:
E(I)=0.
KP(I)=0 .
The method is best understood by examining it in one-dimension 53: Q( I)“0.
54 : EXPP( I) =0 .
(solution of one equation). The equation to be solved is written 55:
56 :
AR(I)«0.
ARL(I)=0.
57 : 779 CONTINUE
58 : 8888 DO 780 1=1,50
F (x) = 0 59 : DO 780 J«1,51
68 : 780 A (I,J)=0.
61: C
and we must find the value (or values) of x which satisfy the equation 62:
63:
C tlPIPES
C NJUNCT
= NO. OF PIPES
» NO. OF JUNCTIONS
(make F = 0). Our first guess will be x(1) and when we put this number in 64 :
65:
C NLOOPS
C ITERAT
= NO. OF LOOPS
= MAX. NO. OF TRIALS ALLOWED IN SEARCH FOR SOLUTION
the equation, F (x(O) 0 will result. The question is, what is the next 66 :
67:
C NUNIT
C
« B - D AND E IN INCHES, L IN FEET, VISCOS IN FT-SQ/SEC
= 1 - D AND E IN FEET, L IN FEET, VISCOS IN FT-SO/SEC
logical guess for x? To understand the Newton Raphson technique, refer 68 :
69:
C
C
= 2 - D AND E IN METERS, L IN METEPS, VISCOS IN M-SO/SEC
= 3 - D AND E IN CENTIMETERS, L IN METERS, VISCOS IN CM-! ■SO/SEC
to Figure 6-20. The solid line represents F (x) and the true solution is the 70 :
71 :
C ACC
C VISCOS
= ITERATION ACCURACY TO WHICH DISCHARGE IN EACH PIPE IS (
= KINEMATIC VISCOSITY OF LIQUID IN UNITS OF 'NUNIT'
COMPUTED

x-value where F (x) crosses the x-axis. In this technique the slope of F (x) is 72:
73:
C XFLOWS
C CFS
= NO. OF EXTERNAL FLOWS AT JUNCTIONS
= LOGICAL. IF .TRUE,, EXTERNAL FLOWS ARE IN CFS
evaluated at x^), projected to the x-axis and that value of x is used as x<2). 74 :
75 :
C GPM
C CMS
= LOGICAL. IF .TRUE,, EXTERNAL FLOWS ARE IN GPM
8
LOGICAL. IF .TRUE., EXTERNAL FLOWS ARE 111 CU-M/SEC
The cyclic process continues until the value of |x0) - x0’^| is less than 76: C
77 • •c
some specified tolerance. 78 : C READ IN GENERAL NETWORK DESCRIPTION
330 READ(5,SPECS,END®99)
In mathematical form, the previous statements mean C -------------------------------------------------
C
■c

N.7 = NJUNCT
4)
dF = FQ - 0 NP»NPIPES
tJL’NLOOPS
dx x(j-l) - x« NPP’NPIPES+l

Figure 6-19. Linear theory program (from Jeppson [19]).


124 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 125

169: JU=JUP(1)
86: NJ1-NJUNCT-1 170: JD-JON(I)
87: IF(NUNIT,GE.2) DISOUT-DISCHM 171 : NN (JU)=NN(JU) +1
88: IF (NUNIT.LE.l.AND.GPM) DISOUT-DISCHE 172: NN(JD)=NN(JD)+1
89: IF (NUNIT.LE.l.AND.CFS) DISOUT-DISCHC 173: JJ-NN(JU)
90 t C 174: KK=NN(JD)
91: C WRITE OUT PAGE HEADING 175: JH (JU,JJ)-I
92: WRITE(6,200) 176: JN (JD,KK)= -I
93: 200 FORMAT(1H1,llX,27('*')/12X,'* INPUT DATA FOR NETWORKS *'/12X, 177: 300 CONTINUE
94 : $27('*')//) 178: c
95: C 179:
96: C WRITE OUT GENERAL NETWORK CONFIGURATION
97: WRITE(6,203) NPIPES,NJUNCT,NLOOPS,XFLOWS,ITERAT,ACCtDISOUT,NUN IT, 180: c READ IN PIPES COMPRISING EACH LOOP. EACH PIPE NUMBER IS GIVEN A SIGN.
98: SVISCOS/VIS(NUNIT+1),VIS2 181 : c WHEN MOVING CLOCKWISE AROUND THE LOOP, IF YOU ARE MOVING IN THE
99: 203 FORMAT(10X,'NO. OF PIPES =',I3/6X,'NO. OF JUNCTIONS =',13/ 182: c ASSUMED FLOW DIRECTION, THE SIGN IS (+). IF YOU MOVE AGAINST THE FLOW,
100 : $10X,'NO, OF LOOPS =',13/IX,'NO. OP EXTERNAL FLOWS -',13// 183: c THE SIGN IS (-).
101: $4X,'MAXIMUM ITERATIONS I3/4XITERATION ACCURACY - *,F6.3,IX,A5 184 : c JZ = NUMBER OF PIPES IN LOOP
102: S//17X,'NUNIT I2//13X,'VISCOSITY = ' , F9.7,1X,A5,A4//) 185: c LOOPS SHOULD BE CONSIDFRED IN NUMERICAL SEOUENCE
103; C 186: c
104 : C NPIPE() » ARRAY OF PIPE NUMBERS 107: DO 35 1=1,NLOOPS
185: C D() - PIPE DIAMETER - UNITS ACCORDING TO 'NUNIT1 1(18: READ(5,102) JZ,(LP(J,I),J = 1,JZ)
106: C L() = PIPE LENGTH - UNITS ACCORDING TO 'NUNIT' 189: 35 [,L(I)=JZ
107: C E() -PIPE ROUGHNESS - UNITS ACCORDING TO 'NUNIT’ 190: 102 FORMAT(8I10)
108: C JUPO = JUNCTION NO. AT UPSTREAM END 191 :
109: C JDNO - JUNCTION NO. AT DOWNSTREAM END 192: c
110: C 193: c WRITE OUT PIPES IN EACH LOOP
194: WRITE(6,206)
111: C ------------------------------------------------------------------------------------------------------------------------------------------------------------- c
195: 206 FORMAT(// 11X,'*** PIPES IN LOOPS * *’//10X,'LOOP 1 ' ,8X, 'PIPES'/
112: C READ IN DATA ON PIPES
113: 196: 510X, ,2X.23('-'))
READ(5,100) (NPIPE (I) ,D(I) ,L(I) ,E(I) ,J UP (I),JDN(I) ,1-1,NPIPES)
114: 106 FORMAT(110,3F10.0,2110) 197: DO 36 1=1,NLOOPS
115: C------------------------------------------------------------------------------------------------------------------------------------------------------------- c 198 : LLL=LL(I)
116: c 199 : WRITE(6,207) I,(LP(J,I),J=1,LLL)
117: C WRITE OUT PIPE INPUT INFORMATION 200 : 36 CONTINUE
118: WRITE(6,201) DI(NUNIT+1),LE(NUNIT+1),DI(NUNIT+1) 20] : 207 FORMAT(10X,13,2X,15(1X,I 3) )
119: ' WRITE(6,202) (NPIPE(I),D(I),L(I),E(I),JUP(I),JDN(I),1-1,NPIPES) 202 : DO 5 1=1,NP
203 : IF(NUNIT .GT. 1) GO TO 66
120: 201 FORMAT(2X,'PI PE DIAM LENGTH ROUGHNESS J-UP J-DWN’/
20 4 : KP(I)*« 0009517* I, (I)/D (I) **4.87
121: $8X,A4,3X,A4 ,5X,A4/2X, — ------- ',6('-'),2X,9('-'),2X,4(’-'),2X, 205: GO TO 5
122: 55()) 206 : 66 KP (I)=.00212 *L(I)/D(I)* * 4.87
123: 202 FORMAT(2X,13,2X,F5.1,IX,F7.0,IX,FB .6,4X , 13,4X , 13)
207: 5 CONTINUE
124: C
208 : ELOG=9.35*ALOG10(2.71828103)
125: DO 48 1=1,NP
209 : NCT=0
126: 48 F.(I)-E(I)/D(I) 210: c
127: IF(NUNIT-l) 40,41,42 211: c CALCULATE ELEMENTS OF COEFFICIENT MATRIX
128: 40 DO 43 1 = 1,Np 212: c
129: 43 D(I)-D(I)/12. 213: 20 CONTINUE
130: 41 G2-64.4 214: DO 6 1 = 1 , NJ1
131: GO TO 50 215: DO 7 J = 1 , N P
132: 42 IF(NUNIT .EQ. 2) GO TO 45 216: 7 A(I,J)=0.
133: DO 46 I»1,N P 217: NNJ-NN(I)
134: 46 D (I) = .01*D(I) 218: DO 8 J=1,NNJ
135: VISCOS=.0601*VISCOS 219: IJ=JN(I,J)
136: 45 G2-19.62 220: IF(IJ .GT. 0) GO TO 9
137: 50 CONTINUE 221: IIJ=ABS(IJ)
138: DO 70 1=1,NP 222: A (I, IIJ)—1.0
139: AR (I)=0.7854*D(I)**2 223 : GO TO 8
140: 70 ARL(I)=L(I)/(G2*D(I)*AR(I)**2) 224 : 9 A(I,IJ)=1.0
141 : C 225: 8 CONTINUE
142: c ............. ............. ............. - --------------- -------------------------------------------------------------------------------- - --------------------- C 226 : IF(ABS(QJ{I)).LT.0.0001) GO TO 10
143: c READ IN EXTERNAL FLOWS AT JUNCTIONS 227: A(I,NPP)-QJ(I)
144: C I = JUNCTION NUMBER
228 : GO TO 6
145: C QJ () « EXTERNAL FLOW IN UNITS GIVEN BY LOGICALS 'GPM', 'CFS', 'CMS'
229: 10 A(I,NPP)=0.
146: C IF FLOW IS INTO NETWORK, SIGN OF QJ () IS (+) - IF OUT OF NETWORK, SIGN IS (-)
230 : 6 CONTINUE
147: READ(5,101) (I,QJ(I),11 = 1,X FLOWS) 231 : DO 11 I=NJ,NP
148: 101 FORMAT(4(IIP,F10.0))
C---------------------------------------------------------- -------------------------------------------------------------------------- - ---------------------- c 232 : DO 22 J«1,NP
149: 23 3 : 22 A(I,J)=0.
C
150: 234 : II-I-NJ1
C WRITE OUT EXTERNAL FLOWS AT JUNCTIONS
151': 235 : NNJ-LL(II)
WRITE(6,204)
152: 236: DO 12 J-l.NNJ
204 FORMAT(///l1X,'*** EXTERNAL FLOWS ***'//10X,'JUNCTION INFLOW OU
153: 237 : I J = LP(J,11)
STFLOW*/10X,8() ,3X,6( ' - ’) ,2X,7 ('-'))
154: 238 : IIJ=ABS(IJ)
DO 771 I=1,NJUNCT
155: 2 39: IF(IJ .LT. 0) GO TO 13
QIU-0 .
156: 240 : A ( 1, 11J)=KP(11J)
QOUT-0,
157: 241 : GO TO 12
IF(ABS(QJ(I)).LT.0.001) GO TO 771
158: 242 : 13 A (1,11J)=-KP(11J)
IF(QJ(I).LT.0 , ) OOUT-QJ(I)
159: 24 3 : 12 CONTINUE
IF(QJ(I).GT.0.) QIN - QJ(I)
160: 24 4 : 11 A(I,NPP)=0.
IF(GPM) QJ(I)»QJ(I)/449.
161: 24 5 : V(1)=4 .
WRITE(6,205) I,QIN,QOUT
162: 246 : c
771 CONTINUE
163: 247 : c SOLVE SIMULTANEOUS EQUATIONS
IF (GPM) ACC-ACC/449.
164 : 248 : c
205 FORMAT(12X,13,4X,F8,1,IX,F8,1)
165: 249 : 9999 CALL GJR(A,51,50,NP,NPP,JC,V)
C
166: 2 50 : IF(NCT.EQ.0) GO TO 499
C DETERMINE SIGNS OF PIPE NUMRERS AT EACH JUNCTION
167: 251: DO 49 I=1,NPIPES
168: DO 300 1 = 1,NPIPES 252 : BB=A(I,NPP)

Figure 6-19. Continued. Figure 6-19. Continued.


126 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 127

253 : IF(ARS(D8-Q(I)).GT.ACC) GO TO 499


254 : 49 CONTINUE 3 36: HLL-KP(I)*ABS(Q(I))
255 : GO TO 998 3 37 : IF(GPM) Q(I)“449.*Q(I)
256 : 499 CONTINUE 338 : IF(NUN IT.EO•0) D(I)=12.*D(I)
257 : C 339 : IF(NUNIT,EQ.3) D(I)=100.*D(I)
253 : C CONFUTE NEW FRICTION FACTOR AND K-TERM
340: WRITE (6,214) NPIPE ( I) ,D(I) ,L( I) ,Q (I) , liLL
2 59 : C
341 : 990 CONTINUE
260: DO 51 1=1,NP
3 42 : 214 FORMAT(3X,13,1X,F6.2,1X,F?.0,2X,F9.2,2X,F8.2)
261 : BO-A(I, NPP)
343 : GO TO 30
262 : IF(NCT) 60,60,61
344 : 99 STOP
263 : 60 QM-BB
345; END
264: GO TO 62
346 :
265 : 61 QM-,5 *(Q(I)+BB)
347 :
266 : 62 Q (I)SQM 348 :
267 : DELQ’OM*DEL01
349 : SUBROUTINE GJR(A,NC,NR,N,MC,JC,V)
268 : QM=ABS(QM)
350 : DIMENSION A(NR,NC) ,JC (NR),V(2)
269 : VI=(QM-DELQ)/AR(I)
270 : IF(Vl .LT. .001) V1-.002 351: IW-V(l)
271: V2 =(QM+DELQ)/AR(I) 352 : M=1
353: s = l.
272 : VE=QM/AP(I)
273 : RE1=V1*D(I)/VISCOS 354 : L»N+(MC-N)•(IW/4)
274 : RE2-V2*D(I)/VISCOS 3 55 : KD«2-MOD(IW/2,2)
2 75 : IF(RE2 .GT. 2.1E3) GO TO 53 356 : IF(KD .EQ. 1) V(2)»0.
276 : Fl=6 4./RFl 357: KI-2-MOD(IW,2)
277: F2 = 64 ,/RE2 358 : GO TO (5,20),KI
278 : EXPP(I)«1. 359: 5 DO 10 1=1,N
279 : KP (I)“81 . 48733 *VISCOS*L(I)/(G2*D(I)**3) 360 : 10 -JC(I)“I
280 : GO TO 51 361 : 20 DO 91 I«=l ,N
281 : 53 MM»fl 362: GO TO (22,21),KI
282: F“1,/(1.1 4-2.*ALOG10(E(I))|*‘2 363: 21 M-I
283: PAR=VE*SQRT( . 125*F) *D(1) *E (D/VISCOS 364 : 22 IF(I .EQ. N) GO TO 60
284 : IF(PAR .GT. 65.) GO TO 54 365: X—1.
285: RE-REI 366: DO 30 J-I,N
286 : 57 MCT«fl 367: IF(X .GT. ADS(A(J,I))) GO TO 30
287 : 52 FS=SQRT(F) 36S: X«ABS(A(J, I) )
283 ; FZ-.5/(F*FS) 369 : K=J
289 : ARG’E(I)+9.35/(RE*FS) 370 : 30 CONTINUE
298 : FF=1./PS-1.14+2.*ALOG10(ARG) 371 : IF(K .EQ. I) GO TO 60
291: DF»FZ + F.LOG*FZ/(ARG*RE) 372 : S = -S
292 : DIF-FF/DF 373 : V(1)«-V(1)
293: F-F+DIF 3 74 : GO TO (35,40),KI
294 : MCT-MCT+I 375 : 35 MU-JC(I)
295 : IF(A8S(DIF) ,GT. .00001 .AND. MCT ,LT. 15) GO TO 52 376 : JC(I)SJC(K)
2 96 : IF(MM .EQ. 1) GO TO 55 377 : JC(K)-MU
297: MM-1 378 : 40 DO 50 J=M,L
298 : RE«RE2 379 : X=A(I,J)
299: P1 = P 380 : A(I,J)»A(K,J)
300 : GO TO 57 381: 50 A(K,J)-X
301 : 55 P2=P 38 2 : 60 IP (ABS(A (I,I)) ,GT. 0.) GO TO 70
302: 8E=(ALOG(Fl)-ALOG(F2))/(ALOG(OM+DELQ)-ALOG(QM-DELQ)) 383: IP(KD .EQ. 1) V(1)»0.
303: AE=F1*(QM-DELQ)**DF 364 : JC (1)=1-1
304 : EP-1.-BE 385: RETURN
305: EXPP(I)=EP+1. 366 : 70 GO TO (71,72),KD
306: KP(I)«AE‘ARL(I)*OM**EP 367 : 71 IF(A(I,I) .LT. 0.) S=-S
307 : GO TO 51 36 8 : V (2)-V(2)+ALOG(ABS(A(I,I)) )
308 : 54 KP(I)=F*ARL(I)*QM**2 369 : 72 X*A(I,I)
309: EXPP(I)»2. 390: DO 80 J«M, L
310: 51 CONTINUE 391: A(I,J)=A(I,J)/X
311: C 392 : 80 CONTINUE
312: C CHECK ITERATIVE COUNT 393: DO 91 K-1,N
313: C 39 4 : IF(K .EQ. I) GO TO 91
314 : 17 NCT-NCT+1 395: X«=A(K,I)
315: IF (NCT»LT»ITERAT) GO TO 20 396 : A(K,I)«0.
316: IF(NCT.EQ.ITERAT) WRITE(6,108) NCT 397: DO 90 J=M,L
317: 108 FORMAT ( ////'ITERATIVE PROCESS DID NOT CONVERGE IN ' ,13,' ITERATI 398: A(K,J)=A(K,J)-X *A(I , J)
318: SONS. SOLUTION IS TERMINATED.') 399: 90 CONTINUE
319: GO TO 99 400: 91 CONTINUE
320 : 998 CONTINUE 401: GO TO (95,140),KI
321: C 402: 95 DO 130 J»1,N
322 : C WRITE OUT FINAL NETWORK CONFIGURATION 403 : IP (JC(J) .EQ. J) GO TO 130
323 : C 404 :
324 : WRITE(6,210) JJ-J+1
405: DO 100 I»JJ,N
325: 210 FORMAT(1 Hl,6X,31('*')/7X,1 * FINAL NETWORK CONFIGURATION *'/7X, 406 :
3 26 : ' *'}//) IP(JC(I) .EQ. J) GO TO 110
407 : 100 CONTINUE
327 : WRITE(6,215) NCT
408 : 110 JC(I)-JC(J)
328 : 215 FORMAT(10X,'ITERATIONS »’,13/)
409 :
410: X-A(K,I)
DO 120 K = 1,N
3 29 : WRITE(6,211>
330: 211 FORMAT(3X,1PI PE DIAM LENGTH DISCHARGE HEAD LOSS’) 411: A(K,I)«A(K,J)
3 31: WRITE(6,212) DI(NUNIT+1),LE(NUNIT+1),DISOUT,HLS(NUNIT+1) 412: 120 A(K,J)=X
413: 130 CONTINUE
3 32 : 212 FORMAT(9X,A4,3X,A4,5X,A5,7X,A4)
414: 140 JC(1)»N
333: WRITE(6,213) IF(KD .EQ. 1) V(l)-S
334 : 213 FORMAT(3X,------------- ',2X, -------------- ',2Xr6(,-,)r2X#9C*-')r2X,9(,-'}> 415:
416: RETURN
335 : DO 990 I»1,NPIPES
417: END

Figure 6-19. Continued. Figure 6-19. Continued.


128 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 129

DATA

*** EXTERNAL FLOWS

SSPECS :IPIPES-IO,NJUNCT»7,NLOOPS»4,ITBRAT-20,NUNIT-0,ACC-I.0,VISCOS- 000010a JUNCTION INFLOW OUTFLOW


X FLOWS= 7 , GPN=T,
SEND
1 2000.0 .0
1 18. 1600. .0102 1 2 2 .0 -300.0
2 15. 2000, .0192 2 3 3 .0 -900 . fl
3 18. 2400 . .0102 1 3
4 .0 -500,0
4 12. 1800. .0102 2 4
5 1500.0 .0
5 12. 1 900, .0102 4 3
4 6 .0 -800.0
6 10. 1300 . ,009 5
6 7 .0 -1000.0
7 15. 1700. .0102 5
8 18. 2000 . .009 3 6
9 24 . 1200 . .0102 5 7
*** PIPES IN LOOPS *"
10 15. 1800. .0102 7 6
1 2000 . 2 -300. 3 -930. 4 -500, LOOP PIPES
5 1500 , 6 -800, 7 -1000.
3 1 2 -3
1 1 2 -3
3 4 5 -2 4 5 -2
2
4 7 -8 -5 •6
3 7 -8 -5 -6
3 9 10 -7 4 9 10 -7

Computer Output
•**•********•**•»*»»»*»•*»*»***
* FINAL NETWORK CONFIGURATION *

ITERATIONS ■ 3

PIPE DIAM LENGTH DISCHARGE HEAD LOSS


(IN) (FT) (GPM) (FT)

1 18.00 1600. 984.12 .49


2 15.00 2000. 409.01 .29
3 18.00 2400 . 1015.88 .79
4 12.00 1800. 275.11 .38
5 12.00 1900. -122.54 .09
6 10.00 1300 . 102.35 .11
7 15.00 1700 . 290.42 .13
8 18.00 2000 . 402.35 .11
9 24.00 1200. 1107.23 .11 (I)

IL.
10 15.00 1800. 107.23 .02

* INPUT DATA FOR NETWORKS *


***************************
(2)

IL.
NO. OF PIPES = 10
NO. OF JUNCTIONS = 7
NO. OF LOOPS = 4
NO. OF EXTERNAL FLOWS = 7

MAXIMUM ITERATIONS - 20
ITERATION ACCURACY * 1.000 (GPM)

NUNIT ’ 0

VISCOSITY = .0000103 FT-SQ/SEC

PIPE LENGTH J-UP J-DWN


Solving for
DIAM ROUGHNESS
(IN) (FT) (IN)
-—— ______ _________ ____ _____
1 18.0 1600 . .010200 1 2
2 15.0 2000. .010200 2 3 = x0-l)_
3 18.0 2400 . .010200 1 3 (6-63)

o.
X
4 12.0 1800 . .010200 2 4 dF<J-D
5 12.0 1900 . .010200 4 3
6 10.0 1300 . .009000 5 4 dx
7 15.0 1700 . .010200 5 6
8 18.0 2000. .009000 3 6
9 24.0 1200 . .010200 5 7
10 15.0 1800. .010200 7 6 Because the functional form of F is known, the derivative can be found
and its numerical value determined by substitution of the appropriate
x-value.
130 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 131

Of course it is possible that there is more than one solution to the approximation for x; and the inverse computed. However, this is a very
equation (F(x) crosses the x-axis more than once) and it is possible to find large computational task for large numbers of simultaneous equations,
the wrong one. Also it is possible to start searching at an x-value which hence, we employ a slightly different approach when working with
leads you further from the solution rather than closer. Fortunately, the hydraulic networks.
network equations generally do not exhibit this behavior and solutions for In hydraulic networks,
AQ are unique.
The Newton-Raphson technique in two or more dimensions (two or

MZ
more equations with two or more unknowns) proceeds in the same manner KQ" = 0

ll
except each function Fj can depend on a large number of xj^’s. As a result =1
the iteration equation for finding the next trial values for the x^’s is not so
simple as Equation 6-63. However, because the Qj’s are unknown, we must guess a value Q Oj in
We now have a set of equations each pipe and search for AQ’s which will correct the Q0’s to the proper
F
value. The loop equations now are of the form
1 (xI,x2,x3, ...,x ,...x^) =

O
F2 (Xl, XJ , x3

a
r
*
(6-67)
II
o
= 0, k= 1,K

because any pipe in a given loop may be a member of other loops and their
II
o

In finding the next trial value for the x^’s, we use the equations AQ’s must be included. Then, in general, we may write
dFk0-D Fk (AQj.AQ,, ........... AQK) = 0, k=l,K ................................... (6-68)
dx7
If we now represent AQ® - APO'!) as dQ® then Equation 6-65 can
be used to show

[J®1)] { 6Q®} = -{F®1)} ................................................. (6-69)


4

4
-

where k represents the loop number. There are K of these equations, one This equation is now solved for dQ® and we can write
for each loop.
It is most convenient to express this set of equations in matrix form AQ® = AQ®1}

4
-
after each iteration. When dQ becomes small enough, an acceptable
{ F®®} + [J®1^ x® -x®1*} = {0} ..............................................(6-65) solution has been obtained.
It should be noted here that this method only requires the solution to
where [J] is a K x K matrix of (dFCHVdxfc) known as the Jacobian. a set of equations equal in number to the number of loops. The linear
Converting this to the same form as Equation 6-63 gives theory must solve a set of equations equal in number to the number of
unknown flow rates. Consequently, the Newton-Raphson technique
requires substantially less storage space and computer time for solving the
[j(J-D]{xw} -[J®1)] = -{ F®1}) set of equations.
or
Newton-Raphson Example 6-5
■ [J®1} 1 _1{ F®1}) .................................. (6-66)
An example of the Newton-Raphson approach has been chosen which
In one dimension, the inverse of the Jacobian is l/(dF/dx). Because all the can also be used to illustrate the transient program. A sketch of the
F
k can be differentiated, the Jacobian can be evaluated at each new network is shown on Figure 6-21. Because this program will handle
132 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 133

reservoirs and source pumps (wells or pump-reservoirs), these two features


are included.
Comment cards throughout the program listing in Figure 6-22
describe the procedures and format for input data so no detailed
discussion will be included here. Rather, sample data input and the
computer output from an analysis are shown at the end of Figure 6-22 to
illustrate the program use.
This program does not include many convenience and flexibility
features of more sophisticated programs available. It is intended as a basic
program which will handle a large variety of situations without requiring
extensive computer facilities. It also serves to illustrate the interfacing
necessary between the steady state and transient analysis programs.

6.7 Water Hammer In Pipe Networks

The steady state analysis has provided a means of developing steady


state flow rates in each pipe in the network. This information is used to
initialize the water hammer analysis and requires that the pipe network
analysis program be compatible with our water hammer programs.

Boundary Conditions

We have already discussed most of the boundary conditions which


can occur in pipe networks. The type of boundary condition at a particular
junction is determined from the steady state analysis by testing to see how
many pipes there are at the junction and how many are inflowing and
outflowing. Then appropriate boundary equations from the section on
branching pipes are applied.
If a reservoir occurs at a junction or at the upstream end of a supply
line, then the Hp = constant reservoir condition applies.
In case of a pump and reservoir in a supply line, the pump boundary
condition equat’ons, 5-31 and 5-32, can be used as an external boundary
condition.
For a booster pump occurring in a line, the boundary condition at
one end of the line could be modified to include the pump characteristics.
Another technique would be to break the line into a two-part series pipe
with the booster pump as an interior boundary condition in that pipe. This
last technique would also be applicable to minor and major internal
losses.

Specified Time-Varying Boundary Conditions

Generally, network transients are caused by time-varying demands at


the nodes or valve closures in the system. The more specialized case of
pump startup or shut down will be addressed later.
134 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 135

80: IF(ABS(ELG(JD)).LT..01.AND.ABS(ELDN).GT..01) ELG(JD)=ELDN


81: 1 PIPE(I)=II
82: 101 FORMAT(IIP,4 Fl 0.0,215,2 Fl 0.0)
83: C
84 : IF(CHW(1).GT.10.) HAZEN-.TRUE,
85: IF (CHW(1) .LT.10 .) DARCY®.TRUE,
C' 86: HEXP-1.852
C’ PROGRAM NO. 6 87: IF(DARCY) HEXP-2.
C’ NEWTOtl-RAPHSON NETWORK ANALYSIS PROGRAM 88: WRITE(6,302) DISCH
C' INCLUDES SOURCE PUMPS AND RESERVOIRS. 89: 302 FORMAT(17X,'** PIPE DATA * *'//2X,'PIPE DIAM-IN LENGTH-FT FLOW-*
C' HAZEN-WILLIAMS HEAD LOSS FORMULA OR DARCY-WEISBACH FORMULA. 90: $,A3,2XROUGHNESS COEFF, NODE UP NODE DN'/2X,’ ------------- ’,2X,7 ( '-') ,
C' SPECIAL VERSION WITH PROVISION FOR OUTPUT TO TRANSIENT PROGRAM. 9 1: $2X,9('-'),2X,8( , 2X,16('-'),2X,7 ('-'),3X,7('-'))
C' IF TRANSIENT ANALYSIS IS PLANNED, PIPES AND NODES MUST BE NUMBERED 92: DO 4 II-l,NPIPES
C' AND INPUT IN SEQUENCE AND ONLY DARCY-WEISBACH FORMULA IS PERMITTED 93: I-PIPE(II)
C1 PREPARED BY G. WATTERS MARCH 1978 FROM PROGRAM BY JEPPSON 94 : IF(DARCY) WRITE(6,303) I,D(I) ,L (I) ,QI (I) ,CHW(I) ,JUP (I) , JDN(I)
C' 95: IF(HAZEN) WRITE( 6,3033) I,D(I) ,L(I) ,01(I) ,CHW(I) ,JUP(I) ,JDN(I)
c 96: 30 3 FORMAT(2X,I 3,3X,F6.2,3X,F8.0,2X,F9.2,6X,F7.4,7X,15,5X,15)
DIMENSION DR(50,51) 97: 30 3 3 FORMAT(2X,13,3X,F6.2,3X,F8.fl,2X,F9.2,6X,F6.0,7X,15,5X,I 5)
c 98: 4 CONTINUE
c IF DR( , ) CHANGES DIMENSIONS, THE CALL FOR SUBROUTINE GJR MUST 99: C
c BE MODIFIED TO REFLECT NEW ARRAY SIZE “ 100: CI = LOOP NUM3ER
c 101: C NNP ~ NUMBER OP PIPES IN THE LOOP
DIMENSION D(50),L(50),K(50) ,CHW (50) ,01(50) ,DQ(50),PT PE(50) 102: C INCLUDE BOTH REAL AND PSEUDO LOOPS
DIMENSION JUP(50),JDN(5<’),ELHGL(50),MLOP(50),LOP(50,4),ELG(50) 103: C LP (I,J) - PIPE NUMBERS AROUND LOOP 'I'. WHEN HOVING CLOCKWISE, IF YOU MOVE
DIMENSION LLP(5) ,A ( 5) ,B (5) ,HO(5) ,LO(5) 104 : C IN THE DIRECTION OF FLOW THEN SIGN IS POSITIVE. IF AGAINST,NEGATIVE
DIMENSION LP(42,7 ) ,NN(42) ,DELEV(42) ,LOOP(4 2) 105: C
DIMENSION V (2) 106: DO 22 II-I,NODES
REAL L,K 107: 22 ELHGL(II)=0.
INTEGER PIPE 108 : DO 2 11-1 ,NL
LOGICAL DARCY,HAZEN,GPM,TRANS 109 : DQ(I)-0.
NAMELIST /INDATA/ NPIPES,NLOOPS,MAX,NPUMP,NSLOOP,ACC,GPM,TPANS 110: c ------- --- ------- --- - ------------- --- ---------------------------------------------------- ------- ------- ------- --- ------- --- -- ------------ _
SHODES,NELEV,ELELEV 111: READ(5,100) I,NNP,(LP(I,J) ,J -1,NNP)
DATA OUTG/3IIGPM/OUTC/3HCFS/ 112: C ---------- ----------- -------- - ---------- _ _ ----------- --- - - ------- --------- - - - ----------------- ------- --- -- ------- ------- ----------------
DATA HAZEN,DARCY,GPM,TRANS/4*.FALSE./ 113: 100 FORMAT(10I5)
c 114 : LOOP(II)=1
c NPIPES ■= NUMBEP OF PIPES 115: 2 NN(I)«NNP
c NLOOPS = NUMBER OF LOOPS ( INCLUDES BOTH REAL LOOPS AND PSEUDO LOOPS) 116: C
c MAX • MAXIMUM NUMBER OF ITERATIONS ALLOWED IN SEARCH FOR A SOLUTION 117: WRITE ( 6,3<?4 )
c NPUMP = NUMBER OF PUMPS IN THE NETWORK 118: 304 FORMAT(//10X,'* * PIPES IN LOOPS *•'//8X,'LOOP',8XPIPES'/
c NSLOOP » NUMBER OF PSEUDO LOOPS IN THE NETWORK 119: $8X,4 ( '-') ,2X,19 ( ’-’))
c ACC = LIMIT IN CHANGE OF DO’S IN EACH LOOP , IF CHANGES IN ALL OQ-S DO 290 II-1,NLOOPS
BETWEEN ITERATIONS IS LESS THAN 'ACC', THEN ANALYSIS IS TERMINATED 120:
c I-LOOP(II)
121:
c GPM = LOGICAL IF TRUE THE DISCHARGES INPUT INTO PROGRAM ARE IN GPM NNP-NN(I)
122:
c TRANS « LOGICAL. IF TRUE DATA IS WRITTEN ON EXTERNAL DISK FILE 123: WRITE(6,305) I, (LP(I,J),J-1,NNP)
c WHICH MUST BE MADE AVAILABLE BY USER. 124: 305 FORMAT(8X,13,3X,10(13,1X))
c NODES « NUMBER OF NODES INCLUDING RESERVOIRS 125: 290 CONTINUE
c NELEV - NODE NUMBER OF NODE WHOSE ELEVATION IS INPUT TO LOCATE EL-HGL 126: IF(NPUMP .EO. 0) GO TO 30
c ELELEV ® ELEVATION OF THE ABOVE NODE 127: C
c 128: C LLP() » NUMBER OF LINE CARRYING PUMP
c 129 : C A,B,HO • COEFFICIENTS IN THE SECOND DEGREE EQUATION EXPRESSING HEAD AS
98 READ(5,INDATA,END-99) 130: C A FUNCTION OF DISCHARGE IN CFS
c 131: C
c 132: DO 31 1=1,NPUMP
WRITE(6,300) 133: c ------- --- -------------------- ------- ------- ----------- - ---------- ---------------- ------- ------ ------------------------- --- -------------------- ---
1
300 FORMAT(1 HI,11X,22('*')/I2X,'* NETWORK INPUT DATA * /I2X,22('*')//) 134 : 31 READ(5,101) LLP(I) ,A(I) ,B (I) ,HO(I)
DISCH-OUTC 135: c ------- ------ -------------------------- ------- ------- - ---------- --- -- ------------------------ ------- ------- ------- ------- ------- ------- --------
IF(GPM) DISCH’OUTG 136: C
WRITE(6,301) NPIPES,NODES,NLOOPS,NPUMP,NSLOOP,MAX,ACC,DISCH 137: WRITE(6,306)
301 FORMAT(10X,'NUMBER OF PIPES =13/10XNUMBER OF NODES =',13/ 139: 306 FORMAT(//10X,'** PUMP INFORMATION * *'//5X,'LINE PUMP'/7X,*IS IN*,
S10X,'NUMBER OF LOOPS =',13/ 139: S4X,'A',6X,'B’,6X,'HO'/7X,5('-'),2X,5('-’),2X,5('-'),2X,6('-') )
$10X,'NUMBER OF PUMPS =', 13/9X,* NO. PSEUDO LOOPS »',I3// 140: WRITE(6,307) (LLP(I),A(I),B(I),HO(I) ,1-1,NPUMP)
$10X,'MAX. ITERATIONS I3//10XITERATION ACCURACY =',F6.3, 141: 307 FORMAT(8X,13,F8.2,F7.2,1X,F7.1)
$1X,A3//) 142: 30 IF (NSLOOP.EQ.0) GO TO 292
IF(GPM) 'ACC’ACC/4 49 . 143: C
NP=NPIPES 144: CI = NUMBER OF PSEUDO LOOP
60 : NL=NLOOPS . 145: C DELEV() » ELEVATION DIFFERENCE BETWEEN RESERVOIRS. TO DETERMINE SIGN, MOVE
61: NSL-NSLOOP ' 146: C AROUND PSEUDO LOOP IN CLOCKWISE DIRECTION. SUBTRACT THE ELEVATION
62 J NLP-NL+1 147: C OF THE FIRST RESERVOIR BEFORE THE PSEUDO PIPE FROM THE ELEVATION
63: C 148: C OF THE RESERVOIR JUST AFTER THE PSEUDO PIPE.
64 : C II “ PIPE NUMBER 149: C
65: C D() » PIPE DIAMETER IN INCHES 150: DO 32 11=1,NSL
66: C L() » PIPE LENGTH IN FEET 151: c ------- ------- ---------------- ------- ------- ------- --- ------- ------- --------- - - ---------- ------- --- -- ------- ------ --------------------------
67: C CHWO » PIPE HAZEN-WILLIAMS COEFFICIENTOR •DARCY-WEISBACH FRICTION FACTOR 152: READ(5,101) I,DELEV(I)
68: C QI() « ESTIMATED DISCHARGE IN PIPE (ALWAYS POSITIVE) INCFS OR GPM 153: C------- ---------------------------- - -------------- --- ----------- ------- ---------------- ------- ------- ------- ------ ------------------------- --------
69: C JUPO = UPSTREAM NODE NUMBER FOR PIPE 154 : 32 LO(II)=I
70: C JDN() = DOWNSTREAM NODE NUMBER FOR PIPE 15 5: C
71: C ) 156: WRITE(6,308)
72 : DO 1 1=1,NP J 157: 308 FORMAT(//5X,'** PSEUDO LOOP INFORMATION * *'//5X,'LOOP DIFF. IN RES
73: c ------- --- -- ------- ------- ______ ---------------------- --- ----------- ------- ------- ----------- --- _ ---- ------- ------- ------- --- - . 1 158: SERVOIR ELEV.-FT'/5X,'------------------ ',1X,27('-'))
74: READ(5,101) II,D(II),L(II),CHW(II),QI (11) ,JUP(11) ,JDN(11) ,ELUP, • 15 9: DO 3J1 11*1,NSLOOP
75: SELDN | 160: I-LO(II)
76: c --------------- ________ --------------------------- ------- --- ----------- ------- ------- ------- --- -- -------- --- _ _ i 161: WRITE(6,309) I,DELEV(I)
77: ----------------- ---------------------------------------- ------- ---
JU-JUP(II) 162: 309 FORMAT(5X,13,10X,F8.2)
78: JD-JDN(II) f 163: 310 CONTINUE
79: IF(ABS(ELG(JU)) .LT. .01.AND.ABS(ELUP) .GT..01) ELG(JU)= ELUP } 164: 292 CONTINUE

Figure 6-22. Newton-Rapluon program (from Jeppson [15]). Figure 6-22. Continued.
136 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 137

165: DO 50 IZ«1,NP 246 : C SOLVE SIMULTANEOUS EQUATIONS


166: I»PIPE(I2) 24 7 : c
167 : D (I) =D (I) /1 2 . 248: CALL GJR(DR,51,50,NL,NLP,D, V)
168 : IF(GPM) 01(I)=01(I)/4 4 9 , 2 49 : DO 7 I2=1,NL
169: IF (HAZEN) K(I)«4.77*L(I)/(D(I)* * 4.87*CHW(I’**HEXP) 250 : I=LOOP(IZ)
170: IF(DARCY) K(I)=CHW(I)*L(I)/(39•7*D(I)**5♦0* 251: 7 DO(I)=DO(I)-DR(I,NLP)
17 1: MLO=0 252: NCT-NCT+1
172: DO 51 LLl = l,NL 253 : IF (NCT.LT.MAX) GO TO 66
173: Ll"LOOP(LLl) 254 : WRITE(6,102) NCT
174 : NNP=NN(LI) 255 : 102 FORMAT (' DID NOT CONVERGE -- NCT=',I5,' SUM= 1 , F.l 2.5 )
175: DO 51 KK=1,NNP 2 56: GO TO 98
176: I F (IABS(LP(Ll,KK) ) .NE. I) GO TO 51 257 : 66 DO 6 I 2=1,NL
177: NLO-NLO+1 258 : I=LOOP(12)
179: LOP{I,NLO)=L1*LP(Ll,KK)/I 259 : IF (ABS(DR(I,NLP)).GT,ACC) GOTO 10
179: 51 CONTINUE 260: 6 CONTINUE
180: 50 NLOP(I)=NLO 261 : DO 8 12=1,NL
181: WPITE(6,201) 262 : I=LOOP(12)
182: 201 FORMAT(lHl) 26 3 : NNP=NN(I)
193: NCT=0 264 : DO 8 J = 1 ,NNP
184 : 10 DO 3 12*1,NL 265 : I J = LP(I,J)
185: I=LOOP(IZ) 266: IIJ=IABS(IJ)
186 : DO 12 J»1,NLP 267 : 8 01 (IIJ)=01( 11J)+FLOAT(IJ/11J)*DQ(I)
187: 12 DR(I,J)-0. 269: WRITE(6,400)
188: NNP=NN(I) 269 : 400 FORMAT(////l4X,31('*’)/14X,1 * RESULTS OF NETWORK ANALYSIS *'/
109: DO 3 J»1,NMP 270: S14X , 31 ( 1 * •)//)
190 : IJ-LP(I,J) 271 : WRITE(6,40l) NCT
191: IIJ=IA8S(IJ) 27 2 : 401 FORMAT(18X/1 NO, OF ITERATIONS =',13/)
192: 0=01(11J) 2 73 : WRITE(6,402) DISCH
193: NLO=NLOP(IIJ) 2 74 : 402 FORMAT(3XPIPE DIAM-IN LENGTH-FT ROUGHNESS FLOW-',A3,2X*
194 : DO 52 KK*1,NLO 275: S'HEAD LOSS-PT ELHGL UP-FT ELHGL DH-FT'/3X,4(1-’) ,2X , 7 ( ' - ' )
195: Ll= LOP(IIJ,KK) 276 : $2X , 9 ( 1 -') , 2X , 9 ( '-') , 2X , 8 ( ’-') ,2X,12('-') ,2X,11(’-‘) ,2X,11( ' - ’) )
196: LL=IABS(L1) 277 : ELHGL(NELEV)=ELELEV
197: 52 0=0+FLOAT(Ll/LL)*DQ(LL) 2 78 : JJJ=NODES*NPIPES
198: 0E=ABS(0)•*(HEXP-1.) 2 79 : ICOUNT=I
199: FAC=IJ/IIJ 290 : DO 20 JJ=1 ,JJJ
200: DR(I,NLP)=DR(I,NLP)+FAC*K(IIJ)*Q*QE 281: DO 13 1=1,NODES
201: DO 53 KK=1,NLO 29 2 : DO 14 J=1,NPIPES
202 : Ll = LOP{11J,KK) 28 3 : I I-PIPE(J)
203: LL=IARS(Ll) 284 : JU-JUP(II)
204 : 53 DR(I,LL)=DR(I,LL)+FAC*FLOAT(Ll/LL)* HEXP*K(11J)*OE 28 5 : JD=JDN(II)
2O5 : 3 CONTINUE 286 : IF(ABS(ELHGL(JU)).LE,.01.AND.ABS(ELHGL(JD)).LE»,01) GO TO 14
206 : IFJNSL .EO. 0) GO TO 40 287 : IF (ELHGL(JU),NE.0,.AND.ELHGL(JD).NE,0.) GO TO 14
207 : DO 34 12=1,NSL 288 : IF (F.LHGL (JU) .NE.0.) GOTO 15
200 : I I = LO(12) 289 : HPUMP=0.
209 : DR (1I ,NLP)= DR(11, NLP)-DELEV(II) 290 : DO 18 111=1,NPUMP
210: NNP=NN(II) 291 : IF (LLP(111) .NE.J) GO TO 18
211 : I F (NPUMP.EQ.0) GO TO 34 292 : HPUMP=A(III)*QI(J)*QI(J)+B(III)*ABS(QI(J))+HO(III)
212: DO 33 IK-1,NPUMP 29 3 : GO TO 188
213: IL’IABS(LLP(IK) ) 294 : 18 CONTINUE
214 : DO 33 KK-l.NNP 295 : 188 F.LHGL (JU) “ELHGL (JD) + (K (J) *ABS (QI (J) ) * *HEXP-HPUMP) *ABS (01 (J) )/OI (J)
215: IF(IL »NE. IABS(LP(11,KK))) GO TO 33 296 : ICOUNT-ICOUNT+1
216: IJ = LP(11,KK) 2 97 : GO TO 16
217: IIJ=IABS(IJ) 298 : 15 HPUMP=0.
210: NLO-MLOP(11J) 299 : DO 19 111=1,NPUMP
219: 0=01(11J)* FLOAT(IJ/IIJ) 300 : IF(LLP(111) »NE.J) GO TO 19
220 : DO 36 N=1,NLO 301 : HPUMP-A(III) *01(J)*01(J)+R(III) *ADS(01 (J))+HO(111)
221: L1 = LOP(11J,N) 30 2 : GO TO 199
222 : LL=IARS(Ll) 303: 19 CONTINUE
223 : IF(LL.EO.II) GO TO 37 304 : 199 ELHGL(JD)-ELHGL(JU)- (K (J)*ABS(QI(J))* *HEXP-HPUMP)*ABS(QI(J)J/OI(J)
224 : GO TO 36 305 : ICOUNT=ICOUNT+1
225 : 37 O=O+DQ(LL) 306: 16 IF(ICOUNT.GE,NODES) GO TO 17
226 : SIGN-L1/LL 307 : 14 CONTINUE
227 : 36 CONTINUE 308 : 13 CONTINUE
2 28 : DO 38 N=1,NLO 309 : 20 CONTINUE
229 : Ll = LOP(11J,N) 310: WRITE(6,202)
230 : LL=IABS{L1) 311: 202 FORMAT(////5X,1 NODE ELEVATION COMPUTING SCHEME HAS FAILED’)
231: IF(II.EO.LL) GO TO 38 312: STOP
232 : 0=0+SIGN*FLOAT(Ll/LL)*DQ(LL) 313: 17 CONTINUE
2 33 : 38 CONTINUE 314: DO 9 II=1,NPIPES
234 : Q«ABS(0) 315: I-PIPE(11)
235 : HP=(A(IK)*Q+B(IK))*Q+HO(IK) 316: JU=JUP(I)
236 : IF(IJ.LT,0) GO TO 35 317 : JD=JDN(I)
237 : DR(11,NLP)«DR(II,NLP)-HP 318: IF(HAZEN) D(I)=(4»77*L(I)/(K(I)*CHW(I)**HEXP))**(1./4.87)
238 : DR(11,1L)»DR(11,1L)+2.*A(IK)*0+0(IK) 319 : IF(DARCY) D(I)=(CHW(I)*L(I)/(39.7*K(I)))**0.2
2 39 : GO TO 33 3 20 : D (I) = 1 2 . * D (I)
240 : 35 DR(11zNLP)»DR(11»NLP)+HP 321: HL-K(I)*ABS(01(I))**HEXP
241: DR(11 ,1L) =DR(11,1L)-2.*A(IK)*0”B(IK) 322 : IF(GPM) QI(I)=449.*01(I)
24 2 : 33 CONTINUE 323 : IF(DARCY) WRITE(6,403) I,D(I),L(I),CHW(I),01(I),HL,ELHGL(JU),
24 3 : 34 CONTINUE 3 24 : SELHGL(JD)
244 : 40 V(1)-4. 3 25 : IF(HAZEN) WRITE(6,4033) I,D(I),L(I),CHW(I).QI(I),HL,ELHGL(JU),
245 : C 326: SELHGL(JD)

Figure 6-22. Continued. Figure 6-22. Continued.


138 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 139

Computer Output

* RESULTS OF NETWORK ANALYSIS *

3 27 : 40 3 FORMAT(3X, I3,3X,F6.2f3X,F8.«’,3X,F7.4,3X,F9.2,3X,F8.2,5X,F10.2,3X,
3 28 : $Flfl.2) NO. OF ITERATIONS = 4
329: 4033 FORMAT(3X,I 3,3X,P6.2f3X,Ffl.0,3X,F6.0,4X,F9.2,3X,F8.2,5X,Fl 0.2,3X,
3 30 : SF10.2) PIPE DIAM-IN LENGTH-FT ROUGHNESS FLOW-CFS HEAD LOSS-FT ELHGL UP-FT ELHGL DN-FT
331: IF(GPM) QI (I)-QI (D/449 .
332: 9 CONTINUE
333 : WRITE(6,404) 1 15.00 800. .0200 8.59 9.75 1480.00 1470.25
3 34 : 404 FORMAT(////lOXNODE ELHGL-FT ELGRND-FT P-PSI'/10X,' ---------------------------------------- ',2X, 2 12.00 1000 . .0200 3.38 5.75 14 7 0.2’5 1464.50
335 : SB ( ),2X,9(),2X,5('-')) 3 12*.00 600. .0200 5.21 8.22 1470.25 1462.03
3 36 : DO 23 1=1,NODES 4 12.00 1200 . .0200 2.21 2.96 1462.03 1459.07
337: P° ( ELHGL(I)-ELG(I))/2.31 5 10.00 800. .0200 2.33 5.43 1464.50 1459.07
338 : 23 WRITERS, 405 ) I,ELHGL(I) ,ELG(I) ,P 6 8.00 1200. .0200 .95 4.14 1468.64 1464.50
339 : 40 5 FORMAT(10X,13,2X,F7.1,4X,F7,1,2X,F6»1) 7 8.00 1500 . .0200 .24 .33 1459.39 1459.07
340 : IF (.NOT. TRANS) GO TO 98 8 8.00 1800 . .0200 .78 4.21 1459.07 1454.85
341: C 9 10.00 1000 . .0200 3.41 14.55 1400.02 1468.64
34 2 : C ” WRITE DATA FOR TRANSIENT ANALYSIS ON PILE (9) •* 10 8.00 400 . .0200 2.46 9.24 1468.64 1459.39
343: C 8.00 800. . 0200 4.54 1459.39 1454.85
11 1.22
344 : WRITE(9) NPIPES,NPUMP,NODES
345 : DO 511 1-1,NODES
346 : 511 WRITE(9) ELHGL(I),ELG(I)
347 : DO 510 I-l/NPIPES
348: IF(QI(I).GT.0.) GO TO 510
NODE ELHGL-FT ELGRND-FT P-PSI
349 : JU“JDN(I)
350 : JD-JUP(I)
351: JUP(I)»JU 1 1480.0 1460.0 8.7
352 : JDN(I)«JD 2 1470.2 1300.0 73.7
353 : QI(I)=-QI(I) 3 1462.0 1290.0 74.5
354 : 510 WRITE(9) PIPE (I) ,D(I) ,L (I) ,CHW(I) ,QI (I),JUP(I) rJDN(I) 4 1464.5 1310.0 66.9
355: DO 520 1=1,NODES 5 1459.1 1280.0 77.5
356: DO 523 J-1,4 6 1400.0 1380.0 8.7
357 : 523 LOP(I,J)-fl 7 1468.6 1320.0 64.3
358 : J-l 8 1459.4 1310.0 64.7
359: DO 521 111 “1,NPIPES 9 1454.9 84.4
1260.0
360: II-PIPE(111)
361: IF(JUP(II).EQ.I) GO TO 522
36 2 : IF(JDN(11)•EQ.I) GO TO 524
36 3 : GO TO 521
DATA FOR TRANSIENT ANALYSIS HAS BEEN WRITTEN ON FILE (9).
364: 524 LOP(IrJ)«-II
365: GO TO 525
366 : 522 LOP(I,J)-II
367: 525 J-J+l * NETWORK INPUT DATA *
368: 521 CONTINUE
369: WRITE(9) (LOP(I,J),J=1,4)
370: 520 CONTINUE
371: DO 512 I>1,NPUMP NUMBER OF PIPES = 11
37 2: 512 WRITEC9) LLP(I),A(I),B(I),HO(I) NUMBER OF NODES a 9
373: REWIND 9 NUMBER OF LOOPS a 4
374 : WRITE(6,540)
NUMBER OF PUMPS a 1
375 : 540 FORMAT(///lOX, 1 DATA FOR TRANSIENT ANALYSIS HAS BEEN WRITTEN ON FIL
NO. PSEUDO LOOPS 1
376: SE (9).')
377 : C MAX. ITERATIONS = 50
378 : 99 STOP
379: END
ITERATION ACCURACY = .010 CFS

DATA
“ PIPE DATA **
$ INDATA NPIPES-11,NLOOPS»4,MAX=50,NPUMP»1,NSLOOP«1,ACC».01,GPM»P,TRANS=T,
NODES-9,NELEV-1,ELELEV-1480., PIPE DIAM-IN LENCTH-FT FLOW-CFS ROUGHNESS COEFF. NODE UP NODE DN
SEND
1 15. 800. .020 8. 1 2 1460. 1 300. 1 15.00 800 . 8.00 ,0200 1 2
2 12. 1000. .020 3. 2 4 1310. 2 12.00 1000. 3.00 .0200 2 4
3 12. 600. .020 5. 2 3 1 290 . 3 12.00 600. 5.00 .0200 2 3
4 12. 1200 . .020 2. 3 5 1280. 4 12.00 1200 . 2.00 .0200 3 5
5 10. 800 . .020 2. 4 5 5 10.00 800 . 2.00 .0200 4 5
68 . 1200. .020 1. 7 4 6 8.00 1200 . 1.00 .0200 7 4
7 8. 1500. .020 1. 8 5 7 8.00 1500 . 1.00 .0200 8 5
8 8. 1800 . .020 1. 5 9 8 8.00 1800. 1.00 .0200 5 9
9 10. 1000. .020 4. 6 7 1380. 1320 . 9 10.00 1000. 4.00 .0200 6 7
10 8. 400 . .020 3. 7 8 1310. 10 8.00 400. 3.00 .0200 7 8
11 8. 800 . .020 1. 8 9 1260 * 11 8.00 800. 1.00 .0200 8 9
1 4 2 5 -4 -3
2 4 -6 10 7 -5
3 3 -7 11 -8
4 4 9 6 -2 -1
9 -.50 -.30 90.
4 -80.
140 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 141

** PIPES IN LOOPS **

LOOP PIPES

1 2 5 -4 -3
2 -6 10 7 -5
3 -7 11 -8
4 9 6 -2 -1

** PUMP INFORMATION «*

LINE PUMP
IS IN

o
T
A B
HO
9 -.50 -.30 90.0
PIPE I
** PSEUDO LOOP INFORMATION **

LOOP DIFF.

4
, IN RESERVOIR ELEV.-FT

-80.00

Figure 6-23. Three-pipe Junction with valve.


X
In the case of time variation of demand, the node and the schedule of
discharge variation with time must be specified. This node then becomes a ....................
special boundary condition which is written specially into the program. = .(6-75)
For valve closure, the techniques previously developed for real valves
can be applied. If the valve occurs at the end of a single pipe, no + K, ......................
complications beyond those previously discussed are encountered. When u .(6-76)
the closing valve is located at a junction, some additional considerations
must be taken into account. Because this type of situation occurs The complication here is that the nonlinear head loss term across the
occasionally for various types of boundary conditions, it will be addressed valve forces us into an iterative solution for Hp. To show how this
in detail here for future use as well. develops, we combine Equations 6-71 and 6-76. Solving the resulting
quadratic equation for Vpt gives
Grate Valve or M^jor Loss at a Junction

We will investigate the analysis of a valve or other major loss .......... (6-77)

CTQ
occurring near a junction. To minimize bulky equations, we will use a
one-in, two-out, three-pipe junction. It will be clear from the analysis how
to extend the analysis, by inspection, to the other types of pipe junctions. Inserting Equations 6-77, 6-72, 6-73 into Equation 6-74 results in the
The problem to be solved is defined by the junction sketch in Figure following equation for Hp.
6-23. The equations to solve are shown below.

Pipe 1 C. = -C, ................................... (6-


F(HP) = ■ C4 Aj Hp - C6 A3
71)

UQ
Pipe 2 C = c3 + c.
................................... (6-

+
................... (6-78)
Pipe 3 C’ : C' + C, H 72) KLC2
This equation must be solved iteratively by trying successive values of Hp
Continuity: Vp Aj + V.................................
P Ag + Q ..................(6-73)
(6-74)
until F(Hp) = 0 is satisfied within acceptable tolerances. The iterative
II

method used will be the Newton-Raphson method.


142 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 143

FtHpO’1))
H FW’1)) (6-79)

*■0
o.
2; C* PROGRAM NO. 7 *
C* WATER HAMMER IN PIPE NETWORKS *
where F = (dF/dHp) is obtained by differentiating Equation 6-71. 3:
C* PROGRAM INTERFACES WITH NEWTON-RAPHSON PROGRAM NO. 6 *
C* (PROGRAM DIMENSIONED FOR UP TO 20 PIPES, 15 MODES, AND 5 SOUPCE PUMPS) *
6 :
7: c
8 :

(J
9 : C A() = WAVE SPEED-FPS
1- 10: C HATH = ATMOSPHERIC PRESSURE HEAD-FT

O
bJ
11: C TMAX = MAXIMUM REAL TIME OF SIMULATION-SEC
C NPARTS “ NUMBER OF PARTS INTO WHICH PIPE IS DIVIDED
12:
C IOUT ■ INDEX WHICH GIVES AN OUTPUT EVERY IOUT-TH TIME STEP
13:
C N3CQ “NUMBER OF NODES WHERE THE DISCHARGE IS SUDDENLY SET EQUAL TO ZERO
14: C NODEQO ■ ARRAY OF NODE NUMBERS WHERE DISCHARGE IS SUDDENLY ZEROED
15:
-C4A, (6-80) 16:
17:
C NODOUT • LOGICAL. IF TRUE, INFORMATION ON HEADS,
C ALLOUT = LOGICAC. IF TRUE, INFORMATION ON HEADS,
H-VALUES, ISOUTPUT AT NODES
H-VALUES, ANDVELOCITIES
C IS OUTPUT FOR INTERIOR SECTIONS OF PIPES.
18: C TCI » TIME (SEC) WHEN FIRST STAGE OF VALVE CLOSUPE IS COMPLETED
19: C PCI - PERCENT OPEN OF VALVE AT END OF STAGE ONE OF VALVE CLOSURE
20 : C TC2 = TIME (SEC) WHEN SECOND STAGE OF VALVE CLOSURE FINISHES CLOSING VALVE
21: C PVALVE = NUMBER OF PIPE WITH A TWO-STAGE VALVE PLACED AT THE DOWNSTREAM END
The iterative procedure is generally started by using the value of Hp from 22:
23:
C NSHUT => NUMBER OF PIPES WITH SUDDENLY CLOSING VALVES IN THEM
C StIUTO = ARRAY OF NUMBERS OF PIPES WITH SUDDFNLY CLOSING VALVES IN THEM.
the previous time step as the first estimate. Programming precautions are 24:
25 :
C IF VALVE IS AT DOWNSTREAM END, PIPE NUMBER SHOULD HAVE A MINUS SIGN.
C IF VALVE IS AT UPSTREAM END, PIPE NUMBER IS POSITIVE.
also taken to avoid looping in the iterative solution. 26:
27:
C NSAVE = NUMBER OF SETS OF H VS T DATA
C SAVE() = ARRAY OF PIPE NUMBERS WITH H
TO BE SAVED (4 WITH 500 PTS MAX)
VS T DATA SAVED FOR DOWNSTREAM END
28 : C IOUTSA » SAME AS IOUT BUT APPLIES TO THE H VS T DATA
29: C
Network Water Hammer Examplea 6-6 30 :
31:
DIMENSION X(20,30), V(20 ,30) ,H(20,30) ,BLOW(20,39),HHIGH (20,30),
SHEAD(20,30) ,VNEW(20,30) , IINEW (20,30)
32: DIMENSION L(20),D(20),A(20),PIPEZ(20),F(20),VZEPO(20),NPAR(20),
33: $C (20) ,AK(20) ,SINE (20) ,AREA(20),DELTT(20) ,RATIO(20) ,JUP(20) ,
The computer program shown in Figure 6-24 can handle a variety of 34:
35:
SSHUT(20)
DIMENSION NODE?(15,4),ELHGL(15),ELG(15),NTYPE(15),SAVE(15),
boundary conditions. The examples of data input given illustrate the 36:
37:
S0DEMI15),HNODE(15),NODFO(15)
DIMENSION PLINE(5),AZ(5),BZ(5),CZ(5),HRES(5)
interfacing between the steady state and unsteady versions of the program. 38:
39:
DIMENSION SAVEH(4,500),TIND(5),HIND(5)
DIMENSION CODD(4),CEVEN(4)
The examples are relatively simple ones which demonstrate many of the 48:
41:
DIMENSION KLI(11),PCT(11)
INTEGER PLINE,PVALVE,SAVE,SHUT
common boundary conditions. However, the user may need to tailor a 42:
43:
REAL L,LA,KI,KLI
LOGICAL FA IL,NODOUT,ALLOUT,VALVE
program for his own particular network, incorporating the proper special 44 :
45:
DATA FAIL,UODOUT,ALLOUT,VALVE/4 *.FALSE./
DATA NBCO,PVALVE,NSHUT,NSAVE,IOUTSA/5*0/
boundary conditions at junctions where they occur. 46:
47:
DATA (KLI(I)r1-1,11)/.0,.0167,.0313,.0556,.10,.1787,.3333,.625,
$1.250,2.58,5,27/
48: DATA (PCT(I),I“1,11)/0.,10.,2O.,30.,40.,50.,60.,70. ,8P. ,90.,100./
The program can generate unsteady flows by a) permitting the 49: NAMELIST /SPECS/ IOUT,NPARTS,THAX,HATH,NHCO,NODEO,NODOUT,ALLOUT,
50: STCl,PCI,TC2,PVALVE,NSHUT,SHUT,NSAVE,SAVE,IOUTSA
demand at any or all nodes to be suddenly set to zero, b) permitting valves 51: PI-3.141593
52: T=0 .
at the upstream or downstream end of any line (or several lines) to be 53: C
54 : C ** READ IN TRANSIENT DATA AS WELL AS DATA FROM STEADY STATE ANALYSIS FROM (9)
closed suddenly, or c) permitting two-stage valve rate closure of a gate 55 : C
56: READ(9) NPIPES,NPUNP,NODES
valve at the downstream end of any one line. 57: C
58 : READ(5,SPECS)
Output can be either at junctions only or at all nodes; it can be at 59 : READ(5,100) (A(I),I»1,NPIPES)
60: 100 FORMAT(8 Fl 0,0)
every time step or only at intervals of several steps. Pressure head 61: C
DO 4 1=1,NODES
62:
maximum and minimum values are output at the end and it is possible to 63: 4 PEAD(9) ELI1GL (I) ,ELG(I)
DO 2 11 = 1 ,NPIPES
64 :
save the complete H vs. time history at four selected junctions in the 65:
66:
READ(9) I,D(I),L(I),F(I),VZERO(I),JU, JD
JUP(I)=JU
network. 67:
68 :
PI PEZ(I)=ELG(JU)
SINE (I) = (ELG (JD)-ELG (JU) )/L (I)
The first three sets of data shown generate water hammer situations 69 :
70:
AREA(I)=.25*PI *D(I) *D(I)/]44.
VZERO(I)=VZERO(I)/AREA(I)
C (I)=32,2/A (I)
in the network shown previously for the steady state Newton-Raphson 71:
72: 2 DELTT(I)=L(I)/(NPARTS•(VZERO(I)+A(I)))
DO 3 1=1,NODES
analysis. Because the purpose here is to illustrate data deck setup, the 73:
74 : 3 READ(9) (NODEP(I,J),J=1,4)
IF(NPUMP.EQ,0) GO TO 6
analysis results are not given. 75:
76:
DO 5 1 = 1,NPUMP
5 READ(9) PLINE(I) ,AZ(I) ,BZ (I),CZ(I)
In case (a), the demands at nodes 4 and 9 are set equal to zero. The 77 :
78:
6 CONTINUE
REWIND 9
output is printed only for the junction values every tenth time step. The H 79:
30 :
C
C
81:
vs. time data for every second time step is saved for the downstream ends 82:
C *• COMPUTE MINIMUM DCLTA T **
C
83:
of pipes 5, 8, 9, and 11. 84 :
DELT=DELTT(1)
K.MIN’l
85: DO 12 I=2,NPIPES
86:

Figure 6-24. Water hammer program for networks.


144 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 145

87: IF(DELTT(I).GT,DELT) GO TO 12
88 : DELT=DELTT(I)
89: KHIN-I
90s 12 CONTINUE 174: GO TO 24
91: DO 13 1-1.NPIPES 175: 25 O’AREA(I)'VZERO(I)
92 : IF(I.EQ.KHIN) GO TO 14 176: ORES 'J)=ELHGL(JU)
93: ANPAR-L(I)/(DELT*(VZERO(I)+A(I))) 177: H (1,1)«H( I,1)+AZ(J)*O*Q+BZ(J)*Q+CZ(J)
94 : HPAR(I)"ANPAR 178: 24 DELL=L(I)/NPAR(I)
95; TEST-NPAR(I) 179: □ ELUF«12.*F(I)* DELL*VZERO(I)* * 2/(64,4‘D(I))
96: IF(ABS(TEST+l-ANPAR).LT..0001) NPAR(I)-NPAR(I)+1 180: AK(i;=12.*F(I)‘DELT/(2.*D(I))
97: GO TO 13 181: K=NPAR(I)+1
98: 14 NPAR(I)"NPARTS 182: xd,i)"0.
99 : 13 CONTINUE 183: V( 1,1)»VZERO(I)
100: INDEX«THAX/DELT + 1 184: BLOW;I,1)«H(I,1)
101: C 185 :
IIHIGB (1,1) "If ( 1,1)
102: C * * IDENTIFYING NODE TYPE AND EXTERNAL DEMAND “ 186:
187: HEADd,1)=H(I,1)-PI PEZ (I )
103: C
188: RATIO(I)"DELT/DELL
104 : DO 50 1 = 1 ,NODES
105: QDEM(I)"0. 189: DO 21 J"2,K
106 : HNODE(I)"ELHGL(I)-ELG(I) 190 : Xd,C)«(J-l) *DELL/L(I)
107: DO 51 J"1 ,4 191 : H(I»C)»H(I,I)-DELHF*(J-l)
108 : JJ"NODEP(I»J) 192: HLOWiI,J)=H (I ,J)
109 : IF(JJ.EQ.0) GO TO 52 193: HHIGH(I,J)"H(I,J)
110: JJJ-ARS(JJ) 194: HEADI I ,J) =11 ( I, J) - (PIPEZ (I) + X (I , J) *L( I) ‘SINE (I ) )
111: 51 ODEM (I)-ODEM(I)-(ABS(JJ)/J J)* AREA(JJJ) *VZERO(JJJ) 195: 21 V(I,J)"VZERO(I)
112: 52 IF(J.EQ.2) GO TO 59 196 : 20 CONTINUE
113: GO TO 5fl 197: PIIMAXs-100.
114: 59 IF(NODEP(I,1).GT.fl) GO TO 53 198: PHMIN»1 fl0003 .
115: NTYPE(I)«97 199: C
116: GO TO 50 280 : C •• WRITE OUT STEADY STATE CONDITIONS **
117: 53 QDEH(I)=fl. 2.11: C
118: NTYPE(I)=98 202 : IF(.NOT, ALLOUT) GO TO 26
119: 50 CONTINUE 203:
120: IF(HPUMP.E0.0) GO TO 56 WRITE(6,204)
204 : WRITE(6,205) T
121 : DO 55 1-1,NPUHP 205 :
122: II=PLIKE(I) DO 22 1-1.NPIPES
206 :
123: JU-JUP(11) 207 : K"NPAR(I)+1
124: 55 NTYPE(JU)"99 208: WRITE(6,206) I, (X(I,J) .HEAD(I.J) ,H(I,J) ,V(I,J) ,J»1,K )
125: 56 CONTINUE 209 : 22 CONTINUE
126: IF (NBCQ.EQ.fl) GO TO 58 210 : GO TO 29
127: DO 57 1=1, MBCQ 211: 26 IF(.NOT. NODOUT) GO TO 29
128: II»NODEQ(I) WRITE(6,230)
212:
129 : 57 ODEMdI)-0. 213: WRITE(6.231) T
130: 58 CONTINUE 214 : WRITE(6,232) (I,HNODE(I),ELHGL(I),I«1,NODES)
131: C 215: 29 CONTINUE
132: C 216: 1F(NSAVE.EO.9) GO TO 31
133: C ** WRITE OUT INPUT DATA “ 217 : DO 32 I = 1,NSAVF.
134 : C 218: II-SAVEd)
135: WRITF(6,200) 219:
136: WRITE (6 , 201) IOUT,NPARTS,KPIPES. IIATM.TMAX , DF.LT K=NPAR(II)+1
220 : 32 SAVEH(1,1)=H (11 , K)
137: WRITE(6.220) 221 :
138: IF (NRCQ.EQ.0) GO TO 19 I HD" 2
222 : 31 CONTINUE
139: WRITE(6,221) (NODEQ(I),I -1,NI3CQ) 2 23 :
140: 19 CONTINUE C
2 24 :
141: IF(PVALVE.EQ.0) GO TO 9 2 25 :
142: WRITE(6,212) PVALVE.TC1.PC1.TC2 cBFGIN TRANSIENT ANALYSIS
226:
143: 9 CONTINUE c - ---
227 :
144: IF (NSH'JT.EQ.0 ) GO TO 199 c
228 :
145: DO 198 1=1.NSHUT DO 99 II r 1 = 1 .INDEX
14 6: IF(SHUT(I).LT.0) WRITE{6,222) SHUT{I) 229 :
230: T"T+DELT
147: IF (SHUT(I) ,GT.0) WRITE(6,223) SfiUT(I) IF(T.GT.TMAX) GO TO 400
231 :
148: 198 CONTINUE c
232 :
149: 199 CONTINUE C " COMPUTE H AND V AT INTERIOR NODES **
233 :
150 : WRITE(6,202) C
234 :
151: DO 15 I-l.NPIPES 235 : DO 30 1=1,NPIPES
152: LA-L(I)/A(I) K-NPA’d)
236 :
153: 15 WRITE(6,203) I,D( I) ,L(I) ,A( I) ,PIPEZ (I) ,F(I) .VZEROd) , DO 30 J«2,K
154: 9DELTT(I),HPAR(I).SINE(I), LA 2 37 :
2 38 : RA»RATIO(I)*A(I)
155: WRITE(6,2022) VMINUS"V(I,J)-RA*(V(I.J)-V(I,J-1))
2 39 ;
156: DO 16 1=1,NODES 240 : VPLUS"V(I,J)-RA* (V (I,J)-V(I,J + 1))
VNEWd ,J) =0.5* (VMINUS+VPLUS+C (I) * (HMINUS-HPLUS) +C (I) *DFLT*S I NE (I)
157: 16 WRITE (6,2033) I, FLHGL(I) ,ELG(I) , (NODEP (I ,.7) , J = 1 ,4) , ODEM (I) 241: HMINUS"!t (I, J ) -RA * (1| (I,J)-H ( I , J-l))
S' (VMIHUS-VPLUS)-AK(I)•(VMINUS*ABS(VMINUS)+VPLUS*A3S(VPLUS)))
158: IF(NPUMP.FO,0) GO TO 18. 24 2 : HPLUS=H(I,J)-RA* (ll|I,J)-ll|I,J+l) )
KNEW(I,J)=0.5* (HMINUS+HPLUS+(VMINUS-VPLUS)/C(I)+DELT*SINE(I) *
159 : WRITE(6.2044) 243: S (VHIHUS+VPLUS) - ( AK (I)/C (1) ) *'(VMI NUS * ABS (VMI NUS) -VP LUS* ABS (VPLUS) ) )
160 : DO 17 I=1,NPUMP 244 : 30 CONTINUE
161: 17 WP.ITE ( 6,2055) PLINE (I) , AZ (I) , RZ (I) , CZ (I) 24 5 : C
162: 18 CONTINUE 246 : C ** COMPUTE H AND V AT JUNCTIONS **
163: C 247 : C
164 : C “ SET UP CONDITIONS FOR STEADY STATE (T=0) ** 248 : DO 4 0 111 = 1.NODES
165: C 249 ; IF(NTYPE(111).EQ.97) GO TO 81
166: DO 20 I=1,NPIPES 250 : IF (HTYPE(111).EQ.98) GO TO 30
167 : JU’JUP(I) 251: IF (NTYPE(111) .EQ.99) GO TO 80
168: I! (1,1) "RLHGL (JU) 252 : DO 41 J«1,4
169: IF (NPUNP.EQ.0) GO TO 24 253 : CODD(J)=fl.
170: DO 23 J=1,NPUMP 254 : 41 CEVEN>J)=0,
171: I1»PLINE(J) 255 : C
172: IF(II.EO.I) GO TO 25 256 : C • STANDARD JUNCTIONS *
173: 23 CONTINUE 257 : C
258 : DO 42 J=1,4
Figure 6-24. Continued. 259: 11=NODF.P|III ,J)

Figure 6-24. Continued.


146 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 147

260: I-IAOS(II)
261: IF (11.EQ.0) GO TO 45
262: IF(II.LT.fl) GO TO 43 3 47: DO 801 N-l,NSHUT
263 : VPLUS-V(I,1)-RATIO(I)*A(I)*(V(I,1)-V(I,2)} 3 48 : IF (SHUT(N).NE.11) GO TO 801
264 : HPLUS-H(I ,’l) - RATIO(I) * A (I) * (H (1,1) -U (1,2) ) 349 : VNEW(I,l)-0.
2 65 : CODD(J)--AREA (I)*(VPLUS-C(I)‘HPLUS-C(I) *DELT*VPLUS*SI MJ(I)- 350 : HNEW(I,1)--CC/C(I)
266: SAX(I)*VPLUS*ABS(VPLUS)) 351: GO TO 40
267 : CEVEN(J)-C(I)*AREA(I) 352 : 801 CONTINUE
268 : IF(NSHUT.EQ.0) GO TO 42 353 : 800 CONTINUE
2 69 : DO 430 N-l,NSHUT 354 : HNEW(1,1)»ELHGL(111)
270 : IF (SHUT(N).NE.I) GO TO 430 3 55 : VNEW (1,1)aCC+C(I)*HNEW(1,1)
271: HNEW(I,1)-CODD(J)/CEVEN(J) 356: GO TO 40
272 : VN EW (1,1) = 0 , 357: C
273 : CODD(J)=0. 358 : C * SOURCE PUMP JUNCTIONS
274 : CEVEN(J)=0. 359 : C
275 : GO TO 42 360 : 85 DO 86 JJ-1,NPUMP
276 : 43O CONTINUE 361 : II-PLINE(JJ)
277 : GO TO 42 362 : IF(I.EQ.II) GO TO 87
278 : 43 K»NPAR(I)+1
363 : 86 CONTINUE
279 : VM INUS-V(I,X)-RATIO( I) * A ( I) * (V (I , K) -V (I , X-1) ) 364 : STOP
280: HMINUS-H(I,X)-RATIO(I)*A(I)*(!I(I,K)-II(I,K-1))
365 : 87 CC-H PLUS-VPLUS/C (I) +VPLUS*S INE (I) *DELT+ (1.0/C (I) ) *AX (I) * VPLUS*
281: CODD(J)-AREA(I) * (VMI N'.IS+C (I) *HM ItlUS+C (I) *VMINUS*DELT*SINE(I)-
366 : SABS(VPLUS)
282 : SAX(I)*VMINUS*ABS(VMINUS) )
283 : CEVEN (J)-C(I) *ARF.A(I) 367 : C3-(BZ(JJ) *AREA(I)-1.0/C (I))/(AZ(JJ) *AREA(I)**2)
284 : IF(NSHUT.EQ.0) GO TO 440 368 : C4-(CZ (JJ)+HRES(JJ)-CC)/(A2(JJ)‘AREA(I)* *2)
369 : C5=4;*C4/(C3*C3)
285 : DO 441 N-l/NSUUT IF(C5.GT.0.) GO TO 88
370 :
286 : IF(SHUT(N).NE.11) GO TO 441
371: VNEW(I,1)-0.5*C3*(-1.+SQRT(1,-C5))
287 : X-NPAR(I)+1
372 : GO TO 89
288 : HNEW(IrK)’CODD CT)/CEVEN(J) 373 : 88 VNEW(I,l)-0.
289 : VNEW(I,K)=0. 374 : 89 HNEW(I,1)-CC+VNEW(I,1)/C(I)
290 : CODD(J)-0 . 375: ELHGLdI I) =HNEW(I ,1)
291: CEVEN(J) =0. 376 : HNODE(111)-ELHGL(111)-ELG(111)
292 : GO TO 4 40 377: GO TO 40
293 : 441 CONTINUE 378 : C
294: 440 IF (I.NE.PVALVE) GO TO 42 379 : C * DOWNSTREAM END OF SINGLE PIPES *
295 : C1-CODD(J)/AREA(I) 380 : C
296 : CODD(J)=0. 381: 81 I-1ABS(NODFP(111,1))
297 : C2-CU)
298 : 382 : K-NPAR(I)+1
CEVEN(J)“0. 383 : VMINUS-V(I,X)-RATIO(I)*A(I) * (V(I,X)-V(1,X-1) )
299 : VALVE-.TRUE, 3 84 : HMINUS-H{I,K)-RATIO(I)*A(I)*(H(I,K)-H(I,K-l))
300 : 42 CONTINUE 385 : CC-VMINUS+Cd) ‘HMINUS+C (I) * VMINUS * DELT* SINE (I) -AK (I) *VMINUS*
301: 45 CONTINUE SABS(VMINUS)
386 :
302 : ANUM-0. 387 : IF (NSHUT.EQ.0) GO TO 810
303 : DENOM-R. 388 : II-NODEP(111,1)
304 : DO 46 J = 1,4 389 : DO 809 N-l,'NSHUT
305 : ANUM-ANUM+CODD(J) 390 : IF(SHUT(N).NE.11) GO TO 809
306 : 46 DENOM-DENOM+CEVEN(J) 391 : VNEW(I,K)-0.
307 : IF(DENOH.LE..IE-10) DENOM-.1E-10 392: HNEWd,K)-CC/C(I)
308 : IF(VALVE) GO TO 140 393 : GO TO 40
309 : 449 HPP-(ANUH-QDEM(111))/DENOM 394: 809 CONTINUE
310 : 49’ HNODE(111)“HPP-ELG(111) 395 : 810 CONTINUE
311 : ELHGL(111)-HPP 396 : VHEW(I,X)-V2ERO(I)
312 : IF(DENOM.LE..1E-10) GO TO 40 397 : HNEW(I,K)=(CC-VNEW(I,X))/C(I)
313: DO 47 J-1,4 398 : GO TO 40
314 : II-NODEP(111,J) 399 : C
315: I-IABS(II) 400 : C * STAGED VALVE CLOSURE AT JUNCTION *
316: IFdI.EQ.0) GO TO 40 401: C
317: IF(I I.LT.0) GO TO 48
318: 402: 140 IF(T.GE.TC2) GO TO 150
IF(NSHUT.EQ. 0) GO TO 450 403 : IF(T.GT.TCl) GO TO 149
319: DO 4*51 N-l,NSHUT
320 : 404 : OPEN-100.-(100.-PCI)* T/TC1
IF(SHUT(N).NE.I) GO TO 451 4 05 : GO TO 148
321: GO TO 47
322 : 406 : 149 OPEN-PCI *(TC2-T)/(TC2-TC1)
451 CONTINUE 407 : 148 DO 145 KK-1,11
323 : 450 HNEW(I,1)=HPP
324 : 408 : ITEST-(OPEN-PCT(XX))*.10
VNEW (1,1) a (-CODD (J)/AREA( I) )+C (I) *1IPP 409 : IF(ITEST.EQ.0) GO TO 146
3 25 : GO TO 47
326 : 410 : 145 CONTINUE
48 K-NPAR(I)+1 411: 146 FACT-(OPEN-PCT(XX))*.10
327 : IF(NSHUT.EQ.0) GO TO 460
328 : 412: XI-KLI (XX) + FACT*(X LI (XX+1)-XLI (XX) )
DO 461 N-l,NSHUT 413: CC=?-2.2*AREA (PVALVE) *XI/C2
3 29 : IF (SHUT(N) .NE.11) GO TO 461
330 : 414: C8-DENOM
GO TO 47 415: C9-ANUM-QDEM(111)-CC
331: 461 CONTINUE
332 : 416: CCC-2.*C2*C2/(32.2 * XI)
460 IF(I.EQ.PVALVE) GO TO 47 4 17: X-NPAR{PVALVF)+1
333 : HNEW(I,X)-HPP
334 : 418: H P-H ( PVALVE, K)
VNEW(I,X)=(CODD(J)/AREA(I))-C(I)*HPP 419: DO 142 XXX-1,20
3 35 : 47 CONTINUE
336 : 4 20: FHP-CC*SQRT(1,-CCC*(HP-C1/C2))-C8*HP+C9
GO TO 40 4 21:
337 : c FPRIME®(0.5*CC/SORT(1,-CCC*(RP-C1/C2)))*(-CCC)-C8
4 22 : HPP-HP-FHP/FPRIME
338 : C * RESERVOIR JUNCTIONS *
339 : c 4 23 : IF (ABS(HPP-HP).LT.0.5) GO TO 143
4 24 : HP-HPP
340 : 80 I-1ABS(NODEP(111,1))
4 25 : 142 CONTINUE
341: VPLUS-V(I,1)-RATIO(I) * A (I) * (V(1,1)-V(1, 2) ) 4 26: WRITE(6,160)
342: HPLUS»H(I,1)-RATIO(I)*A(I)*(H(I,1)-H(I,2)) 4 27 : 160 FORMAT (///5XNEWTON-P.APHSON PROCFDURE AT THE VALVE HAS FAILED")
343 : IF(NTYPE(111).EQ.99) GO TO 85 4 28 : STOF
344 : CC-VPLUS-C(I)•HPLUS-C(I)* DELT*VPLUS*SINE(I)-AX(I)*VPLUS*ABS(VPLUS) 429 : 143 VALVE-.FALSE.
3 45 : IF (NSilUT.EQ.0) GO TO 800
430 : VNEW(PVALVE, K)-(32.2 * XI/C2)*(-1.+ SQRT(1,-CCC*(PPP-C1/C2)) )
3 46 : II-NODEP(111,1) 431: HNEW(PVALVE,X)-HPP+VNEW(PVALVE,X)* * 2/(64.4 * X I)
4 32 : GO TO 49
Figure 6-24. Continued.
Figure 6*24. Continued.
148 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 149

433: 150 K»NPAR (pVALVE)+1


4 34 : VNEW(PVALVE,K) «0 .
4 35 : HNEW<( PVALVE, K) “C1/C2
4 36 : GO TO 449
437 : 40 CONTINUE 519 : GO TO 403
438 : C 5 20 : 402 HEADMX-HHICB(I,K)-(PIPEZ(I)+X(I,K)*L(I)*SINE (I))
439 : C LOCATE MAXIMUM AND MINIMUM HEADS AND H-VALUES “ 521: HEADMN= HLOW(I,K)-(PIPFZ ( I) + X ( I , K) * L ( I) * S IN F. (I ) )
4 40 : C 522 :
DO 61 I»1 ,NPIPES WRITE(6,209) X ( I , K) , HE ADMX , IIEADMN , I1HI CH ( I , X) , HLOW (I , K)
441 : 523 :
K-NPAR(I)+1 403 CONTINUE
442 : 5 24 :
443 : DO 61 J«1,K WRITE(6,210) PHMAX,IPMAX,XHAX,TTMAX
:F(HNEW(I,J).LT.HLOWtI,J) ) HLOW(I,J)=HNEW(I,J) 525 : WRITE(6,21 I) PHMIN,I PM IN,XMIN,TTMIN
444 : 526 :
445 : IF (KNEW(I,J),GT.HHIGH JIHHIGH(I,J)»HWEW(1,3) C
HEAD(I,J)■HNEW(I,J)-(PI PEZ(I)+X(I,J)*L(I)*SINE(I)) 527 : C “ WRITE OUT H VS TIME VALUES AT SELECTFD POINTS “
446 : 528 :
4 47 : IF (HEAD(I,J}.LT,PHMAX) GO TO 66 C
IPMAX-I 529 : IF(NSAVE.EO.0) GO TO 410
4 48 : 530 :
4 49 : XMAX«X(I,J) WRITE(6,404)
PHMAX"HEAD(I, J) 531: DFLT= IOUTSA* DF.LT
4 53 : TTMAX=T 532 : IND=(IND-1)/5+1
451: GO TC 67 533 : DO 409 1 = 1 ,NSAVE
452 : 66 IF(HEAD(I,J),CT.PHMIN) GO TO 67 534 : II=SAVE(I)
453 : IPMIN«I 535 : WRITE(6,405) II
4 54 : XMIN«X(I,J) 536 : DO 408 1 1 II’l,IND
4 55 : PKMIH»HEAD(I,J} 5 37 : DO 407 J«l,5
4 56 : TTMIH-T 538 : JJ = 5‘ (1111-1)+3
457 : 67 CONTINUE 539 : TIND(J)=(JJ-1)‘DELT
458 : IF (DEAD ( I , J) .CT.-HATH) GO TO 62 540 : 407 J(IND(.D«SAVEH(I,JJ)
4 59 : WRITE(6,214) T,I,X(I,J)
54 1: WRITE(6,406) (TIND(J),HINDIJ),]=!,5)
460 : FAIL=.TRUE.
62 CONTINUE 54 2 : 408 CONTINUE
461:
61 CONTINUE 54 3 : 409 CONTINUE
4 62 :
C □ 44 : 410 CONTINUE
463 :
C '* WRITE OUT H,V,AND HEAD VALUES •* 545 : C
464 :
465 : C 546 : C ••»•••• FORMAT STATEMENTS "•••“
466 : 70 IF(FAIL.AND.ALLOUT) GO TO 71 547 : C
IF(FA IL.AND,NODOUT) GO TO 74 548 : 200 FOPMAT(1H1//8X,30‘/fiX‘ NETWORK TRANSIENT ANALYSIS *'/8X,
467 : 5 49 : S3^('‘
468 : IF(MOD(1111,IOUT).NE • 0) GO TO 72
IF(.NOT. ALLOUT) GO TO 74 550: 201 FORMAT (1 5X, ' JOUT - ' , I 3/1 3X , ' MpARTS = ',I 3/13X,'NPI RES = ’ , I J//
4 69 : $15X,'HATM ,F5,1//15X,'TMAX - 1 ,F7.2/15X, 'DELT =’,F7.3)
71 WRITE(6,205) T 551:
4 70 : 552 : 202 FORMAT(//22XPIPE I :>PUT DATA'/2 2X , 15 ( ' - ’)//SX , ' PI PE DIAM-IM LE'IGT
DO 73 I=1,NPIPES
471 : K«NPAR(I)+1 553 : SH-FT WAVE5PD-FPS PIPEZ-FT F-VALUE VEL-FPS DFLT-SEC PARTS SIME
472 : WRITE(6,206) I,(X(I,JI.HEAD(I,J),KNEW(I,J),VNEW(I,J),J=1,K) 554 : 5L/A-SEC’/5X,4('-■),1X,7(,-*),1X,9(,-,),1X,
4 73 : 73 CONTINUE 5 55 : sdr-'j.iX/fir-’j.ix^r-'i.ix^r-'Hix^c-’j.ix^r-d^x,
474 : IF(T.LT.TC2) WRITE(6,233) OPEN,KI 556 : $6 ( ' - ') , 1X , 7(*-'))
4 75 : IF(FAIL) GO TO 490 557 : 2022 FORMAT(//14X,'NODE INPUT DATA */37X, ’PIPES’/5X,'NODE F'LHGL-FT CRN
4 76: GO TO 72 558: 5DEL-FT 1 2 3 4 DEilANO-CFS '/5X , ' ',2X,»('-'),
4 77: 74 WRITE(6,231) T 559 :
478 : $2X ,9('-'),IX,4 ( ' ----------------- *) ,2X , 10 ( '-'))
560 : 203 FORMAT(5X,I 3,2X,F6.2,1X,F9,1,6X,F6.0,4X,F6.0,3X,F5.4 , 3X,
479 : 551 :
48P: $F5.2,3X,F6.3,3X,I3,2X,F7.5,1X,F6.2)
WRITE(6,232) (I,HNODE(I),ELHGL(I),I»1,NODPS) 562 : 20 3 3 FORMAT(5X,13,3X,F7.2,4X,F7.2,2X,4(1X , I 3) ,3X,F?r2Y
481: IF(T.LT.TC2) WRITE(6,233) OPEN,KI 563 : 204 FORMAT(1H1/' PRESSURE HEADS, H-VALUES AND-VELOCITIFS AS FUNCTIONS
482 : IF(FAIL) GO TO 400 564 : S OF TIME*/2X, 6(1 (’-'))
483 : 72 CONTINUE 565 : 2044 FORMAT (//l 4 X PUMP INPUT DATA '/5 X , ’ LI *! E ' , 5 X , * A ' , 8 X , ' B ' , 8.X , ’ C ' / 5 X ,
484 : IF (NSAVF.. EO. 0) GO TO 79 566: $‘ -------- 1 ,3( ' -.............. 1 ) )
48 5 IF (MOD (1111,1OUTSA) •HE. 0)’ GO TO 79 567 : 205 FORMAT (//l fix , 3 ( 5X , ’ X HEAD-FT I'-FT V-FPS')/' TIME =‘,F7.3,
: DO 76 1*1.NSAVE 568 : S’ SEC’ , 3(5X, * ---------------------------------------- -------------- *) )
4 86: II=SAVE(I) 569 : 20 5 5 FORMAT(5X,I3,lX,2(F9.3) ,2X,E7.1)
487 : K=NPAR(II)+1 570 : 206 FORMAT(/12X,‘PIPE*,I2, 3(5X,F5.3,2F7.0,F8.2) /(lfiX,3(5X,FS.3,2F7,0
488 : 76 SAVEH(I,IND)-HNEW(II, K) 571 : S.F8.2)))
489: 1HD-IHD+-I 572 : 207 FORMAT ( 11! 1/1 8X , 2 7 ( 1 ‘ ' ) / 1 flX , ‘ * TARLF, OF EXTREME VALUES *'/18.X,27( ' *
490: 79 CONTINUE
573 : $')//13X,‘X MAX HEAD MIN HEAD MAX t< MIN H ‘ /11 X , 5 ( ' - ' ) , 2 X , 8 (
491 : C 574 :
492 : C " PREPARE FOR NEXT TIME STEP COMPUTATION “ 575 : 203 FORMAT(2X,’PIPE',12)
493 : C 5 76 : 209 FORMAT(11X,F5.3,2X,F7.0,3X,F7.O,3X,F6.0,2X,F6.0)
4 94 : DO 75 1=1jNPIPES 5 77 : 210 FOPMAT(//' MAXIMUM HEAD «’,F6.1,' FT IN PIPE',13,' AT X =',F5.3,
49 5: K»NPAR(I)+1 578 : S' AT TIME »*,F7.2,‘ SEC')
496 : DO 75 J=I,K 579 : 211 FORMAT(/' MINIMUM HEAD =',F6.1,‘ FT I PIPE',13,’ AT X »’,F5.3,
497 : V!I,J)=VNEW(I,J) 580 : $' AT TIME =‘,F7.2, ' SEC')
498 : 75 H 11,J)=HNEW(I, J) 581 : 212 FORMAT(3XVALVE AT DOWNSTREAM END OF PIPE=',I3,’ IS CLOSED.'/
499 : 99 CONTINUE 582 : S10X,'FIRST STAGE CLOSES IN",F6.2,* SEC TO',F4.1,’ PERCENT OPEN.'/
500: 583 : $1PX,'SECOND STAGE COMPLETES CLOSURE IN’,F6,2,' SFC'/l
C--. 214 FORMAT (////2X,'COLUMN SEPARATION HAS OCCURRED '>T',F6.2,’ SEC IN PI
501: 584 :
502: C END OF TRANSIENT ANALYSIS SPE',13,' AT LOCATION',F5.3)
C—■ 585 :
503 : 586 : 221) FORMAT (//20X , 'TRANSIENT ANALYSIS n AT A ' / 2 0 X , 2 3 ( ' - ’ ) /)
504 : C 221 FORMAT (3X,'DEMAND DISCHARGES SUDDENLY STOPPED AT MODES', 2.31 4/)
C '* WRITE OUT MAXIMUM AND MINIMUM HEADS AND li-VALUES •* 587 :
505: 588 : 222 FORMAT (3X,'SUDDENLY CLOSED VALVE AT OOW’JSTPEA'' END OF PIPF ',13)
506 : C 589 : 223 FORMAT (3X,'SUDDF.NLY CLOSED VALVE AT UPSTREAM CMD OF PIPE ',13)
400 CONTINUE 590 : 230 FORMAT(1H1/3X,'PRESSURE HEADS AJO H-VALUES AT NODES AS FUNCTIONS O
597 :
508 : WPITE(6,207) 591 : SF TIME’/JX,57('-’)/)
509 : DO 40 1 1 = 1 ,NPIPF.S 592: 231 FORMAT (/2.2X , 4 ( ' NODE HEAD-FT H-VALUE-FT *) / ' T(HF, = 1 , FR . 3 , ' SEC',
510 : WRITE(6,208) I 593 : S3X,4 ( ' ------ ',1X,7('-'),1X,10('-')))
511: K’NPAR(I)+1 594 : 232 FORMAT((21X,4(4X,I3,2X,F7.2,lX,F9.2)})
512: DO 401 J=1,K 595 : 233 FORMAT(/I0X,‘VALVE OPFN',F6.2,' PERCENT WITH 1/KL =*,F8.4)
513: IIEADHX.HHICH(I,J)-IPIPF:Z (i> txd.j) 596 : 404 FORMAT (Ilf 1/18X , 39 ( 1 ‘ 1) /18X , ' * H-VALUE VS TIME FOR SELECTED POINTS
514 : HlADMa= HLOH1I,J)-(PIPEZ(I)+x(I,J)•L(I)>sINC(I)) 597 ; $*'/18X,39(•*'))
515: WRITE(6,299) X (I, J) , IIPADHX .HEAO.MN, IIH IG'I (I , J) ,HLOW(I J) 598 : 405 FORMAT(//8X,5(' TIME-SEC H-VALUE-FT')/' PI PE',13,5(2X,8('-') ,1X,
516: IF(.NOT, ALLOUT) GO TO 402 599 : $10 ('-')))
517: 401 CONTINUE ' 600 : 406 FORMAT(7X,5(3X,F7.2,3X,F8.1))
518: 601: END
Figure 6-24. Continued.
Figure 6-24. Continued.
150 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 151

Caw (a)

SSPECS I OUT®10,NPARTS«3,TMAX* 1.fl,HATH®34.,


NQCQ«2,NODEO»4,9,13*0 ,
NSAVE=4 ,SAVE®5,9,0 , 1 1 , 1 1 *0 , IOUTFA=2,
NODOUT»T,
SEND
3300 . 3300. 3300. 33M. 3300. 3300. 3300. 3300.
33«0. 3300. 3300.

In case (b), valves are suddenly shut at the downstream ends of pipes

Figure 6-25. Pipe network with a single pipe extending from the network.
5, 8, and 11. The H vs. time data is saved for each time step at the
downstream ends of pipes 1, 9, 3, and 10.

ALL PIPES f = .020


Case(b)

SSPECS IOUT*104NPARTS®3,TMAX* 1.0,HATH®34.,


NSHUT-3 t SFUT( 1) «-5,SHUT(2)=-3 ,SHUT(3) ®-U ,
NSAVE®4,SAVE®1,9,3,10,11*0, IOUTSA-],
NODOUT*T,
SEND
3300. 3300. 3300. 3300. 3300. 3300. 3300. 3300.
3300. 3300. 3300.

In case (c), a two-stage closing valve is placed at the downstream end


of pipe 5. The valve closes to 2 percent open in 0.04 sec. and closes the

4 cfs
remaining distance in a total of 2.0 sec. from the beginning of valve
movement. Output for all internal nodes is printed every tenth time step
and H vs. time data is saved for the downstream ends of pipes 5 and 6 for
every second time step.

Caae(c)

SSPECS IOUT=1A , NPARTS®3,TMAX= 4.0,11 ATM®34 . ,


PVALVE® 5,TC1 = .fl 4,PC 1 = 2.,TC2® 2.0,
NSAVE®2(SAVE®5,6,13»0, IOUTSA®2,
ALLOUT=T,
SEND
3300 . 3300. 3300. 3300. 3300. 3300. 3300. 3300.
3300. 3300. 3300.

Because a water hammer problem may be created by closing a valve


at the downstream end of a single pipe existing from a network, an
example of this situation is presented in Figure 6-25. The suddenly closing
valve is located at the downstream end of pipe 8. The data necessary for
both the steady state and the water hammer analysis are shown below for
case (d).
152 UNSTEADY FLOW IN PIPELINES COMPLEX PIPE SYSTEMS 153

Case (d) that the homogeneous liquid column has been separated means that our
analysis techniques to date can no longer be applied directly.
Steady State Analysis Actually whenever the pressure at any point in the pipeline drops
below the pressure exerted on the liquid at the pipeline source, the
$ INDATA NPIPES*10,NLOOPS=3,MAX*50,NPUMP = 1,NSLOOP=1,ACC =,01,GPM=F,TRANSIT, saturation pressure may be reached and the dissolved gases may begin to
SEND
NODES»9»HELEV»1,ELELEV=1480.,
come out of solution. This is one of the reasons for placing air release
1 15 . 800 .
1000.
.020
.020
8.
3.
1
4
2 1460. 1300
1310
valves at pipeline summits. The amount of gases coming out of solution
2 12 2
3 12 600 . .020 5. 2 3 1290 depends on how low the pressure drops and how much gas there is in
4 12 1200 . .020 2. 3 5 1280
5 10 800 . .020 2. 4 5 solution. Certainly, if the pressure drops to the liquid vapor pressure,
6 8. 1 200. .020 1. 7 4
7 8. 1500 . .020 1. 8 5 large cavities filled with vapor and gas will form.
8 8. 1800. .020 1. 5 9 1260
9 10 1000 . .020 4. 6 7 1380. 1320
A simple example of column separation can be found downstream of
1
10 8.
4 2 5
400 .
-4 -3
.020 3. 7 8 1310
a suddenly closed valve. Upon sudden valve closure, the pressure head just
2
3
4
4
-6
9
10 7
6 -2
-5
-1
downstream of the valve attempts to drop the AH value required to bring
9
3 -80.
50 -.30 90. the liquid column to rest. If the required head drop causes the pressure to
reach the liquid vapor pressure, no further drop can occur and the liquid
Water Hammer Analysis column separates at the valve (see Figure 6-26). Analysis of the flow
situation would require some technique for representing cavity formation
SSPECS IOUT=1P,NPARTS=3zTMAX® 4.0 , HATM*34., and changes in wave speed.
ALLOUT=T,
NSHUT-1, SHUT(l)*-8,
NSAVE=4,SAVE*4,5,7,8, 11*0, IOUTSA»1,
SEND
Analysis With Column Separation and Released Air
3300. 3300 . 3300. 3300. 3303. 3300. 3300. 3300
3300. 3300 . 3300 .
Tullis, Streeter, and Wylie [13] thoroughly discuss the effects of air
release at low pressures, as well as column separation at vapor pressure.
They suggest that volumes of released air can be either uniformly
distributed throughout the flow or concentrated in pockets. In the former
6.8 Column Separation and Released Air case, Equation 4-23 can be used to find the reduced wave speed. Because
the change in wave speed leads to large interpolations with the rectangular
It is common knowledge that excessively high pressures in pipes grid method of solution, they suggest using the method where the
resulting from water hammer can cause damage. It is also generally characteristic lines are followed as closely as possible to minimize
known that low pressures, in certain circumstances, can cause collapse of interpolation errors and instability.
pipes with thin walls or those with high external loading. What is not so If it is undesirable to use this approach, the regular wave speed is
commonly known or understood is the phenomenon referred to as column used, the air is collected at discrete points and internal boundary
separation. conditions are formed at each bubble. The size of the bubbles are
monitored and their thermodynamic behavior is included.
Cause of Column Separation and Released Air Because analysis with released air and vapor is rather difficult to
accomplish and still is not completely understood, no further discussion
When water hammer causes the pressure at points in a pipeline to will be included here. However, the effects of released air are not
approach the vapor pressure of the liquid, gases in solution begin to come noticeable until the pipeline pressure drops below the saturation pressure
out of solution and dramatically affect the flow behavior. If the drop in of the dissolved air. Unless this low pressure is anticipated in the system to
pressure is severe enough to cause the local pressure to reach the vapor be analyzed, the engineer need not be concerned with its effects.
pressure, then the liquid boils, i.e., cavitates, vaporizes, forming large
pockets of undissolved gases and liquid vapor. This phenomenon is 6.9 Wave Transmission and Reflection at Pipe Junctions
referred to as column separation.
A consequence of this occurrence is the rather substantial change in In many instances it is desirable to be able to estimate portions of
the wave speed because of entrained gases and vapor bubbles affecting pressure waves reflected and transmitted at pipe junctions. We already
the liquid elasticity. This effect was discussed in Chapter IV. Also the fact know that at reservoirs, none of the positive (or negative) pressure wave is
I COMPLEX PIPE SYSTEMS 155
154 UNSTEADY FLOW IN PIPELINES

ol
HV
—T
EL-HGL <
-------- J.

PI
CF 1 , PIPE 2 PIPE I
PIPE 2
o
x HV
BEFORE AFTER

A MIXTURE OF

r
WATER AND Figure 6-27. Wave transmission and reflection at a series pipe Junction.
WATER VAPOR
AT THE VAPOR
PRESSURE
Example 6-7

Column separation caused by sudden valve closure. As an example, consider a 24-inch pipe reducing to a 6-inch pipe. An
a-value of 3300 fps and a velocity of 1.0 fps occur in the 24-inch pipe and
Figure 6-26. an a-valve of 3700 fps and a velocity of 16 fps occur in the 6-inch pipe.
The AH-value for sudden flow stoppage in the 6-inch pipe would be 1838
transmitted into the reservoir. We will look first at series pipe junctions ft.
and then at tee junctions, assuming no head loss occurs at the junctions. According to Equation 6-81, only 194 feet of this increase would be
passed on into the 24-inch pipe. In many respects, the large pipe acts as a
Series Pipe Junctions
reservoir.
The equations of momentum and continuity are applied to a pressure
Tee Junctions
head increase of AH approaching a junction. After the wave reaches the
junction, AHi passes through (is transmitted) and (AH-AH,) is reflected. The situation for tee junctions is shown in Figure 6-28. Using the
Figure 6-27 shows the configuration of the EL-HGL before and after the
same analysis technique as before leads to the following equations
occurrence. The results of the analysis show that
2a. a, A,
2ajA2 AH. = AH2 = ------------------- ------------------- AH .................(6-83)
AH. AH ............................................... (6-81) a2a3A! +3J33A, H-a^Aj
+ a, A2
or for similar a-values in all pipes,
where A is the pipe cross-sectional area. For equal a-values,
2A,
2A, AH.1 = AH2 =——-
2
2
— ...........................................................(6-84)
2A + A,
AHL ....................................................... (6-82)
= AFA7 AH
156 UNSTEADY FLOW IN PIPELINES

EL-HGL

VII. Pumps In Pipelines

The engineer designing liquid conveyance systems is frequently faced


with a pump selection problem. While vendors of pumps and pumping
Figure 6-28. Wave transmission and reflection at a tee Junction.
appurtenances are generally quite helpful in the selection process, it is
better if the engineer is well informed on the basics of pumps and their
operating characteristics. For this reason, the first part of the chapter will
Example 6-8 be devoted to a review of the theory of pumps, the use of the similarity
relationships and an explanation of how pumps fit into pipelines. Types of
As an example of this situation, consider a 24-inch main with a 6-inch pumps considered will be restricted to centrifugal, mixed-flow and
tee connection. Using the same wave speeds as in the previous example axial-flow pumps. No discussion of positive displacement pumjjs is
with pipe velocities Vi = 4.0 fps, V2 = 3.376 fps and V3 = 10 fps, we included.
calculate from Equation 6-83 that
7.1 Theory and Operation of Pumps
= 62 ft
Theoretical analysis of flow through pumps and the design of
for a AH-value of 1150 feet. Again very little of the large pressure increase impellers and casings is a complex, sophisticated discipline requiring
is passed into the larger pipe. extensive experience. We will not become involved in any of this detail,
but rather show how certain fundamental equations can give insight into
understanding the way pumps behave in piping systems.

Basic Theory

The fundamental equation applicable to pumping operations is the


moment of momentum equation (see Daugherty and Franzini [20]).

SMo = Qp(r2V2t -riVlt) ........................................................... (7-1)


where 2M0 is the sum of the moments of the pressure, shear and fluid
weight forces about the axis of the pump shaft; Qp is the mass flow rate;
and rVf is the moment of the tangential component of the velocity vector
about the pump shaft. (See Figure 7-1.)
Because the EM0 is the torque exerted by the pump on the fluid, we
can replace this term by the more conventional symbol T. It should be

157
158 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 159

where u> is the angular velocity of the pump in rad/sec, we get

........................................................ (7-5)

The value of Hp includes increases in potential, pressure and kinetic


energy.
Following Daugherty and Franzini [20], we see that H„ is not the
actual head increase across the pump. In applying Equation 7-1, we
assumed that the velocity at inlet and outlet of the pump impeller was
uniform in both magnitude and direction. Because the impeller vanes do
work on the fluid, pressure differences occur on opposite sides of the
vanes. Energy considerations dictate that higher pressures give lower
velocities and low pressures produce higher velocities. This Bernoulli
effect, coupled with viscous boundary layer action, warps the velocity
profiles at the impeller inlet and outlet giving nonuniform velocity
distributions.
As a result, the actual head is written as

=f(C2r2V2t -CJTJV^) .......................... ; ............ (7.6)


where Hp < Hp.
If we wish'to include a pump in a pipeline system, we would like to
know the head increase between the suction flange and the discharge
flange (or the sump water level and the discharge flange). Accordingly, the
value of Hp across the impeller must be adjusted to reflect losses between
suction side (or sump) and the discharge side. The resulting value is Hp <
Hp and this Hp-value is the term included in the one-dimensional
Figure 7-1. Schematic diagram of centrifugal pump Impeller showing
work-energy equation of hydraulics.
velocities.

noted that forces on the fluid other than those caused by the pump 7-7)

CS

+
)
Mr N
K)| <

+
N

+
hardware are either negligible (shear and weight) or have zero moment

+
arm (pressure at inlet and outlet). Consequently, the torque exerted on the
fluid by the pump is With some adjustments, depending on the pump and manufacturer, this
Hp-value is the value shown on the pump characteristic curve.
T = Qp(r2V2t -rtVlt) ..................................................................... (7-2)
Pump Power and Efficiency
It is now possible to develop an expression for the head produced by
the pump. Using the conventional fluid power equation The power applied to the pump shaft is generally given in horsepower
with the symbol BHP (brake horsepower). Because of various losses only a
fraction (70 percent to 90 percent) of this power is added to the fluid in the
Power = QyH 7-3)
pipeline. The overall pump efficiency is given as
where Qy is the weight flow rate and Hp is the energy added to each pound
of fluid, and equating it to the mechanical power equation QyH (7-8)
e
X
Power = Teo £
550 BHP
.......................................................................... (7-4)
160 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 161

and this value is found from laboratory tests for a number of different impossible. Therefore, we must choose the most important requirement
operating conditions. and make adjustments for the effects of other non-similarities. Because
Losses between the pump shaft power and the final power added to smooth flow through the pump is most important, Equation 7-9 is used as
the pipeline fluid are the result of many causes. There are mechanical the primary similarity criteria in pump similitude. This means that viscous
losses caused by friction in bearings, seals and packings. There is a loss effects are not properly accounted for and some adjustments must be
resulting from pumping of dead water behind the impeller (disk friction). made to test results to take into account unequal Reynolds numbers.
There are hydraulic losses in the pump intake, the impeller and the Generally, this is done with small adjustments to the efficiency. Pumps
diffusing section at the outlet. There is a loss because of leakage backward satisfying Equation 7-9 are referred to as homologous pumps.
from the high pressure to the low pressure side of the impeller through the Equation 7-9 doesn’t directly show the relationships between head
wear-ring gaps. All of these causes extract energy and reduce the pump increase and power requirements between model and prototype. However,
efficiency. However, the engineer has little control over these factors, appropriate equations can be deduced using the basic theoretical
except that he can consider a range of different pumps to maximize relationships. Equation 7-6 shows that head increase is proportional to
efficiency for his particular application. pump speed, size and flow velocity, or in equation form,
Similarity Laws

a
The principles of hydraulic similitude find important application in
both constant-speed pumping situations and in water hammer situations Replacing Q with ND3 from Equation 7-9 and collecting terms gives
caused by pump power failure. The similarity principles permit us to
predict heads, discharges and torques over a wide range of speeds when
using only the basic information given at one speed. ............................................................ (7-11)
For those familiar with conventional modeling parameters for - constant
N2D2
hydraulic problems, i.e., Reynolds number, Froude number, etc., it is
interesting to recognize that in the case of pumps, kinematic similarity If the same arguments are applied to Equation 7-2 for torque,
takes precedence over dynamic similarity. In kinematic similarity the
velocity fields in the model and prototype should be identical (scaled T.QpD
images of one another). Because pumps are run at a speed determined by
the motor and not affected by the flow, then we must select flows which Again using Equation 7-9 gives
give identical ratios of fluid flow velocity to impeller speed. Flow velocities
are proportional to Q/D2 and impeller velocities are proportional to ND
where D is a typical pump dimension (generally the impeller diameter)

3
(7-12

-
and N is the rotational speed in revolutions per minute (rpm). Kinematic n = constant
pN2D5
similarity requires these ratios to be constant, which gives the following
equation Using the relationship BHP Too gives an appropriate relationship for
Q power
=■ constant .................................................................... V(7-9)
--- 3-.....................................................................................................................................
ND ’
-------- = constant (7-13)
pN3D5
Because viscous effects would seem to be important in pumps, it
would be desirable to have Reynolds number equivalence in model and These relationships can be used to predict changes in discharge, head
prototype. In terms of flow rate, the equation is and power requirements for pumps of different size (impellers trimmed)
-3— = constant ..................................................................... (7-10) or pumps running at different speeds. The accuracy of the prediction
DP decreases as the changes in speed and size become more different from the
test conditions. The application we are most interested in for water
where v is the kinematic viscosity of the fluid. hammer situations is when power to a pump fails and the pump begins to
Requiring both Equations 7-9 and 7-10 to be satisfied in a decelerate. In this case, the decelerating pump is a prototype of itself
model-prototype situation would be so restrictive as to be essentially
162 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 163

(model scale — 1:1) at successively changing speeds. Under these Specific Speed
conditions we will use the similarity rules as the best estimate of pump
performance at any speed. This iterative process of pump selection can be accomplished several
ways. One approach is to calculate the specific speed of the pumping
Types of Pumps situation. The specific speed is calculated from the equation
We will consider three basic types of pumps—centrifugal, mixed-flow N _ N (rpm) VQ (gpm) ...........................................................(744)
(turbine), and axial-flow (propeller) pumps. The centrifugal pump is S
' h3'4(ft)
primarily designed to increase pressure substantially for relatively small
flow rates. The flow through the impeller is in the radial direction (normal Entering a chart such as Figure 17-16 in Daugherty and Franzini [20], one
to the pump shaft) and energy is added primarily through centrifugal can determine the type of pump required (or whether any type will work).
action. As an example of the value of the approach, assume that your specific
At the other extreme, the axial-flow pump is designed to pass speed calculation gives a number twice as large as the optimum value for
relatively large flow rates at a relatively small head increase. Because the the type of pump you prefer. This result suggests that if you use four
pump impellers resemble propellers, the fluid passes over the vanes pumps in parallel, the Ns-value will be just right. You can now search for
parallel to the pump axis and energy is added through increasing velocity pumps with one-fourth the line capacity with some assurance of finding
and pressure. ones that have good operating efficiency.
The mixed-flow pump is a combination of the two previous types and
it provides moderate pressure increases for moderate flow rates. The Cavitation
mixed-flow pump generally finds greatest application in restricted space
situations such as wells where multistaging can provide the required The possibility of cavitation is particularly important in pump
pressure increase without increasing the pump size to objectionable levels. selection. While the pump vendor is quite capable of assisting in this
Multistaging is the placing of pump impellers in series (generally on process, it is good practice for the engineer to make his own evaluation.
the same shaft) so that pressure undergoes a sequence of incremental The occurrence of cavitation is determined in the testing laboratory.
increases to the required value. This approach is generally used when When the discharge and pump location are such that the pressure at some
space requirements are limited (as discussed above) or when efficiency point in the pump drops to the vapor pressure of the liquid, cavitation
requirements are better served. begins. A further deterioration in the conditions will lead to massive
Paralleling of pumps is generally accomplished by simply placing two cavitation and result in sharp drops in efficiency, possible vibration
or more pumps side by side and connecting them to the pipeline via a problems and, if continued for long periods, failure of the pump
manifold. Parallel pumps are used when flow rate requirements are so hardware.
high that no single pump can efficiently or economically accomplish the Information which can be used to design pump installations to
joh. prevent cavitation is given by pump manufacturers in several ways. The
There are a variety of other pumps not discussed here and many other
simplest is “suction lift.” This value is supposed to be the maximum
considerations in pump selection, depending on the problem situation.
height the pump may be situated above the sump to prevent cavitation
The Pump Handbook by Karassik, Krutzsch, Fraser and Messina [21] is a
under normal conditions. Of course if one has non-normal conditions, it is
good compilation of the various aspects of pumps and pump selection.
not clear what to do.
Another technique (popular with turbine and propeller pump
manufacturers) is to provide a curve of required submerged vs. pump
discharge. This graph will show what distance the impeller must be
7.2 The Pump In the Pipeline submerged to prevent cavitation (or air intake) at sea level for water at
normal temperatures. Adjustments must be made for non-standard
The pumps under consideration here fit into pipeline systems as conditions.
reactive elements. That is, the head increase and flow rate they produce The most fundamental measure of requirements to prevent cavitation
depend on the pipeline system in which they are placed. A large is the net positive suction head (NPSH). An equation for NPSH is
component of pump selection involves the trial-and-adjust process of
finding a pump compatible with the given pipeline system. NPSH = — - - Zs - h L (7-
yy.S entr.
15)
164 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 165

where po is the ambient pressure, Py is the vapor pressure of the liquid, z s


is the elevation of the impeller above the sump, and ht + is the head loss

CL
em
between the sump and the pump impeller. A curve of NPSH vs. discharge
is given by some manufacturers. With a value of NPSH, Equation 7-15
can be used to provide information on Zg for non-standard values of p0
and pv.
Once the pumping configuration has been established, the pumps
selected, and the pipeline sized and laid out, it is time to evaluate the
effects of water hammer. The next sections will be devoted to the
calculation of the pressures and velocities resulting from various
conditions of pump power failure and startup,

7.3 Pump Characteristics and Power Failure Rundown

Sudden loss of energy to the pump can result from an unsuspected


power failure or because an individual has turned off the power. In either
case, the pump begins to decelerate with pressure dropping on the
discharge side of the pump and rising on the suction side (if it is an inline
booster pump). The resulting water hammer can lead to column
separation and the unpredictable results of cavity closure. It is important,
therefore, to be able to analyze this common situation and determine if
undesirable pressure extremes occur.

Power Failure Rundown

As the pump slows down after power failure, its head vs. discharge
and torque vs. discharge characteristics change. It is customary to assume
that as the pump speed changes, the pump characteristics at any speed
can be found using the similarity relationships for homologous pumps.
While we are interested in the change in pump torque as rundown occurs,
we will concentrate at this time on the head vs. discharge characteristic. Figure 7-2. Multi-characteristics for a given pump at various speeds.
For various speeds, the pump characteristics could be shown as on
Figure 7-2 where each curve is calculated from the original curve at No The curves at speeds Nn N2, etc. can be generated by choosing data
using Equations 7-9 and 7-11. It should be noted that in our applications, points along the base curve at No and using the equations
D is the same at all speeds so we can modify the previous equations to the
form

ZZ
Qi = % (7-19)

—o
olz

constant ......................................................(7-16)
II

—2. = constant ......................................................(7-17) (7-20)


N2

In fact, by using the same Qo and Hn and varying N, we can generate a


= constant ...................................................... 7-18) large number of points, each on a different characteristic curve. These
166 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 167

points all fall on a parabola from Co passing through the origin. If the Setting Up the Equations
same procedure is repeated for points C_ 1( C_2, C-3, etc. on the original
curve, then the complete set of pump characteristics can be drawn. Along each of the parabolas passing through C_ 2, C_2, Co, C+i, etc.,
As the speed of the pump changes, a line is traced on the in Figure 7-2, the values of Q/N and Hp/N2 is a constant. It is, therefore,
characteristic diagram of Figure 7-2 which depicts the head and discharge possible to represent the entire pump characteristic data of Figure 7-2 on a
generated as rundown progresses. Of course the rundown progression is single curve. The same reasoning applies to the torque data T/N2. Typical
determined by the rotational inertia of the rotating parts and the torque examples of these two curves are shown in Figure 7-3. To demonstrate how
exerted by the liquid on the impeller as well as by the pipeline hydraulics. the data from Figure 7-2 can be condensed so markedly, consider finding
Two general types of situations are depicted on Figure 7-2. Situation a given head Hp for a given discharge and speed. If the speed is known,
1 typically occurs when the static lift is high and the pipeline is short. The compute Q/N, read the curve in Figure 7-3(a) for a value of Hp/N2, then
inertia of the water in the pipeline is relatively small and the gravitational compute Hp. In order to find the changed N-value, we must use the torque
force is assisting in the slow-down process. As a consequence, the information and the rotational inertia of the system.
discharge through the pump drops to zero rather quickly while a positive In a more explicit manner, if N is known, then Figure 7-3(a)
head across the pump still exists. Then flow backwards through the pump represents Hp = f(Q) in a manner similar to constant speed pumps. We
occurs unless a check valve is installed in the line. could again generate a parabolic curve to approximate the true function
In the second situation, the pipeline is generally relatively long and a Hp = f(Q) and proceed as before. This time, however, we will take a more
large portion of the head generated by the pump is used to overcome flexible approach.
frictional losses in the line. When power fails in this configuration, the Let us pose the problem of a set of parallel identical pumps in a
large inertia of the fluid in the pipeline dies out slowly, mostly by viscous pipeline. Schematically, they are shown in Figure 7-4. There are five
action; the pump tends to decelerate more slowly and the head drops to unknowns in this system (once the new speed has been computed). The
zero before the flow rate does. At this point the flow either continues equations are as follows:
through the pump, doing work on the impeller in a “windmilling”
situation, or a bypass line around the pump opens and flow bypasses the Suction side C . Vp = Cj • C2 (7-
pump with relatively little loss in energy. Discharge side C': Vpr = C3 + C4 21)
It should be apparent now that, in general, there are four possible d
flow configurations through a pump. Continuity: Vp A = Vp A,r b r u (7-
1. Flow is in the forward direction through the pump and the pump s d 22)
is rotating forward.
Flow in the reverse direction occurs while the pump is still Energy: Hp + H (7-
r
rotating forward. s 23)
Flow in the reverse direction occurs when the pump is rotating Pump: H = f(Q) = f' (V ) or f" (V )................................ ... . . .(7-
backwards. 25) (7-
Finally, flow in the forward direction occurs while the pump is P r
a s 24)
rotating backwards. We have five equations and five unknowns and it remains only to
The possible occurrence of any of these pump flow and rotation solve them. Recall from the section on constant speed pumps, we selected
configurations depends on the existence of bypasses, check valves and three data points and found a quadratic equation for 7-25, then solved for
regular line valves. In general, only the data on configuration no. 1 is all the unknowns. Because this approach was rather restrictive, what we
available from manufacturers. If the pump is expected to operate in any of will do here is construct a table of Q/N vs. Hp/N2 data and use linear
the other three modes, then special tests must be run to obtain the desired interpolation to set up an equation for Hp = f(Q). Care must be taken to
characteristics. divide the pipeline discharge equally between all pumps.
To develop familiarity with the problem solving approach, we will
assume first that there is a check valve in the discharge line and, if the Finding the Change In Speed
pump is a booster pump, we will assume there is a forward bypass around
the pump which opens to bypass the pump in the event the head drops to The previous discussion was based on the premise that the new speed
zero under forward flow conditions. Under these conditions we will be was known at the time the new head and velocity values were to be
operating in the first configuration only. computed. This speed is found by calculating the decelerating torque and
computing the speed change over a At time interval.
168 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 169

BYPASS
I

CL CM
I2 ■3
-I

vnc-urs VMUVC

Figure 7-4. Typical parallel pump booster configuration.

The rotating portions of the pump—shaft, motor and impeller—have


a rotational moment of inertia. Because the impeller is rotating full of
water, its rotational inertia must be estimated as well. These values are not
easy to obtain, but without them, the analysis is meaningless.
Under steady state power-on conditions the driving torque of the
Q motor is balanced by the resisting torque of the water exerted via pressure
N forces on the impeller vanes. When power fails, the driving torque
disappears and the resisting torque decelerates the pump. The pump
decelerates according to the equation
(a) Typical Hp/N2 vs. Q/N curve from Figure 7-2.
dN
dt ....................................................................(7-26)

H
II
where I is the rotational inertia of the system.
To find the change in speed we must integrate Equation 7-26.

f dN = f dt
J T 2TTI J

We don’t know how T varies with time at this point, so we choose to keep
At small and let T be constant at its known value at the previous time level.
Incorporating this approach, the new rotational speed becomes

N(t + At) = N(t)- T(t) At ............................................................ (7-27)


27rl

By this means the new speed can be determined explicitly using a value of
torque at a known speed obtained by table interpolation from the T/N 2 vs.
Q/N table. It is now possible to proceed with the calculation for the heads
and velocities.

(b) Typical T/N* vs. Q/N curve. Solving the Equations

For simplicity in solving the set of Equations 7-21 through 7-25, we


2 2
Figure 7-3. Typical Hp/N and T/N curves for a pump. will represent Hp — f(Q) as a linear function. In other words, the plot of
170 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 171

Hp/N2 vs. Q/N will be a sequence of straight line segments (see Figure we can now combine Equation 7-29 easily with the other appropriate
7-5). The equation of the straight line over the anticipated range of Q/N is equations. The result of such a combination gives

z
st
(7-28) ................................ (7-30)
QA. ' QB N C7AdNst

z
where Nst is the number of stages for each of the pumps. Condensing this DU

equation to the form where Npu is the number of pumps in parallel. If Vps > 0, then Equations
7-21 through 7-5 can be used to find the remaining unknowns.
In addition, we must check Hp. If Hp < 0, then we set Hp = 0 and
olz

........................................................(7-29) HPS = Hpd and compute the unknown velocity values from the following
t-

equations:
c c + c c
.................................................... (7-31)
A7”
c+c -
2 4A
S
........................................................... (7-32

The Equations 7-21 and 7-22 can be used to find Hps and HPd.
If, however, Vpj is negative, then Vps = VPd. — 0 and Equations
7-21 and 7-22 are used to compute HPS and Hpd . Also we must check
Q/N and if we are outside the interval A-B, a new set of coefficients C7 and
Ca must be computed and the solution process repeated.

Example 7-1

Four parallel pumps are to be used to pump approximately 11,000


gpm from a reservoir at elevation 395 feet to a storage reservoir whose
surface elevation is 840 feet (see Figure 7-6).
The pump discharge lines are check-valved and manifolded into a
single welded steel pipeline 30 inches in diameter. The pipe extends
horizontally from the pump station at elevation 415 feet for a distance of
2000 feet. It then slopes upward for a distance of 3 miles to elevation 700
feet. The remaining two miles of pipe are reinforced concrete and it slopes
upward to enter the storage reservoir at elevation 810 feet.
The f-value and wave speed in the steel pipe are 0.0128 and 3590 fps
respectively. For the concrete pipe, these values are 0.0190 and 3486 fps.
The pumps are Worthington 15H-277 five-stage turbine pumps with
characteristics shown on the following page (Courtesy of the Worthington
Pump Corp). The 10 19/32-inch impeller is used. The moment of inertia
of the rotating hardware and water is estimated to be 475 lb-ft2.
20

The consequences of complete pump power failure to the system are


Figure 7-5. Piecewise linear representation of H„/N2 vs. Q/N values. to be found in the absence of any surge control devices.
172 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 173

Solation

Program no. 8 for complete power failure to a source pump


configuration is used. A program listing follows in Figure 7-7.
The data cards necessary to perform the computer simulation are
Svpcrwd.i
RATING CURVES Section 2403 Page 225
shown below. A plot of the EL-HGL vs. time up to the point of column
Sect. 2403-1 Psge 18T
M.y 15, IDS') ltnue
(60 CYCLE) April I, 1960 separation is shown on Figure 7-6.
15H-277 Column separation occurs at 5 seconds after power failure. Once
1760 RPM column separation occurs, the analysis technique is no longer valid and
execution of the computer program should be terminated.

DATA
TOTAL HEAD IN FEET PER STAGE

SSPECS NPIPES’3,IOUT"5,NPARTS"3,TMAX"10«,HATM-32.,HRES-840., ZEND-810.,


QACC-.50 SEND
1 30. 2000. • 0128 3590. 415
2 30. 15840. .0128 3590. 415
3 30. 10560. .0190 3486. 700
$ PUMPS NPUHPS-4,RPH-1760.,WRSQ-475.,NSTAGE-5,HSUHP-395 .,
QN-0.,1000.,2000.,3000.,4000.,5000.,
HNSQ-136.,128.,117.,96.,63.,24.,
TNSQ-55.,61.,75.,87.,93.,95.,
:r:± SEND

Hi

r;
BRAKE HORSEPOWER

100

75

N.RS.H.— FEET

50

25

10 20 30 40 50
CAPACITY IOO GALLONS PER MINUTE
♦ K»7 Dia.

VERTICAL m«mt rvn* DIVISION, OCIVEI.


COLVHOD WORTHINGTON
IWAo'd in U.S.A. Figure 7-6. Pressure wave propagation as a result of pump power failure.
174 UNSTEADY FLOW IN PIPELINES
PUMPS IN PIPELINES 175

Q********************************************************** *********************
1:
c* PROGRAM NO. 8 *
2:
3: C* PROGRAM FOR PUMP RUNDOWN FROM POWER FAILURE * 62: C COMPUTE STEADY STATE DISCHARGE
Q********************************************************** ********************* 63: OTRY=QN(4)
64: COF.F-1 2 . * 1 4 4 . * 1 4 4 . * 16 . *NPUMPS* NPUMPS/(6 4.4 * 4 49 • * 4 4 9 • * PI * Pl)
5 : c DO 320 NZ-1,20
6: C WATER HAMMER PROGRAM FOR PUMP RUNDOWN RESULTING FROM POWER FAILURE 65: DO 300 1=1,5
7: C SYSTEM CONFIGURATION HAS PUMPS AT UPSTREAM END AND RESERVOIR AT DOWNSTREAM END 66: IF(OTRY.GT.QN(I).AND.QTRY.LE.QN(1+1)) GO TO 310
8: C PROGRAM WILL HANDLE ANY NO. OF PARALLEL PUMPS-ALL FAIL SIMULTANEOUSLY 67: 300 CONTINUE
9: PROGRAM WILL HANDLE UP TO 8 SERIES PIPES- MUST BE AT LEAST TWO SERIES PIPES 68: WRITE(6,250)
<JO<JOUOOOUO<JOOOOOO<JOO

10 : 69: STOP
11: NPIPES = NUMBER OF PIPES IN SERIES - PIPE NO. 1 IS JUST DOWNSTREAM FROM PUMP 70: 310 HN»HNSQ(I)+(QTRY-QN(I))*(HNSQ(1+1)-HNSQ(I))/(QN(1 + 1)-QN(I))
12: IOUT = PARAMETER WHICH WRITES OUT EVERY IOUT-TH COMPUTATION 71: SUM=0,
13: NPARTS = MINIMUM NUMBER OF PARTS INTO WHICH PIPES ARE DIVIDED 7 2: DO 301 J-l,NPIPES
14: TMAX=HAX. REAL TIME OF RUN-SEC HATM=ATMOSPHERIC PRESSURE HEAD (POSITIVE)-FT 73: 301 SUM=SUM+F(J)*L(J)*QTRY*QTRY/D(J)**5
15: HRES=ELEVATION OF WATER SURFACE IN RESERVOIR 74: PUNCT=HSUHP-HRES+NSTAGE*HN-COEF*SUM
16 : ZEND«ELEVATION OF DOWNSTREAM END OF LAST PIPE AT RESERVOIR - FT 75 : FPRIME-NSTAGE*(HNSQ(1+1)-HNSQ(I))/(ON(1+1)-QN(I))-2.*COEF*SUM/QTRY
17 ; QACC=ACCURACY OF DISCHARGE ITERATION FOR STEADY STATE COMPUTATION - GPM. 76: QNEXT-QTRY-FUNCT/FPRIMF
PIPE»PIPE NUMBER 77: IF(ABS(QNEXT-QTRY).LT.QACC) GO TO 350
18: QTRY-QNEXT
19: AO-WAVE SPEED-FPS L()=LENGTH-FT D()«DIAM)-IN FO-FRICTION FACTOR(DARCY) 78:
79 : 320 CONTINUE
20 : PIPES()-UPSTREAM ELEVATION OF PIPE - FT HEADH()-PRESSURE HEAD IN PIPE - FT WRITE(6,251)
21: 80 :
NPUMPS-NUMBER OF PUMPS IN PARALLEL HSUMP=ELEVATION OF WATER SURFACE IN SUMP 81: STOP
22:
RPM=STEADY STATE PUMP SPEFD-RPM NSTAGE-NUMBER OF STAGES FOR PUMP 82: 350 QLINE=QNEXT*NPUMPS
23 :
24 : 83 : Q-ONEXT
WRSO-MOMENT OF INERTIA OF PUMP AND MOTOR IN LBM-FT SQUARED
25 : QN () ■'DISCHARGE FROM PUMP CHARACTERISTIC CURVE - GPM 84 : HPUMP=NSTAGE*HN+HSUMP
26 : HNSQO-HEAD PER- STAGE FROM PUMP CHARACTERISTIC CURVE - FT 85: C0EF=4 .* 1 4 4 ./( 4 49 ,*PI)
TNSQO- BHP PER STAGE FROM PUMP CHARACTERISTIC CURVE 86: DO 2 1=1,NPIPES
27:
87: VZE RO(I)=QLINE*COEF/D(I) * * 2
28: AREA(I)=0.25*PI*D(I)*D(I)/144.
29 : DIMENSION X(8,30) ,V(8,30) ,H(8,30),HLOW(8,30),HHIGH(8,30), 88 :
5-JCAD (8,30) ,VNEW(B,30) ,HNEW(8,30) 89 : C (I)=32.2/A(I)
3 0:
DIMENSION L(8),D(8),A(8) ,PIPES (8) ,F(8) ,VZERO(8) ,NPAR(8) , 90 : DELTT(I)=L(I)/(NPARTS*(VZERO(I)+A(I)))
31:
5C(8) ,AK(8),SINE(8) ,AREA(8) ,DELTT(8) ,RATIO(8) 91: IFfl.EQ.NPIPES) SINE(I)=(ZEND-PIPEZ(I)»/L(I)
32: IF(I.EQ.NPIPES) GO TO 2
33: DIMENSION QN(6),HNSQ(6),TNSQ(6) 92:
LOGICAL FAIL,SHUT,ZEROH 93: SINE(I)=(PIPEZ(1+1)-PIPE2(I))/L(I)
34 : 2 CONTINUE
35 : INTEGER PIPE 94 :
C
36: REAL LA,L 95:
C ** COMPUTE MINIMUM DELTA T **
37: NAMELIST /SPECS/ NPIPES,IOUT,NPARTS,TMAX,HATM,HRES,ZEND,QACC 96:
C
38 : NAMELIST /PUMPS/ NPUMPS,RPM,WRSQ,NSTAGE,HSUMP,ON,TNSQ,HNSQ 97: DELT=DELTT(1)
39 : C 98: KMIN=1
40: READ(5,SPECS) 99: DO 12 1=2,NPIPES
41: READ(5,200) (PIPE,D(I),L(I),F(I),A(I),PIPEZ(I),1=1,NPIPES) 100: IF(DELTT(I).GT,DELT) GO TO 12
42: 200 FORMAT(I10,5F10,0) 101: DELT-DELTT(I)
43: READ(5,PUMPS) 102: KMIN»I
44: C 103: 12 CONTINUE
45 : WRITE(6,202) 104 : DO 13 1=1,NPIPES
46 : WRITE(6,101) NPIPES,NPARTS,HRES,HATM,ZEND,TMAX,IOUT,QACC 105: IF(I»EQ,KHIN) GO TO 14
4 7: WRITE(6,102) 106 : ANPAR=L(I)/(DELT*(VZERO(I)+A(I)))
DO 3 1 = 1,NPIPES 107: NPAR(I)=ANPAR
4 8:
LA-L(I)/A(I) 108: TEST-NPAR(I)
49 :
3 WRITE(6,103) I,D(I) ,L(I) ,F(I) ,A (I) , PIPES (I) , LA 109: IF(ABS(TEST+l-ANPAR).LT..0001) NPAR(I)-NPAR(I)+1
53: GO TO 13
51: WRITE(6,104) 110:
NPUMPS,NSTAGE,RPM,WRSO,HSUMP 111: 14 NPAR(I)-NPARTS
52: WRITE(6,105)
112: 13 CONTINUE
53: WRITE(6,I06)
(QN(I),HNSQ(I),TNSQ(I),1-1,6) 113: C
54 : WRITE(6,107) C CONVERT TO 0/N, H/NSQ, T/NSQ
55: C 114:
FAIL-.FALSE. COEF-60.* 550./(2.*PI)
56: 115:
DO I 1=1,6
57: SHUT-.FALSE. 116: QN (I)-QN(I)/( 4 49 .*RPM)
58: ZEROH-.FALSE. 117: TNSQ(I)=NSTAGE*COEF*TNSQ(I)/RPM** 3
59 : PINSRT-WRSQ/32.2 118: 1 HNSQ(I)=HNSQ(I)/RPM**2
60 : PI-3.141592 119:
61: C 120 :
121:

Figure 7-7. Computer program for source pump rundown as a result of


power failure.

Figure 7-7. Continued.


176 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 177

122: C 182: C
123: C 183: C BEGIN TRANSIENT ANALYSIS
124 : C ♦* SET UP CONDITIONS FOR STEADY STATE (T-0) ** 184: C ---------------------------------------------------------------- --- -----------------------------------------------------------------------------------
125: C 185: C
126: H(1,1)-HPUMP 186: DO 99 II«1,INDEX
127: V(1,1)»VZERO(1) 187: T-T+DELT
128: DO 20 I»l,NPIPES 188: C
129: DELL“L(I)/NPAR(I) 189: C ** COMPUTE H AND V AT INTERIOR NODES **
130: DELHF=12.*F(I)*DELL*VZERO(I)**2/(64.4*D(I)) 190: C
131: AK(I)»12.*F(I)* DELT/(2.* D(I)) 191: DO 30 1 = 1,NPIPES
132: K=NPAR(I)+1 192: K«NPAR(I)
133: X(I,l)-0, 193: DO 30 J = 2,K
134: HEAD(I,1)"H(I,1)-PIPEZ(I) 194 : RA«RATIO(I)*A(I)
135: RATIO(I)"DELT/DELL 195: VMINUS“V(I,J)-RA*(V(I,J)-V(I,J-l))
136: DO 21 J«2,K 196: VPLUS=V(I,J)-RA*(V(I,J)-V(I,J +1))
137: X (I,J)»(J-1)*DELL/L(I) 197: HMINUS»H(I,J)-RA*(H (I,J)-H(I,J-l))
138: H (I, J)=H(1,1)-DELHF*(J-l) 198: HPLUS“H(I,J)-RA*(H(I,J)-H(I,J + l))
139: HEAD(I,J)«H(I, J)-(PIPEZ(I)+X(I,J)*L(I)*SINE(I) ) 199: VNEW(I,J)=0.5*(VMINUS+VPLUS+C(I)*(HMINUS-HPLUS)+C(I)*DELT*SINE(I)
140: 21 V(I,J)«VZERO(I) 200:
141: IF(I.EQ.NPIRES) GO TO 20 $*(VMINUS-VPLUS)-AK(I)*(VMINUS*ABS(VMINUS)+VPLUS*ABS(VPLUS)))
201: HNEW (I,J)=0.5*(HMINUS+HPLUS+(VMINUS-VPLUS)/C (I)+DELT*SINE(I)*
142: H(I+1,1)-H(I,K) 202 :
143: V(1+1,1)»VZERO(1+1) $(VMINUS+VPLUS)-(AK(I)/C(I))*(VMINUS*ABS(VMINUS)-VPLUS*ABS(VPLUS)))
203:
144 : 20 CONTINUE 30 CONTINUE
204 :
145: DO 23 1-1,NPIPES C
205:
146: K=NPAR(I)+1 C ** COMPUTE H AND V AT INTERIOR JUNCTIONS **
206:
147: DO 23 J«1,K C
207:
148: HLOW(I,J)«H(I,J) KK»NPIPES-1
208:
149: 23 HHIGH(I,J)®H(I,J) DO 40 I»1,KK
209:
150: PHMAX--100, K=NPAR(I)+1
210:
151: PHMIN-100000. 211: VMINUS’V(IfK)-RATIO(I)*A(I)*(V(I,K)-V(I,K-1))
152: DO 11 I«l,NPIPES HMINUS-H(I,K)-PATIO(I)*A(I)*(H(I,K)-H(I,K-l))
212:
153: K«NPAR(I)+1 213: CCC“VMINUS+C(I)*HMINUS + C(I)*VMINUS*DELT*SINE(I)-AK(I)*VMINUS*
154 : DO 11 J-1,K 214: SABS(VMINUS)
155: IF(HEAD(I,J).LT.PHMAX) GO TO 16 215: VPLUS»V(1+1,1)-RATIO(1+1)*A(I+1)*(V(I+1,1)-V(1+1,2))
156: IPMAX-I 216: HPLUS = H(1 + 1,1)-RATIO(1+1)* A (1+1)* (U (1+1,1)-H(I +1 , 2))
157: XMAX-X(I,J) 217: CC=VPLUS-C(1+1)*HPLUS-C(1 +1)* DELT*VPLUS*SINE(1 +1)-AK(1+1)*VpLUS*
158: PHMAX=HEAD(I,J) 218: SABS(VPLUS)
159: TTMAX’T 219: HNEW(I,K)=(-CC*AREA(1+1)+CCC*AREA(I))/(C(1+1)*AREA(1+1)+C(I)*
160: GO TO 17 220: SAREA(I))
161: 16 IF(HEAD(I,J).GT.PHMIN) GO TO 17 221: HNEW(1+1,1)“HNEW(I,K)
162: IPMIN-I 222 : VNEW(I,K)=CCC-C(I)*HNEW(I,K)
163: XHIN»X(I,J) 223: VNEW(I+1,1)=CC+C(1+1)*HNEW(1+1,1)
164: PHMIN-HEAD(I,J) 224: 40 CONTINUE
165: TTMIN»T 225: C
166: 17 CONTINUE 226: C ** COMPUTE H AND V AT DOWNSTREAM END **
167: 11 CONTINUE 2 27 ; C —THIS BOUNDARY CONDITION IS FOR A CONSTANT HEAD RESERVOIR—
168: C 228 : C
169: C ♦♦ WRITE OUT STEADY STATE CONDITIONS ** 229 : NV=NPAR(NPIPES)+1
170: C 230: VMINUS’V(NPIPES,NV)-RATIO(NPIPES)*A(NPIPES)*(V(NPIPES,NV)-
171: T“0.0 231: SV(NPIPES,NV-1))
172: INDEX»TMAX/DELT+1 232 : HMINUS=H(NPIPES,NV)-RATIO(NPIPES)* A(NPIPES)*(H(NPIPES,NV)-
173: WRITE(6,204) 233:
174: WRITE(6,205) T SH(NPIPES,NV-1))
234 : CC«VMINUS+C(NPIPES)*HMINUS+C(NPIPES)*VMINUS*DELT*SINE(NPIPES)-
175: DO 22 1-1,NPIPES 235:
176: K»NPAR(I)+1 SAK(NPIPES)*VMINUS*ABS(VMINUS)
236 : HNEW(NPIPES,NV)-HRES
177: WRITE(6,206) I,(X(I,J),HEAD(I,J),H(I,J),V(I,J),J = 1,K)
237: VNEW (NPIPES,NV)=CC-C(NPIPES)*HNEW(NPIPES,NV)
178: 22 CONTINUE 238:
179: WRITE(6,212) RPM,Q C
239: C BOUNDARY CONDITIONS AT THE PUMP
180: Q-Q/449. 240 :
181: C IF(SHUT.OR.ZEROH) GO TO 42
241:
QQ=Q/RPM
DO 550 1-1,5

Figure 7-7. Continued. Figure 7-7. Continued.


178 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 179

302 : K=NPAR(I)+1
242: IF(OQ.GT.pN(I).AND.QQ.LE.ON(1+1)) GO TO 551 303 : DO 61 J«1,K
243 : 550 CONTINUE 304 : IF(HNEW(I,J).LT.HLOWfl,J) ) HLOW(I,J)=HNEW(I,J)
244: WRITE(6,260) 30 5 : IF(HNEW(I,J).GT.HHIGH(I,J)) HHIGH(I,J)= HNEW(I,J)
245 : STOP 306 : HEAD(I,J)=HNEW(I,J)-(PIPEZ(I)+X(I,J)*L(I)‘SINE(I))
246 : 551 TN2=TNSp(I)+(OO-QN(I) ) * (TNSO (1 +1) -TNSQ (I) ) / (ON (I +1) -pH (I) ) 307: IF(HEAD(I,J).LT.PHMAX) GO TO 66
247: RPM’RPM-30. *TN2*DELT/(PI*PINERT)*RPM*RPM 308: IPMAX’I
248 : 42 VPLUS’V(1,1)-RATIO(1)*A(1)*(V(1,1)-V(1,2)) 309 : XMAX=X(I,J)
249: HPLUS3 fJ (1,1)-RATIO (1) *A(1) * (H (1 , 1)-H(1,2) ) 310 : PHMAX-HEAD(I,J)
250 : C1«VPLUS-C(1)*HPLUS-C(1)*OELT*VPLUS*SINE(1)-AK(1)*VPLUS*A3S(VPLUS) 311: TTMAX’T
251: IF(SHUT) GO TO 43 312: GO TO 67
252: IP(ZEROH) GO TO 518 313: 66 IF(HEAD(I,J).GT.PHMIN) GO TO 67
253 : DO 500 NZX1,20 314 : IPMIN«I
254 : HA=HNSO(I) 315: XMIN«X(I,J)
255 : HD»HNSO(I+1) 316: PHMIN=HEAD(I , J)
256: QA»pN(I) 317: TTMIN’T
257: QF3 = QN (1 + 1) 318: 67 CONTINUE
258 : C5=NSTAGE*RPM*RPM 319: IF(HEAD(J,J).GT.-HATM) GO TO 62
259 : C7“lHA-HB)/(QA-QB) 320 : WRTTE(6,214) T,I,X(I,J)
260 : C8’HB-QB*C7 321: FAIL’.TRUE.
261: C6=HSUMP+C5*C8+C5*C7*C1*AREA(1)/(NPUMPS*RPM) 322 : 62 CONTINUE
262 : C9“C5*C7*C(1)*AREA(1)/(NPUMPS*RPM) 323: 61 CONTINUE
263 : HPP=C6/(1.-C9) 324 : C
264 : VPPxCl+HPP*Cd) 325: C “ WRITE OUT H,V,AND HEAD VALUES AND TEST FOR TMAX **
265 : QPP=VPP*AREA(1)/(NPUMPS*RPM) 326: C
266 : DO 510 J»1,5 327 : 70 IF(FAIL) GO TO 71
267 : IF(QPP.GT.pN(J).AND,QPP.LE.QN(J+l)) GO TO 520 328 : IF(MOD(II.IOUT).NE.0) GO TO 72
268 : 510 CONTINUE 329 : 71 WRITE(6,205) T
269 : IF(OPP.GT.0.) WRITE(6,280) 330 : DO 73 I=1,NPIPES
270 : IF(QPP.GT.0.) GO TO 518 331: K»NPAR(I)*1
271: 519 J»I-1 332 : WRITE(6,206) I,(X(I,J),HEAD(I,J),HNEW(I,J),VNEW(I,J),J=1,K)
272 : IF(J.EQ.0) GO TO 43 333 : 73 CONTINUE
273 : GO TO 521 334 : IF (SHUT.OR.ZEROH) GO TO 74
274 : 520 IF(J.EQ.I) GO TO 530 335 : OQQa449.*Q
275: 521 I=J 336 : WRITE(6,212) RPM,00Q
276: 500 CONTINUE 337 : 74 IF(FAIL) GO TO 400
277 : WRITE(6,270) 338 : 72 CONTINUE
278 : STOP 339 : C
279 : 530 HNF,W(1,1)=HPP 340 : C ** PREPARE FOR NEXT TIME STEP COMPUTATION **
280 : VNEW(1,1)= VPP 341; C
281: O=QPP*RPH 342: DO 80 I=1,NPIPES
282 : GO TO 540 343: K»NPAR(I)+1
283 : 518 ZEROH-.TRUE. 34 4 : DO 80 J»1,K
284 : SHUT=>FALSE. 345: V (I,J)=VNEW(I,J)
285: HNEW(1,1)-HSUMP 346: 80 H(I,J)»HNEW(I,J)
286: VNEW(1,1)=C1+HSUMP*C(1) 347: IP(T.GT.TMAX) GO TO 400
287 : IF(VNEW(1,1).LE.0.) GO TO 43 348: 99 CONTINUE
208 : Q»VNEW(1,1)‘AREA(1)/NPUMPS 349 : C
289 : GO TO 540 350: - ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
290 : 43 VNEW(1,1)= 0.0 351: C END OF TRANSIENT ANALYSIS
291: 0=0. 352: C-
292 : SHUT®.TRUE. 353: C
293: ZEROH®,FALSE. 354 : c
294 : IINEW (1 ,1) ® (VNEW (1 ,1) -Cl)/C (1) 355 : c ** WRITE OUT MAXIMUM AND MINIMUM HEADS AND H-VALUES **
295 : IF(KNEW(1,1).LT.HSUMP) GO TO 518 356: c
296 : 540 CONTINUE 357: 400 CONTINUE
297 : C 358 : WRITE(6,207)
298 : C 359 : DO 401 IX1,NPIPES
299: C ** LOCATE MAXIMUM AND MINIMUM HEADS AND H-VALUES ** 360: WRITE(6,208) I
300 : C 361: K’NPAR(I)+1
301: DO 61 I»1,NPIPES

Figure 7-7. Continued. Figure 7-7. Continued


180 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 181

Example 7-2

To illustrate the effects of booster pumps under a power failure


situation, the same four pumps of example 7-1 are placed in the interior of
a pipeline. The pipeline is 30 inches in diameter, 45,000 feet long and
DO 401 J»1,K constructed of welded steel. The f-value is 0.0128 and the wave speed is
HEADMX-HHIGH(I,J)-(PIPEZ(I)+X(I,J)*L(I)‘SINE(I) )
HEADMN’ BLOW(I,J)-(PIPEZ(I> +X(I,J)‘L(I)*SINE(I)) 3590 fps. A profile of the pipeline and the steady state EL-HGL is shown
401 WRITE(6,209) X (I , J) , HEADMX,HEADMN,HHIGH(I,J) ,HLOW(I,J)
WRITE(6,210) PHMAX,IPMAX,XMAX,TTMAX on Figure 7-8.
WRITE(6,211) PHMIN,IPMIN,XMIN,TTHIN
C
The booster pump power failure program no. 9 is used to analyze the
C ******* FORMAT STATEMENTS ******* resulting water hammer. Check valves are installed to prevent backflow
C
C and a frictionless forward-flow bypass is activated when the pump head
101 FORMAT(5XNUMBER OF PIPES - 1,13/5X,1MINI HUM NO. OF PARTS PIPE IS
SDIVIDED INTO «',I3/5X,'RESERVOIR ELEVATION AT DOWNSTREAM END = drops to zero with forward flow occurring. The data necessary to run the
SF7.1,' FT'/5X,'ATMOSPHERIC PRESSURE HEAD «',F5.1,’ FT OF WATER'
S/5X,'ELEVATION OF DOWNSTREAM END OF LAST PIPE »',F7.1,’ FT'//5X, analysis is shown below and the program listing is given in Figure 7-9.
S'MAXIMUH REAL TIME OF ANALYSIS »',F7.1,' SEC'//5XOUTPUT IS PRINT
SED EVERY',13,' TH TIME INTERVAL'//5X,'ACCURACY OF ITERATION FOR ST
Minimum and maximum head envelope curves graphically show the
SEADY STATE DISCHARGE «',F5.1, ' GPM')
102 FORMAT(//43X,'* PIPE DATA *'/)
range of head fluctuation for a 60 second simulation. Note that high heads
103 FORMAT(5X,'PI PE',I 2,' D = ',F6.2,' IN',' L =',F7.0,' FT', on the suction side of the pumps occur as well as low head on the discharge
$' F »' ,F6.4,’ WAVE SPD «' ,F6.0,' FPS',’ UPSTR PIPE ELEV
$ =',F7.1,' FT',' L/A ®',F6.3,' SEC') side. No column separation occurs in this case.
104 FORMAT(///l5X,’* PUMP DATA *’/)
105 FORMAT(5X,'NUMBER OF PUMPS IN PARALLEL «1,I3/5X,'EACH PUMP HAS',12
STAGES'/5X,'STEADY STATE PUMP SPEED »’,F7.1,' RPM'/5X,'EACH PUM
SP AND MOTOR UNIT HAS A MOMENT OF INERTIA OF',F6.1,' LB-FT SQ'// DATA
S5X,'ELEVATION OF PUMP SUMP *',F7.1,' FT')
106 FORMAT(/8X,'O-GPM H/STAGE-FT BHP/STAGE'/8X,5('-'),2X,10(’-'),2X,
$SPECS NPIPES-2,IOUT-2,NPARTS-5,TMAX-60.,HATM»30.,ZEND-1100.,QACC-.50
$9())
IPUMP»1,HRESUP*1000.,HRESDN®1240. SEND
107 FORMAT(6X,F7.1,2X,F8.1,4X,F8.2) 1 30. 15000. .0128 3590. 800.
202 FORMAT(1 Hl,20X,14('*')/21X,'* INPUT DATA *'/21X,14(’‘')/) 2 30. 30000. .0128 3590, 800.
204 FORMAT(1H1/' PRESSURE HEADS, H-VALUES AND VELOCITIES AS FUNCTIONS $PUHPS NPUMPS-4,RPK«1760.,WRSQ»475.,NSTAGE»3,
$ OF TIME'/2X,60('-')) QN®0, ,, 1000 ,, 2000., 300 0 ., 4 000., 50 00.,
205 FORMAT(//l8X,3(5X,' X HEAD-FT H-FT V-FPS')/' TIME =',F7.3, HNSQ’ • 136 ., 128 ., 117 ., 96., 63., 24 .,
S' SEC' , 3 (5X, '------------------------------------------------ ----------------' ) ) TNSQ’ • 55., 61 ., 75.,87.,93.,95.,
206 FORMAT(/12X,'PI PE',12, 3 ( 5X , F5.3,2F7.0,F8,2) / (18X,3(5X,F5.3,2 F7,0 SEND
$,F8.2)))
207 FORMAT(1H1/18X,27(’*')/18X* TABLE OF EXTREME VALUES * ’/18 X , 2-7 ( ' *
$')//13X,’X MAX HEAD MIN HEAD MAX H MIN H '/IIX,5('-'),2X,8 (
S'-') ,2X,8'-) ,2X,6('-’) ,2X,6('-'))
208 FORMAT(2X,'PI PE',12)
209 FORMAT(1IX,F5.3,2X,F7.0,3X,F7.0,3X,F6.0,2X,F6,)
210 FORHAT(//' MAXIMUM HEAD «’,F6.1,' FT IN PIPE',13,' AT X =',F5.3,
S' AT TIME «',F7.2,' SEC')
211 FORMATf/' MINIMUM HEAD -',F6.1,' FT IN PIPE',13,' AT X «',F5.3,
S' AT TIME «',F7.2,' SEC')
212 FORMAT(/15X,'PUMP SPEED »',F7.1,' RPM',10XPUMP DISCHARGE »',F7.1
S,' GPM EACH')
214 FORMAT(////2X,'COLUMN SEPARATION HAS OCCURRED AT',F6.2,' SEC IN PI
SPE',13,' AT LOCATIONF5.3)
250 FORMAT(/////l0X,'YOU HAVE EXCEEDED MAXIMUM DISCHARGE VALUE INPUT.
SEXECUTION IS TERMINATED.')
251 FORMAT(/////l0X,'ITERATION TO COMPUTE STEADY STATE DISCHARGE WAS U
SNSUCCESSFUL AFTER 20 TRIES')
260 FORMAT(/////10X,'YOU HAVE EXCEEDED MAXIMUM BHP VALUE INPUT. EXECUT
SION IS TERMINATED.')
270 FORMAT(/////l0X,'THE SEARCH FOR A VALUE OF 0 HAS CYCLED 20 TIMES W
SITHOUT SUCCESS. EXECUTION IS TERMINATED.’)
280 FORMAT(/////l0X,'THE SEARCH FOR Q/N HAS GONE BEYOND THE LIMITS OF
SQ-DATA')
END

Figure 7-7. Continued.


182 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 183

2: C* PROGRAM NO. 9 *
3: C* PROGRAM FOR BOOSTER PUMP RUNDOWN FROM POWER FAILURE *
4:
5 : c

Figure 7-8. Pressure extremes resulting from power failure in a booster pomp configuration.
6: C WATER HAMMER PROGRAM FOR PUMP'RUNDOWN RESULTING FROM POWER FAILURE
7: C BOOSTER PUMP IS AT INTERNAL BC WITH RESERVOIRS AT UPSTREAM AND DOWNSTREAM ENDS
8: C PROGRAM WILL HANDLE ANY NO. OF PARALLEL PUMPS-ALL FAIL SIMULTANEOUSLY
9: C PROGRAM WILL HANDLE UP TO 8 SERIES PIPES- MUST BE AT LEAST TWO SERIES PIPES
10: C
11: C NPIPES = NUMBER OF PIPES IN SERIES - PIPE NO. 1 IS AT UPSTREAM END
12: C IPUMP = NUMBER OF THE PIPE WHICH HAS BOOSTER PUMP AT DOWNSTREAM END
13: C IOUT ' PARAMETER WHICH WRITES OUT EVERY IOUT-TH COMPUTATION
14: C NPARTS « MINIMUM NUMBER OF PARTS INTO WHICH PIPES ARE DIVIDED
15: C TMAX-MAX. REAL TIME OF RUN-SEC HATM'ATMOSPHERIC PRESSURE HEAD (POSIT IVE)-FT
16: C A()=WAVE SPEED-FPS L()'LENGTH-FT D()XDIAH)-IN F()'FRICTION FACTOR(DARCY)
17: C PIPEZ{)'UPSTREAM ELEVATION OF PIPE - FT HEAD()=PRESSURE HEAD IN PIPE - FT
18: C ZEND'ELEVATION OF DOWNSTREAM END OF LAST PIPE AT RESERVOIR - FT
19: C HRESUP = ELEVATION OF WATER SURFACE IN UPSTREAM RESERVOIR
20: C HRESDN = ELEVATION OF WATER SURFACE IN DOWNSTREAM RESERVOIR
21: C QACC=ACCURACY OF DISCHARGE ITERATION FOR STEADY STATE COMPUTATION - GPM
22: C
23 : C NPUMPS'NUMBER OF PUMPS IN PARALLEL
24 : C RPM'STEADY STATE PUMP SPEED-RPH NSTAGE'NUMBER OF STAGES FOR PUMP
25 : C WRSQ'MOMENT OF INERTIA OF PUMP AND MOTOR IN LBM-FT SQUARED
26: C ON()'DISCHARGE FROM PUMP CHARACTERISTIC CURVE - GPM
27: C HNSQO'HEAD PER STAGE FROM PUMP CHARACTERISTIC CUPVE - FT
28 : C TNSQ()» BHP PER STAGE FROM PUMP CHARACTERISTIC CURVE
29: C
30 : DIMENSION X(8,30),V(8,30),H(8,30) ,11 LOW (8,30) , HHIGH (8,3fl) ,
31: $HEAD(8,30),VNEW(8,30),HNEW(8,30)
32: DIMENSION L (8) ,D(8) ,A(8) ,PIPEZ(8) ,F(8) ,VZERO(8) ,NPAR(8),
33: $C(8),AK(8), SINE(8),AREA(8),DELTT(8),RATIO(8)
34 : DIMENSION QN(6),HNSQ(6),TNSQ(6)
35: LOGICAL FAIL,SHUT,BYPASS
36: INTEGER PIPE
37: REAL LA,L
38: NAMELIST /SPECS/ NPIPES,IOUT,NPARTS,TMAX,HATH,HRESUP,HRESDN,ZEND,
39: SQACC,IPUMP
40 : NAMELIST /PUMPS/ HPUMPS,RPM,WRSQ,NSTAGE,QN,TNSO,HNSQ
41: C
42: READ(5,SPECS)
43: READ(5,200) (PIPE,D(I),L(I),F(I),A(I),PIPEZ(I),1=1,NPIPES)
44 : 200 FORMAT (11 0,5 Fl 0.0 )
45 : READ(5,PUMPS)
46: C
47: WRITE(6,202)
48: WRITE(6,101) NPIPES,NPARTS,I PUMP,HRESUP,HRESDN, ,HATH,ZEND,TMAX,
49: $IOUT.,QACC
50: WRITE(6,102)
51: DO 3 1=1,NPIPES
52: LA-L(I)/A(I)
53 : 3 WRITE(6,103) I,D(I),L(I),F(I),A(I),PIPEZ(I),LA
54 : WRITE(6,104)
55: WRITE(6,105) NPUMPS,NSTAGE,RPM,WRSO
56: WRITE(6,106)
57: WRITE(6,107) (QN(I), HNSO(I),TNSQ(I),1=1,6)
58: C
59 : FAIL'.FALSE.
60: SHUT'.FALSE.
61: BYPASS'.FALSE.
62 : PINERT’WRSO/32.2
63: PI'3.141592

o
o O
ro O
C Figure 7-9. Computer program for booster pump rundown as a result of
O
power failure.
184 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 185

64 C 127: C ** SET UP CONDITIONS FOR STEADY STATE (T=0) **


65 C COMPI.TE STEADY STATE DISCHARGE 128: C
66 CTRY=CN(4) 129: H (1,1)=HRESU?
67 COEF=1 2 .* 14 4 .* 1 4 4 .* 1 6 .-NPUMPS*NPUMPS/( 6 4 . 4 * 4 49 .* 4 49 .* PI‘PI) 130: V(1,1)-VZERO(1)
68 CO 32O NZ=1,20
69 131: DO 20 I=1,NPIPES
CO 300 1=1,5 132: DELL=L(I)/NPAR(I)
70 IF(QTPY.GT.QN(I).AND.QTRY.LE.QNd+1)) GOTO 310
71 133: DELHF=12.*F(I)*DELL*VZERO(I) “2/(64.4*D(I))
300 CONTINUE 134 : AX(I)=12.*F(I)‘DELT/(2.*D(I))
72
WRITF.(6,250) 135: K=NPAR(I)+1
73
STOP 136: X(I,1)=0 .
74
310 HN-:iNSO(I) + (OTRY-QN (I > ) * (HNSQ (1 + 1) -HNSQ (I) )/(QN(I+1)-QN(I) ) 137:
75 SUM = O . HEAD(I,1)= H(I,1)-PIPEZ d)
76 CO 301 J=1,NPIPES 138 : RATIO(I)“DELT/DELL
77 139: DO 21 J = 2,K
301 SUM=SUM+F(J)*L(J)‘QTRY+QTRY/D(J)“5
78 140: X(I,J)«(J-1) ‘DELL/Ld)
FUNCT»HR ESU?-’I RESDN+NSTAGE‘HN-COEF* SUM
79 141: H(I,J)“H(I,1)-DELHF*(J-1)
8? FPRI ME = NSTAGF-‘( HNSQ (1 + 1)-HNSQ (I) ) / (QN (1+1)-ON (I) )-2 ♦ *COEP*SUM/QTRY
142: HEAD(I,J)=H(I,J)-(PIPEZ(I)+X(I,J)‘L(I)‘SINE(I))
81 CNEXT’OTRY-FUNCT/FPRIME
143: 21 V(I,J)“VZERO(I)
82 IF(ARS(ONEXT-OTRY).LT.QACC) GO TO 350
144: IF(I.EQ.NPIPES) GO TO 20
83 GTRY«OHEXT 145:
84 320 CONTINUE H|I + 1,1)»H.(I,K)
146: IF(I.EQ.I PUMP) H(1 + 1)»H(I,K)+HPUMP
85 KRITC(6,251) 147:
86 STOP V(I+1,1)=VZERO(I+1)
148: 20 CONTINUE
87 359 QLINE=ONEXT*NPUMPS 149:
88 C=QNEXT DO 23 1=1,NPIPES
150:
89 l-?UHP«NSTAGE*HN K=NPAR(I)+1
151 :
98 COEF=4.*144./(449.‘PI) DO 23 J = 1,K
91 152:
CO 2 I=1,NPIPES HLOW (I, J) =11 (I, J)
92 153:
VZERC(I) =QLINE*COEF/D( I) “2 23 IIHIGH (I ,J) = H (I ,J)
93 154:
AREA(I)=0.25‘PI‘D(I)*Dd)/144. PHMAX=-100.
94 155:
C (I)-32.2/A(I) PHMIN=100000 .
95 156:
CELTT(I)=L(I)/(NPARTS*{VZERO(I)+A(I))) DO 11 1=1,NPIPES
96 157:
IF(I,FQ.HPIPFS) SINE(I)»(ZEND-PIPEZ(I))/L(I) K=NPAR(I)+1
97 158 :
IF(I.EQ.NPIPES) GO TO 2 DO 11 J = 1,K
98 159:
99 SINE(I)= (PIPEZ(1 + 1)-PI FEZ(I))/L(I) 160: IF(HEAD(I»□)•LT.PHMAX) GO TO 16
100 161: IPMAX’I
2 CONTINUE
101 C 162: XMAX=X(I,J)
102 PHMAX=HEAD(I,U)
C “ COMPUTE MINIMUM DELTA T ** 163:
103 164 : TTMAX=T
C
104 165: GO TO 17
CELT=DELTT(1)
105 166: 16 IF(HEAD(I,J).GT.PHMIN) GO TO 17
106 CO 12 I=2,NPIPES 167: I?MIN=I
107 IF(DELTT(I).GT.DELT) GO TO 12 168: XMIN=X(I,J)
108 CELT=DELTT(I) PHMIN=HEAD(I,J)
169:
109 K.MIN=I TTMIN=T
170:
110 12 CONTINUE 17 CONTINUE
171:
111 CO 13 I=1,N?IPES 11 CONTINUE
112 172:
IF(I.EO.KMIN) GO TC 14 173: C
113 ANPAR=L(I)/(DELT*(VZERC(I)+A(I)))
114 174 : C “ -JRITE OUT STEADY STATE CONDITIONS “
N?AR(I)=ANPAR 175: C
115 TEST’NPARd)
116 176 : T“0,0
IF(ABS(TEST+l-ANPAR).LT.,0001) NPAR(I)=NPAR(I)+1 INDEX=TMAX/DELT+1
117 177:
CO TC 13
lie 178 : WRITE(6,204)
14 K?AR(I)»NPARTS
119 179: WRITE(6,205) T
13 CONTINUE
12P C 180 : DO 22 I=1,NPIPES
121 C CONCERT TO O/N, (l/NSQ, T/HSQ 181: K“NPAR(I)+1
122 COEF»6C.‘550./(2.*FI) 182: WRITE (6,206) I,(X (I , J) , HEAD (I , J) ,H (I , J) ,V(I,J) ,U = 1 ,K>
123 CO 1 1=1,6 183: 22 CONTINUE
124 (I) “QN (I) / ( 449 • *RPM) 184 : WRITE(6,212) RPM,Q,HPUMP
125 TNSO (I) »NSTAGE*CC‘EF*T?tSO (I) /RPM“ 3 18 5: O=Q/449.
126 _ FNSQ( I) “HNSQd)/P.PM“2 186: C
C 187: C -------------- -------------------------------------------------------------------------------------------------------------
C 188: C BEGIN TRANSIENT ANALYSIS
189: C ----------------------------------------------------------------------------------------------------------------------------
c

Figure 7-9. Continued. Figure 7-9. Continued.


186 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 187

190: DO 99 11«11INDEX
191: T=T-DELT
253: IF(QPD.GT.QN(33).AND.QPD.LE.QN(33+1)) GO TO 48
192: C 47 CONTINUE
254:
193: C ** COMPUTE H AND V AT INTERIOR NODES ** IF(OPD,GT,0.) WRITE(6,280)
255;
194 : C IF(QPD.GT.0.) GO TO 50 *
256:
195: DO 30 1*1,NPIPES
257: 33=3-1
19’6: K = NPAR(I) 259: IF(33.E0.K) GO TO 43
197: DO 30 3 = 2,K 259: GO TO 49
198 : P.A=RATIO (I) * A (I) 48 IF(3.EQ.33) GO TO 50
260 :
199: VMINUo=V(I,3)-RA*(V(I,3)-V(I,3-1)) 261: 49 3*33
200 : VPLUS«V(1,3)—RA*fV(I,3 -V(I,3+1)) 262: 46 CONTINUE
201: HMIWJS’H (1,3) -RA’ (H (I, J) -Fl (1,3-1) ) 263: WRITE(6,270)
20 2: HPLUS’H(I,3)-RA*(H(I,3’-H(I,3+1)) 264: STOP
203: VNE«(I,3) =0.5* (VMINUS+VPLUS+C(I) * ( HMINUS-HPLUS) +C (I) * D^LT*!5I NE (1) 265 : 50 CONTINUE
204 : S*(VMINUS-VPLUS)-AK(I)*(VMINUS*ABS(VMINUS»+VPLUS*ABS(V?LUS)]) 266: Q*QPD*RPM
205 : KNEW(I,3)=0,5*(HMINUS+HPLUS+(VMINUS-VPLUS)/C(I)+DELT*SINE(I)* 267 . HNEW(I + 1,1) *HPD
206: $(VMINUS+VPLUS)-(AK (I) /C (I) ) *(VMINUS*A8S(’MINUS)-VPLUS*ABS(VPLUS3)) 268: VNEW(I+1,1)=VPD
207 : 30 CONTINUE 269 : VNEW(I, K)= AREA(1 + 1)*VPD/AREA(I)
208 : C HNEW(I,K)*(C1-VNEW(1 +1 , 1))/C(I)
270:
209 : C ’* COMPUTE H ANC V AT INTERIOR 3UNCTIONS ** HTEST*HNEW(1+1,1)-HNEW(I, K)
271:
210: C
272: HPUMP’HTEST
211: KK=NPIPES-1
273 IF(HTEST.GE.O.) GO TO 40
212 : DO 40 1*1,KK 274 : 4 2 VNEWtI + l,1)*(C1*C(1 + 1)+C(I)*C3)/(C(I)+C(1+1)*AREA(I+ 1)/AREA(I ) )
213: K*NPAR(I)+1 275 ; VNEW(I,K) = ARF.A(I+1) *VNEW(1+1,1)/AREA(I)
214: VMINUS’V(I,K)-RATIO 11) * A (I) * (V (I, K) - V (I, X-l) 276 : KNEW(1+1,1)=(VNEW(I+1,1)-C3)/C(1+1)
215 : HMINUS*H(I,K)-RATIO!I)"A (I) * (H(I,K)-H(I,X-l) 277: HNEW(I,K)=HNEW(I+1,1)
216: C1*VMINUS+C(I)*HMINUS+C(I)*VMINUS*DELT’SINE(2)-AK(I)*VHIKU5* 278: IF(VNEW(1 +1,1)♦LT,0 .) GO TO 43
217: $ABS(VMINUS) 279:
218 : VPLCS«V(I+1,1)-RATIO(I-1)*A(1+1)*(V(I+1,1)-/-I+1,2)) BYPASS*.TRUE.
280: SHUT*.FALSE.
219: HPLUS-iKI + l, 1) -RATIO (1*1) *A(I + 1)*(H(I + L,_)-4'I + 1,2))
261: HTEST»HNEW(1+1,1)-KNEW(I,K)
220 : C3»VPLUS-C (1+1) ‘HPLUS-C (1 + 1) *DELT*VPLUS*SINE ’ I +1) -AK (’-1) *7PLUS ‘
221: 282: IF(HTEST,LE.0.) GO TO 40
$ABS(VPLUS)
222: IF(I.EO.IPUMP) GO TO 41 263: 43 VNEW(I,K)=0.
264: VNEW(1 + 1,1)=0.0
223: HNEW(I,K) = (-C3*AREA(1 + 1]+C1 *AREA(I) )/(C(Z+l•’AREA(1 + 11~C(Ii*
265: Q=0.
224 : $AREA(I))
286: SHUT*.TRUE,
225: HNEl\(I+l,l)=HNF,W(I,K)
267 : BYPASS*.FALSE.
226 : VNEW(I,K)=C1-C(I)*HNEW(I,K)
268 : HNEW(I,K)*Cl/C(I)
227 : VNEW(1+1,1)-C3+C(1+1)*FNEW(I+1,1)
269 : HNEW(1 + 1,1)*-C3/C(I +1)
228 : GO TO 40
290: HTEST*HNEW(I+1,1)-HNEW(I,K)
2 29: C
291: IF(HTEST,GE.0.) GO TO 40
230 : C COMPUTE CONDITIONS AT BOOSTER PUMP
292 : GO TO 42
231: C 293 : 40 CONTINUE
232 : 41 IF(SHUT) GO TO 43 294 :
233 : IF(BYPASS) GO TO 42 295 : C ** COMPUTE H AND V AT UPSTREAM END **
234 : Q0=Q/RPM 296 : C —THIS BOUNDARY CONDITION IS FOR A CONSTANT HEAD RFSERV0IR--
235: DO .4 1 3=1,5 297 : C
236 : IF(QQ.GT.QN(3).AND.QQ.LE,QN(3+1)) GO TC 45 298 : VPLUS*V(1,1)-RATIO(1)*A(1)*(V(1,1)-V(1 , 2) )
2 37 : 44 CONTINUE 299: HPLUS = H(1,1)-RATIO(1)*A(1)*(H (1,1)-H(1,2))
238 : WRITE(6,260) 300 :
239 : 4 5 TN2=7NSQ(3)+(QQ-QN(3) 1 *(TNSQ(3+1)-TNSO(3))/ i CN (3 + 1)-02(3)) C3=VPLUS-C(1)*HPLUS-C(1)* DELT*VPLUS*SINE(1)-AK(1) *VPLUS*ABS(VPLUS)
301: HNEW(1,1)“HRESUP
240 : PPM=FPM-30.*TN2*DELT/(PI*PINERT)*RPM*PP« 302 : VNEW(1,1)=C3+C(1)*HRESUP
241: DO 46 NZ»1,20 303 :
242: HA=HNSQ(3) 304 : C *’ COMPUTE H .AND V AT DOWNSTREAM END **
243 : HB=HNSO(3+1) 305 : 2 —THIS BOUNDARY CONDITION IS FOR A CONSTANT HEAD RESERVOIR—
2 4 4 : CA=0N(3) 306: C
245: QE=QN(3+1) 307 : NV*NPAR(NPIPES)+1
246 : C7= (flA-HB) / (CA-QB) 308 : VMINUS=V(NPIPES,NV)-RATIO(NPIPES)* A(NPIPES)*(V(NPIFES,NV)-
247 : C8=HB-QB*C7 309 : $V(NPIPES,NV-1))
248 : 310: HMINUS=H(NPIPES,NV)-RATIO(NPIPES)*A(NPIPES)*(H(NPIPES,NV)-
VPD*(Cl/C (I) +NSTACE*RPM*RPM*C8+C3/C (I + l’i'il TIT + IUMFA (TXH / 311:
249 : $ (C ( I)‘AREA ( I) )-RPM*NSTAGE*C7*AREA (1+1)/NatjMps’ ■ (I )/ $H(NPIPES,NV-1))
312: Cl *VMINUS + C(NPIPES) *HMINUS + C(NPIPES) *VMINUS*DELT*S7ME(NPIPES)-
2 50 : HPD=(VPD-C3)/C(I + D .........
2 51: QPD=V?D*AREA(1+1)/(NFUMPS*RPM) 313: $AK(NPIPES)*VMINUS*ABS(VMINUS)
252; 00 47 33*1,5 314 :
HNEW(NPIPES,NV)=HRESDN
315 :
VNEW(NPIPES,NV)*C1-C(NPIPES)*HNEW(NPIPES,NV)

Figure 7-9. Continued. Figure 7-9. Continued.


188 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 189

316 : C 379 : K=NPAR(I)+1


317: C 380 : DO 401 J = 1 ,K '
318: c ** LOCATE MAXIMUM AND MINIMUM HEADS AND H-VALUES ** 381: HEADMX-HHIGH(I,J)-(PIPEZ(I)+X(I,J)‘L(I)*SINE(I))
319: c 382: HEADMN= BLOW(I,J)-(PIPEZ(I)+X(I,J)‘L(I)*SINE(I))
320: DO 61 1=1,NPIPES 383 : 461 WRITE(6,209) X (I , J) , HEADMX,HEADMN,HHIGH(I,J) ,BLOW(I,J)
3 21: K«NPAR(I)+1 384 : WRITE(6,210) PHMAX,IPMAX,XMAX,TTMAX
322: DO 61 J = 1,K 385 : WRITE(6,211) PHMIN,I PM IN,XMIN,TTMIN
323 : IF(KNEW(I,J).LT.BLOW(I,J)) BLOW(I,J)=HNEW(I,J) 386 : C
3 24 : IF(KNEW(I,J).GT.HHIGH(I,J)) HHIGH(I,J)-KNEW(I,J) 387 : C ******* FORMAT STATEMENTS *******
325 : HEAD(I,J)»HNEW(I,J)-(PIPEZ(I)+X(I,J)*L(I)*SINE(I)) 388 : C
326 : IF(HEAD(I,J).LT.PHMAX) GOTO 66 389: 101 FORMAT(5X, 'NUMBER OF PIPES = 1 , I 3/5X, 'MINI MUM NO. OF PARTS PIPE IS
327: IPMAX’I 390 : SDIVIDED INTO =',I3/5XBOOSTER PUMPS ARE LOCATED AT DOWNSTREAM END
328 : XMAX=X(I,J) 391: $ OF PIPE*,I3/5X,'RESERVOIR ELEVATION AT UPSTREAM END =',F7.1,' FT'
329 : PHHAX’HEAD(I,J) 392: S/5X,*RESERVOIR ELEVATION AT DOWNSTREAM END =',F7.1,’ FT’/
330 : TTMAX’T 393 : $5X, 'ATMOSPHERIC PRESSURE HEAD =’,F5.1,' FT OF WATER'
331: GO TO 57 394 : S/5XELEVATION OF DOWNSTREAM END OF LAST PIPE =',F7.1,' FT'//5X,
332 : 66 IF(HEAD(I,J).GT.PHMIN) GO TO 67 395 : S'MAXIMUM REAL TIME OF ANALYSIS =',F7.1,' SEC'//5X,'OUTPUT IS PRINT
333 : IPMIN-I 396 ; $ED EVERY',13,' TH TIME INTERVAL'//5XACCURACY OF ITERATION FOR ST
33 4 : XMIN“X(I,J) 397 : SEADY STATE DISCHARGE =’,F5.1,' GPM')
335 : PHMIN=HEAD(I,J) 398: 102 FORMAT (//4 3X , ’* PIPE DATA *'/)
336 : TTMIN=T 399 : 103 FORMAT(5X,'PI PE 1,I 2,1 D =',F6.2,’ IN',' L =',F7.0,' FT’,
337 : 67 CONTINUE 400 : $' F = ' ,F6.4, ' WAVE SPD =' ,F6.0,' FPS',' UPSTR PIPE ELEV
338 : IF(HEAD(I,J).GT.-HATM) GO TO 62 401: $ =',F7.1,' FT’,’ L/A = ',F6.3,' SEC')
339 : WRITE(6,214) T,I,X(I,J) 402 : 104 FORMAT(///l5X,'* PUMP DATA *'/)
340 : FAIL’.TRUE. 403: 105 FORMAT(5X,'NUMBER OF PUMPS IN PARALLEL =',I 3/5X, 'EACH PUMP HAS*,12
341: 62 CONTINUE 40 4 : STAGES '/5X, 'STEADY STATE PUMP SPEED -',E7.1,' RPM '/5X EACH PU.H
34 2 : 61 CONTINUE 405 : SP AND MOTOR UNIT HAS A MOMENT OF INERTIA 0F',F6.1,' LB-FT SO')
3 43 : C 4 06: 106 FORMAT(/8X,10-GPH H/STAGE-ET BHP/STAGR'/BX,52X,102X,
34 4 : C ** WRITE GUT H,V,AND HEAD VALUES AND TEST FOR TMAX ** 407 : $9 I' )>
345: C 4 08 : 107 FORMAT(6X,F7.1,2X,F8.1,4X,F8.2)
34 6 : 70 IF(FAIL) GO TO 71 409 : 202 FORMAT (1111,20X , 14 ('*')/2IX • INPUT DATA *'/21X,14('*')/)
34 7 ; IF(MOD(II,IOUT) .NE.0) GO TO 72 410: 204 FORMATflHl/' PRESSURE HEADS, H-VALUES ANO VELOCITIES AS FUNCTIONS
348: 71 WRITE(6,205) T 411:
S OF TIHE'/2X,60('-’>)
34 9 : DO 73 I«1,NPIPES 412:
205 FORMAT(//18X,3(5X,' X HEAD-ET H-FT V-FPS')/' TIME =',F7.3,
350: K=NPAR(I)+1 413 : S' SEC' ,3 ( 5X, ' ----------------------------------- ------------ --------------- ' ) >
351: WRITE(6,206) I,(X(I,J),HEAD(I,J),KNEW(I,J),VNEW(I,J),J=1,K) 414: 206 FORMAT(/I 2X,1PI PE 1 , I 2 , 3(5X,F5.3,2F7.0,F8.2) /(18X,3(5X,F5.3,2F7.0
352 : 73 CONTINUE 415:
353: 000=449.*0 $,F8.2)))
416:
35 4 : IF I .NOT.SHUT.AND..NOT.BYPASS) WRITE(6,212) RPM,OQQ,HPUHP 417: 207 FORMAT(1H1/18X,27(’*')/I8X,'* TABLE OF EXTREME VALUES *'/18X,27('*
355 : IF(FAIL) GO TO 400 418: $')//13X,'X
$'-') MAX HEAD MIN HEAD
,2X,8() ,2X,6(’-’),2X,6(’-’)) MAX H MIN H'/11X,5(’-’) ,2X , 8 {
356 : 72 CONTINUE 419: 208 F0RMAT(2X,'PIPE',12)
357 : C 4 20 : 209 FORMAT(11X,F5.3,2X,F7.0,3X,F7.0,3X,F6.0,2X,F6.0)
358 : C •* PREPARE FOR NEXT TIME STEP COMPUTATION ** 421: 210 FORMATt//' MAXIMUM HEAD =',F6.1,' FT IN PIPE',13,' AT X =',F5.3,
3b9: c 422: $' AT TIME =',F7.2,' SEC’)
360 : DO 80 I=1,NPIPES 423: 211 FORMAT (/' MINIMUM HEAD ».’,F6.1,' FT IN PIPE',13,' AT X =',F5.3,
361: K=NPAR|I)+1 4 2 4: $' A’Z TIME = ',F7,2, ’ SEC')
362: DO 80 J = 1,K 4 25: 212 FORMAT(/I 5X, 1 PUMP SPEED =',F7,1,' RPM' , 10X , 1PUMP DISCHARGE =',F7.1
363 : V(I,J)=VNEW(I,J) 4 26: GPM EACH',10XPUMP HEAD =',F6.1,' FT')
364 : 80 H(I,J)=HNEW(I,J) 427 : 214 FORMAT(////2X,'COLUMN SEPARATION BAS OCCURRED AT',F6.2,‘ SEC IN PI
365: IF(T.GT.TMAX) GO TO 400 4 28 : SPE',13,' AT LOCATION 1,F5.3)
366: 99 CONTINUE 429 : 250 FORMAT(/////l0XYOU HAVE EXCEEDED MAXIMUM DISCHARGE VALUE INPUT.
367 : C SEXECUTION IS TERMINATED.*)
4 30 :
368: C 431: 251 FORMAT(/////10X,'ITERATION TO COMPUTE STEADY STATE DISCHARGE WAS U
369: -----------
C END OF TRANSIENT ANALYSIS 432: SNSUCCESSFUL AFTER 20 TRIES')
370 : c 4 33 : 260 FORMAT(//l0XYOU HAVE EXCEEDED MAXIMUM BHP VALUE INPUT')
371: c
----------- 4 34 : 270 FORMAT(/////l6X, 1 THE SEARCH FOR A VALUE OF 0 HAS CYCLED 7.6 TIMES W
372: c
4 35 : SITHOUT SUCCESS. EXECUTION IS TERMINATED.')
373 : C ** WRITE OUT MAXIMUM AND MINIMUM HEADS AND H-VALUES ** 4 36 : 280 FORMAT(//l0X,'THE SEARCH FOR Q/N HAS GONE BEYOND THE LIMITS OF O-D
374: c 4 37 : SATA')
375: 400 CONTINUE
438 : END
376 : WRITE(6,207)
377 : DO 401 I»l,l>PIPES
378 : WRITE(6,208) I

Figure 7-9. Continued. Figure 7-9. Continued.


190 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 191

fa Qfa + (Npu ’ Nfa) Q = Vp (7-36)

z
7.4 Selective Pump Tripout

Ci-
Q-

>
Combining these equations with Equations 7-21 through 7-24 gives
Occasionally it is necessary to find the pressure resulting from the
the following equation for Vp .
shutdown of one or more of a set of parallel pumps. The effect is generally
of less significance than power failure to all the pumps. We will take the

ZI

z
N
-Nfa

z
Pu \ pu
approach of modifying Equations 7-21 through 7-35 to this application fa

+
o
and assume each individual pump discharge line has a check valve. N0NstC7/

■J
'fa

z
z
Setting Up the Equations PU fa

T3
A-sCiJ N NstC,
Referring again to Figure 7-4 for a typical booster pump application,
we see that Equations 7-21, 7-22, 7-23 and 7-24 remain unchanged. ........................................................ (7-37)
Equation 7-25 must be replaced because all the pumps no longer operate
in harmony. If V pd >, 0, then we must check tripped-out pumps to see if check valves
If Nfa is the number of pumps failing, then the new speed of Nfa of should be closed. To accomplish this we must compute Qfa from the
the pumps is given in Equation 7-27 as following equation
N = N(t) - T(t)At
27rl

•Q
Each of the tripped out pumps generates head according to Equation 7-29

H = N2N?t ............................ (7-33) If Qfa < 0, then the computation for must be redone with the

>
OH
T5
p st
tripped-out pump check valves closed.

o |o
where Qfa is the discharge through each of the decelerating pumps. The

II .
pumps still operating under power generate head according to the
(7-39)
equation

T5
Hp = No2 .................................. (7-34)
Calculation of the remaining heads and discharge values proceeds as
before. The individual pump check valves, once closed, should never be
Of course the head increase across the pump configuration must permitted to reopen on the failing pumps. However, on running pumps
equal the head increase in each pump. The flows through the individual check valves have to reopen.
pumps adjust to satisfy this necessity. Equating 7-33 and 7-34 gives the
relationship between the discharges in the tripped out and constant speed 7.5 Pomp Power Failure With Backflow and Windmilling
pumps.
In certain pumping installations, neither check valves nor bypass
valves are employed. Backflow, if it occurs, is either permitted to continue
Z,

......... (7-35) without control or it is eventually controlled by means of a closing line


II
m
g>

discharge valve. Windmilling, where the flow continues in the forward


o

direction by virtue of its own inertia or because of pipeline slope, results


Now the continuity expression linking the combined pump discharges to from the fluid doing work on the pump with a head loss occurring in the
the line discharge is direction of flow. In either case, the flow passes through the pump
impellers under “unusual” conditions, i.e., flow configurations wherein
.....
192 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 193

operating characteristics are not normally available from the pump of q/n, h/n2 and r/n2 become undefined, though finite. Some technique
manufacturers. must be used to circumvent this problem. The technique most commonly
Under these conditions the engineer is generally faced with the employed for small n is to redefine the dimensionless relationships so that
options of paying for extensive laboratory tests to determine the n no longer appears in the denominator.
non-standard characteristics, configuring the system so neither backflow For example, use n/q as the abscissa for the plots with small n. To
nor windmilling occurs, adopting known non-standard characteristics replace the ordinate h/n2, combine it with (q/n)2 to give h/q2. The same
from similar pumps to his application, or omitting this type of analysis approach suggests using T/q2 for torque. This adjustment is standard
altogether. We will assume here that the necessary non-standard practice and permits use of the similarity relationships over the full range
characterises are available and set up the analysis accordingly. of n for both positive and negative directions of rotation. Examples of
these types of characteristics are taken from Miyashiro [22] and shown in
Complete Pump Characteristics Figure 7-10. It only remains to illustrate how the various characteristics
are handled in setting up and solving the equations for a typical system.
If head, discharge and power information are available for both
standard and non-standard configurations of flow direction and rotation, Setting Up the Equations
then the complete set of pump characteristics is said to exist. Because we
have had data on head and power for both forward and reverse flow and We will set up the equations for a typical source pumping plant with a
forward and backward pump rotation, four sets of data seem to be mainline discharge control valve, no check valve and no bypasses. The
required. However, forward flow with backward pump rotation is so rare, sketch of the system is shown in Figure 7-11. There are NpU identical
it is generally not included. Hence, we have three sets of characteristics to pumps in parallel and we will assume power fails simultaneously to all.
manage. The C‘ characteristic equation in the pipeline gives us one equation
In Art. 7.3 we employed the basic data taken directly from pump and continuity gives a second.
characteristic diagrams to include in our analysis. Because it is much
more common to use normalized pump data, we will define the Vp - Cj + C2 ........................................................... (7-
normalized parameters based on values taken at the operating condition 41)
of maximum efficiency. The equations would be

<
CL, .
O'
(7-
o2|z

........ (7-40a) pu
42)
S3

II

where Q is the discharge through each pump.


........ (7-40b) The head loss equation across the valve must be included because the
ST

valve will be closing after power failure. For positive flow


II

........ (7^0c) Hd = H p 7-43)


H

II

-r
2g

........ (7-40d)
In this case, because backflow will occur, reverse flow KLRCV information
ev
should be obtained for the valve.
The resulting dimensionless characteristic diagrams would all lie within Writing the energy equation between the sump and the discharge line
limited ranges of for positive flow,
= Hd ................................................................................................
(7-44)
S3

Another problem must be addressed in this application which was where Hs is the H-value of the sump. Hydraulic losses in the manifold
not important earlier. Now that backflow through the pump can occur, have been ignored here for simplicity and because their impact on
pump rotation can reverse. When n passes through zero speed, the values significant water hammer pressures is small.
194 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 195

•2.0

PUMPS
*1.5
//////// //////77

N
-C C

'0.5

7777777777777777777777/
•1.0 L~
-l.o -0.5 0 *0.5 ‘l.o *l.s Figure 7-11. Pumping plant
configuration for illustrating effects of
~n-
backflow.
(a) Characteristics for forward rotation with forward and reverse flow. To complete the set of equations, the pump characteristics must be
included. Again, assume flow is in the forward direction

Hp = f(Q)
Assuming the pump characteristics are going to be represented by
piecewise continuous linear equations, we can represent the above
equation in the form

h= < 2 ........................................ (7-45a)

IP

P IP
st

~4
O

+
p

o
h= > 2 ........................................ (7-45b)

LQ
st

p
where Nst, C7, Ct are defined as in Equation 7-29.
Recognizing that Hp = h-HpQ and Q = q-Q0, Equation 7-45 can be
written

C7Q ..........................................
(7-46a)

a
O
o
(b) Characteristics for forward and reverse rotation with reverse flow.

Figure 7-10. Complete characteristics for a centrifugal pump. (From H.


ZO
st
Miyashiro, “Waterhammer Analysis of Pump Discharge =Q 2
........................................ (7-46b)
Line with Several One-Way Surge Tanks,” Trans. ASME,
October 1967.)
196 UNSTEADY FLOW IN PIPELINES PUMPS IN PIPELINES 197

Once we have selected the proper interval in the table of pump where
characteristics and evaluated the coefficients in Equation 7-46, we can
proceed with solving the equations.
(7-55)

I
It should be noted that if q = (-), then the following set of equations

I
would have to be solved in conjunction with Equations 7-41 and 7-42. Rev
and
Hd = Hp-K .......................................................... (7-47)
Rev 2g

r
......................................
10
Hs - HP = H d ....................................................................... (7-48) Rev

For positive flow direction (using Equation 7-45a), If, however, q/n is less than zero or greater than 1.0, then the
following equations for C9 and C10 must be used in conjunction with
Equation 7-54.
................................ (7-49)
NstC7Apn
where
QoNP ..............................................
............................ 7-50)

II
Rev NsCaA

r
and 2g
QoN
2
PU
and
............................ (7-51)
10

If it is necessary to use Equation 7-45b, then the above solution can be


used, provided C9 and C10 are modified. io Rev NstC8A

CL,
r

I
2g
Q0Npu
c

1
QoNpu ...........................................................
II

The major difficulty in the computer programming of these equations


is the determination of which set to use and which interval in the table
r

interpolation schemes for the pump characteristics you are operating in.

and 7.6 Selective Pump Startup

s Pressure surges caused by pump startup can be difficult to calculate


precisely. One reason for this is because there is often air in the discharge
c
NstCs columns which must be exhausted. Another problem is that the
..................... acceleration to speed of the pump not only depends on flow through the
r

2g Q N 2v 12 pump, but the type of motor used to drive the pump. Because of these
o pu
uncertainties, we will analyze pump startup by assuming that the pump
If, however, the flow is in the reverse direction, the following equation attains its normal operating speed instantaneously and make provision for
for Vp must be used. bringing several pumps on line at given multiples of At. This approach
should give more severe pressures than a more precise analysis and should
....................... (7-54) result in a conservative design.
tn
o
.........

198 UNSTEADY FLOW IN PIPELINES

Setting Up the Equations

The approach we take will be the same as in Art. 7.4 on selective


pump tripout. Again, referring to Figure 7-4 as a definition sketch, we can
write the following applicable equations in addition to Equations 7-21
through 7-24 which still apply.

................................................ 7-59) VHI. Problems Resulting From


v
Unsteady Flow in Pipelines
PdAd = NruQ ........................................................................... (7-60)
where Nru is the number of pumps running at that particular time.
Solution of this set of equations gives 8.1 Results of Problems

High Pressures
<Z
o

n
z

z
Unsteady flow in a pipeline system can result in objectionably high or
i
.........................
ii

N0NstC7A low pressures. Excessively high pressures can result in damage to pumps,
CL

>
Q.

valves and other pipeline appurtenances, as well as rupture of the pipe


z

ru itself. However, it should be kept in mind that “failure” can refer only to
The remaining variables are calculated from Equations 7-21 through 7-24 inability to meet a given performance standard, hence, no physical
and 7-59 and 7-60. damage must occur to constitute a failure. For example, it may be
Because in pump startup there is no reason to expect back flow to required that under all conditions, the pressure in a pipeline must remain
occur, no provision is generally necessary. It only remains to devise a greater than atmospheric pressure to prevent air entering the line through
program for bringing the pumps on line and write some input code for the vacuum breakers. If analysis showed the pressure to drop below
computer program which will accommodate the proposed startup scheme. atmospheric under any conditions, the pipe has “failed.”

Low Pressure*

Excessively low pressures can lead to release of large amounts of


dissolved air and extensive vaporization of the liquid can occur if the
pressure drops to the liquid vapor pressure. The resulting low pressures
(possibly enhanced by external pressures) can cause collapse of the pipe.
Also.vapor cavity closure occurring at some location in the pipeline can
produce high shock pressures which could cause pipe failure. These cavity
closure shock intensities are quite difficult to predict and the present state
of the art for this type of analysis does not provide methods of confidently
computing these shock pressures except in special circumstances. Brittle
pipes such as concrete are particularly susceptible to this type of problem.
For example, most reinforced concrete pipes have a thin-walled metal pipe
encased in concrete and wrapped with reinforcing wire. If shock pressure
loading causes fracture and spalling of the internal layer of cement lining,
the thin metal cylinder has little support to prevent wall buckling and pipe
collapse.

199
............
200 UNSTEADY FLOW IN PIPELINES PROBLEMS RESULTING FROM UNSTEADY FLOW 201

Vibrations is generally controlled by a dashpot or pilot system and this type of valve
functions much like an in-line surge relief valve.
A type of unsteady flow problem which can cause substantial
problems in pipelines is that of vibration. Severe vibration occurs when Filling Empty Lines
some periodic unsteady flow phenomenon excites some component of the
Filling empty lines, particularly in pumped systems, can give
pipeline hardware at a frequency close to its natural frequency of
velocities well in excess of expected steady state velocities. At the low head
vibration. Under these conditions, large stresses and strains (as well as
generally occurring during the filling process, the pump is operating at a
noise) can occur which may ultimately cause system failure.
point on its characteristic curve where large flow rates occur. If the line is
Because this type of analysis relates to periodic motion and implies
terminated by any device acting as a flow obstruction, e.g., a
some knowledge of the vibration of the hardware, it is generally analyzed
partially-closed valve or a closed valve with an air-vacuum valve upstream,
by techniques other than method of characteristics. Therefore, this type of
then a serious water hammer situation can develop (see Figure 8-1).
unsteady flow will not be considered in this work and the reader is referred
The air rushing out of the pipe ahead of the water will leave the pipe
to Streeter and Wylie [1] for further information.
more easily than the water behind it. As a result, when the last air leaves
and the water tries to escape, severe decreases in velocity generally occur
8.2 Carnes of Problems
causing large water hammer pressures.
Another situation is depicted in Figure 8-2 where the discharge
Valve Movement
column of a pump is initially empty and the pipeline full of water is held
by a closed check valve. High pressures will occur when the rushing water
Probably the commonest and most well-known cause of unsteady flow
fills the column and slams shut the vacuum valve.
problems is valve movement. Either opening or closing the valve causes
pressure waves to propagate through the system. The severity of the
pressure waves depends on the type of valve movement and the system
hydraulics and elastic properties, as well as the type of valve. It was shown
earlier that under certain circumstances, the last few percent of valve
movement during the closing process had an overpowering effect on the
maximum pressure generated.
Proper analysis of the impact of valve movement on the high and low
pressures in a system depends strongly on the head loss characteristics of
the valve. Charts and diagrams are available to estimate the maximum
pressures caused by valve closure, but it is far more reassuring to be able
to calculate the effects of valve closure in any specific situation. Following
the analysis shown in Article 4.4 will provide the means.

Check Valves

Check valves can cause large water hammer pressures if a flow


backwards through them occurs before closure is complete. In this
situation, the slamming check valve creates the same problems created by
sudden valve closure.
Most modem check valves are of the non-slam variety, whereby
spring or weight-loaded mechanisms insure that the valve is closed the
instant forward flow ceases. Water hammer problems are minimized in
this case and generally result from "lunging” of the flow which is not in
equilibrium because of elastic energy imbalance.
/ K variety of chedk valves referred to as “damped” check valves are
designed to permit backflow while they are slowly closing. The closure rate Figure 8-1. Filling an Initially empty pump discharge line.
202 UNSTEADY FLOW IN PIPELINES PROBLEMS RESULTING FROM UNSTEADY FLOW 203

However, for pumps with high shutoff head, an objectionably high


PUMP pressure might be created.
SHAFT Determination of the pressures created by pump startup is addressed
in Article 7.6. Rather than high water hammer pressures, the engineer is
generally interested in the fluctuations of pressure at various locations in
the system for different schemes for bringing pumps on line.

Power Failure (or Power Shutoff) to a Pump

If power is cut off from the pump motors suddenly, either


accidentally or deliberately, significant water hammer problems can
develop. Generally, the pressure drops rapidly downstream of the pump
and this pressure drop propagates downstream at wave speed. (See Figure
8-3.) The drop in pressure can lead to extensive column separation and the
consequences of cavity-closure shock could be severe. In addition, flow
reversal in the system, if not properly handled, could lead to significant
overpressures in the system, generally in the vicinity of the pump.
If the pump is a booster pump with no bypass line, the power failure
situation will cause pressure to build up on the suction side of the pump.
The resulting pressure may be too high or the low pressure, which will
eventually appear, may be too low. This is particularly true if the pump is
located in the line at a point where the steady state positive head on the
suction side is low.
These situations summarize the most common single causes of water
Figure 8-2. Filling a pump discharge column behind a closed check hammer problems. Other situations are generally combinations of these
valve. basic ones. It remains now to address each of these situations and
investigate the types of control devices which can be used to prevent
objectionable pressure extremes.

Removing Air From Lines

During pump shutdown (and in gravity lines as well), vacuum valves


in the system may open for periods long enough to permit large quantities
of air to enter the line. When the line is activated again, the sudden
increase in pressure causes the air to rush out the still-open vacuum
valves. When the air is finally exhausted, the water slams into the vacuum
valve, closes it and the sudden drop in liquid flow velocity can cause high
pressures.

Pump Starting in a Pipeline

As a pump in a pipeline with air moved is started up and comes "on


line” a positive surge is generated in the pipe system. The magnitude of
the surge is dependent on the sudden increase in discharge experienced
when the pump forces open the check valve and begins to move the liquid.
Without air in the line, the pressure increase created is generally not large.
204 UNSTEADY FLOW IN PIPELINES

IX. Control Devices


and Techniques

Figure 8-3. Propagation of negative wave resulting from pump power fidhue.
Objectionable pressures generally occur in pipelines because of
changes in velocity imposed on the system as a result of valve movement,
pump power failure, column separation, etc. Because the change in
pressure is directly proportional to the change in velocity, avoiding sudden
velocity changes generally prevents serious water hammer pressures. Most
control devices and techniques are designed to function in a particular
application to satisfy this generalization.

9.1 Valves

Controlled Valve Movement

Earlier discussion illustrated how the valve closing schedule could


affect the maximum pressures developed. It was shown that generally, the
last 2-5 percent or so of valve closure is the most critical for gate valves.
For other valves, other results will be discovered. The best way to
determine the results of a valve closure schedule on water hammer
pressures is to obtain the head loss characteristics of the valve and run a
SEPARATION'
COLUMN

computer analysis. Within a relatively short time and with a small


investment in computer time, the maximum pressures can be found and
an acceptable closure scheme can be designed.
Once the proper valve closure schedule has been determined, a
hand- or motor-controlled system must be devised to operate the valve.
Possibilities for control systems range from relatively simple staged,
motor-driven assemblies to rather exotic servo-mechanism devices. The
only constraint is the amount of money the owner is willing to spend.
There is one simple method of valve closure which can often control
pressure at the valve, is easy to apply and is also adaptable to both
electrical and manual control. It is based on the premise that in most
simple pipelines, the pressure at the valve either represents the maximum
pressure in a water-hammer situation or it is directly related to the
maximum pressure if it occurs elsewhere in the system. Hence, if the
maximum pressure at the valve is kept within limits, the maximum
pressure throughout the system will be acceptable as well. For

205
206 UNSTEADY FLOW IN PIPELINES CONTROL DEVICES AND TECHNIQUES 207

hand-controlled valve closure, a pressure gage is installed on the upstream


side of the valve and a maximum desirable pressure is chosen. The valve is
then closed as rapidly as possible without exceeding the maximum
allowable pressure as indicated on the gage. The result is a cheap, easy 416' -------
way to avoid undesirable water hammer pressure. 400
This same approach can be used to drive a geared, motor-operated
valve. The pressure gage is replaced by a pressure sensing device which is
connected to an electronics system. The electronics system monitors the
voltage signal from the pressure sensor and stops the gear motor whenever
the signal exceeds a value representing the maximum pressure desired.
The result is a relatively simple automatic valve closing system.
At least one major valve manufacturer markets a pressure sustaining
valve operated by a pilot system. The pilot system is so designed as to
maintain a pre-set pressure on the upstream side while closing. Although
this device is considerably more expensive than the hand-controlled
system, it has the advantage of operating without monitoring or manual
intervention. The 8-inch surge relief valve is adjusted to open wide when the
pressure exceeds 130 psi, then close linearly in 8 sec. The wide-open loss
Surge Relief Valves coefficient is 6.6
A plot of the results of the analysis both with and without the surge
On occasion it is necessary to close valves rapidly or create other valve, is shown in Figure 9-1. The computer program listing follows as
obstructions in the flow which can cause sharp decreases in velocity and Figure 9-2.
the resulting high water hammer pressures. In these cases, the most With sudden valve closure and no surge valve, we get the typical
economical solution is often a surge relief valve. These valves, designed to “square” wave form of pressure variation with time in the pipeline. When
open when a certain prescribed pressure is exceeded, range from relatively the surge valve is allowed to operate, the gate valve is closed in 2.0 seconds
inexpensive spring-loaded devices, to rather expensive and complicated and the surge valve opens suddenly when pressure at the valve exceeds 130
systems.
psi. If the surge valve is only allowed to open 50 percent, some pressure
The surge relief valve is generally located adjacent to the device
expected to cause the high pressure. The purpose of the valve is to provide attenuation is achieved. However, to get substantial reductions in pressure
an escape for the flowing liquid and prevent sudden decreases in velocity in this case, it is necessary to initially open the valve 100 percent.
and the resulting high pressures. A high-quality surge relief valve has little The pressure extremes can be regulated by choice of surge valve size,
inertia so that it opens almost instantaneously. It also must close in a by the opening pressure, by the percent of initial opening and by the
manner which minimizes the loss of pipe liquid and yet avoids subsequent closure time. Some surge valves are designed to close in direct
unnecessarily high pressures during the closure process. These response to pressure reduction in the line (spring loaded). Some are
requirements can lead to a rather expensive valve which must be field designed to close in a given time period (more or less). The type of
adjusted for proper performance. computer simulation needed depends on the individual valve and
Rather large pipelines can be fitted with small surge relief valves adjustments in the computer program must be made accordingly.
because the surge relief valve can tolerate exceptionally high velocities for
short periods of time. To illustrate how this occurs, consider the following 9.2 Air in Lines
example.
Filling Empty Lines
Example 9-1
The key to filling the empty lines of a pipeline system is caution.
The 30-inch steel pipeline carries 11,020 gpm between the two Means must be provided so that the liquid can be introduced slowly into
reservoirs. The gate valve at the downstream end is closed in 2.0 seconds. the system at velocities of 1.0 fps or less [23, 24, 25]. Air release and
air-vacuum valves must be provided so that the air can be forced from the
system slowly. Valves must generally be provided at the ends of the line so
the line can be pressurized and air pockets forced out.
208 UNSTEADY FLOW IN PIPELINES CONTROL DEVICES AND TECHNIQUES 209

** *
1: C
2: C PROGFAM NO. 1(1
3: C SURGE VALVE IN A SIMPLE PIPE - APPROXIMATE METHOD OF CHARACTERISTICS
4: C****************************************************************************
C
6: C — PIPE EXTENDS BETWEEN TWO RESERVOIRS --
7: C — SURGE VALVE AND GATE VALVE ARE LOCATED AT DOWNSTREAM END OF PIPE —
8: C — GATE VALVE CLOSES LINEARLY WITH TIME —
9: C
10: C IOUT = INDEX WHICH GIVES AN OUTPUT EVERY IOUT-TH TIME STEP
1,000 11: C NPARTS = NUMBER OF PARTS INTO WHICH PIPE IS DIVIDED
12: C L ’ PIPE LENGTH-FT D = PIPE DIAM-IN F = DARCY-WEIS3ACH FRICTION FACTOR
--------- SURGE VALV E OPENS 100% 13: C QZERO = DISCHARGE-GPM A = WAVE SPEED-FPS HZERO = RESERVOIR ELEV-FT
E OPENS 50% 14 : C ELEVUP = ELEVATION OF UPSTREAM END OF PIPE-FT
15: C ELEVDN = ELEVATION OF DOWNSTREAM END OF PIPE-FT
--------- SU DDEN VAI VE CLOSl IRE - NO URGE 16: C TMAX - MAXIMUM REAL TIME OF SIMULATION-SEC
900 VAL\ E 17: C TCLOSE = TIME REQUIRED FOR VALVF. CLOSURE-SEC
18: C POPEN = PRESSURE AT WHICH SURGE VALVE OPENS - PSI
—<— -- ' 19: C DSURGE = DIAMETER OF SURGE VALVE - IN
20 : C KLSUR = WIDE OPEN SURGE VALVE LOSS COEFFICIENT
21: C OPENI = PERCENT OF WIDE OPEN WHICH SURGE VALVE INITIALLY OPENS
22: C TOPEN « TIME SURGE VALVE IS OPEN - SEC CLOSES LINEARLY WITH TIME
23 :
800 24:
C
DIMENSION X(20),V(20),H(20),BLOW(20),HHIGH(20),HEAD(20),
25: $VNEW(20),KNEW(20),PIPEZ(20)
26 : DIMENSION KI (ID ,PCT(11) ,KLISUR(11)
27: REAL L,KI,KLl,KLSUR,KLISUR,KLIS
28 : LOGICAL SURGF,CLOSE
29;
700 ,'z 1
30:
DATA (KI(I), 1 = 1, 11)/0 .,.0167,.0313,.0556,.100,.1787,.333,.625,
$1.25,2.50,5.27/
1 31:
z 1 DATA (PCT(I),1=1,11)/0.,10.,20.,30,,40,,50.,60.,70.,80.,90.,100./
,* 1 32 : DATA (KLISUR(I),1-1,11)/0.,.0004,.0016,.081,.194,.342,.504,
1
33 : $.664 , .819 , .931 ,1.00/
1 34 :
1 NAMELIST /SPECS/ IOUT,NPARTS,L,D,F,A,0ZERO,HZERO,ELEVUP,ELEVDN,
1 35: $TMAX,TCLOSE,POPEN,DSURGE,KLSUR,OPENI,TOPEN
600 36: C
ELEVATION , feet

37 : READ(5,SPECS)
/ t 38 : C
• 1
39 : PI=3.141592
1 t i
/ ! 40 : WTT=L/A
1 / : 41: DELL=L/NPARTS
500 1 t
42:
J T=0 .
n 1 43: SURGE=.FALSE.

400 STEADY
1
/ALVE ] XX
V I
1
1
1
1
45:
46 :
47 :
CLOSE=.FALSE.
DELT=DELL/A
C=32.2/A
INDEX=TMAX/D£LT + 1
STATE I IE AO, AT ' 1 48:
DELEL=(ELEVDN-ELEVUP)/NPARTS
v/ \ 49:
SINE=DELEL/DELL
1 50:
1 51 :
NODES=NPARTS+1
1 52 :
VZERO=144 « * 4 .*QZERO/(449.*PI*D*D)
1
\■
t ’ H0PEN = 2.31 *POPEN+ELEVDN
*» 1 53:
AS=»25*PI*DSURGE**2/144.
300 54 :
AA=.25 * PI *D** 2/144.
55:
—\ 56 :
DO 1 1=1,11
1 KLISUR(I)=KLISUR(I)*(1./KLSUR)
57 :
\t 58:
C
C ** WRITE OUT INPUT DATA **
\i 59 :
200 C
60:
WRITE(6,200)
V1 61:
WRITE(6,201) IOUT,NPARTS,L,A,D,F,OZERO,VZERO,HZ ERO,ELEVUP,ELEVDN,
62:
SURG i VALVE SURGE VALVE 63 : $WTT,TCLOSE,TMAX,DELT
C PEN CLC SED 64 : WRITE(6,211) DSURGE,KLSUR,POPEN,OPEN I,TOPEN
65: AK=12•*F*DELT/(2.*D)
100 66 : DELHF = 12.*F* DELL*VZERO** 2/(64.4 *D)
67: C
68 : CC** SET UP CONDITIONS FOR T = 0. **
69 : DO 300 1=1,NODES
70 : V(I)=VZERO
71: H ( I)=HZERO-(I-1)*DELHF
72: HLOW(I)=H(I)
73: HHIGH(I)=H(I)
74: X (I) = (I-1)*DELL/L
O
C

10 12 75:
76:
PIPEZ(I)=ELEVUP+(I-1)*DELEL
HEAD(I)-H(I)-PIPEZ(I)
14 77: 300 CONTINUE
78 • HDOWN=H(NODES)-VZERO**2/(64.4*KI(11)
TIME-seconds
Figure 9-1. Pressure head at the gate valve showing the effects of surge Figure 9-2. Computer program for a surge valve at the downstream end
valves. of a simple pipe with a line valve closing.
210 UNSTEADY FLOW IN PIPELINES CONTROL DEVICES AND TECHNIQUES 211

79: C DO 38 111-1,20
80: C ** WRITE OUT STEADY STATE CONDITIONS “ 159: FUNCT-CC-C*HTRY-A1*SQRT(HTRY-HDOWN)-A2*SQRT(HTRY-ELEVDN)
81: C 160: PRIME’-C-.5*A1/SQRT(HTRY-HDOWN)-.5*A2/SQRT(HTRY-ELEVDN)
82: WRITE(6,202) 161: HNEXT’HTRY-FUNCT/PRIME
83 : WRITE(6Z204) T,(X(I), HEAD(I),H(I),V(I),1-1,NODES) 162: IF(ABS(HTRY-HNEXT).LT.1.0) GO TO 388
84 : C 163:
HTRY-HNEXT
85: C ------ ----- --------- ------- ------ --------- ------ --------- ------ ----------- ----------------------- -------- ------- -------- ------- 164:
C BEGIN TRANSIENT ANALYSIS 38 CONTINUE
86: 165:
87: C ----------- -------- ------ ------ ----------- ------- ------ _ __ ___ ___ __ _____ „ ______ ____ _______________ _______ ____ 166: WRITE(6,208)
C 167: STOP
88:
DO 99 11 = 1,INDEX 168 : 388 HNEW(NODES)-HNEXT
89: T-T+DELT 169: VNEW(NODES)»CC-C*HNEW(NODES)
90: C 170: VV-SQRT(64.4*KLI*(HNEW(NODES)-HDOWN))
91: C “ COMPUTE H AND V AT INTERIOR NODES “ 171: QSURGE- (VNEW (NODES) -W) *AA
92: C 172: 39 CONTINUE
93 : DO 20 I«2,NPARTS 173: C
94 : VNEW(I)-0.5*(V(1-1)+V(I+1)+C*(H(1-1)-H(I+1))-AK*<V(1-1)*ABS(V(1-1) -C ** COMPUTE MAXIMUM AND MINIMUM H-VALUES **
$)+VQ+1)*ABS(V(1+1)))) 17 4:
95: 175:
20 HNEW(I)-0.5*(H(I-l)+H(1+1)+(V(I-l)-V(I+1))/C-AK*(V(I-l)*ABS(V(I-l) C
96: 176:
97: $)-V(1+1}*ABS(V(1+1)))/C) DO 50 1-1,NODES
C 177: IF(HNEW(I).LT.HLOW(I)) HLOW(I)-HNEW(I)
98: IF(HNEW(I).GT.HHIGH(I) ) HHIGH(I)’HNEW(I)
C “ COMPUTE H AND V AT UPSTREAM END ** 178:
99: C — THIS BOUNDARY CONDITION IS FOR A CONSTANT-HEAD RESERVOIR — 179: 50 HEAD(I)-HNEW(I)-PIPEZ(I)
100 : C 180: C
101: HNEW(l)»HZERO 181: C ** WRITE OUT H, V, AND HEAD VALUES AND TEST FOR THAX **
102: VNEW(1)-V(2)+C*(HNEW(1)-H(2))-AK*V(2)*ABS(V(2)) 182: C
103 : C 183:
104: C ** COMPUTE H AND V AT DOWNSTREAM END “ IF(MOD(II,IOUT),NE.0) GO TO 60
C -THIS BOUNDARY CONDITION FOR GATE VALVE WITH SURGE VALVE JUST UPSTREAM- 184 :
105: WRITE(6,204) T, (X(I) ,HEAD(I) ,HNEW(I) ,VNEW(I) ,I-1,NODES)
C 185:
106 : 186: IF(CLOSE) GO TO 59
QSS’QSURGE*449.
107: CC-C*H(NPARTS)-AK*V(NPARTS)*ABS(V(NPARTS))+V(NPARTS)
IF(T.GT.TCLO$E) GO TO 31 187: IF(SURGE) WRITE(6,209) QSS,OPENS,KLIS
108: 188: 59 I F (T. LT .TCLOSE) WRITE(6,210) W,OPEN,KLI
C ** COMPUTE LOSS COEFFICIENT FOR GATE VALVE **
109: 189: 60 IF(T.GT.TMAX) GO TO 400
OPEN’100.*(TCLOSE-T)/TCLOSE
110: 190: C
DO 32 1=1,11
111: ITEST-(OPEN-PCT(I))*.10 191: C ** PREPARE FOR NEXT TIME STEP COMPUTATION **
112: IF(ITEST»EQ.0) GO TO 33 192: C
113: 32 CONTINUE 193: DO 40 1-1,NODES
114 : 33 FACT-(OPEN-PCT(I))*.10 194: V(I)-VNEW(I)
115: KLI-KI (I)+FACT* (KI (I + D-KI (I) ) 195: 40 H(I)-HNEW(I)
116: 31 CONTINUE 196: 99 CONTINUE
117: IF(.NOT.SURGE.OR.CLOSE) GO TO 310 197: C
118: C ** CHECK TO SEE IF SURGE VALVE CLOSED AND COMPUTE LOSS COEFFICIENT IF NOT ** 198: C ** WRITE OUT MAXIMUM AND MINIMUM HEADS AND H-VALUES **
119 : 35 IF(T.GE.(TSTART+TOPEN)) CLOSE’.TRUE. 199: C
120: 200 :
IF(CLOSE) GO TO 310 400 CONTINUE
121: 201:
OPENS’OPENI*(TSTART+TOPEN-T)/TOPEN WRITE(6,205)
122: 202: DO 401 1-1,NODES
123: DO 320 1-1,10
203: HEADMX-HHIGH(I)-PIPEZ(I)
124: ITEST’(OPENS-PCT(I))*.10
204 : HEADMN-HLOW(I)-PIPEZ(I)
125: IF(ITEST.EQ.0) GO TO 330
205: 401 WRITE (6,206) X (I) , HEADMX , HEADMN , IIHIGH (I) , BLOW (I)
126: 320 CONTINUE
206:
127: 330 FACT-(OPENS-PCT(I))*.10 C
207 :
128: KLIS’KLISUR(I)+FACT*(KLISURl1+1)-KLISUR(I)) c ••••••• FORMAT STATEMENTS *******
208: C
129: IF(T.LT.TCLOSE) GO TO 37 209: 200 FORMAT (1111 ,19X , 33 ('*')/20X * WATER HAMMER IN A SIMPLE PIPE •’/
130: IF(T.GE.TCLOSE) GO TO 312 210: S20X,'* WITH A SURGE VALVE *'/
131: 310 IF(T.GE«TCLOSE) GO TO 34 211: $20X , 33 ( ' * ’))
132: C ** SOLVE FOR HNEW AND VNEW WITH GATE VALVE OPEN AND SURGE VALVE CLOSED ** 212: 201 FORMAT(///29X,'INPUT DATA’/29X,10('-')//?.8X, *IOUT =',I3/26X,’NPART
133 : 311 C5 = 64.4 *KLI/C 213: $S -',I3//31X,‘L =',F8.1,' FT'/31X,'A =’,F7.1,' FPS'/
134 : C6-64.4*KLI* (CC/C--HDOWN)
214: $31X,'D =’,F7,2,’ IN'/31X,‘F =',F6.4//27X,'QZERO =',F7.1,' GPM'/
135: VNEW(NODES)’.5*C5*(-1.+SQRT(1.+ 4.*C6/C5* * 2))
215: $27X,'VZERO »■,F7,2,' FPS'/27X,'HZERO -', F7 .1 ,' FT'/
136: HNEW(NODES)’(CC-VNEW(NODES))/C
216: S26X,'ELEVUP ,F7.1,' FT'/26X,'ELEVDN »' ,F7.1 , ' FT'//
137: 36 IF(HNEW(NODES),GT.HOPEN) SURGE’.TRUE.
IF(SURGE) TSTART’T 217 : S29X,'L/A =',F7.3,' SEC'//26X,'TCLOSE -',F7.2,' SEC'/
138: 218: S28X,'TMAX - ’ , F7.2 , ' SEC/28X, 'DELT - ' , F7.3 , ' 'SEC' )
139: IF(SORGE) GO TO 35
W’VNEW(NODES) 219: 202 FORMAT(1H1/' PRESSURE HEADS, H-VALUES AND VELOCITIES AS FUNCTIONS
140: 220 :
141:
GO TO 39 $ OF TIME'/2X,60(’-’))
34 VNEW(NODES)’0 . 221: 204 FORMAT(//18X,3(5X,* X HEAD-FT H-FT V-FPS’)/' TIME =',F7.3,
142: HNEW(NODES)“CC/C 222 : S' SEC’,3(5X, ’--------------------------------------------------- ---------------- d/dBX^tSX.FSd.ZF?.?,
143: IF(CLOSE) GO TO 39 223 : SF8.2)))
144 : GO TO 36 224 : 205 FORMAT(1H1/18X,27(’*')/18X ,'* TABLE OF EXTREME VALUES *’/18X,27('*
145: C ** SOLVE FOR VNEW AND HNEW WHEN SURGE VALVE OPEN AND GATE VALVE CLOSED ** 2 2 5‘: $’)//13X,’X MAX HEAD MIN HEAD MAX H MIN H’/11X,5('- 1 ),2X , 8 (
146: 312 C5«64•4 *AS *AS/(AA*AA*C*(1,+1«/KLIS)) 226: $'-'),2X,8('-'),2X,6l‘-'),2X,6('-')}
147 : C6»C5*C*(CC/C-ELEVDN) 227: 206 FORMAT(11X,F5.3,2X,F7.0,3X,F7.R,3X,F6.0,2X,F6.01
148: VNEW(NODES) = .5*C5*(-1.+SQRT(1.+4.*C6/C5** 2)) 228: 208 FORMAT(///l0X,'NEWTON-RAPHSON FOR SOLUTION FOR SURGE AND LINE VALV
i 4 9 s HNEW(NODES)’(CC-VNEW(NODES))/C 229 : SES OPEN HAS FAILED')
150 : QSURGE’VNEW(NODES)*AA 230 : 209 FORMAT(6X,'SURGE VALVE DISCHARGE ,F7.1,' GPM *,8X,'SURGE VALVE IS
151: GO TO 39
231: $',F7.2,’ PERCENT OPEN WITH KLIS »',F9.6)
152: C ** SOLVE FOR VNEW AND HNEW IF BOTH SURGE VALVE AND GATE VALVE ARE OPEN **
232 : 210 FORMAT(6XLINE VALVE VELOCITY - ' ,F6.2,' FPS WHEN VALVE IS’,
153: 37 HTRY’H(NODES)
233: SF6.2,' PERCENT OPEN AND KLI ,F9.6)
154: Al’SQRT(64•4 *KLI)
234 : 211 FORMAT(//16X,1 SURGE VALVE DIAM =',F7.3,' IN'/I2X,'WIDE-OPEN LOSS C
155: A2-SQRT(64•4 *AS*AS/(AA*AA*(1.+ 1,/KLIS)))
235: SOEFF -',F6.2/8X,1 SURGE VALVE OPENS WHEN P ’',F5.1,' PSI'/
156: 236: $5X,'SURGE VALVE INITIAL OPENING -',F5.1,’ PERCENT'/
157: 237 : $2X,'TIME OF CLOSURE OF SURGE VALVE «',F5.1,’ SEC')
158: 238 : END

Figure 9-2. Continued. Figure 9-2. Continued.


212 UNSTEADY FLOW IN PIPELINES CONTROL DEVICES AND TECHNIQUES 213
'i

!
In pumped pipelines it may be necessary to provide a discharge ■

bypass back to the sump to prevent objectionably high heads from


occurring at the pump for low discharges. This requirement is almost
always needed for axial-flow type pumps. EL J±GL
If it is necessary to fill a line with the pump “wide open,” be sure
there are no obstructions to cause sudden changes in velocity. Remember,
if there are no sudden changes in velocity, there are generally no sudden
changes in pressure.

Removing Air From Lines

If the line is mostly filled with liquid with only relatively small pockets
of air created by a shut-down, caution must still be used in startup. The
best approach is to use the technique suggested above for filling empty Figure 9-3. Open-end surge tank In a hydroelectric installation.
lines and not resume normal operation until all the vacuum valves and air
release valves have closed.

9.3 Pomp Power Failure

Surge Tanks

Surge tanks can be employed to prevent both objectionably high and V


low pressures. In general they act as temporary storage for excess liquid
which has been diverted from the main flow system to prevent high
pressures; or they act as supplies of liquid to a pipe which needs more fluid
to prevent excessive deceleration. The open-end surge tank can be used for
both functions. In fact a single open-end surge tank can be so designed as
to act effectively in controlling both high and low pressures in a pipeline.
Figure 9-3 illustrates a typical application of an open-end surge tank in a
hydroelectric installation where its purpose is to both store or supply water
rapidly as electrical load varies and to quickly dampen the resulting C
D
pressure oscillations. I
In pumped pipelines, the one-way surge tank is most commonly used,
because the HGL is generally too far above the pipeline to practically
employ an open-end surge tank. Consequently, the one-way surge tank is
used to prevent column separation because it has no capability to prevent
overpressures. Because its liquid surface is generally located well below
the steady state hydraulic grade line, the one-way surge tank is isolated CHECK
from the system with a check valve (see Figure 9-4). When the hydraulic ALTITUD _ /VALVE
grade line drops below the surface of the liquid in the one-way surge tank, E
the check valve opens and liquid flows into the system. The result is that GATE
the liquid column is not required to decelerate so rapidly and the VALV
hydraulic grade line at the location of the one-way surge tank is fixed close E VALVE
to the water surface in the tank. The resulting hydraulic grade line
configuration for a typical pumped pipeline with one-way surge tanks is
shown in Figure 9-5.
Figure 9-4. A schematic sketch of a one-way surge tank.
214 UNSTEADY FLOW IN PIPELINES CONTROL DEVICES AND TECHNIQUES 215

from 0.60 to 0.98, depending on the type of connection. This connection


should be large enough and hydraulically efficient enough to prevent large
head drops through the connection because the main purpose of the tank
is to keep pressure in the line as high as possible.
In the four equations above, we have five unknowns so we must
develop another equation. This is done by keeping track of the elevation
Hj of the water surface in the tank above the pipe. Calling the initial
R elevation HSQ, the elevation at any time can be found from the equation
L
_ - V tR
where As is the cross-sectional area of the surge tank.
Instead of performing the integration each time, we will keep a record
of the change at each time step and recompute the new elevation. The
equation for this is
Figure 9-5. One-way surge tanks In a pumped pipeline.
HCt + At) = H/t)- -^Qs(t) ........................................................ (9-5)
A
s
One-Way Surge Tank Analysis
By this means, Hs is known before we have to solve Equations 9-1 through
To incorporate one-way surge tanks into the water hammer analysis, 9-4. The set of four equations now only has four unknowns.
it is necessary to treat them as special internal boundary conditions. Input It should be pointed out that the dynamic equations of flow from the
data to the computer program specifies the location of the surge tanks, surge tank were not usedi Rather it was assumed that the steady flow
their geometry and their hydraulic characteristics. It remains only to equations at any given time step would adequately represent the unsteady
develop the internal boundary condition equations. flow phenomena in the surge tank.
We will assume that the surge tank always occurs at the junction If Equations 9-1 through 9-4 are solved for the tank discharge Qs, the
between two series pipes. This is not restrictive, because we can divide any result is
pipe into a convenient number of series pipes and thereby locate the surge
tanks at any specific point. Referring to Figure 9-4, we can write the
following equations for the internal boundary conditions. 4 C6
................................ (9-6)

o
C
A
Upstream C . = C,-CH (9-1)

Downstream C': = C, + C„H (9-2) where

Continuity: 2
+
o
II

2gC O
>

(9-7)
Energy: Qs = C0An V2g(Hs + AB ’Hp) ........................... ^-4) c2 AB + c4

where An is the cross-sectional area of the pipe connecting the tank to the 2gC02
pipeline and Hg is the instantaneous value of the elevation of the water [Ci Ag - C3 AA + (C2AB + C4 AA)(HJ + ZAB)J
O'

C2AB + c4

>
surface in the surge tank above the pipe. The Hp’s are not subscripted
because the values at A and B are the same.
Note that the short-tube orifice equation is used to find an equation
relating discharge from the tank into the pipeline. The Co values range
216 UNSTEADY FLOW IN PIPELINES CONTROL DEVICES AND TECHNIQUES 217

Once the surge tank is on line, the value of C, is continually tested to


determine if Qs is going to become negative. If C» < 0, then Qs will be set
equal to zero and the surge tank check valve will be closed. An example is
presented following the next section to illustrate the effect of the one-way
surge tank. Upper Emergency
AIR

Air Chambers
]

An open-end surge tank placed at the discharge side of a pump Air-on Level

system would be an excellent device for controlling line surges and


preventing column separation resulting from pump power failure. Air-off Level
♦-Sightglass
Because of economics and esthetics, this type of surge tank is seldom used Air-releose
Valve Opens -
for this purpose. Rather, a device which can approximately simulate an
open-end surge tank is used. This substitute, called an air chamber, is a

Lower Emergency
relatively small pressurized vessel containing both water and air which is Shut -off Level -
connected to the main pipeline at the discharge side of the pumps.
The primary purpose of the air chamber is to prevent negative
pressures and column separation in the pipeline system downstream of the
chamber; however, the device is an excellent surge suppressor as well. The

E
7
Compressor l
chamber is sealed and a layer of compressed air overlays the liquid inside Chamber Discharge Nozzle
(see Figure 9-6).'After pump power failure, liquid is drawn from the T // / / Z7
chamber into the pipeline and the volume of air within the chamber
expands, causing the pressure to drop. The rate at which the chamber
pressure drops is dependent on the initial air volume, the thermodynamic
process which the air undergoes, and the rate at which liquid is being Pipeline
drawn out of the chamber. With the chamber supplying liquid to the pipe
at the ever-decreasing pressures, the liquid in the pipeline is slowly
decelerated without causing unnecessarily low pressures. By this means Figure 9-6. Schematic diagram of an air chamber and its appurtenances.
column separation can often be entirely avoided. A typical situation is
shown in Figure 9-7, which illustrates how gently the air chamber can
bring the system to rest. Compare this result with Figure 8-3. Air Chamber Analysis
The air chamber must be large enough to supply the needs of the
pipeline without reaching the point where air enters the line (emptying). The air chamber contribution to the upstream boundary condition
Also the initial air volume must be large enough so that the pressure drop must be incorporated with that of the pumps. We will assume there are
rate is not too high. Too small initial air volume will cause the pressure to NpU pumps in parallel and the power fails to all simultaneously.
drop much like the pumps alone would cause, thereby introducing little The equations for this situation are:
assistance in preventing column separation. In addition, to damp out high
pressure surges, the flow path back into the air chamber is made more Downstream C : .(9-9)
difficult so that large frictional losses can be generated and strong
damping achieved. Ultimately, all this must be accomplished with the Continuity: N UQ + Q C “ V p A (9-10)
smallest and least expensive configuration possible.
Figure 9-7 also shows that an air chamber is not always adequate to Energy (pump): (9-11)
completely prevent column separation. Low pressure can occur at local

a
summits in the pipeline and the air chamber often cannot help enough at Energy (chamber): Q = V2g (HT - Hp) (9-12)
these locations. In these cases a one-way surge tank is provided at the
summit to “drape” the EL-HGL above the pipe as shown in Figure 9-8. Pump: (9-13)
218 UNSTEADY FLOW IN PIPELINES CONTROL DEVICES AND TECHNIQUES 219

where H/p is the H-value in the chamber, An is the area of the discharge
nozzle, and Qc is the discharge from the chamber.
We have five equations and six unknowns, so another equation is
required. This equation is obtained from the thermodynamic process
which the air undergoes. The equation describing a polytropic process is
_E_ =
yV
where p0 and y0 are the initial absolute pressure and specific weight of the
air, p and y are these values at a later time and rj is the polytropic
exponent, generally taken as rj = 1.2. Using Hatm as the atmospheric
pressure head, this equation can be written as

(HT + Hatm - ZP)?H2O (PT^Hatm ’ZP)7H2O

-3
If the initial air volume is CT0 and the volume at a later time is CT, the
equation can be written in the form

Figure 9-7. Propagation of negative wave after pump power failure with Z
P ' ^atm 9-14)

-r

+
an air chamber at the pump.

N
atm

where the air volume Op can be calculated m the same manner used to
keep track of the level in the one-way surge tank

Cr(t + At) = Cr(t) + AtQc(t)

It now remains only to solve the six equations and six unknowns.
In the most general case we will assume there is still flow through the
pumps and there is flow from the air chamber. Knowing C-p we can
calculate H-p and reduce the equations and unknowns to five. Solving the
five equations for Qc gives the following expression for Qc

.............................. (9-16)

where

2gC02 A„2 NN, C7


Vi
N -NN,AC_C,
DU St 7 2
Figure 9-8. Propagation of negative wave after power failure with an air
chamber and a one-way surge tank. and
220 UNSTEADY FLOW IN PIPELINES CONTROL DEVICES AND TECHNIQUES 221

NNst
H (CjC.A+NN C,) 4 C6
(9-25)

z
pu

NNstAC2C7

z
pu where
(9-18) 2g Ci2 A (9-26)
AC.
After calculating Qc, Q is calculated from the following equation
and

Q= .................. (9-19)
2gC0‘ A C6 = 2gC2A
z

If Q> 0, then the solution is acceptable and the remaining unknowns may The value of Cj depends somewhat on the nozzle configuration, but in
be calculated. general discharge coefficients for re-entrant type short tubes are used.
If, however, Q < 0, then the check valves to the pumps must be closed Therefore, recommended values of Cj range from 0.80 to 0.50.
and Q = 0. In this case, Qc must be redetermined using the following
Sizing an Air Chamber
equation
Pressure variation with time at the head of the pipeline where the air
chamber is situated depends primarily on the initial air volume in the
chamber when power failure occurs. The smaller the initial air volume,
where the more rapidly the pressure drops.
The first step in the sizing procedure is to try successive values of
2gC02A 2
initial air volume until the computer analysis shows that the minimum
n ................................................... (9-21)
pressures occurring along the pipeline are within acceptable limits. This
C2A initial air volume establishes the upper emergency level. If power fails
when the air volume is smaller than this, pressures lower than desirable
and will occur in the system.
Because pressures fluctuate during normal operation there must be
= 2g Co2 A.2 (9-22) some space reserved in the air chamber for this fluctuation. Evans and
Crawford [26] recommend allowing 25 percent of the initial air volume at
the upper emergency level.
Once the pump check valves are closed, they are never reopened. Now because it is possible for power to fail when the initial air volume
Flow out of the air chamber will continue until flow reversal occurs. With is at this greater volume, we must be sure the tank is of adequate size to
flow into the air chamber a different set of equations must be solved.
prevent its emptying under downsurge. To accomplish this, we make one
For flow into the air chamber, the pumps are no longer involved and
more analysis using this larger initial air volume (lower emergency level).
the following equations are used in conjunction with Equation 9-9.
The maximum air volume during this analysis establishes the minimum
total volume of the air chamber. It is also recommended an additional 10
Continuity: VpA = Qc ..............................................................(9-23) percent or so of volume be added to act as a safety factor and perhaps
prevent vortexing and air entrainment at the connection.
Energy (chamber): Qc = - CjAn \/2g(Hp - HT) .........................(9-24)
The configuration shown in Figure 9-6 is the most common type of air
chamber design for small chambers. When requirements dictate large
where Cj is the discharge coefficient for flow into the chamber.
chambers, e.g., 6 feet in diameter and 40 feet long, the chambers are
Solving these equations simultaneously for Qc gives the following
equation. generally placed horizontally.
222 UNSTEADY FLOW IN PIPELINES CONTROL DEVICES AND TECHNIQUES 223

Air Chamber Appurtenances

Air chambers require some appurtenances for proper operation. 900


Because the water level in the chamber must be kept within the bounds of
the upper and lower emergency levels, except for short term fluctuations,
some provision must be made to accomplish this. If the water level gets too
high and remains high too long, compressed air is injected into the air 800'
chamber to force the water level down. This air is obtained from a high
pressure air receiver tank supplied by a small air compresser. Conversely,
if the water level falls too low, air is removed from the chamber via an
air-release valve. 700'
In extreme cases, when the water level reaches the upper emergency
levels and remains there too long, the system should be shut down to
determine the cause. If it is necessary to keep running regardless, at least
an alarm should be sounded to alert personnel to the problem. 600'

The flow nozzle shown on Figure 9-6 is not a critical component. If


the connector pipe to the pipeline is large enough to prevent high
velocities, the flow nozzle will not noticeably improve downsurge
protection. Its strongest effect will be noticed when backflow into the 500'

chamber occurs and significant damping (head loss) is required. Without


the high-loss reverse-flow characteristics of the nozzle, either less damping ----------------- NO AIR CHAMBER
(See Ex.7"l)
must be accepted or another means of accomplishing damping be
----------------- CTo =100 FT3
implemented. With 2 Surge Tanks
A sight glass is generally provided to permit visual location of the
water surface in the chamber. Water level sensors to determine when to
Figure 9-9. Column separation prevention using an air chamber and
turn on or off air flow and when to signal violation of upper or lower
one-way surge tanks.
emergency levels can be located external to the chamber and connected via
piping. This arrangement renders them easily accessible for maintenance
or replacement. A man-door is also generally provided in the larger
chambers. A variety of drains, pressure regulators and piping make up the Note that as the initial air volumes in the air chamber analyses are
remaining requirements. In cold weather climates the chamber and its selected, that they are each 25 percent different in size. This technique is
appurtenances must be protected against freezing. useful in determining the final sizing of the chamber. For example, in this
case, analysis with CT0 = 500 ft3 was made, but pressures were all well
Example 9-2 above zero. The next initial air volume tried was 500/1.25 = 400 ft3. This
analysis still gave positive pressures everywhere so another initial air
The pumping situation of example 7-1 is re-examined here to provide volume of 400/1.25 = 320 ft3 was used. This time the minimum pressure
corrective devices to prevent column separation. In fact, we will also try to was about zero at a point in the line. Following the rule discussed earlier,
prevent any negative pressure from occurring. we provide an additional air volume of 25 percent to permit water level
The results of the analysis are shown on Figure 9-9 and the data cards fluctuations in the chamber and then make a computer run with this new
necessary to execute the program are given below. A listing of the initial air volume. Of course, 1.25 x 320 = 400 ft3 and the analysis for this
computer program used in the design is given in Figure 9-10. initial air volume has already been run. It is now clear why we try to
The sequence of pressure waves found in example 7-1 are copied to change CT0’S by 25 percent each time, if possible.
illustrate how dramatically air chambers affect the system deceleration. F From the computer printout for CTO = 400 ft3, we find the
The curves for the three different air chambers are envelope curves, i.e., maximum air volume is 730 ft3. We can now design the air chamber by
they represent the lower bound on pressure heads along the pipeline. This selecting diameters and lengths which are economical or conform to
is also true of the analysis with two one-way surge tanks and an air available materials or building constraints.
chamber.
224 UNSTEADY FLOW IN PIPELINES CONTROL DEVICES AND TECHNIQUES 225

1 83: WRITE(6,201) NPIPES,NPARTS,HRES.HATM,ZEND,TMAX,IOUT,QACC


2 C * PROGRAM NO. 11 *
84: WRITE(6,202)
C * PROGRAM FOR PUMP RUNDOWN AFTER POWER FAILURE WITH AIR CHAMBER *
85: DO 3 I’1,NPIPES
4 C * AND ONE-WAY SURGE TANKS * 86 : LA-L(I)/A(I)
5 C******* 87 : 3 WRITE(6,203) I,D(I) ,L(I) ,F(I) ,A(I) ,PIPEZ(I) ,LA
6 c 88: C
7 C WATER HAMMER PROGRAM FOR PUMP RUNDOWN RESULTING FROM POWER FAILURE 89 : C ** READ IN PUMP DATA **
8 C SYSTEM CONFIGURATION HAS PUMPS AT UPSTREAM END AND RESERVOIR AT DOWNSTREAM END 90: C
9 C THE AIR CHAMBER IS LOCATED AT THE PUMP DISCHARGE 91: READ(5,PUMPS)
10 C THE ONE-WAY SURGE TANKS CAN BE LOCATED AT JUNCTIONS BETWEEN PIPES 92: WRITE(6,215)
11 C PROGRAM WILL HANDLE ANY NO. OF PARALLEL PUMPS-ALL FAIL SIMULTANEOUSLY 93: WRITE(6,216) NPUMPS,NSTAGE,RPM,WRSQ,HSUMP
12 C PROGRAM WILL HANDLE UP TO 3 SERIES PIPES- MUST BE AT LEAST TWO SERIES PIPES 94: WRITE(6,217)
13 C PROGRAM WILL HANDLE UP TO 5 ONE-WAY SURGE TANKS 95: WRITE(6,218) (ON(I),HNSQ(I),TNSQ(I),1-1,6)
14 C 96: PINERT’WRSQ/32.2
15 C ** GENERAL SPECIFICATIONS “ 97: C
16 C 98: c “ READ IN AIR CHAMBER DATA **
17 C NPIPF.S “ NUMBER OF PIPES IN SERIES - PIPE NO, 1 IS JUST DOWNSTREAM FROM PUMP 99: C
18 C IOUT ’ PARAMETER WHICH WRITES OUT EVERY IOUT-TH COMPUTATION 100: IF(.NOT. AIR) GO TO 4
19 C NPARTS = MINIMUM NUMBER OF PARTS INTO WHICH PIPES ARE DIVIDED 101: READ(5,CHAM3)
20 C THAX’MAX. REAL TIME OF RUN-SEC HATM’ATMOSPHERIC PRESSURE HEAD (POSITIVE)-FT 102: WRITE(6,220)
21 C A O’WAVE SPEED-FPS L () ’LENGTH-FT D()=DIAM)-IN F()=FRICTION FACTOR (DARCY) 103: WRITE(6,221) CTZERO,COUT,CIN,DNOZ,EXPON
22 C PIPEZ()“UPSTREAM ELEVATION OF PIPE - FT HEAD ()’PRESSURE HEAD IN PIPE - FT 104: IF(SHUT) WRITE(6,225)
23 C ZEND’ELEVATION OF DOWNSTREAM END OF LAST PIPE AT RESERVOIR - FT 105: ANOZ“.7854 *DNOZ*DNOZ/144.
24 C HRES’ELEVATION OF WATER SURFACE IN RESERVOIR 106: CT’CTZERO
25 C OACC’ACCURACY OF DISCHARGE ITERATION FOR STEADY STATE COMPUTATION - GPM 107: 4 CONTINUE
26 C NSURGE’NUMBCP OF ONE-WAY SURGE TANKS 108: C
27 C AIR’,TRUE, IF AlP CHAMBER IS TO BE USED 109: C ** READ IN ONE-WAY SURGE TANK DATA **
28 C SHUT’.TRUE. IF, IN CONJUNCTION WITH AIR CHAMBER, PUMPS ARE ELIMINATED 110: C
29 C FROM ANALYSIS AFTER POWER FAILURE. 111 : IF(NSURGE.EQ.0) GO TO 5
38 C 112: DO 6 I’l,NSURGE
31 C *• PUMP INPUT DATA ** 113: READ(5,103) ISURGE(I) , HS (I) ,DS (I) ,DC (I) ,CS (I)
32 C 114: 103 FORMAT(110,4 Fl0.R)
33 C NPUMPS’NUMREP OF PUMPS IN PARALLEL HS<JMP = ELEVATION OF WATER SURFACE IN SUMP 115: AS (I) ’ . 78 5 4 * DS (I) *DS d)
C RPM’STF.ADY STATE PUMP SPEED-PPM NSTAGE’NUMBER OF STAGES FOR PUMP 116: 6 AC (I} ’ . 78 54 * DC (I)'* DC ( I)/14 4 .
34
C WRSQ’MOMENT OF INERTIA OF PUMP AND MOTOP IN LB.M-FT SOUAREC 117: WRITE(6,230)
35
C QN()“DISCHARGE FROM PUMP CHARACTERISTIC CUPVE - GPM 118: WRITE (6,231) (I SURGE (I) , IIS (I) , DS ( I) , DC (I) , CS ( I) , I»1,NS'JPGE)
36
C HNSOO’HFAD PER STAGE PROM PUMP CHARACTERISTIC CURVE - FT 119: 5 CONTINUE
37 C TNSO()« BHP PER STAGE FROM PUMP CHARACTERISTIC CURVE 120: C
38 C 121 : C ** COMPUTE STEADY STATE DISCHARGE **
39 C “ AIR CHAMBER DATA ** 122: C
40 C 123: QTRY“QN(4)
41 C CTZERO’INITIAL AIR VOLUME IM SURGE TANK - CU FT 124: COEF=12 .* 1 44 .* 1 4 4 .* 16 .*NPUMPS*NPUMPS/(64.4* 449 .* 449.* PI * PI)
42 C COUT’OISCHiRGE COEFFICIENT FOR FLOW OUT OF AIR CHAMBER 125: DO 320 NZ’1,20
43 C CI*J’ = DISCHARGE COEFFICIENT FOR FLOW INTO AIR CHAMBER 126: DO 300 1 = 1 ,5
44 C ONOZ’DI A.METEP OF AIR CHAMBER NOZZLE - IN 127: IF(OTRY.GT.QN(I). AND.QTPY.LE.ON(I+ 1)) GO TO 31«
45 C EXPON’POLYTROPIO PROCESS EXPONENT 128: 300 CONTINUE
46 C 129: WRITE(6,250)
47 C ** ONE-WAY SURGE TANK DATA ** 130: STOP
4d C 131 : 310 HN = HNSQ( I) + (QTRY-QN (I) ) * (HNSO (I +1) -I’NSO (I) ) / (QN (I + 1)-QN (I) )
49 C ISURGEO’PIPE NUMBER WITH ONE-WAY SURGE TANK AT DOWNSTREAM END 132: SUM’0.
50 C HS()“HEIGHT OF WATER SURFACE IN SURGE TANK ABOVE PIPE - FT 133: DO 301 J’1,NPIPES
51 C DS()’DIAMETER OF TANK - FT 1 34 : 301 SUH=SUM+F(J)*L(J)*QTRY*QTRY/D(J)*‘5
52 C DC()’DIAMETER OF CONNECTION - IN 1 35 : FUNCT=:{SUMP-IIRES + NSTAGE*HN-COEF‘SUM
53 C CS()’DISCHARGE COEFFICIENT FOR SURGE TANK 136: FPRIME’NSTAGE*(HNSQ(I+1)-HNSO(I))/(ON(1+1)-QN(I;)-2.*COEF*SUM/OTRY
54 C
137: QNEXT’QTRY-FUNCT/FPRIME
55 C
138: IF(ABS(QNEXT-OTRY).LT.QACC) GOTO 350
56 DIMENSION X (8 , inf]) ,V(8,100) ,11(8,100) , I] LOW (8,100) , HHIGH (8,100 ) ,
139: OTRY’ONEXT
57 3HEAD (8,100) ,VNEW(fl, 100) , KNEW(8 , 100)
140: 320 CONTINUE
58 DIMENSION L (8) ,D(8) , A(8) ,PIPE3(R) ,F(«) ,VZF.PO(fl) ,NPAH(R) ,
141: WRITE(6,251)
59 SC (8) ,AK(8) ,S INE(8) ,AREA(8) ,DELTT(O) ,RATIO(8)
DIMENSION QW(6),HNSO(6),TNSO(6) 142: STOP
60 143: 350 OLINE=ONEXT*NPUMPS
61 DIMENSION ISURGE ( 5) ,HS ( 5) ,DS(5) ,DC ( 5) ,CS ( 5) ,AS ( 5) ,AC ( 5) ,OS(5)
144: Q’DNEXT
62 LOGICAL FAIL,SHUT,AIR
INTEGER PIPE 145: HPUMP= NSTAGE *HN + !ISUMP
63 146: COEF’4.* 144./<449 .* PI)
64 REAL LA,L
DATA FAIL,SHUT,AlR/3*.FALSE./ 147: DO 2 I’l,NPIPES
65 148: VZERO(I)=OLINE*COEF/D(I) **2
66 C
NAMELIST /SPECS/ NPIPES , IOUT, NPARTS,T’-IAX , HATH,HRPS , ZEND,QACC, 149: AREA (I)’0.25*PI*D(I)*D(I)/144 .
67 150: C (I)=32.2/A (I)
SMSURGE,AIR,SHUT
58 151: DELTT(I)= L(I)/(NPARTS*(VZERO(I)+A(I)))
NAMELIST /PUMPS/ N» UM PS , RPM, WRSO , NSTAGE, PSU’’? , n»|, THSQ, IINSQ
69
NAMELIST /CU AM3/CTZERO,COOT,CIN,ONOZ,EXPON 152: IF (I. EQ. N PI PES) SINE (I) ’ (ZEND-PIPEZ (I) ) / L( I)
70 C 153: IF(I.EO.NPIPES) GO TO 2
71 PI’3.141592 154 : SINE(I) ’(PIPEZ (I + D-P1PEZ (I) )/L( I)
72 NSURGE’0 155: 2 CONTINUE
73 VOLHAX’0. 156: C
74 C 157: C ** COMPUTE MINIMUM DELTA T **
75 C ** READ IN GENERAL SPECIFICATIONS '* 158: C
76 C 159: DELT’DF.LTTd )
77 READ(5,SPECS) 160: KMIN’l
78 READ (5,100) (PIPE,D{I) ,L(I) ,F(I) ,A(I) ,PIPEZ(1) ,I»1,NPIPFS) 161: DO 12 I=2,NPIPES
79 100 FORMAT(110,5F10,0) 162: I F ( DELTT (I ),.GT. DELT) GO TO 12
8^ WRITE(6,2O0) 163: DELT’DELTT(I)
81 164 : KMIN’I
82 165: 12 CONTINUE '

Figure 9-10. Computer program for analyzing the effects of air Figure 9-10. Continued.
chambers and one-way surge tanks.
226 UNSTEADY FLOW IN PIPELINES CONTROL DEVICES AND TECHNIQUES 227

166: DO 13 1=1,NPIPES
249 C
167: IF(I.EQ.KMIN) CO T9 14
252 DO 99 11 = 1 ,INDEX
168: ANPAR=L(I)/(DELT* (VZF.ROf 1) +A {I) ) )
251 T=T+EELT
169: NPAR ( I) =ANPAR
252 C
170: TEST=NPAR(I)
253 C ** COMPUTE H AMO V AT INTERIOR NODES “
171: IF (ARS(TFST+l-ANPAR).LT,.0001) MPAP(I)=NPAR(I)+1
254 C
172: GO TO 13
173: 14 NPAR(I|=NPARTS 255 DO 33 1=1,NPIPES
174 : 13 CONTINUE 256 K-NFAR(I)
175: C 257 DO 30 J - 2,K
176: C CONVERT TO O/N, II/NSD, T/NSQ 258 PA=PATIO(I)*A(I)
259 VMINUS=V(I,J)-RA*(V(I,J)-V(I,J-1))
177: COEF = 60.* 550./(2.*P11
170: DO 1 1=1,6 262 VPLUS’V (I, J) -PA* (V{ I , J)-V(I ,J + 1) )
179: QN{I)=ON(I)/(449.*PPM) 261 HMINUS = H (I ,J)-RA* (11 (I ,J) -H (I, T- I) )
2 62 HPLUS’H ( I , J )-RA* (II ( I , J )-H (I, J + l) )
180 : TN3Q(i)=NSTAGE*COEF*TNSD(I)/PPM**3
263 VNEW(I,I).5*(VMINUS + VPLUS + C(I) *(HMINIJS-PPLUS)+0(I)*DELT*SIME(I)
181 : I !INSQ(I I - UN SO{I)/RDM**2
182: C 264 $* (VM INUS-VP LUS) -AK(I)* (VMlftUS*ARS (VM INUS) + VPLUS * ADS (VP LUS) ) )
183: C 265 HNEW (I, J) = 0.5* ( HMIMUS + HPLUS + (VM I NUS-VP LUS ) /C (I) +DELT*SINE (I) *
184: C * SET UP CONDITIONS FOR STEADY STATE (T=8) ** 2 6 6 $ (VMINUS + VPLUS) -(AK(I)/C (I))* (VM I NUS* A8S (VM I'JUS) -VPLUS*ABS(VPLOS) ) )
165: C 267 30 CONTINUE
186 : U (1,1)»HPU4P 263 C
187: V(1 ,1)=VZERO(1) 269 C ** COMPUTE H AND V AT INTERIOR JUNCTIONS **
18B : DO 20 7=1,NPIPES 270 C
189 : DELL=L'I)/NPAR(I) 271 KK=NPIPES-1
190 : DELUF«1?..*F(I) *DELL*VZERO(I) * * 2/( 64.4 * D (I) ) 272 DO 4 0 I = 1, K K
191: AK: I) = ’2.*F(I)* DELT/(2.*D(I)) 273 K=NPAR(I)+1
192: K=HPAR<I)+1 274 VMINUS = V(1,K)- RAT IO(1)*A(I)*(V(I,K)-V(I,K-1))
193: X(I,1)=0. 275 liMINUS=H (I, K) - RATIO (I) * A (I) * (11 (I, K) -H ( I , K-l) )
194 : HEAD(1,1)= H(1,1)-P I PEZ (I) 276 C3=VVINUS+C (I) * IIHINUS + C ( I) *VMINUS*DE LT*SINE (I) - AK (I) ‘VMINUS*
195: RATIO (I) = DF.LT/DELL 277 SABS(VMINUS)
196: DO 21 .7 = 2, K 278 VPLUS=V(1+1,1)-RATIO(1 + 1)*A(1 + 1)*(V(1+1,1)-V(1 + 1 , 2) )
197: X(I,J)=(J-1)*DELL/L(I) 279 HPLUS=H(1+1 ,1) -RATIO(1+1) *A (1 + 1) * (I! ( 1+1, 1) -H (1 + 1 , 2) )
198: 1) (I, J) =11 (1,1) -DELilF* (J-l) 280 OVPLUS-C ( 1 + 1) *(IPLI'S-C (1 + 1) * DELT* VPLUS*S INK (1 + 1) -AK (1 + 1) * VP LUS*
199: 1IEAD(I,J)=H(I,J) - (PIPEZ (I) +X(I,J) *L(I) ‘SINE (I) ) 281 SABS(VPLUS)
206 : 21 V(I,J)=VZERO(I) 2 8 2 I F (NSURGE.EQ.0) GO TO 44
201 : IF I I.EQ.NPIPES) GO TO 23 233 C
20 2 : H(1+1,1)= H(I,K) 284 C — ONE-WAY SURGE TANKS —
20 3 : V(1+1,1)-VZERO(1+1) 285 C
204 : 23 CONTINUE 2B6 DO 41 J = 1 , NSURGE
20 5 : DO 23 1=1,NPIPES 237 IF (IAAS( ISURGE(J)) .EQ.1) GO TO 45
206: K=NPAR(I)+1 288 41 CONTINUE
207 : DO 23 .7 = 1,K 289 GO TO 44
2P8 : BLOW(I,J)=H(I,J) 290 45 I F (I SURGE(J) ,LT.3) GO TO 46
209 : 23 iill IGH ( I ,J)=H (I , J) 291 ii PP= (-C1 * A°EA (1 +1 ) +C3 * AREA ( I) ) / (C (I+ 1) *AREA (1 +1) +C (I) * AREA (I) )
210 : PHNAX=-100. 292 IF (HPP.LT.(PIPEZ(1 + 1)+HS(J))) GO TO 46
211 : PHMIN=100000. 293 GO TO 44
212: DO 11 1=1,NPIPES 294 46 ISURGE(J)=-IABS(ISURGE(J))
213: K=NPAR(I)+] 295 C5 = 64 .4*CS (J) *CS (J) *AC (J) *AC (J) / (C (I + D ‘AREA ( 1 + 1) +C (I) ‘AREA (I) )
214: DO 11 J=1,K 296 C6 = C5*(Cl *AREA (1 +1)-C3*AREA( I) + (C(I+ 1)*AREA(I +1)+C (I)*AREA(I))*
215: IF(HEAD(I,J) .LT.PBMAX) GOTO 16 297 $(HS(J)+ PIPEZ (1 + 1) ) )
216: IPMAX=I 298 IF(C6.GT.0.) GO TO 47
217: XMAX=X(I,J) 299 QS(J)=0.
21B: PHMAX=HEAD(I,J} 303 ISURGE(J)=IABS( ISURGE(J))
219: TTMAX=? 301 GO TO 44
220: GO TO 17 33'2 47 QS(J)=0.5*C5*(-1,+SQRT(1.+4.*C6/(C5*C5)))
221 : 16 IF (HEAD(I,J) .GT.PHMIN) GO TO 17 303 HNEW(1+1,1) =BS(J)+PIPEZ ( 1 + 1) -OS (J) **2/(64 .4* (CS(J) *AC (J) ) “21
222: IPHIN=I 334 HNEW(I, K)=HNEW(1+1,1)
223: XMIN=X• I ,J) US (J)«HS(J)-QS(J)*DELT/AS(J)
305
224 : PHMIN=HEAD(I,J) GO TO 48
225: TTMIN’T 306
226 : 17 CONTINUE 307 C
227 : 11 CONTINUE 308 44 HNEW(I,K)=(-Cl‘AREA(1+1)+C3*AREA(I))/(C(I+l)*AREA(I+l)+C(I)*
228: C 309 SAREA(I))
229 : C ** WRITE OUT STEADY STATE CONDITIONS ** 310 HNEW(1+1,1)=HNEW(I,K)
2 30 : C 311 40 VNF.Wf I, K)=C3-C(I)*HNEW(I,K)
231 : T = 0.0 312 VNEW (1+1,1)»Cl+C(1 + 1) *IINEW( 1 + 1 ,1)
232 : INDEX=TMAX/DELT+1 313 40 CONTINUE
2 33 : WRITE(6,204) 314 C
234 : WRITE(6,213) DELT 315 C ** COMPUTE H AND V AT DOWNSTREAM END **
235 : WRITE(6,205) T 316 C —TiilS BOUNDARY CONDITION IS FOR A CONSTANT BEAD RESERVOIR —
236 : DO 22 1 = 1 ,NPIPES 317 C
237 : K«N?AR(I)+1 310 NV-NPAR(NPIPES) +1
2 38 : WRITE(6 , 206 ) I, (X(I,J) ,HEAD(I,J) ,H(I,J) ,V(I,J) ,J=1,KY 319 VMINUS=V(NPIPES,NV)-RATIO(NPIPES)*A(NPIPES)*(V(NPIPES,NV)-
239 : 22 CONTINUE 320 $V(NPIPES,NV-1))
240 : HPUHP=H(1,1)-HSUMP 321 HMINUS=H(NPIPES,NV)- RAT IO(NPIPES)*A(NPIPES)*(H(UP IPES,NV)-
241 : WRITE(6,212) RPM,Q,HPUMP 322 $H(NPIPES,NV-I))
242: Q=Q/449. 323 CC=VMINUS+C(NPIPES)*HMINUS+C(NPIPES)*VMINUS*DELT*SINE(NPIPES)-
24 3 : HT = H (1,1) 324 SAK(NPIPES)*VMINUS*ABS(VMINUS)
24 4 : HTZERO=HT 325 KNEW(NPIPES,NV)= HRES
24 5 : C 326 VNEW(NPIPES,NV)*CC-C(NPIPES)‘KNEW(NPIPES,NV)
246 : c- 327 C
247 : C BEGIN TRANSIENT ANALYSIS 328 C ** BOUNDARY CONDITIONS AT THE PUMP **
248 : C- 329 C
330 IF(SHUT) GO TO 42

Figure 9*10. Continued Figure 9-10. Continued.


228 UNSTEADY FLOW IN PIPELINES CONTROL DEVICES AND TECHNIQUES 229

331: QQ-Q/RPM 414: IP(CT.GT.VOLMAX) TVMAX-T


332 : DO 550 1-1,5 415: IF(CT.GT.VOLMAX) VOLMAX-CT
333 : IF (Q<? .GT.QN (I) . AND , LE .QN (1 +1) ) CO TO 551 416: 59 CONTINUE
3 34 : 553 CONTINUE 417: C
335 : WRITE(6,263) 418: C “ LOCATE MAXIMUM AND MINIMUM HEADS AND H-VALUES “
336 : 551 TN2=TNSQ(I)+(OQ-ON(I) )* (TNSQ( 1 +1)-TNSO(I))/(QN(1+1)-ON(I)) 419: C
337 : RP.M-RPM-30 . ‘TN2 * DELT/ ( PI * P INERT) ‘RPM*RPM 420 : DO 61 I=1,NPIPES
3 33 : 4 2 VPLUS-V (l,l)-RATIOd)‘A(1)*(V(1,1)-V(1,2)) 421: K-NPAR(I)+1
339: HPLUS-H(1,1)-RATIO(1) ‘A (1)* (H(1,1)-H(1,2)) 422 : DO 61 3«1,K
HO: Cl-VPLUS-C(1)‘HPL'JS-C(1)*DELT*VPLUS*SIME(1)-AK(1)‘VPLUS*AES(VPLUS) 423 : IF (BNEW(1,3).LT.HLOW(1,3) ) BLOW(I ,3)-HNEW(I,3)
3 41: IF (SHUT) GO TO 43 4 24 : IF (HNEW( 1,3) .GT.HHIGH (1,3) ) IIHIGH (1,3 ) -HNEW (I ,3 )
3 42 : DO 530 NZ-1,20 425: HEAD(I,3)-HNEW(1,3)-(PIPEZ(I)+X(Ir3)‘L(I)‘SlNE(I))
3 43 : HA-HNSO(I) 4 26 : IF (HEAD(1,3) .LT.PHMAX) GO TO 66
3 44 : HB-HNSQ(1+1) 4 27 : IPMAX-I
3 45 : QA’QN(I) 4 28 : XMAX-X(I,3>
3 46: QB-QN(i+i) 429: PHMAX-HEAD(I,3)
3 47 : C5-NSTAGE*RPM*RPM 430 : TTMAX-T
3 48 : C7» (HA-I’B)/(OA-OD) 431: GO TO 67
3 49: C8»HI3-QO*C7 4 32 : 66 I F (HEAD(1,3) .GT.PHMIN) GO TO 67
350 : IF (.NOT. AIR) GO TO 509 4 33 : I PM IN-1
351 : C 434 : XMIN»X(I,3)
352 : C -- AIR CHAMBER WITH PUMPS STILL OPERATING — 435 : PHMIN-HF.AD (I, J)
353: C 436 : TTMIN-T
354 : C5-6 4. 4*COUT‘COUT*ANOZ*ANOZ*RPM*NSTAGE‘C7/ (NPUMPS-RPM* NSTACF.* 4 37': 67 CONTINUE
355: SAREA(1)*C7*C (1)) 438 : IF ( HEAD(1,3) .GT.-HATM) GO TO 62
3 55 : C6-6 4.4 *COUT*COUT*ANOZ‘ANOZ*(-HT+(HSUMP+(RPM*NSTAGE/NPUMPS)* ( 4 39 : WRITE(6,214) T,I,X(I,3)
357 : $C1 * C7 * AREA (1) +RPM*L'PUMPS*C8) )/(1,-RPM‘NSTAGE‘AREA(1) *0(1) *C7/ 440 : FAIL-.TRUE.
358 : 5NPUMPS)) 441: 62 CONTINUE
359 : QC=.5*C5* (1.-SQRT(1.-4 .*C6/(C5*C5))) 442 : 61 CONTINUE
36(5: QPP= (Cl * APF.A (1) +C (1) ‘AREA (1) * (HT-QC*OC/(64.4*COUT*COUT*ANOZ*ANOZ) ) 443 : C
361: 5-OC)/NPUMPS 444 : C “ WRITE OUT H,V,AND HEAD VALUES AND TEST FOR TMAX “
362 : VPP=(QC+NPUMPS*OPP)/AREA(1) 4 45 : C
36 3 : HPP =(VPP-C1)/C (1) 4 46 : 70 IF (PAIL) GO TO 71
3 54 : OPR-QPP/RPM 4 47 : IF (MOD(11,IOUT).NE.fl) GO TO 72
365 : GO TO 511 4 48 : 71 WRITE(6,205) T
366 : C 449 : DO 73 I’d, H PIPES
367 : 5C9 C6=HSUMP+C5*C8+C5*C7*C1‘AREA(1)/(NPUMPS*RPM) 4 50 : K=NPAR(I)+1
369 : C9“C5‘C7‘C(1)‘AREA(1)/(NPUMPS*RPM) 451: WRITE(6,206) I, (X (1,3) ,HEAD(I,3) ,KNEW(I,3) ,VNEW(1,3) ,3 = 1,K)
369 : HPP»C6/(1.-C9) 4 52 : 73 CONTINUE
3 70 : VPP«C1+HPP*C(1) 4 53 : QQQ-449.*Q
371: OPP»VPP*AREA(1)/(NPUMPS‘RPM) 454: IFi.NOT. SHUT) WRITE ( 6,212.) RPM,O0Q,HPUMp
372 : 511 DO 510 3-1,5 4 55 : IFdNOT. AIR) GO TO 76
3 73 : IF(QPP.GT.QN(J).AND.QPP,Lp.QN(3+1)) GO TO 52R 4 56 : WRITE(6,222)
374 : 510 CONTINUE 457 : WRITE(6,223) 0C,HT,CT
3 75 : IF(QPP.GT.0.) WRITE(6,280) 4 58 : 76 IF(NSURGE.EQ.O) GO TO 74
3=1-1 459: WRITE(6,292)
376 :
377 : IF(3.EQ,0) GO TO 43 460 : DO 75 I=1,NSUPGE
GO TO 521 461: IF (ISIJRGE (I) .GT. 0) GO TO 75
378 :
379 : 520 IF(3.EQ.I) GO TO 530 462 : ISUR--ISURGE(I)
380: 521 1=3 463 : WRITE(6,233) ISUR,QS(I) ,HS (I)
381 : 500 CONTINUE 464 : 75 CONTINUE
WRITE(6,27O) 465 : 74 CONTINUE
382 :
STOP 466 : IF(FAJL) CO TO 400
383 :
530 HNEW(1,1)-HPP 467 : 72 CONTINUE
384 :
468 : C
385 : VNEWd,1)=VPP
469 : C “ PREPARE FOR NEXT TIME STEP COMPUTATION •*
386 : 3-QPP‘RPM
470 : C
387 : HPUMP-HNEW(1,1)-HSUMP
471: DO 80 I=1,NPIPES
388 : IF(AIR) GO TO 50
472 : K-NPAR(I)+1
389 : GO TO 59
4 73 : DO 80 3 = 1,K
390 : 43 SHUT-.TRUE.
474 : V (1,3)-VNFW(I,J)
391: 3-0.
475 : 80 H (1,3) -HNEWd ,3)
392 : IF (AIR) GO TO 50
476 : IF (T.GT,TMAX) GO TO 400
39 3 : VNEW(1,1)=0.
4 77 : 99 CONTINUE
394 : KNEW(1,1) = (VNEWd,1)-C1)/C(1) 478 : C
39 5 : GO TO 59 479 : C-
396 : C 480 : C END OF TRANSIENT ANALYSIS
397: C — AIR CHAMBER WITH PUMP CHECK VALVES CLOSED —
481: -
398 : C
50 IF(QC.LT.0.) GO TO 53 48 2 : c-
399 :
51 C5 = 64.4‘COUT‘COUT‘ANOZ‘ANOZ/(Cd) *AREA(1) ) 483 : c
400 :
484 : C “ WRITE OUT MAXIMUM AND MINIMUM HEADS AND H-VALUES “
401: C6=64.4*COUT*COUT*ANOZ*ANOZ*(HT+C1/C(1))
485 : C
4 02 : IF(C6.LT.0.) GO TO 53
486 : 400 CONTINUE
4 03 : QC-0.5*C5*(-1.+SQRT(1.+4.‘C6/(C5‘C5)))
4 37 : WRITE(6,207)
4O4 : 52 VNEW(1,1)-QC/AREA(1) DO 4(’ 1 1-1,NPIPES
488 :
405: HNEW(1,1)=(VNEW(1,1)-Cl)/C(1) WRITE(6,208) I
489 :
406 : GO TO 58 492 : K-NPAR(I)+1
4 07 : 53 C5-64.4*CIN*CIN*AMOZ*ANOZ/(C(1)‘AREA(l)) 491: DO 401 3 = 1,K '
4 08 : 26=64.4‘CIN‘CIN‘ANOZ‘ANOZ*(HT+C1/C(1)) 492 : HF.ADMX-IIHIGH (1,3) - ( PI PEZ (I) +X (1,3 ) * L (I) *SI 'IE (I) )
409 : IF(C6.GT.0.) GO TO 51 4 9 3 : HEADMN- HLOW( 1,3) - (PIPFZ (I) +X (I ,3) * I, (I) *S I NF (I) )
410: 0C=.5‘C5‘(1.-SQRT(1.-4.*C6/(C5‘C5))) 494: 401 WRITE (6,209) X (1,3) , H EADMX , t| EADMN, HH IG'I fl ,3) ,11 LOW (I ,3)
411: GO TO 52 4 95 : WRITE(6,210) PHMAX,IPMAX,XMAX, TTMAX
412: 58 CT=CT+QC*DELT 496: WRITE(6,211) PHMIN,I PM IN,XMIN,TTMIN
413: HT-PIPEZ (1)-HATK+ (HTZERO-PI PF.Z (1)+11 ATM) * (CTZF.RO/CT) * * EX PON

Figure 9-10. Continued. Figure 9-10. Continued.


230 UNSTEADY FLOW IN PIPELINES
CONTROL DEVICES AND TECHNIQUES 231

Note that by using two one-way surge tanks, it is possible to reduce


4 97 : IF (AIR) WRITE(6,22 4 ) VOLMAX,TVMAX the air chamber volume substantially. The attractiveness of this
4 98: IF U1SURGE.EQ.0) GO TO 909
4 99 : WRITE(6,235) alternative is related directly to economics and esthetics. In this case, the
500 : DO 402 1-1,NSURGE
591 : I5UR»A'?S (ISURGE (I) ) use of two one-way surge tanks, 40 ft and 50 ft high, respectively, would
502 : 402 WRITE(6,234) I,IRUR,HS(I)
503 : C undoubtedly be more expensive and have less esthetic appeal than a larger
5(14 : C ******* FQR/.jfiT STATEMENTS *******
505: C air chamber. This alternative was given here mainly to point out the
506 : 200 FORMAT(1 Hl,2PX,14( ' * ’)/21X , ' * INPUT DATA • '/?! x , 1 4 ( ’ - 1 ) /)
507 : 201 FORMATfSX, 'NUMBER OF PIPFS - 1 , 13/5X , ' MINIMUM NO. OF PARTS PIPE IS possibility of this combination. In fact, if there were a summit in the
508 : 5DIVIDED INTO = ’ , I 3/5X, ' RESFRVOI R ELEVATION AT DOWUSTPF.AM END ,
509: SF7.1,’ FT’/5X,’ATMOSPHERIC PRESSURE HEAD =',F5.1,' FT OF WATER' pipeline, it is possible that both an air chamber and a one-way surge tank
510: S/5X,'ELEVATION OF DOWNSTREAM END OF LAST PIPE =‘,F7,1/' FT'//5X,
511: S’:MAXIMUM REAL TIME OF ANALYSIS =*,F7.1,' SEC’//5XOUTPUT IS PRINT would be the only possible means of avoiding column separation.
512: 5ED EVERY*,13,' TH TIME I’JTE P.VAL' //5X, ' ACCUR ACY OF ITERATION FOP ST
513. SEADY STATE DISCHARGE = ' , F5.1 , ' GPM')
514 : 202 FORMAT(//43X,'* PIPE DATA *'/)
5 15: 2'13 FORMAT(5X,'PI PE 1, 12,' D =',F6.2,' IN',* L =',F7.0,' FT’, DATA FOR AIR CHAMBER ONLY
516: 5* F =’ ,F6.4, ' WAVE SPR ,F6.0,‘ FPS',’ UPSTR PIPE ELEV
517: S =',F7.1, ' FT'.' L/A ,F6.3, ' SEC')
518: 204 FORMAT (1 If 1/' PRESSURE HEADS, H-V.ALUF^ AND VELOCITIES AS FUNCTIONS $ SPECS NPIPES»3,IOUT»20,NPARTS*3,TMAX»50.,HATH’32.,HRES«840.,ZEND«^10.,QACC*.5,
519: S OF TIME'/2X,60 ('-')) AIR«T,
520 : 235 FORMAT(//l8X,3 ( 5X,* X HEAD-FT I'-FT V-FPS')/' TIHF =',F7.3 SEND
521 : S' SEC* ,3 (5X, * -------------------- - ------------------- --------------- • ) )
1 30. 2000 . .0128 3590. 415
5 22 : 2R6 FORMAT(/I2X, 'PI PE',12, 3(5X,F5.3,2F7.0,F8.2) /(13X,3(5X,F5.3. 2F7.0
S,F8.2))) 2 38. 15840. .0128 3590 . 415
523 :
524 : 3 30. 10560. .019 3486. 700
525 : $ PUMPS NPUMPS“4,RPM=1760.,WRSQ*475.,NSTAGE-5,HSUMP=395,,
526 : QN»0.,1000.,2000,,3000.,4000,,5000.,
527 : 237 "ORMAT (1II1/18X, 2 7 ( ' * ' )/18X , ' * TABLE OF EXTREME VALUES •'/18X,?7('* HNSQ»136.,128.,117.,96.,63.,24.,
5 28 : 5’) / / 13X X MAX HEAD HEAD MAX >1 MIN 11 ’ /11 X , 5 ( ' - ' ) , 2 X , 8 ( TNSQ-55.,61.,75.,87.,93.,95.,
5 29 : $’-'),2X,8('-'),2X,6('-'),2X,6(’-')) SEND
5 33 : 238 FORMAT(2XPIPF*,12) SCHAMB CTZERO®320.,COUT=0.90,CIN«0.50,DNOZ»12.,EXPON=1.2 SEND
531: .20 9 FORMAT (1 1 X , F5 . 3,2X , F7.0 , 3 X , F7 . D , 3x , F6.0,2X, F6,0)
53 2 : 210 FORMATf//’ MAXIMUM HEAD «’,F6.1,' FT IN PIP"',13 ' AT X =' F5 3
5 33 : $! AT TIME =',F7.2 , ' SEC’) '
5 34 : 211 FORMATi/' MINIMUM HEAD =’,F6.1, ' FT IN PIPE’,13,’ AT X - * F5 3 DATA FOR AIR CHAMBER AND ONE-WAY SURGE TANKS
S’ AT TIME =1 , F7.2, ' SEC') ’ *' '
535:
212 r OPMAT (/1 5X PUMP SPEED *',F7.1,’ PPM ' , 10 X , ‘ PL'MP DISC‘IARGc* = ' , F7 .1
5 36 : 5,* GPM EACH ' ,IPX, ’ PUMP HEAD ’' ,F6.1 , ' FT ' )
537: 213 FORMAT(/IX,'DELTA T »',F6.3,* SEC*) $ SPECS NPIPES»4,IOUTa20,NPARTS®3,TMAX = 50•,HATM*32 *,HRESa840.,ZEND»810.,QACC®»5,
538 : 214 FORMAT (////2X, 'COLUMN SEPARATION HAS OCCURRED AT’.Ffj.Z,’ S?C IN PI AIR=T,
5 39 : SPE',13' A LOCATION',F5.3)
540 : 215 FORMAT(///15X,’* PUMP DATA •’/) NSURGEa2,
541: 216 FORMAT(5XNUMBER OF PUMPS IN PARALLEL a ' ,I3/5X,1 EACH PUMP HAS',12 SEND
5 42 : STAGES'/5X,’STEADY STATE PUMP SPEED a',F7.1,' RPM'/5X,'EACH PUM 1 30. 2000. .0128 3590. 415
54 3 : $P AND MOTOR UNIT HAS A MOMENT OF INERTIA OF',F6.1,' LO-FT SO’// 2 30. 15840. .0128 3590. 415
544: S5XELEVATION OF PUMP SUMP =’,F7.1,' FT') 3 30. 5280. .019 3486, 700
54 5 : 21 7 ^FORMAT (/8.X,'Q-GPM H/STAGF-FT BHP/STAGE'/8X,5('-*),2X,10('-'),2X, 4 30. 5280. .019 3486 » 755
546 : SPUMPS NPUMPS=4,RPMa1760,,WRSQ®475.,NSTAGE®5,HSUMPa395.,
5 47 : 218 FORMAT(6X,F7.1,2X,F8.1,4X,F8.2)
QN=0., 1000 ., 2000. . , 3000 ., 4000 . ,5000 , ,
548 : 220 FORMAT(///10X,'** AIP CHAMBER DATA **'/) HNSQ«136.,128.,117.,96.,63.,24.,
5 4 9 : 221 FORMAT(5X,'INITIAL AIR CHAMBER VOLUME -',F6.1,' CU FT'/ TNSQ=55., 61 ., 75. , ,87 .,93.,95.,
5 50 : S5X, ' DISCHARGE COEFFICIENT FOR OUTFLOW =',F5.2/ $END
55 1: SSXDISCHARGE COEFFICIENT FOR INFLOW =',E5.2/ SCHAMB CTZERO=100. ,COUT=0.90,CIN=0.50,DNOZ«12.,EXPON»1.2
552: $5X,'CHAMBER NOZZLE DIAMETER =',E6.2,' IM'/ 2 40 . 6. 12. 0.90
553: S5X,’POLYTROPIC EXPONENT «’,F5,2) 3 50. 6. 12. 0.90
5 54 : 222 FCRMAT(/lflX,'* AIR CHAMBER*')
555: 223 FORMAT(2X,'CHAM3ER DISCHARGE =',F7.2,‘ CFS CHAMBER H-VALUE »'
556 : SF7.1,' FT AIR VOLUME -',F6.1,' CU FT’) '
557 : 224 FORMAT{//1X,'MAXIMUM AIR VOLUME = ' , F6.1 , ' CU FT "T TIMr =' F7 1
558: S' SEC') ' ’’
1
559 : 225 FORMAT(/5X, PUMPS HAVE BEEN TAKEN OFF LINE AT T - 3,')
560: 233 FORMAT(1H1,1QX,1 * * ONE-WAY SURGE TANK DATA •*'/)
231 FORMAT(IX,1 DOWNSTREAM END OF LINE',13,' HS = ' ,F5.1, ' FT TANK D
Surge Anticipation Valve
561: SIAM =' ,F5.1, ' FT CONNECT DIAN =' ,F6.2, ' IN DISCHARGE COEFF =',
5 62 : SF5.2)
563 :
564 :
232 FCRMAT(/10X,'* ONE-WAY SURGE TANKS •')
233 FOR.MAT(2X,'DOWNSTREAM END OF PI PF ' , 13 , 5 X , ' QS =',F6.2 ' CFS' 5X
In some cases, an air chamber is not necessary to prevent the high
5 65 :
566 :
S'WATER SURFACE HEIGHT =',^5.1,' FT')
234 FORMAT(IX,'SURGE TANK',13,’ AT DOWNSTREAM END
'
OR
' '
PIPF',13,
pressure caused by vapor cavity closure resulting from column separation
567 :
568:
S* REACHED A MINIMUM SURFACE HEIGHT OF',F5,1 * Fl")
235 FOPMATf//)
after pump power failure. The substitute device does not prevent column
250 FOFMAT (/////IflX,'YOU HAVE EXCEEDED MAXIMUM DISCHARGE VALUE INPUT
569 :
5 70 :
SEX.-CUTION IS TERMINATED.') separation, it only minimizes the impact of vapor cavity collapse. It is
251 FORMAT(/////10X,'ITERATION TO COMPUTE STEADY STATE DISCUARGF WAS M
571 :
5 72 :
SUSUCCESSFUL AFTER 20 TRIES')
260 FORMAT(/////I0XYOU HAVE EXCEEDED MAXIMUM RHP VALUE INPUT. EXFCUT
most effective on pumping systems which are directed mostly uphill and
573: SIOH IS TERMINATED.’)
270 FORMAT (/////10X, 'THE SEARCH FOR A VALUE OF Q 'IAS CYCLED 20 TIMES VI
have no major summits in the pipeline. Also, because the pipeline
574 :
575: SITHOUT SUCCESS. EXECUTION IS TERMINATED.')
283 FORMAT(/////lPX,'THE SEARCH FOR O/N HAS GONE BEYOND THE LIMITS OF
pressure drops below atmospheric for some time period over virtually its
576 :
SQ-DATA. EXECUTION IS TERMINATED.’)
577 : 999 CONTINUE entire length, air-vacuum valves will open and pull air into the pipeline.
5 78 :
579: END
Pressures in the pipeline will drop to almost vacuum level so if the pipeline
Figure 9-10. Continued. being designed can withstand this type of behavior, then the substitute
device can be used.
232 UNSTEADY FLOW IN PIPELINES

The device, called a surge anticipation valve, is a specially operated


surge relief valve and it is placed at the same location as the air chamber
would be. It is set so that after pump power failure, when the pressure at
the discharge side of the pumps drops below a certain level, the surge
anticipation valve opens. As a consequence, the pressure in the
downstream portion of the pipeline quickly reaches the vapor pressure and
the remainder of the line is under column separation conditions. The
liquid in the line now decelerates under the action of gravity and pipe
friction until it, more or less as a unit, comes to rest and reverses direction
under the force of gravity. Because the surge valve at the pump is already
open, the reverse flow passes from the pipeline with relatively small
resistance, depending on the size of the surge anticipation valve and the References Cited
pressure differential required to pass the reverse flow. The valve then
slowly closes to bring the pipeline flow to rest. However, because a
pressure must build up at the surge valve to pass the flow, this pressure 1. Streeter, V., and E. B. Wylie. 1967. Hydraulic Transients. McGraw-Hill
will propagate down the pipeline and cause some cavity closure pressure to Book Co. (Now sold by University Microfilms, Ann Arbor, Michigan.)
develop. The pressures caused are presumed to be small. Because of the
Wood, F. M. 1970. History of Water Hammer. Research Report No. 65,

b
complexity of the column separation phenomena, computer modeling is

3
Department of Civil Engineering, Queens University, Kingston, Ontario.
not reliable at this time and experience with these devices is necessary to
select the proper size valve and adjust it. 3. Rouse, H., and S. Ince. 1963. History of Hydraulics. Dover Publications,
New York.
Closure
4. Rich, G. 1951. Hydraulic Transients. McGraw-Hill Book Co.
There are a great many techniques and devices available which can be
economically employed to prevent serious problems from occurring as a Bergeron, L. 1961. Waterhammer in Hydraulics and Wave Surges in

CJI
result of unsteady flow. It is incumbent upon the engineer, however, to Electricity, (translated under the sponsorship of the ASME), John Wiley
make the appropriate analysis and, in cooperation with the equipment & Sons, Inc., New York.
sales engineer, select the proper control system. Indiscriminate 6. Parmakian, J. 1963. Water-Hammer Analysis. Dover Publications, Inc.,
installation of the various control devices currently available from vendors New York.
can be a very costly approach to design which does not necessarily improve
the safety of the pipeline system. Moreover, this practice is not 7. Jaeger, C. 1977. Fluid Transients in Hydroelectric Engineering Practice.
engineering in the true sense of the profession. A thorough analysis by a Blackie & Sons, Ltd., Glasgow and London.
knowledgeable engineer, well-versed in transient analysis techniques, is a
desirable and economical design procedure in any pipeline system. 8. Tullis, J. P. 1970. Control of Flow in Closed Conduits. Proc, of the
Institute held at Colorado State University, Colorado State University
Press, Fort Collins.
Wylie, E. B., and V. L. Streeter. 1978. Fluid Transients. McGraw-Hill

10. Martin, C. S. In preparation. Fluid Transients in Conduits. John Wiley &


Sons, New York.
11. Timoshenko, S. 1955. Strength of Materials, Part I. D. Van Nostrand
Co., Inc., New York.
12. Halliwell, A. R. 1963. Velocity of Waterhammer Wave in an Elastic
Pipe,
J. Hydraulics Div., ASCE 3$:HY4:1-21.
OQQ
234 UNSTEADY FLOW IN PIPELINES

13. Tullis, J. P., V. L. Streeter and E. B. Wylie. 1976. Waterhammer


Analysis with Air Release. Second International Conference on Pressure
Surges. City University, London.
14. Streeter, V. L., and C. Lai. 1962. Waterhammer Analysis Including Fluid
Friction, J. Hydraulics Div., ASCE 88:HY3:79-112.
15. Kaplan, M., V. L. Streeter, and E. B. Wylie. 1967. Computation of Oil
Pipeline Transients, J. Pipeline Div., ASCE 93'.PL3:59-72.
Appendix I
16. Watters, G. Z., R. W. Jeppson, and G. H. Flammer. 1976. Water
Hammer in PVC and Reinforced Plastic Pipe. J. Hydraulics Div., ASCE,
102:7:831-843.
17. Wood, D., and S. E. Jones. 1963. Water-Hammer Charts For Various
Types of Valves. J. Hydraulics Div., ASCE P9:HY1:167-178.
18. Vennard, J. K. 1961. Elementary Fluid Mechanics. 4th Ed. John Wiley &
Sons, Inc., New York.
19. Jeppson, R. W. 1976. Analysis of Flow in Pipe Networks. Ann Arbor
Science, Ann Arbor, Michigan.
20. Daugherty, R. L., and J. B. Franzini. 1965. Fluid Mechanics with
Engineering Applications. 6th Edition, McGraw-Hill Book Co., New
York.
21. Karassik, I. J., W. C. Krutzsch, W. H. Fraser, and J. P. Messina. 1976.
Pump Handbook. McGraw-Hill Book Co., New York.
22. Miyashiro, H. 1967. Waterhammer Analysis of Pump Discharge Line
with Several One-Way Tanks. ASME. Jour, of Engineering for Power.
23. Kolp, D. A. 1968. Water Hammer Generated by Air Release. M.S.
Thesis, Colorado State University, Fort Collins.
24. Andrews, J. S. 1970. Water Hammer Generated During Pipe Filling.
M.S. Thesis, Colorado State University, Fort Collins.
25. Diaz, J. E. 1972. Water Hammer Produced by Release of Air From
Water Pipes. M.S. Thesis, Colorado'State University, Fort Collins.
26. Evans, W. E., and C. C. Crawford. 1953. Charts for Designing Air
Chambers for Pump Discharge Lines. Trans. Hydr. Div., ASCE V79.

235
236 UNSTEADY FLOW IN PIPELINES APPENDIX I 237

C PROGRAM NO. 12 85: IF(R.GT.2100) GO TO 5


C WATER HAMMER IN SERIES PIPE WITH INTERNAL STEADY FLOW CALCULATION 86: F (I)=64./R
C (PROGRAM DIMENSIONED FOR UP TO 8 SERIES PIPES) 87: GO TO -3
cf ...................................................................................................................................................................... 8 8: 5 CONTINUE
C 8 9: ELOG«4.06R7
c — RESERVOIR AT BOTH UPSTREAM AND DOWNSTREAM END — 90: F (I) =1./ (1.14-2. *ALOC1O (F.n) ) “ 2
c — GATE VALVE AT DOWNSTREAM END WITH TWO-STAGE CLOSURE CAPABILITY 91: TEST=QZERO*S0RT(F(I)/0.)*E(I)/(MU*A REA(I))
c 9 2: IF(TEST.CT.100.) GO TO 8
c PIPES ARE NUMBERED CONSECUTIVELY BEGINNING WITH PIPE 1 AT UPSTREAM END 9 3: Fl =F (I)
c —PIPE DATA ARE STACKED IN SEQUENCE BEGINNING WITH PIPE 1 — 9 4; DO 9 J=l,20
c L{> • PIPE LENGTH-FT DPIPE DIAM-IN E() ■ PIPE ROUGHNESS-IN 95: SO=SQRT(F1)
c AO ■ WAVE SPEED-FPS () b 96: FUNCT-0.80 + 1 ./SO-2 . *ALOG1P ( R*SC)
ELEVATION AT UPSTREAM END-PT
c PIPEZO • PIPE 97: fPRIME:= (-S.5P/SO) * ( (1 ,/rl) +0.8 6 36/9?)
HDOWN HZERO ■ UPSTREAM RESERVOIR ELEV-FT
c HATH » ATMOSPHERIC DOWNSTREAM RESERVOIR
PRESSURE HEAD-FT ELEV-FT 98: FZ-Fl-FUNCT/FPRIME
c ZEND ELEV OF DOWNSTREAM END OF LAST PIPE-FT 99 : IF(ARS(F2-Fl).LT..00005) GO TO 7
c TMAX MAXIMUM REAL TIME OF SIMULATION-SEC Id): F1 = F2
c WHICH STAGE 1 OF VALVE CLOSURE SCHEME IS COMPLETED-SEC 101: 9 CONTINUE
c TCI • TIME A'
TIME AT WHICH VALVE IS COMPLETELY CLOSED-SEC 10 2: WRITC(6,212)
c TC2 10 3: STOP
IS OPEN AT END OF STAGE 1
c PCI « PERCENT VALVE 104: 7 F(I)=F2
TEMP » WATER TEMPERATURE IN DEGREES F
c NPARTS = NUMBER OF PARTS INTO WHICH PIPE IS DIVIDED 105: 8 CONTINUE
c IOUT * INDEX WHICH GIVES AN OUTPUT EVERY IOUT-TH TIME STEP 106: C
c NPIPES « NUMBER OF SERIES PIPES 107: C ** SOLVE FOR QZEPO **
c 108 : c
DIMENSION X(8,30),V(8,3fl),H(8,3fl),HLOW(8,30),KHIGH(8,30), 109 : SUM=0.
$HEAD(8,30),VNEW(8,3fl),HNEW(8,30) 110: DO 10 1=1,NPIPES
DIMENSION L(8),D(8),E(8),A(8),PIPEZ(8),F(8),VZERO(8),NPAR(8), 1 111: 10 SUM=SUM+12.*E (I) *L(I)/(O(I) *AREA (I) “2)
!
$C (8) ,AK(8) ,SINE(8) ,AREA(8) ,DELTT(8) ,RATIO(8) 112: DENOM-SUM+1.0/(KI(11)*APEA(I)**2)
DIMENSION TEMPER(19) ,ANU(19) 113: QTF,ST= SORT (64.4 * (BZERO-HDOWN) /DENOM)
DIMENSION KI (11) ,PCT(11) . 114: IF(ADS(OTEST-OZERO).LT.0.01) GOTO 87
REAL L,NU,LA,KI,KLI 115: OZERO=QTEST
LOGICAL FAIL 116: 88 CONTINUE
DATA (TEMPER(I),1=1,19)/32., 40.,55.,60.,70.,80.,90.,100.,110., 117; WRITE(6,213)
Si 20.,130.,140.,150.,160.,170.,180.,190.,200.,212./ 118: STOP
DATA (ANU(I),1 = 1,19)/1.931,1,664,1.410,1.217,1.059,.930,.826, 119: 87 QZERO’OTEST* <*49 .
S. 739 ,.667 ,.609 ,.558 ,.514 ,,476 ,.442 ,.413,. 385 ,.362 ,. 341 ,. 319/ 120 : DO 11 1=1,NPIPES
DATA (KI(I),1=1,ll)/0.,.0167,,R3l3,.0556,.100,.1787,.3333,.625, 121: •VZERO (I) =QZEPO/ ( 44 9 . ‘AREA (I) )
$1.25,2.50,5.27/ 122: 11 DELTT(I)=L(1)/(NPARTS*(VZERO(I)+A(I)))
DATA (PCT(I),I’l,ll)/0.,10.,20.,39.,40.,50.,60.,70.,80.,90.,100./ 123: c
NAMELIST /SPECS/ IOUT,NPARTS,HDOWN,HZERO,NPIPES,TMAX,TCI,TC2,PCI,
$TEMP,ZEND,HATM 125: c EI-JD OF STEADY STATE DISCHARGE SOLUTION
C
READ(5,SPECS) 127: c
READ(5,100/ (D(I) , L(I) ,E(I) ,A(I) ,PIPFZ(I) ,1 = 1,NPIPES) 128: c
C | 129: c ** COMPUTE MINIMUM DELTA T **
PI=3.141593 ; 130: c
T=0 . 131: DELT=DELTT(1)
FAIL-.FALSE. 13 2: KMIN=1
DO 1 1=1,NPIPES 133 : DO 12 1 = 2,NPIPES
AREA(I)=.25*PI*D(I)*D(I)/144. ’ 134: IF(DELTT(I).GT.DELT) GOTO 12
C (I)=32.2/A(I) ' 135: DELT=DELTT(I)
IF(I.NE.NPIPES) SINE(I)=(PlPEZ(1+1)-PIPEZ(I))/L(I) 136: KMIN-I
IF(I.EQ.NPIPES) SINE (I)~(ZEND-PIPEZ(I) )/L(I) 137: 12 CONTINUE
1 CONTINUE 138: DO 13 1=1,NPIPES
C 139: IF(I.EQ.KMIN) GO TO 14
c COMPUTE THE KINEMATIC VISCOSITY 140: ANPAR=L(I)/ (DELT* (VZERO(I)+Ad) ) )
c ' 141: NPAP. (I) =ANPAR
DO 4 1=2,19 142: TEST-NPARd)
IF(TEMPER(1-1) ,LE.TEMP.AND.TEMPER(I) .GT.TEMP) GO/TO 3 143: IF (ABS(TEST+l-ANPAR).LT..0001) NPAR(I)-NPAR(I)+1
GO TO 4 14 4: GO TO 13
3 NU=ANU(I-l) + (TEMP-TEMPER(I-l) )* (ANU( I)-ANU(I-l) )/(TEMPER(I)- 145: 14 NPAF(I)“NPARTS
STEMPER(I-l)) 14 6: 13 CONTINUE
NU=.O0201*NU 147: INDEX-TMAX/DELT + 1
GO TO 2 yr 148: c
4 CONTINUE , 149: c ** WRITE OUT INPUT DATA **
2 CONTINUE r 150: c ** WRITE OUT INPUT DATA **
c 151 : WRITE(6,20fl)
C p! 152- WRITE(6,201) IOUT,NPARTS,NPIPCS,QZERO,HDOWN,HZERO,ZEND,HATH,TEMP,
c SOLVE FOR STEADY STATE DISCHARGE IN SERIES PIPE 153: SNU,TMAX,DELT,TCI,PCI,TC2
c- ...................................................................................................................... 154: WRITE(6,202)
c • 15 5: DO 15 1=1,NPIPES
SUM=0. !: 156: LA=L(I)/A(I)
DO 6 1=1,NPIPES 157: 15 WRITE(6,203) 1,0(1),L(I),B(I),A(I),PIPEZ(I),F(I),VZERO(I),
6 SUM-SUM+12.*.02*L(I)/{D(I) *AREA(I) “2) 158: SDELTT(I),NPAR(I),SINE(I),LA
DENOM=SUM+1 .0/ (KI ( 1 U * AREA (UP I PF.S) “ 2) 159: c
QZERO=SQRTl64.4* ( H Z ERO-HDOWN) /DEIJOM) 160: c ** SET UP CONDITIONS FOR STEADY STATE (T-0) **
DO 88 11=1,20 161: c
C I 162: H(1,1)=HZERO
C SOLVE POP DARCY-WEISBACH F-VAL’JE 163: V(1,1)-VZERO(1)
c 164 : DO 20 1=1,NPIPES
DO 3 1=1,NPIPES 165: DELL«L(I)/NPAR(I)
R=QZERO*D(I)/(12.*NU*AREA( I) ) 166: DELHF=12.*F(I)* DELL*VZERO(I)**2/(64.4*D(I))
ED = E(I)/D(I) Y 167: AK(I)=12•*F(I)* DELT/(2«*D(I))
L 168: K=NPAR(I)+1
238 UNSTEADY FLOW IN PIPELINES APPENDIX I 239

253 :
169 : X(I,l)-0,
254 : NV’NPAR(NPIPES)+1
170: HEAD(I,1)=H(I,1)-PIPEZ(I)
2 55: VMINUS’V (HP IPES,NV) -RATIO{NPIPES) * A(NPIPES) * (V (NPI PES , MV) -
171: RATIO{I)’DELT/DELL
172: DO 21 J»2,K 256 : $V(NPIPFS,NV-1))
173 : *DELL/L(I) 2 57: HMINUS=H(H?IPES,NV) -RATIO (N PI PES) * A (NP IPES) *(H(N?IPF.S,NV)-
H (I,J)aH (1,1)-DELHF*(J-l) 258 : 5H(HPIPES,NV-1))
174 :
175: HEAD(I,J)«H(I,J)-(PIPEZ(I)+X(I,J)*L(I)*SINE(I)) 255 :
CC=VMINUS+C(NPIPES)*HM INUS + C(NDI°FS)*VMI HUS* DELT*SINE(NPIPES)-
21 V(I,J)“VZERO (I) 2 6 0 :
176: SAK (NPIPES) *VMINUS*ABS (V.MIN'.’S)
177: IF(I.EQ.NPIPES) GO TO 20 261 :
IF (T.GE.TC2) GO TO 5*1
178: H(I+1,1)«H(I,K) 262 :
IF(T.GT.TCI) GO TO 49
179: V (1+1,1)’VZERO(1 + 1) 263 :
OPEM’l00,-(100.- PC 1)*T/TC1
180 : 20 CONTINUE 264 :
265 : GO TO 48
181: DO 23 1=1,NPIPES 49 OPEN = PC 1 * (TC2.-T) / (TC2-TC1 )
182: 266 :
K«NPAR(I)+1 48 DO 45 1=1,11
267:
183: DO 23 J = 1,K ITEST=(OPEN-PCT(I))*.1P
268 :
184 ; HLOW(I,J)«H(I,J) IF (ITEST.EQ.fl) GO TO 46
269:
185 : 23 HHIGH(I,J|»H(I,J) 45 CONTINUE
270:
186: PHMAX —103. 271 : 46 FACT=(OPEN-PCT(I))*.10
187; PHMIN’100300. KLI=KI(I)+FACT*(KI(I+1)-KI(I))
C 272 :
188: CCC=64.4*iHDOWN-CC/C(NPIPES))
C ** WRITE OUT STEADY STATE CONDITIONS “ 273 :
189; CB = 64 . 4/C(NPIPES)
C 274:
190 : IF(CCC.GT.0,) GO TO 43
WRITE(n,2B4) 275 :
191:
276: VNEW(MP IPES,NV)=0.5*KLI*CB*(-1.0+SQRT(1.0-4.*CCC/(KLI*CB*CH)) )
192: WRITE(6,2fl5) T
DO 22 I’l.-NPIPES 277: GO TO 51
193:
194 : K’NPAR(I)-1 278 : 4 3 VNEW(NPIPES,NV)=0.5*KLI*CB*{ 1.0-SQRT(1.0+4.*CCC/(KLI*CB*CB) ) )
195 : WRITE(6,2«6) I,(X(I,J),HEAD(I,J),H(I,J), V(I,J),J=1,K) 279: GO TO 51
196: 22 CONTINUE 280: 50 VNEW(NPIPES,MV)=0.
197: C 281 : 51 HNEW(NPIPES,NV) =(CC-VNEW(NPIPES,NV))/C(NPIPES)
198 : 282: C
199: C BEGIN TRANSIENT ANALYSIS 283 : C ** LOCATE MAXIMUM AND MINIMUM HEADS AND H-VALUES **
200 : C 28 4 : C
201 : c---------------------------------------------------------------------------------------------------------------------------------------------------------- 285 : DO 61 1=1,NPIPES
202: DO 99 11=1,INDEX 286 : K=NPAR(I)+1
203: T=T+DELT 287 : DO 61 J=1,K
204 : C 288 : I F(HNEW(I,J) .LT.H LOW(I , J) ) H LOW(I,J)= HNEW(I,J)
205 : C ** COMPUTE H AND V AT INTERIOR MODES ** 289 : IF(HNEW(I,J) .GT. UH IC,II (I,J) ) IHIIGU (I, J) =HNEH ( I , .7 )
206 : C 290: HEAD(I,J)=HNEW(I,J)-(PIPEZ(I)+X(I,J) *L(I) *S INE(I) )
207; DO 30 1=1,NPIPES 291: IF<BEAD(I,J).LT.PHMAX) GO TO 66
208 : K=NPAR(I) 292 : IPMAX=I
209 : DO 30 J=2,K 293 : XMAX=X(I, J)
210 : RA’RATIO(I)*A(I) 29 4 PHMAX’HEAD(I,J)
211: VMINUS’V(I,3)-PA*(V(I,J)-V(I,J-l)) :
TTHAX=T
212: VPLUS’V(I,J)-RA*(V(I,J)-V(I,J+1)) 295:
GO TO 67
296 :
213 : IIMINUS’H (I, J) - RA* (H (I ,J) - H (I, J-l) ) 66 IF(HEAD(I,J).GT.PHMIN) GO TO 67
214 : HPLUS’H (I, J) -RA* (II (I , J)-H(I, J+l) ) 297 :
IPMIN=I
215 : VNEK(I,J)=0.5*(VMINUS+VPLUS+C(I)*(HMINUq-HPLUS)+C(I)*DELT*SI NR(I) 298 :
XMIN=X(I,J)
216: 5* (VMINUS-VPLUS)-AK (I) * (VM INU.S * AF?S (VM INUS) +VPLUS* ABS (VP LUS ) ) ) 299:
PHM I N = HEAD(I,J)
217: HNEW (I, J) =2.5* (HM INUS + ll PLUS+( VM INUS-VPLU 5)/C ( I) +DELT*S I NE (I) * 300:
301: TTMIN=T
218: $ (V.MINUS + VPLUS) - ( AK ( I)/C (I) ) * (VMINUS * ABS (VM INUS) - VPLUS * A!*S (VP LUS) ) ) 67 CONTINUE
30 CONTINUE 302 :
219: I F(HEAD(I,J) •GT,-HATH) GO TO 62
C 30 3 :
220 : WRITE(6 ,214) T,I,X(I,J)
C ** COMPUTE H AND V AT INTERIOR JUNCTIONS ** 30 4 :
221: FAIL’.TRUE.
C 305 :
222: 62 CONTINUE
KK=NPIPES-1 306 :
22 3 : 61 CONTINUE
DO 40 1=1,<K 307 :
2 24 : C
K=NPAR(I)+1 308 :
2 25 : C ** WRITE OUT H,V,AND HEAD VALUES AND TEST FOR TMAX **
309:
226: VMINUS’V(I, X)-RATIO(I)* A(I)*(V(I,K)-V(I,X-1))
310 : C
227: ll-MINUS = H (I , K ) -RATIO (I) * A (I) * ( H (I, K) -H ( I, K-1) )
311 : 70 IF(FAIL) GO TO 71
229 : CCC’VMINUS+C(I)*HMINUS+C(I)*VMINUS* DE LT*SINE(I)-AK(I)*VMINUS*
312 : I F (MOD(11,IOUT) ,NE . 0) CO TO 72
2 29: SA3S(VMINUS
313 : 71 WRITE(6,205) T
230: VPLUS’V(I+_,1)-PATIO(I+1)*A(I+1)*(V(I+1,1)-V(1+1,2))
HPLUS’H(I+_,1)-RATIO(I+1)*A(I+1)*(H(I+1,1)-H(1+1,2)) 314 : DO 73 1=1,NPIPES
231:
CC = VPLUS-C : I + 1)*HPLUS-C(1 + 1)*DELT*VPLUS*SIME(I + 1)-AK(1+1>*VPLUS* 315 : K=NPAR(I)+1
2 32 :
233 : SABS(VPLUS) 316 : WRITE (6,20 6) I, (X(I,J) , HEAD (I, J) ,HNEW(J,K) ,VNEW(J,K),J’l,K)
2 34 : HNEN(I,K) = ’-CC*AREA (1+1)+CCC*A REA (I) )/(C <I+L)* ARFA(1+1)+C(I)* 317: 73 CONTINUE
235: SAREA(I)) 318: IF(FAIL) GO TO 400
2 36: HNEW(1 + 1,1J =HNEW(I,K) 319: 72 CONTINUE
2 37: VNEW(I,K) =CCC-C(I) *IINEW(I,K) 3 20 : C
VNEW(1+1,1)=CC+C(1+1) *'!NEW( 1+1,1) 321: C ** PREPARE FOR NEXT TIME STEP COMPUTATION **
2 3 8 :
40 CONTINUE 322: C
239:
C 323 : DO 80 1=1,NPIPES
240 :
C ** COMPUTE H AND V AT UPSTREAM END ** 324 : K=NPAR(I)+1
241: C —THIS BOUNDARY CONDITION IS FOR A CONSTANT HEAD RFSFRVO'R _______________ 325 : DO 80 J=1 ,K
2 4 2 : C
2 4 3 : 326 : V ( I, J)’VNEW(I,J)
KNEW (1 , =HZERO 327 :
24 4 : VPLUS’V'1,J)-RATIO(1)*A(1)*(V(1,1)-V(l,2) > 80 H(I,J)=HNEW(I,J)
328: IP(T.GT.TMAX) GO TO 400
2 4 5 : HPLUS’H [1 , ] )-RATIO (1) *A (1) * (11 (1 , 1 )-H(l , 2) ) 329 : 99 CONTINUE
2 4 6 : VNEW(1,1)=V’LUS+C(1)*(HNEW(1,1)-HPLUS)-C(l)*DELT*VPLUS*S~NE(ll 330: C
2 4 7 : S-AK(l)*VPLLS*APS(VPLUS) 331:
2 4 8 : C C -----------------------------------------------------------------------------------------------------------------------------------------------
332:
2 49 : C ** COMPUTE H AND V AT DOWNSTREAM END ** C END OF TRANSIENT ANALYSIS
250 : 3 3 3 :
C ----------- ---- --------------------------------------------------------------------------------------------------------------------- --------
251: C —THIS BOUNDARY CONDITION IS FOR A GATE VALVE CLOSING AT TWO 33 4 :
c
252 : C SEPARATE FATES AND FLOWING INTO A RESERVOIR— 335 :
c
336:
C ** WRITE OUT MAXIMUM AND MINIMUM HEADS AND H-VALUES **
C
240 UNSTEADY FLOW IN PIPELINES

337 : 400 CONTINUE


338: WRTTE(6,207)
339 : DO 401 I»1,NPIPES
340 : WRITE(6,208) I
341: K«NPAR(I)+1
342: DO 401 J = 1,K
343: HEADMX=HHIGH(I ,J)-(PIPEZ(I)+X{I,J)*L(I)*SINE(I) )
344: HEADMN* HLOW (I,J)-(PIPEZ(I)+X(I,J)*L(I)*SINE(I))
345: 401 WRITE (6,209) X (I , J ) , HEADMX , HEADMN, IIHIGH (I, J) ,HLOW (I , J)
346 : WRITE (6,210) PHMAX , IPMAX ,XMAX ,TTMAX
3 4 7 : WRITE(6,211) PHMIN,I PM IN,XMIN,TTMIN
348: C
349 : c ******* FORMAT STATEMENTS *******
350 : C
351: 100 FORMAT(5F10.0)
352: 200 FORMAT(1H1//14X , 33 ( ' *’)/I 4X, 1 * WATER HAMMER IN A SERIES PIPE *'/
353 : Si 4X,3 3('*')//25X,'INPUT DATA’/2 5X,10('-')/)
354: 201 FORMAT(25X,1IOUT = ',I 3/23X,'NPARTS ’',I3//23X, ' NPIPES =',I3//
355:
356:
357:
S24X,'OZERO =’,F7.1,’ GPM'//
$24X,'HDOWN =‘,F7.1,‘ FT 1/24X,‘HZ ERO =’,F7.1,’ FT'//
S25X,'ZEND =',F7.1,' FT'/25X,'HATH =',F7.1,' FT'//
Appendix II
358 : S25X,'TEMP =',F8.0,' DEG-F'/27X,'NU *',F8,7,' SQ FT/SEC'//
359 : $25X,'TMAX »',F7.2,' SEC'/25XDELT ,F7.3,' SEC’//
360 : $26X,'TC1 »‘,F7.2,’ SEC'/26X,'PCI =',F7.2,' PERCENT OPEN'//
3 61: $26X,'TC2 »',F7,2,' SEC-VALVE IS CLOSED')
362 : 202 FORMAT(//22X,'PIPE INPUT DATA'/22X,15(’-')//5X,‘PIPE DIAM-IN LEMGT
363 : $H-FT ROUGH-IN WAVE SPD-FPS PIPEZ-FT F-VALUE VEL-PPS DELT-SEC PARTS
364 : S SINE L/A-SEC‘/5X,4(•-,),lXz7(’-t)xlXz9(’-'),lX,8(*-*),lX,
365: S12('-’),1X,8('-'),1X,7(,-'),1X,7('-,),1X,8('-'),1X,5('-'),2X,
366: $6( ) ,1X,7( )
367 : 203 FORMAT(5X,13,2X , F6.2 , IX , F9.1,2X , F3.7,5X , F6.0,4X , F6.0,3X , F5 4 , 3 X ,
368: $F5.2,3X,F6.3,3X,I3,2X,F7.5,1X,F6.2)
369 : 204 FORMAT(1 Hl/' PRESSURE HEADS, H-VALUES AND VELOCITIES AS FUNCTIONS
370 : $ OF TIME'/2X,60(’-'))
371: 205 FORMAT(//l8X,3(5X,' X HEAD-FT H-FT V-FPS')/' TIME »',F7.3,
372: S’ SEC' , 3(5X, ’------------------ ------------------------------ ---------------- • ) )
373 : 206 FORMAT(/I2X, 'PIPE1,1 2, 3(5X,F5.3,2F7.0,F8.2) /(18X,3(5X,F5.3,2F7.0
37 4 : $,F8«2)))
375: 207 FORMAT(lHl/18X,27('*')/I8X,'* TABLE OF EXTREME VALUES *'/18X,27('«
376: S')//13X,'X MAX HEAD MIN HEAD MAX H MIN H'/11X,5('-') ,2X , 8<
377: ,2X,8(),2X,6(),2X,6(j)
378 : 208 FORMAT(2X,’PIPE',12)
379 : 209 FORMAT(11X,F5.3,2X,F7.0,3X,F7.0,3X,F6.fl,2X,F6♦0)
380 : 210 FORMAT(//’ MAXIMUM HEAD =',F6.1,' FT IN PIPE',13,' AT X =',F5.3,
381: S' AT TIME =',F7.2, ' SEC')
382 : 211 FORMATf/' MINIMUM HEAD =',F6.1,' FT IN PIPE',13,' AT X =’,P5.3,
383 : S’ AT TINE =',F7.2, ' SEC')
384: 212 FOR MAT(////2X,'THE SOLUTION FOR DARCY-WEISBACH F-VALUE FAILED AFTE
385: SR 23 TRIALS')
386 : 213 FORMAT(////2X,1 THE SUCCESSIVE APPROXIMATION SCHEME TO COMPUTE QZER
387 : SO HAS FAILED AFTER 20 TRIES')
388: 214 FORMAT(////2X,'COLUMN SEPARATION HAS OCCURRED AT',F6.2,‘ SEC IN PI
389 : SPE',13,' AT LOCATION',F5.3)
390 : C
391: END

241
242 UNSTEADY FLOW IN PIPELINES
J 13.3 24 6J ’
I1/. 30 20 3.6
4
6
_
484
200
541
237
156
120
140
83
4.9
5.8
4.1
4.2 APPENDIX II 243

FLOW CHARTS

H pqi FLOW CHARACTERISTICS...


I Clayion automatic Valves

The data presented in the charts or these pages have been The flow rate ranges shown in the charts are approximate since-the
carefully authenticated. It should be clearly remembered that the proper range of flows for any particular type of valve may vary
figures given are for valves.in the fully open position, in some considerably. Interpolation to find pressure loss at other flow
types of valves such as check val-es, pressute regulators, and rates is permissible except at the low end of the curve. Values given
certain throttling valves the fully open condition is rarely reached. are based on fresh water at 6Q F. Convenient factors for head loss

PRESSURE W0P-
For these valves the figures m the charts should be taken comparison, and for calculating and plotting total system head
only as a guide to proper size selection. curves are given in the following table,

P.S.I.
EQUIV. LGTH.
Cv FACTOR OF PIPE K FACTOR
GLOBE ANGLE GLOBE ANGLE GLOBE ANGLE
VALVE
1‘4
8 Vi ?44 326 ~99029 260
387 1*61
39~?5 ~ 6 37
76 3.9
58 7.1
SIZE
10
2 1126
488-5 _ 1575
60~ ’~n375
~
65 ~197
<0 ~~ ' 6.77.1
5.7 4?S
. I? 1721_____
2500*
80 ____42592______
194-
59 ____6.345 _____25,y2 3.9
J* _____ 2112
3 ______ 3060*
i?5_______475_ 147 220’75____
____6,251____ 2.8- 5.1
_J_6 3.7 2837 ___42Q0* __525 22f 5.7 2.6*
24 6884 - 800 '49
ESTIMATEO ' ------------------
FLO* RATE-GALLONS PER MINUTE
(WATER)

ANGIE PATTERN

(1) Cv factor is defined as the number of gallons per minute of water at 60°F. which
will flow a: a one pound per square meh differential.

(2) Equivalent lengths of pipe are based on data contained in Hydraulics Institute Pipe
Friction Manual. 1954 Edition, Tables 4 through 20. In general, this data is for new,
clean wrought iron or steel, schedule 40 pipe with no allowance made for age, differ-
ences m diameter, or any abnormal condition of the interior surface. For further details,
refer to the above manual.

KVJ
(3) The value for K is calculated from the formula h = —
. 2g
where h - -rictional resistance in feet of fluid
V-jverage velocity in feet/second in a pipe of corresponding diameter
g = 32.17 (eet/second/second
K= Resistance coefficient for valve.

(4) FormJas for computing Cv Factor, Flow (Q) and Pressure Drop (&P):

(£) FLOW RATE-GALLONS PER


WHERE: MINUTE
Q= Flow Rate in U.S. gallons per minute of fresh water. (WATER)
Cv = Number of Gallons per Minute of fresh water at one (1) PSI differential.
AP-Pressure Drop in PSI,

CLA'VAL CO. Newport Beach, California

Courtesy of CLA-VAL CO.

.......................................................
CV 8" = 740
CV
CV 4" = 205
CV
GLpBE

OPEN

UNSTEADY FLOW IN PIPELINES


PERCENT OF STROKE
6"

3”=

100
-

40

60

80
20
VALVE

o
128
423

t>tSICH!«S ANO MAWMCIIimS OA VA.VIS ,O. AUIOUAIIOH

ST. GEORGE STREET. EAST LIVERPOOL. OHIO 43920


20
PERCENT OF CV
at constant AP

40
60
GPM = CV /AP

001 08

VEE

HE A D LOSS THRU G.A. ANGLE VALVES

I 2 3 d 5 6 7 69 10 2 3 456789
100
8
7

T7

8
7
6 "I
LOSS OF HEAD IN FEET

... i..

7
6

3
A
A
APPENDIX II 245

~
\ 100 3 4 5 6 8 1000 2 3 4 5 6 8 10000 2 34568
>1

A PER MINUTE THRU ANGLE VALVES


FLOW IN U.S. GALLONS
\
GOLDEN-ANDERSON VALVE SPECIALTY CO.
Courtesy of Golden-Anderson Valve S]>ecialty Co.
246 UNSTEADY FLOW IN PIPELINES

Index
2 , 3 .45,t 7 «>

A wave transmission and


reflections
< 5 S7,«al0000

Air chambers 216 15


analysis 217 5

to to
to to
to to to
appurtenances

GOLDEN-ANDERSON VALVE SPECIALTY CO.


HEAD LOSS THRU G.A. GLOBE

FLOW IN U.S GALLONS PER MINUTE THRU GLOBE VALVES


example Characteristic equations

OO
r- o
history Characteristic lines
sizing 221 grid 52
oslOOO i 3

Air entrainment interpolation 68

2 3 4 5 6 8 100 2 34568 l(XX)' ~2 3 4 T6 ~8 <0000 2 3 4 56 8


effect on wave speed 42 rectangular grid 70
released air 152 slopes 49,67
Air in lines 201 Characteristics, method of
4

filling empty lines 207 (see method of characteristics)


—3

released air 152 Column separation


1

removing air 202,212 causes 152


-L Air release effect on analysis 153
(see air entrainment) occurrences 203,212,216,231
Complex pipe systems
VALVES

branching pipes 97

to
interior major losses 101
Booster pumps 167 interior valves 103
Boundary conditions 51 interpolation 85
Courtesy of Golden-Anderson Valve Specialty Co.

air chambers 217 PRV’s 112


constant speed pumps 53,56 series pipes 83
one-way surge tanks 214
valve at pipe end 105
pipe junctions 83,97,100
2 3 4 56 8 10

pipe networks 133 Computer input


pumps 167,190,197,202,203 (see computer programs)
reservoirs 54 Computer programs
time varying 133 air chambers and one-way

valves 16,17,103,105,107, surge tanks 224


133J N! OV3H 30 SSO1 approximate water hammer 59
114,206
booster pump power
velocities 54
failure 1
Branching pipes
complete water hammer

•—‘■*□00
four-pipe junctions 100

OMw
Hardy Cross analysis 1
three-pipe junctions 97,140
linear theory analysis 123
nxrr
248 UNSTEADY FLOW IN PIPELINES INDEX 24!

network water hammer Friction loss J Numerical solution


14 effect on water hammer approximate method of
3 pressures 71 Junctions, pipe characteristics
Newton-Raphson analysis 134 effect on water hammer (see pipe junctions) complete method of
series pipes 88 pressures at valve closure 74 characteristics

Ln O'.
series pipe with steady flow friction factor 5 computerizing solution
calculation built in 236-239 formula 5 stability
source pump power failure 174 interior major losses 101 Length increment As
minor losses 25

o
surge relief valve program 209 computing As 52,70
Computer output wall shear 43 effect on solution accuracy 75
(see computer programs) interpolation 68 One-way surge tanks 21
Concrete pipe Linear theory boundary conditions 21
air
(seechambers
pipe) 216 computer program 123

L,
C
Control
fillingdevices and techniques 207
empty lines example 122
one-way surge tanks 214 Gate valves theory 120
removing air from lines 212 in pipe networks 140 Loss coefficients Parallel pipes 2
surge anticipation valves 231 loss coefficients 107 interior of lines 102 Pipe elasticity 3
surge relief valves 206 Grid of characteristics valves 103,106 Pipe junctions 97,100,140,15
valve movement control 205 (see characteristic lines) Pipe networks
M Hardy Cross analysis
1
Mass, conservation of 30,44,46 1
Elastic theory Hardy Cross analysis 116 Method of characteristics linear theory analysis 12
definition 1 computer program 119 approximate Newton-Raphson analysis 12

Ox -Q
complete Pipe restraint 1132-

OX
moduli example 117 steady state analysis
(see moduli of elasticity) procedure 118 Minor losses Pipe stress
water hammer in networks 13 35,33
Elasticity Head increase in unsteady flow 25,102 relation to pressure
effects 30 (see pressure head increase) Modulus of elasticity Pipes
liquid 30,45 in pipe deformations 31,45 concrete pipes 4
Pipe 31 I pipe materials 35 elastic stretching J
Equivalent pipes water 30,34 moduli of elasticity
minor losses 25 Im p u Ise-m ome n tu m 28 Momentum 28,43,46 Poisson’s ratios 2
parallel pipes 21 Initial conditions 51 restraint in thick-walled

z
series pipes 19 Interpolation pipes
Euler equation 10,43,46 complete method of Network analysis restraint under action of
Experimental verification 77 characteristics 68 Hardy Cross water hammer 32-1

O OX
computer code for linear linear theory stress: in wall 31,1

to
interpolation 11 Newton-Raphson 12 volume changes 31,36/
L
computer code for parabolic 0 Network water hammer 2 wall shear stress
Finite difference equations interpolation examples 13 Poisson’s ratio
approximate characteristics for valve loss coefficients 11 Newton-Raphson method 3 in pipe elasticity 31,1
method 51 linear 2 example 14 values for pipe materials
complete characteristics parabolic in one dimension 2 Power failure, pump
method 67 in series pipes 10 in pipe networks (see pump rundown)
00 OO

computerizing equations 56 minimum 8 in multi-dimensions 13 Pressure head increase


10 theory 1 elastic theory
9 12
9
13
4
250 UNSTEADY FLOW IN PIPELINES INDEX 251

for rigid water column torque 158 Stress at reservoirs 105


theory 16,17,23 tripout 190 longitudinal and lateral 31 check valves 20
formula for 29 types of pumps 162 pipe walls 31,45 closure time effect 0
propagation speed 6 PVC pipe (see pipe) Surge tanks

CM
o
IZh OO
controlled movement 3
relation to pipe elasticity 32 air chamber 216 effect of L/a
Pressure reducing valves (PRV’s) one-way 214 effect of closure rate
quick response 112 open end 212 on pressure 111
slower acting 115 Rectangular grid 70 Surge theory effect of movement 200
Pressure relief valves Reflections (see wave transmission (see rigid water column theory) gate valves 107,140
(see surge valves) and reflection) Surge valves in line interior 103
Problems, causes of Reinforced concrete pipe effect on pressure head loss coefficients 103,106,107
check valves 200 (see pipe)

CM CM
OO
O kO CM
at valve loss coefficient as function
filling empty lines 201 Released air of opening 109
example
pump power failure 203 causes 152 pressure generated 16,17
effect on analysis 152 history
pump startup 202 surge anticipation 231 pressure reducing 112
removing air from 202 Reservoirs sudden closure 5,50
boundary conditions, surge relief 206
lines 200 surge anticipation 231
valve movement 164 simple pipe 54 surge relief 206
Pump rundown 167 Reverse flow Volume changes, 31,36,45
boundary conditions 217 in pipes 105 Thick-walled pipes pipes
37
with air
with backflo
chamber 192 in pumps 192 W
Time increment At
with one-way surge tanks 214 Rigid water column theory computing At 52,70,85
Pump startup 197 definition 1 Water hammer
effect on solution accuracy 74
Pump tripout 190 examples 15,17,23 effect on stability description
76

bO tn
Pumps flow establishment 13 Time of travel history

kD Ok
basic theory parallel pipes 21 in pipe networks
Tunnels, wave speed in 133
IT) kO

co
booster pressures from valve closure 17 in pumped pipelines 164,21
cavitation 163 series pipes 19 in series pipes 2
valve closure 16
kO kO
c-

change in speed in simple pipes without 83


characteristics Rundown,pump friction
Tj-

Unsteady flow
characteristics at different (see pump rundown) basic equations Wave propagation

Ch
Vi
speeds compared to steady flow time of travel
166,19 definition Wave propagation speed

bJ ch Ch to o\
equation for
00

2 elastic effects 2

co
computerized constant speed equation of continuity 7 history
boundary conditions 57 Series pipes flow establishment in concrete pipes
43,4 40
computer program
OO 00
r-

constant speed boundary


characteristics momentum equation in thick-walled pipe

co co
r--
co co co TJ-
Ch kn ch c\)
6
efficiency
conditions 55 in rigid water column theory one-dimensional equation in thin-walled pipe
55 1
internal boundary conditions
ch

in pipelines 159 parallel pipes in tunnels


CM co

3
k© k©

NPSH time interval computation 85 series pipes with air entrainment


43,4
power 158,159 wave reflection and V 6 Wave transmission and reflections
power failure 164,203 transmission 154 1
power failure protection 214,216 at pipe junctions 153
Sloping pipes Valves 1 series pipes 154
similarity laws 160 effect on solution accuracy 76 at junction 1402 tees 155
specific speed 163 Speed change, pump 167 1
startup 197,202 Stability, numerical 76 19,8
3

S-ar putea să vă placă și