Energy use in metal production