Theory of Pyrometallurgical Processes