This chamber is filled with air, as the name suggests. The air in the chamber compresses or expands as it absorbs the shock wave from the sudden movement of water inside the pipes. The operating principle of an air chamber is essentially the same as that of the injection syringe in the examples given. What is different is that the piston is replaced by the liquid sent from the pump.
Both the piston and the liquid are not compressed like air, so they can be treated as if they were the same. Strictly speaking, liquid can also be compressed at high pressure, however, it will not be compressed by the pressures that a typical diaphragm pump can apply. Water hammer, also called hydraulic shock, is “a concussion sound when moving water against the sides of a pipe or container,” (Illinois State Plumbing Code). Water hammer is the result of a rapid deceleration of water flow in an enclosed space, such as a pipe.
There are a few ways to solve this problem, which require simple parts and technical knowledge. A water hammer suppressor, for example, is a device used to absorb pressure increase when the flow of water suddenly stops. A device called an air chamber may be required instead of a mechanical water hammer suppressor. An air chamber is an extension of the water supply pipe near the pipe fitting that provides the air cushion to absorb hydraulic shock.
If you look at the image below, the pink lines you see are the actual “air chambers”, while the other lines are the hot and cold water supply, and the drain and vent pipes. An air chamber is a space filled with air, which normally acts as a cushion or shock absorber for a closed system. The camera can be designed directly in the system or added at a later date to address a problem. A common example of a system that includes an air chamber is a hydraulic system such as that used for hydraulic doors and in braking systems.
In both cases, air chambers play an important role, although it is not desirable for air to float freely in the system. The most common cause of a water hammer is an air chamber (or several air chambers) with too much water in it. Air chambers are vertical pipes that regulate pressure and prevent water from forming waves in the supply pipes. If you don't have them, which is unlikely unless your plumbing is very old, ask a professional to install them at key points in your system to eliminate the waves that cause water hammers.
The chamber also provides a method of purging air from the system, allowing it to rise to the chamber where it can be released.