-
Dear PyBaMM team, First and foremost, I'd like to commend you for the exceptional work on PyBaMM. It runs both fast and conveniently, and I genuinely appreciate the efforts you've put into it. I've come across a discrepancy that I hope you could give me some suggestions. Despite ensuring identical parameters (geometry, material properties, tolerance settings, etc.) in both Comsol and PyBaMM, I'm not getting consistent results. For your reference, I've configured PyBaMM to use the CasADi solver, the same one used by Comsol. I provide some comparisons of the results below: Based on these results, could you offer some insights or recommendations regarding the discrepancies observed? I truly value your time and expertise. Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 14 replies
-
Can you share a minimum working example of the PyBaMM code? |
Beta Was this translation helpful? Give feedback.
-
@rtimms I used esoh function to calculate the stoichiometries, and the results still didn't match well. I also find out that when I increase the thickness (from 4.2e-5(Xu2019) to 7.56e-5(Okane2022), about 80% increase) of the positive electrode in the half-cell (also scaled current/capacity, but all other parameters remain the same), then the difference between the half-cell cell voltage in pybamm and comsol increases substantially. So the problem is not likely due to the stoichiometries, but maybe mesh or solver issues. Any thoughts? |
Beta Was this translation helpful? Give feedback.
I realized that the definitions of exchange current factors differ between COMSOL and PyBaMM. In COMSOL, I defined it using flux, so I need to multiply by the Faraday constant in PyBaMM. I appreciate your assistance again!