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

fix experiment bugs #1707

Merged
merged 17 commits into from Nov 12, 2021
Merged

fix experiment bugs #1707

merged 17 commits into from Nov 12, 2021

Conversation

valentinsulzer
Copy link
Member

@valentinsulzer valentinsulzer commented Oct 1, 2021

Description

Fix some bugs related to how an experiment is set up

Fixes #1700
Fixes #1702
Fixes #479

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 5, 2021

Codecov Report

Merging #1707 (32a49e7) into develop (58922b5) will increase coverage by 0.00%.
The diff coverage is 99.40%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1707   +/-   ##
========================================
  Coverage    99.24%   99.24%           
========================================
  Files          344      345    +1     
  Lines        19037    19049   +12     
========================================
+ Hits         18894    18906   +12     
  Misses         143      143           
Impacted Files Coverage Δ
...ybamm/models/submodels/electrode/base_electrode.py 100.00% <ø> (ø)
...trolyte_conductivity/leading_order_conductivity.py 100.00% <ø> (ø)
...dels/submodels/interface/kinetics/base_kinetics.py 100.00% <ø> (ø)
.../interface/lithium_plating/irreversible_plating.py 100.00% <ø> (ø)
...ls/interface/lithium_plating/reversible_plating.py 100.00% <ø> (ø)
.../submodels/particle_mechanics/crack_propagation.py 100.00% <ø> (ø)
pybamm/util.py 97.12% <ø> (ø)
...lyte_conductivity/base_electrolyte_conductivity.py 98.78% <91.66%> (-0.21%) ⬇️
...mm/expression_tree/operations/convert_to_casadi.py 100.00% <100.00%> (ø)
...bamm/expression_tree/operations/replace_symbols.py 100.00% <100.00%> (ø)
... and 25 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 b7c2ae6...32a49e7. 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.

nice, thanks @tinosulzer !


# load models
models = [
pybamm.lead_acid.LOQS(),
pybamm.lead_acid.FOQS(),
pybamm.lead_acid.Composite(),
pybamm.lead_acid.Full(),
pybamm.lead_acid.Full({"surface form": "differential"}),
Copy link
Contributor

Choose a reason for hiding this comment

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

revert to the default options?

@@ -713,17 +713,6 @@ def build_model(self):
self.set_degradation_variables()
self.set_summary_variables()

# Massive hack for consistent delta_phi = phi_s - phi_e with SPMe
Copy link
Contributor

Choose a reason for hiding this comment

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

bye bye!

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Where was the issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

I just made a new submodel for this. So now we have inverse butler-volmer for delta_phi_av and then another submodel for delta_phi. It's still a hack but now a "feature" instead of a "bug"

Copy link
Member Author

Choose a reason for hiding this comment

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

I am also thinking of combining the interface and conductivity submodels into one. It's the most confusing part of the submodels at the moment, because the way the interface and conductivity submodels interact is different based on whether you do forward or inverse kinetics. Combining them would mean more duplicate code but I think clearer

@valentinsulzer valentinsulzer merged commit 4aa4776 into develop Nov 12, 2021
@valentinsulzer valentinsulzer deleted the experiment-bugs branch November 12, 2021 20:40
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.

Fix SPMe Potentials
3 participants