Water Hammer Analysis

Water hammer is part of the larger subject of transient flow or surge analysis. It is the special case when there is a sudden change in flow velocity.  Usually this occurs when a valve closes quickly. Water hammer can generate very high pressure transients which could burst a pipe and can generate pipeline vibrations. The magnitude of the water hammer pressure rise can be calculated using the Joukowsky equation which is


P=ρCU  (Pa)


P             is the change in pressure

ρ             is the fluid density

U             is the change in fluid velocity

C             is the sonic velocity in the pipe

The sonic velocity is the speed of sound in the pipe and is determined by a modified hooks law formula which takes into account the stiffness of the fluid and the pipe wall.


sonic wave speed in pipes


K             Bulk modulus of fluid

E              Young’s modulus of pipe material

e             Wall thickness of pipe

The sonic velocity is also the speed at which the pressure waves generated by water hammer travel in the pipe.

For water in very stiff pipes the sonic speed could be as high as 1480 m/s.  But in some plastic pipe the wave speed can be lower than 200 m/s.

The bulk modulus (k) of water is 2.19x109 Pa however this assumes that the water has no air bubbles in it. Often microscopic size bubbles can be seen suspended in the fluid. This can make a significant difference to the effective bulk modulus and so to the sonic speed. Often with water hammer sub atmospheric pressure and cavitation can also occur (as explained below). This can liberate dissolved air from the water which forms air bubbles reducing the effective bulk modulus and so reducing the wave speed.


Valve Closure Example of Water Hammer.

Figure 1

Figure 1 shows the initial conditions in the pipe. The pipe inlet at position A is connected to a header tank which provides the pressure P1 to drive the flow in the pipe. The other end of the pipe at position B is open to atmosphere and its pressure is P0


The length of the pipe is L.

Figure 2


Figure 2 shows the pipe and flow conditions just after the pipe end at B has been instantaneously   closed at time t0. A pressure wave at position X is traveling up the pipe with velocity C (the sonic velocity). The pressure rise across the wave is ρCU (Joukowsky equation). Upstream of position X the velocity is the initial velocity Ui. Downstream of X the velocity is 0.

Between X and B the fluid will be compressed and the pipe will be expanded. The rate of pipe volume change and fluid compression is the same as the flow rate upstream of X.


Figure 3 shows the conditions when the pressure wave reaches position A at time t1. The pipeline pressure has been raised by ρCUi and the fluid velocity is 0 throughout. This condition is unstable as the pipe inlet pressure is set by the head of fluid in the inlet tank h. So now the fluid needs to move in the reverse direction from the high pressure pipe into the lower pressure tank. This induces the first wave reflection and it occurs at time t1.

Where t1=t0+L/C


Figure 4 shows the conditions after the first reflection. The pressure wave is at position X and is traveling down the pipe with velocity C. The fluid between positions A and X is traveling in the reverse direction with velocity –Ui. The drop in pressure across the wave front is ρC(-Ui).


Figure 5 shows the conditions when the pressure wave reaches position B at time t2. The whole of the pipeline pressure has been reduced and the fluid velocity is -Ui throughout.

It should be noted there will be a small negative pressure gradient between A & B. This is required to overcome friction between the fluid and pipe as the flow is in the opposite direction. The magnitude of this pressure gradient will usually be significantly smaller than that generated by the change in velocity (Joukowsky equation). This friction gradient is exaggerated in the figure in comparison to water hammer effect for demonstration purposes.

As the end of the pipe at B is closed, this condition is unstable as there is fluid available to sustain the flow. This induces the second wave reflection at time t2.

Where t2=t1+L/C or t2=t0+2L/C.


Figure 6 shows the conditions after the second reflection. The pressure wave is at position X and it is traveling up the pipe with velocity C’. The fluid between positions A and X is still traveling in the reverse direction with velocity –Ui. The fluid between X and B has been stopped.

The drop in pressure across the wave front is ρC’(-Ui). It should be noted that in this case the wave speed or sonic velocity has been changed from C to C’. C’ may be the same or less than C, it depends on the minimum allowable pressure P3. Negative absolute pressures are not possible. The minimum pressure in the pipe line cannot be less than the vapour pressure of fluid and often the minimum pressure is higher than the vapour pressure because there is dissolved gas in the fluid which comes out of solution as the pressure is reduced. When cavitation occurs or gas comes out of solution the bulk modulus of fluid is reduced form K to K’.   It is this reduction bulk modulus that allows the sonic speed to reduce from C to C’ .So all depending on minimum possible pressure the magnitude of C’ will adjust its self so that P3 is not lower than minimum possible pressure.

