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

Fixed domain mismatch bug when using lithium plating with SPM #4844

Merged
merged 14 commits into from
Feb 24, 2025

Conversation

DrSOKane
Copy link
Contributor

Description

Do you remember the bug I had when trying to change the fundamental variable for SEI from thickness to concentration? The bug didn't originate there. It originated in the lithium plating model, which I copy-pasted the code from. And I was able to fix it by performing a yz-average over the relevant variable.

I also edited the cycling ageing example to prove the fix works.

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.70%. Comparing base (725a42c) to head (8b226de).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4844   +/-   ##
========================================
  Coverage    98.70%   98.70%           
========================================
  Files          304      304           
  Lines        23452    23456    +4     
========================================
+ Hits         23149    23153    +4     
  Misses         303      303           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

f"{Domain} {phase_name}lithium plating thickness [m]": L_plated_Li,
f"X-averaged {domain} {phase_name} lithium plating thickness "
f"X-averaged {domain} {phase_name}lithium plating thickness "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @DrSOKane looks good! Can you also add the relevant “Volume-averaged…” variables?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be consistent with the definition of "volume-averaged" in the thermal submodel. However, in the particle submodel, "volume-averaged" is used to denoted the x-average of the r-averaged concentration. What term should be used instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is ok, since plated Lithium is on the surface (i.e. doesn’t depend on r).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I did that. Now I can start on the variable change for the SEI. That PR is so old I will probably just close it and start a new one.

@rtimms rtimms requested a review from a team as a code owner February 17, 2025 04:29
@rtimms rtimms enabled auto-merge (squash) February 23, 2025 10:32
@rtimms rtimms merged commit cd272f7 into pybamm-team:develop Feb 24, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants