Add Bonkile2024 Parameter Set - #5694
Conversation
Added Mayur2024 parameter file for composite degradation (Si/Gr anode) and tested.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5694 +/- ##
========================================
Coverage 98.21% 98.21%
========================================
Files 339 341 +2
Lines 31996 32869 +873
========================================
+ Hits 31424 32282 +858
- Misses 572 587 +15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Closing PR as no response. |
rtimms
left a comment
There was a problem hiding this comment.
Reopening — this is a useful contribution, but the citation wiring needs fixing before it can go in. Sorry for the slow response.
The main issue: the publication these parameters actually come from is never registered as a citation.
1. The source paper is not cited
The get_parameter_values() docstring names the source in plain prose:
Beginning-of-life and degradation … parameters … are taken from the supplementary information of Bonkile et al., "Is silicon worth it? Modelling degradation in composite silicon/graphite lithium-ion battery electrodes"
But the registered list is:
"citations": ["Chen2020", "Ai2022", "OKane2022", "OKane2020", "Ai2020"],Bonkile 2024 is absent, and there is no Bonkile2024 key in packages/pybamm/src/pybamm/CITATIONS.bib. So pybamm.print_citations() lists the upstream papers the parameters derive from, but never the paper they were actually taken from — which is the one a user of this set needs to cite.
Please add to CITATIONS.bib (alphabetically, between Beeckman1990 and BrosaPlanella2021):
@article{Bonkile2024,
title = {Is silicon worth it? Modelling degradation in composite silicon--graphite lithium-ion battery electrodes},
journal = {Journal of Power Sources},
volume = {606},
pages = {234256},
year = {2024},
issn = {0378-7753},
doi = {https://doi.org/10.1016/j.jpowsour.2024.234256},
url = {https://www.sciencedirect.com/science/article/pii/S0378775324002076},
author = {Mayur P. Bonkile and Yang Jiang and Niall Kirkaldy and Valentin Sulzer and Robert Timms and Huizhi Wang and Gregory Offer and Billy Wu}
}then put "Bonkile2024" first in the citations list, and change the docstring prose to :footcite:t:`Bonkile2024` so it renders like the neighbouring references.
2. Ai2020 is not a valid citation key, and it breaks the whole citation print
CITATIONS.bib has Ai2019 and Ai2022 — there is no Ai2020. The existing Ai2020.py parameter set registers "citations": ["Ai2019"].
So this key falls through _parse_citation into _unknown_citations, and pybamm.print_citations() emits Citation with key "Ai2020" is invalid. Worse, the except KeyError in Citations.print sits outside the for key in self._unknown_citations loop, so one bad key aborts parsing of every remaining unknown citation. Should be Ai2019.
3. The same bad key breaks the docs build
The docstring contains :footcite:t:`Ai2020`, which sphinxcontrib-bibtex cannot resolve — broken reference in the API docs. nox -s doctests doesn't build the docs, so the checklist wouldn't have caught it.
4. Yang2017 is cited in prose but not registered
The docstring attributes the SEI parameters to :footcite:t:`Yang2017` (that key does exist in CITATIONS.bib), but it's missing from the citations list. Please add it.
5. The parameter set is named after the first author's given name
Mayur2024 — the author is Mayur P. Bonkile. Every other set here is surname+year (Chen2020, OKane2022, ORegan2022, BrosaPlanella2022). This should be Bonkile2024.
This is more than cosmetic: the name is the entry-point key in pyproject.toml and the public pybamm.ParameterValues("…") string, so renaming it after a release is a breaking change. Better to get it right now.
Minor
-
input/parameters/lithium_ion/__init__.py:'Xu2019', 'Mayur2024', ]has a trailing comma plus a space before], and the list is otherwise alphabetical — it belongs after'Marquis2019'. -
In the returned dict:
"Electrolyte conductivity [S.m-1]" "": electrolyte_conductivity_Nyman2008_arrhenius,
That's an implicit string concatenation, so the key ends up as
"Electrolyte conductivity [S.m-1]"via a two-part literal rather than as written. Looks like a bad reflow — please make it a single key on one entry.
|
@Dharshannan, thanks for this contribution! In future feel free to ping specific people for review - due to the increasing number of PRs, things sometimes get buried in the noise of GitHub notifications. |
Addresses PR review comments on the composite Si/graphite parameter set: - Rename the parameter set from Mayur2024 to Bonkile2024 (surname+year, matching every other set's convention) before release makes it a breaking change. Renamed the module, and updated the pyproject.toml entry point and the lithium_ion __init__.py __all__ list (placed alphabetically, dropped the trailing comma before the closing bracket). - Register the actual source paper as a citation: added a Bonkile2024 BibTeX entry to CITATIONS.bib (alphabetically between Beeckman1990 and BrosaPlanella2021), put "Bonkile2024" first in the parameter set's citations list, and changed the get_parameter_values() docstring's plain-prose attribution to :footcite:t:`Bonkile2024` so it renders like the neighbouring references. - Fix the invalid "Ai2020" citation key (no such entry in CITATIONS.bib) to "Ai2019", both in the citations list and in a docstring footcite reference -- this was breaking pybamm.print_citations() for every remaining unknown citation, and breaking the docs build. - Register "Yang2017", which was already cited in prose but missing from the citations list. - Fix an accidental implicit string concatenation that split "Electrolyte conductivity [S.m-1]" across two literals for no reason. Verified every :footcite:t: key in the file resolves against CITATIONS.bib and is present in the citations list (checked programmatically in both directions). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
@rtimms I have revised the PR as per your review. Please feel free to accept and merge. Thank you. |
Description
This PR adds the
Mayur2024lithium-ion parameter set as a built-in PyBaMM parameter set and registers it through thepybamm_parameter_setsentry-point mechanism.The implementation includes:
Mayur2024parameter set and supporting data files.pyproject.toml.The new parameter set can now be accessed directly using
in the same manner as existing parameter sets such as
Chen2020andOKane2022.Motivation
This change enables the direct use of the parameter set without requiring manual imports or user-side registration. Integrating the parameter set into the existing entry-point framework ensures consistency with the rest of the PyBaMM ecosystem and simplifies model development and reproducibility.
Type of change
Checklist
nox -s pre-commit)nox -s tests)nox -s doctests)