Skip to content

Issue 874 simplify thermal - #938

Merged
rtimms merged 13 commits into
developfrom
issue-874-simplify-thermal
Apr 9, 2020
Merged

rtimms merged 13 commits into
developfrom
issue-874-simplify-thermal

Conversation

@rtimms

@rtimms rtimms commented Apr 3, 2020

Copy link
Copy Markdown
Contributor

Description

Simplifies the thermal submodels. Now we only have models for (option string name in brackets):

  • Isothermal ("isothermal")
  • Lumped ("lumped"),
  • OneDimensionalX ("x-full")
  • `CurrentCollector1D ("x-lumped" with "dimensionality": 1)
  • `CurrentCollector2D ("x-lumped" with "dimensionality": 2)

The option "xyz-lumped" has been removed. Now "lumped" always returns an ODE for the volume-averaged temperature.

The option "thermal current collectors" has also been removed. All models now account for the presence of current collectors.

Fixes #874

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 Apr 6, 2020 •

Copy link
Copy Markdown

Codecov Report

Merging #938 into develop will increase coverage by 0.01%.
The diff coverage is 99.36%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #938      +/-   ##
===========================================
+ Coverage    98.10%   98.12%   +0.01%     
===========================================
  Files          223      214       -9     
  Lines        11258    11123     -135     
===========================================
- Hits         11045    10914     -131     
+ Misses         213      209       -4     
Impacted Files Coverage Δ
...dels/submodels/current_collector/potential_pair.py 100.00% <ø> (ø)
pybamm/models/submodels/thermal/isothermal.py 91.30% <85.71%> (ø)
...m/models/full_battery_models/base_battery_model.py 100.00% <100.00%> (ø)
pybamm/models/submodels/thermal/__init__.py 100.00% <100.00%> (ø)
pybamm/models/submodels/thermal/base_thermal.py 100.00% <100.00%> (+7.05%) ⬆️
pybamm/models/submodels/thermal/lumped.py 100.00% <100.00%> (ø)
...mm/models/submodels/thermal/pouch_cell/__init__.py 100.00% <100.00%> (ø)
...mal/pouch_cell/pouch_cell_1D_current_collectors.py 100.00% <100.00%> (ø)
...mal/pouch_cell/pouch_cell_2D_current_collectors.py 100.00% <100.00%> (ø)
pybamm/models/submodels/thermal/x_full.py 100.00% <100.00%> (ø)
... and 4 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 11d62d6...6f160d2. Read the comment docs.

@valentinsulzer valentinsulzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me, much cleaner now! Makes sense for @Scottmar93 to review too as he is more familiar with these models
There is the odd "domian" and "defualt" , but I don't care about that ..

@Scottmar93 Scottmar93 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.

I think this is all much clearer now. Make sense to leave changing how grad works for another issue and it'll be really clean after that!

I think x_full.py and x_lumped.py as still left though, should these be deleted?

@rtimms
rtimms merged commit 1392eb2 into develop Apr 9, 2020
@rtimms
rtimms deleted the issue-874-simplify-thermal branch April 9, 2020 18:19
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.

Simplify thermal models

3 participants