Water hammer

Hydraulic shock (colloquial: water hammer; fluid hammer) is a pressure surge or wave caused when a fluid in motion, usually a liquid but sometimes also a gas is forced to stop or change direction suddenly; a momentum change. This phenomenon commonly occurs when a valve closes suddenly at an end of a pipeline system, and a pressure wave propagates in the pipe.
This pressure wave can cause major problems, from noise and vibration to pipe rupture or collapse. It is possible to reduce the effects of the water hammer pulses with accumulators, expansion tanks, surge tanks, blowoff valves, and other features. The effects can be avoided by ensuring that no valves will close too quickly with significant flow, but there are many situations that can cause the effect.
Rough calculations can be made using the Zhukovsky (Joukowsky) equation, or more accurate ones using the method of characteristics.
History.
In the 1st century B.C., Marcus Vitruvius Pollio described the effect of water hammer in lead pipes and stone tubes of the Roman public water supply. 
Water hammer was exploited before there was even a word for it.
The Alhambra, built by Nasrid Sultan Ibn al-Ahmar of Granada beginning AD1238, used a hydram to raise water. Through a first reservoir, filled by a channel from the Darro River, water emptied via a large vertical channel into a second reservoir beneath, creating a whirlpool that in turn propelled water through a much smaller pipe up six metres whilst most water drained into a second, slightly larger pipe.
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.
Although it was prefigured in work by Thomas Young, the theory of water hammer is generally considered to have begun 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).
Cause and effect.
Water flowing through a pipe has momentum. If the moving water is suddenly stopped - such as by closing a valve downstream of the flowing water, the pressure can rise suddenly with a resulting shock wave. In domestic plumbing this shock wave is experienced as a loud banging resembling a hammering noise. Water hammer can cause pipelines to break if the pressure is sufficiently high. Air traps or stand pipes (open at the top) are sometimes added as dampers to water systems to absorb the potentially damaging forces caused by the moving water.
For example, the water traveling along a tunnel or pipeline to a turbine in a hydroelectric generating stations may be slowed suddenly if a valve in the path is closed too quickly. If there is of tunnel of diameter full of water travelling at , that represents approximately of kinetic energy. This energy can be dissipated by a vertical surge shaft into which the water flows which is open at the top. As the water rises up the shaft its kinetic energy is converted into potential energy, avoiding sudden high pressure. At some hydroelectric power (HEP) stations, such as the Saxon Falls Hydro Power Plant In Michigan, what looks like a water tower is a surge drum.
In residential plumbing systems, water hammer may occur when a dishwasher, washing machine or toilet suddenly 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.
Other potential causes of water hammer:
Related phenomena.
"Steam hammer" can occur in steam systems when some of the steam condenses into water in a horizontal section of the piping. The steam forcing the liquid water along the pipe forms a "slug" which impacts a valve of pipe fitting, creating a loud hammering noise and high pressure. Vacuum caused by condensation from thermal shock can also cause a steam hammer.
Steam hammer can be minimized by using sloped pipes and installing steam traps. 
On turbocharged internal combustion engines, a "gas hammer" can take place when the throttle is closed while the turbocharger is forcing air into the engine. There is no shockwave but the pressure can still rapidly increase to damaging levels or cause compressor surge. A pressure relief valve placed before the throttle prevents the air from surging against the throttle body by diverting it elsewhere, thus protecting the turbocharger from pressure damage. This valve can either recirculate the air into the turbocharger's intake (recirculation valve), or it can blow the air into the atmosphere and produce the distinctive hiss-flutter of an aftermarket turbocharger (blowoff valve).
Mitigation measures.
Water hammers have 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. Hydroelectric power plants especially must be carefully designed and maintained because the water hammer can cause water pipes to fail catastrophically.
The following characteristics may reduce or eliminate water hammer:
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.
The pressure profile of the water hammer pulse can be calculated from the Joukowsky equation
So for a valve closing instantaneously, the maximal magnitude of the water hammer pulse is
where Δ"P" is the magnitude of the pressure wave (Pa), "ρ" is the density of the fluid (kg/m3), "a"0 is the speed of sound in the fluid (m/s), and Δ"v" is the change in the fluid's velocity (m/s). 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 formula_3, the peak pressure depends on the fluid compressibility if the valve is closed abruptly.
where
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"), this gives
where:
The above formula becomes, for water and with imperial unit,
For practical application, a safety factor of about 5 is recommended:
where "P"1 is the inlet pressure in psi, "V" is the flow velocity in ft/s, "t" is the valve closing time in seconds, and "L" is the upstream pipe length in feet.
Hence, we can say that the magnitude of the water hammer largely depends upon the time of closure, elastic components of pipe &amp; fluid properties.
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:
The hydraulic impedance "Z" of the pipeline determines the magnitude of the water hammer pulse. It is itself defined by
where
The latter follows from a series of hydraulic concepts:
Thus, the equivalent elasticity is the sum of the original elasticities:
As a result, we see that we can reduce the water hammer by:
Dynamic equations.
The water hammer effect can be simulated by solving the following partial differential equations.
where "V" is the fluid velocity inside pipe, formula_16 is the fluid density, "B" is the "equivalent" bulk modulus, and "f" is the Darcy–Weisbach friction factor.
Column separation.
Column separation is a phenomenon that can occur during a water-hammer event. If the pressure in a pipeline drops below the vapor pressure of the liquid, cavitation will occur (some of the liquid vaporizes, forming a bubble in the pipeline, keeping the pressure close to the vapor pressure). This is most likely to occur at specific locations such as closed ends, high points or knees (changes in pipe slope). When subcooled liquid flows into the space previously occupied by vapor the area of contact between the vapor and the liquid increases. This causes the vapor to condense into the liquid reducing the pressure in the vapor space. The liquid on either side of the vapor space 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) 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: