I recall that the energy stored in a magnetic field is half the volume integral of the dot product of magnetic field and flux density vectors (H and B). When you place a piece of iron near a magnet, it does a work by attracting it. If H is 0 (I think there is only the magnetic moment vector M and the flux density B), where does this energy come from?. Is not HxB always applicable? If the answer is that it was stored when the magnet was "created", how is it "replenished" when the piece of iron is removed (since the magnet can attract pieces of iron again and again)?