Phase field modeling of electrochemistry. I. Equilibrium | Synapse