Repository navigation
Conversation
With "SEI film resistance" on, the voltage drop across the film is added to the reaction overpotential eta_r, which lowers the terminal voltage. The thermal model computed irreversible heating as a*j*eta_r, so the energy lost across the film never appeared in "Total heating [W]" or the cell temperature. Use a*j*(eta_r - eta_sei), i.e. the full departure from the open-circuit potential, for both electrodes, every particle phase, and the planar lithium metal electrode. Add an energy-balance test: at fixed temperature, the extra heat from switching on the film resistance equals the extra electrical loss. Fixes #5820 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
Irreversible heating covered only the main intercalation reaction, so the electrical energy lost to SEI growth, SEI on cracks and lithium plating never appeared in the heat source. Add each side-reaction current times (delta_phi - U) for that reaction, and an energy-balance test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In a half cell the total interfacial current is plating plus SEI growth, but irreversible heating applied the plating overpotential to all of it. Use the plating current for the main term and add SEI growth current times (delta_phi - U_sei). Extend the energy-balance test to composite and half-cell models. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ting # Conflicts: # CHANGELOG.md
Contributor
|
| Project | PyBaMM |
| Branch | fix/side-reaction-heating |
| Testbed | bare-metal |
🐰 View full continuous benchmarking report in Bencher
⚠️ WARNING: Truncated view!The full continuous benchmarking report exceeds the maximum length allowed on this platform.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5875 +/- ##
=======================================
Coverage 98.23% 98.23%
=======================================
Files 348 348
Lines 35761 35794 +33
=======================================
+ Hits 35130 35163 +33
Misses 631 631 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
This was referenced Oct 12, 2026
# Conflicts: # CHANGELOG.md
…tions explicitly Add well-posedness tests for lumped thermal with SEI growth, SEI on cracks and plating, and for a half cell with SEI growth, so the new heating branches are covered by the unit suite. Pass the options that #5818 deprecates relying on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Consolidation note: this PR contains all of #5841's source changes (the SEI film size-average in
Also checked against the other thermal PRs:
|
…-heating # Conflicts: # CHANGELOG.md
Contributor
|
| Project | PyBaMM |
| Branch | fix/side-reaction-heating |
| Testbed | bare-metal |
🐰 View full continuous benchmarking report in Bencher
⚠️ WARNING: Truncated view!The full continuous benchmarking report exceeds the maximum length allowed on this platform.
…ting # Conflicts: # CHANGELOG.md
rtimms
marked this pull request as draft
October 22, 2026 12:10
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #5820. Supersedes #5841, whose commits are included here with their original authorship.
From #5841, irreversible heating includes the SEI film drop for the main intercalation reaction. It still covered only that reaction, so the electrical energy lost to side reactions never appeared in
"Total heating [W]"or the cell temperature.This PR adds a
BaseThermal._side_reaction_heatinghelper, called for each porous electrode and particle phase. It adds:delta_phi− SEI open-circuit potential)delta_phi, since plating has zero open-circuit potentialAt a planar lithium metal electrode (half cells), the total interfacial current is plating plus SEI growth, but the heat term applied the plating overpotential to all of it. The main term now uses the plating current, and SEI growth adds its current × (
delta_phi− SEI open-circuit potential).delta_phiis the full surface potential difference, so these terms include any SEI film drop. The SEI open-circuit potential is only read when SEI growth is on, so parameter sets without SEI parameters are unaffected.Energy check
TestEnergyBalance.test_side_reaction_heat_matches_electrical_losschecks that ohmic plus irreversible heat equals the electrical loss: terminal power minus the power stored by every reaction at its open-circuit potential. It runs three DFN cases at 268.15 K for 1800 s, each matching tortol=1e-3:Type of change
Bug fix, with an entry under
## Bug fixesin CHANGELOG.md.Important checks:
uv run pre-commit run --all-files-m unitontests/unit/test_models(922). Fullnox -s testsleft to CI.🤖 Generated with Claude Code