Description
Hello to all,
after a while, I got back to the simulations of the diffusion phenomena in batteries using VoronoiFVM (see also issue #131). I am happy to report that the simulation of the galvanostatic mode which I was dealing with in the said issue now works just fine, however, I am having issues trying to implement terms containing storage terms defined for the boundary species.
Problem formulation
The problem I am describing is a standard diffusion equation with the Butler-Volmer flux at the boundary (see the attached MWE for more information and a longer description) and included double layer effects. The latter states
the relation between the voltage on the electrode and the actual flux entering the electrode particle as:
Here,
In the absence of the double layer effects, the driving flux and the Butler-Volmer flux are the same; in this setting, however, the Butler-Volmer flux becomes the Neumann boundary condition for the concentration variable.
Attempt at a solution
I have tried to solve this problem by defining the voltage as surface species. Then, I defined the corresponding boundary storage operators and boundary conditions (see the attached MWEs in fvm_05_double_layer_debug.jl
or fvm_05_double_layer_debug.ipynb
). It seems, however, that the boundary storage terms are neglected altogether, as the solutions seem to be the same as in the case where no double layer effects are considered. Note that a clear indicator of the double layer effects is a mismatch between the applied and Butler-Volmer fluxes at higher frequencies. I'd assume that the culprit could be in the assembly procedure, perhaps the boundary storage is not considered for surface species? In the absence of the double layer effects, the approach works just fine, which I've benchmarked by performing some EIS calculations and verified them against known data.
Attempt at a workaround
Surprisingly, I get more sensible results if I define the voltage as a global species on all the control volumes (which is a bit redundant, since we assume the voltage is homogenous across the particle). In this formulation, I also dropped the specification of the boundary storage. In this case, I clearly get the desired mismatch between the applied and Butler-Volmer currents, however, a solution where this would also work for surface species would be desired.
The attached MWEs (fvm_05_double_layer_debug_semi_working.ipynb
and fvm_05_double_layer_semi_working.jl
) will also produce animations and relevant plots. I am using VoronoiFVM 2.3.0
, the solver of choice in both cases is FBDF()
from OrdinaryDiffEq
. For convenience, MWE's are prepared both as Julia
scripts or Jupyter
notebooks.