Nearly (but not quite) physical results from a custom model - error in my use of FunctionParameters? #3850
-
Hi everyone, I am programming a custom model for a Li-ion cell in Pybamm, which now solves without throwing any errors (model details below). The results are not absurd, but something is definitely wrong - I have attached some pictures of results compared to the DFN. I suspect that the problem might be coming from an error in the way I am defining one of the functions in the model. I have written a function, "j_ave" which is essentially the Butler Volmer equation. This function calls 2 other functions, one for exchange current density "i0" and one for open circuit potential "u0". I have tried:
The reason I think that j_ave is not outputting correct results is because it seems to be completely insensitive to any change. For example, I can add a factor of 10^6 to the output of j_ave (multiplying the electrochemical reaction rate by 10^6) and it hardly changes the results. In the second and third plot that I have attached, you can see that the reaction rate differs from the DFN by about a factor of 10 in both electrodes. Any recommendations on what I may be doing wrong or on other approaches I could try for writing this j_ave function would be much appreciated :) Model description You can think of the model as similar to the DFN model, but instead of solving in an extra "pseudo" dimension for concentration within active material, the active material phase is also homogenised (like the other 3 governing equations). Thus, the model is completely macroscale and 1D. The electrolyte and active material phase equations are coupled by the electrochemical reaction source term, j_ave. Here are the most important parts of the model definition in pybamm, with the j_ave function below:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
I think your Butler-Volmer equations are fine. Try checking carefully for where you put the factors of By the way, is the "LIBAT data" public? |
Beta Was this translation helpful? Give feedback.
-
Also, you're welcome to model the battery however you want, but homogenizing the particle equations so that they appear as macroscale equations is pretty questionable, as explained in this paper https://iopscience.iop.org/article/10.1088/2516-1083/ac7d31/pdf
|
Beta Was this translation helpful? Give feedback.
The interfacial current density is governed by the Ohm's law equation (and boundary condition) for the potentials, and then the Butler-Volmer equation determines what the overpotential is given a fixed interfacial current density. Of course it's a bit more coupled than that but that's the general idea. So the error is in Ohm's law or its boundary condition. For example why is the source terms
a_j * F
nota_j / F
? It can't be just that because then you'd be off byF**2
(which is not 10) but that's the kind of thing I'd check rather than BV