pybamm.BatchStudy is a convenience class for running comparative studies across multiple models, solvers, parameter sets, or experimental conditions.
Constructor
Dictionary of
name → model pairs. The models to simulate.Dictionary of experimental conditions keyed by name.
Dictionary of geometry overrides keyed by name.
Dictionary of
ParameterValues objects keyed by name.Dictionary of submesh-type dicts keyed by name.
Dictionary of
var_pts dicts keyed by name.Dictionary of spatial-method dicts keyed by name.
Dictionary of solver objects keyed by name.
Dictionary of variable lists for plotting, keyed by name.
Dictionary of C-rates for constant-current (dis)charge simulations, keyed by name.
Number of times each simulation is solved. The reported solve time is the average across repeats. Useful for benchmarking.
False(default): pair elements by position — first model with first solver, etc.True: run the full Cartesian product of models × solvers × experiments.
When
permutations=False, every provided dict must have the same number of entries as models, or a ValueError is raised.solve
self.sims. Parameters mirror pybamm.Simulation.solve.
plot
dynamic_plot comparing all simulations. Returns the QuickPlot instance.
create_gif
dynamic_plot across the solution time span.
Number of frames.
Duration (seconds) of each frame.
Output file path.
Accessing Results
After callingsolve(), the sims attribute holds the list of solved pybamm.Simulation objects: