Simulation of energy transport by dark matter scattering in stars