The oscillating U-tube is a technique used to determine the density of liquids and gases by measuring the frequency shift of an oscillator caused by the change in mass introduced by the sample. This measuring principle is based on a mass-spring-damper model.