A network thermodynamic method for computer simulation of cyclic voltammetry