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

Change fundamental SEI variable from thickness to concentration: attempt 2 #4869

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8462010
Finished changes to base lithium ion model and SEI submodel
DrSOKane Feb 18, 2025
a57f516
Removed total SEI as it is now the same as SEI
DrSOKane Feb 21, 2025
3a18d62
Merge branch 'develop' of https://github.com/pybamm-team/PyBaMM into …
DrSOKane Feb 21, 2025
be55ba0
Changed 'Initial SEI thickness [m]' to 'Initial SEI concentration [mo…
DrSOKane Feb 21, 2025
5d7a89c
minor correction to Ai2020.py
DrSOKane Feb 21, 2025
3dc8c53
Merge branch 'develop' of https://github.com/pybamm-team/PyBaMM into …
DrSOKane Feb 21, 2025
1acde17
style: pre-commit fixes
pre-commit-ci[bot] Feb 21, 2025
8aad2ef
style fix
DrSOKane Feb 21, 2025
fd229e0
Merge branch 'SEI-variable-change' of https://github.com/DrSOKane/PyB…
DrSOKane Feb 21, 2025
bbe7eaf
fixed typo in base_sei.py
DrSOKane Feb 21, 2025
031cba4
Removed references to the old 'total SEI' variables
DrSOKane Feb 21, 2025
fae6a70
style: pre-commit fixes
pre-commit-ci[bot] Feb 21, 2025
819a0c4
Replaced L_sei_0 in dead lithium decay rate functions with a scalar
DrSOKane Feb 21, 2025
b003988
Merge branch 'SEI-variable-change' of https://github.com/DrSOKane/PyB…
DrSOKane Feb 21, 2025
95b3b1a
style: pre-commit fixes
pre-commit-ci[bot] Feb 21, 2025
2b5fdf0
Removed reference to initial SEI thickness in reaction_driven_porosit…
DrSOKane Feb 21, 2025
d9455f3
Merge branch 'SEI-variable-change' of https://github.com/DrSOKane/PyB…
DrSOKane Feb 21, 2025
ed3feae
Fixed merge conflict in cycling_ageing.py
DrSOKane Feb 27, 2025
1fc07d3
Added value and citation for initial SEI concentration on Li metal
DrSOKane Feb 27, 2025
c0f8ba8
Removed a reference to total SEI that crept back in
DrSOKane Feb 27, 2025
c4858f7
Merge branch 'develop' of https://github.com/pybamm-team/PyBaMM into …
DrSOKane Feb 28, 2025
cf652a0
fixed some citations
DrSOKane Feb 28, 2025
c28351e
Changed solver in half cell notebook to IDAKLU
DrSOKane Feb 28, 2025
b5c63ad
Removed reference to Liu and Lu, because Safari et al. is sufficient
DrSOKane Feb 28, 2025
7962766
Merge branch 'develop' into SEI-variable-change
rtimms Mar 4, 2025
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

## Breaking changes

