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

Asymmetric SEI reaction #2425

Merged
merged 11 commits into from
Nov 4, 2022
12 changes: 8 additions & 4 deletions benchmarks/different_model_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,13 @@ class TimeBuildModelSEI:
[
"none",
"constant",
"reaction limited",
"reaction limited (symmetric)",
"reaction limited (asymmetric)",
"solvent-diffusion limited",
"electron-migration limited",
"interstitial-diffusion limited",
"ec reaction limited",
"ec reaction limited (symmetric)",
"ec reaction limited (asymmetric)",
],
)

Expand All @@ -142,11 +144,13 @@ class TimeSolveSEI:
[
"none",
"constant",
"reaction limited",
"reaction limited (symmetric)",
"reaction limited (asymmetric)",
"solvent-diffusion limited",
"electron-migration limited",
"interstitial-diffusion limited",
"ec reaction limited",
"ec reaction limited (symmetric)",
"ec reaction limited (asymmetric)",
],
)

Expand Down
12 changes: 7 additions & 5 deletions examples/scripts/calendar_ageing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
pb.set_logging_level("INFO")

models = [
pb.lithium_ion.SPM({"SEI": "reaction limited"}),
pb.lithium_ion.SPMe({"SEI": "reaction limited"}),
pb.lithium_ion.SPM({"SEI": "reaction limited (symmetric)"}),
pb.lithium_ion.SPMe({"SEI": "reaction limited (symmetric)"}),
pb.lithium_ion.SPM(
{"SEI": "reaction limited", "surface form": "algebraic"}, name="Algebraic SPM"
{"SEI": "reaction limited (symmetric)", "surface form": "algebraic"},
name="Algebraic SPM",
),
pb.lithium_ion.SPMe(
{"SEI": "reaction limited", "surface form": "algebraic"}, name="Algebraic SPMe"
{"SEI": "reaction limited (symmetric)", "surface form": "algebraic"},
name="Algebraic SPMe",
),
pb.lithium_ion.DFN({"SEI": "reaction limited"}),
pb.lithium_ion.DFN({"SEI": "reaction limited (symmetric)"}),
]

sims = []
Expand Down
2 changes: 1 addition & 1 deletion examples/scripts/cycling_ageing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pb.set_logging_level("NOTICE")
model = pb.lithium_ion.DFN(
{
"SEI": "ec reaction limited",
"SEI": "ec reaction limited (symmetric)",
"SEI film resistance": "distributed",
"SEI porosity change": "true",
"lithium plating": "irreversible",
Expand Down
14 changes: 9 additions & 5 deletions pybamm/models/full_battery_models/base_battery_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ class BatteryModelOptions(pybamm.FuzzyDict):

- "none": :class:`pybamm.sei.NoSEI` (no SEI growth)
- "constant": :class:`pybamm.sei.Constant` (constant SEI thickness)
- "reaction limited", "solvent-diffusion limited",\
"electron-migration limited", "interstitial-diffusion limited", \
or "ec reaction limited": :class:`pybamm.sei.SEIGrowth`
- "reaction limited (symmetric)", "reaction limited (asymmetric)", \
"solvent-diffusion limited", "electron-migration limited", \
"interstitial-diffusion limited", \
"ec reaction limited (symmetric)" \
or "ec reaction limited (asymmetric)": :class:`pybamm.sei.SEIGrowth`
* "SEI film resistance" : str
Set the submodel for additional term in the overpotential due to SEI.
The default value is "none" if the "SEI" option is "none", and
Expand Down Expand Up @@ -254,11 +256,13 @@ def __init__(self, extra_options):
"SEI": [
"none",
"constant",
"reaction limited",
"reaction limited (symmetric)",
"reaction limited (asymmetric)",
"solvent-diffusion limited",
"electron-migration limited",
"interstitial-diffusion limited",
"ec reaction limited",
"ec reaction limited (symmetric)",
"ec reaction limited (asymmetric)",
],
"SEI film resistance": ["none", "distributed", "average"],
"SEI on cracks": ["false", "true"],
Expand Down
2 changes: 1 addition & 1 deletion pybamm/models/full_battery_models/lithium_ion/Yang2017.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class Yang2017(DFN):
def __init__(self, options=None, name="Yang2017", build=True):
options = {
"SEI": "ec reaction limited",
"SEI": "ec reaction limited (symmetric)",
"SEI film resistance": "distributed",
"SEI porosity change": "true",
"lithium plating": "irreversible",
Expand Down
5 changes: 3 additions & 2 deletions pybamm/models/submodels/interface/sei/base_sei.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ def _get_standard_concentration_variables(self, variables):
)
v_bar = phase_param.v_bar
z_sei = phase_param.z_sei
# Set scales for the "EC Reaction Limited" model
if self.options["SEI"] == "ec reaction limited":
# Set scales for the "EC Reaction Limited" models (both symmetric and
# asymmetric)
if self.options["SEI"].startswith("ec reaction limited"):
L_inner_0 = 0
L_outer_0 = 1
L_inner_crack_0 = 0
Expand Down
23 changes: 15 additions & 8 deletions pybamm/models/submodels/interface/sei/sei_growth.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_fundamental_variables(self):

L_inner, L_outer = Ls

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

variables = self._get_standard_thickness_variables(L_inner, L_outer)
Expand Down Expand Up @@ -100,9 +100,16 @@ def get_coupled_variables(self, variables):
# Thermal prefactor for reaction, interstitial and EC models
prefactor = 1 / (1 + self.param.Theta * T)

if self.options["SEI"] == "reaction limited":
# Define alpha_SEI depending on whether it is symmetric or asymmetric. This
# applies to "reaction limited" and "EC reaction limited"
if self.options["SEI"].endswith("(asymmetric)"):
alpha_SEI = phase_param.alpha_SEI
else:
alpha_SEI = 0.5

if self.options["SEI"].startswith("reaction limited"):
C_sei = phase_param.C_sei_reaction
j_sei = -(1 / C_sei) * pybamm.exp(-0.5 * prefactor * eta_SEI)
j_sei = -(1 / C_sei) * pybamm.exp(-alpha_SEI * prefactor * eta_SEI)

elif self.options["SEI"] == "electron-migration limited":
U_inner = phase_param.U_inner_electron
Expand All @@ -117,7 +124,7 @@ def get_coupled_variables(self, variables):
C_sei = phase_param.C_sei_solvent
j_sei = -1 / (C_sei * L_sei_outer)

elif self.options["SEI"] == "ec reaction limited":
elif self.options["SEI"].startswith("ec reaction limited"):
C_sei_ec = phase_param.C_sei_ec
C_ec = phase_param.C_ec

Expand All @@ -129,7 +136,7 @@ def get_coupled_variables(self, variables):
# so
# j_sei = -C_sei_ec * exp() / (1 + L_sei * C_ec * C_sei_ec * exp())
# c_ec = 1 / (1 + L_sei * C_ec * C_sei_ec * exp())
C_sei_exp = C_sei_ec * pybamm.exp(-0.5 * prefactor * eta_SEI)
C_sei_exp = C_sei_ec * pybamm.exp(-alpha_SEI * prefactor * eta_SEI)
j_sei = -C_sei_exp / (1 + L_sei * C_ec * C_sei_exp)
c_ec = 1 / (1 + L_sei * C_ec * C_sei_exp)

Expand All @@ -150,7 +157,7 @@ def get_coupled_variables(self, variables):
}
)

