From c839dcd63b097f9c1c0c045bd370989e543be490 Mon Sep 17 00:00:00 2001 From: Brady Planden Date: Mon, 10 Jul 2023 21:25:35 +0100 Subject: [PATCH 1/4] Add time output variables --- .../full_battery_models/equivalent_circuit/thevenin.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pybamm/models/full_battery_models/equivalent_circuit/thevenin.py b/pybamm/models/full_battery_models/equivalent_circuit/thevenin.py index 2bd318fa7a..0227258b94 100644 --- a/pybamm/models/full_battery_models/equivalent_circuit/thevenin.py +++ b/pybamm/models/full_battery_models/equivalent_circuit/thevenin.py @@ -192,6 +192,16 @@ def set_submodels(self, build): if build: self.build_model() + def set_standard_output_variables(self): + # Time + self.variables.update( + { + "Time [s]": pybamm.t, + "Time [min]": pybamm.t / 60, + "Time [h]": pybamm.t / 3600, + } + ) + def build_model(self): # Build model variables and equations self._build_model() From c41abceaeea0ce11e6bd622fc8a1d9c75e161417 Mon Sep 17 00:00:00 2001 From: Brady Planden Date: Tue, 11 Jul 2023 20:01:47 +0100 Subject: [PATCH 2/4] Add standard variables + initialise --- .../models/full_battery_models/equivalent_circuit/thevenin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pybamm/models/full_battery_models/equivalent_circuit/thevenin.py b/pybamm/models/full_battery_models/equivalent_circuit/thevenin.py index 0227258b94..cc456c8765 100644 --- a/pybamm/models/full_battery_models/equivalent_circuit/thevenin.py +++ b/pybamm/models/full_battery_models/equivalent_circuit/thevenin.py @@ -68,6 +68,7 @@ def __init__( self.param = pybamm.EcmParameters() self.element_counter = 0 + self.set_standard_output_variables() self.set_submodels(build) def set_options(self, extra_options=None): @@ -193,7 +194,7 @@ def set_submodels(self, build): self.build_model() def set_standard_output_variables(self): - # Time + # Time self.variables.update( { "Time [s]": pybamm.t, From d54fdf4fbb2eee184415a47489f2d2b1a373c01f Mon Sep 17 00:00:00 2001 From: Brady Planden Date: Tue, 11 Jul 2023 20:08:29 +0100 Subject: [PATCH 3/4] Updt. Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31a1ddbca7..5f78bc9f8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Parameters in `Prada2013` have been updated to better match those given in the paper, which is a 2.3 Ah cell, instead of the mix-and-match with the 1.1 Ah cell from Lain2019. - Error generated when invalid parameter values are passed. +- Thevenin() model is now constructed with standard variables: `Time [s], Time [min], Time [h]`. # [v23.5](https://github.com/pybamm-team/PyBaMM/tree/v23.5) - 2023-06-18 From 9f2505efa26e885ab9a8ec4a85dab6c6ade05ce1 Mon Sep 17 00:00:00 2001 From: Brady Planden Date: Tue, 11 Jul 2023 20:23:48 +0100 Subject: [PATCH 4/4] Add PR # to changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f78bc9f8f..187a264223 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ - Parameters in `Prada2013` have been updated to better match those given in the paper, which is a 2.3 Ah cell, instead of the mix-and-match with the 1.1 Ah cell from Lain2019. - Error generated when invalid parameter values are passed. -- Thevenin() model is now constructed with standard variables: `Time [s], Time [min], Time [h]`. +- Thevenin() model is now constructed with standard variables: `Time [s], Time [min], Time [h]` ([#3143](https://github.com/pybamm-team/PyBaMM/pull/3143)) # [v23.5](https://github.com/pybamm-team/PyBaMM/tree/v23.5) - 2023-06-18