  We study stability of superflow of Bose gases in optical lattices by
analyzing the Bose-Hubbard model within the Gutzwiller mean-field
approximation. We calculate the excitation spectra of the homogeneous
Bose-Hubbard model at unit filling to determine the critical momenta for the
Landau and dynamical instabilities. These two critical momenta are shown to
approach each other when the on-site interaction increases towards the Mott
transition point. In order to make a direct connection with realistic
experiments, we next take into account a parabolic trapping potential and
compute the real-time dynamics of dipole oscillations induced by suddenly
displacing the trap center. We consider the following two cases: standard
softcore bosons, whose interparticle interactions include the on-site one only,
and hardcore bosons with long-range dipole-dipole interactions. For both cases,
we show that the dipole oscillation is significantly damped when the maximum
local momentum exceeds a certain threshold, which quantitatively agrees with
the critical momentum for the dynamical instability in the homogeneous system.
In the case of dipolar hardcore bosons, the dynamical instability of dipole
oscillations leads to the formation of checkerboard density waves in the
superfluid phase near the boundary to the supersolid phase.
