A Review of Water Hammer Theory and Practice
A Review of Water Hammer Theory and Practice
A Review of Water Hammer Theory and Practice
Mohamed S. Ghidaoui
email: [email protected]
Theory and Practice
Ming Zhao Hydraulic transients in closed conduits have been a subject of both theoretical study and
email: [email protected] intense practical interest for more than one hundred years. While straightforward in terms
of the one-dimensional nature of pipe networks, the full description of transient fluid flows
Department of Civil Engineering, The Hong Kong pose interesting problems in fluid dynamics. For example, the response of the turbulence
University of Science and Technology, structure and strength to transient waves in pipes and the loss of flow axisymmetry in
Hong Kong, China pipes due to hydrodynamic instabilities are currently not understood. Yet, such under-
standing is important for modeling energy dissipation and water quality in transient pipe
flows. This paper presents an overview of both historic developments and present day
Duncan A. McInnis research and practice in the field of hydraulic transients. In particular, the paper dis-
Surface Water Group, Komex International Ltd., cusses mass and momentum equations for one-dimensional Flows, wavespeed, numerical
4500 16th Avenue, Suite 100, N. W. Calgary, solutions for one-dimensional problems, wall shear stress models; two-dimensional mass
Alberta T3B 0M6, Canada and momentum equations, turbulence models, numerical solutions for two-dimensional
problems, boundary conditions, transient analysis software, and future practical and re-
search needs in water hammer. The presentation emphasizes the assumptions and restric-
David H. Axworthy tions involved in various governing equations so as to illuminate the range of applicabil-
163 N. Marengo Avenue, #316, Pasadena, ity as well as the limitations of these equations. Understanding the limitations of current
CA 91101 models is essential for (i) interpreting their results, (ii) judging the reliability of the data
email: [email protected] obtained from them, (iii) minimizing misuse of water-hammer models in both research and
practice, and (iv) delineating the contribution of physical processes from the contribution
of numerical artifacts to the results of waterhammer models. There are 134 refrences cited
in this review article. 关DOI: 10.1115/1.1828050兴
given datum, H⫽piezometric head, ⫽fluid density, V⫽ 兰 A udA where cv⫽control volume, cs⫽control surface, n⫽unit outward
⫽cross-sectional average velocity, u⫽local longitudinal velocity, normal vector to control surface, v⫽velocity vector.
A⫽cross-sectional area of the pipe, and g⫽gravitational accelera- Referring to Fig. 1, Eq. 共4兲 yields
tion. The positive sign in Eq. 共1兲 is applicable for a water-hammer
wave moving downstream while the negative sign is applicable
for a water-hammer wave moving upstream. Readers familiar with
the gas dynamics literature will note that ⌬ P⫽⫾ a⌬V is obtain-
t 冕 x⫹ ␦ x
x
Adx⫹ 冕 cs
共 v"n兲 dA⫽0 (5)
able from the momentum jump condition under the special case The local form of Eq. 共5兲, obtained by taking the limit as the
where the flow velocity is negligible in comparison to the length of the control volume shrinks to zero 共i.e., ␦ x tends to
wavespeed. The jump conditions are a statement of the conserva- zero兲, is
冉 冊
are discussed in Sec. 3.
The momentum equation for a control volume is 共e.g., 关20– 0 P* P* V*
⫹MV * ⫹ ⫽0 (12)
23兴兲: t* x* x*
兺F ext⫽
t 冕
cv
v᭙⫹ 冕
cs
v共 v"n兲 dA (9)
V*
t*
⫹MV *
V*
x*
⫹M
1 共  ⫺1 兲 AV * 2 0 P *
A x*
⫹
x*
Applying Eq. 共9兲 to the control volume of Fig. 2; considering gL L f
gravitational, wall shear and pressure gradient forces as externally ⫹ sin ␣ ⫹ M w* ⫽0 (13)
Ua D 2
applied; and taking the limit as ␦ x tends to zero gives the follow-
ing local form of the axial momentum equation: where the superscript * is used to denote dimensionless quantities.
Since MⰆ1 in water hammer applications, Eqs. 共12兲 and 共13兲
AV  AV P
2
become
⫹ ⫽⫺A ⫺ D w⫺ ␥ A sin ␣ (10)
t x x
0 P* V*
⫹ ⫽0 (14)
t* x*
V * 0 P * g L
t*
⫹
x*
⫹
Ua
L f
sin ␣ ⫹ M ⫹
D 2
Td
L/a 冉 冊
w* ⫽0.
(15)
Rewriting Eqs. 共14兲 and 共15兲 in dimensional form gives
1 P V
⫹ ⫽0 (16)
a2 t x
V 1 P w D
⫹ ⫹g sin ␣ ⫹ ⫽0 (17)
t x A
Fig. 2 Control volume diagram used for momentum equation Using the Piezometric head definition 共i.e., P/g 0 ⫽H⫺Z), Eqs.
derivation 共16兲 and 共17兲 become
V 0 H w D 1 d dA
⫹g ⫹ ⫽0 (19) ⫽ ⫹ (25)
t x A a2 d P A d P
The change in density in unsteady compressible flows is of the The first term on the right-hand side of Eq. 共25兲 represents the
order of the Mach number 关11,27,28兴. Therefore, in water hammer effect of fluid compressibility on the wave speed and the second
problems, where MⰆ1, ⬇ 0 , Eqs. 共18兲 and 共19兲 become term represents the effect of pipe flexibility on the wave speed. In
fact, the wave speed in a compressible fluid within a rigid pipe is
g H V obtained by setting dA/d P⫽0 in Eq. 共25兲, which leads to a 2
⫹ ⫽0 (20) ⫽d P/d . On the other hand, the wave speed in an incompressible
a2 t x
fluid within a flexible pipe is obtained by setting d /d P⫽0 in
V H w D 共25兲, which leads to a 2 ⫽Ad P/ dA.
⫹g ⫹ ⫽0 (21) Korteweg 关33兴 related the right-hand side of Eq. 共25兲 to the
t x A
material properties of the fluid and to the material and geometrical
which are identical to the classical 1D water hammer equations properties of the pipe. In particular, Korteweg 关33兴 introduced the
given by Eqs. 共2兲 and 共3兲. Thus, the classical water hammer equa- fluid properties through the state equation d P/d ⫽K f / , which
tions are valid for unidirectional and axisymmetric flow of a com- was already well established in the literature, where K f ⫽bulk
pressible fluid in a flexible pipe 共tube兲, where the Mach number is modulus of elasticity of the fluid. He used the elastic theory of
very small. continuum mechanics to evaluate dA/d P in terms of the pipe
According to Eq. 共15兲, the importance of wall shear, w , de- radius, thickness e, and Young’s modulus of elasticity E. In his
pends on the magnitude of the dimensionless parameter ⌫ derivation, he 共i兲 ignored the axial 共longitudinal兲 stresses in the
⫽ LMf /2D⫹ T d /(L/a). Therefore, the wall shear is important pipe 共i.e., neglected Poisson’s effect兲 and 共ii兲 ignored the inertia of
when the parameter ⌫ is order 1 or larger. This often occurs in the pipe. These assumptions are valid for fluid transmission lines
applications where the simulation time far exceeds the first wave that are anchored but with expansion joints throughout. With as-
cycle 共i.e., large 兲, the pipe is very long, the friction factor is sumptions 共i兲 and 共ii兲, a quasi-equilibrium relation between the
significant, or the pipe diameter is very small. In addition, wall pressure force per unit length of pipe Dd P and the circumferential
shear is important when the time scale of radial diffusion is larger 共hoop兲 stress force per unit pipe length 2ed is achieved, where
than the wave travel time since the transient-induced large radial ⫽hoop stress. That is, Dd P⫽2ed or dp⫽2ed /D. Using
gradient of the velocity does not have sufficient time to relax. It is the elastic stress-strain relation, dA⫽ d D 2 /2, where d
noted that T d becomes smaller as the Reynolds number increases. ⫽d /E⫽radial 共lateral兲 strain. As a result, Ad P/ dA⫽eE/D
The practical applications in which the wall shear is important and and
the various w models that are in existence in the literature are
discussed in Sec. 4. Kf
If ⌫ is significantly smaller than 1, friction becomes negligible 1
and w can be safely set to zero. For example, for the case L 2⫽ ⫹ or a 2⫽ (26)
a Kf e KfD
⫽10,000 m, D⫽0.2 m, f ⫽0.01, and M⫽0.001, and T d /(L/a) E 1⫹
⫽0.01 the condition ⌫Ⰶ1 is valid when Ⰶ4. That is, for the case D eE
considered, wall friction is irrelevant as long as the simulation The above Korteweg formula for wave speed can be extended
time is significantly smaller than 4L/a. In general, the condition to problems where the axial stress cannot be neglected. This is
⌫Ⰶ1 is satisfied during the early stages of the transient 共i.e., is accomplished through the inclusion of Poisson’s effect in the
small兲 provided that the relaxation 共diffusion兲 time scale is smaller stress-strain relations. In particular, the total strain becomes d
than the wave travel time L/a. In fact, it is well known that ⫽d /E⫺ pd x /E, where p⫽Poisson’s ratio and x ⫽axial
waterhammer models provide results that are in reasonable agree- stress. The resulting wave speed formula is 共e.g., 关17,23兴兲
ment with experimental data during the first wave cycle irrespec-
tive of the wall shear stress formula being used 共e.g., 关29–32兴兲. Kf
When ⌫Ⰶ1, the classical waterhammer model, given by Eqs. 共20兲
and 共21兲, becomes a 2⫽ (27)
KfD
g H V 1⫹c
eE
⫹ ⫽0 (22)
a2 t x where c⫽1⫺ p/2 for a pipe anchored at its upstream end only,
V H c⫽1⫺ 2p for a pipe anchored throughout from axial movement,
⫹g ⫽0 (23) and c⫽1 for a pipe anchored with expansion joints throughout,
t x which is the case considered by Korteweg 共i.e., x ⫽0).
which is identical to the model that first appeared in Allievi 关9,10兴. Multiphase and multicomponent water hammer flows are com-
The Joukowsky relation can be recovered from Eqs. 共22兲 and mon in practice. During a water hammer event, the pressure can
共23兲. Consider a water hammer moving upstream in a pipe of cycle between large positive values and negative values, the mag-
length L. Let x⫽L⫺at define the position of a water hammer nitudes of which are constrained at vapor pressure. Vapor cavities
front at time t and consider the interval 关 L⫺at⫺ ⑀ ,L⫺at⫹ ⑀ 兴 , can form when the pressure drops to vapor pressure. In addition,
where ⑀ ⫽distance from the water hammer front. Integrating Eqs. gas cavities form when the pressure drops below the saturation
共22兲 and 共23兲 from x⫽L⫺at⫺ ⑀ to x⫽L⫺at⫹ ⑀ , invoking Leib- pressure of dissolved gases. Transient flows in pressurized or sur-
nitz’s rule, and taking the limit as ⑀ approaches zero gives charged pipes carrying sediment are examples of multicomponent
water hammer flows. Unsteady flows in pressurized or surcharged
a⌬V sewers are typical examples of multiphase and multicomponent
⌬H⫽⫺ (24) transient flows in closed conduits. Clearly, the bulk modulus and
g
density of the mixture and, thus, the wave speed are influenced by
Similarly, the relation for a water hammer wave moving down- the presence of phases and components. The wave speed for mul-
stream is ⌬H⫽⫹a⌬V/g. tiphase and multicomponent water hammer flows can be obtained
⫹ ⫽k 1⫺a冉 V
x
冒 冊 V
t
(35)
where t ⬘ ⫽a dummy variable, physically represents the instanta-
neous time in the time history; ⫽kinematic viscosity of the fluid;
W⫽weighting function
or in terms of wall shear stress 2 2
W 共 t 兲 ⫽e ⫺26.3744共 t/R 兲 ⫹e ⫺70.8493共 t/R 兲 ⫹e ⫺135.0198共 t/R
2
兲
w ⫽ ws ⫹
4 冉
kD V
t
⫺a
V
x 冊 (36)
2
⫹e ⫺218.9216共 t/R 兲 ⫹e ⫺322.5544共 t/R
t
2
兲
transients, were proposed in 关44兴 and in 关52兴. In particular, Pezz- The first term on the right-hand side of Eq. 共39兲 represents the
inga 关44兴 proposed steady-state wall shear stress ws and the second term represents
the correction part due to the unsteadiness of the flow wu . The
冋
⫹ ⫽k 1⫹sign V 冉 冊 冒 册
V V
x
a
x
V
t
(37)
numerical integration of the convolution integral in Eq. 共39兲 re-
quires a large amount of memory space to store all previously
calculated velocities and large central processing unit 共CPU兲 time
and Bergant et al. 关53兴 proposed to carry out the numerical integration, especially when the time
step is small and the simulation time large. Trikha 关57兴 used three
冋
⫹ ⫽k 1⫹sign共 V 兲 a 冏 冏冒 册
V
x
V
t
(38)
exponential terms to approximate the weighting function. The ad-
vantage of using exponential forms is that a recursive formula can
easily be obtained, so that the flow history can be lumped into the
The dependence of ⫹ on x and t as well as the flow accel- quantities at the previous time step. In this way, only the calcu-
eration is consistent with the theoretical formulations in 关30兴 and lated quantities at the previous time step needs to be stored in the
关39兴. In addition, the form of ⫹ gives significant correction for computer memory, and there is no need to calculate the convolu-
w共 t 兲 ⫽ f
V 共 t 兲 兩 V 共 t 兲 兩 4
8
⫹
D 冕
0
t
W 共 t⫺t ⬘ 兲
V
t⬘
dt ⬘ (41)
Understanding the connection between Eq. 共32兲 and the physi-
cally based unsteady wall friction models proposed by Zielke 关56兴
and Vardy and Brown 关60兴 further illuminates the limitations of
where instantaneous acceleration, unsteady wall friction models as de-
scribed in the previous section. In particular, it is evident from
W 共 t 兲 ⫽ ␣ exp共 ⫺  t 兲 / 冑 t; ␣ ⫽D/4冑 ; Eqs. 共39兲 and 共41兲 that Eq. 共32兲 is recovered when the acceleration
is constant. In addition, plots of W in Fig. 5 show that for flows
 ⫽0.54 Re /D 2 ; ⫽log共 14.3/Re0.05兲 with large Reynolds number, this function is very small every-
