Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Caitlin Parke authored and Caitlin Parke committed Jun 3, 2024
1 parent 640666a commit b4d489b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pybamm/models/submodels/interface/sei/sei_growth.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def get_fundamental_variables(self):

L_inner, L_outer = Ls

SEI_option = getattr(self.options, domain)["SEI"]
domain_options = getattr(self.options, domain)
SEI_option = getattr(domain_options, self.phase)["SEI"]
if SEI_option.startswith("ec reaction limited"):
L_inner = 0 * L_inner # Set L_inner to zero, copying domains

Expand All @@ -83,7 +84,8 @@ def get_coupled_variables(self, variables):
param = self.param
phase_param = self.phase_param
domain, Domain = self.domain_Domain
SEI_option = getattr(self.options, domain)["SEI"]
domain_options = getattr(self.options, domain)
SEI_option = getattr(domain_options, self.phase)["SEI"]
T = variables[f"{Domain} electrode temperature [K]"]
# delta_phi = phi_s - phi_e
if self.reaction_loc == "interface":
Expand Down Expand Up @@ -256,7 +258,8 @@ def set_rhs(self, variables):
)

# we have to add the spreading rate to account for cracking
SEI_option = getattr(self.options, domain)["SEI"]
domain_options = getattr(self.options, domain)
SEI_option = getattr(domain_options, self.phase)["SEI"]
if SEI_option.startswith("ec reaction limited"):
self.rhs = {L_outer: -dLdt_SEI_outer + spreading_outer}
else:
Expand Down Expand Up @@ -284,7 +287,8 @@ def set_initial_conditions(self, variables):
else:
L_inner_0 = self.phase_param.L_inner_0
L_outer_0 = self.phase_param.L_outer_0
SEI_option = getattr(self.options, domain)["SEI"]
domain_options = getattr(self.options, domain)
SEI_option = getattr(domain_options, self.phase)["SEI"]
if SEI_option.startswith("ec reaction limited"):
self.initial_conditions = {L_outer: L_inner_0 + L_outer_0}
else:
Expand Down

0 comments on commit b4d489b

Please sign in to comment.