How does the electrochemical potential within a battery work at the level of basic E&M?

The explanations that I've seen for how batteries work (like this one) tend to go along these lines:

One electrode "has an electrochemical potential that makes it want to give up electrons" (or really, ionize neutral atoms) and the other "has an electrochemical potential that makes it want to accept electrons" (or really, recombine electrons and ions into neutral atoms). The electrolyte solution that connects the two electrodes allows positive ions to pass through, but not electrons. Before an external circuit is closed, positive ions leave the negative electrode and move through the electrolyte solution onto the positive electrode, leaving both electrodes with a slight net electric charge. These net charges produce an electrostatic field within the battery from the positive to the negative electrode that tends to oppose the motion of ions through the electrolyte solution. This electrostatic field builds up until it cancels the electrochemical potential and the battery reaches an equilibrium.

Once an external circuit is closed, the electrostatic field passing through the wire draws electrons from the negative electrode to the positive electode, slightly reducing the charge imbalance and weakening the internal electric field within the battery. This allows the positive ions to resume flowing through the electrolyte solution, which restores the charge imbalance and the potential difference, which in turn continues to draw electrons through the wire, etc.

To me, this explanation seems to be invoking the "electrochemical potential" as a magic wand that pushes positive ions from the negative to the positive electrode without needing to invoke any electric fields. I'm okay with that for the most part; it's obviously useful to use bulk thermodynamic potentials to simplify the immensely complicated behavior of a many-body system. I'm also okay with treating the electrolyte solution as a black box that magically allows positive ions through while blocking free electrons.

But the thing that I really don't understand about this explanation is the fact that within the electrolyte solution, the electric field always points from the positive to the negative electrode - but when the circuit is closed, the positive ions, and hence the net current, flow from the negative to the positive electrode (because the electrochemical potential "beats" the slightly weakened electric field). This means that the electrical conductivity of the electrolyte solution is actually negative, because the electric field and current point in opposite directions!

This is just very weird to me. At the microscopic level, charges just move in whatever direction the electric field pushes them. (I'm assuming that batteries can be qualitatively explained without invoking either magnetic or quantum effects, although maybe that's not true.) How can this magical stat-mech "electrochemical potential" overcome the basic rules of electrostatics and cause charged ions to move against the electrostatic field, resulting in an electrolyte solution with a negative electrical conductivity? I don't have any intuition for what's going on here at the microscopic level, or for how the positive ions could move through the electrolyte solution in this way. To me, this explanation simply shifts the question from "How do batteries work?" to "How does the electrochemical potential work?".

ETA: I found a paper that addresses exactly this question.

• Ironic note: my laptop battery died just as I was finishing writing this question. Apparently it didn't like how close I was getting to uncovering its secrets. Dec 3, 2020 at 2:27

I haven't seen chemistry since high school, so I might be way off, but maybe this analogy works:

Imagine an ideal gas of fixed temperature $$T$$ in a tall box, except that when molecules hit the top of the box, they are absorbed, moved downward outside the box, and then popped back in at the bottom. The energy that must be spent to do this for each molecule (i.e. to push a molecule back in at the bottom, against the higher gas pressure there) is the analogue of the electrochemical potential. The energy that can be harvested by moving the molecules from top to bottom is the analogue of the electrical energy supplied by the battery.

In the steady state, molecules continually hit the top of the box due to thermal motion, causing a steady "current" to go from top to bottom. In this mechanical battery, the molecules in the box go up against gravity, but there isn't any upward force acting on them, besides what happens randomly in collisions.

The current is purely a statistical mechanical effect. The gas wants to approach the steady state of an exponential density distribution, but we are preventing that by taking molecules out at the top. Gravity is still pulling each individual molecule downward; it's not like anything here has "negative gravitational mass". Similarly, the solutions in batteries don't have negative conductivity, because $$\mathbf{J} = \sigma \mathbf{E}$$ holds in equilibrium, and drawing the current explicitly takes us out of equilibrium.

• Hmm, interesting. I hadn't thought about whether ${\bf J} = \sigma {\bf E}$ only holds in thermal equilibrium, but that does seem plausible. Dec 3, 2020 at 4:21
• Your analogy does seem pretty close, but I have the nagging feeling that the rule that particles that hit the top get non-stochastically teleported down to the bottom (while releasing useful energy) is effectively a Maxwell's demon that "breaks" the rules of stat mech (or maybe a Brownian ratchet would be a better analogy). Dec 3, 2020 at 4:25
• @tparker I worried about that too, but it's not a demon, for the same reason that this analogous setup with water isn't. It costs energy to put the molecules back in against the higher pressure at the bottom, and this cancels what you harvest from letting them move down. Dec 3, 2020 at 5:02
• I found a paper that draws a slightly different gravitational analogy to explain how the positive ions manage to exit and enter the electrodes against thin layers of very strong opposing electric fields. Dec 4, 2020 at 4:07

within the electrolyte solution, the electric field always points from the positive to the negative electrode - but when the circuit is closed, the positive ions, and hence the net current, flow from the negative to the positive electrode

The issue you are running into is just a misunderstanding about this part. The electrolyte is approximately* an equipotential surface. The ions move through the electrolyte subject to Ohm’s law and standard diffusion and chemical transport laws.

The change in voltage which goes in the opposite sense of Ohm’s law is localized near the surface of the electrode. It is only in this region that the electrochemical reaction moves current up the voltage gradient.

$$*$$ the electrolyte is a decent conductor with a very large cross section, so the resistance is low, but it does have some internal resistance which contributes to the battery’s overall internal resistance and prevents it from being exactly equipotential

• Okay, but what happens near the electrodes' surfaces that allows the ions to climb up a steep voltage gradient and overcome the two very strong (though tightly localized) electric fields? Dec 3, 2020 at 4:10
• By the way (and I mean this respectfully), I think that your edits significantly changed my question in a way that made it less clear what I was getting at, so I rolled them back. Dec 3, 2020 at 4:12
• @tparker That is certainly your prerogative, but I think the repeated use of the word “magical” detracts a lot from an otherwise good question and makes it sound very unprofessional. Regarding what happens at the surface: a chemical reaction. The reduction in the chemical potential energy is more than the increase in the electrical potential energy. The energy released from the change in chemicals literally pushes the current up the voltage gradient.
– Dale
Dec 3, 2020 at 4:25
• But at the end of the day, all chemical effects are electrical (+quantum) effects, other than a view exotic magnetic effects in relativistic chemistry. I suspect that the solution comes from carefully distinguishing between the fields induced by free and bound charges, resulting in unusual electrical permittivity relations. Dec 3, 2020 at 4:33
• @tparker sure, but I don’t know the detailed quantum mechanics of electrochemical reactions. All I know is that some configurations of chemicals have more energy than others. That is really all that is needed for for this
– Dale
Dec 3, 2020 at 4:41