Kelvin force in a layer of magnetic fluid