Phosphorus in chemical and physical treatment processes