Skip to content

#3161 add emperical hysteresis for exchange-current and diffusivity - #3194

Merged
valentinsulzer merged 3 commits into
developfrom
issue-3161-emperical-hysteresis
Jul 28, 2023
Merged

valentinsulzer merged 3 commits into
developfrom
issue-3161-emperical-hysteresis

Conversation

@rtimms

@rtimms rtimms commented Jul 27, 2023 •

Copy link
Copy Markdown
Contributor

Description

Adds options for "diffusivity" and "exchange-current density" to enable the models to account for hysteresis in these parameters using an empirical model in the same way we currently handle hysteresis in the open-circuit potential. The options can be "single" (this is the default behaviour where a single value/function is provided for each of the diffusivity and exchange current density in each electrode) or "current sigmoid" (where users give a lithiation and delithiation parameter, which are switched between depending on the sign of the current).

Fixes #3161

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 (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
  • The documentation builds: $ python run-tests.py --doctest

You can run unit and doctests together at once, using $ python run-tests.py --quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@codecov

codecov Bot commented Jul 27, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (2989bb3) 99.71% compared to head (39643b2) 99.71%.
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3194   +/-   ##
========================================
  Coverage    99.71%   99.71%           
========================================
  Files          248      248           
  Lines        18764    18801   +37     
========================================
+ Hits         18710    18747   +37     
  Misses          54       54           
Files Changed Coverage Δ
...m/models/full_battery_models/base_battery_model.py 99.76% <ø> (ø)
...ybamm/models/submodels/interface/base_interface.py 100.00% <100.00%> (ø)
pybamm/models/submodels/particle/base_particle.py 100.00% <100.00%> (ø)
...amm/models/submodels/particle/fickian_diffusion.py 100.00% <100.00%> (ø)
...mm/models/submodels/particle/polynomial_profile.py 100.00% <100.00%> (ø)
...ubmodels/particle/x_averaged_polynomial_profile.py 100.00% <100.00%> (ø)
pybamm/parameters/lithium_ion_parameters.py 100.00% <100.00%> (ø)

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

@rtimms
rtimms requested a review from valentinsulzer July 27, 2023 13:02
@valentinsulzer
valentinsulzer merged commit 3f7df5f into develop Jul 28, 2023
@valentinsulzer
valentinsulzer deleted the issue-3161-emperical-hysteresis branch July 28, 2023 15:42
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.

Empirical hysteresis

2 participants