Skip to main content
Log in

Unified Matrix Frameworks for Water Hammer Analysis in Pipe Networks

  • Research paper
  • Published:
International Journal of Civil Engineering Aims and scope Submit manuscript

Abstract

Several numerical methods have been developed to analyze water hammer dynamics, and among these, the method of characteristics (MOC) is the most widely applied, establishing the time-dependent characteristic equations that account for the components of the unsteady flow. This paper introduces a matrix formulation of the characteristic equations, which is based on an assumed initial incidence matrix that describes the topology of the network, including loops. Unlike traditional MOC, the matrix equations are used to simultaneously solve for all pressures and flows in the network, at each time step, as a linear function of the pressure and flow at all locations in the network in the previous time step. Two solution procedures are proposed, both of which solve for pressures by decomposing the linear systems of equations into a reduced linear system of equations that is on the order of the number of nodes, and use the resulting pressures to update the flow vector, that is on the order of the number of pipes or pipe reaches, at each time step. The proposed solution procedures are not dependent to the network topologies. For different shapes of pipe network, the formulation remains unchanged and the user need only enters different input data in the form of vectors to find the solution using matrix–vector multiplications at each time step. Fast linear solvers can also be implemented to speed up the process, because the linear system of equations at the core of these algorithms is a Stieltjes matrix. These solution procedures are applied for matrix formulations of two numerical examples, and the resulting nodal pressure and pipe flow at each time step are nearly identical.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14

Similar content being viewed by others

References

  1. Ghidaoui MS, Zhao M, McInnis DA, Axworthy DH (2005) A review of water hammer theory and practice. Appl Mech Rev 58(1):49–59

    Article  Google Scholar 

  2. Kim S (2007) Impedance matrix method for transient analysis of complicated pipe networks. J Hydraul Res 45(6):818–828

    Article  Google Scholar 

  3. Kim S (2008) Impulse response method for pipeline systems equipped with water hammer protection devices. J Hydraul Res 134(7):961–969

    Article  Google Scholar 

  4. Liggett JA, Chen LC (1994) Inverse transient analysis in pipe networks. J Hydraul Res 120(8):934–955

    Article  Google Scholar 

  5. Wang C, Yang JD (2015) Water hammer simulation using explicit-implicit coupling methods. J Hydraul Res 141(4):1–11

    Google Scholar 

  6. Nault JD, Karney BW (2016) Improved rigid water column formulation for simulating slow transients and controlled operations. J Hydraul Res 142(9):1–10

    Google Scholar 

  7. Nault JD, Karney BW (2016) Adaptive hybrid transient formulation for simulating incompressible pipe network hydraulics. J Hydraul Res 142(11):1–10

    Google Scholar 

  8. Nault JD, Karney BW, Jung BS (2018) Generalized flexible method for simulating transient pipe network hydraulics. J Hydraul Res. https://doi.org/10.1061/(asce)hy.1943-7900.0001432

    Article  Google Scholar 

  9. Bertaglia G, Ioriatti M, Valiani A, Dumbser M, Caleffi V (2018) Numerical methods for hydraulic transients in visco-elastic pipes. J Fluids Struct 81:230–254. https://doi.org/10.1016/j.jfluidstructs.2018.05.004

    Article  Google Scholar 

  10. Sohani M, Ghidaoui K (2019) Formulation of consistent finite volume schemes for hydraulic transients. J Hydraul Res 57(3):353–373

    Article  Google Scholar 

  11. Zhang Z (2019) Wave tracking method of hydraulic transients in pipe systems with pump shut-off under simultaneous closing of spherical valves. Renew Energy 132:157–166. https://doi.org/10.1016/j.renene.2018.07.119

    Article  Google Scholar 

  12. Todini E, Pilati S (1988) A gradient method for the solution of looped pipe networks. In: International conference on computer application for water supply and distribution, Leicester Polytechnic, UK

  13. Giustolisi O, Moosavian N (2014) Testing linear solvers for global gradient algorithm. J Hydroinform 16(5):1178–1193. https://doi.org/10.2166/hydro.2014.136

    Article  Google Scholar 

  14. Larock BE, Jeppson RW, Watters GZ (2000) Hydraulics of pipeline systems, Boca Raton, London, New York, Washington D.C

  15. Wood DJ, Lingireddy S, Boulos PF, Karney BW, McPherson DL (2005) Numerical methods for modeling transient flow in distribution systems. Am Water Works Assoc 97(7):104–115

    Article  Google Scholar 

  16. Todini E, Rossman L (2013) Unified framework for deriving simultaneous equation algorithms for water distribution networks. J Hydraul Eng 139(5):511–526

    Article  Google Scholar 

  17. Ranginkaman MH, Haghighi A, Samani HMV (2017) Application of the frequency response method for transient flow analysis of looped pipe networks. Int J Civ Eng. 15:677–687. https://doi.org/10.1007/s40999-017-0176-9

    Article  Google Scholar 