The formulas for wave speed and the Joukowsky equation are still valid when cavitation occurs but the bulk modulus will have reduced so ensuring consistency in the equations and no impossible pressures.

Figure_7_ third_wave_reflection

Figure 7 shows the conditions when the pressure wave reaches position A at time t3. The whole of the pipeline pressure has been reduced to P3 and the fluid velocity is 0 throughout. This condition is unstable as the pipe inlet pressure set by the head of fluid in the inlet tank h is higher than the pipe pressure so now the fluid needs to move into the pipe from the header tank. This induces the third wave reflection and it occurs at time t3.

Where t3=t2+L/C’ or t3=t0+2L/C+L/C’

Figure_8 _Just_after_third_wave_reflection

Figure 8 shows the conditions after the third reflection. The pressure wave is at position X, its traveling down the pipe with velocity C’. The fluid between positions A and X is still traveling in the normal direction with velocity Ui’. The fluid between X and B is stopped. The velocity in section A to X is shown as  Ui’ where Ui’ is slightly less than Ui. By this stage the process has undergone 3 reflections and at every stage some energy is lost so over time the magnitude of the pressure waves and velocities are reducing.

The sonic wave velocity is still the reduced velocity C’ as shown in figure 8. But if previously air or vapour had been liberated from the fluid then the vapour will be re-condense and gas bubbles will reduce in size and may start to go back into solution.

Figure_9_ fourth_wave_reflection

Figure 9 shows the conditions when the pressure wave reaches position B at time t4. As can be seen this is almost identical to the conditions shown in figure 1. The main difference is the velocity Ui’ is a little lower than the original Ui. As the end of the pipe is closed there is nowhere for the fluid at B to go. So this will induce the final reflection at time t4 and then the whole process is repeated.

Where t4=t3+L/C’ or t4=t0+2L/C+2L/C’


Figure 10 shows the condition after the forth reflection. The cycle has now began to repeat however the water hammer pressure is now reduced a little from P2 (figure 2) to P2’. This reduction in pressure has two causes. The fluid velocity has been reduced due to energy losses.

The sonic velocity C’’ may be less than the original sonic velocity C. If during the previous stages shown in figures 8 and 9 any gas was liberated from the fluid then this gas volume will have been reduced, however it takes time for the gas to be completely reabsorbed so there is likely to be small residual gas bubbles in the fluid. These gas bubbles will reduce the fluid bulk modulus so reducing the sonic speed.

Over a number of cycles the water hammer will eventually peter out. The pipe pressure will end up at P1 and the flow will stop oscillating.

YouTube Water Hammer Explained


