  In the field of biomedicine magnetic beads are used for drug delivery and to
treat hyperthermia. Here we propose to use self-organized bead structures to
isolate circulating tumor cells using lab-on-chip technologies. Typically blood
flows past microposts functionalized with antibodies for circulating tumor
cells. Creating these microposts with interacting magnetic beads makes it
possible to tune the geometry in size, position and shape. We developed a
simulation tool that combines micromagnetics and discrete particle dynamics, in
order to design micropost arrays made of interacting beads. The simulation
takes into account the viscous drag of the blood flow, magnetostatic
interactions between the magnetic beads and gradient forces from external
aligned magnets. We developed a particle-particle particle-mesh method for
effective computation of the magnetic force and torque acting on the particles.
