Pātuhitia tēnei: Flash smelting: analysis, control and optimization