Skip to content

Conversation

chtamar
Copy link
Contributor

@chtamar chtamar commented Feb 26, 2025

Description

This PR is an extension of PR #4816, where an empirical method was proposed to handle hysteresis in the open-circuit potential.

This method is similar to the Wycisk approach, but it skips the need of calculating the differentiation dU = self.phase_param.U(sto_surf, T_bulk).diff(sto_surf), and defines separate decay rates for lithiation and delithiation.

The method is activated by passing the keyword "Axen" to the model option "open-circuit potential".

Fixes #4851

Type of change

This PR updates the notebook docs/source/examples/notebooks/models/differential-capacity-hysteresis-state.ipynb to show the features of a newly implemented hysteresis method, comparing it to the current-sigmoid and Wycisk's methods.

A brief explanation of the method is added to the notebook together with an example simulation.

The relevant section of the CHANGELOG.md file has also been updated to reflect the change.

Important checks:

Please confirm the following before marking the PR as ready for review:

  • No style issues: nox -s pre-commit
  • All tests pass: nox -s tests
  • The documentation builds: nox -s doctests
  • Code is commented for hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@chtamar chtamar requested a review from a team as a code owner February 26, 2025 21:39
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@chtamar chtamar changed the title Revision of the hysteresis notebook to include recently implemented hysteresis method. Revision of the hysteresis notebook to include the method implemented in the module axen_ocp Feb 26, 2025
@chtamar chtamar force-pushed the hysteresis_notebook branch from 385de0a to 0e19485 Compare February 26, 2025 21:53
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.71%. Comparing base (f171572) to head (8deec30).
Report is 78 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4880   +/-   ##
========================================
  Coverage    98.70%   98.71%           
========================================
  Files          304      304           
  Lines        23482    23495   +13     
========================================
+ Hits         23179    23192   +13     
  Misses         303      303           

☔ 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.

@chtamar chtamar force-pushed the hysteresis_notebook branch from 0e19485 to 2b9865a Compare February 27, 2025 05:20
Copy link
Contributor

@rtimms rtimms left a comment

Choose a reason for hiding this comment

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

thanks @chtamar looks good to me!

@rtimms rtimms enabled auto-merge (squash) February 28, 2025 09:51
@rtimms rtimms merged commit c9b5930 into pybamm-team:develop Feb 28, 2025
26 checks passed
@chtamar
Copy link
Contributor Author

chtamar commented Feb 28, 2025

thanks @chtamar looks good to me!

Thanks @rtimms

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.

Notebook update to include new method for OCP with hysteresis
2 participants