Skip to content

Commit

Permalink
Update base_sei.py
Browse files Browse the repository at this point in the history
  • Loading branch information
GBlanka committed Oct 20, 2023
1 parent e440ae3 commit 93d01f6
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions pybamm/models/submodels/interface/sei/base_sei.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ def __init__(self, param, domain, options, phase="primary", cracks=False):
num_sei_layers = self.options.get("number of SEI layers")

# Flag to indicate single layer SEI
if num_sei_layers == "1":
self.single_layer_sei = True
else:
self.single_layer_sei = False
self.single_layer_sei = num_sei_layers == "1"

def get_coupled_variables(self, variables):
# Update some common variables
Expand Down Expand Up @@ -97,16 +94,12 @@ def _get_standard_thickness_variables(self, L_inner, L_outer):
}
)
# Get variables related to the total thickness
if self.single_layer_sei:
# In case of single layer SEI
# Inner layer is usually set to zero
L_sei = L_outer
variables.update(self._get_standard_total_thickness_variables(L_sei))

else:
# In case of two SEI layers
# In case of single layer SEI
# Inner layer is usually set to zero
L_sei = L_outer
if not self.single_layer_sei:
L_sei = L_inner + L_outer
variables.update(self._get_standard_total_thickness_variables(L_sei))
variables.update(self._get_standard_total_thickness_variables(L_sei))

return variables

Expand Down Expand Up @@ -186,7 +179,6 @@ def _get_standard_concentration_variables(self, variables):
# Case for single layer SEI:
if self.single_layer_sei:
L_sei = variables[f"{Domain} outer {reaction_name}thickness [m]"]

n_SEI = L_sei * L_to_n_outer # single layer SEI concentration

# Case for two layer SEI
Expand Down

0 comments on commit 93d01f6

Please sign in to comment.