This study reports the development of a direct simulation code for solid spheres moving through viscoelastic fluids with a range of different rheological behaviors. The numerical algorithm was implemented on an opensource finite-volume solver coupled with an immersed boundary method, and is able to perform fully-resolved simulations, wherein all flow scales associated with the particle motion are resolved. The formulation employed exploits the log-conformation tensor to avoid high Weissenberg number issues when calculating the polymeric extra stress. A number of benchmark flows were simulated using this method, to assess the accuracy of the newlydeveloped solver. First, the sedimentation of a sphere in a bounded domain surrounded by either Newtonian or viscoelastic fluid was computed, and the numerical results were verified by comparison with experimental and computational data from the literature. Additionally, the spatial and temporal accuracies of the algorithm were evaluated, and different transient and advection discretization schemes were investigated. Second, the rotation of a sphere in a homogeneous shear flow was studied, and again the numerical results obtained were compared to those from the literature. Good agreement is obtained for the variation in the particle rotation rate as a function of Weissenberg number, using both the newly implemented algorithm and an alternative fixed-mesh approach. Finally, the cross-stream migration of a neutrally buoyant sphere in a steady Poiseuille flow, consisting of either a Newtonian or viscoelastic suspending fluid was investigated. For the Newtonian fluid good agreement was obtained for the particle equilibrium position when compared to the well known Segré-Silberberg effect, and for the viscoelastic fluid the effect of the retardation ratio on the final particle equilibrium position was studied. Additionally, the newly-developed solver capabilities were tested to study the shear-induced particle alignment in wall-bounded Newtonian and viscoelastic fluids. The role of the fluid rheology and finite gap size on both the rate and approach pathways of the solid particles is illustrated.