Skip to content

Issue 3549 psd diffusivity bug#4726

Merged
rtimms merged 16 commits intodevelopfrom
issue-3549-PSD-diffusivity-bug
Jan 6, 2025
Merged

Issue 3549 psd diffusivity bug#4726
rtimms merged 16 commits intodevelopfrom
issue-3549-PSD-diffusivity-bug

Conversation

@rtimms
Copy link
Contributor

@rtimms rtimms commented Dec 31, 2024

Description

Fixes a bug when using stoichiometry-dependent diffusivity with the DFN model with a particle size distribution

Fixes #3549

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All tests pass: $ python -m pytest (or $ nox -s tests)
  • The documentation builds: $ python -m pytest --doctest-plus src (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ nox -s quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@rtimms rtimms changed the base branch from develop to add-tertiary-integral-FV December 31, 2024 07:30
@codecov
Copy link

codecov bot commented Dec 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.24%. Comparing base (a7253b8) to head (2651047).
Report is 135 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4726      +/-   ##
===========================================
+ Coverage    99.22%   99.24%   +0.01%     
===========================================
  Files          303      303              
  Lines        23070    23242     +172     
===========================================
+ Hits         22891    23066     +175     
+ Misses         179      176       -3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rtimms rtimms added the release blocker Issues that need to be addressed before the creation of a release label Jan 2, 2025
Base automatically changed from add-tertiary-integral-FV to develop January 3, 2025 00:28
@rtimms rtimms marked this pull request as ready for review January 3, 2025 11:13
@rtimms rtimms enabled auto-merge (squash) January 3, 2025 15:24
@rtimms rtimms disabled auto-merge January 3, 2025 15:55
Copy link
Member

@brosaplanella brosaplanella left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

if isinstance(N_s, pybamm.TertiaryBroadcast):
N_s_xav_distribution = N_s.orphans[0]
else:
# can't average variables that evaluate on edges
Copy link
Member

Choose a reason for hiding this comment

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

Why does the else mean it is evaluated at the edges?

@kratman
Copy link
Contributor

kratman commented Jan 6, 2025

@rtimms Hopefully the tests pass now

@rtimms rtimms enabled auto-merge (squash) January 6, 2025 15:24
@rtimms rtimms merged commit b0a5c31 into develop Jan 6, 2025
@rtimms rtimms deleted the issue-3549-PSD-diffusivity-bug branch January 6, 2025 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release blocker Issues that need to be addressed before the creation of a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Multi-particle model does not work with stoichiometry-dependent solid diffusivity

4 participants