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

fix bug in leading surface form conductivity #4139

Merged
merged 4 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,11 @@ def set_rhs(self, variables):
domain, Domain = self.domain_Domain

T = variables[f"{Domain} electrode temperature [K]"]

C_dl = self.domain_param.C_dl(T)

delta_phi = variables[f"{Domain} electrode surface potential difference [V]"]
i_e = variables[f"{Domain} electrolyte current density [A.m-2]"]

# Variable summing all of the interfacial current densities
sum_a_j = variables[
f"Sum of {domain} electrode volumetric "
"interfacial current densities [A.m-3]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,26 @@ def __init__(self, param, domain, options=None):

def set_rhs(self, variables):
domain = self.domain
T = variables[f"X-averaged {domain} electrode temperature [K]"]
C_dl = self.domain_param.C_dl(T)

delta_phi = variables[
f"X-averaged {domain} electrode surface potential difference [V]"
]

sum_a_j = variables[
f"Sum of x-averaged {domain} electrode volumetric "
"interfacial current densities [A.m-3]"
]

sum_a_j_av = variables[
f"X-averaged {domain} electrode total volumetric "
"interfacial current density [A.m-3]"
]
delta_phi = variables[
f"X-averaged {domain} electrode surface potential difference [V]"
a = variables[
f"X-averaged {domain} electrode surface area to volume ratio [m-1]"
]

T = variables[f"X-averaged {domain} electrode temperature [K]"]

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 LeadingOrderAlgebraic(BaseLeadingOrderSurfaceForm):
Expand Down
Loading