Water hammer (or, more generally, fluid hammer) is a pressure surge or wave caused when a fluid (usually a liquid but sometimes also a gas) in motion is forced to stop or change direction suddenly (momentum change). Water hammer commonly occurs when a valve closes suddenly at an end of a pipeline system, and a pressure wave propagates in the pipe. It's also called hydraulic shock.
This pressure wave can cause major problems, from noise and vibration to pipe collapse. It is possible to reduce the effects of the water hammer pulses with accumulators and other features.
Rough calculations can be made either using the Joukowsky equation, or more accurate ones using the method of characteristics.
Cause and effect 
If the pipe is suddenly closed at the outlet (downstream), the mass of water before the closure is still moving forward with some velocity, building up a high pressure and shock waves. In domestic plumbing this is experienced as a loud banging resembling a hammering noise. Water hammer can cause pipelines to break if the pressure is high enough. Air traps or stand pipes (open at the top) are sometimes added as dampers to water systems to provide a cushion to absorb the force of moving water to prevent damage to the system.
In hydroelectric generating stations, the water travelling along the tunnel or pipeline may be prevented from entering a turbine by closing a valve. However, if, for example, there is 14 km of tunnel of 7.7 m diameter, full of water travelling at 3.75 m/s, that represents a very large amount of kinetic energy that must be arrested. This is frequently achieved by a surge shaft open at the top, into which the water flows. As the water rises up the shaft, converting kinetic energy into potential energy, it decelerates the water in the tunnel. At some HEP stations, what looks like a water tower is actually one of these devices, known in these cases as a surge drum.
In the home, water hammer may occur when a dishwasher, washing machine, or toilet shuts off water flow. The result may be heard as a loud bang, repetitive banging (as the shock wave travels back and forth in the plumbing system), or as some shuddering.
On the other hand, when an upstream valve in a pipe closes, water downstream of the valve attempts to continue flowing, creating a vacuum that may cause the pipe to collapse or implode. This problem can be particularly acute if the pipe is on a downhill slope. To prevent this, air and vacuum relief valves, or air vents, are installed just downstream of the valve to allow air to enter the line and prevent this vacuum from occurring.
Other causes of water hammer are pump failure, and check valve slam (due to sudden deceleration, a check valve may slam shut rapidly, depending on the dynamic characteristic of the check valve and the mass of the water between a check valve and tank).
Related phenomena 
Steam distribution systems may also be vulnerable to a situation similar to water hammer, known as steam hammer. In a steam system, water hammer most often occurs when some of the steam condenses into water in a horizontal section of the steam piping. Subsequently, steam picks up the water, forms a "slug" and hurls it at high velocity into a pipe fitting, creating a loud hammering noise and greatly stressing the pipe. This condition is usually caused by a poor condensate drainage strategy.
Where air filled traps are used, these eventually become depleted of their trapped air over a long period of time through absorption into the water. This can be cured by shutting off the supply, opening taps at the highest and lowest locations to drain the system (thereby restoring air to the traps), and then closing the taps and re-opening the supply.
Water hammer during an explosion 
When an explosion happens in an enclosed space, water hammer can cause the walls of the container to deform. However, it can also impart momentum to the enclosure if it is free to move. An underwater explosion in the SL-1 nuclear reactor vessel caused the water to accelerate upwards through 0.76 m (2.5 ft) of air before it struck the vessel head at 49 m/s (160 ft/s) with a pressure of 680 atm (69,000 kPa). This pressure wave caused the 12,000 kg (26,000 lb) steel vessel to jump 2.77 m (9.1 ft) into the air before it dropped into its prior location.
Mitigating measures 
Water hammer has caused accidents and fatalities, but usually damage is limited to breakage of pipes or appendages. An engineer should always assess the risk of a pipeline burst. Pipelines transporting hazardous liquids or gases warrant special care in design, construction, and operation.
The following characteristics may reduce or eliminate water hammer:
- Reduce the pressure of the water supply to the building by fitting a regulator.
- Lower fluid velocities. To keep water hammer low, pipe-sizing charts for some applications recommend flow velocity at or below 1.5 m/s (4.9 ft/s)
- Fit slowly-closing valves. Toilet fill valves are available in a quiet fill type that closes quietly.
- High pipeline pressure rating (expensive).
- Good pipeline control (start-up and shut-down procedures).
- Water towers (used in many drinking water systems) help maintain steady flow rates and trap large pressure fluctuations.
- Air vessels work in much the same way as water towers, but are pressurized. They typically have an air cushion above the fluid level in the vessel, which may be regulated or separated by a bladder. Sizes of air vessels may be up to hundreds of cubic meters on large pipelines. They come in many shapes, sizes and configurations. Such vessels often are called accumulators or expansion tanks.
- A hydropneumatic device similar in principle to a shock absorber called a 'Water Hammer Arrestor' can be installed between the water pipe and the machine, to absorb the shock and stop the banging.
- Air valves often remediate low pressures at high points in the pipeline. Though effective, sometimes large numbers of air valves need be installed. These valves also allow air into the system, which is often unwanted.
- Shorter branch pipe lengths.
- Shorter lengths of straight pipe, i.e. add elbows, expansion loops. Water hammer is related to the speed of sound in the fluid, and elbows reduce the influences of pressure waves.
- Arranging the larger piping in loops that supply shorter smaller run-out pipe branches. With looped piping, lower velocity flows from both sides of a loop can serve a branch.
- Flywheel on pump.
- Pumping station bypass.
- Hydroelectric power plants must be carefully designed and maintained because the water hammer can cause water pipes to fail catastrophically.
The magnitude of the pulse 
One of the first to successfully investigate the water hammer problem was the Italian engineer Lorenzo Allievi.
Water hammer can be analyzed by two different approaches—rigid column theory, which ignores compressibility of the fluid and elasticity of the walls of the pipe, or by a full analysis that includes elasticity. When the time it takes a valve to close is long compared to the propagation time for a pressure wave to travel the length of the pipe, then rigid column theory is appropriate; otherwise considering elasticity may be necessary. Below are two approximations for the peak pressure, one that considers elasticity, but assumes the valve closes instantaneously, and a second that neglects elasticity but includes a finite time for the valve to close.
Instant valve closure; compressible fluid 
So for a valve closing instantaneously, the maximum magnitude of the water hammer pulse is:
where ΔP is the magnitude of the pressure wave (Pa), ρ is the density of the fluid (kgm−3), a0 is the speed of sound in the fluid (ms−1), and Δv is the change in the fluid's velocity (ms−1). The pulse comes about due to Newton's laws of motion and the continuity equation applied to the deceleration of a fluid element.
Equation for wave speed 
As the speed of sound in a fluid is the , the peak pressure depends on the fluid compressibility if the valve is closed abruptly.
- a = wave speed
- K = bulk modulus of elasticity of the fluid
- ρ = density of the fluid
- E = elastic modulus of the pipe
- D = internal pipe diameter
- t = pipe wall thickness
- c = dimensionless parameter due to system pipe-constraint condition on wave speed[page needed]
Slow valve closure; incompressible fluid 
When the valve is closed slowly compared to the transit time for a pressure wave to travel the length of the pipe, the elasticity can be neglected, and the phenomenon can be described in terms of inertance or rigid column theory:
Assuming constant deceleration of the water column (dv/dt = v/t), gives:
- F = force, N
- m = mass of the fluid column, kg
- a = acceleration, m/s2
- P = pressure, Pa
- A = pipe cross section, m2
- ρ = fluid density, kg/m3
- L = pipe length, m
- v = fluid velocity, m/s
- t = valve closure time, s
The above formula becomes, for water and with imperial unit: P = 0.0135 V L/t. For practical application, a safety factor of about 5 is recommended:
where P1 is the inlet pressure in psi, V is the flow velocity in ft/sec, t is the valve closing time in seconds and L is the upstream pipe length in feet.
Expression for the excess pressure due to water hammer 
When a valve with a volumetric flow rate Q is closed, an excess pressure δP is created upstream of the valve, whose value is given by the Joukowsky equation:
In this expression:
- overpressurization δP is expressed in Pa;
- Q is the volumetric flow in m3/s;
- Zh is the hydraulic impedance, expressed in kg/m4/s.
The hydraulic impedance Zh of the pipeline determines the magnitude of the water hammer pulse. It is itself defined by:
- ρ the density of the liquid, expressed in kg/m3;
- A cross sectional area of the pipe, m2;
- Beff effective modulus of compressibility of the liquid in the pipe, expressed in Pa.
The latter follows from a series of hydraulic concepts:
- compressibility of the liquid, defined by its adiabatic compressibility modulus Bl, resulting from the equation of state of the liquid generally available from thermodynamic tables;
- the elasticity of the walls of the pipe, which defines a modulus of equivalent compressibility Beq. In the case of a pipe of circular cross section whose thickness e is small compared to the diameter D, the equivalent modulus of compressibility is given by the following formula: ; in which E is the Young's modulus (in Pa) of the material of the pipe;
- possibly compressibility Bg of gas dissolved in the liquid, defined by:
- γ being the ratio of specific heats of the gas
- α the rate of ventilation (the volume fraction of undissolved gas)
- and P the pressure (in Pa).
Thus, the effective compressibility modulus is:
As a result, we see that we can reduce the water hammer by:
- increasing the pipe diameter at constant flow, which reduces the inertia of the liquid column;
- choosing to use a material with a reduced Young's modulus;
- introducing a device that increases the flexibility of the entire hydraulic system, such as a hydraulic accumulator;
- where possible, increasing the percentage of undissolved air in the liquid.
Dynamic equations 
The water hammer effect can be simulated by solving the following partial differential equations.
where V is the fluid velocity inside pipe, is the fluid density and is the equivalent bulk modulus, f is the friction factor.
Column separation 
Column separation is a phenomenon that can occur during a water-hammer event. If the pressure in a pipeline drops rapidly to the vapor pressure of the liquid, the liquid vaporises and a "bubble" of vapor forms in the pipeline. This is most likely to occur at specific locations such as closed ends, high points or knees (changes in pipe slope). When the pressure later increases above the vapor pressure of the liquid, the vapor in the bubble returns to a liquid state, which leaves a vacuum in the space formerly occupied by the vapor. The liquid either side of the vacuum is then accelerated into this space by the pressure difference. The collision of the two columns of liquid, (or of one liquid column if at a closed end,) results in cavitation and causes a large and nearly instantaneous rise in pressure. This pressure rise can damage hydraulic machinery, individual pipes and supporting structures. Many repetitions of cavity formation and collapse may occur in a single water-hammer event.
Simulation software 
Most water hammer software packages use the method of characteristics  to solve the differential equations involved. This method works well if the wave speed does not vary in time due to either air or gas entrainment in a pipeline. The Wave Method (WM) is also used in various software packages. WM lets operators analyze large networks efficiently. Many commercial and non commercial packages are available.
Software packages vary in complexity, dependent on the processes modeled. The more sophisticated packages may have any of the following features:
- Multiphase flow capabilities
- An algorithm for cavitation growth and collapse
- Unsteady friction - the pressure waves dampens as turbulence is generated and due to variations in the flow velocity distribution
- Varying bulk modulus for higher pressures (water becomes less compressible)
- Fluid structure interaction - the pipeline reacts on the varying pressures and causes pressure waves itself
- The water hammer principle can be used to create a simple water pump called a hydraulic ram.
- Leaks can sometimes be detected using water hammer.
- Enclosed air pockets can be detected in pipelines.
Water hammer was exploited before there was even a word for it: In 1772, Englishman John Whitehurst built a hydraulic ram for a home in Cheshire, England. In 1796, French inventor Joseph Michel Montgolfier (1740-1810) built a hydraulic ram for his paper mill in Voiron. In French and Italian, the terms for "water hammer" come from the hydraulic ram: coup de bélier (French) and colpo d’ariete (Italian) both mean "blow of the ram". As the 19th century witnessed the installation of municipal water supplies, water hammer became a concern to civil engineers. Water hammer also interested physiologists who were studying the circulatory system.
The theory of water hammer began in 1883 with the work of German physiologist Johannes von Kries (1853-1928), who was investigating the pulse in blood vessels. However, his findings went unnoticed by civil engineers. Kries's findings were subsequently derived independently in 1898 by the Russian fluid dynamicist Nikolay Yegorovich Zhukovsky (1847-1921), in 1898 by the American civil engineer Joseph Palmer Frizell (1832-1910), and in 1902 by the Italian engineer Lorenzo Allievi (1856-1941).
See also 
- Blood hammer
- Fluid dynamics
- Hydraulophone – musical instruments employing water and other fluids
- Impact force
- Watson's water hammer pulse
- Kay, Melvyn (2008). Practical Hydraulics (2nd ed.). Taylor & Francis. ISBN 0-415-35115-4.
- Flight Propulsion Laboratory Department, General Electric Company, Idaho Falls, Idaho (November 21, 1962), Additional Analysis of the SL-1 Excursion: Final Report of Progress July through October 1962, U.S. Atomic Energy Commission, Division of Technical Information, IDO-19313; also TM-62-11-707
- Bruce, S.; Larock, E.; Jeppson, R. W.; Watters, G. Z. (2000), Hydraulics of Pipeline Systems, CRC Press, ISBN 0-8493-1806-8
- Thorley, A. R. D. (2004), Fluid Transients in Pipelines (2nd ed.), Professional Engineering Publishing, ISBN 0-79180210-8[page needed]
- Streeter, V. L.; Wylie, E. B. (1998), Fluid Mechanics (International 9th Revised ed.), McGraw-Hill Higher Education[page needed]
- "Water Hammer & Pulsation"
- Faisandier, J., Hydraulic and Pneumatic Mechanisms, 8th edition, Dunod, Paris, 1999 (ISBN 2100499483)
- Bergeron, L., 1950. Du Coup de Bélier en Hydraulique - Au Coup de Foudre en Electricité. (Waterhammer in hydraulics and wave surges in electricity.) Paris: Dunod (in French). (English translation by ASME Committee, New York: John Wiley & Sons, 1961.)
- Whitehurst, John (1775) "Account of a machine for raising water, executed at Oulton, in Cheshire, in 1772," Philosophical Transactions of the Royal Society of London, 65 : 277–279. (See also plate preceeding page 277.)
- Montgolfier, J.M. de (1803). "Note sur le bélier hydraulique, et sur la manière d’en calculer les effets" (Note on the hydraulic ram, and on the method of calculating its effects), Journal des Mines, 13 (73) : 42-51. Available on-line at: Journal des Mines.
- Tijsseling, A.S., Anderson, A. (2008). "Thomas Young's research on fluid transients: 200 years on," Proceedings of the 10th International Conference on Pressure Surges, Edinburgh, U. K., pages 21-33; see page 22. Available on-line at: Technical University of Eindhoven.
- See, for example:
- Ménabréa, L. F. (1858) "Note sur les effects de choc de l’eau dans les conduites," (Note on the effects of water shocks in pipes), Comptes rendus, 47 : 221–224.
- Michaud, J. (1878) "Coups de bélier dans les conduites. Étude des moyens employés pour en atténeur les effects" (Water hammer in pipes. Study of means used to mitigate its effects), Bulletin de la Société Vaudoise des Ingénieurs et des Architects, 4 (3,4) : 56–64, 65–77.
- J. von Kries (1883) "Ueber die Beziehungen zwischen Druck und Geschwindigkeit, welche bei der Wellenbewegung in elastischen Schläuchen bestehen" (On the relationship between pressure and velocity, which exist in connection with wave motion in elastic tubing), Festschrift der 56. Versammlung Deutscher Naturforscher und Ärzte (Festschrift of the 56th Convention of German Scientists and Physicians), (Tübingen, Germany: Akademische Verlagsbuchhandlung, 1883), pages 67-88.
- J. von Kries, Studien zur Pulslehre (Studies in Pulse Science) (Tübingen, Germany: Akademische Verlagsbuchhandlung, 1892).
- Arris S. Tijsseling and Alexander Anderson (2004) "A precursor in waterhammer analysis – rediscovering Johannes von Kries," Proceedings of the 9th International Conference on Pressure Surges, Chester, U.K., pages 739-751. Available on-line at: Technical University of Eindhoven.
- Arris S. Tijsseling and Alexander Anderson (2007) "Johannes von Kries and the history of water hammer," Journal of Hydraulic Engineering, 133 (1) : 1-8.
- Joukowsky, N. (1898). "Über den hydraulischen Stoss in Wasserleitungsröhren" (On the hydraulic hammer in water supply pipes), Mémoires de l'Académie Impériale des Sciences de St.-Pétersbourg (1900), series 8, 9 (5) : 1-71.
- Arris S. Tijsseling and Alexander Anderson, (2006) "The Joukowsky equation for fluids and solids". Available on-line at: Technical University of Eindhoven.
- Frizell, J.P. (1898) "Pressures resulting from changes of velocity of water in pipes," Transactions of the American Society of Civil Engineers, 39 : 1-18.
- R. A. Hale (Sept. 1911) Obituary: "Joseph Palmer Frizell, M. Am. Soc. C. E.," Transactions of the American Society of Civil Engineers, 73 : 501-503.
- Allievi, L. (1902) "Teoria generale del moto perturbato dell'acqua nei tubi in pressione (colpo d’ariete)" (General theory of the perturbed motion of water in pipes under pressure (water hammer)), Annali della Società degli Ingegneri ed Architetti Italiani (Annals of the Society of Italian Engineers and Architects), 17 (5): 285-325.