pybamm-team / liionpack

A battery pack simulation tool that uses the PyBaMM framework
https://liionpack.readthedocs.io/en/latest/
MIT License
83 stars 26 forks source link

allow for shorter time steps than 0.5 #283

Closed mleot closed 4 months ago

mleot commented 5 months ago

It is currently not possible to set timesteps shorter than 0.5 due to machine code precision for numbers smaller than 0.5, and the statement to ensure t is divisible by dt without a remainder.

This PR is suggesting to remove this statement, and allow for timesteps that are small than 0.5 seconds.

I added rounding statements to t and dt for the generation of the protocol, but I am unsure if this is nessesary.

TomTranter commented 4 months ago

Fixed by #289