smelting of the metal in the foundry