Download references

Funding

The author(s) received no specific funding for this work.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Naser Moosavian.

Appendices

Appendix I

For the mathematical proof of Eqs. (37) and (38), the linear system of Eq. (36) is re-written as follows:

$$\left[ {\begin{array}{*{20}c} {{\mathbf{F}}^{{{\text{t}} + \Delta {\text{t}}}} } \\ {{\mathbf{H}}^{{{\text{t}} + \Delta {\text{t}}}} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\mathbf{B}} & {{\mathbf{A}}_{12} } \\ {{\mathbf{A}}_{21} } & 0 \\ \end{array} } \right]^{ - 1} \left[ {\begin{array}{*{20}c} {{\mathbf{G}}^{t} } \\ {\mathbf{q}} \\ \end{array} } \right].$$
(73)

In Eq. (73), the inverse matrix can be obtained according to the Schur Complement Method:

$$\left[ {\begin{array}{*{20}c} {\mathbf{B}} & {{\mathbf{A}}_{12} } \\ {{\mathbf{A}}_{21} } & 0 \\ \end{array} } \right]^{ - 1} = \left[ {\begin{array}{*{20}c} {{\mathbf{B}}_{11} } & {{\mathbf{B}}_{12} } \\ {{\mathbf{B}}_{21} } & {{\mathbf{B}}_{22} } \\ \end{array} } \right] = {\mathbf{X}}.$$
(74)

Consequently, assuming \(= {\mathbf{B}}^{ - 1}\), the elements of the matrix \({\mathbf{X}}\) in Eq. (74) are calculated as follows:

$${\mathbf{B}}_{11} = {\mathbf{D}} - {\mathbf{DA}}_{12} \left( {{\mathbf{A}}_{12} {\mathbf{DA}}_{21} } \right)^{ - 1} {\mathbf{A}}_{21} {\mathbf{D}}$$
(75)
$${\mathbf{B}}_{12} = {\mathbf{DA}}_{12} \left( {{\mathbf{A}}_{12} {\mathbf{DA}}_{21} } \right)^{ - 1}$$
(76)
$${\mathbf{B}}_{21} = {\mathbf{B}}_{12}^{\text{T}} = \left( {{\mathbf{A}}_{12} {\mathbf{DA}}_{21} } \right)^{ - 1} {\mathbf{A}}_{21} {\mathbf{D}}$$
(77)
$${\mathbf{B}}_{22} = - \left( {{\mathbf{A}}_{12} {\mathbf{DA}}_{21} } \right)^{ - 1} .$$
(78)

F and H values are calculated as:

$${\mathbf{H}}^{t + \Delta t} = {\mathbf{B}}_{21} {\mathbf{G}}^{t} + {\mathbf{B}}_{22} {\mathbf{q}}$$
(79)
$${\mathbf{F}}^{t + \Delta t} = {\mathbf{B}}_{11} {\mathbf{G}}^{t} + {\mathbf{B}}_{12} {\mathbf{q}}.$$
(80)

