Purification plants with membranes (MBR)