A Brownian dynamics simulation method for analyzing particle behavior in nonuniform and alternating electric fields