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

Allow particle size to be a tuple and fix MPM half-cell #2672

Merged
merged 12 commits into from
Feb 17, 2023

Conversation

rtimms
Copy link
Contributor

@rtimms rtimms commented Feb 8, 2023

Description

"Particle size" can now be a tuple to allow different behaviour in each electrode. MPM now works as a half-cell model, and no longer requires the user to provide distribution parameters for both electrodes.

Also allows SPM(e) to have size distributions so that users can create more customised models (e.g. SPMe with a size distribution in one electrode only)

Fixes #2669

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
  • 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

@rtimms rtimms marked this pull request as draft February 8, 2023 23:24
@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Base: 99.69% // Head: 99.69% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (3c30f50) compared to base (a3756de).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2672   +/-   ##
========================================
  Coverage    99.69%   99.69%           
========================================
  Files          271      271           
  Lines        19571    19586   +15     
========================================
+ Hits         19511    19526   +15     
  Misses          60       60           
Impacted Files Coverage Δ
pybamm/geometry/battery_geometry.py 100.00% <100.00%> (ø)
...m/models/full_battery_models/base_battery_model.py 99.78% <100.00%> (ø)
...bamm/models/full_battery_models/lithium_ion/mpm.py 100.00% <100.00%> (ø)
.../submodels/active_material/base_active_material.py 100.00% <100.00%> (ø)
...ybamm/models/submodels/interface/base_interface.py 100.00% <100.00%> (ø)
...dels/submodels/interface/kinetics/base_kinetics.py 100.00% <100.00%> (ø)
...face/open_circuit_potential/current_sigmoid_ocp.py 100.00% <100.00%> (ø)
...els/interface/open_circuit_potential/single_ocp.py 100.00% <100.00%> (ø)
pybamm/models/submodels/particle/base_particle.py 100.00% <100.00%> (ø)
pybamm/parameters/size_distribution_parameters.py 100.00% <100.00%> (ø)
... and 46 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@rtimms rtimms marked this pull request as ready for review February 10, 2023 18:31
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.

Looks good to me. How much effort is fixing the coverage?

@rtimms rtimms merged commit 728eda4 into develop Feb 17, 2023
@rtimms rtimms deleted the #2669-particle-tuple branch February 17, 2023 13:30
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.

Allow "particle size" option to be a tuple
2 participants