Skip to content
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

[Bug]: Dead lithium not recorded in irreversible lithium plating model #3339

Closed
tomjholland opened this issue Sep 15, 2023 · 3 comments · Fixed by #3485
Closed

[Bug]: Dead lithium not recorded in irreversible lithium plating model #3339

tomjholland opened this issue Sep 15, 2023 · 3 comments · Fixed by #3485
Assignees
Labels
bug Something isn't working

Comments

@tomjholland
Copy link

PyBaMM Version

23.5

Python Version

3.10.13

Describe the bug

"Dead lithium" is recorded as a variable when the "partially reversible" lithium plating model is used, but not when the "irreversible" plating model is used. In the "irreversible" model, all plated lithium would be expected to become "dead lithium".

Steps to Reproduce

Following code plots dead lithium concentration for both model types as it is formed:

params = pybamm.ParameterValues("OKane2022")
sol = []
plt.figure()
for plating_model in plating_models:
    model = pybamm.lithium_ion.DFN(options={"lithium plating": plating_model})
    sim = pybamm.Simulation(model, parameter_values = pybamm.ParameterValues("OKane2022"))
    sol=sim.solve([0, 3600])
    Qt = sol["Throughput capacity [A.h]"].entries
    Dead = sol["Dead lithium concentration [mol.m-3]"].entries[-1,:] # index at interface
    plt.plot(Qt,Dead,label=plating_model)
    plt.xlabel("Throughput capacity [A.h]")
    plt.ylabel("Dead lithium concentration [mol.m-3]")
    plt.legend()
plt.show()

### Relevant log output

_No response_
@tomjholland tomjholland added the bug Something isn't working label Sep 15, 2023
@rtimms
Copy link
Contributor

rtimms commented Sep 15, 2023

cc @DrSOKane

@DrSOKane
Copy link
Contributor

Hi Tom, this is nothing to worry about. In the irreversible plating model, all plated lithium is dead, so there is no need for a separate dead lithium variable. Lithium is still conserved. That said, it will be an easy change to make once PR #3198 is complete.

@brosaplanella
Copy link
Member

I think it would be good to add the dead lithium variable for all models (even if it matches the plated lithium) just for clarity. Happy to wait until #3198 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants