Thermodynamics of mechanical alloying.