Determining electrochemical conditions using Pourbaix diagrams