A valve is a mechanical or electromechanical device used to control the movement of liquids, gases, powders, and more, through pipes or tubes or from tanks or other containers. In most applications, valves rely on a plate, ball, diaphragm, or some other type or mechanical barrier that can be inserted to or removed from the flow stream of the material flowing through. Some valves are strictly of the on/off variety, while others allow the user to control the flow rate of the media traveling through it. The type of material a valve is made from also plays an important role in distinguishing valves and ensuring the compatibility of the wetted parts of the valve with the fluid passing through it. Furthermore, sizing is determined by the pipe or tubing diameter, flow rate, and in pipeline valves being installed as replacements, the width between flanges.