application of thermodynamics to mineral processing