Centrifuges with automatic sludge discharge