Skip to content

Issue 1405 xaverage - #1490

Merged
valentinsulzer merged 11 commits into
developfrom
issue-1405-xaverage
May 24, 2021
Merged

valentinsulzer merged 11 commits into
developfrom
issue-1405-xaverage

Conversation

@valentinsulzer

Copy link
Copy Markdown
Member

Description

Reformats the degradation models so that the x-averaged form can be used
Adds a reaction-driven LAM model from Reniers 2019

Fixes #1405

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

codecov Bot commented May 21, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #1490 (6835652) into develop (8445c27) will increase coverage by 0.00%.
The diff coverage is 99.75%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1490   +/-   ##
========================================
  Coverage    98.31%   98.32%           
========================================
  Files          295      294    -1     
  Lines        16783    16854   +71     
========================================
+ Hits         16500    16571   +71     
  Misses         283      283           
Impacted Files Coverage Δ
...s/full_battery_models/lithium_ion/newman_tobias.py 100.00% <ø> (ø)
...ubmodels/interface/lithium_plating/base_plating.py 100.00% <ø> (ø)
...dels/full_battery_models/lead_acid/higher_order.py 98.11% <50.00%> (ø)
pybamm/__init__.py 94.95% <100.00%> (ø)
pybamm/models/base_model.py 99.21% <100.00%> (ø)
...m/models/full_battery_models/base_battery_model.py 99.68% <100.00%> (+0.01%) ⬆️
...ybamm/models/full_battery_models/lead_acid/full.py 100.00% <100.00%> (ø)
...ybamm/models/full_battery_models/lead_acid/loqs.py 100.00% <100.00%> (ø)
...ttery_models/lithium_ion/base_lithium_ion_model.py 100.00% <100.00%> (ø)
...bamm/models/full_battery_models/lithium_ion/dfn.py 100.00% <100.00%> (ø)
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8445c27...6835652. Read the comment docs.

@rtimms rtimms left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

neat! thanks, @tinosulzer !


def __init__(self, options=None, name="Doyle-Fuller-Newman model", build=True):
super().__init__(options, name)
self.x_average = False

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

might be worth a comment here explaining why x_average is True/False for different models (just in dfn, spm etc., not in every submodel)

return variables

def set_rhs(self, variables):
Domain = self.domain + " electrode"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

very minor style point, but odd for this to be capitalized. I guess to distinguish from self.domain

@valentinsulzer
valentinsulzer merged commit 7d8ec5c into develop May 24, 2021
@valentinsulzer
valentinsulzer deleted the issue-1405-xaverage branch May 24, 2021 18:43
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.

Use x-averaged SEI models for SPM and SPMe

2 participants