Here, x represents the distance from the electrode surface. The first two terms describe the electrostatic interactions created by the electric potential ϕ(x) and the ionic charge density ρ ion (x) = p i=1 c i (x)z i , where z i and c i denote the ion charge and concentration, respectively. The third term captures the interaction of the external potential ψ i (x) with the ions, which can simulate repulsive forces (e.g., Helmholtz layer) or attractive forces (e.g., ion-surface interactions).