-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
[Bug]: [24.5rc0] Simulations with pybamm.Experiment
terminate after 24 h
#4224
Comments
Hi, @ejfdickinson – looks like a duplicate of #4155? |
@agriyakhetarpal Yes, it is. v24.1 does not do this, so it should be in your release notes for v24.5rc0. Any recommendations on how to work around? |
@ejfdickinson you can include a duration in the experiment step, e.g., experiment = pybamm.Experiment(
[
"Discharge at 0.01C for 100 hours or until 2.5 V",
]
) and it won't cut off at 24 hours. |
Thanks @MarcBerliner ! |
I think we should mark this as a breaking change, @valentinsulzer? |
IMO we should fix this before 24.5 proper. I don't know what logic changed or if there was a longer default before. Update: the logic used to be if op_conds.type == "current":
# Current control: max simulation time: 3h / C-rate
Crate = op_conds.value / capacity
dt = 3 / abs(Crate) * 3600 # seconds
else:
# max simulation time: 1 day
dt = 24 * 3600 # seconds |
Alternatively, should we require a duration to avoid unexpected behaviour? |
Why did we move away from that logic? As in, if we bring it back will it break anything? |
It got moved to the |
@rtimms For our use cases, a maximum duration would be fine, so long as it's declared on simulation exit like a |
Should be fixed by #4239 . @ejfdickinson and @aabills can you make sure it works for your use case? Then can @kratman or @agriyakhetarpal cherry pick this into 24.5? Thanks |
* make longer default duration and calculate it for C-rate * add tests * typo * pybamm-team#4224 add warning for time termination and add abs * fix tests * pybamm-team#4224 keep non-C-rate default at 24h for performance reasons * trying to fix experiment * fix example * pybamm-team#4224 eric comments * fix bug
PyBaMM Version
24.5rc0
Python Version
3.9.13
Describe the bug
Simulations using
pybamm.Experiment
with a voltage cut-off only appear to terminate with a time cut-off after 24 h.I'm afraid I haven't had time to get into logs to figure out why this is happening!
Steps to Reproduce
The following simulation should proceed for approximately 100 h = 360000 s, until the specified voltage cut-off. However, it terminates after 24 h.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: