In mechanical engineering, a device for controlling the flow of fluids (liquids, gases, slurries) in a pipe or other enclosure.
It exerts control by means of a movable element that opens, shuts, or partially blocks an opening in a passageway. Valves are of seven main types: globe, gate, needle, plug (cock), butterfly, poppet, and spool. Some valves operate automatically; check (or nonreturn) valves, for example, are self-acting valves that permit flow in only one direction. Safety valves open at a predetermined pressure; the movable element usually has a weighted lever or a spring strong enough to hold the valve closed until a particular pressure is reached.