and Re⫽Reynolds number. Similar to Zielke’s model, the convo- where except when t/R 2 approaches 0, that is, when t ⬘ ap-
lution nature of Eq. 共41兲 is computationally undesirable. An accu- proaches t in Eq. 共41兲. The region where W(t⫺t ⬘ ) in Eq. 共41兲
rate, simple, and efficient approximation to the Vardy-Brown un- becomes significant and provides a measure of the time scale of
steady friction equation is derived and shown to be easily the radial diffusion of vorticity T d . If the acceleration varies
implemented within a 1D characteristics solution for unsteady slowly in the region where W(t⫺t ⬘ ) is significant, it is clear that
pipe flow 关32兴. For comparison, the exact Vardy-Brown unsteady Eqs. 共39兲 and 共41兲 can be accurately approximated by Eq. 共32兲.
friction equation is used to model shear stresses in transient tur- This is simply an alternative way to state that Eq. 共32兲 is accept-
bulent pipe flows and the resulting water hammer equations are able when the acceleration is not constant as long as the time scale
solved by the method of characteristics. The approximate Vardy- of the flow disturbance far exceeds the time scale of radial diffu-
Brown model is more computationally efficient 共i.e., requires 61 -th sion of vorticity across the shear layer. Moreover, it is obvious
the execution time and much less memory storage兲 than the exact that Eq. 共32兲 is a good approximation to Eqs. 共39兲 and 共41兲 when
Vardy-Brown model. Both models are compared with measured t is small, as the integral interval is so small that the integrand can
data from different research groups and with numerical data pro- be considered as a constant. Furthermore, the time interval where
duced by a two-dimensional 共2D兲 turbulence water hammer W(t⫺t ⬘ ) is significant reduces with Reynolds number, which
model. The results show that the exact Vardy-Brown model and shows that Eq. 共32兲 becomes more accurate for highly turbulent
the approximate Vardy-Brown model are in good agreement with flows.
both laboratory and numerical experiments over a wide range of
Reynolds numbers and wave frequencies. The proposed approxi- 5 Numerical Solutions for 1D Water Hammer Equa-
mate model only requires the storage of flow variables from a tions
single time step while the exact Vardy-Brown model requires the The equations governing 1D water hammer 共i.e., Eqs. 共20兲 and
storage of flow variables at all previous time steps and the 2D 共21兲兲 can seldom be solved analytically. Therefore, numerical
model requires the storage of flow variables at all radial nodes. techniques are used to approximate the solution. The method of
A summary of the assumptions involved in deriving Eqs. 共39兲 characteristics 共MOC兲, which has the desirable attributes of accu-
and 共41兲 is in order. The analytical approach of Zielke 关56兴 in- racy, simplicity, numerical efficiency, and programming simplicity
volves the following assumptions: 共i兲 the flow is fully developed, 共e.g., 关20,23,61兴兲, is most popular. Other techniques that have also
共ii兲 the convective terms are negligible, 共iii兲 the incompressible been applied to Eqs. 共20兲 and 共21兲 include the wave plan, finite
version of the continuity equation is used 共i.e., the influence of difference 共FD兲, and finite volume 共FV兲 methods. Of the 11 com-
mass storage on velocity profile is negligible兲, and 共iv兲 the veloc- mercially available water hammer software packages reviewed in
ity profile remains axisymmetric 共i.e., stable兲 during the transient. Sec. 12, eight use MOC, two are based on implicit FD methods,
In order to extend Zielke’s approach to turbulent flows, Vardy and and only one employs the wave-plan method.
Brown 关60兴 made two fundamental assumptions in relation to the
turbulent eddy viscosity in addition to assumptions 共i兲 through 5.1 MOC-Based Schemes. A significant development in
共iv兲. First, the turbulent kinematic viscosity is assumed to vary the numerical solution of hyperbolic equations was published by
linearly within the wall shear layer and becomes infinite 共i.e., a Lister 关62兴. She compared the fixed-grid MOC scheme—also
uniform velocity distribution兲 in the core region. Second, the tur- called the method of fixed time interval—with the MOC grid
bulent eddy viscosity is assumed to be time invariant 共i.e., frozen scheme and found that the fixed-grid MOC was much easier to
to its steady-state value兲. Assumptions 共i兲, 共ii兲, and 共iii兲 are accu- compute, giving the analyst full control over the grid selection and
rate for practical water hammer flows, where the Mach number is enabling the computation of both the pressure and velocity fields
冉 冊
diffusion of this vortex ring from the pipe wall to the pipe core is
the mechanism responsible for changing the turbulence conditions g H H u 1 rv
⫹u ⫹ ⫹ ⫽0 (42)
in the pipe. a2 t x x r r
A short time after the wave passage, the extent of vorticity
diffusion is limited to a narrow wall region and the turbulence u u u H 1 r
⫹u ⫹v ⫽⫺g ⫹ (43)
field is essentially frozen. In this case, both the quasi-steady tur- t x r x r r
bulence and ‘‘frozen’’ turbulence assumptions are equally appli- where x,t,u,H,r are defined as before, v (x,r,t)⫽local radial ve-
cable. A similar conclusion was reached by Greenblatt and Moss locity, and ⫽shear stress. In this set of equations, compressibility
关92兴 for a temporally accelerating flow; by Tu and Ramparian is only considered in the continuity equation. Radial momentum is
关94兴, Brereton et al. 关95兴, and Akhavan et al. 关96,97兴 for oscilla- neglected by assuming that H/ r⫽0, and these equations are,
tory flow; He and Jackson 关93兴 for ramp-type transients; and therefore, only quasi-two-dimensional. The shear stress can be
Ghidaoui et al. 关46兴 for water hammer flows. As the time after the expressed as
wave passage increases, the extent of the radial diffusion of vor-
ticity becomes more significant and begins to influence the veloc- u
ity gradient and turbulence strength and structure in the buffer ⫽ ⫺ u ⬘v ⬘ (44)
r
zone. The experiments of He and Jackson 关93兴 show that the axial
turbulent fluctuations are the first to respond to the changes in the where u ⬘ and v ⬘ ⫽turbulence perturbations corresponding to lon-
radial gradient of the velocity profile and that there is a time delay gitudinal velocity u and radial velocity v , respectively. Turbu-
between the changes in the axial turbulent fluctuations and its lence models are needed to describe the perturbation term
redistribution among the radial and azimuthal turbulent compo- ⫺ u ⬘ v ⬘ since most practical water hammer flows are turbulent.
nents. The production of axial turbulent kinetic energy and the The governing equations can be further simplified by neglect-
time lag between production and redistribution of axial turbulent ing nonlinear convective terms, as is done in the 1D case since the
kinetic energy within the buffer zone are not incorporated in wave speed a is usually much larger than the flow velocity u or v .
steady-state-based turbulence models. The characteristics of the Then the equations become the following:
flow in the core region will start to change only when the wave-
induced shear pulse emerges from the buffer zone into the core g H u 1 rv
⫹ ⫹ ⫽0 (45)
region. On the basis of their unsteady flow experiments, He and a2 t x r r
u H 1 r T 1 a
⫹g ⫽ 2. buffer I layer ⫽ay ⭐y ⭐ (52)
t x r r
(48) * a * CB
Q 共 x,t 兲 ⫽ 冕
A
udA (49) 3. buffer II layer
T
⫽C B y 2
*
features of algebraic turbulence models. These models were com- and in which l⫽mixing length and Re⫽Reynolds number for ini-
paratively studied by Ghidaoui et al. 关46兴. The comparison shows tial flow. The thickness of the viscous sublayer is determined by
that very similar dissipation is produced by the two models. Other the wall shear stress. The eddy viscosity in the turbulent region
different variations of algebraic turbulence models are available in includes some information about the velocity profile. The two-
Rodi 关102兴. layer model appears to be more suitable for unsteady flow simu-
a
1 ⫹ ⑀ C u2 共 1 兲 C q2 共 1 兲 ⫺ ⑀ C u3 共 1 兲
g
冋 册
¨ ©
a
1 ⫺ ⫹ ⑀ C u2 共 1 兲 C q2 共 1 兲 ⑀ C u3 共 1 兲
g
⯗ ⯗ ⯗
a
1 ¯ ⫺ ⑀ C u1 共 j 兲 ⫺ C q1 共 j 兲 ⫹ ⑀ C u2 共 j 兲 C q2 共 j 兲 ⫺ ⑀ C u3 共 j 兲 ¯
g
1 ¯ ⑀ C u1 共 j 兲 ⫺ C q1 共 j 兲 ⫺ 冋 a
g
⫹ ⑀ C u2 共 j 兲 册 C q2 共 j 兲 ⑀ C u3 共 j 兲 ¯
⯗ ⯗ ⯗
a
1 ¯ ⫺ ⑀ C u1 共 Nr 兲 ⫺ C q1 共 Nr 兲 ⫹ ⑀ C u2 共 Nr 兲
g
1 ¯ ⑀ C u1 共 Nr 兲 ⫺ C q1 共 Nr 兲 ⫺ 冋 a
g
⫹ ⑀ C u2 共 Nr 兲 册
where j⫽index along radial direction; C u1 ,C u2 ,C u3 ⫽coefficients associated with axial velocity u; C q1 ,C q2 ⫽coefficients
associated with radial flux q; and ⑀ and are weighting coefficients. The unknown vector z
⫽H in⫹1 ,u i,1
n⫹1 n⫹1
,q i,1 , ¯ ,u i,n⫹1
j ,q n⫹1
i, j , ¯ ,u i,Nr⫺1 ,q i,Nr⫺1 ,u i,Nr 其 in which i⫽index along axial direction and the superscript T de-
n⫹1 n⫹1 n⫹1 T
冢 冣
a
⫹ ⑀ C u2 共 1 兲 ⫺ ⑀ C u3 共 1 兲
g
⯗
a
¯ ⫺ ⑀ C u1 共 j 兲 ⫹ ⑀ C u2 共 j 兲 ⫺ ⑀ C u3 共 j 兲 ¯
g
⯗
a
⫺ ⑀ C u1 共 Nr 兲 ⫹ ⑀ C u2 共 Nr 兲
g
冉 冊
The unknown vector u⫽ 兵 u i,1
n⫹1
, ¯ ,u i,n⫹1
j , ¯ ,u i,Nr 其 represents longitudinal flow velocity; bu is a known vector whose elements
n⫹1 T
H a2 V
t
⫹
g x
⫽0 (62) 冕A
P
Q 兩 Q 兩 dx⫽ 关 Q A ⫹ ⑀ 共 Q P ⫺Q A 兲兴 兩 Q A 兩 ⌬x (66)
dx C P ⫺C M
⫽⫾a Q P⫽ (73)
dt
(65) B P ⫹B M
At the ends of a conduit, however, the solution of the character-
For this reason, the x-t grid in Fig. 6 is chosen to ensure ⌬x istic equations is algebraically complicated by one or more
⫽⫾a⌬t. Then, if the dependent variables are known at A and B, ‘‘boundary conditions.’’
Eq. 共63兲 can be integrated along both A P and B P. Integration of
the first two terms is straightforward, while the third requires the 11.2 Boundary Conditions. The subject of what constitutes
variation of Q with x to be known. Although this function is a boundary condition can be treated generally. Karney 关108兴 pre-
generally unknown, the term can usually be approximated 关23兴. A sents concise terminology for describing pipe networks and
convenient linearization of the A to P integration is given by boundary conditions. His nomenclature is followed throughout
Karney and McInnis 关106兴 as follows: this paper and is briefly reviewed here. Once the time domain is
discretized into ⌬t segments, most conduits in the network are Equations 共74兲 and 共75兲 can be substituted directly into Eq. 共76兲 to
divided into one or more reaches of length ⌬x. For clarity, the produce the following expression for H P :
term ‘‘pipe’’ is henceforth restricted to conduits containing at least H P ⫽C C ⫺B C Q ext (77)
one characteristic reach. The end of each reach, where head and
flow values must be determined, is called a section. At sections in which
冉兺 冊
internal to a pipe, the discharge can be obtained from Eq. 共73兲. ⫺1
1 1
However, at each end of the pipe, an auxiliary relation between
head and discharge must be specified. Such a head-discharge re-
B C⫽
i苸N1
⫹ 兺
B P i j苸N2 B M j
(78)
lation is called a boundary condition.
The term ‘‘node’’ is used herein to indicate a location where and
boundary sections meet. The degree of a node is the number of
pipes 共i.e., characteristic sections兲 connected to it. However, in a
general network, not only pipes may be connected to a node, but
C C ⫽B C 冉兺
i苸N1
C Pi
B Pi
⫹ 兺
j苸N2
CMj
BMj 冊 (79)
various other elements as well. For example, a node may represent Equation 共77兲 represents a single relationship between junction
a suction or discharge flange of a pump, the location of a valve head H P and external flow Q ext in a multipipe frictionless junc-
discharging from the network, or a connection for a pressure relief
tion. The form of this equation is equivalent to the single C ⫹
valve. All such nonpipe junctions are labeled external and the
compatibility Eq. 共67兲 and shows that any one-node boundary
number of such connections is called the complexity of the node.
condition located in a network can be evaluated in exactly the
A node of complexity zero is called simple, a node of complexity
same manner as if the boundary condition occurred at the down-
one ordinary, and a node of complexity greater than one complex.
stream end of a single pipe.
In this paper, boundary conditions associated with complex nodes
Once a functional relationship representing a particular hy-
are referred to as boundary systems. Generally, the difficulty of
draulic device is substituted into Eq. 共77兲, a single equation and
solving a network increases as the complexity of the nodes in the
unknown results. If this relationship is either linear or quadratic,
network increases but, as the following section shows, is indepen-
an explicit formula for the unknown can be obtained.
dent of the degree of any node in the network. The terminology
For example, the simplest boundary condition occurs when
related to nodes can be extended in a natural way to networks as
Q ext is either constant or a known function of time 共e.g., constant
well and has been used by Karney 关109兴 to develop a general
displacement pumps or fixed demands兲. In this case, the value of
approach for analyzing complex networks.
Q ext can be substituted into Eq. 共77兲 to obtain the junction head. In
11.2.1 Simple and Ordinary One-Node Boundary Conditions. particular, this equation becomes H P ⫽C C when Q ext is zero. This
Junctions of several pipes are usually modeled as frictionless in solution for a simple node is algebraically equivalent to Eq. 共73兲 if
transient flow applications 共e.g., 关109,110兴兲. Complications arising the node has only two pipes.
by attempting to calculate junction losses at a general node are Comprehensive treatment of various boundary conditions such
considerable and are not discussed in this paper. Generally, energy as valves, pumps, turbines, accumulators, air valves and many
losses at junctions are relatively small and neglecting them does others can be found in Wylie et al. 关23兴, Karney 关108兴, Chaudhry
not appear to significantly impair the accuracy of the method of 关20兴, McInnis 关111兴, Karney and McInnis 关82兴, and McInnis et al.
characteristics solution for a simple pipe junction. 关112兴. Formulations for many system-specific devices abound in
The assumption that local losses are negligible is equivalent to the literature.
representing the hydraulic grade line elevation at the node by a
single number, designated H P .
Consider now Fig. 7, which depicts a junction of any number of
pipes at a node. Let N1 be the set of all pipes whose assumed flow 12 Water Hammer Software
direction is toward the node in question and N2 be the set of pipes With the advent of the Windows operating system, computer
whose assumed flow direction is away from the node. Let one languages such as Visual Basic and Visual C, geographic informa-
flow be identified as external and governed by an auxiliary rela- tion systems 共GIS兲, and the World Wide Web, many water ham-
tion. Positive flows are assumed to be from the junction. The mer models, previously only suited to academics and expert engi-
following derivation is similar to that appearing in Chapter 11 of neering practitioners, are now accessible to even the most novice
Fluid Transients by Wylie and Streeter 关22兴, but uses the notation analyst.
nearly 1500 m/s, depending on pipe material, soil and anchoring subject to the following physical constraints:
conditions. The shock fronts interact with any part of the system
that either dissipates energy or does work in a thermodynamic h a2 q
⫹ ⫽0 (81)
sense. Thus, the energy content of the wave is diminished by t gA x
virtue of its interaction with the physical system, and its frequency
components, amplitude, phasing, and attenuation characteristics q h q兩q兩
⫹gA ⫹f ⫽0 (82)
become modified through successive interaction with the system. t x 2AD
In effect, a pressure signal at a given location constitutes a record
where E is the error sum of squares and Eqs. 共81兲 and 共82兲 are the
of conditions in the system during the course of a given transient
continuity and momentum equations rewritten in terms of dis-
event.
charge and assuming steady Darcy-Weisbach friction. The super-
Deciphering this record of interaction and extracting its infor-
script m denotes measured data values and the superscript c de-
mation content is precisely what an inverse transient model does.
notes the values computed by the forward model, h is piezometric
The inverse model evaluates the recorded pressure 共or flow兲 signal
pressure head, q is the flow rate, a is the pipeline celerity, f is the
and determines which set 共or sets兲 of system parameters, i.e., pipe
Darcy-Weisbach friction factor, t is time, x is a spatial coordinate,
roughness, water consumption 共leakage兲, wave speed, etc, best
g is gravitational acceleration, and A and D are the pipeline cross-
matches the measured data. In this way, information 共data兲 of
sectional area and diameter, respectively.
several types can be gathered from those areas of the pipe system
Equation 共80兲 can be combined with Eqs. 共81兲 and 共82兲 by
that the transient waves have traversed. For example, pressure
using Lagrangian multipliers 1 and 2 as follows:
traces from two pump trip tests can be sufficient to estimate pipe
roughness values for every major pipe and consumption values at
each node in a small city. Of course, the accuracy of the estimates
can be improved by increasing the number of tests performed or
E *⫽ 冕 冕冋
x t
共 h m ⫺h c 兲 2 ␦ 共 x m ⫺x c 兲 ␦ 共 t m ⫺t c 兲 ⫹ 共 q m ⫺q c 兲 2 ␦ 共 x m
parameters in 2D groundwater flow. Jarny et al. 关117兴 applied the The merit 共error兲 function has now been designated E * to
adjoint technique to heat conduction problems. Cacuci et al. 关118兴 indicate that it includes the Lagrangian terms for the continuity
and Hall 关119兴 applied the adjoint method to meteorology and and momentum equations, and has been expressed as an integral
climate modeling. Marchuk 关120兴 applied the adjoint technique to to be consistent with the continuum form of the momentum and
air pollution problems. continuity equations. The Dirac delta functions are included to
Most, though not all, inverse models utilize real measurements ensure that merit function terms are evaluated only at those loca-
in a ‘‘data-fitting’’ exercise that typically provides ‘‘best-fit’’ pa- tions and times for which observed data exist, i.e.,
再
rameters for the mathematical model postulated to fit the data.
Least-squares data-fitting is a simple example of an inverse 1 for x m ⫽x c
method that tries to fit the best mathematical model 共i.e., linear, ␦ 共 x m ⫺x c 兲 ⫽
0 for x m ⫽x c
再
exponential, polynomial, etc兲 to some observed data set. The
‘‘goodness of fit,’’ i.e., how well the particular assumed math- 1 for t m ⫽t c
ematical model represents the data, can be measured statistically and ␦ 共 t m ⫺t c 兲 ⫽ (84)
0 for t m ⫽t c
by an analysis of the errors between the observed data and those
predicted by the model. In fact, these errors are explicitly mini- The conventional approach to Lagrangian optimization is to
mized using Lagrangian optimization such that the optimal param- take partial derivatives of the merit function with respect to the
eter set is directly solved for. unknown system parameters (a or f in this simple formulation兲
The same concept can be applied to more complex physical and the Lagrangian multipliers 1 and 2 , and equate these slope
systems using sophisticated models. In an inverse problem, output functions to zero. This provides four equations from which the
from a ‘‘forward’’ model is used to generate an estimate of one or four unknown variables a, f , 1 , and 2 could be determined.
Ming Zhao obtained his Ph.D. in April 2004 from the Department of Civil Engineering, at
Hong Kong University of Science and Technolgy. He obtained both his B.A.Eng. in hydraulic
engineering and B.A.Sc. in eneterprise management in 1999 from Tsinghua University. His
research interests include numerical simulation of unsteady pipe flows, open channel flows,
turbulence modeling in hydraulics, and stability analysis for fluid flows.
Duncan A. McInnis (Ph.D., P.Eng., MHKIE) has degrees in environmental biology and civil
engineering. He has 20 years of scientific and professional engineering experience in com-
putational hydraulics, simulation, and computer modeling of surface water and pipeline
systems. McInnis has been a Lecturer of Civil Engineering and Senior Project Manager at
the Hong Kong University of Science and Technology. He is currently the Manager of Water
Resources with Komex International Ltd., an international environmental consulting firm.