Skip to content

Commit

Permalink
Merge branch 'develop' into particle-mechanics
Browse files Browse the repository at this point in the history
  • Loading branch information
rtimms authored Dec 20, 2024
2 parents 480e632 + e3630b4 commit 0b8b3d0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions src/pybamm/models/full_battery_models/base_battery_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,14 +525,14 @@ def __init__(self, extra_options):

# Options not yet compatible with particle-size distributions
if options["particle size"] == "distribution":
if options["heat of mixing"] != "false":
if options["lithium plating porosity change"] != "false":
raise NotImplementedError(
"Heat of mixing submodels do not yet support particle-size "
"distributions."
"Lithium plating porosity change not yet supported for particle-size"
" distributions."
)
if options["lithium plating"] != "none":
if options["heat of mixing"] != "false":
raise NotImplementedError(
"Lithium plating submodels do not yet support particle-size "
"Heat of mixing submodels do not yet support particle-size "
"distributions."
)
if options["particle"] in ["quadratic profile", "quartic profile"]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,18 @@ def test_wycisk_ocp(self):
model = pybamm.lithium_ion.MPM(options)
model.check_well_posedness()

def test_mpm_with_lithium_plating(self):
options = {
"lithium plating": "irreversible",
}
model = pybamm.lithium_ion.MPM(options)
model.check_well_posedness()
options = {
"lithium plating": "reversible",
}
model = pybamm.lithium_ion.MPM(options)
model.check_well_posedness()


class TestMPMExternalCircuits:
def test_well_posed_voltage(self):
Expand Down Expand Up @@ -196,15 +208,3 @@ def test_well_posed_both_swelling_only_not_implemented(self):
options = {"particle mechanics": "swelling only"}
with pytest.raises(NotImplementedError):
pybamm.lithium_ion.MPM(options)


class TestMPMWithPlating:
def test_well_posed_reversible_plating_not_implemented(self):
options = {"lithium plating": "reversible"}
with pytest.raises(NotImplementedError):
pybamm.lithium_ion.MPM(options)

def test_well_posed_irreversible_plating_not_implemented(self):
options = {"lithium plating": "irreversible"}
with pytest.raises(NotImplementedError):
pybamm.lithium_ion.MPM(options)

0 comments on commit 0b8b3d0

Please sign in to comment.