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

make SEI single layer only #4470

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft

make SEI single layer only #4470

wants to merge 3 commits into from

Conversation

valentinsulzer
Copy link
Member

@valentinsulzer valentinsulzer commented Sep 26, 2024

Description

Remove the double-layer SEI and make it single layer only
This PR falls in the category of "breaking changes to the parameter names" so let's discuss how to handle this in the developer meeting - draft only for now

Fixes #2333
Replaces #3920

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

@brosaplanella
Copy link
Sponsor Member

We should probably merge this one before #4394 (tagging @kawaMANMI so he is aware of this PR).

Copy link
Contributor

@DrSOKane DrSOKane left a comment

Choose a reason for hiding this comment

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

I agree with this change. As we were able to show in our joint paper, the effect of the two-layer structure on SEI growth rate is dwarfed by that of altering the parameters. The only exception I can think of is if there are two different mechanisms occuring simultaneously. In-situ measurements of SEI growth and kinetic Monte-Carlo simulations both support such a scenario. I'm not aware of it being incorporated into a continuum-scale model yet, although it has been mooted. It would almost certainly require a separate class if it were ever to be implemented in PyBaMM.

I see no reason why _get_standard_thickness_variables and _get_standard_total_thickness_variables cannot be merged into a single function.


Returns
-------
variables : dict
The variables which can be derived from the SEI currents.
"""
domain, Domain = self.domain_Domain
j_inner_av = pybamm.x_average(j_inner)
j_outer_av = pybamm.x_average(j_outer)
j_sei = j_inner + j_outer

Copy link
Contributor

Choose a reason for hiding this comment

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

Why is there no jsei_av variable?

@@ -134,16 +123,16 @@ def get_coupled_variables(self, variables):
elif SEI_option == "electron-migration limited":
# Scott Marquis thesis (eq. 5.94)
eta_inner = delta_phi - phase_param.U_inner
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed U_outer doesn't get used anywhere. Deleting U_inner and U_outer and just having U_sei would reduce the total number of parameters, but I'm aware that U_inner and U_sei are for different mechanisms

Copy link
Sponsor Member

@brosaplanella brosaplanella Oct 9, 2024

Choose a reason for hiding this comment

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

Yes, I spotted that too. I guess the main question is, if we switch to just U_sei, which parameter value should we use? I believe at the moment one is set at 0.1 V and the other at 0.8 V.

UPDATE: just realised the O'Kane parameter sets assume inner SEI fraction to be 0, so I will set the U_SEI to 0.8 V

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.42%. Comparing base (9e62b66) to head (5e1a46b).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4470      +/-   ##
===========================================
- Coverage    99.42%   99.42%   -0.01%     
===========================================
  Files          297      299       +2     
  Lines        22685    22673      -12     
===========================================
- Hits         22554    22542      -12     
  Misses         131      131              

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

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.

Add single-layer SEI
3 participants