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

Lithium plating upgrades #3919

Merged
merged 31 commits into from
May 2, 2024

Conversation

DrSOKane
Copy link
Contributor

@DrSOKane DrSOKane commented Mar 22, 2024

Description

  • Lithium plating model now works on composite electrodes
  • Added plating parameters to Ecker2015, Ecker2015_graphite_halfcell and Chen2020_composite parameter sets
  • Fixed bug where the dead lithium concentration variable had no scale

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

DrSOKane added 20 commits June 5, 2023 12:17
This reverts commit cf53ff1.
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.59%. Comparing base (96ba50c) to head (4e6b16f).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3919   +/-   ##
========================================
  Coverage    99.59%   99.59%           
========================================
  Files          258      259    +1     
  Lines        21310    21353   +43     
========================================
+ Hits         21223    21266   +43     
  Misses          87       87           

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

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.

Submodel code looks good to me, but I am now against adding new parameters to existing parameter sets from the literature (e.g. adding lithium plating parameters to Ecker). In an ideal world, PyBaMM parameter sets would be based only on peer-reviewed papers, and only contain the parameters included in those papers. I know it's not the case now (lots of parameter sets contain extra parameters not in the main paper), but we should strive to move towards that, not away from it.

If you want to add a parameter set based on Ecker with your own plating parameters, can you put it in a separate public repository, with entry points? I assume you're working on a paper related to this, once that is published we can add the full parameter set under "OKane2024" or whatever

@DrSOKane
Copy link
Contributor Author

Submodel code looks good to me, but I am now against adding new parameters to existing parameter sets from the literature (e.g. adding lithium plating parameters to Ecker). In an ideal world, PyBaMM parameter sets would be based only on peer-reviewed papers, and only contain the parameters included in those papers. I know it's not the case now (lots of parameter sets contain extra parameters not in the main paper), but we should strive to move towards that, not away from it.

If you want to add a parameter set based on Ecker with your own plating parameters, can you put it in a separate public repository, with entry points? I assume you're working on a paper related to this, once that is published we can add the full parameter set under "OKane2024" or whatever

The O'Kane2020 paper did in fact use the Ecker2015 parameter set, but it was in COMSOL, not PyBaMM. The charging protocol used to validate the 2020 model is not supported by PyBaMM, for reasons we have previously discussed.

I agree that technically the Chen2020_composite model should not technically have any plating parameters. There is another paper with a composite lithium plating model, and I could add that paper instead.

@valentinsulzer
Copy link
Member

The charging protocol used to validate the 2020 model is not supported by PyBaMM

Is this the SOC-based cutoff? That should now be possible using custom events

If you have parameter sets that follow existing references then please add those. It just needs to be easy for future PyBaMM maintainers to point to a peer-reviewed reference to justify the parameter set, rather than trying to chase down old maintainers

@DrSOKane
Copy link
Contributor Author

I decided to just not have a parameter set for the composite plating. We plan to make one in the future, but this is a necessary first step.

@agriyakhetarpal
Copy link
Member

agriyakhetarpal commented Apr 24, 2024

The Linux failures are unrelated and are coming from awalsh128/cache-apt-pkgs-action#131 and https://github.com/orgs/community/discussions/120966. Edit: they have been resolved now, I triggered the failed runs again.

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, looks good to me now

@valentinsulzer valentinsulzer merged commit 33371b0 into pybamm-team:develop May 2, 2024
42 checks passed
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.

None yet

3 participants