Skip to content

Ensure stress-induced diffusion is only enabled on electrodes that have particle mechanics #4944

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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

DrSOKane
Copy link
Contributor

Description

If particle mechanics is enabled on one electrode, stress-induced diffusion is enabled on both by default. I added some code to base_battery_model to catch most instances where this might happen.

Fixes #4943

@DrSOKane DrSOKane requested a review from a team as a code owner March 31, 2025 11:23
Copy link

codecov bot commented Mar 31, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.70%. Comparing base (2e38ac4) to head (9cf0213).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...m/models/full_battery_models/base_battery_model.py 66.66% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4944      +/-   ##
===========================================
- Coverage    98.71%   98.70%   -0.01%     
===========================================
  Files          304      304              
  Lines        23478    23484       +6     
===========================================
+ Hits         23176    23180       +4     
- Misses         302      304       +2     

☔ 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
Copy link
Contributor

rtimms commented Mar 31, 2025

My opinion is that we should remove all of these default options that change based on other options and instead users should explicitly choose all the options they want. If any options require other options to be enabled then we should catch that and raise an error. This would be breaking, but I think options silently changing has a lot of potential to introduce error.

@aabills
Copy link
Contributor

aabills commented Mar 31, 2025

My opinion is that we should remove all of these default options that change based on other options and instead users should explicitly choose all the options they want. If any options require other options to be enabled then we should catch that and raise an error. This would be breaking, but I think options silently changing has a lot of potential to introduce error.

I agree, it's always bugged me that stress automatically turns on stress-enhanced diffusion. I think most parameterizations are done assuming that this isn't true, so I don't think it should be the default.

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.

[Bug]: If particle mechanics is enabled on one electrode, stress-induced diffusion is enabled on both
3 participants