A topic of much debate when using battery-powered devices, like phones, laptops, or electric toothbrushes is, how often should they be charged? The main schools of thought are, charge whenever you have power available, or charge only when the battery dies or is low. I tend to subscribe to the second theory, on the principle that batteries are typically rated for a fixed number of charge/discharge cycles. My laptop has some built-in protection that limits how often it charges:
Batteries work through a chemical reaction between two reactants suspended in an electrolyte. Electrons pass between the reactants, creating a current and dissolving some of the reactants into the electrolyte. This is a bit oversimplified, but I am, after all a physicist, so that's how I like things. I wanted to see whether this model could back up my charging habits.
The setup I settled on was several electrodes, each surrounded by a block of reactant, and the whole thing surrounded by electrolyte. Then I put the system through several charge/discharge cycles. During each discharge step, we find all the reactant that's in contact with electrolyte, and dissolve it into electrolyte with some probability. During charging steps, we do the reverse: Find electrolyte in contact with either reactant or electrode, and precipitate reactant with some probability. We keep track of how many changes happen each cycle, which corresponds to the amount of current produced, and we vary the number of repeated discharge steps before switching to charging, and vice versa.
There's a lot of parameters to tune here (probability of state change, number of electrodes, amount of electrolyte), so I haven't come close to exploring the full space, but I'm still pretty happy with the results. This case used 200 steps for each discharge/charge cycle:
You can see we use up most of the reactant (yellow) on each cycle. If we switch to only 80 steps, things look a little more ragged:
We can measure how much reactant is around at the start of each discharge, and plot how it changes as we go through cycles for several different cycle lengths:
For all but the extreme 2-step case, these quickly reach an equilibrium max charge (plotted as a fraction of the initial). I was curious what was going on with 2-steps, so I plotted what it looks like at the end of the simulation:
Because of the way I set up the cycling between dissolution and precipitation, the system tends toward holding only as many as it adds on during charging – That's the source of the pattern in the max charge plot above, and not (as I initially thought) my belief about battery health. As result, I think I have to consider this sim inconclusive as far as charging habits. Maybe I'll do a followup later (which will of course be called "Re: Re: Re: Re: Charge")!