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

Issue 1505 porosity #1617

Merged
merged 18 commits into from Aug 25, 2021
Merged

Issue 1505 porosity #1617

merged 18 commits into from Aug 25, 2021

Conversation

brosaplanella
Copy link
Sponsor Member

Description

Write reaction driven porosity as a function of the plated & SEI thicknesses for lithium-ion models (lead-acid stays the same).

Fixes #1505

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.

  • 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

),
(
"Charge at 1 C until 4.2 V",
"Hold at 4.2 V until C/20",
"Rest for 30 minutes",
"Discharge at 3 C until 2.8 V",
"Discharge at 3 C until 2.8 V (10 second period)",
"Rest for 30 minutes",
Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

Had to add the rest periods and reduce the sampling period at discharge, otherwise simulations didn't converge.

@codecov
Copy link

codecov bot commented Aug 24, 2021

Codecov Report

Merging #1617 (7a2dc5c) into develop (bf4c1eb) will increase coverage by 0.00%.
The diff coverage is 98.46%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1617   +/-   ##
========================================
  Coverage    97.99%   97.99%           
========================================
  Files          327      328    +1     
  Lines        18665    18676   +11     
========================================
+ Hits         18290    18301   +11     
  Misses         375      375           
Impacted Files Coverage Δ
...ubmodels/interface/lithium_plating/base_plating.py 100.00% <ø> (ø)
...dels/full_battery_models/lead_acid/higher_order.py 98.11% <50.00%> (ø)
...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%> (ø)
pybamm/models/submodels/interface/sei/base_sei.py 100.00% <100.00%> (ø)
pybamm/models/submodels/porosity/__init__.py 100.00% <100.00%> (ø)
...els/submodels/porosity/reaction_driven_porosity.py 100.00% <100.00%> (ø)
...submodels/porosity/reaction_driven_porosity_ode.py 100.00% <100.00%> (ø)

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 bf4c1eb...7a2dc5c. Read the comment docs.

Comment on lines 69 to 75
# Reaction driven porosity ODE for lithium-ion is not supported at the moment
# if self.options["SEI porosity change"] == "true":
# beta_sei_n = self.param.beta_sei_n
# deps_n_dt += beta_sei_n * j_sei_n
# if self.options["lithium plating porosity change"] == "true":
# beta_plating = self.param.beta_plating
# deps_n_dt += beta_plating * j_plating
Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

I commented it out as it is not used. Should I delete it? Because it is checking the options rather than the submodels at the moment there is no way we can enter these if statements.

Copy link
Member

Choose a reason for hiding this comment

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

Yes can be removed

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.

Thanks @brosaplanella ! Just remove the commented out lines then we can merge

Comment on lines 69 to 75
# Reaction driven porosity ODE for lithium-ion is not supported at the moment
# if self.options["SEI porosity change"] == "true":
# beta_sei_n = self.param.beta_sei_n
# deps_n_dt += beta_sei_n * j_sei_n
# if self.options["lithium plating porosity change"] == "true":
# beta_plating = self.param.beta_plating
# deps_n_dt += beta_plating * j_plating
Copy link
Member

Choose a reason for hiding this comment

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

Yes can be removed

@brosaplanella brosaplanella merged commit b12c3ee into develop Aug 25, 2021
@brosaplanella brosaplanella deleted the issue-1505-porosity branch August 25, 2021 08:20
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.

Reformat porosity model for SEI/plating
2 participants