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

#2098 change averaging for SPMe+SR #2099

Merged
merged 16 commits into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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
18 changes: 15 additions & 3 deletions pybamm/CITATIONS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@
doi = {10.1016/j.electacta.2021.138524},
}

@article{BrosaPlanella2022,
author = {Brosa Planella, Ferran and Widanage, W. Dhammika},
title = {{Systematic derivation of a Single Particle Model with Electrolyte and Side Reactions (SPMe+SR) for degradation of lithium-ion batteries}},
journal = {Submitted for publication},
volume = {},
number = {},
pages = {},
year = {2022},
publisher = {},
doi = {},
}

@article{Chen2020,
author = {Chen, Chang-Hui and Brosa Planella, Ferran and O'Regan, Kieran and Gastol, Dominika and Widanage, W. Dhammika and Kendrick, Emma},
title = {{Development of Experimental Techniques for Parameterization of Multi-scale Lithium-ion Battery Models}},
Expand Down Expand Up @@ -299,13 +311,13 @@
@article{ORegan2021,
author = {O'Regan, Kieran and Brosa Planella, Ferran and Widanage, W. Dhammika and Kendrick, Emma},
title = {{Thermal-electrochemical parametrisation of a lithium-ion battery: mapping Li concentration and temperature dependencies}},
journal = {Journal of The Electrochemical Society},
journal = {Submitted for publication},
brosaplanella marked this conversation as resolved.
Show resolved Hide resolved
volume = {},
number = {},
pages = {},
year = {2021},
publisher = {The Electrochemical Society},
doi = {},
publisher = {},
doi = {10.26434/chemrxiv-2022-d2q4n},
}

@article{Prada2013,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ def set_summary_variables(self):
def set_sei_submodel(self):
if self.half_cell:
reaction_loc = "interface"
elif self.x_average:
reaction_loc = "x-average"
else:
reaction_loc = "full electrode"

Expand All @@ -213,7 +211,7 @@ def set_lithium_plating_submodel(self):
)
else:
self.submodels["lithium plating"] = pybamm.lithium_plating.Plating(
self.param, self.x_average, self.options
self.param, False, self.options
brosaplanella marked this conversation as resolved.
Show resolved Hide resolved
)

def set_other_reaction_submodels_to_zero(self):
Expand Down Expand Up @@ -267,7 +265,7 @@ def set_porosity_submodel(self):
or self.options["lithium plating porosity change"] == "true"
):
self.submodels["porosity"] = pybamm.porosity.ReactionDriven(
self.param, self.options, self.x_average
self.param, self.options, False
)

def set_li_metal_counter_electrode_submodels(self):
Expand Down
6 changes: 6 additions & 0 deletions pybamm/models/full_battery_models/lithium_ion/spm.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ def __init__(self, options=None, name="Single Particle Model", build=True):
if self.__class__ != "MPM":
pybamm.citations.register("Marquis2019")

if (
self.options["SEI"] not in ["none", "constant"]
or self.options["lithium plating"] != "none"
):
pybamm.citations.register("BrosaPlanella2022")

def set_convection_submodel(self):

self.submodels[
Expand Down
30 changes: 30 additions & 0 deletions tests/unit/test_citations.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,36 @@ def test_brosaplanella_2021(self):
pybamm.electrolyte_conductivity.Integrated(None)
self.assertIn("BrosaPlanella2021", citations._papers_to_cite)

def test_brosaplanella_2022(self):
# Test that calling relevant bits of code adds the right paper to citations
citations = pybamm.citations

citations._reset()
self.assertNotIn("BrosaPlanella2022", citations._papers_to_cite)
pybamm.lithium_ion.SPM(build=False, options={"SEI": "none"})
pybamm.lithium_ion.SPM(build=False, options={"SEI": "constant"})
pybamm.lithium_ion.SPMe(build=False, options={"SEI": "none"})
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"})
self.assertIn("BrosaPlanella2022", citations._papers_to_cite)
citations._reset()

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

pybamm.lithium_ion.SPM(build=False, options={"lithium plating": "irreversible"})
self.assertIn("BrosaPlanella2022", citations._papers_to_cite)
citations._reset()

pybamm.lithium_ion.SPMe(
build=False, options={"lithium plating": "irreversible"}
)
self.assertIn("BrosaPlanella2022", citations._papers_to_cite)
citations._reset()

def test_newman_tobias(self):
# Test that calling relevant bits of code adds the right paper to citations
citations = pybamm.citations
Expand Down