Skip to content

Commit

Permalink
Merge pull request #3143 from BradyPlanden/thevenin
Browse files Browse the repository at this point in the history
Add standard variables to Thevenin() class
  • Loading branch information
rtimms committed Jul 12, 2023
2 parents 5b367a0 + 9f2505e commit a17a5f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]` ([#3143](https://github.com/pybamm-team/PyBaMM/pull/3143))

# [v23.5](https://github.com/pybamm-team/PyBaMM/tree/v23.5) - 2023-06-18

Expand Down
11 changes: 11 additions & 0 deletions pybamm/models/full_battery_models/equivalent_circuit/thevenin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -192,6 +193,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()
Expand Down

0 comments on commit a17a5f1

Please sign in to comment.