Simulation of ion heating in the topside auroral ionosphere