Simulation of auroral double layers