From 8cc397b221c03dec0ef847eb96748381ce80c85e Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Sat, 27 Feb 2021 10:48:32 +0000 Subject: [PATCH 1/2] #1406 fixed bug with positive electrode ohmic losses --- pybamm/models/submodels/electrode/base_electrode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybamm/models/submodels/electrode/base_electrode.py b/pybamm/models/submodels/electrode/base_electrode.py index a14cd98d44..cdd3d03a52 100644 --- a/pybamm/models/submodels/electrode/base_electrode.py +++ b/pybamm/models/submodels/electrode/base_electrode.py @@ -53,7 +53,7 @@ def _get_standard_potential_variables(self, phi_s): phi_s_av_dim = param.U_p_ref - param.U_n_ref + pot * phi_s_av v = pybamm.boundary_value(phi_s, "right") - delta_phi_s = phi_s - v + delta_phi_s = v - phi_s delta_phi_s_av = pybamm.x_average(delta_phi_s) delta_phi_s_dim = delta_phi_s * pot delta_phi_s_av_dim = delta_phi_s_av * pot From a7043df01d52af869d84e9f483bf189e14e7c732 Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Sat, 27 Feb 2021 11:47:34 +0000 Subject: [PATCH 2/2] #1406 update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36c0eeb1bb..d43aabf7e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ ## Bug fixes +- Fixed a sign error in the positive electrode ohmic losses ([#1407](https://github.com/pybamm-team/PyBaMM/pull/1407)) - Simulations now stop when an experiment becomes infeasible ([#1395](https://github.com/pybamm-team/PyBaMM/pull/1395)) - Added a check for domains in `Concatenation` ([#1368](https://github.com/pybamm-team/PyBaMM/pull/1368)) - Differentiation now works even when the differentiation variable is a constant ([#1294](https://github.com/pybamm-team/PyBaMM/pull/1294))