A numerical model of particle motion in fluid flow under the influence of hydrodynamic and magnetic forces is presented. The Lagrangian particle tracking algorithm was developed being capable of simulating dilute suspensions of particles in viscous flows where gravity, buoyancy, drag, pressure gradient, added mass and magnetophoretic forces are taken into account. The method is used to study the behaviour of magnetite particles in a periodic cellular flow field under the influence of a magnetic field produced by electric wires placed in cell centres. For such a flow field it is known that particles in steady state merge into individual trajectories. The influence of the magnetic field on the particle trajectories is examined and an exponential model for the time evolution of the fraction of adhered particles to the electric wires is proposed. Three particle Stokes number values are considered: 0.01, 0.1 and 1. The existence of a critical magnetic pressure coefficient was found, at which all particles end up to be adhered to the wires. The critical magnetic pressure coefficient was found to be proportional to the Stokes number. For sub-critical magnetic pressure coefficient, the particle trajectories are significantly altered by the magnetic field, both in their shape and in their number. Furthermore, in the sub-critical regime, the minimal distance of particles to the cell centres is larger for particles with smaller Stokes numbers.