Ankur Gupta ← Back to home

Electroneutrality and the Electric Field

Ankur Gupta

A constant electric field implies the electrolyte is electroneutral. The converse, however, does not hold — and that confuses students more than it should.

TL;DR: Drop table salt into water and the Na+ and Cl ions stay together so that any region of the bulk has zero net charge. That is electroneutrality. Gauss's law ties the net charge inside a region to the electric field on its boundary. A natural mistake is to flip the implication and conclude that an electroneutral electrolyte must have a constant electric field. It does not. The electric field can vary smoothly inside an electroneutral bulk, and that is exactly what happens at the limiting current of an electrochemical cell. The preprint walks through this as a class-and-home problem; the widgets below let you see it.

About

I am an Assistant Professor in the Department of Chemical and Biological Engineering at the University of Colorado Boulder. My research group, LIFE (Laboratory of Interfaces, Flow, and Electrokinetics), studies how ions, particles, and cells move and self-organize. This post is the interactive companion to a class-and-home problem we wrote, aimed at students of graduate transport phenomena and electrochemical engineering. The full problem statement, a worked solution, four figures, and seven references live in the preprint.

Salt in water, and what stays together

Drop a teaspoon of NaCl into a glass of water and the salt dissociates almost instantly into sodium cations (Na+) and chloride anions (Cl). Both ions are now free to wander, dragged around by thermal kicks and any electric fields that happen to be present. What is striking is that even though they wander independently, they don't drift apart on macroscopic length scales. The cation and anion populations track each other almost perfectly:

$$ \sum_i z_i\, c_i(\mathbf{x}) \;\approx\; 0 \qquad \text{(electroneutrality)}$$
The sum of valence-weighted concentrations of all ionic species at any point in the bulk is essentially zero. The "approximately" is doing real work here, and we will come back to it.

Here $z_i$ is the valence of species $i$ (e.g. $+1$ for Na+, $-1$ for Cl) and $c_i$ is its molar concentration. Why is electroneutrality so robust? The mental picture below has the answer: any small charge imbalance creates a strong restoring electric field that pulls the ions back together long before the imbalance can grow.

A small box of "water" with Na+ (red) and Cl (blue) ions wandering by Brownian motion. Click Pull a Cl out to introduce a net charge and watch the field on the box wall jump. Click Reset to restore neutrality.

Gauss's law: charge inside, field outside

What ties charge to field is Gauss's law. Wrap any closed surface around a region of space; the total electric flux through that surface is proportional to the charge enclosed inside:

$$ \oint \mathbf{E}\cdot d\mathbf{A} \;=\; \frac{Q_{\rm enc}}{\varepsilon} \,. $$
The electric field $\mathbf{E}$ on the boundary integrates to the total charge $Q_{\rm enc}$ enclosed by the surface, divided by the permittivity $\varepsilon$ of the medium. If the enclosed region is electroneutral, the right-hand side vanishes.

The animation below shows this in action. A dashed circle is our (2D) Gaussian surface. Inside are a few ions; the arrows on the boundary show the local outward normal component of $\mathbf{E}$. When the inside is electroneutral, the arrows balance. Add or remove a charge and the arrows tilt accordingly.

Field arrows on a Gaussian surface respond to net enclosed charge. The readout below the surface shows $Q_{\rm enc}$ in units where each ion contributes $\pm 1$.

From boxes to points: Poisson's equation

The integral form is good for intuition, but a differential form is what we use to solve problems. Shrink the Gaussian surface to a point. The integral on the left side becomes the divergence of $\mathbf{E}$, and the enclosed charge per unit volume is just the local charge density $\rho_F = F\sum_i z_i c_i$. With $\mathbf{E} = -\nabla\varphi$ for the potential $\varphi$, we have

$$ -\varepsilon\,\nabla^2 \varphi \;=\; \rho_F\,, \qquad \rho_F \;=\; F \sum_i z_i\, c_i\,, $$
Poisson's equation. In one dimension this becomes $-\varepsilon\, d^2\varphi/dx^2 = \rho_F$. With $E = -d\varphi/dx$, it is also $-\varepsilon\, dE/dx = \rho_F$.

The animation below makes the link concrete. The top bar shows the local charge density $\rho_F(x)$ along a one-dimensional cell. The bottom panel shows the slope $-\varepsilon\, dE/dx$ that Poisson's equation requires. Slide the imbalance amplitude and see them stay locked together.

Top: charge density $\rho_F(x)$ in a 1D cell. Bottom: $-\varepsilon\, dE/dx$ that Poisson's equation forces. They are the same curve.

The misconception

Here is where many students get tripped up. From Poisson's equation, $-\varepsilon\, dE/dx = \rho_F$, two implications are easy to write:

