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

add plot_thermal_components #4021

Merged
merged 2 commits into from
Apr 19, 2024
Merged

add plot_thermal_components #4021

merged 2 commits into from
Apr 19, 2024

Conversation

valentinsulzer
Copy link
Member

@valentinsulzer valentinsulzer commented Apr 18, 2024

Description

Similar to plot_voltage_components, breaks down the temperature / heating into components.
This currently is oriented towards the lumped thermal model.

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

Copy link

codecov bot commented Apr 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.59%. Comparing base (51c4120) to head (61bc39b).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4021   +/-   ##
========================================
  Coverage    99.58%   99.59%           
========================================
  Files          257      258    +1     
  Lines        21249    21306   +57     
========================================
+ Hits         21161    21219   +58     
+ Misses          88       87    -1     

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

@@ -249,6 +258,12 @@ def _get_standard_coupled_variables(self, variables):
# Current collector
"Negative current collector Ohmic heating [W.m-3]": Q_ohm_s_cn,
"Positive current collector Ohmic heating [W.m-3]": Q_ohm_s_cp,
# Lumped cooling
Copy link
Contributor

Choose a reason for hiding this comment

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

Can calculating and adding these variables be a separate method that for now only gets called by the lumped model? Other models handle cooling differently and use different parameters so right now this will either not work as the parameters aren’t there or will work but give a result that may be different from averaging the actual cooling in the model.

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 moved it to lumped model. Is there an easy equivalent for x-full or should we leave it to only work with the lumped model?

Copy link
Contributor

Choose a reason for hiding this comment

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

You’ll have to sum the cooling terms over the boundaries, but you’ll have to do all those calculations manually because of how the model is set up. It assumes a pouch and cooling from the two large faces normal to the through cell direction show up as boundary conditions either end. The other cooking all shows up as a source term (start from 3D and integrate over y,z so the boundary terms become sources).

Probably not worth doing unless someone asks for it. The x-full model isn’t really that useful since it’s just for a single layer.

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.

thanks, looks great!

@valentinsulzer valentinsulzer merged commit 5d22165 into develop Apr 19, 2024
39 of 40 checks passed
@valentinsulzer valentinsulzer deleted the plot-thermal-components branch April 19, 2024 16:52
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.

2 participants