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 2026 total reaction #2144

Merged
merged 16 commits into from
Jul 7, 2022
Merged

Issue 2026 total reaction #2144

merged 16 commits into from
Jul 7, 2022

Conversation

valentinsulzer
Copy link
Member

Description

Creates a separate submodel for the total kinetics ("sum of ...." variables
Continuing to break up #2073

Fixes #2026

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 Jul 2, 2022

Codecov Report

Merging #2144 (864cfcb) into develop (6a51492) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop    #2144      +/-   ##
===========================================
- Coverage    99.38%   99.38%   -0.01%     
===========================================
  Files          355      356       +1     
  Lines        19308    19297      -11     
===========================================
- Hits         19189    19178      -11     
  Misses         119      119              
Impacted Files Coverage Δ
...m/models/full_battery_models/base_battery_model.py 99.76% <ø> (-0.01%) ⬇️
...etics/first_order_kinetics/first_order_kinetics.py 100.00% <ø> (ø)
...ubmodels/interface/lithium_plating/base_plating.py 100.00% <ø> (ø)
...els/interface/open_circuit_potential/single_ocp.py 100.00% <ø> (ø)
...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.16% <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%> (ø)
...tential_form/explicit_surface_form_conductivity.py 95.00% <100.00%> (-0.24%) ⬇️
... and 7 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 6a51492...864cfcb. 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 looks good! just a couple of minor comments


# Sum variables
if pybamm.xyz_average(j_p).id == pybamm.Scalar(0).id:
a_p = j_p # zero
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add a more detailed comment here? on first read setting a to zero seems wrong

@rtimms
Copy link
Contributor

rtimms commented Jul 6, 2022

Yeah that’s clearer, thanks!

Copy link
Member

@brosaplanella brosaplanella 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, thanks @tinosulzer!

@valentinsulzer valentinsulzer merged commit 6877eac into develop Jul 7, 2022
@valentinsulzer valentinsulzer deleted the issue-2026-total-reaction branch July 7, 2022 20: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.

Check that all reactions are included in the "sum of interfacial current densities"
3 participants