The point is sharper still: electroneutrality in the bulk is a consequence of a separation of length scales, not a statement about the field. Once you non-dimensionalize Poisson's equation, the prefactor on the left-hand side becomes the square of the ratio of the Debye length $\lambda_D$ (the screening length set by the ion concentration) to the macroscopic cell length $\ell$:

$$ 2\,\delta^2\, \frac{d^2\Phi}{dX^2} \;=\; -\sum_i z_i\, C_i\,, \qquad \delta = \frac{\lambda_D}{\ell}\,, \qquad \lambda_D = \sqrt{\frac{\varepsilon V_T}{2 F c_0}}\,. $$
Non-dimensional Poisson's equation, with $X = x/\ell$, $C_i = c_i/c_0$, and $\Phi = \varphi/V_T$ (where $V_T = RT/F \approx 25.7\,\rm{mV}$ at room temperature). For a 1 mM electrolyte in a 1 mm cell, $\lambda_D \sim 10\,\rm{nm}$ and $\delta \sim 10^{-5}$.

Because $\delta$ is tiny, the left-hand side is essentially zero, so the right-hand side has to vanish too. That gives bulk electroneutrality $\sum_i z_i C_i = 0$. Notice that we never demanded anything of the field. The argument is purely about scales. The electric field is free to do whatever the rest of the equations — species transport and boundary conditions — tell it to do, and that often involves smooth spatial variation.

Two electrolyte cells. Both are electroneutral everywhere ($\rho_F=0$). The left cell has a uniform field. The right cell has a smoothly varying field that diverges at the cathode. Same constraint; different fields.

A concrete cell to chew on

The class-and-home problem is built around a one-dimensional silver electroplating cell, a setup borrowed from W. M. Deen's Analysis of Transport Phenomena (Example 15.3-3). Two silver electrodes a distance $2\ell$ apart bound a quiescent electrolyte. At the cathode ($x=-\ell$) silver ions are reduced to silver metal, $\rm Ag^{+} + e^{-} \to Ag$. At the anode ($x=+\ell$) the reverse happens. The applied voltage drives a steady cation flux $n_{\rm Ag} = n_0$ between the electrodes; the chloride ion is unreactive at both electrodes and merely keeps the bulk electroneutral.

One-dimensional electroplating cell
Sketch of the cell. The Stern and diffuse (Debye) layers near each electrode are not resolved here — they sit inside the small parameter $\delta$.

Each ionic flux obeys the Nernst–Planck relation,

$$ n_i \;=\; -D_i\, \frac{d c_i}{d x} \;-\; \frac{D_i z_i F}{RT}\, c_i\, \frac{d\varphi}{d x}\,. $$
Two terms: a diffusive piece (Fick) and a migrative piece (driven by the electric field). $D_i$ is the diffusivity of species $i$. At steady state with no homogeneous reactions, each $n_i$ is constant in $x$.

That, plus Poisson's equation and the conservation conditions $\langle c_i\rangle = c_0$ (the cell-mean concentration of each species equals its initial uniform value), is the full system. We non-dimensionalize as in the equation block above and let $N_i = n_i \ell / (D_{\rm Ag} c_0)$ denote the dimensionless flux.

The class problem: a single salt

With only Ag+ and Cl in solution, bulk electroneutrality reads $C_{\rm Ag} = C_{\rm Cl} \equiv C$. The Cl balance with $N_{\rm Cl}=0$ gives $d\Phi/dX = (1/C)\, dC/dX$, and substituting into the Ag+ balance with $N_{\rm Ag} = N_0$ leaves an ordinary differential equation for $C(X)$. Imposing $\langle C\rangle = 1$ on the symmetric domain,

$$ C(X) \;=\; 1 - \frac{N_0}{2}\, X\,, \qquad \frac{d\Phi}{dX} \;=\; -\frac{N_0}{2 - N_0\, X}\,. $$
The cation (and anion) concentration is linear in $X$. The dimensionless field is rational and grows toward the cathode as the imposed flux gets larger in magnitude. At $N_0 = -2$ the cathode-side concentration $C(-1) = 1 + N_0/2$ vanishes and the field diverges — the limiting current.

And here is the punchline: electroneutrality is satisfied at every interior point ($C_{\rm Ag} = C_{\rm Cl}$ everywhere), and yet the dimensionless field is not constant. It varies smoothly with position, monotonically rising from anode to cathode. Drag the slider to see how.

Class problem: drag $N_0$ and watch
Left axis (blue): cation concentration $C(X)$. Right axis (red): dimensionless field gradient $d\Phi/dX$. As $N_0 \to -2$, $C(-1)$ touches zero and $d\Phi/dX$ diverges at the cathode.
The point of the class problem. Electroneutrality holds because $\delta \ll 1$, not because the field is constant. The bulk profiles satisfy $\sum_i z_i C_i = 0$ at every interior point, yet $d\Phi/dX$ varies smoothly with $X$ and depends on the imposed flux. A constant field would imply electroneutrality, but the converse implication is false.

