We consider liquid metal flow in a square duct with electrically insulating walls under the influence of a magnetic point dipole using three-dimensional direct numerical simulations with a finite-difference method. The dipole acts as a magnetic obstacle. The Lorentz force on the magnet is sensitive to the velocity distribution that is influenced by the magnetic field. The flow transformation by an inhomogeneous local magnetic field is essential for obtaining velocity information from the measured forces. In this paper we present a numerical simulation of a spatially developing flow in a duct with laminar inflow and periodic boundary conditions. (© 2012 Wiley-VCH Verlag GmbH & Co. KGaA, Weinheim)