An ultrasonic flow meter measures the velocity of a liquid or gas through a pipe using acoustic sensors.  This has some advantages over other measurement techniques. The results are slightly affected by temperature, density or conductivity.  Maintenance is inexpensive because there are no moving parts.
Ultrasonic flow meters come in three different types: transmission (contrapropagating transit time) flowmeters, reflection (Doppler) flowmeters, and open-channel flowmeters. Transit time flowmeters work by measuring the time difference between an ultrasonic pulse sent in the flow direction and an ultrasound pulse sent opposite the flow direction. Doppler flowmeters measure the doppler shift resulting in reflecting an ultrasonic beam off either small particles in the fluid, air bubbles in the fluid, or the flowing fluid's turbulence. Open channel flow meters measure upstream levels in front of flumes or weirs.
Optical time-of-flight sensors consist of two light beams projected into the fluid whose detection is either interrupted or instigated by the passage of small particles (which are assumed to be following the flow). This is not dissimilar from the optical beams used as safety devices in motorized garage doors or as triggers in alarm systems. The speed of the particles is calculated by knowing the spacing between the two beams. If there is only one detector, then the time difference can be measured via autocorrelation. If there are two detectors, one for each beam, then direction can also be known. Since the location of the beams is relatively easy to determine, the precision of the measurement depends primarily on how small the setup can be made. If the beams are too far apart, the flow could change substantially between them, thus the measurement becomes an average over that space. Moreover, multiple particles could reside between them at any given time, and this would corrupt the signal since the particles are indistinguishable. For such a sensor to provide valid data, it must be small relative to the scale of the flow and the seeding density. MOEMS approaches yield extremely small packages, making such sensors applicable in a variety of situations.