The home problem: add a background electrolyte

Now add KCl as a supporting (background) electrolyte. There are now three species: Ag+, Cl, K+. The KCl background concentration $c_b$ is a parameter; we use the dimensionless ratio

$$ \Gamma \;=\; \frac{c_0}{c_b}\,. $$
The active-to-background ratio. $\Gamma \to 0$ is "lots of background" (the supporting-electrolyte limit). $\Gamma \to \infty$ is "no background" (the binary class-problem limit).

Combining the Nernst–Planck flux for each ion with its boundary condition gives three balance equations. Adding them, applying bulk electroneutrality $C_{\rm Ag} + C_{\rm K} - C_{\rm Cl} = 0$ to kill the migration term, and integrating with the conservation conditions yields a closed-form solution:

$$ C_{\rm Cl}(X) \;=\; \left(1 + \tfrac{1}{\Gamma}\right) - \frac{N_0}{2}\, X\,, \qquad \frac{d\Phi}{dX} \;=\; -\frac{N_0}{2\!\left(1 + \tfrac{1}{\Gamma}\right) - N_0\, X}\,. $$
The chloride profile is linear in $X$ for any $\Gamma$. The dimensionless field has a denominator that picks up an extra $2/\Gamma$ from the background. For $\Gamma \ll 1$ the field is approximately $-N_0\Gamma/2$ — small. For $\Gamma \to \infty$ we recover the binary class-problem result above.

Integrating the K+ balance using the now-known $d\Phi/dX$ gives $C_{\rm K}(X) = \kappa / C_{\rm Cl}(X)$ with $\kappa$ fixed by $\langle C_{\rm K}\rangle = 1/\Gamma$. The cation profile then follows from electroneutrality, $C_{\rm Ag} = C_{\rm Cl} - C_{\rm K}$. The widget below evaluates these in real time.

Home problem: drag $N_0$ and $\Gamma$
Left axis (blue): cation concentration $C_{\rm Ag}(X)$. Right axis (red): field gradient $d\Phi/dX$. Move $\Gamma$ from $0.01$ to $\sim 3$ and watch the field grow from nearly zero (supporting-electrolyte limit) to the binary case.

Limiting current: how supporting electrolyte halves it

The limiting current is reached when the cathode-side cation concentration vanishes, $C_{\rm Ag}(-1) = 0$. With $C_{\rm Ag} = C_{\rm Cl} - C_{\rm K}$, this becomes $C_{\rm Cl}(-1) = C_{\rm K}(-1)$. Substituting the closed forms gives a single transcendental equation for the limiting flux $N_0^{\rm lim}$:

$$ \bigl[C_{\rm Cl}(-1)\bigr]^2 \;=\; \frac{|N_0^{\rm lim}|}{\Gamma\, \ln\!\bigl(C_{\rm Cl}(1)/C_{\rm Cl}(-1)\bigr)}\,. $$
A single equation for one unknown, $N_0^{\rm lim}$. Both $C_{\rm Cl}(\pm 1)$ depend on $N_0^{\rm lim}$ and $\Gamma$ through the linear profile above. Solve numerically by bisection.

The plot below sweeps $\Gamma$ over five decades. The limiting flux has two clean asymptotes: $|N_0^{\rm lim}| \to 1$ as $\Gamma \to 0$ (supporting-electrolyte limit, half the binary value) and $|N_0^{\rm lim}| \to 2$ as $\Gamma \to \infty$ (binary class problem). The four study points $\Gamma\in\{0.01, 0.1, 0.5, 1\}$ are marked.

Limiting flux versus $\Gamma$
Hover the curve to read off $|N_0^{\rm lim}|$ at any $\Gamma$. The four open circles match the values $-1.003,\, -1.032,\, -1.130,\, -1.217$ reported in the manuscript.
What the home problem teaches. Even though both cells are electroneutral in the bulk, the supporting-electrolyte cell has a dramatically smaller electric field and a different limiting current. Same outer constraint ($\sum_i z_i C_i = 0$), different field structure, different physics. The field is set by what the rest of the system — species transport and boundary conditions — demands.

What to take away

How Claude helped

I drafted the problem statements and the conceptual structure of the manuscript, then used Claude Code on VSCode to generate the LaTeX, build the four figures, set up the equations in OMML for a Word draft, and iterate on the prose. The figures and the limiting-current sweep are produced by Python scripts that Claude helped write and refine. The interactive widgets on this page were built the same way; the limiting-flux values you see (−1.003, −1.032, −1.130, −1.217) are recomputed by JavaScript bisection inside your browser, so the page can't drift from the manuscript values. The honest version of "how I used AI": for the structural and stylistic choices I had strong preferences and corrected the model frequently, but it executed faster than I could and saved real time on the typesetting and the sweep code.