Skip to content

Commit

Permalink
#4224 default C-rate duration
Browse files Browse the repository at this point in the history
  • Loading branch information
rtimms committed Jun 28, 2024
1 parent e22d10c commit 0f1d770
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pybamm/experiment/step/base_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,16 @@ def default_duration(self, value):
if isinstance(value, np.ndarray):
t = value[:, 0]
return t[-1]
elif isinstance(self, pybamm.step.CRate):
# Current control: max simulation time: 3h / C-rate
return 3 / abs(value) * 3600
elif isinstance(self, pybamm.step.Current):
# Doesn't work as this needs to return a float
return (
3
/ (abs(value) / pybamm.Parameter("Nominal cell capacity [A.h]"))
* 3600
)
else:
return 24 * 3600 # 24 hours in seconds

Expand Down

0 comments on commit 0f1d770

Please sign in to comment.