From 79b0d5b057849f54ac728c1c2cc6b7d4436d7645 Mon Sep 17 00:00:00 2001 From: Alec Bills <48105066+aabills@users.noreply.github.com> Date: Mon, 4 Nov 2024 14:40:32 -0800 Subject: [PATCH] add reaction heating (#4557) * add reaction heating * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Eric G. Kratz --- src/pybamm/models/submodels/thermal/base_thermal.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pybamm/models/submodels/thermal/base_thermal.py b/src/pybamm/models/submodels/thermal/base_thermal.py index 42d90f1bcf..384cb1723a 100644 --- a/src/pybamm/models/submodels/thermal/base_thermal.py +++ b/src/pybamm/models/submodels/thermal/base_thermal.py @@ -143,8 +143,12 @@ def _get_standard_coupled_variables(self, variables): phase_names = ["primary ", "secondary "] if self.options.electrode_types["negative"] == "planar": - Q_rxn_n = pybamm.FullBroadcast( - 0, ["negative electrode"], "current collector" + i_n = variables["Lithium metal total interfacial current density [A.m-2]"] + eta_r_n = variables["Lithium metal interface reaction overpotential [V]"] + Q_rxn_n = pybamm.PrimaryBroadcast( + i_n * eta_r_n / self.param.n.L, + ["negative electrode"], + "current collector", ) Q_rev_n = pybamm.FullBroadcast( 0, ["negative electrode"], "current collector"