Theoretical treatment and computer simulation of microelectrode arrays