Energetics in metallurgical phenomena