Foundry and ultrasound treatment of liquid metals