Osmotic effects in sludge dewatering