-
-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lithium plating model #836
Comments
Hi @Scottmar93 and Pybamm team, Thanks for the program, it is a great contribution! I've been trying to include the equations in the referenced paper and faced two problems. First, the model requires a total current j_tot = j_n (already existing)+j_sei (which has a similar implementation than the one @Scottmar93 formulated in #834, but requires the definition of a new variable c_EC, the concentration of Ethylene Carbonate at the surface of graphite, and an algebraic equation that relates c_EC to j_sei and L_sei) + j_lpl (also similar to #834). This total current j_tot should be equal to the current in the solid phase i_s in the negative electrode. However, I can't find among the sub-models the interaction between the electrode (Ohms law) and interface (Butler-Volmer and associated kinetics), in which such modification should take place. I think that there was an attempt of this kind in the submodel "full_ohm.py" (pybamm/models/submodels/electrode/ohm/full_ohm.py) in the inclusion of the term sum_j (line 67), obtained from the dictionary "reactions" (apparently unused #933). What do you think that It would be the best way to include this modification? The second issue is that both Butler-Volmer for j_n and Tafel equations for j_sei and j_lpl should include a term in the overpotential of the type |
Hi @felipe-salinas thanks for getting involved! There is currently a PR open (#948) which updates how the total current density is set (to allow for extra reactions etc.), so it might be worth checking there to see if that helps (@tinosulzer not sure how close this is to being finished?). I think after that you should be able to call up At the moment we haven't implemented having that resistance in the overpotential, but we were discussing it the other day. It requires updating the submodel to make j part of the state vector with a corresponding algebraic equation to solve for. |
Hi @felipe-salinas , the PR I am working on is almost finished (there is just one example failing in the tests) so it should be merged in the next few days, hopefully tomorrow. What this PR will do is automatically add the current from any new reactions which implement sum_s_j = variables["Sum of electrolyte reaction source terms"] while the "full_ohm" model uses sum_j = variables[
"Sum of " + self.domain.lower() + " electrode interfacial current densities"
] (at the moment the exception is the particle models which still only use So if you wait a few days, or branch off the |
For the resistance term in Butler-Volmer, we were planning on doing this pretty soon, but happy to leave it to you if you want (it seems like you picked up the submodel structure pretty quickly)? Two more comments:
|
Hi @tinosulzer and @rtimms, thanks for the feedback! As suggested, I will focus then on programming the current |
New reactions formulation is now merged into develop |
Thanks for the modifications! I cloned the branch from #834 and took as a reference the reaction_limited.py script. So far, I was able to change Complete output from command python setup.py egg_info: Any idea of what could be the problem? I followed the developer install. Regarding the intercalation current in the negative electrode |
Sounds great, I think moving on to the lithium plating is a good plan. For the install, you can try Yeah, I thought the film resistance thing would be quite challenging, will take a look :) |
Thanks @tinosulzer, I was able to install properly the wheel. Regarding the issue, I've been able to code the SEI and plating reactions, and to include the film resistance in the Butler-Volmer equation, by adding a submodel that is initialized in the I've run some simulations (some parameters and functions are missing in 2017 Yang, and I think I will contact the authors to obtain them) and although the variables are doing what I think is expected ( |
Great job @felipe-salinas ! I am also working on adding the film resistance so we should be careful to avoid duplication. When you say you added SEI, is that the separate from the SEI submodels that were added last week? I am nearly done with #984, so I think the easiest thing is if I get you to review that, and then add your lithium plating model after? |
Thanks for the update @tinosulzer, I just added the film resistance to understand how to do it, and to explore if that could be the problem that I have with (no)capacity loss. Maybe I made a mistake when adding the side reaction currents to the interface current. I'm following your program in #984 to develop the new submodels SEI limited by EC and Lithium plating. Regarding the former, there are a couple of differences with the existing SEI models, mainly, a new variable representing the concentration of EC in the surface of graphite with its corresponding algebraic equation, and the definition of certain constants. |
Is it possible that there is an error in the definition of the scale used for |
I'll check those scalings over, they could be wrong. In the meantime, can you take a look at the branch Happy for you to add your EC-limited SEI model to the |
Hi @tinosulzer, I ran the script, and calendar aging showed a voltage reduction (which should be the case if there are side reactions) and the capacity is reduced during cycling. It seems to work as it should, well done! I have another remark. In the calculation in the submodel The EC stands for Ethylene Carbonate :), and the algebraic equation proposed in Yang 2017 has the effect of reducing the diffusion constant of EC when |
The way it's implemented in base_kinetics.py, phi_s and phi_e are algebraic variables (which get solved by Ohm's law and the MacInnes equation). For example:
and
All base_kinetics.py does is create the first j as a function of phi_s and phi_e , and later j gets plugged in to the div(i_s) equation Regarding scales, you're right there is a missing factor of Gamma_sei. We're currently trying to decide whether it would be more appropriate to scale j_sei the same way as the intercalation current. The discharge timescale is fine though, because you want to scale all your equations with the same timescale, and the discharge timescale is the one that is used everywhere else |
Thanks! I was missing the fact that all time derivatives have to include a time scale. |
The branch with the SEI film resistance has been merged into develop. The nondimensionalisation is updated to fix the missing factor you pointed out ( |
Hi Tino/Felipe, My paper on reversible Li plating modelling has been published this week (https://dx.doi.org/10.1149/1945-7111/ab90ac) and I'm currently working on adding that model into PyBaMM. Ideally we want to have a minimum of three options: no plating, reversible plating and irreversible plating. It appears the two codes being developed could complement one another nicely. Many thanks, Simon |
Thanks @DrSOKane and congrats on the publication! I'll let you and Felipe coordinate adding the lithium plating model but let me know if you have any questions |
Hi @DrSOKane, thanks for joining and for sharing the parameters in the supplementary material of your article. You are very welcomed to add the plating model, because for the moment I'm focusing in merging the SEI model, and on validating a simulation to check that is implemented correctly. There are some variables and files that will be used in both models (like |
Thanks @felipe-salinas, this is good advice. I will push a separate LithiumPlating branch once the code is in better shape. |
Dear all, |
Hi @DrSOKane can you provide an update? thanks! |
The plating model is working but I've been having issues with my Linux subsystem that prevented me from adding it to PyBaMM. I will work on fixing this today. |
Dear DrSOKane, |
Closed by #1287 |
Add the lithium plating model from:
Yang, X. G., Leng, Y., Zhang, G., Ge, S., & Wang, C. Y. (2017). Modeling of lithium plating induced aging of lithium-ion batteries: Transition from linear to nonlinear aging. Journal of Power Sources, 360, 28-40.
The text was updated successfully, but these errors were encountered: