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

Plett OCP Hysteresis Model #3593

Merged
merged 58 commits into from
May 11, 2024

Conversation

mleot
Copy link
Contributor

@mleot mleot commented Dec 5, 2023

Description

Adds the hysteresis model as outlined in Wycisk 2022, and as mentioned in
#3375 and as discussed in #3376 .

This will allow for hysteresis switching to depend not on the current, but on the differential capacity change.

Fixes #3375

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 run-tests.py --all (or $ nox -s tests)
  • The documentation builds: $ python run-tests.py --doctest (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ 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

@mleot
Copy link
Contributor Author

mleot commented Apr 5, 2024 via email

@mleot mleot marked this pull request as ready for review April 17, 2024 02:00
Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Thanks for addressing these! Just one remaining comment about documentation

@mleot mleot requested a review from valentinsulzer May 5, 2024 23:26
" \"Current [A]\",\n",
" \"Negative electrode secondary open-circuit potential [V]\",\n",
"]\n",
"pybamm.QuickPlot(\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

nice! this model is a great addition!

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Happy with this, let's merge!

.diff() operates on the symbolic expression tree, so it doesn't require a function

@valentinsulzer valentinsulzer merged commit c687134 into pybamm-team:develop May 11, 2024
41 of 42 checks passed
@mleot
Copy link
Contributor Author

mleot commented May 11, 2024

Thanks for walking me through it! Hopefully the next one goes smoother!

@brosaplanella
Copy link
Member

@all-contributors please add @mleot for code and tests

Copy link
Contributor

@brosaplanella

I've put up a pull request to add @mleot! 🎉

@DavidMStraub
Copy link
Contributor

Nice addition 👍. The heat generation due to OCP hysteresis still isn't accounted for, is it?

@brosaplanella
Copy link
Member

I don't think so. Do you know any references on how this should be accounted for?

@DavidMStraub
Copy link
Contributor

Only using terminal voltage & energy balance like in https://doi.org/10.1038/s41560-019-0410-6 ... @rtimms might be able to answer better 🙂

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.

Decay rate for single state hysteresis models
6 participants