when an iron bar is placed in a magnetic field