A numerical method of calculating secondary current distributions in electrochemical cells