Sliders not working - Getting started with PyBaMM

Hi,

It’s my first time using PyBaMM and I’m trying to follow along with the “Getting started with PyBaMM” video. The sim.plot() is working, but when moving the sliders, the plots do not change. What could be the cause of this? (I am using PyBaMM 25.8.0 with Python 3.10.0)

In the previous step sim = pybamm.Simulation(model), I am also getting the following warning:

UserWarning: The default solver changed to IDAKLUSolver after the v25.4.0. release. You can swap back to the previous default by using `pybamm.CasadiSolver()` instead.
self._solver = solver or self._model.default_solver

Any help would be appreciated!

Hi Emma,

The sliders work for variables that depend on electrode thickness (x). In other words, the plots will only change for variables with x-dependency. If a variable depends only on time (with no x-dependency), the sliders will not affect it. This is because the slider essentially controls time, and is meant to show how a variable evolves along x as time progresses.

Regarding your second question, you don’t need to worry about the warning. It’s simply indicating which solver is being used, since no solver was explicitly specified in pybamm.Simulation().

I hope this clarifies things.

Best regards,
Sunil

Hi Sunil,

Thanks for your explanation. It seems that six out of the eight plots in the intro video are dependent on electrode thickness, so these should change when using the slider. Are there maybe any additional dependencies that I need to install? So far, I only installed matplotlib.