Skip to content

Commit

Permalink
Merge pull request pybamm-team#3211 from pybamm-team/issue-3128-spme-psd
Browse files Browse the repository at this point in the history
pybamm-team#3128 fix half cell models
  • Loading branch information
valentinsulzer authored Jul 31, 2023
2 parents de64f2e + 91b97a2 commit e05aa6b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pybamm/models/submodels/interface/kinetics/base_kinetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,14 @@ def get_coupled_variables(self, variables):
ocp = variables[
f"{Domain} electrode {reaction_name}open-circuit potential [V]"
]
# If ocp was broadcast, and delta_phi's secondary domain is "current collector",
# then take only the orphan.
if isinstance(ocp, pybamm.Broadcast) and delta_phi.domains["secondary"] == [
"current collector"
]:
ocp = ocp.orphans[0]
# If ocp was broadcast, and the reaction is lithium metal plating OR
# delta_phi's secondary domain is "current collector", then take only the
# orphan.
if isinstance(ocp, pybamm.Broadcast):
if self.reaction == "lithium metal plating":
ocp = ocp.orphans[0]
elif delta_phi.domains["secondary"] == ["current collector"]:
ocp = ocp.orphans[0]

# Get reaction overpotential
eta_r = delta_phi - ocp
Expand Down

0 comments on commit e05aa6b

Please sign in to comment.