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

Added new parameter z_sei to allow the user to set SEI valancy #2222

Merged
merged 5 commits into from
Aug 15, 2022

Conversation

DrSOKane
Copy link
Contributor

@DrSOKane DrSOKane commented Aug 9, 2022

Description

A new parameter "Ratio of lithium moles to SEI moles" (short name z_sei) has been added. This variable was previously hardcoded to 1 for all SEI growth options except "ec reaction limited". As pointed out in issue #2065, z_sei=1 is incorrect for the two most common SEI compoints - LEDC and Li2CO3, both of which require z=2.

The SEI parameter sets have been updated accordingly. The new parameter z_sei is set to 2 by default for all parameter sets except OKane2022, which used the old code for which it was set to 1.

Fixes #2065

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: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three 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
Copy link

codecov bot commented Aug 9, 2022

Codecov Report

Merging #2222 (86c1608) into develop (2fd114e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 86c1608 differs from pull request most recent head 7e529b1. Consider uploading reports for the commit 7e529b1 to get more accurate results

@@           Coverage Diff            @@
##           develop    #2222   +/-   ##
========================================
  Coverage    99.36%   99.36%           
========================================
  Files          355      355           
  Lines        19499    19499           
========================================
+ Hits         19375    19376    +1     
+ Misses         124      123    -1     
Impacted Files Coverage Δ
pybamm/models/submodels/interface/sei/base_sei.py 100.00% <100.00%> (ø)
...ybamm/models/submodels/interface/sei/sei_growth.py 100.00% <100.00%> (ø)
pybamm/parameters/lithium_ion_parameters.py 100.00% <100.00%> (ø)
pybamm/expression_tree/symbol.py 98.79% <0.00%> (+0.24%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? 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.

I don't see beta_sei and beta_plating being used anywhere

pybamm/models/submodels/interface/sei/base_sei.py Outdated Show resolved Hide resolved
pybamm/parameters/lithium_ion_parameters.py Outdated Show resolved Hide resolved
pybamm/parameters/lithium_ion_parameters.py Outdated Show resolved Hide resolved
@DrSOKane
Copy link
Contributor Author

I don't see beta_sei and beta_plating being used anywhere

I remember beta_sei being a legacy parameter from when the porosity submodel was an ODE, because I created beta_plating using the same logic. The porosity submodel seems to be ever-changing so is it worth keeping these?

@valentinsulzer
Copy link
Member

Let's remove them, it's easy to add back in if needed, and confusing otherwise

@valentinsulzer valentinsulzer merged commit 0bb70d2 into pybamm-team:develop Aug 15, 2022
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.

[Bug]: Scaling by 2x in SEI growth?
2 participants