Skip to content

Issue 492 potentiostatic#751

Merged
valentinsulzer merged 38 commits intomasterfrom
issue-492-potentiostatic
Dec 14, 2019
Merged

Issue 492 potentiostatic#751
valentinsulzer merged 38 commits intomasterfrom
issue-492-potentiostatic

Conversation

@valentinsulzer
Copy link
Copy Markdown
Member

Description

Add models for voltage-controlled and power-controlled discharge

Fixes #492

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
Copy Markdown

codecov Bot commented Dec 4, 2019

Codecov Report

Merging #751 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #751      +/-   ##
==========================================
- Coverage   98.39%   98.35%   -0.04%     
==========================================
  Files         176      179       +3     
  Lines        9701     9810     +109     
==========================================
+ Hits         9545     9649     +104     
- Misses        156      161       +5
Impacted Files Coverage Δ
...amm/models/submodels/current_collector/__init__.py 100% <ø> (ø) ⬆️
...ollector/effective_resistance_current_collector.py 96.29% <ø> (ø) ⬆️
...ttery_models/lithium_ion/base_lithium_ion_model.py 100% <ø> (ø) ⬆️
...models/current_collector/base_current_collector.py 100% <ø> (ø) ⬆️
pybamm/parameters/electrical_parameters.py 100% <ø> (ø) ⬆️
...m/models/full_battery_models/base_battery_model.py 100% <100%> (+0.34%) ⬆️
pybamm/models/submodels/electrode/ohm/full_ohm.py 100% <100%> (ø) ⬆️
...l_battery_models/lead_acid/base_lead_acid_model.py 100% <100%> (ø) ⬆️
pybamm/models/submodels/base_submodel.py 100% <100%> (ø) ⬆️
pybamm/spatial_methods/zero_dimensional_method.py 100% <100%> (ø) ⬆️
... and 27 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 c75de8c...b54eb0e. Read the comment docs.

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

this looks great, thanks @tinosulzer !

Upper voltage cut-off [V],2.44,,(just over) 14.5V across 6-cell battery
C-rate,1,,
Current function,[constant],,
C-rate,0.1,,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should this still be 1?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

one of the tests failed when it was 1C so I just lazily changed it so 0.1C, don't really care about lead-acid any more ...

,,,
# Electrical,,,
Cell capacity [A.h],0.680616,,24 Ah/m2 * 0.137m * 0.207m
Typical current [A],1.46925726107,,1C current
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should this just be equal to the cell capacity?

from .base_external_circuit import BaseModel, LeadingOrderBaseModel


class FunctionControl(BaseModel):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is great!

Comment thread pybamm/parameters/parameter_values.py Outdated
def check_and_update_parameter_values(self, values):
# Make sure "C-rate" and current are both non-zero
if "C-rate" in values and values["C-rate"] == 0:
# Make typical current is non-zero
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

make sure typical...

@valentinsulzer valentinsulzer merged commit 2ca2598 into master Dec 14, 2019
@valentinsulzer valentinsulzer deleted the issue-492-potentiostatic branch December 14, 2019 02:28
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.

potentiostatic mode

2 participants