Inserting Eqs. (75)–(78) into Eqs. (79) and (80), the system of equations are defined as:

$${\mathbf{H}}^{t + \Delta t} = \left( {{\mathbf{A}}_{12} {\mathbf{DA}}_{21} } \right)^{ - 1} {\mathbf{A}}_{21} {\mathbf{DG}}^{t} - \left( {{\mathbf{A}}_{12} {\mathbf{DA}}_{21} } \right)^{ - 1} {\mathbf{q}}$$
(81)
$${\mathbf{F}}^{t + \Delta t} = \left( {{\mathbf{D}} - {\mathbf{DA}}_{12} \left( {{\mathbf{A}}_{12} {\mathbf{DA}}_{21} } \right)^{ - 1} {\mathbf{A}}_{21} {\mathbf{D}}} \right){\mathbf{G}}^{t} + {\mathbf{DA}}_{12} \left( {{\mathbf{A}}_{12} {\mathbf{DA}}_{21} } \right)^{ - 1} {\mathbf{q}}.$$
(82)

By simplifying Eqs. (81) and (82), the following two recursive equations [Eqs. (83) and (84)], which are identical to Eqs. (37) and (38), are obtained:

$${\mathbf{H}}^{t + \Delta t} = \left( {{\mathbf{A}}_{21} \left( {\mathbf{D}} \right){\mathbf{A}}_{12} } \right)^{ - 1} \left( {{\mathbf{A}}_{21} \left( {\mathbf{D}} \right){\mathbf{G}}^{t} - {\mathbf{q}}} \right)$$
(83)
$${\mathbf{F}}^{t + \Delta t} = \left( {\mathbf{D}} \right)\left( {{\mathbf{G}}^{t} - {\mathbf{A}}_{12} {\mathbf{H}}^{t + \Delta t} } \right).$$
(84)

Appendix II

Consider the simple network of Fig. 4, assuming \(\Delta t = 0.1\;\; {\text{s}}\) and \(\Delta x = 100 \;\;{\text{m}}\). Figure 5a shows the two characteristic equations needed for each pipe. Using the incidence matrices and vectors as input in Eqs. (19) and (20), the linear system of equations for \(C^{ + }\) and \(C^{ - }\) are obtained as follows:

