Simulation of tokamak edge plasma including self-consistent electric fields