Modelling the electric potential distribution in the dark in nanoporous semiconductor electrodes