- Changed fundamental variable for all SEI models from thickness to concentration ([#4869](https://github.com/pybamm-team/PyBaMM/pull/4869))
- Replaced parameter `"Initial SEI thickness [m]"` with `"Initial SEI concentration [mol.m-3]"` ([#4869](https://github.com/pybamm-team/PyBaMM/pull/4869))
- Added `skip_ok` option to `step` to allow for steps to be skipped if they are infeasible at initial conditions. ([#4839](https://github.com/pybamm-team/PyBaMM/pull/4839))
- Deprecated `CrateTermination` and renamed it to `CRateTermination`. ([#4834](https://github.com/pybamm-team/PyBaMM/pull/4834))

Expand Down
4 changes: 2 additions & 2 deletions docs/source/examples/notebooks/models/SEI-on-cracks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"id": "c46a0904",
"metadata": {},
"source": [
"Define two models. In model1, the only degradation mechanism is solvent-diffusion limited SEI growth. model2 includes the same SEI growth mechanism but also includes particle cracking and SEI growth on the cracks. The SEI model is run twice: once on the initial surface and once on the cracks. The equations for SEI on cracks are reported by O'Kane et al. [9] To ensure a fair experiment, particle swelling is enabled in both models."
"Define two models. In model1, the only degradation mechanism is solvent-diffusion limited SEI growth. model2 includes the same SEI growth mechanism but also includes particle cracking and SEI growth on the cracks. The SEI model is run twice: once on the initial surface and once on the cracks. The equations for SEI on cracks are reported by O'Kane et al. [10] To ensure a fair experiment, particle swelling is enabled in both models."
]
},
{
Expand Down Expand Up @@ -255,7 +255,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.10.12"
},
"vscode": {
"interpreter": {
Expand Down
68 changes: 32 additions & 36 deletions docs/source/examples/notebooks/models/half-cell.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -280,8 +280,8 @@
" \"Current [A]\",\n",
" \"Sum of x-averaged negative electrode volumetric interfacial current densities [A.m-3]\",\n",
" \"X-averaged negative electrode active material volume fraction\",\n",
" \"Negative total SEI thickness [m]\",\n",
" \"X-averaged negative total SEI thickness [m]\",\n",
" \"Negative SEI thickness [m]\",\n",
" \"X-averaged negative SEI thickness [m]\",\n",
" ]\n",
")"
]
Expand Down Expand Up @@ -564,7 +564,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -655,8 +655,8 @@
" \"Sum of x-averaged negative electrode volumetric interfacial current densities [A.m-3]\",\n",
" \"X-averaged negative electrode primary active material volume fraction\",\n",
" \"X-averaged negative electrode secondary active material volume fraction\",\n",
" \"Negative total primary SEI thickness [m]\",\n",
" \"Negative total secondary SEI thickness [m]\",\n",
" \"Negative primary SEI thickness [m]\",\n",
" \"Negative secondary SEI thickness [m]\",\n",
" ]\n",
")"
]
Expand Down
4 changes: 2 additions & 2 deletions examples/scripts/calendar_ageing.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
"Negative particle surface concentration",
"X-averaged negative particle surface concentration",
"Electrolyte concentration [mol.m-3]",
"Negative total SEI thickness [m]",
"X-averaged negative total SEI thickness [m]",
"Negative SEI concentration [mol.m-3]",
"X-averaged negative SEI concentration [mol.m-3]",
"X-averaged negative SEI thickness [m]",
"Sum of x-averaged negative electrode volumetric "
"interfacial current densities [A.m-3]",
"Loss of lithium inventory [%]",
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 @@ -70,7 +70,7 @@
"X-averaged negative electrode SEI interfacial current density [A.m-2]",
"X-averaged negative electrode lithium plating interfacial current density "
"[A.m-2]",
"X-averaged negative total SEI thickness [m]",
"X-averaged negative SEI concentration [mol.m-3]",
"X-averaged negative dead lithium concentration [mol.m-3]",
[
"Total lithium lost [mol]",
Expand Down
4 changes: 2 additions & 2 deletions src/pybamm/input/parameters/lithium_ion/Ai2020.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,8 @@ def get_parameter_values():
"SEI electron conductivity [S.m-1]": 8.95e-14,
"SEI lithium interstitial diffusivity [m2.s-1]": 1e-20,
"Lithium interstitial reference concentration [mol.m-3]": 15.0,
"Initial SEI thickness [m]": 5e-09,
"Initial SEI on cracks thickness [m]": 5e-13, # avoid division by zero
"Initial SEI concentration [mol.m-3]": 38.34,
"Initial SEI on cracks concentration [mol.m-3]": 0.002003, # from O'Kane 2022
"EC initial concentration in electrolyte [mol.m-3]": 4541.0,
"EC diffusivity [m2.s-1]": 2e-18,
"SEI kinetic rate constant [m.s-1]": 1e-12,
Expand Down
2 changes: 1 addition & 1 deletion src/pybamm/input/parameters/lithium_ion/Chen2020.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def get_parameter_values():
"SEI electron conductivity [S.m-1]": 8.95e-14,
"SEI lithium interstitial diffusivity [m2.s-1]": 1e-20,
"Lithium interstitial reference concentration [mol.m-3]": 15.0,
"Initial SEI thickness [m]": 5e-09,
"Initial SEI concentration [mol.m-3]": 38.34,
"EC initial concentration in electrolyte [mol.m-3]": 4541.0,
"EC diffusivity [m2.s-1]": 2e-18,
"SEI kinetic rate constant [m.s-1]": 1e-12,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def get_parameter_values():
"Primary: SEI electron conductivity [S.m-1]": 8.95e-14,
"Primary: SEI lithium interstitial diffusivity [m2.s-1]": 1e-20,
"Primary: Lithium interstitial reference concentration [mol.m-3]": 15.0,
"Primary: Initial SEI thickness [m]": 5e-09,
"Primary: Initial SEI concentration [mol.m-3]": 38.34,
"Primary: EC initial concentration in electrolyte [mol.m-3]": 4541.0,
"Primary: EC diffusivity [m2.s-1]": 2e-18,
"Primary: SEI kinetic rate constant [m.s-1]": 1e-12,
Expand All @@ -352,7 +352,7 @@ def get_parameter_values():
"Secondary: SEI electron conductivity [S.m-1]": 8.95e-14,
"Secondary: SEI lithium interstitial diffusivity [m2.s-1]": 1e-20,
"Secondary: Lithium interstitial reference concentration [mol.m-3]": 15.0,
"Secondary: Initial SEI thickness [m]": 5e-09,
"Secondary: Initial SEI concentration [mol.m-3]": 38.34,
"Secondary: EC initial concentration in electrolyte [mol.m-3]": 4541.0,
"Secondary: EC diffusivity [m2.s-1]": 2e-18,
"Secondary: SEI kinetic rate constant [m.s-1]": 1e-12,
Expand Down
6 changes: 3 additions & 3 deletions src/pybamm/input/parameters/lithium_ion/Ecker2015.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,15 +367,15 @@ def SEI_limited_dead_lithium_OKane2022(L_sei):
Parameters
----------
L_sei : :class:`pybamm.Symbol`
Total SEI thickness [m]
SEI thickness [m]
Returns
-------
:class:`pybamm.Symbol`
Dead lithium decay rate [s-1]
"""

gamma_0 = pybamm.Parameter("Dead lithium decay constant [s-1]")
L_sei_0 = pybamm.Parameter("Initial SEI thickness [m]")
L_sei_0 = pybamm.Scalar(5e-9)

gamma = gamma_0 * L_sei_0 / L_sei

Expand Down Expand Up @@ -521,7 +521,7 @@ def get_parameter_values():
"SEI electron conductivity [S.m-1]": 8.95e-14,
"SEI lithium interstitial diffusivity [m2.s-1]": 1e-20,
"Lithium interstitial reference concentration [mol.m-3]": 15.0,
"Initial SEI thickness [m]": 5e-09,
"Initial SEI concentration [mol.m-3]": 38.34,
"EC initial concentration in electrolyte [mol.m-3]": 4541.0,
"EC diffusivity [m2.s-1]": 2e-18,
"SEI kinetic rate constant [m.s-1]": 1e-12,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,15 @@ def SEI_limited_dead_lithium_OKane2022(L_sei):
Parameters
----------
L_sei : :class:`pybamm.Symbol`
Total SEI thickness [m]
SEI thickness [m]
Returns
-------
:class:`pybamm.Symbol`
Dead lithium decay rate [s-1]
"""

gamma_0 = pybamm.Parameter("Dead lithium decay constant [s-1]")
L_sei_0 = pybamm.Parameter("Initial SEI thickness [m]")
L_sei_0 = pybamm.Scalar(5e-9)

gamma = gamma_0 * L_sei_0 / L_sei

Expand Down Expand Up @@ -443,7 +443,8 @@ def get_parameter_values():
"SEI electron conductivity [S.m-1]": 8.95e-14,
"SEI lithium interstitial diffusivity [m2.s-1]": 1e-20,
"Lithium interstitial reference concentration [mol.m-3]": 15.0,
"Initial SEI thickness [m]": 5e-09,
"Initial SEI concentration [mol.m-3]": 38.34,
"Initial SEI concentration on Li metal [mol.m-2]": 5.216e-05,
"EC initial concentration in electrolyte [mol.m-3]": 4541.0,
"EC diffusivity [m2.s-1]": 2e-18,
"SEI kinetic rate constant [m.s-1]": 1e-12,
Expand Down
2 changes: 1 addition & 1 deletion src/pybamm/input/parameters/lithium_ion/Marquis2019.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def get_parameter_values():
"SEI electron conductivity [S.m-1]": 8.95e-14,
"SEI lithium interstitial diffusivity [m2.s-1]": 1e-20,
"Lithium interstitial reference concentration [mol.m-3]": 15.0,
"Initial SEI thickness [m]": 5e-09,
"Initial SEI concentration [mol.m-3]": 38.34,
"EC initial concentration in electrolyte [mol.m-3]": 4541.0,
"EC diffusivity [m2.s-1]": 2e-18,
"SEI kinetic rate constant [m.s-1]": 1e-12,
Expand Down
2 changes: 1 addition & 1 deletion src/pybamm/input/parameters/lithium_ion/Mohtat2020.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def get_parameter_values():
"SEI electron conductivity [S.m-1]": 8.95e-14,
"SEI lithium interstitial diffusivity [m2.s-1]": 1e-20,
"Lithium interstitial reference concentration [mol.m-3]": 15.0,
"Initial SEI thickness [m]": 5e-09,
"Initial SEI concentration [mol.m-3]": 38.34,
"EC initial concentration in electrolyte [mol.m-3]": 4541.0,
"EC diffusivity [m2.s-1]": 2e-18,
"SEI kinetic rate constant [m.s-1]": 1e-12,
Expand Down
2 changes: 1 addition & 1 deletion src/pybamm/input/parameters/lithium_ion/NCA_Kim2011.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def get_parameter_values():
"SEI electron conductivity [S.m-1]": 8.95e-14,
"SEI lithium interstitial diffusivity [m2.s-1]": 1e-20,
"Lithium interstitial reference concentration [mol.m-3]": 15.0,
"Initial SEI thickness [m]": 5e-09,
"Initial SEI concentration [mol.m-3]": 38.34,
"EC initial concentration in electrolyte [mol.m-3]": 4541.0,
"EC diffusivity [m2.s-1]": 2e-18,
"SEI kinetic rate constant [m.s-1]": 1e-12,
Expand Down
10 changes: 5 additions & 5 deletions src/pybamm/input/parameters/lithium_ion/OKane2022.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ def SEI_limited_dead_lithium_OKane2022(L_sei):
Parameters
----------
L_sei : :class:`pybamm.Symbol`
Total SEI thickness [m]
SEI thickness [m]
Returns
-------
:class:`pybamm.Symbol`
Dead lithium decay rate [s-1]
"""

gamma_0 = pybamm.Parameter("Dead lithium decay constant [s-1]")
L_sei_0 = pybamm.Parameter("Initial SEI thickness [m]")
L_sei_0 = pybamm.Scalar(5e-9)

gamma = gamma_0 * L_sei_0 / L_sei

Expand Down Expand Up @@ -520,7 +520,7 @@ def get_parameter_values():
"Dead lithium decay constant [s-1]": 1e-06,
"Dead lithium decay rate [s-1]": SEI_limited_dead_lithium_OKane2022,
# sei
"Ratio of lithium moles to SEI moles": 1.0,
"Ratio of lithium moles to SEI moles": 1.0, # not physical but true to paper
"SEI partial molar volume [m3.mol-1]": 9.585e-05,
"SEI reaction exchange current density [A.m-2]": 1.5e-07,
"SEI resistivity [Ohm.m]": 200000.0,
Expand All @@ -530,8 +530,8 @@ def get_parameter_values():
"SEI electron conductivity [S.m-1]": 8.95e-14,
"SEI lithium interstitial diffusivity [m2.s-1]": 1e-20,
"Lithium interstitial reference concentration [mol.m-3]": 15.0,
"Initial SEI thickness [m]": 5e-09,
"Initial SEI on cracks thickness [m]": 5e-13, # avoid division by zero
"Initial SEI concentration [mol.m-3]": 20.03,
"Initial SEI on cracks concentration [mol.m-3]": 0.002003,
"EC initial concentration in electrolyte [mol.m-3]": 4541.0,
"EC diffusivity [m2.s-1]": 2e-18,
"SEI kinetic rate constant [m.s-1]": 1e-12,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ def SEI_limited_dead_lithium_OKane2022(L_sei):
Parameters
----------
L_sei : :class:`pybamm.Symbol`
Total SEI thickness [m]
SEI thickness [m]
Returns
-------
:class:`pybamm.Symbol`
Dead lithium decay rate [s-1]
"""

gamma_0 = pybamm.Parameter("Dead lithium decay constant [s-1]")
L_sei_0 = pybamm.Parameter("Initial SEI thickness [m]")
L_sei_0 = pybamm.Scalar(5e-9)

gamma = gamma_0 * L_sei_0 / L_sei

Expand Down Expand Up @@ -405,7 +405,7 @@ def get_parameter_values():
"Dead lithium decay constant [s-1]": 1e-06,
"Dead lithium decay rate [s-1]": SEI_limited_dead_lithium_OKane2022,
# sei
"Ratio of lithium moles to SEI moles": 1.0,
"Ratio of lithium moles to SEI moles": 1.0, # not physical but true to paper
"SEI partial molar volume [m3.mol-1]": 9.585e-05,
"SEI reaction exchange current density [A.m-2]": 1.5e-07,
"SEI resistivity [Ohm.m]": 200000.0,
Expand All @@ -415,8 +415,9 @@ def get_parameter_values():
"SEI electron conductivity [S.m-1]": 8.95e-14,
"SEI lithium interstitial diffusivity [m2.s-1]": 1e-20,
"Lithium interstitial reference concentration [mol.m-3]": 15.0,
"Initial SEI thickness [m]": 5e-9,
"Initial SEI on cracks thickness [m]": 5e-13, # avoid division by zero
"Initial SEI concentration [mol.m-3]": 20.03,
"Initial SEI concentration on Li metal [mol.m-2]": 5.216e-05,
"Initial SEI on cracks concentration [mol.m-3]": 0.002003,
"EC initial concentration in electrolyte [mol.m-3]": 4541.0,
"EC diffusivity [m2.s-1]": 2e-18,
"SEI kinetic rate constant [m.s-1]": 1e-12,
Expand Down
2 changes: 1 addition & 1 deletion src/pybamm/input/parameters/lithium_ion/Ramadass2004.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def get_parameter_values():
"SEI electron conductivity [S.m-1]": 8.95e-14,
"SEI lithium interstitial diffusivity [m2.s-1]": 1e-20,
"Lithium interstitial reference concentration [mol.m-3]": 15.0,
"Initial SEI thickness [m]": 5e-09,
"Initial SEI concentration [mol.m-3]": 38.34,
"EC initial concentration in electrolyte [mol.m-3]": 4541.0,
"EC diffusivity [m2.s-1]": 2e-18,
"SEI kinetic rate constant [m.s-1]": 1e-12,
Expand Down
3 changes: 2 additions & 1 deletion src/pybamm/input/parameters/lithium_ion/Xu2019.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ def get_parameter_values():
"SEI electron conductivity [S.m-1]": 8.95e-14,
"SEI lithium interstitial diffusivity [m2.s-1]": 1e-20,
"Lithium interstitial reference concentration [mol.m-3]": 15.0,
"Initial SEI thickness [m]": 5e-09,
"Initial SEI concentration [mol.m-3]": 38.34,
"Initial SEI concentration on Li metal [mol.m-2]": 5.216e-05,
"EC initial concentration in electrolyte [mol.m-3]": 4541.0,
"EC diffusivity [m2.s-1]": 2e-18,
"SEI kinetic rate constant [m.s-1]": 1e-12,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,6 @@ def set_open_circuit_potential_submodel(self):

def set_sei_submodel(self):
for domain in ["negative", "positive"]:
if self.options.electrode_types[domain] == "planar":
reaction_loc = "interface"
elif self.options["x-average side reactions"] == "true":
reaction_loc = "x-average"
else:
reaction_loc = "full electrode"
phases = self.options.phases[domain]
for phase in phases:
sei_option = getattr(getattr(self.options, domain), phase)["SEI"]
Expand All @@ -303,12 +297,16 @@ def set_sei_submodel(self):
submodel = pybamm.sei.SEIGrowth(
self.param,
domain,
reaction_loc,
self.options,
phase,
cracks=False,
)
self.submodels[f"{domain} {phase} sei"] = submodel
self.submodels[f"{domain} {phase} sei thickness"] = (
pybamm.sei.SEIThickness(
self.param, domain, self.options, phase, cracks=False
)
)
if len(phases) > 1:
self.submodels[f"{domain} total sei"] = pybamm.sei.TotalSEI(
self.param, domain, self.options
Expand All @@ -332,19 +330,23 @@ def set_sei_on_cracks_submodel(self):
self.param, domain, self.options, phase, cracks=True
)
else:
if self.options["x-average side reactions"] == "true":
reaction_loc = "x-average"
else:
reaction_loc = "full electrode"
submodel = pybamm.sei.SEIGrowth(
self.param,
domain,
reaction_loc,
self.options,
phase,
cracks=True,
)
self.submodels[f"{domain} {phase} sei on cracks"] = submodel
self.submodels[f"{domain} {phase} sei on cracks thickness"] = (
pybamm.sei.SEIThickness(
self.param,
domain,
self.options,
phase,
cracks=True,
)
)
if len(phases) > 1:
self.submodels[f"{domain} total sei on cracks"] = (
pybamm.sei.TotalSEI(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,15 @@ def get_coupled_variables(self, variables):
# Add SEI resistance
if self.options.electrode_types[domain] == "planar":
R_sei = self.phase_param.R_sei
L_sei = variables[
f"{Domain} total {phase_name}SEI thickness [m]"
] # on interface
L_sei = variables[f"{Domain} {phase_name}SEI thickness [m]"] # on interface
eta_sei = -j_tot_av * L_sei * R_sei
elif self.options["SEI film resistance"] == "average":
R_sei = self.phase_param.R_sei
L_sei_av = variables[
f"X-averaged {domain} total {phase_name}SEI thickness [m]"
]
L_sei_av = variables[f"X-averaged {domain} {phase_name}SEI thickness [m]"]
eta_sei = -j_tot_av * L_sei_av * R_sei
elif self.options["SEI film resistance"] == "distributed":
R_sei = self.phase_param.R_sei
L_sei = variables[f"{Domain} total {phase_name}SEI thickness [m]"]
L_sei = variables[f"{Domain} {phase_name}SEI thickness [m]"]
j_tot = variables[
f"Total {domain} electrode {phase_name}"
"interfacial current density variable [A.m-2]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ def get_coupled_variables(self, variables):
if self.options["SEI film resistance"] != "none":
R_sei = self.phase_param.R_sei
if self.options.electrode_types[domain] == "planar":
L_sei = variables[f"{Domain} total SEI thickness [m]"]
L_sei = variables[f"{Domain} SEI thickness [m]"]
else:
L_sei = variables[f"X-averaged {domain} total SEI thickness [m]"]
L_sei = variables[f"X-averaged {domain} SEI thickness [m]"]
eta_sei = -j_tot * L_sei * R_sei
# Without SEI resistance
else:
Expand Down
Loading