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 option to include heat of mixing #1778

Closed
rtimms opened this issue Nov 3, 2021 · 5 comments · Fixed by #2837
Closed

Add option to include heat of mixing #1778

rtimms opened this issue Nov 3, 2021 · 5 comments · Fixed by #2837
Assignees
Labels
hackathon priority: low No existing plans to resolve

Comments

@rtimms
Copy link
Contributor

rtimms commented Nov 3, 2021

Add an option to include heat of mixing (irreversible) and use the expression for the reversible heating from this paper

@brosaplanella brosaplanella added the difficulty: easy A good issue for someone new. Can be done in a few hours label Mar 10, 2022
@srinathkp
Copy link

Hey @rtimms , I'm interested in PyBamm for GSoC22 and I wanna work on this issue. I went through the abstract and few parts of the paper that explains the equations of importance- Eq. (26) and (27) But, I don't have a background on battery physics, so it's a bit complex for me to identify where the heat of mixing comes into picture in the equation and the corresponding file/class that needs changing. Can you help me with that

@brosaplanella
Copy link
Sponsor Member

You need to incorporate the extra terms in base_thermal.py (in _get_standard_coupled_variables l90). You basically need to define the extra terms, which correspond to equations (20)-(21) of the published version (let me know if you can't access it). Note that you need to handle full cell and half-cell differently (like some other terms already do).

@brosaplanella
Copy link
Sponsor Member

brosaplanella commented Mar 6, 2023

Hackathon info

This will be one of the projects for the first PyBaMM Hackathon. Here you can find some information (summarising other points made on this issue) which should be a useful starting point. Note that this post will evolve, even during the Hackathon day, so make sure to check it regularly.

Background

Currently, PyBaMM includes various heat generation mechanisms in its thermal models (see base_thermal.py), for example reversible heating or Ohmic heating. At the moment it does not include the heat of mixing, as defined in equations (20)-(21) of Richardson & Korotkin (2021).

The aim of this project is to include this extra heat source term, and add an option to base_battery_model.py to enable or disable this heat source term to allow comparisons.

Tasks

  • Implement the additional heat source term in base_thermal.py. Special attention needs to be paid to ensure the right concentration (e.g. x-averaged or not) is used for each model.
  • Add an option to base_battery_model.py which allows to switch on/off this source term.
  • Write an example that shows how to include this source term and compares the same model with/without it.
  • Ensure coverage and tests pass.

@brosaplanella brosaplanella removed the difficulty: easy A good issue for someone new. Can be done in a few hours label Mar 13, 2023
@brosaplanella
Copy link
Sponsor Member

@brosaplanella
Copy link
Sponsor Member

brosaplanella commented Mar 29, 2023

Afgr1087 added a commit to aabills/PyBaMM that referenced this issue Mar 29, 2023
Afgr1087 added a commit to aabills/PyBaMM that referenced this issue Mar 29, 2023
Afgr1087 added a commit to aabills/PyBaMM that referenced this issue Mar 29, 2023
Afgr1087 added a commit to aabills/PyBaMM that referenced this issue Mar 29, 2023
Afgr1087 added a commit to aabills/PyBaMM that referenced this issue Mar 29, 2023
aabills added a commit to aabills/PyBaMM that referenced this issue Mar 29, 2023
brosaplanella added a commit to aabills/PyBaMM that referenced this issue Mar 29, 2023
@valentinsulzer valentinsulzer added the priority: low No existing plans to resolve label May 8, 2023
brosaplanella added a commit to aabills/PyBaMM that referenced this issue May 23, 2023
brosaplanella added a commit to aabills/PyBaMM that referenced this issue May 23, 2023
brosaplanella added a commit to aabills/PyBaMM that referenced this issue May 23, 2023
brosaplanella added a commit to aabills/PyBaMM that referenced this issue May 24, 2023
brosaplanella added a commit to aabills/PyBaMM that referenced this issue Sep 15, 2023
brosaplanella added a commit to aabills/PyBaMM that referenced this issue Jun 17, 2024
brosaplanella added a commit to aabills/PyBaMM that referenced this issue Jun 17, 2024
brosaplanella added a commit to aabills/PyBaMM that referenced this issue Jun 17, 2024
…and compute the derivative in the model directly instead
brosaplanella added a commit to aabills/PyBaMM that referenced this issue Jun 17, 2024
brosaplanella added a commit to aabills/PyBaMM that referenced this issue Jun 17, 2024
brosaplanella added a commit that referenced this issue Jun 21, 2024
* fix

* fix exception

* added a Newfile

* pseudo

* #1778 add heat of mixing option

* #1778 fixed indentation

* #1778 fixed test

* #1778 fixed test

* #1788 added heat of mixing tests

* First commit

* #1778 fixed test

* First iteration

* #1788 try to fix diff of U

* first push from mac

* Fixed full broadcast

* Fixed domain in the integral

* #1778 fix parameter values example

* Added children[0].children[0]

* Added half cell

* style: pre-commit fixes

* #1788 revert some unrelated changes

* change ocv hack

* Revert "change ocv hack"

This reverts commit 3ad0c75.

* #1778 fix heat of mixing

* #1839 fix thermal submodels to take x_average

* #1778 add example heat of mixing

* ruff

* style: pre-commit fixes

* #1778 fix lead acid models

* fix SPM with the right broadcast of temperature

* #1778 refactor heat of mixing

* style: pre-commit fixes

* Add Richardson2021 citation for heat of mixing

* Fixed heat of mixing sign

* Rewritten heat of mixing example, added comparison plot to compare with the paper

* Fixed ruff formatting errors in the heat of mixing example script

* #1778 fix x-full

* #1778 fix tests

* #1778 improve coverage

* style: pre-commit fixes

* #1778 Valentin's suggestion to remove the dUdsto function and compute the derivative in the model directly instead

* #1778 fix failing test

* #1778 add heat of mixing to CHANGELOG

---------

Co-authored-by: Alec Bills <48105066+abillscmu@users.noreply.github.com>
Co-authored-by: smitasahu2 <smitasahuiitd@gmail.com>
Co-authored-by: Afgr1087 <andres.galvis@fem.unicamp.br>
Co-authored-by: Ferran Brosa Planella <Ferran.Brosa-Planella@warwick.ac.uk>
Co-authored-by: Ivan Korotkin <i.korotkin@soton.ac.uk>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
js1tr3 pushed a commit to js1tr3/PyBaMM that referenced this issue Aug 12, 2024
* fix

* fix exception

* added a Newfile

* pseudo

* pybamm-team#1778 add heat of mixing option

* pybamm-team#1778 fixed indentation

* pybamm-team#1778 fixed test

* pybamm-team#1778 fixed test

* pybamm-team#1788 added heat of mixing tests

* First commit

* pybamm-team#1778 fixed test

* First iteration

* pybamm-team#1788 try to fix diff of U

* first push from mac

* Fixed full broadcast

* Fixed domain in the integral

* pybamm-team#1778 fix parameter values example

* Added children[0].children[0]

* Added half cell

* style: pre-commit fixes

* pybamm-team#1788 revert some unrelated changes

* change ocv hack

* Revert "change ocv hack"

This reverts commit 3ad0c75.

* pybamm-team#1778 fix heat of mixing

* pybamm-team#1839 fix thermal submodels to take x_average

* pybamm-team#1778 add example heat of mixing

* ruff

* style: pre-commit fixes

* pybamm-team#1778 fix lead acid models

* fix SPM with the right broadcast of temperature

* pybamm-team#1778 refactor heat of mixing

* style: pre-commit fixes

* Add Richardson2021 citation for heat of mixing

* Fixed heat of mixing sign

* Rewritten heat of mixing example, added comparison plot to compare with the paper

* Fixed ruff formatting errors in the heat of mixing example script

* pybamm-team#1778 fix x-full

* pybamm-team#1778 fix tests

* pybamm-team#1778 improve coverage

* style: pre-commit fixes

* pybamm-team#1778 Valentin's suggestion to remove the dUdsto function and compute the derivative in the model directly instead

* pybamm-team#1778 fix failing test

* pybamm-team#1778 add heat of mixing to CHANGELOG

---------

Co-authored-by: Alec Bills <48105066+abillscmu@users.noreply.github.com>
Co-authored-by: smitasahu2 <smitasahuiitd@gmail.com>
Co-authored-by: Afgr1087 <andres.galvis@fem.unicamp.br>
Co-authored-by: Ferran Brosa Planella <Ferran.Brosa-Planella@warwick.ac.uk>
Co-authored-by: Ivan Korotkin <i.korotkin@soton.ac.uk>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hackathon priority: low No existing plans to resolve
Development

Successfully merging a pull request may close this issue.

5 participants