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 1245 active material #1262

Merged
merged 13 commits into from
Dec 2, 2020
Merged

Conversation

valentinsulzer
Copy link
Member

Description

Set up active material models ready to model loss of active material
Fixes #1245

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 Nov 27, 2020

Codecov Report

Merging #1262 (41284b7) into develop (0d34872) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1262      +/-   ##
===========================================
+ Coverage    98.06%   98.07%   +0.01%     
===========================================
  Files          265      270       +5     
  Lines        14900    15030     +130     
===========================================
+ Hits         14611    14741     +130     
  Misses         289      289              
Impacted Files Coverage Δ
pybamm/models/submodels/porosity/base_porosity.py 100.00% <ø> (ø)
...m/models/full_battery_models/base_battery_model.py 99.68% <100.00%> (+<0.01%) ⬆️
...l_battery_models/lead_acid/base_lead_acid_model.py 100.00% <100.00%> (ø)
...ybamm/models/full_battery_models/lead_acid/full.py 100.00% <100.00%> (ø)
...dels/full_battery_models/lead_acid/higher_order.py 98.09% <100.00%> (+0.01%) ⬆️
...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%> (ø)
...bamm/models/full_battery_models/lithium_ion/spm.py 100.00% <100.00%> (ø)
...amm/models/full_battery_models/lithium_ion/spme.py 100.00% <100.00%> (ø)
... and 39 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 0d34872...41284b7. Read the comment docs.

Copy link
Contributor

@rtimms rtimms left a comment

Choose a reason for hiding this comment

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

thanks @tinosulzer !

return pybamm.FunctionParameter(
"Negative electrode surface area to volume ratio [m-1]", inputs
)
def epsilon_s_n(self, x):
Copy link
Contributor

Choose a reason for hiding this comment

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

If you set a model for LAM then the variable corresponding to epsislon_s_n and the parameter epsilon_s_n will be different (I think?) - the latter will just give the initial parameter value/function provided. Will this cause confusion? What you really provide as a parameter is the initial active material volume fraction, but I think it would be messy to append "Initial" everywhere. The same is true for porosity.

I don't think this needs changing here, but something to think about in the future. I think my opinion is to leave it as is, and that it is understood that if you have a model describing how a parameter changes then that parameter should be treated as a variable.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this is something we should mention when we put together the workflow for degradation modeling. I agree putting "Initial" into the parameter names would be messy

@valentinsulzer valentinsulzer merged commit 6d000f1 into develop Dec 2, 2020
@valentinsulzer valentinsulzer deleted the issue-1245-active-material branch December 2, 2020 14:04
@weilongai
Copy link
Contributor

weilongai commented Dec 4, 2020

Hi, I have made a loss of active material submodel in pybamm. It is based on the LAM model (Eq. 25) in Reniers et al. Would you mind if I push it here?
Reniers, J. M., Mulder, G., & Howey, D. A. (2019). Review and performance comparison of mechanical-chemical degradation models for lithium-ion batteries. Journal of The Electrochemical Society, 166(14), A3189.

@valentinsulzer
Copy link
Member Author

Yes, go for it! This branch has now been merged though so you'll need to open a PR to develop

@weilongai
Copy link
Contributor

weilongai commented Dec 4, 2020

I see there is a place holder already, but my implementation is not based on this. How do you think is the best way to do? Is it good to push my current version (tracing back to the last commit on Nov 17, 2020) to develop anyway?

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.

Increase in a active material during aging
3 participants