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

simplify expression of cooling terms in x-lumped thermal models #3439

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

rtimms
Copy link
Contributor

@rtimms rtimms commented Oct 11, 2023

Description

Rewrite the cooling terms in the x-lumped and lumped thermal models in terms of fluxes. IMO it is easier to follow the code now. The equations are unchanged, just expressed differently.

Fixes # (issue)

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: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All tests pass: $ python run-tests.py --all (or $ nox -s tests)
  • The documentation builds: $ python run-tests.py --doctest (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ nox -s quick).

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@rtimms rtimms requested a review from brosaplanella October 11, 2023 10:44
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (bd5e240) 99.58% compared to head (ce8e56b) 99.58%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3439   +/-   ##
========================================
  Coverage    99.58%   99.58%           
========================================
  Files          256      256           
  Lines        19998    20004    +6     
========================================
+ Hits         19915    19921    +6     
  Misses          83       83           
Files Coverage Δ
pybamm/models/submodels/thermal/lumped.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%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Looks great, thanks! Not sure if this needs a CHANGELOG line, I leave it up to you. Let's wait to merge until the wheels are fixed though, so we make it easier for Saransh to cherrypick the commits.

@Saransh-cpp
Copy link
Member

Just saw the comment, sorry for the delay. Everything is fixed now, feel free to merge!

@brosaplanella
Copy link
Member

@rtimms if you are happy without a CHANGELOG line feel free to merge this

@rtimms rtimms merged commit 33d2187 into develop Nov 7, 2023
32 of 33 checks passed
@rtimms rtimms deleted the rewrite-cooling-terms branch November 7, 2023 12:37
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.

3 participants