  As a simplified model of randomly pinned vortex lattices or charge-density
waves, we study the random-field XY model on square ($d=2$) and simple cubic
($d=3$) lattices. We verify in Monte Carlo simulations, that the average
spacing between topological defects (vortices) diverges more strongly than the
Imry-Ma pinning length as the random field strength, $H$, is reduced. We
suggest that for $d=3$ the simulation data are consistent with a topological
phase transition at a nonzero critical field, $H_c$, to a pinned phase that is
defect-free at large length-scales. We also discuss the connection between the
possible existence of this phase transition in the random-field XY model and
the magnetic field driven transition from pinned vortex lattice to vortex glass
in weakly disordered type-II superconductors.
