Skip to content

Commit

Permalink
fix bug in composite surface form model (pybamm-team#4293)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtimms authored Jul 25, 2024
1 parent 1d40956 commit 91c9744
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ def __init__(self, param, domain, options=None):
def set_rhs(self, variables):
domain = self.domain

a = variables[
f"X-averaged {domain} electrode surface area to volume ratio [m-1]"
]

sum_a_j = variables[
f"Sum of x-averaged {domain} electrode volumetric "
"interfacial current densities [A.m-3]"
Expand All @@ -116,7 +120,7 @@ def set_rhs(self, variables):

C_dl = self.domain_param.C_dl(T)

self.rhs[delta_phi] = 1 / C_dl * (sum_a_j_av - sum_a_j)
self.rhs[delta_phi] = 1 / (a * C_dl) * (sum_a_j_av - sum_a_j)


class CompositeAlgebraic(BaseModel):
Expand Down

0 comments on commit 91c9744

Please sign in to comment.