Water Hammer Wave Reflection and Valve Closure Time

  • Tony

    In a situation where you are pumping against a closed valve at certain velocity u1 and you shut down abrubtly due to a mechanical obstruction (imagine a valve downstream) Is there a way to find out where this obstruction is, if we are give the upstream harmonic pressure response

  • Not sure I really understand your description, but it might be possible if the obstruction closes the pipe 100%. If you know the natural frequency period, then the distance to the blockage is period / 4 * sonic velocity. Alternatively you could do a pressure test and measure how much fluid is required to bring the pipe up to pressure then knowing the stiffness of the pipe and bulk modulus of the fluid you can work out the volume of the fluid to the blockage and then calculate the length.
    I think it will be difficult to use either method unless the obstruction provides 100% closure of the pipe. Also if there is any air in the pipe then both methods will give unreliable results.

  • Tony

    Hello Profressor,
    Yes the obstruction closes 100% of the pipe but I do not know excatly where this obstruction is. I was only given the pressure wave (there is a positive displacement pump on one end and the obstruction on the other end of the pipe), rate that we were pumping before the closure and pipe dimension (medium is water).

  • The best method assuming there is no air or leak in the pipe, is to slowly pump up the pressure in the pipe. and plot pressure against the pumped volume. Knowing the bulk modulus of the fluid and pipeline specification you can work out the total volume in the pipe. And from that you can work out the length.

  • sawsan Bataineh


  • Christian Nelson

    What happens when you open the valve again 1 second after it is closed? This is done when drilling wells to send a pressure pulse to the surface. Does the pressure spike that travels up the well decay as a function of the distance traveled?

  • In theory in an ideal system with no friction or other losses, a pressure pulse will travel up the pipe with low pressure on both sides of the pulse. In practise friction and other effects will tend to attenuate the pressure pulse so if it is a short pulse in a long pipeline it could be significantly attenuated.

  • daniel

    Many thanks for the explanation. The example is with a tank, but what happens if you are pumping and suddenly you close the valve? Would the reverse flow reach and damage the pump? if the pump is still on and then you close the valve what would be the system response?

  • If the tank is replaced with a pump the effect will be very much the same. When the pressure transient reaches the pump it will pressurize the pump to the surge pressure and depending on the pressure rating of the pump, it could damage it.
    However normally with a pumped system it would not look like the example above. You are often pumping from a low level reservoir to a high level reservoir and you would control the pump flow by controlling the pump speed and you would not use a valve at the end of the pipe. Also with pump systems you usually have a non return valve just after the pump. None return valves will significantly change the surge response of the system.

  • daniel


  • Ntu2ko

    Good day Professor

    Firstly, thank you very much for the informative videos. They are highly appreciated.
    Secondly, you mention in your second video the prospect of making a third one involving a branch. I am highly looking forward to that video. Are you still planning on making it?

    Thanks again.

    Ntuthuko – South Africa

  • Thank you for your comments. Unfortunately I don’t currently have time to put together another video. It will probably be next year before I can do this video. Sorry.

  • Ntu2ko

    Okay no problem. Thanks again for the time and effort you put into those two videos. They are the best teachings on transient flows I’ve come across. Take care.

  • Ntu2ko

    Good day Mike

    In your second video you mention that as long as the valve closure time is less than 2L/c the full Joukowsky head will develop. My thinking is the full Joukowsky head should develop even when valve closure time is greater than 2L/c. When the first wave reaches the opposite end and reflects, surely upon reflecting it will intersect and be absorbed by the next oncoming wave resulting from the valve still being closed, and so on? Hence only when the valve is fully closed and no more waves are propagated will reflection waves return to the valve unhindered. Is my thinking correct? Also, if you don’t mind, please could you explain or point me to an explanation of the application of this form of the Joukowski equation ∆H=(c/g).(dv/dt) and rigid column theory?

  • If the valve closure time is longer than 2L/c then the surge pressures generated will be lower than the Joukowsky pressure. Surge pressures are generated by changing momentum. The best way to prevent surge or water hammer is to close the valve very slowly. The longer the valve closure the lower the surge pressures.

  • admin

    hello test

  • Anonymous

    test 1

  • bschupp3

    How does this change if the fluid medium is a gas, rather than a liquid? I am curious about the application of the Joukowsky equation to a gas environment, but not sure if in the derivation it considers the fluid compressibility.

  • The equations are still correct for a gas. But with gases the surge pressures are significantly less. For example if we compare water and air. The speed of sound in water is about 4.4 times faster than air and the density is 833 times more. So the maximum surge pressure for water is 3666 times more than air at the same initial velocity. So generally the surge pressure for gases are not significant.

  • Rahul Garg

    sir, please give a lecture on MOC (Method of Characteristics) with a practical example of a simple reservoir-pipe-valve problem.

  • Rahul Garg

    i want to solve a transient problem in pipelines which is connected in series. three pipes r connected with each other with reducing diameter. this problem is give in the book titled hydraulic transients by streeter and wiley. but i cant able to solve this problem. please help me in this matter.

  • Things start to get complicated when you have different pipe diameters. I would normally use specialist software such as Wanda to solve these types of problems.

  • Sam Low

    Hi, do we need to get the valve flow coefficient for the surge pressure analysis? I am trying to solve this by using software pipenet. Some of the examples show it is required. Some of the manual calculation don’t even bother it. Could you please assist me on this?

  • If the valve closure is relatively fast, then valve characteristic is not so important. If it is slow (time>LC) then it becomes increasingly important. The reference book I use for this data is “Internal Flow Systems” By D. S. Miller. If you can, get the data from the valve manufacturer.

  • Sam Low

    Thanks for the reply sir. May I know how we calculate the change of the speed in the pipe? Moreover, in my case, the valve’s upstream piping is consists of different pipe sizes which is connected in series from the pump to the shutdown valve, which pipe length shall I need to consider?