Overview
In plumbing, a trap is a U-shaped portion of pipe designed to trap liquid or gas to prevent unwanted flow; most notably sewer gases from entering buildings while allowing waste materials to pass through. In oil refineries, traps are used to prevent hydrocarbons and other dangerous gases and chemical fumes from escaping through drains. In heating systems, the same feature is used to prevent thermo-siphoning which would allow heat to escape to locations where it is not wanted. Similarly, some pressure gauges are connected to systems using U bends to maintain a local gas while the system uses liquid. For decorative effect, they can be disguised as complete loops of pipe, creating more than one U for added efficacy.
General description
In domestic applications, traps are typically U, S, Q, or J-shaped pipe located below or within a plumbing fixture. An S-shaped trap is also known as an S-bend. It was invented by Alexander Cumming in 1775 but became known as the U-bend following the introduction of the U-shaped trap by Thomas Crapper in 1880. The U-bend could not jam, so, unlike the S-bend, it did not need an overflow. In the United States, traps are commonly referred to as P-traps. It is the addition of a 90 degree fitting on the outlet side of a U-bend, thereby creating a P-like shape (oriented horizontally). It is also referred to as a sink trap because it is installed under most sinks.
Because of its shape, the trap retains some water after the fixture's use. This water creates an air seal that prevents sewer gas from passing from the drain pipes back into the building. Essentially all plumbing fixtures including sinks, bathtubs, and showers must be equipped with either an internal or external trap. Toilets almost always have an internal trap.
Because it is a localized low-point in the plumbing, sink traps also tend to capture small and heavy objects (such as jewellery or coins) accidentally dropped down the sink. Traps also tend to collect hair, sand, food waste and other debris and limit the size of objects that enter the plumbing system, thereby catching oversized objects. For all of these reasons, most traps may be disassembled for cleaning or provide a cleanout feature.
From Wikipedia (CC BY-SA 4.0).