$$\begin{aligned} \left[ {\begin{array}{*{20}c} {\frac{{a_{1} }}{{gA_{1} }}} & 0 & 0 \\ 0 & {\frac{{a_{2} }}{{gA_{2} }}} & 0 \\ 0 & 0 & {\frac{{a_{3} }}{{gA_{3} }}} \\ \end{array} } \right]\left[ {\left( {\begin{array}{*{20}c} {Q_{1} } \\ {Q_{2} } \\ {Q_{3} } \\ \end{array} } \right)^{ + } } \right]^{t + \Delta t} - \left[ {\begin{array}{*{20}c} {\frac{{a_{1} }}{{gA_{1} }}} & 0 & 0 \\ 0 & {\frac{{a_{2} }}{{gA_{2} }}} & 0 \\ 0 & 0 & {\frac{{a_{3} }}{{gA_{3} }}} \\ \end{array} } \right]\left[ {\left( {\begin{array}{*{20}c} {Q_{1} } \\ {Q_{2} } \\ {Q_{3} } \\ \end{array} } \right)^{ - } } \right]^{t} \hfill \\ + \left[ {\begin{array}{*{20}c} 1 & 0 \\ 0 & 1 \\ 0 & 1 \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {H_{1} } \\ {H_{2} } \\ \end{array} } \right]^{t + \Delta t} + \left[ {\begin{array}{*{20}c} 0 & 0 \\ 0 & 0 \\ { - 1} & 0 \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {H_{1} } \\ {H_{2} } \\ \end{array} } \right]^{t} + \left[ {\begin{array}{*{20}c} { - 1} \\ { - 1} \\ 0 \\ \end{array} } \right]\left[ {H_{0} } \right] \hfill \\ + \left[ {\begin{array}{*{20}c} {\frac{{f_{1} \Delta ta_{1} }}{{2D_{1} gA_{1}^{2} }}\left| {Q_{1} } \right|^{ - } } & 0 & 0 \\ 0 & {\frac{{f_{2} \Delta ta_{2} }}{{2D_{2} gA_{2}^{2} }}\left| {Q_{2} } \right|^{ - } } & 0 \\ 0 & 0 & {\frac{{f_{3} \Delta ta_{3} }}{{2D_{3} gA_{3}^{2} }}\left| {Q_{3} } \right|^{ - } } \\ \end{array} } \right]\left[ {\left( {\begin{array}{*{20}c} {Q_{1} } \\ {Q_{2} } \\ {Q_{3} } \\ \end{array} } \right)^{ - } } \right]^{t} = 0 \hfill \\ \end{aligned}$$
(85)
$$\begin{aligned} \left[ {\begin{array}{*{20}c} {\frac{{a_{1} }}{{gA_{1} }}} & 0 & 0 \\ 0 & {\frac{{a_{2} }}{{gA_{2} }}} & 0 \\ 0 & 0 & {\frac{{a_{3} }}{{gA_{3} }}} \\ \end{array} } \right]\left[ {\left( {\begin{array}{*{20}c} {Q_{1} } \\ {Q_{2} } \\ {Q_{3} } \\ \end{array} } \right)^{ - } } \right]^{t + \Delta t} - \left[ {\begin{array}{*{20}c} {\frac{{a_{1} }}{{gA_{1} }}} & 0 & 0 \\ 0 & {\frac{{a_{2} }}{{gA_{2} }}} & 0 \\ 0 & 0 & {\frac{{a_{3} }}{{gA_{3} }}} \\ \end{array} } \right]\left[ {\left( {\begin{array}{*{20}c} {Q_{1} } \\ {Q_{2} } \\ {Q_{3} } \\ \end{array} } \right)^{ + } } \right]^{t} \hfill \\ + \left[ {\begin{array}{*{20}c} 1 & 0 \\ 0 & 1 \\ 0 & 1 \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {H_{1} } \\ {H_{2} } \\ \end{array} } \right]^{t + \Delta t} + \left[ {\begin{array}{*{20}c} 0 & 0 \\ 0 & 0 \\ { - 1} & 0 \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {H_{1} } \\ {H_{2} } \\ \end{array} } \right]^{t} + \left[ {\begin{array}{*{20}c} { - 1} \\ { - 1} \\ 0 \\ \end{array} } \right]\left[ {H_{0} } \right] \hfill \\ + \left[ {\begin{array}{*{20}c} {\frac{{f_{1} \Delta ta_{1} }}{{2D_{1} gA_{1}^{2} }}\left| {Q_{1} } \right|^{ + } } & 0 & 0 \\ 0 & {\frac{{f_{2} \Delta ta_{2} }}{{2D_{2} gA_{2}^{2} }}\left| {Q_{2} } \right|^{ + } } & 0 \\ 0 & 0 & {\frac{{f_{3} \Delta ta_{3} }}{{2D_{3} gA_{3}^{2} }}\left| {Q_{3} } \right|^{ + } } \\ \end{array} } \right]\left[ {\left( {\begin{array}{*{20}c} {Q_{1} } \\ {Q_{2} } \\ {Q_{3} } \\ \end{array} } \right)^{ + } } \right]^{t} = 0. \hfill \\ \end{aligned}$$
(86)

By simplifying Eqs. (85) and (86), characteristic equations are acquired as follows:

$$C_{1}^{ + } : \frac{{a_{1} }}{{gA_{1} }}\left( {\left( {Q_{1}^{ + } } \right)^{t + \Delta t} - \left( {Q_{1}^{ - } } \right)^{t} } \right) + \left( {H_{1}^{t + \Delta t} - H_{0} } \right) + \frac{{f_{1} \Delta ta_{1} }}{{2D_{1} gA_{1}^{2} }}\left( {Q_{1}^{ - } } \right)^{t} \left| {Q_{1}^{ - } } \right|^{t} = 0,$$
(87)
$$\frac{\Delta x}{\Delta t} = + a_{1} .$$
(88)
$$C_{1}^{ - } : \frac{{a_{1} }}{{gA_{1} }}\left( {\left( {Q_{1}^{ - } } \right)^{t + \Delta t} - \left( {Q_{1}^{ + } } \right)^{t} } \right) - \left( {H_{0} - H_{1}^{t} } \right) + \frac{{f_{1} \Delta ta_{1} }}{{2D_{1} gA_{1}^{2} }}\left( {Q_{1}^{ + } } \right)^{t} \left| {Q_{1}^{ + } } \right|^{ + } = 0,$$
(89)
$$\frac{\Delta x}{\Delta t} = - a_{1}$$
(90)
$$C_{2}^{ + } : \frac{{a_{2} }}{{gA_{2} }}\left( {\left( {Q_{2}^{ + } } \right)^{t + \Delta t} - \left( {Q_{2}^{ - } } \right)^{t} } \right) + \left( {H_{2}^{t + \Delta t} - H_{0} } \right) + \frac{{f_{2} \Delta ta_{2} }}{{2D_{2} gA_{2}^{2} }}\left( {Q_{2}^{ - } } \right)^{t} \left| {Q_{2}^{ - } } \right|^{t} = 0,$$
(91)
$$\frac{\Delta x}{\Delta t} = + a_{2}$$
(92)
$$C_{2}^{ - } : \frac{{a_{2} }}{{gA_{2} }}\left( {\left( {Q_{2}^{ - } } \right)^{t + \Delta t} - \left( {Q_{2}^{ + } } \right)^{t} } \right) - \left( {H_{0} - H_{2}^{t} } \right) + \frac{{f_{2} \Delta ta_{2} }}{{2D_{2} gA_{2}^{2} }}\left( {Q_{2}^{ + } } \right)^{t} \left| {Q_{2}^{ + } } \right|^{ + } = 0,$$
(93)
$$\frac{\Delta x}{\Delta t} = - a_{2}$$
(94)
$$C_{3}^{ + } : \frac{{a_{3} }}{{gA_{3} }}\left( {\left( {Q_{3}^{ + } } \right)^{t + \Delta t} - \left( {Q_{3}^{ - } } \right)^{t} } \right) + \left( {H_{2}^{t + \Delta t} - H_{1}^{t} } \right) + \frac{{f_{3} \Delta ta_{3} }}{{2D_{3} gA_{3}^{2} }}\left( {Q_{3}^{ - } } \right)^{t} \left| {Q_{3}^{ - } } \right|^{t} = 0,$$
(95)
$$\frac{\Delta x}{\Delta t} = + a_{3}$$
(96)
$$C_{3}^{ - } : \frac{{a_{3} }}{{gA_{3} }}\left( {\left( {Q_{3}^{ - } } \right)^{t + \Delta t} - \left( {Q_{3}^{ + } } \right)^{t} } \right) - \left( {H_{1}^{t + \Delta t} - H_{2}^{t} } \right) + \frac{{f_{3} \Delta ta_{3} }}{{2D_{3} gA_{3}^{2} }}\left( {Q_{3}^{ + } } \right)^{t} \left| {Q_{3}^{ + } } \right|^{ + } = 0,$$
(97)
$$\frac{\Delta x}{\Delta t} = - a_{3} .$$
(98)

Equations (87)–(98) are identical to Eqs. (10) and (11) for this three-pipe network.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Moosavian, N., Lence, B. Unified Matrix Frameworks for Water Hammer Analysis in Pipe Networks. Int J Civ Eng 18, 1327–1345 (2020). https://doi.org/10.1007/s40999-020-00546-z

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s40999-020-00546-z

Keywords

Navigation