# Water hammer and expansion waves

I was thinking about the relationship between water hammer and expansion waves. Pressure seems to drop across a surge wave travelling at the speed of sound in water hammer (after the fluid has been initially brought to rest by a compression). Pressure also drops across an expansion wave (e.g. a rarefaction fan). I know they are not the same, but my question is - "is the wave travelling at the speed of sound in water hammer more like an expansion rather than a compression (or is it the other way round)?"

The simple answer is both - flow never really cares about travelling "out of a high density" or "into a low density" zone, it just travels from areas where there are density differentials. However, your intuition is right - and I personally consider it more of an expansion wave than a compression wave. The reasons are complicated, as you would imagine for a question that remained unanswered for two years. The short version is you consider the expansion of the pipe in the first half while the fluid compresses. In the second half, when the pipe compresses back to it's unstressed state, the fluid expands backwards to the source to refill the reservoir from whence it started flowing. Sometimes that's a pump, not a reservoir, which can cause additional problems.

A source I have has a rigid mathematical model to water hammer, as well as a few other situations. For more, see Analysis and Design of Energy Systems, 3rd Edition, by BK Hodge and Robert P Taylor - ISBN 978-0135259733, specifically chapter 7. The simplest model is a water filled tank, with water at height h, connected via a long pipe of length l, diameter D, with a valve at the end of the pipe. We begin with fluid in the pipe, and open the valve. Working through the continuum mechanics, we find the equation for the fluid beginning to flow out through the valve follows along the lines of:

$$-\frac{\partial H}{\partial x} - \left(\frac{\partial z}{\partial x} = 0 \right) -\frac{fV|V|}{2gD} = \frac{1}{g}\frac{dV}{dt}$$

Note the weight per volume, $\gamma$ is treated as a constant - this is considered a rigid body of water. Integrating across the pipe, pretending $f$ (the friction factor) is constant, and dividing the pressure by the specific weight to treat this as fluid head, we wind up with:

$$H-\frac{fL}{D}\frac{V^2}{2g} = \frac{L}{g}\frac{dV}{dt}$$

A simple differential equation to solve for flow development velocity $V$ with respect to time. For closing the valve, the water is treated as compressible, but so is the pipe and as a result the pipe bulges with stored potential energy. As a result, the speed of water hammer is a combination of the speed of sound of water and the pipe, and slightly less than the speed of sound in water:

$$a =\left(\frac{Kg}{\rho(1+(K/E)c)}\right)^\frac{1}{2}$$

where $K$ is the bulk modulus of the fluid, $E$ is the modulus of the pipe, and $c$ is an empirical factor that varies from 0 to $\infty$, but is on the order of the ratio of the Diameter of the pipe to the pipe wall thickness. Note that plastic and flexible pipes will have a slower hammer speed because of a higher $(K/E)$ ratio. The water hammer is modeled with a second wave equation coupled to the original:

$$\frac{a^2}{g}\frac{\partial V}{\partial x} + \frac{\partial H}{\partial t} = 0$$

The source goes on with methods of using these equations together to get useful finite-element based numerical results. In this, water is returned back to the original tank, the pipe compresses excessively, and as the pipe returns back to the original unstressed state, the liquid fills back up under pressure from the reservoir and the second cycle repeats, dampened by the friction factor only. As such, the main results to be seen is that:

1. Depending upon what you look at, the fluid compresses, followed by the pipe compressing
2. Or ... the pipe expands from a low stress state to a high stress state, followed by the fluid expanding to form a high head.
3. Both are valid ways to look at it, but the second seems more intuitive, and captures the main point of the danger of water hammer - it will damage your pipes if you fail to account for it!