  We use Time-Dependent Ginzburg-Landau theory to study the nucleation of
vortices in type II superconductors in the presence of both geometric and
material inhomogeneities. The superconducting Meissner state is meta-stable up
to a critical magnetic field, known as the superheating field. For a uniform
surface and homogenous material, the superheating transition is driven by a
non-local critical mode in which an array of vortices simultaneously penetrate
the surface. In contrast, we show that even a small amount of disorder
localizes the critical mode and can have a significant reduction in the
effective superheating field for a particular sample. Vortices can be nucleated
by either surface roughness or local variations in material parameters, such as
Tc. Our approach uses a finite element method to simulate a cylindrical
geometry in 2 dimensions and a film geometry in 2 and 3 dimensions. We combine
saddle node bifurcation analysis along with a novel fitting procedure to
evaluate the superheating field and identify the unstable mode. We demonstrate
agreement with previous results for homogenous geometries and surface roughness
and extend the analysis to include variations in material properties. Finally,
we show that in three dimensions, suface divots not aligned with the applied
field can increase the super heating field. We discuss implications for
fabrication and performance of superconducting resonant frequency cavities in
particle accelerators.
