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

Add half cell submodels #1600

Merged
merged 36 commits into from
Sep 9, 2021
Merged

Conversation

valentinsulzer
Copy link
Member

Description

Edit submodels to allow half-cell options without needing to rewrite the entire submodel

Fixes #1518

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

Copy link
Sponsor 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.

That looks great Tino, thanks! Just a very few minor comments.

examples/scripts/DFN.py Outdated Show resolved Hide resolved
examples/scripts/DFN_half_cell.py Outdated Show resolved Hide resolved
examples/scripts/DFN_half_cell.py Outdated Show resolved Hide resolved
Copy link
Sponsor 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.

``

examples/scripts/DFN_half_cell.py Outdated Show resolved Hide resolved
@brosaplanella brosaplanella linked an issue Aug 19, 2021 that may be closed by this pull request
Co-authored-by: Ferran Brosa Planella <Ferran.Brosa-Planella@warwick.ac.uk>
@valentinsulzer
Copy link
Member Author

@molel-gt you can take a look now if you want

@codecov
Copy link

codecov bot commented Sep 8, 2021

Codecov Report

Merging #1600 (54e70dc) into develop (d4e95f7) will increase coverage by 0.01%.
The diff coverage is 99.76%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1600      +/-   ##
===========================================
+ Coverage    99.26%   99.28%   +0.01%     
===========================================
  Files          343      342       -1     
  Lines        18659    18766     +107     
===========================================
+ Hits         18522    18631     +109     
+ Misses         137      135       -2     
Impacted Files Coverage Δ
pybamm/expression_tree/symbol.py 98.98% <ø> (+0.73%) ⬆️
...s/full_battery_models/lithium_ion/electrode_soh.py 100.00% <ø> (ø)
...tery_models/lithium_ion/electrode_soh_half_cell.py 100.00% <ø> (ø)
...amm/models/full_battery_models/lithium_ion/spme.py 100.00% <ø> (ø)
...lectrolyte_conductivity/integrated_conductivity.py 100.00% <ø> (ø)
...trolyte_conductivity/leading_order_conductivity.py 100.00% <ø> (ø)
...ential_form/composite_surface_form_conductivity.py 100.00% <ø> (ø)
...e_potential_form/full_surface_form_conductivity.py 100.00% <ø> (ø)
...otential_form/leading_surface_form_conductivity.py 100.00% <ø> (ø)
...ubmodels/oxygen_diffusion/base_oxygen_diffusion.py 100.00% <ø> (ø)
... and 51 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 d4e95f7...54e70dc. Read the comment docs.

@molel-gt
Copy link
Contributor

molel-gt commented Sep 9, 2021

@molel-gt you can take a look now if you want

sure, I'm gonna try running simulations first and comment with any errors or unexpected results

@valentinsulzer valentinsulzer merged commit 60e4b50 into develop Sep 9, 2021
@valentinsulzer valentinsulzer deleted the issue-1518-half-cell-dfn-submodel branch September 9, 2021 20:23
@valentinsulzer
Copy link
Member Author

I've merged the branch since the tests passed, feel free to still suggest changes

@molel-gt
Copy link
Contributor

molel-gt commented Sep 9, 2021 via email

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.

Half-cell DFN in submodel format Integrate half-cell model into submodel structure
3 participants