Current conservation (Kirchoff's law) in the DFN model #3923
-
Hello everyone, My question surrounds around the conservation of current at each node and the calculation of electrode and electrolyte current densities in the DFN model. I had been poring through the source code to understand these but could not figure it out. Here is where I need help! At each 'x', the sum of electrode and electrolyte current densities should be equal to the input current density as per Kirchoff's law (Equation 24 in the paper authored by Doyle et al.. ) Can someone point me to where this is implemented in the DFN model? The closest I could come to this was in the Also, in these submodels, the current densities appear to be calculated based on these algebraic conditions. Is that correct? Or is there another source for these? This question arose because of the equations mentioned in the example given here. The electrolyte current density is calculated using the exchange current density in the first charge conservation equation. This felt more accurate than the algebraic conditions. However, I did not find this equation implemented anywhere in PyBaMM. Which file is it implemented in, if it is implemented? And I guess a similar equation would've been implemented for the electrode current density. What is the location of that equation? Thank you for the help in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hello, Would someone be able to help me with this? Thanks in advance |
Beta Was this translation helpful? Give feedback.
The current equations are
div(i_e) - aj = 0
(in full_condutivity) anddiv(i_s) + aj = 0
(in full_ohm). Both inset_algebraic
of those submodels. Adding those together meansdiv(i_e + i_s) = 0
i.e.i_e + i_s = constant
(in 1D) i.e. current is conserved. But we don't need to enforcei_e + i_s = constant
explicitly, the way it is done via the algebraic equations is sufficient.