Optimizing coagulation process by using sludge produced in the