Water hammer is the momentary increase in pressure which occurs in a water system when there is a sudden change of direction or velocity of the water. When a rapidly closed valve suddenly stops water flowing in a pipeline, pressure energy is transferred to the valve and pipe wall. This is an effect of water hammer.