From 5366245d723c8cd870a804b662d1a59ea47179b8 Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Thu, 9 Jun 2022 12:52:26 +0100 Subject: [PATCH 01/14] #2098 change averaging for SPMe+SR --- pybamm/CITATIONS.txt | 19 ++++++++++-- .../lithium_ion/base_lithium_ion_model.py | 6 ++-- .../full_battery_models/lithium_ion/spm.py | 6 ++++ tests/unit/test_citations.py | 30 +++++++++++++++++++ 4 files changed, 54 insertions(+), 7 deletions(-) diff --git a/pybamm/CITATIONS.txt b/pybamm/CITATIONS.txt index 7c608331a9..fdd634fb46 100644 --- a/pybamm/CITATIONS.txt +++ b/pybamm/CITATIONS.txt @@ -35,6 +35,19 @@ 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}}, @@ -299,13 +312,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}, volume = {}, number = {}, pages = {}, year = {2021}, - publisher = {The Electrochemical Society}, - doi = {}, + publisher = {}, + doi = {10.26434/chemrxiv-2022-d2q4n}, } @article{Prada2013, diff --git a/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py b/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py index 58aaa531d2..be81bb6fe3 100644 --- a/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py +++ b/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py @@ -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" @@ -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 ) def set_other_reaction_submodels_to_zero(self): @@ -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): diff --git a/pybamm/models/full_battery_models/lithium_ion/spm.py b/pybamm/models/full_battery_models/lithium_ion/spm.py index 330cffcbe1..95d176691a 100644 --- a/pybamm/models/full_battery_models/lithium_ion/spm.py +++ b/pybamm/models/full_battery_models/lithium_ion/spm.py @@ -75,6 +75,12 @@ def __init__(self, options=None, name="Single Particle Model", build=True): if self.__class__ != "MPM": pybamm.citations.register("Marquis2019") + if ( + options["sei"] not in ["none", "constant"] + or options["lithium plating"] != "none" + ): + pybamm.citations.register("BrosaPlanella2022") + def set_convection_submodel(self): self.submodels[ diff --git a/tests/unit/test_citations.py b/tests/unit/test_citations.py index 34f79ea484..5e4a77f628 100644 --- a/tests/unit/test_citations.py +++ b/tests/unit/test_citations.py @@ -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("BrosaPlanella2021", citations._papers_to_cite) + citations._reset() + + pybamm.lithium_ion.SPMe(build=False, options={"sei": "ec reaction limited"}) + self.assertIn("BrosaPlanella2021", citations._papers_to_cite) + citations._reset() + + pybamm.lithium_ion.SPM(build=False, options={"lithium plating": "irreversible"}) + self.assertIn("BrosaPlanella2021", citations._papers_to_cite) + citations._reset() + + pybamm.lithium_ion.SPMe( + build=False, options={"lithium plating": "irreversible"} + ) + self.assertIn("BrosaPlanella2021", 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 From 3fef16d2ff01faa93462cf0760b76b8d9c093bc3 Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Thu, 9 Jun 2022 13:03:00 +0100 Subject: [PATCH 02/14] fix blank space --- pybamm/CITATIONS.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/pybamm/CITATIONS.txt b/pybamm/CITATIONS.txt index fdd634fb46..b4f1df3cae 100644 --- a/pybamm/CITATIONS.txt +++ b/pybamm/CITATIONS.txt @@ -47,7 +47,6 @@ 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}}, From 006bf2f47bb86c73a64f2d412638eb7e892322f4 Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Thu, 9 Jun 2022 13:33:35 +0100 Subject: [PATCH 03/14] #2098 fix tests --- pybamm/models/full_battery_models/lithium_ion/spm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pybamm/models/full_battery_models/lithium_ion/spm.py b/pybamm/models/full_battery_models/lithium_ion/spm.py index 95d176691a..372b3c9338 100644 --- a/pybamm/models/full_battery_models/lithium_ion/spm.py +++ b/pybamm/models/full_battery_models/lithium_ion/spm.py @@ -76,8 +76,8 @@ def __init__(self, options=None, name="Single Particle Model", build=True): pybamm.citations.register("Marquis2019") if ( - options["sei"] not in ["none", "constant"] - or options["lithium plating"] != "none" + self.options["SEI"] not in ["none", "constant"] + or self.options["lithium plating"] != "none" ): pybamm.citations.register("BrosaPlanella2022") From 9fe04f2bcb3f9db3641bfb8f7ded70027ec7b9ef Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Thu, 9 Jun 2022 14:09:48 +0100 Subject: [PATCH 04/14] #2098 fix citation test --- tests/unit/test_citations.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/unit/test_citations.py b/tests/unit/test_citations.py index 5e4a77f628..8da8283eca 100644 --- a/tests/unit/test_citations.py +++ b/tests/unit/test_citations.py @@ -149,28 +149,28 @@ def test_brosaplanella_2022(self): 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"}) + 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("BrosaPlanella2021", 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("BrosaPlanella2021", citations._papers_to_cite) + 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("BrosaPlanella2021", citations._papers_to_cite) + self.assertIn("BrosaPlanella2022", citations._papers_to_cite) citations._reset() pybamm.lithium_ion.SPMe( build=False, options={"lithium plating": "irreversible"} ) - self.assertIn("BrosaPlanella2021", citations._papers_to_cite) + self.assertIn("BrosaPlanella2022", citations._papers_to_cite) citations._reset() def test_newman_tobias(self): From 39a94ff0acf40a86c37b878857811ea9e680051b Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Mon, 25 Jul 2022 14:58:12 +0100 Subject: [PATCH 05/14] update ORegan2021 to ORegan2022 --- CHANGELOG.md | 2 +- benchmarks/time_setup_models_and_sims.py | 2 +- benchmarks/time_solve_models.py | 6 +-- ...imulating-ORegan-2022-parameter-set.ipynb} | 17 ++++--- pybamm/CITATIONS.txt | 17 ++++--- .../cells/LGM50_ORegan2021/README.md | 7 --- .../cells/LGM50_ORegan2022/README.md | 7 +++ .../__init__.py | 0 .../aluminium_heat_capacity_CRC.py | 0 .../copper_heat_capacity_CRC.py | 0 .../copper_thermal_conductivity_CRC.py | 0 .../parameters.csv | 0 .../README.md | 7 --- .../README.md | 7 +++ .../parameters.csv | 0 .../graphite_ORegan2021/README.md | 7 --- .../graphite_ORegan2022/README.md | 7 +++ .../__init__.py | 0 .../graphite_LGM50_diffusivity_ORegan2022.py} | 7 ++- ...te_exchange_current_density_ORegan2022.py} | 7 ++- ...hite_LGM50_entropic_change_ORegan2022.csv} | 0 ...phite_LGM50_entropic_change_ORegan2022.py} | 7 ++- ...raphite_LGM50_heat_capacity_ORegan2022.py} | 7 ++- .../graphite_LGM50_ocp_Chen2020.csv | 0 .../graphite_LGM50_ocp_Chen2020.py | 0 ..._LGM50_thermal_conductivity_ORegan2022.py} | 9 ++-- .../parameters.csv | 12 ++--- .../nmc_ORegan2021/README.md | 7 --- .../nmc_ORegan2022/README.md | 7 +++ .../__init__.py | 0 .../nmc_LGM50_diffusivity_ORegan2022.py} | 7 ++- ...te_exchange_current_density_ORegan2022.py} | 7 ++- ...M50_electronic_conductivity_ORegan2022.py} | 7 ++- .../nmc_LGM50_entropic_change_ORegan2022.csv} | 0 .../nmc_LGM50_entropic_change_ORegan2022.py} | 7 ++- .../nmc_LGM50_heat_capacity_ORegan2022.py} | 7 ++- .../nmc_LGM50_ocp_Chen2020.csv | 0 .../nmc_LGM50_ocp_Chen2020.py | 0 ..._LGM50_thermal_conductivity_ORegan2022.py} | 7 ++- .../parameters.csv | 14 +++--- .../separators/separator_ORegan2021/README.md | 7 --- .../separators/separator_ORegan2022/README.md | 7 +++ .../__init__.py | 0 .../parameters.csv | 6 +-- ...parator_LGM50_heat_capacity_ORegan2022.py} | 7 ++- pybamm/parameters/parameter_sets.py | 20 ++++---- tests/unit/test_citations.py | 4 +- ...ORegan2021.py => test_LGM50_ORegan2022.py} | 48 +++++++++---------- 48 files changed, 147 insertions(+), 157 deletions(-) rename examples/notebooks/models/{simulating-ORegan-2021-parameter-set.ipynb => simulating-ORegan-2022-parameter-set.ipynb} (94%) delete mode 100644 pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2021/README.md create mode 100644 pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2022/README.md rename pybamm/input/parameters/lithium_ion/cells/{LGM50_ORegan2021 => LGM50_ORegan2022}/__init__.py (100%) rename pybamm/input/parameters/lithium_ion/cells/{LGM50_ORegan2021 => LGM50_ORegan2022}/aluminium_heat_capacity_CRC.py (100%) rename pybamm/input/parameters/lithium_ion/cells/{LGM50_ORegan2021 => LGM50_ORegan2022}/copper_heat_capacity_CRC.py (100%) rename pybamm/input/parameters/lithium_ion/cells/{LGM50_ORegan2021 => LGM50_ORegan2022}/copper_thermal_conductivity_CRC.py (100%) rename pybamm/input/parameters/lithium_ion/cells/{LGM50_ORegan2021 => LGM50_ORegan2022}/parameters.csv (100%) delete mode 100644 pybamm/input/parameters/lithium_ion/experiments/1C_discharge_from_full_ORegan2021/README.md create mode 100644 pybamm/input/parameters/lithium_ion/experiments/1C_discharge_from_full_ORegan2022/README.md rename pybamm/input/parameters/lithium_ion/experiments/{1C_discharge_from_full_ORegan2021 => 1C_discharge_from_full_ORegan2022}/parameters.csv (100%) delete mode 100644 pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/README.md create mode 100644 pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/README.md rename pybamm/input/parameters/lithium_ion/negative_electrodes/{graphite_ORegan2021 => graphite_ORegan2022}/__init__.py (100%) rename pybamm/input/parameters/lithium_ion/negative_electrodes/{graphite_ORegan2021/graphite_LGM50_diffusivity_ORegan2021.py => graphite_ORegan2022/graphite_LGM50_diffusivity_ORegan2022.py} (83%) rename pybamm/input/parameters/lithium_ion/negative_electrodes/{graphite_ORegan2021/graphite_LGM50_electrolyte_exchange_current_density_ORegan2021.py => graphite_ORegan2022/graphite_LGM50_electrolyte_exchange_current_density_ORegan2022.py} (83%) rename pybamm/input/parameters/lithium_ion/negative_electrodes/{graphite_ORegan2021/graphite_LGM50_entropic_change_ORegan2021.csv => graphite_ORegan2022/graphite_LGM50_entropic_change_ORegan2022.csv} (100%) rename pybamm/input/parameters/lithium_ion/negative_electrodes/{graphite_ORegan2021/graphite_LGM50_entropic_change_ORegan2021.py => graphite_ORegan2022/graphite_LGM50_entropic_change_ORegan2022.py} (78%) rename pybamm/input/parameters/lithium_ion/negative_electrodes/{graphite_ORegan2021/graphite_LGM50_heat_capacity_ORegan2021.py => graphite_ORegan2022/graphite_LGM50_heat_capacity_ORegan2022.py} (79%) rename pybamm/input/parameters/lithium_ion/negative_electrodes/{graphite_ORegan2021 => graphite_ORegan2022}/graphite_LGM50_ocp_Chen2020.csv (100%) rename pybamm/input/parameters/lithium_ion/negative_electrodes/{graphite_ORegan2021 => graphite_ORegan2022}/graphite_LGM50_ocp_Chen2020.py (100%) rename pybamm/input/parameters/lithium_ion/negative_electrodes/{graphite_ORegan2021/graphite_LGM50_thermal_conductivity_ORegan2021.py => graphite_ORegan2022/graphite_LGM50_thermal_conductivity_ORegan2022.py} (64%) rename pybamm/input/parameters/lithium_ion/negative_electrodes/{graphite_ORegan2021 => graphite_ORegan2022}/parameters.csv (80%) delete mode 100644 pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/README.md create mode 100644 pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/README.md rename pybamm/input/parameters/lithium_ion/positive_electrodes/{nmc_ORegan2021 => nmc_ORegan2022}/__init__.py (100%) rename pybamm/input/parameters/lithium_ion/positive_electrodes/{nmc_ORegan2021/nmc_LGM50_diffusivity_ORegan2021.py => nmc_ORegan2022/nmc_LGM50_diffusivity_ORegan2022.py} (81%) rename pybamm/input/parameters/lithium_ion/positive_electrodes/{nmc_ORegan2021/nmc_LGM50_electrolyte_exchange_current_density_ORegan2021.py => nmc_ORegan2022/nmc_LGM50_electrolyte_exchange_current_density_ORegan2022.py} (80%) rename pybamm/input/parameters/lithium_ion/positive_electrodes/{nmc_ORegan2021/nmc_LGM50_electronic_conductivity_ORegan2021.py => nmc_ORegan2022/nmc_LGM50_electronic_conductivity_ORegan2022.py} (68%) rename pybamm/input/parameters/lithium_ion/positive_electrodes/{nmc_ORegan2021/nmc_LGM50_entropic_change_ORegan2021.csv => nmc_ORegan2022/nmc_LGM50_entropic_change_ORegan2022.csv} (100%) rename pybamm/input/parameters/lithium_ion/positive_electrodes/{nmc_ORegan2021/nmc_LGM50_entropic_change_ORegan2021.py => nmc_ORegan2022/nmc_LGM50_entropic_change_ORegan2022.py} (74%) rename pybamm/input/parameters/lithium_ion/positive_electrodes/{nmc_ORegan2021/nmc_LGM50_heat_capacity_ORegan2021.py => nmc_ORegan2022/nmc_LGM50_heat_capacity_ORegan2022.py} (80%) rename pybamm/input/parameters/lithium_ion/positive_electrodes/{nmc_ORegan2021 => nmc_ORegan2022}/nmc_LGM50_ocp_Chen2020.csv (100%) rename pybamm/input/parameters/lithium_ion/positive_electrodes/{nmc_ORegan2021 => nmc_ORegan2022}/nmc_LGM50_ocp_Chen2020.py (100%) rename pybamm/input/parameters/lithium_ion/positive_electrodes/{nmc_ORegan2021/nmc_LGM50_thermal_conductivity_ORegan2021.py => nmc_ORegan2022/nmc_LGM50_thermal_conductivity_ORegan2022.py} (65%) rename pybamm/input/parameters/lithium_ion/positive_electrodes/{nmc_ORegan2021 => nmc_ORegan2022}/parameters.csv (78%) delete mode 100644 pybamm/input/parameters/lithium_ion/separators/separator_ORegan2021/README.md create mode 100644 pybamm/input/parameters/lithium_ion/separators/separator_ORegan2022/README.md rename pybamm/input/parameters/lithium_ion/separators/{separator_ORegan2021 => separator_ORegan2022}/__init__.py (100%) rename pybamm/input/parameters/lithium_ion/separators/{separator_ORegan2021 => separator_ORegan2022}/parameters.csv (67%) rename pybamm/input/parameters/lithium_ion/separators/{separator_ORegan2021/separator_LGM50_heat_capacity_ORegan2021.py => separator_ORegan2022/separator_LGM50_heat_capacity_ORegan2022.py} (79%) rename tests/unit/test_parameters/test_parameter_sets/{test_LGM50_ORegan2021.py => test_LGM50_ORegan2022.py} (80%) diff --git a/CHANGELOG.md b/CHANGELOG.md index b979c769a1..d457493f87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -174,7 +174,7 @@ This release introduces: - Added submodels and functionality for particle-size distributions in the DFN model, including an example notebook ([#1602](https://github.com/pybamm-team/PyBaMM/pull/1602)) - Added UDDS and WLTC drive cycles ([#1601](https://github.com/pybamm-team/PyBaMM/pull/1601)) -- Added LG M50 (NMC811 and graphite + SiOx) parameter set from O'Regan 2021 ([#1594](https://github.com/pybamm-team/PyBaMM/pull/1594)) +- Added LG M50 (NMC811 and graphite + SiOx) parameter set from O'Regan 2022 ([#1594](https://github.com/pybamm-team/PyBaMM/pull/1594)) - `pybamm.base_solver.solve` function can take a list of input parameters to calculate the sensitivities of the solution with respect to. Alternatively, it can be set to `True` to calculate the sensitivities for all input parameters ([#1552](https://github.com/pybamm-team/PyBaMM/pull/1552)) - Added capability for `quaternary` domains (in addition to `primary`, `secondary` and `tertiary`), increasing the maximum number of domains that a `Symbol` can have to 4. ([#1580](https://github.com/pybamm-team/PyBaMM/pull/1580)) - Tabs can now be placed at the bottom of the cell in 1+1D thermal models ([#1581](https://github.com/pybamm-team/PyBaMM/pull/1581)) diff --git a/benchmarks/time_setup_models_and_sims.py b/benchmarks/time_setup_models_and_sims.py index a2689e7b2a..dfe793c727 100644 --- a/benchmarks/time_setup_models_and_sims.py +++ b/benchmarks/time_setup_models_and_sims.py @@ -2,7 +2,7 @@ parameters = [ "Marquis2019", - "ORegan2021", + "ORegan2022", "NCA_Kim2011", "Prada2013", "Ai2020", diff --git a/benchmarks/time_solve_models.py b/benchmarks/time_solve_models.py index bf4a11ead4..2e9438755d 100644 --- a/benchmarks/time_solve_models.py +++ b/benchmarks/time_solve_models.py @@ -15,7 +15,7 @@ class TimeSolveSPM: [False, True], [ "Marquis2019", - "ORegan2021", + "ORegan2022", "NCA_Kim2011", "Prada2013", # "Ai2020", @@ -69,7 +69,7 @@ class TimeSolveSPMe: [False, True], [ "Marquis2019", - "ORegan2021", + "ORegan2022", "NCA_Kim2011", "Prada2013", # "Ai2020", @@ -123,7 +123,7 @@ class TimeSolveDFN: [False, True], [ "Marquis2019", - "ORegan2021", + "ORegan2022", # "NCA_Kim2011", "Prada2013", "Ai2020", diff --git a/examples/notebooks/models/simulating-ORegan-2021-parameter-set.ipynb b/examples/notebooks/models/simulating-ORegan-2022-parameter-set.ipynb similarity index 94% rename from examples/notebooks/models/simulating-ORegan-2021-parameter-set.ipynb rename to examples/notebooks/models/simulating-ORegan-2022-parameter-set.ipynb index 31cea602c0..a1070c9d35 100644 --- a/examples/notebooks/models/simulating-ORegan-2021-parameter-set.ipynb +++ b/examples/notebooks/models/simulating-ORegan-2022-parameter-set.ipynb @@ -5,9 +5,9 @@ "id": "global-street", "metadata": {}, "source": [ - "# Run simulations with O'Regan 2021 parameter set (LG M50)\n", + "# Run simulations with O'Regan 2022 parameter set (LG M50)\n", "\n", - "In this notebook we show an example on how to run the DFN model with the O'Regan 2021 parameter set for the LG M50 cell. Because of the concentration dependent diffusion coefficient, we need to customise the mesh so the simulations converge." + "In this notebook we show an example on how to run the DFN model with the O'Regan 2022 parameter set for the LG M50 cell. Because of the concentration dependent diffusion coefficient, we need to customise the mesh so the simulations converge." ] }, { @@ -48,8 +48,8 @@ "options = {\"thermal\": \"lumped\", \"dimensionality\": 0, \"cell geometry\": \"arbitrary\"}\n", "model = pybamm.lithium_ion.DFN(options=options)\n", "\n", - "# O'Regan 2021 parameter set\n", - "param = pybamm.ParameterValues(\"ORegan2021\")\n", + "# O'Regan 2022 parameter set\n", + "param = pybamm.ParameterValues(\"ORegan2022\")\n", "\n", "# Choose CasADI fast (we do a short discharge so there are no events, if events are needed choose \"fast with events\")\n", "solver = pybamm.CasadiSolver(mode=\"fast\")" @@ -163,7 +163,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3.7.4 ('dev': venv)", "language": "python", "name": "python3" }, @@ -177,7 +177,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.0" + "version": "3.7.4" }, "toc": { "base_numbering": 1, @@ -191,6 +191,11 @@ "toc_position": {}, "toc_section_display": true, "toc_window_display": true + }, + "vscode": { + "interpreter": { + "hash": "0f0e5a277ebcf03e91e138edc3d4774b5dee64e7d6640c0d876f99a9f6b2a4dc" + } } }, "nbformat": 4, diff --git a/pybamm/CITATIONS.txt b/pybamm/CITATIONS.txt index b4f1df3cae..3b926d8d1e 100644 --- a/pybamm/CITATIONS.txt +++ b/pybamm/CITATIONS.txt @@ -308,16 +308,15 @@ journal = {Journal of The Electrochemical Society} } -@article{ORegan2021, +@article{ORegan2022, 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 = {Submitted for publication}, - volume = {}, - number = {}, - pages = {}, - year = {2021}, - publisher = {}, - doi = {10.26434/chemrxiv-2022-d2q4n}, + title = {{Thermal-electrochemical parameters of a high energy lithium-ion cylindrical battery}}, + journal = {{Electrochimica Acta}}, + volume = {425}, + pages = {140700}, + year = {2022}, + publisher = {Elsevier}, + doi = {10.1016/j.electacta.2022.140700}, } @article{Prada2013, diff --git a/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2021/README.md b/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2021/README.md deleted file mode 100644 index 3f1acb6d1b..0000000000 --- a/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2021/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# LG M50 cell parameters - -Parameters for an LG M50 cell, from the paper - -> Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma Kendrick. ["Thermal-electrochemical parametrisation of a lithium-ion battery: mapping Li concentration and temperature dependencies."]() Journal of the Electrochemical Society, submitted (2021) - -and references therein. diff --git a/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2022/README.md b/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2022/README.md new file mode 100644 index 0000000000..cabdc81835 --- /dev/null +++ b/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2022/README.md @@ -0,0 +1,7 @@ +# LG M50 cell parameters + +Parameters for an LG M50 cell, from the paper + +> Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma Kendrick. ["Thermal-electrochemical parameters of a high energy lithium-ion cylindrical battery."](https://www.sciencedirect.com/science/article/pii/S0013468622008593) Electrochimica Acta 425 (2022): 140700 + +and references therein. diff --git a/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2021/__init__.py b/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2022/__init__.py similarity index 100% rename from pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2021/__init__.py rename to pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2022/__init__.py diff --git a/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2021/aluminium_heat_capacity_CRC.py b/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2022/aluminium_heat_capacity_CRC.py similarity index 100% rename from pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2021/aluminium_heat_capacity_CRC.py rename to pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2022/aluminium_heat_capacity_CRC.py diff --git a/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2021/copper_heat_capacity_CRC.py b/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2022/copper_heat_capacity_CRC.py similarity index 100% rename from pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2021/copper_heat_capacity_CRC.py rename to pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2022/copper_heat_capacity_CRC.py diff --git a/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2021/copper_thermal_conductivity_CRC.py b/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2022/copper_thermal_conductivity_CRC.py similarity index 100% rename from pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2021/copper_thermal_conductivity_CRC.py rename to pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2022/copper_thermal_conductivity_CRC.py diff --git a/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2021/parameters.csv b/pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2022/parameters.csv similarity index 100% rename from pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2021/parameters.csv rename to pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2022/parameters.csv diff --git a/pybamm/input/parameters/lithium_ion/experiments/1C_discharge_from_full_ORegan2021/README.md b/pybamm/input/parameters/lithium_ion/experiments/1C_discharge_from_full_ORegan2021/README.md deleted file mode 100644 index 46e7772ab5..0000000000 --- a/pybamm/input/parameters/lithium_ion/experiments/1C_discharge_from_full_ORegan2021/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# 1C discharge from full - -Discharge lithium-ion battery from full charge at 1C, using the initial conditions from the paper - -> Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma Kendrick. ["Thermal-electrochemical parametrisation of a lithium-ion battery: mapping Li concentration and temperature dependencies."]() Journal of the Electrochemical Society, submitted (2021) - -and references therein. diff --git a/pybamm/input/parameters/lithium_ion/experiments/1C_discharge_from_full_ORegan2022/README.md b/pybamm/input/parameters/lithium_ion/experiments/1C_discharge_from_full_ORegan2022/README.md new file mode 100644 index 0000000000..904a40e7c9 --- /dev/null +++ b/pybamm/input/parameters/lithium_ion/experiments/1C_discharge_from_full_ORegan2022/README.md @@ -0,0 +1,7 @@ +# 1C discharge from full + +Discharge lithium-ion battery from full charge at 1C, using the initial conditions from the paper + +> Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma Kendrick. ["Thermal-electrochemical parameters of a high energy lithium-ion cylindrical battery."](https://www.sciencedirect.com/science/article/pii/S0013468622008593) Electrochimica Acta 425 (2022): 140700 + +and references therein. diff --git a/pybamm/input/parameters/lithium_ion/experiments/1C_discharge_from_full_ORegan2021/parameters.csv b/pybamm/input/parameters/lithium_ion/experiments/1C_discharge_from_full_ORegan2022/parameters.csv similarity index 100% rename from pybamm/input/parameters/lithium_ion/experiments/1C_discharge_from_full_ORegan2021/parameters.csv rename to pybamm/input/parameters/lithium_ion/experiments/1C_discharge_from_full_ORegan2022/parameters.csv diff --git a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/README.md b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/README.md deleted file mode 100644 index 76d2438618..0000000000 --- a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# LG M50 Graphite negative electrode parameters - -Parameters for a LG M50 graphite negative electrode, from the paper - -> Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma Kendrick. ["Thermal-electrochemical parametrisation of a lithium-ion battery: mapping Li concentration and temperature dependencies."]() Journal of the Electrochemical Society, submitted (2021) - -and references therein. diff --git a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/README.md b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/README.md new file mode 100644 index 0000000000..b8bee1b33f --- /dev/null +++ b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/README.md @@ -0,0 +1,7 @@ +# LG M50 Graphite negative electrode parameters + +Parameters for a LG M50 graphite negative electrode, from the paper + +> Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma Kendrick. ["Thermal-electrochemical parameters of a high energy lithium-ion cylindrical battery."](https://www.sciencedirect.com/science/article/pii/S0013468622008593) Electrochimica Acta 425 (2022): 140700 + +and references therein. diff --git a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/__init__.py b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/__init__.py similarity index 100% rename from pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/__init__.py rename to pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/__init__.py diff --git a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_diffusivity_ORegan2021.py b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_diffusivity_ORegan2022.py similarity index 83% rename from pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_diffusivity_ORegan2021.py rename to pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_diffusivity_ORegan2022.py index 12fb4b9508..693b527862 100644 --- a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_diffusivity_ORegan2021.py +++ b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_diffusivity_ORegan2022.py @@ -1,7 +1,7 @@ from pybamm import exp, constants -def graphite_LGM50_diffusivity_ORegan2021(sto, T): +def graphite_LGM50_diffusivity_ORegan2022(sto, T): """ LG M50 Graphite diffusivity as a function of stochiometry, in this case the diffusivity is taken to be a constant. The value is taken from [1]. @@ -9,9 +9,8 @@ def graphite_LGM50_diffusivity_ORegan2021(sto, T): References ---------- .. [1] Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma - Kendrick. "Thermal-electrochemical parametrisation of a lithium-ion battery: - mapping Li concentration and temperature dependencies." Journal of the - Electrochemical Society, submitted (2021). + Kendrick. "Thermal-electrochemical parameters of a high energy lithium-ion + cylindrical battery." Electrochimica Acta 425 (2022): 140700 Parameters ---------- diff --git a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_electrolyte_exchange_current_density_ORegan2021.py b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_electrolyte_exchange_current_density_ORegan2022.py similarity index 83% rename from pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_electrolyte_exchange_current_density_ORegan2021.py rename to pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_electrolyte_exchange_current_density_ORegan2022.py index ea9645ca87..2d439a0ad9 100644 --- a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_electrolyte_exchange_current_density_ORegan2021.py +++ b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_electrolyte_exchange_current_density_ORegan2022.py @@ -1,7 +1,7 @@ from pybamm import exp, constants, Parameter -def graphite_LGM50_electrolyte_exchange_current_density_ORegan2021(c_e, c_s_surf, T): +def graphite_LGM50_electrolyte_exchange_current_density_ORegan2022(c_e, c_s_surf, T): """ Exchange-current density for Butler-Volmer reactions between graphite and LiPF6 in EC:DMC. @@ -9,9 +9,8 @@ def graphite_LGM50_electrolyte_exchange_current_density_ORegan2021(c_e, c_s_surf References ---------- .. [1] Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma - Kendrick. "Thermal-electrochemical parametrisation of a lithium-ion battery: - mapping Li concentration and temperature dependencies." Journal of the - Electrochemical Society, submitted (2021). + Kendrick. "Thermal-electrochemical parameters of a high energy lithium-ion + cylindrical battery." Electrochimica Acta 425 (2022): 140700 Parameters ---------- diff --git a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_entropic_change_ORegan2021.csv b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_entropic_change_ORegan2022.csv similarity index 100% rename from pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_entropic_change_ORegan2021.csv rename to pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_entropic_change_ORegan2022.csv diff --git a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_entropic_change_ORegan2021.py b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_entropic_change_ORegan2022.py similarity index 78% rename from pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_entropic_change_ORegan2021.py rename to pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_entropic_change_ORegan2022.py index 5386ab4c58..898456e0ce 100644 --- a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_entropic_change_ORegan2021.py +++ b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_entropic_change_ORegan2022.py @@ -1,7 +1,7 @@ from pybamm import exp, tanh -def graphite_LGM50_entropic_change_ORegan2021(sto): +def graphite_LGM50_entropic_change_ORegan2022(sto): """ LG M50 Graphite entropic change in open circuit potential (OCP) at a temperature of 298.15K as a function of the stochiometry. The fit is taken from [1]. @@ -9,9 +9,8 @@ def graphite_LGM50_entropic_change_ORegan2021(sto): References ---------- .. [1] Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma - Kendrick. "Thermal-electrochemical parametrisation of a lithium-ion battery: - mapping Li concentration and temperature dependencies." Journal of the - Electrochemical Society, submitted (2021). + Kendrick. "Thermal-electrochemical parameters of a high energy lithium-ion + cylindrical battery." Electrochimica Acta 425 (2022): 140700 Parameters ---------- diff --git a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_heat_capacity_ORegan2021.py b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_heat_capacity_ORegan2022.py similarity index 79% rename from pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_heat_capacity_ORegan2021.py rename to pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_heat_capacity_ORegan2022.py index e5aebec719..14c03bf1a2 100644 --- a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_heat_capacity_ORegan2021.py +++ b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_heat_capacity_ORegan2022.py @@ -1,7 +1,7 @@ from pybamm import Parameter -def graphite_LGM50_heat_capacity_ORegan2021(T): +def graphite_LGM50_heat_capacity_ORegan2022(T): """ Wet negative electrode specific heat capacity as a function of the temperature from [1]. @@ -9,9 +9,8 @@ def graphite_LGM50_heat_capacity_ORegan2021(T): References ---------- .. [1] Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma - Kendrick. "Thermal-electrochemical parametrisation of a lithium-ion battery: - mapping Li concentration and temperature dependencies." Journal of the - Electrochemical Society, submitted (2021). + Kendrick. "Thermal-electrochemical parameters of a high energy lithium-ion + cylindrical battery." Electrochimica Acta 425 (2022): 140700 Parameters ---------- diff --git a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_ocp_Chen2020.csv b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_ocp_Chen2020.csv similarity index 100% rename from pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_ocp_Chen2020.csv rename to pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_ocp_Chen2020.csv diff --git a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_ocp_Chen2020.py b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_ocp_Chen2020.py similarity index 100% rename from pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_ocp_Chen2020.py rename to pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_ocp_Chen2020.py diff --git a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_thermal_conductivity_ORegan2021.py b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_thermal_conductivity_ORegan2022.py similarity index 64% rename from pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_thermal_conductivity_ORegan2021.py rename to pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_thermal_conductivity_ORegan2022.py index aca11be3d7..3552b779b7 100644 --- a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/graphite_LGM50_thermal_conductivity_ORegan2021.py +++ b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_thermal_conductivity_ORegan2022.py @@ -1,4 +1,4 @@ -def graphite_LGM50_thermal_conductivity_ORegan2021(T): +def graphite_LGM50_thermal_conductivity_ORegan2022(T): """ Wet negative electrode thermal conductivity as a function of the temperature from [1]. @@ -6,10 +6,9 @@ def graphite_LGM50_thermal_conductivity_ORegan2021(T): References ---------- .. [1] Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma - Kendrick. "Thermal-electrochemical parametrisation of a lithium-ion battery: - mapping Li concentration and temperature dependencies." Journal of the - Electrochemical Society, submitted (2021). - + Kendrick. "Thermal-electrochemical parameters of a high energy lithium-ion + cylindrical battery." Electrochimica Acta 425 (2022): 140700 + Parameters ---------- T: :class:`pybamm.Symbol` diff --git a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/parameters.csv b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/parameters.csv similarity index 80% rename from pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/parameters.csv rename to pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/parameters.csv index eed32431fc..b63056f0bd 100644 --- a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/parameters.csv +++ b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/parameters.csv @@ -4,7 +4,7 @@ Name [units],Value,Reference,Notes # Electrode properties,,, Negative electrode conductivity [S.m-1],215,Chen 2020,graphite Maximum concentration in negative electrode [mol.m-3],29583,Chen 2020, -Negative electrode diffusivity [m2.s-1],[function]graphite_LGM50_diffusivity_ORegan2021,O'Regan 2021, +Negative electrode diffusivity [m2.s-1],[function]graphite_LGM50_diffusivity_ORegan2022,O'Regan 2022, Negative electrode OCP [V],[function]graphite_LGM50_ocp_Chen2020,Chen 2020, ,,, # Microstructure,,, @@ -20,12 +20,12 @@ Negative electrode electrons in reaction,1,, Reference OCP vs SHE in the negative electrode [V],,, Negative electrode charge transfer coefficient,0.5,Chen 2020, Negative electrode double-layer capacity [F.m-2],0.2,, -Negative electrode exchange-current density [A.m-2],[function]graphite_LGM50_electrolyte_exchange_current_density_ORegan2021,O'Regan 2021, +Negative electrode exchange-current density [A.m-2],[function]graphite_LGM50_electrolyte_exchange_current_density_ORegan2022,O'Regan 2022, ,,, # Density,,, -Negative electrode density [kg.m-3],2060,O'Regan 2021,wet electrode +Negative electrode density [kg.m-3],2060,O'Regan 2022,wet electrode ,,, # Thermal parameters,,, -Negative electrode specific heat capacity [J.kg-1.K-1],[function]graphite_LGM50_heat_capacity_ORegan2021,O'Regan 2021,wet electrode -Negative electrode thermal conductivity [W.m-1.K-1],[function]graphite_LGM50_thermal_conductivity_ORegan2021,O'Regan 2021,wet electrode -Negative electrode OCP entropic change [V.K-1],[function]graphite_LGM50_entropic_change_ORegan2021,, \ No newline at end of file +Negative electrode specific heat capacity [J.kg-1.K-1],[function]graphite_LGM50_heat_capacity_ORegan2022,O'Regan 2022,wet electrode +Negative electrode thermal conductivity [W.m-1.K-1],[function]graphite_LGM50_thermal_conductivity_ORegan2022,O'Regan 2022,wet electrode +Negative electrode OCP entropic change [V.K-1],[function]graphite_LGM50_entropic_change_ORegan2022,, \ No newline at end of file diff --git a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/README.md b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/README.md deleted file mode 100644 index e85870fd2b..0000000000 --- a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# NMC 811 positive electrode parameters - -Parameters for an LG M50 NMC positive electrode, from the paper - -> Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma Kendrick. ["Thermal-electrochemical parametrisation of a lithium-ion battery: mapping Li concentration and temperature dependencies."]() Journal of the Electrochemical Society, submitted (2021) - -and references therein. diff --git a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/README.md b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/README.md new file mode 100644 index 0000000000..ba9aa6cdd4 --- /dev/null +++ b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/README.md @@ -0,0 +1,7 @@ +# NMC 811 positive electrode parameters + +Parameters for an LG M50 NMC positive electrode, from the paper + +> Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma Kendrick. ["Thermal-electrochemical parameters of a high energy lithium-ion cylindrical battery."](https://www.sciencedirect.com/science/article/pii/S0013468622008593) Electrochimica Acta 425 (2022): 140700 + +and references therein. diff --git a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/__init__.py b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/__init__.py similarity index 100% rename from pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/__init__.py rename to pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/__init__.py diff --git a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_diffusivity_ORegan2021.py b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_diffusivity_ORegan2022.py similarity index 81% rename from pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_diffusivity_ORegan2021.py rename to pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_diffusivity_ORegan2022.py index 35b664e07a..6ec0ca2fd6 100644 --- a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_diffusivity_ORegan2021.py +++ b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_diffusivity_ORegan2022.py @@ -1,7 +1,7 @@ from pybamm import exp, constants -def nmc_LGM50_diffusivity_ORegan2021(sto, T): +def nmc_LGM50_diffusivity_ORegan2022(sto, T): """ NMC diffusivity as a function of stoichiometry, in this case the diffusivity is taken to be a constant. The value is taken from [1]. @@ -9,9 +9,8 @@ def nmc_LGM50_diffusivity_ORegan2021(sto, T): References ---------- .. [1] Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma - Kendrick. "Thermal-electrochemical parametrisation of a lithium-ion battery: - mapping Li concentration and temperature dependencies." Journal of the - Electrochemical Society, submitted (2021). + Kendrick. "Thermal-electrochemical parameters of a high energy lithium-ion + cylindrical battery." Electrochimica Acta 425 (2022): 140700 Parameters ---------- diff --git a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_electrolyte_exchange_current_density_ORegan2021.py b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_electrolyte_exchange_current_density_ORegan2022.py similarity index 80% rename from pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_electrolyte_exchange_current_density_ORegan2021.py rename to pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_electrolyte_exchange_current_density_ORegan2022.py index cb7525ac18..4776c88a33 100644 --- a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_electrolyte_exchange_current_density_ORegan2021.py +++ b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_electrolyte_exchange_current_density_ORegan2022.py @@ -1,7 +1,7 @@ from pybamm import exp, constants, Parameter -def nmc_LGM50_electrolyte_exchange_current_density_ORegan2021(c_e, c_s_surf, T): +def nmc_LGM50_electrolyte_exchange_current_density_ORegan2022(c_e, c_s_surf, T): """ Exchange-current density for Butler-Volmer reactions between NMC and LiPF6 in EC:DMC. @@ -9,9 +9,8 @@ def nmc_LGM50_electrolyte_exchange_current_density_ORegan2021(c_e, c_s_surf, T): References ---------- .. [1] Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma - Kendrick. "Thermal-electrochemical parametrisation of a lithium-ion battery: - mapping Li concentration and temperature dependencies." Journal of the - Electrochemical Society, submitted (2021). + Kendrick. "Thermal-electrochemical parameters of a high energy lithium-ion + cylindrical battery." Electrochimica Acta 425 (2022): 140700 Parameters ---------- diff --git a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_electronic_conductivity_ORegan2021.py b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_electronic_conductivity_ORegan2022.py similarity index 68% rename from pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_electronic_conductivity_ORegan2021.py rename to pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_electronic_conductivity_ORegan2022.py index be99b5895d..22115666b7 100644 --- a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_electronic_conductivity_ORegan2021.py +++ b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_electronic_conductivity_ORegan2022.py @@ -1,7 +1,7 @@ from pybamm import exp, constants -def nmc_LGM50_electronic_conductivity_ORegan2021(T): +def nmc_LGM50_electronic_conductivity_ORegan2022(T): """ Positive electrode electronic conductivity as a function of the temperature from [1]. @@ -9,9 +9,8 @@ def nmc_LGM50_electronic_conductivity_ORegan2021(T): References ---------- .. [1] Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma - Kendrick. "Thermal-electrochemical parametrisation of a lithium-ion battery: - mapping Li concentration and temperature dependencies." Journal of the - Electrochemical Society, submitted (2021). + Kendrick. "Thermal-electrochemical parameters of a high energy lithium-ion + cylindrical battery." Electrochimica Acta 425 (2022): 140700 Parameters ---------- diff --git a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_entropic_change_ORegan2021.csv b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_entropic_change_ORegan2022.csv similarity index 100% rename from pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_entropic_change_ORegan2021.csv rename to pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_entropic_change_ORegan2022.csv diff --git a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_entropic_change_ORegan2021.py b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_entropic_change_ORegan2022.py similarity index 74% rename from pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_entropic_change_ORegan2021.py rename to pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_entropic_change_ORegan2022.py index 0c288b0813..56e8d5190d 100644 --- a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_entropic_change_ORegan2021.py +++ b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_entropic_change_ORegan2022.py @@ -1,7 +1,7 @@ from pybamm import exp -def nmc_LGM50_entropic_change_ORegan2021(sto): +def nmc_LGM50_entropic_change_ORegan2022(sto): """ LG M50 NMC 811 entropic change in open circuit potential (OCP) at a temperature of 298.15K as a function of the stochiometry. The fit is taken from [1]. @@ -9,9 +9,8 @@ def nmc_LGM50_entropic_change_ORegan2021(sto): References ---------- .. [1] Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma - Kendrick. "Thermal-electrochemical parametrisation of a lithium-ion battery: - mapping Li concentration and temperature dependencies." Journal of the - Electrochemical Society, submitted (2021). + Kendrick. "Thermal-electrochemical parameters of a high energy lithium-ion + cylindrical battery." Electrochimica Acta 425 (2022): 140700 Parameters ---------- diff --git a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_heat_capacity_ORegan2021.py b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_heat_capacity_ORegan2022.py similarity index 80% rename from pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_heat_capacity_ORegan2021.py rename to pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_heat_capacity_ORegan2022.py index 33b06108e2..31449aa6bb 100644 --- a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_heat_capacity_ORegan2021.py +++ b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_heat_capacity_ORegan2022.py @@ -1,7 +1,7 @@ from pybamm import Parameter -def nmc_LGM50_heat_capacity_ORegan2021(T): +def nmc_LGM50_heat_capacity_ORegan2022(T): """ Wet positive electrode specific heat capacity as a function of the temperature from [1]. @@ -9,9 +9,8 @@ def nmc_LGM50_heat_capacity_ORegan2021(T): References ---------- .. [1] Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma - Kendrick. "Thermal-electrochemical parametrisation of a lithium-ion battery: - mapping Li concentration and temperature dependencies." Journal of the - Electrochemical Society, submitted (2021). + Kendrick. "Thermal-electrochemical parameters of a high energy lithium-ion + cylindrical battery." Electrochimica Acta 425 (2022): 140700 Parameters ---------- diff --git a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_ocp_Chen2020.csv b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_ocp_Chen2020.csv similarity index 100% rename from pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_ocp_Chen2020.csv rename to pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_ocp_Chen2020.csv diff --git a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_ocp_Chen2020.py b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_ocp_Chen2020.py similarity index 100% rename from pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_ocp_Chen2020.py rename to pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_ocp_Chen2020.py diff --git a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_thermal_conductivity_ORegan2021.py b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_thermal_conductivity_ORegan2022.py similarity index 65% rename from pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_thermal_conductivity_ORegan2021.py rename to pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_thermal_conductivity_ORegan2022.py index 49982db453..af7f60f661 100644 --- a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/nmc_LGM50_thermal_conductivity_ORegan2021.py +++ b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_thermal_conductivity_ORegan2022.py @@ -1,4 +1,4 @@ -def nmc_LGM50_thermal_conductivity_ORegan2021(T): +def nmc_LGM50_thermal_conductivity_ORegan2022(T): """ Wet positive electrode thermal conductivity as a function of the temperature from [1]. @@ -6,9 +6,8 @@ def nmc_LGM50_thermal_conductivity_ORegan2021(T): References ---------- .. [1] Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma - Kendrick. "Thermal-electrochemical parametrisation of a lithium-ion battery: - mapping Li concentration and temperature dependencies." Journal of the - Electrochemical Society, submitted (2021). + Kendrick. "Thermal-electrochemical parameters of a high energy lithium-ion + cylindrical battery." Electrochimica Acta 425 (2022): 140700 Parameters ---------- diff --git a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/parameters.csv b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/parameters.csv similarity index 78% rename from pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/parameters.csv rename to pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/parameters.csv index 3f1fcda05d..977c044d58 100644 --- a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/parameters.csv +++ b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/parameters.csv @@ -2,9 +2,9 @@ Name [units],Value,Reference,Notes # Empty rows and rows starting with ‘#’ will be ignored,,, ,,, # Electrode properties,,, -Positive electrode conductivity [S.m-1],[function]nmc_LGM50_electronic_conductivity_ORegan2021,O'Regan 2021, +Positive electrode conductivity [S.m-1],[function]nmc_LGM50_electronic_conductivity_ORegan2022,O'Regan 2022, Maximum concentration in positive electrode [mol.m-3],51765,Chen 2020, -Positive electrode diffusivity [m2.s-1],[function]nmc_LGM50_diffusivity_ORegan2021,O'Regan 2021, +Positive electrode diffusivity [m2.s-1],[function]nmc_LGM50_diffusivity_ORegan2022,O'Regan 2022, Positive electrode OCP [V],[function]nmc_LGM50_ocp_Chen2020,Chen 2020, ,,, # Microstructure,,, @@ -20,12 +20,12 @@ Positive electrode electrons in reaction,1,, Reference OCP vs SHE in the positive electrode [V],,, Positive electrode charge transfer coefficient,0.5,Chen 2020, Positive electrode double-layer capacity [F.m-2],0.2,, -Positive electrode exchange-current density [A.m-2],[function]nmc_LGM50_electrolyte_exchange_current_density_ORegan2021,O'Regan 2021, +Positive electrode exchange-current density [A.m-2],[function]nmc_LGM50_electrolyte_exchange_current_density_ORegan2022,O'Regan 2022, ,,, # Density,,, -Positive electrode density [kg.m-3],3699,O'Regan 2021,wet electrode +Positive electrode density [kg.m-3],3699,O'Regan 2022,wet electrode ,,, # Thermal parameters,,, -Positive electrode specific heat capacity [J.kg-1.K-1],[function]nmc_LGM50_heat_capacity_ORegan2021,O'Regan 2021,wet electrode -Positive electrode thermal conductivity [W.m-1.K-1],[function]nmc_LGM50_thermal_conductivity_ORegan2021,O'Regan 2021,wet electrode -Positive electrode OCP entropic change [V.K-1],[function]nmc_LGM50_entropic_change_ORegan2021,, \ No newline at end of file +Positive electrode specific heat capacity [J.kg-1.K-1],[function]nmc_LGM50_heat_capacity_ORegan2022,O'Regan 2022,wet electrode +Positive electrode thermal conductivity [W.m-1.K-1],[function]nmc_LGM50_thermal_conductivity_ORegan2022,O'Regan 2022,wet electrode +Positive electrode OCP entropic change [V.K-1],[function]nmc_LGM50_entropic_change_ORegan2022,, \ No newline at end of file diff --git a/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2021/README.md b/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2021/README.md deleted file mode 100644 index a35564f71a..0000000000 --- a/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2021/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Separator parameters - -Parameters for an LG M50 separator, from the paper - -> Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma Kendrick. ["Thermal-electrochemical parametrisation of a lithium-ion battery: mapping Li concentration and temperature dependencies."]() Journal of the Electrochemical Society, submitted (2021) - -and references therein. diff --git a/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2022/README.md b/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2022/README.md new file mode 100644 index 0000000000..186c8c5cf6 --- /dev/null +++ b/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2022/README.md @@ -0,0 +1,7 @@ +# Separator parameters + +Parameters for an LG M50 separator, from the paper + +> Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma Kendrick. ["Thermal-electrochemical parameters of a high energy lithium-ion cylindrical battery."](https://www.sciencedirect.com/science/article/pii/S0013468622008593) Electrochimica Acta 425 (2022): 140700 + +and references therein. diff --git a/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2021/__init__.py b/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2022/__init__.py similarity index 100% rename from pybamm/input/parameters/lithium_ion/separators/separator_ORegan2021/__init__.py rename to pybamm/input/parameters/lithium_ion/separators/separator_ORegan2022/__init__.py diff --git a/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2021/parameters.csv b/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2022/parameters.csv similarity index 67% rename from pybamm/input/parameters/lithium_ion/separators/separator_ORegan2021/parameters.csv rename to pybamm/input/parameters/lithium_ion/separators/separator_ORegan2022/parameters.csv index bf8b51d40b..729b6a3a55 100644 --- a/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2021/parameters.csv +++ b/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2022/parameters.csv @@ -4,6 +4,6 @@ Name [units],Value,Reference,Notes Separator porosity,0.47,Chen 2020, Separator Bruggeman coefficient (electrolyte),1.5,Chen 2020,theoretical Separator Bruggeman coefficient (electrode),1.5,default, -Separator density [kg.m-3],1548,O'Regan 2021, -Separator specific heat capacity [J.kg-1.K-1],[function]separator_LGM50_heat_capacity_ORegan2021,O'Regan 2021, -Separator thermal conductivity [W.m-1.K-1],0.3344,O'Regan 2021, \ No newline at end of file +Separator density [kg.m-3],1548,O'Regan 2022, +Separator specific heat capacity [J.kg-1.K-1],[function]separator_LGM50_heat_capacity_ORegan2022,O'Regan 2022, +Separator thermal conductivity [W.m-1.K-1],0.3344,O'Regan 2022, \ No newline at end of file diff --git a/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2021/separator_LGM50_heat_capacity_ORegan2021.py b/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2022/separator_LGM50_heat_capacity_ORegan2022.py similarity index 79% rename from pybamm/input/parameters/lithium_ion/separators/separator_ORegan2021/separator_LGM50_heat_capacity_ORegan2021.py rename to pybamm/input/parameters/lithium_ion/separators/separator_ORegan2022/separator_LGM50_heat_capacity_ORegan2022.py index e7620c418d..f5a258a68c 100644 --- a/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2021/separator_LGM50_heat_capacity_ORegan2021.py +++ b/pybamm/input/parameters/lithium_ion/separators/separator_ORegan2022/separator_LGM50_heat_capacity_ORegan2022.py @@ -1,16 +1,15 @@ from pybamm import Parameter -def separator_LGM50_heat_capacity_ORegan2021(T): +def separator_LGM50_heat_capacity_ORegan2022(T): """ Wet separator specific heat capacity as a function of the temperature from [1]. References ---------- .. [1] Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma - Kendrick. "Thermal-electrochemical parametrisation of a lithium-ion battery: - mapping Li concentration and temperature dependencies." Journal of the - Electrochemical Society, submitted (2021). + Kendrick. "Thermal-electrochemical parameters of a high energy lithium-ion + cylindrical battery." Electrochimica Acta 425 (2022): 140700 Parameters ---------- diff --git a/pybamm/parameters/parameter_sets.py b/pybamm/parameters/parameter_sets.py index 697f0b60d1..081cc6e0d8 100644 --- a/pybamm/parameters/parameter_sets.py +++ b/pybamm/parameters/parameter_sets.py @@ -66,15 +66,13 @@ Pesaran. Multi-domain modeling of lithium-ion batteries encompassing multi-physics in varied length scales. Journal of the Electrochemical Society, 158(8):A955–A969, 2011. doi:10.1149/1.3597614. - * ORegan2021 : + * ORegan2022 : - Chang-Hui Chen, Ferran Brosa Planella, Kieran O'Regan, Dominika Gastol, W. Dhammika Widanage, and Emma Kendrick. Development of Experimental Techniques for Parameterization of Multi-scale Lithium-ion Battery Models. Journal of The Electrochemical Society, 167(8):080534, 2020. doi:10.1149/1945-7111/ab9050. - Kieran O'Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma Kendrick. - Thermal-electrochemical parametrisation of a lithium-ion battery: mapping Li - concentration and temperature dependencies. Journal of The Electrochemical - Society, ():, 2021. doi:. + Thermal-electrochemical parameters of a high energy lithium-ion cylindrical battery. Electrochimica Acta, 425: 140700, 2022. doi: 10.1016/j.electacta.2022.140700. * Prada2013 : - Chang-Hui Chen, Ferran Brosa Planella, Kieran O'Regan, Dominika Gastol, W. Dhammika Widanage, and Emma Kendrick. Development of Experimental Techniques @@ -230,15 +228,15 @@ "citation": "Xu2019", } -ORegan2021 = { +ORegan2022 = { "chemistry": "lithium_ion", - "cell": "LGM50_ORegan2021", - "negative electrode": "graphite_ORegan2021", - "separator": "separator_ORegan2021", - "positive electrode": "nmc_ORegan2021", + "cell": "LGM50_ORegan2022", + "negative electrode": "graphite_ORegan2022", + "separator": "separator_ORegan2022", + "positive electrode": "nmc_ORegan2022", "electrolyte": "lipf6_EC_EMC_3_7_Landesfeind2019", - "experiment": "1C_discharge_from_full_ORegan2021", - "citation": ["ORegan2021", "Chen2020"], + "experiment": "1C_discharge_from_full_ORegan2022", + "citation": ["ORegan2022", "Chen2020"], } # diff --git a/tests/unit/test_citations.py b/tests/unit/test_citations.py index 8da8283eca..a084352ef1 100644 --- a/tests/unit/test_citations.py +++ b/tests/unit/test_citations.py @@ -258,8 +258,8 @@ def test_parameter_citations(self): self.assertIn("Richardson2020", citations._papers_to_cite) citations._reset() - pybamm.ParameterValues("ORegan2021") - self.assertIn("ORegan2021", citations._papers_to_cite) + pybamm.ParameterValues("ORegan2022") + self.assertIn("ORegan2022", citations._papers_to_cite) def test_solver_citations(self): # Test that solving each solver adds the right citations diff --git a/tests/unit/test_parameters/test_parameter_sets/test_LGM50_ORegan2021.py b/tests/unit/test_parameters/test_parameter_sets/test_LGM50_ORegan2022.py similarity index 80% rename from tests/unit/test_parameters/test_parameter_sets/test_LGM50_ORegan2021.py rename to tests/unit/test_parameters/test_parameter_sets/test_LGM50_ORegan2022.py index dc5f8a0416..fd86f6159e 100644 --- a/tests/unit/test_parameters/test_parameter_sets/test_LGM50_ORegan2021.py +++ b/tests/unit/test_parameters/test_parameter_sets/test_LGM50_ORegan2022.py @@ -6,28 +6,28 @@ import os -class TestORegan2021(unittest.TestCase): +class TestORegan2022(unittest.TestCase): def test_load_params(self): negative_electrode = pybamm.ParameterValues({}).read_parameters_csv( pybamm.get_parameters_filepath( - "input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2021/" + "input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/" "parameters.csv" ) ) self.assertEqual( negative_electrode["Negative electrode diffusivity [m2.s-1]"], - "[function]graphite_LGM50_diffusivity_ORegan2021", + "[function]graphite_LGM50_diffusivity_ORegan2022", ) positive_electrode = pybamm.ParameterValues({}).read_parameters_csv( pybamm.get_parameters_filepath( - "input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/" + "input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/" "parameters.csv" ) ) self.assertEqual( positive_electrode["Positive electrode conductivity [S.m-1]"], - "[function]nmc_LGM50_electronic_conductivity_ORegan2021", + "[function]nmc_LGM50_electronic_conductivity_ORegan2022", ) electrolyte = pybamm.ParameterValues({}).read_parameters_csv( @@ -42,7 +42,7 @@ def test_load_params(self): cell = pybamm.ParameterValues({}).read_parameters_csv( pybamm.get_parameters_filepath( - "input/parameters/lithium_ion/cells/LGM50_ORegan2021/parameters.csv" + "input/parameters/lithium_ion/cells/LGM50_ORegan2022/parameters.csv" ) ) self.assertEqual( @@ -52,24 +52,24 @@ def test_load_params(self): def test_functions(self): root = pybamm.root_dir() - param = pybamm.ParameterValues("ORegan2021") + param = pybamm.ParameterValues("ORegan2022") T = pybamm.Scalar(298.15) # Positive electrode - p = "pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2021/" + p = "pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/" k_path = os.path.join(root, p) fun_test = { - "nmc_LGM50_entropic_change_ORegan2021.py": ([0.5], -9.7940e-07), - "nmc_LGM50_heat_capacity_ORegan2021.py": ([298.15], 902.6502), - "nmc_LGM50_diffusivity_ORegan2021.py": ([0.5, 298.15], 7.2627e-15), - "nmc_LGM50_electrolyte_exchange_current_density_ORegan2021.py": ( + "nmc_LGM50_entropic_change_ORegan2022.py": ([0.5], -9.7940e-07), + "nmc_LGM50_heat_capacity_ORegan2022.py": ([298.15], 902.6502), + "nmc_LGM50_diffusivity_ORegan2022.py": ([0.5, 298.15], 7.2627e-15), + "nmc_LGM50_electrolyte_exchange_current_density_ORegan2022.py": ( [1e3, 1e4, 298.15], 2.1939, ), "nmc_LGM50_ocp_Chen2020.py": ([0.5], 3.9720), - "nmc_LGM50_electronic_conductivity_ORegan2021.py": ([298.15], 0.8473), - "nmc_LGM50_thermal_conductivity_ORegan2021.py": ([T], 0.8047), + "nmc_LGM50_electronic_conductivity_ORegan2022.py": ([298.15], 0.8473), + "nmc_LGM50_thermal_conductivity_ORegan2022.py": ([T], 0.8047), } for name, value in fun_test.items(): @@ -79,20 +79,20 @@ def test_functions(self): # Negative electrode p = ( "pybamm/input/parameters/lithium_ion/negative_electrodes/" - "graphite_ORegan2021/" + "graphite_ORegan2022/" ) k_path = os.path.join(root, p) fun_test = { - "graphite_LGM50_entropic_change_ORegan2021.py": ([0.5], -2.6460e-07), - "graphite_LGM50_heat_capacity_ORegan2021.py": ([298.15], 847.7155), - "graphite_LGM50_diffusivity_ORegan2021.py": ([0.5, 298.15], 2.8655e-16), - "graphite_LGM50_electrolyte_exchange_current_density_ORegan2021.py": ( + "graphite_LGM50_entropic_change_ORegan2022.py": ([0.5], -2.6460e-07), + "graphite_LGM50_heat_capacity_ORegan2022.py": ([298.15], 847.7155), + "graphite_LGM50_diffusivity_ORegan2022.py": ([0.5, 298.15], 2.8655e-16), + "graphite_LGM50_electrolyte_exchange_current_density_ORegan2022.py": ( [1e3, 1e4, 298.15], 1.0372, ), "graphite_LGM50_ocp_Chen2020.py": ([0.5], 0.1331), - "graphite_LGM50_thermal_conductivity_ORegan2021.py": ([T], 3.7695), + "graphite_LGM50_thermal_conductivity_ORegan2022.py": ([T], 3.7695), } for name, value in fun_test.items(): @@ -100,7 +100,7 @@ def test_functions(self): self.assertAlmostEqual(param.evaluate(fun(*value[0])), value[1], places=4) # Cells - p = "pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2021/" + p = "pybamm/input/parameters/lithium_ion/cells/LGM50_ORegan2022/" k_path = os.path.join(root, p) fun_test = { @@ -114,11 +114,11 @@ def test_functions(self): self.assertAlmostEqual(param.evaluate(fun(*value[0])), value[1], places=4) # Separator - p = "pybamm/input/parameters/lithium_ion/separators/separator_ORegan2021/" + p = "pybamm/input/parameters/lithium_ion/separators/separator_ORegan2022/" k_path = os.path.join(root, p) fun_test = { - "separator_LGM50_heat_capacity_ORegan2021.py": ([298.15], 1130.9656), + "separator_LGM50_heat_capacity_ORegan2022.py": ([298.15], 1130.9656), } for name, value in fun_test.items(): @@ -127,7 +127,7 @@ def test_functions(self): def test_standard_lithium_parameters(self): - parameter_values = pybamm.ParameterValues("ORegan2021") + parameter_values = pybamm.ParameterValues("ORegan2022") model = pybamm.lithium_ion.DFN() sim = pybamm.Simulation(model, parameter_values=parameter_values) From a2cbd1091cc06be0e318ce14e1a5f37dc51c7297 Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Mon, 25 Jul 2022 15:17:16 +0100 Subject: [PATCH 06/14] flake8 --- ...e_LGM50_electrolyte_exchange_current_density_ORegan2022.py | 4 +++- .../graphite_LGM50_thermal_conductivity_ORegan2022.py | 2 +- ...c_LGM50_electrolyte_exchange_current_density_ORegan2022.py | 4 +++- pybamm/parameters/parameter_sets.py | 4 +++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_electrolyte_exchange_current_density_ORegan2022.py b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_electrolyte_exchange_current_density_ORegan2022.py index b458ac1153..c66639eef6 100644 --- a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_electrolyte_exchange_current_density_ORegan2022.py +++ b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_electrolyte_exchange_current_density_ORegan2022.py @@ -1,7 +1,9 @@ from pybamm import exp, constants, Parameter -def graphite_LGM50_electrolyte_exchange_current_density_ORegan2022(c_e, c_s_surf, c_s_max, T): +def graphite_LGM50_electrolyte_exchange_current_density_ORegan2022( + c_e, c_s_surf, c_s_max, T +): """ Exchange-current density for Butler-Volmer reactions between graphite and LiPF6 in EC:DMC. diff --git a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_thermal_conductivity_ORegan2022.py b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_thermal_conductivity_ORegan2022.py index 3552b779b7..23eb73a0f0 100644 --- a/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_thermal_conductivity_ORegan2022.py +++ b/pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_ORegan2022/graphite_LGM50_thermal_conductivity_ORegan2022.py @@ -8,7 +8,7 @@ def graphite_LGM50_thermal_conductivity_ORegan2022(T): .. [1] Kieran O’Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma Kendrick. "Thermal-electrochemical parameters of a high energy lithium-ion cylindrical battery." Electrochimica Acta 425 (2022): 140700 - + Parameters ---------- T: :class:`pybamm.Symbol` diff --git a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_electrolyte_exchange_current_density_ORegan2022.py b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_electrolyte_exchange_current_density_ORegan2022.py index 02a8615721..86612c32ae 100644 --- a/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_electrolyte_exchange_current_density_ORegan2022.py +++ b/pybamm/input/parameters/lithium_ion/positive_electrodes/nmc_ORegan2022/nmc_LGM50_electrolyte_exchange_current_density_ORegan2022.py @@ -1,7 +1,9 @@ from pybamm import exp, constants, Parameter -def nmc_LGM50_electrolyte_exchange_current_density_ORegan2022(c_e, c_s_surf, c_s_max, T): +def nmc_LGM50_electrolyte_exchange_current_density_ORegan2022( + c_e, c_s_surf, c_s_max, T +): """ Exchange-current density for Butler-Volmer reactions between NMC and LiPF6 in EC:DMC. diff --git a/pybamm/parameters/parameter_sets.py b/pybamm/parameters/parameter_sets.py index 364fe5ba6c..4ddad8b194 100644 --- a/pybamm/parameters/parameter_sets.py +++ b/pybamm/parameters/parameter_sets.py @@ -82,7 +82,9 @@ for Parameterization of Multi-scale Lithium-ion Battery Models. Journal of The Electrochemical Society, 167(8):080534, 2020. doi:10.1149/1945-7111/ab9050. - Kieran O'Regan, Ferran Brosa Planella, W. Dhammika Widanage, and Emma Kendrick. - Thermal-electrochemical parameters of a high energy lithium-ion cylindrical battery. Electrochimica Acta, 425: 140700, 2022. doi: 10.1016/j.electacta.2022.140700. + Thermal-electrochemical parameters of a high energy lithium-ion cylindrical + battery. Electrochimica Acta, 425: 140700, 2022. + doi: 10.1016/j.electacta.2022.140700. * Prada2013 : - Chang-Hui Chen, Ferran Brosa Planella, Kieran O'Regan, Dominika Gastol, W. Dhammika Widanage, and Emma Kendrick. Development of Experimental Techniques From 19ee4e9512e717af028587c744552906e4a3b4c5 Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Tue, 26 Jul 2022 09:25:08 +0100 Subject: [PATCH 07/14] add option for x-average side reactions --- pybamm/models/full_battery_models/base_battery_model.py | 8 ++++++++ .../lithium_ion/base_lithium_ion_model.py | 6 ++++-- pybamm/models/full_battery_models/lithium_ion/spm.py | 8 +++++--- pybamm/models/full_battery_models/lithium_ion/spme.py | 8 +++++--- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/pybamm/models/full_battery_models/base_battery_model.py b/pybamm/models/full_battery_models/base_battery_model.py index 415bc2d0d3..491ee03322 100644 --- a/pybamm/models/full_battery_models/base_battery_model.py +++ b/pybamm/models/full_battery_models/base_battery_model.py @@ -68,6 +68,9 @@ class BatteryModelOptions(pybamm.FuzzyDict): * "lithium plating" : str Sets the model for lithium plating. Can be "none" (default), "reversible", "partially reversible", or "irreversible". + * "lithium plating porosity change" : str + Whether to include porosity change due to lithium plating, can be + "false" (default) or "true". * "loss of active material" : str Sets the model for loss of active material. Can be "none" (default), "stress-driven", "reaction-driven", or "stress and reaction-driven". @@ -166,6 +169,10 @@ class BatteryModelOptions(pybamm.FuzzyDict): Which electrode(s) intercalates and which is counter. If "both" (default), the model is a standard battery. Otherwise can be "negative" or "positive" to indicate a half-cell model. + * "x-average side reactions": str + Whether to average the side reactions (SEI growth, lithium plating and + the respective porosity change) over the x-axis in Single Particle + Models, can be "false" (default) or "true". **Extends:** :class:`dict` """ @@ -248,6 +255,7 @@ def __init__(self, extra_options): "thermal": ["isothermal", "lumped", "x-lumped", "x-full"], "total interfacial current density as a state": ["false", "true"], "working electrode": ["both", "negative", "positive"], + "x-average side reactions": ["false", "true"], } default_options = { diff --git a/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py b/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py index 90476675d3..cc91f46ced 100644 --- a/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py +++ b/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py @@ -227,6 +227,8 @@ def set_open_circuit_potential_submodel(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" @@ -246,7 +248,7 @@ def set_lithium_plating_submodel(self): ) else: self.submodels["lithium plating"] = pybamm.lithium_plating.Plating( - self.param, False, self.options + self.param, self.x_average, self.options ) def set_total_kinetics_submodel(self): @@ -297,7 +299,7 @@ def set_porosity_submodel(self): or self.options["lithium plating porosity change"] == "true" ): self.submodels["porosity"] = pybamm.porosity.ReactionDriven( - self.param, self.options, False + self.param, self.options, self.x_average ) def set_li_metal_counter_electrode_submodels(self): diff --git a/pybamm/models/full_battery_models/lithium_ion/spm.py b/pybamm/models/full_battery_models/lithium_ion/spm.py index bf15390dd4..22939f9185 100644 --- a/pybamm/models/full_battery_models/lithium_ion/spm.py +++ b/pybamm/models/full_battery_models/lithium_ion/spm.py @@ -45,9 +45,11 @@ def __init__(self, options=None, name="Single Particle Model", build=True): if kinetics is not None and surface_form is None: options["surface form"] = "algebraic" - # For degradation models we use the "x-average" form since this is a - # reduced-order model with uniform current density in the electrodes - self.x_average = True + # Set self.x_average based on "x-average side reactions" + if options.get("x-average side reactions") == "true": + self.x_average = True + else: + self.x_average = False super().__init__(options, name) diff --git a/pybamm/models/full_battery_models/lithium_ion/spme.py b/pybamm/models/full_battery_models/lithium_ion/spme.py index 4990ee28ff..a4cd33713d 100644 --- a/pybamm/models/full_battery_models/lithium_ion/spme.py +++ b/pybamm/models/full_battery_models/lithium_ion/spme.py @@ -41,9 +41,11 @@ class SPMe(SPM): def __init__( self, options=None, name="Single Particle Model with electrolyte", build=True ): - # For degradation models we use the "x-average" form since this is a - # reduced-order model with uniform current density in the electrodes - self.x_average = True + # # Set self.x_average based on "x-average side reactions" + # if options.get("x-average side reactions") == "true": + # self.x_average = True + # else: + # self.x_average = False # Initialize with the SPM super().__init__(options, name, build) From c56bcfc78bafcc2ce8e3b09e46b5efc085bf47c0 Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Tue, 26 Jul 2022 10:05:56 +0100 Subject: [PATCH 08/14] fix options test --- .../test_full_battery_models/test_base_battery_model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/test_models/test_full_battery_models/test_base_battery_model.py b/tests/unit/test_models/test_full_battery_models/test_base_battery_model.py index fe62d5a73b..e7e4f8a171 100644 --- a/tests/unit/test_models/test_full_battery_models/test_base_battery_model.py +++ b/tests/unit/test_models/test_full_battery_models/test_base_battery_model.py @@ -40,6 +40,7 @@ 'thermal': 'x-full' (possible: ['isothermal', 'lumped', 'x-lumped', 'x-full']) 'total interfacial current density as a state': 'false' (possible: ['false', 'true']) 'working electrode': 'both' (possible: ['both', 'negative', 'positive']) +'x-average side reactions': 'false' (possible: ['false', 'true']) 'external submodels': [] 'timescale': 'default' """ # noqa: E501 From 41531f2413af63583714b44596a65a17e41fe5f3 Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Tue, 26 Jul 2022 11:24:36 +0100 Subject: [PATCH 09/14] add tests x-average side reactions --- .../test_lithium_ion/test_spm.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py index 360b75c48f..9f571326e1 100644 --- a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py +++ b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py @@ -22,6 +22,21 @@ def test_kinetics_options(self): } with self.assertRaisesRegex(pybamm.OptionError, "Inverse kinetics"): pybamm.lithium_ion.SPM(options) + + def test_x_average_options(self): + # Check model with x-averaged side reactions + options = { + "lithium plating": "irreversible", + "lithium plating porosity change": "true", + "SEI": "ec reaction limited", + "SEI porosity change": "true", + "x-average side reactions": "true", + } + self.check_well_posedness(options) + + # Check model with distributed side reactions + options["x-average side reactions"] = "false" + self.check_well_posedness(options) def test_new_model(self): model = pybamm.lithium_ion.SPM({"thermal": "x-full"}) From 7c0e2009729a9f327e9d905cb9879699e6e3fba9 Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Tue, 26 Jul 2022 11:27:29 +0100 Subject: [PATCH 10/14] flake8 --- .../test_full_battery_models/test_lithium_ion/test_spm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py index 9f571326e1..446ad285a9 100644 --- a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py +++ b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py @@ -22,7 +22,7 @@ def test_kinetics_options(self): } with self.assertRaisesRegex(pybamm.OptionError, "Inverse kinetics"): pybamm.lithium_ion.SPM(options) - + def test_x_average_options(self): # Check model with x-averaged side reactions options = { From de2d32180807fcc1d7921b92dc38d83e2c4d6ca8 Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Tue, 26 Jul 2022 12:41:10 +0100 Subject: [PATCH 11/14] x-average side reactions to occur only for side reactions --- .../lithium_ion/base_lithium_ion_model.py | 8 +++++--- pybamm/models/full_battery_models/lithium_ion/spm.py | 8 +++----- pybamm/models/full_battery_models/lithium_ion/spme.py | 8 +++----- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py b/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py index cc91f46ced..172e421e77 100644 --- a/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py +++ b/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py @@ -227,7 +227,7 @@ def set_open_circuit_potential_submodel(self): def set_sei_submodel(self): if self.half_cell: reaction_loc = "interface" - elif self.x_average: + elif self.x_average or self.options["x-average side reactions"] == "true": reaction_loc = "x-average" else: reaction_loc = "full electrode" @@ -247,8 +247,9 @@ def set_lithium_plating_submodel(self): self.param, self.options ) else: + x_average = (self.options["x-average side reactions"] == "true") self.submodels["lithium plating"] = pybamm.lithium_plating.Plating( - self.param, self.x_average, self.options + self.param, x_average, self.options ) def set_total_kinetics_submodel(self): @@ -298,8 +299,9 @@ def set_porosity_submodel(self): self.options["SEI porosity change"] == "true" or self.options["lithium plating porosity change"] == "true" ): + x_average = (self.options["x-average side reactions"] == "true") self.submodels["porosity"] = pybamm.porosity.ReactionDriven( - self.param, self.options, self.x_average + self.param, self.options, x_average ) def set_li_metal_counter_electrode_submodels(self): diff --git a/pybamm/models/full_battery_models/lithium_ion/spm.py b/pybamm/models/full_battery_models/lithium_ion/spm.py index 22939f9185..d1fcb41cc9 100644 --- a/pybamm/models/full_battery_models/lithium_ion/spm.py +++ b/pybamm/models/full_battery_models/lithium_ion/spm.py @@ -45,11 +45,9 @@ def __init__(self, options=None, name="Single Particle Model", build=True): if kinetics is not None and surface_form is None: options["surface form"] = "algebraic" - # Set self.x_average based on "x-average side reactions" - if options.get("x-average side reactions") == "true": - self.x_average = True - else: - self.x_average = False + # For degradation models we use the "x-average", note that for side reactions + # this is overwritten by "x-average side reactions" + self.x_average = True super().__init__(options, name) diff --git a/pybamm/models/full_battery_models/lithium_ion/spme.py b/pybamm/models/full_battery_models/lithium_ion/spme.py index a4cd33713d..6f4966a987 100644 --- a/pybamm/models/full_battery_models/lithium_ion/spme.py +++ b/pybamm/models/full_battery_models/lithium_ion/spme.py @@ -41,11 +41,9 @@ class SPMe(SPM): def __init__( self, options=None, name="Single Particle Model with electrolyte", build=True ): - # # Set self.x_average based on "x-average side reactions" - # if options.get("x-average side reactions") == "true": - # self.x_average = True - # else: - # self.x_average = False + # For degradation models we use the "x-average", note that for side reactions + # this is overwritten by "x-average side reactions" + self.x_average = True # Initialize with the SPM super().__init__(options, name, build) From f7966b539149ea9973a35954815200fe3a846644 Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Wed, 27 Jul 2022 09:38:31 +0100 Subject: [PATCH 12/14] #2098 make SPM default x-averaged side reactions --- .../models/full_battery_models/base_battery_model.py | 10 +++++++++- .../lithium_ion/base_lithium_ion_model.py | 2 +- pybamm/models/full_battery_models/lithium_ion/spm.py | 10 +++++++++- .../test_lithium_ion/test_spm.py | 5 +++-- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/pybamm/models/full_battery_models/base_battery_model.py b/pybamm/models/full_battery_models/base_battery_model.py index 491ee03322..2edd3efa8a 100644 --- a/pybamm/models/full_battery_models/base_battery_model.py +++ b/pybamm/models/full_battery_models/base_battery_model.py @@ -172,7 +172,8 @@ class BatteryModelOptions(pybamm.FuzzyDict): * "x-average side reactions": str Whether to average the side reactions (SEI growth, lithium plating and the respective porosity change) over the x-axis in Single Particle - Models, can be "false" (default) or "true". + Models, can be "false" or "true". Default is "false" for SPMe and + "true" for SPM. **Extends:** :class:`dict` """ @@ -657,6 +658,13 @@ def options(self, extra_options): options["electrolyte conductivity"] ) ) + if isinstance(self, pybamm.lithium_ion.SPM) and not isinstance( + self, pybamm.lithium_ion.SPMe + ): + if options["x-average side reactions"] == "false": + raise pybamm.OptionError( + "x-average side reactions cannot be 'false' for SPM models" + ) if isinstance(self, pybamm.lead_acid.BaseModel): if options["thermal"] != "isothermal" and options["dimensionality"] != 0: raise pybamm.OptionError( diff --git a/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py b/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py index 172e421e77..f1faae781f 100644 --- a/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py +++ b/pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py @@ -227,7 +227,7 @@ def set_open_circuit_potential_submodel(self): def set_sei_submodel(self): if self.half_cell: reaction_loc = "interface" - elif self.x_average or self.options["x-average side reactions"] == "true": + elif self.options["x-average side reactions"] == "true": reaction_loc = "x-average" else: reaction_loc = "full electrode" diff --git a/pybamm/models/full_battery_models/lithium_ion/spm.py b/pybamm/models/full_battery_models/lithium_ion/spm.py index d1fcb41cc9..62ea095b04 100644 --- a/pybamm/models/full_battery_models/lithium_ion/spm.py +++ b/pybamm/models/full_battery_models/lithium_ion/spm.py @@ -46,9 +46,17 @@ def __init__(self, options=None, name="Single Particle Model", build=True): options["surface form"] = "algebraic" # For degradation models we use the "x-average", note that for side reactions - # this is overwritten by "x-average side reactions" + # this is set by "x-average side reactions" self.x_average = True + # Set "x-average side reactions" to "true" if the model is SPM + x_average_side_reactions = options.get("x-average side reactions") + if ( + x_average_side_reactions is None + and self.__class__ == pybamm.lithium_ion.SPM + ): + options["x-average side reactions"] = "true" + super().__init__(options, name) self.set_submodels(build) diff --git a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py index 446ad285a9..e439c21f1b 100644 --- a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py +++ b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py @@ -34,9 +34,10 @@ def test_x_average_options(self): } self.check_well_posedness(options) - # Check model with distributed side reactions + # Check model with distributed side reactions throws an error options["x-average side reactions"] = "false" - self.check_well_posedness(options) + with self.assertRaisesRegex(pybamm.OptionError, "cannot be 'false' for SPM"): + pybamm.lithium_ion.SPM(options) def test_new_model(self): model = pybamm.lithium_ion.SPM({"thermal": "x-full"}) From 535bd143546e2da4fd817ad59eee2cf11b52cc94 Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Wed, 27 Jul 2022 10:01:38 +0100 Subject: [PATCH 13/14] #2098 fix MPM tests issue --- pybamm/models/full_battery_models/lithium_ion/spm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybamm/models/full_battery_models/lithium_ion/spm.py b/pybamm/models/full_battery_models/lithium_ion/spm.py index 62ea095b04..0696091cdd 100644 --- a/pybamm/models/full_battery_models/lithium_ion/spm.py +++ b/pybamm/models/full_battery_models/lithium_ion/spm.py @@ -53,7 +53,7 @@ def __init__(self, options=None, name="Single Particle Model", build=True): x_average_side_reactions = options.get("x-average side reactions") if ( x_average_side_reactions is None - and self.__class__ == pybamm.lithium_ion.SPM + and self.__class__ in [pybamm.lithium_ion.SPM, pybamm.lithium_ion.MPM] ): options["x-average side reactions"] = "true" From d7edf6f4e86caef7c42bc47335e390c18ee20c42 Mon Sep 17 00:00:00 2001 From: Ferran Brosa Planella Date: Wed, 27 Jul 2022 10:30:15 +0100 Subject: [PATCH 14/14] #2098 update CHANGELGO --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 888bbc700f..010df6a121 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Moved general code about submodels to `BaseModel` instead of `BaseBatteryModel`, making it easier to build custom models from submodels. ([#2169](https://github.com/pybamm-team/PyBaMM/pull/2169)) - Events can now be plotted as a regular variable (under the name "Event: event_name", e.g. "Event: Minimum voltage [V]") ([#2158](https://github.com/pybamm-team/PyBaMM/pull/2158)) +- SEI growth, lithium plating and porosity change can now be set to distributed in `SPMe`. There is an additional option called `x-average side reactions` which allows to set this (note that for `SPM` it is always x-averaged). ([#2099](https://github.com/pybamm-team/PyBaMM/pull/2099)) ## Optimizations