if self.options["SEI"] == "ec reaction limited":
if self.options["SEI"].startswith("ec reaction limited"):
inner_sei_proportion = 0
else:
inner_sei_proportion = phase_param.inner_sei_proportion
Expand Down Expand Up @@ -224,7 +231,7 @@ def set_rhs(self, variables):

Gamma_SEI = self.phase_param.Gamma_SEI

if self.options["SEI"] == "ec reaction limited":
if self.options["SEI"].startswith("ec reaction limited"):
self.rhs = {L_outer: -Gamma_SEI * a * j_outer + spreading_outer}
else:
v_bar = self.phase_param.v_bar
Expand All @@ -247,7 +254,7 @@ 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
if self.options["SEI"] == "ec reaction limited":
if self.options["SEI"].startswith("ec reaction limited"):
self.initial_conditions = {L_outer: L_inner_0 + L_outer_0}
else:
self.initial_conditions = {L_inner: L_inner_0, L_outer: L_outer_0}
1 change: 1 addition & 0 deletions pybamm/parameters/lithium_ion_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ def _set_dimensional_parameters(self):
self.E_sei_dimensional = pybamm.Parameter(
f"{pref}SEI growth activation energy [J.mol-1]"
)
self.alpha_SEI = pybamm.Parameter(f"{pref}SEI growth transfer coefficient")

# EC reaction
self.c_ec_0_dim = pybamm.Parameter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ def test_sei_constant(self):
self.run_basic_processing_test(options)

def test_sei_reaction_limited(self):
options = {"SEI": "reaction limited"}
options = {"SEI": "reaction limited (symmetric)"}
self.run_basic_processing_test(options)

def test_sei_asymmetric_reaction_limited(self):
options = {"SEI": "reaction limited (asymmetric)"}
self.run_basic_processing_test(options)

def test_sei_solvent_diffusion_limited(self):
Expand All @@ -66,7 +70,11 @@ def test_sei_interstitial_diffusion_limited(self):
self.run_basic_processing_test(options)

def test_sei_ec_reaction_limited(self):
options = {"SEI": "ec reaction limited"}
options = {"SEI": "ec reaction limited (symmetric)"}
self.run_basic_processing_test(options)

def test_sei_asymmetric_ec_reaction_limited(self):
options = {"SEI": "ec reaction limited (asymmetric)"}
self.run_basic_processing_test(options)

