pybamm-team / PyBaMM

Fast and flexible physics-based battery models in Python
https://www.pybamm.org/
BSD 3-Clause "New" or "Revised" License
1.12k stars 547 forks source link

add reaction heating #4557

Closed aabills closed 2 weeks ago

aabills commented 3 weeks ago

Description

Implements reaction heating in half cell models for the negative electrode

Fixes #4324

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.

Key checklist:

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

Further checks:

aabills commented 3 weeks ago

reaction heating implemented but I think heat source is still inaccurate for half-cell models.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.29%. Comparing base (19a7738) to head (7678703). Report is 3 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #4557 +/- ## =========================================== - Coverage 99.42% 99.29% -0.14% =========================================== Files 300 300 Lines 22774 22776 +2 =========================================== - Hits 22643 22615 -28 - Misses 131 161 +30 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

aabills commented 2 weeks ago

I have found the second bug now. I think we should go ahead and merge this and discuss the second bug in a second issue, which I will open momentarily. The reason for a second PR is that the second bug could have ramifications outside of the files addressed in this pull request.

aabills commented 2 weeks ago

Not sure if we want to address this here or elsewhere (due to the second bug, this will fail for now), but I think we should start testing conservation of energy to catch stuff like this.