Arepo-CD: Coupling Collisional
N-Body Dynamics with Moving-Mesh Magnetohydrodynamics
Arepo-CD couples collisional star-by-star N-body dynamics with the moving-mesh MHD code Arepo, using unsoftened gravity for star-star interactions while gas and collisionless components remain softened. Compact subsystems are identified on the fly and evolved with a fourth-order forward symplectic integrator and slow-down regularization within Arepo's timestep hierarchy. Benchmarks match the PeTar code. In a $10^5~M_\odot$ turbulent cloud simulation, collisional and softened runs give similar star formation, but close encounters produce a runaway population with velocities exceeding 100 km/s, redistributing radiative feedback. This framework enables studying collisional dynamics and feedback during cluster formation.