def test_constant_utilisation(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ def test_irreversible_plating_with_porosity(self):
self.run_basic_processing_test(options, parameter_values=param)

def test_sei_reaction_limited(self):
options = {"SEI": "reaction limited"}
options = {"SEI": "reaction limited (symmetric)"}
self.run_basic_processing_test(options)

def test_sei_asymmetric_reaction_limited(self):
options = {"SEI": "reaction limited (asymmetric)"}
self.run_basic_processing_test(options)

def test_sei_solvent_diffusion_limited(self):
Expand All @@ -182,7 +186,17 @@ def test_sei_interstitial_diffusion_limited(self):
self.run_basic_processing_test(options)

def test_sei_ec_reaction_limited(self):
options = {"SEI": "ec reaction limited", "SEI porosity change": "true"}
options = {
"SEI": "ec reaction limited (symmetric)",
"SEI porosity change": "true",
}
self.run_basic_processing_test(options)

def test_sei_asymmetric_ec_reaction_limited(self):
options = {
"SEI": "ec reaction limited (asymmetric)",
"SEI porosity change": "true",
}
self.run_basic_processing_test(options)

def test_loss_active_material_stress_negative(self):
Expand Down Expand Up @@ -246,7 +260,7 @@ def test_composite_graphite_silicon_sei(self):
options = {
"particle phases": ("2", "1"),
"open circuit potential": (("single", "current sigmoid"), "single"),
"SEI": "ec reaction limited",
"SEI": "ec reaction limited (symmetric)",
}
parameter_values = pybamm.ParameterValues("Chen2020_composite")
name = "Negative electrode active material volume fraction"
Expand Down
8 changes: 6 additions & 2 deletions tests/unit/test_citations.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,15 @@ def test_brosaplanella_2022(self):
pybamm.lithium_ion.SPMe(build=False, options={"SEI": "constant"})
self.assertNotIn("BrosaPlanella2022", citations._papers_to_cite)

pybamm.lithium_ion.SPM(build=False, options={"SEI": "ec reaction limited"})
pybamm.lithium_ion.SPM(
build=False, options={"SEI": "ec reaction limited (symmetric)"}
)
self.assertIn("BrosaPlanella2022", citations._papers_to_cite)
citations._reset()

pybamm.lithium_ion.SPMe(build=False, options={"SEI": "ec reaction limited"})
pybamm.lithium_ion.SPMe(
build=False, options={"SEI": "ec reaction limited (symmetric)"}
)
self.assertIn("BrosaPlanella2022", citations._papers_to_cite)
citations._reset()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def test_run_experiment_termination_capacity(self):
* 10,
termination="99% capacity",
)
model = pybamm.lithium_ion.SPM({"SEI": "ec reaction limited"})
model = pybamm.lithium_ion.SPM({"SEI": "ec reaction limited (symmetric)"})
param = pybamm.ParameterValues("Chen2020")
param["SEI kinetic rate constant [m.s-1]"] = 1e-14
sim = pybamm.Simulation(model, experiment=experiment, parameter_values=param)
Expand All @@ -281,7 +281,7 @@ def test_run_experiment_termination_capacity(self):
* 10,
termination="5.04Ah capacity",
)
model = pybamm.lithium_ion.SPM({"SEI": "ec reaction limited"})
model = pybamm.lithium_ion.SPM({"SEI": "ec reaction limited (symmetric)"})
param = pybamm.ParameterValues("Chen2020")
param["SEI kinetic rate constant [m.s-1]"] = 1e-14
sim = pybamm.Simulation(model, experiment=experiment, parameter_values=param)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
'particle phases': '1' (possible: ['1', '2'])
'particle shape': 'spherical' (possible: ['spherical', 'no particles'])
'particle size': 'single' (possible: ['single', 'distribution'])
'SEI': 'none' (possible: ['none', 'constant', 'reaction limited', 'solvent-diffusion limited', 'electron-migration limited', 'interstitial-diffusion limited', 'ec reaction limited'])
'SEI': 'none' (possible: ['none', 'constant', 'reaction limited (symmetric)', 'reaction limited (asymmetric)', 'solvent-diffusion limited', 'electron-migration limited', 'interstitial-diffusion limited', 'ec reaction limited (symmetric)', 'ec reaction limited (asymmetric)'])
'SEI film resistance': 'none' (possible: ['none', 'distributed', 'average'])
'SEI on cracks': 'false' (possible: ['false', 'true'])
'SEI porosity change': 'false' (possible: ['false', 'true'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ def test_well_posed_constant_sei(self):
self.check_well_posedness(options)

def test_well_posed_reaction_limited_sei(self):
options = {"SEI": "reaction limited"}
options = {"SEI": "reaction limited (symmetric)"}
self.check_well_posedness(options)

def test_well_posed_asymmetric_reaction_limited_sei(self):
options = {"SEI": "reaction limited (asymmetric)"}
self.check_well_posedness(options)

def test_well_posed_solvent_diffusion_limited_sei(self):
Expand All @@ -68,7 +72,11 @@ def test_well_posed_interstitial_diffusion_limited_sei(self):
self.check_well_posedness(options)

def test_well_posed_ec_reaction_limited_sei(self):
options = {"SEI": "ec reaction limited"}
options = {"SEI": "ec reaction limited (symmetric)"}
self.check_well_posedness(options)

def test_well_posed_asymmetric_ec_reaction_limited_sei(self):
options = {"SEI": "ec reaction limited (asymmetric)"}
self.check_well_posedness(options)

def test_well_posed_lumped_thermal(self):
Expand Down
Loading