Skip to content

Issue 1903 power - #1917

Merged
valentinsulzer merged 15 commits into
developfrom
issue-1903-power
Feb 8, 2022
Merged

Issue 1903 power#1917
valentinsulzer merged 15 commits into
developfrom
issue-1903-power

Conversation

@valentinsulzer

@valentinsulzer valentinsulzer commented Jan 24, 2022

Copy link
Copy Markdown
Member

Description

Adds more operating modes for power and resistance control.

The explicit models can only be used with DFN without surface form, so it's not possible to completely eliminate algebraic equations using that (but it can be done using the differential models)

Fixes #1903
Fixes #1691

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

codecov Bot commented Jan 24, 2022

Copy link
Copy Markdown

Codecov Report

Merging #1917 (cde0406) into develop (4c69ca0) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1917   +/-   ##
========================================
  Coverage    99.32%   99.32%           
========================================
  Files          346      346           
  Lines        19002    19058   +56     
========================================
+ Hits         18874    18930   +56     
  Misses         128      128           
Impacted Files Coverage Δ
...ybamm/models/full_battery_models/lead_acid/loqs.py 100.00% <ø> (ø)
...m/models/full_battery_models/base_battery_model.py 99.76% <100.00%> (+<0.01%) ⬆️
...current_collector/homogeneous_current_collector.py 100.00% <100.00%> (ø)
.../submodels/electrolyte_diffusion/full_diffusion.py 100.00% <100.00%> (ø)
...bamm/models/submodels/external_circuit/__init__.py 100.00% <100.00%> (ø)
...ernal_circuit/explicit_control_external_circuit.py 100.00% <100.00%> (ø)
...ernal_circuit/function_control_external_circuit.py 98.91% <100.00%> (+0.24%) ⬆️
pybamm/simulation.py 98.36% <100.00%> (ø)

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 88f95e8...cde0406. Read the comment docs.

@rtimms rtimms left a comment

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.

thanks @tinosulzer looks good!

Comment thread examples/scripts/DFN.py
@@ -5,46 +5,41 @@
import pybamm

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.

need to change the example script back

"resistance",
"differential resistance",
"explicit resistance",
"CCCV",

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.

the CCCV option isn't listed in the docs

def get_coupled_variables(self, variables):
param = self.param

# Current is given as applied power divided by voltage

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.

voltage divided by resistance

@valentinsulzer
valentinsulzer merged commit 171c80e into develop Feb 8, 2022
@valentinsulzer
valentinsulzer deleted the issue-1903-power branch February 8, 2022 19:08
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.

Different constant-power approach Simulate external resistance mode

2 participants