Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add standard variables to Thevenin() class #3143

Merged
merged 5 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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