There is a newer version of the record available.

Published August 4, 2025 | Version v25.8.0
Software Open

Python Battery Mathematical Modelling (PyBaMM)

Description

Features

  • Added plot_3d_cross_section & plot_3d_heatmap functions to support plotting for 3D thermal simulations. (#5130)
  • Added a Basic3DThermalSPM with two way coupling. (#5112)
  • Enables the passing of inputs throughout set_initial_soc. (#5122)
  • Adds on_failure option to BaseSolver with options for "warn", "ignore", and "raise" to change behaviour on solver failure. Defaults to "raise" to retain historic functionality. (#5105)
  • Creates a boundary mesh size object that returns the distance from the center of the leftmost/rightmost control volume to the boundary of the domain (#5108)
  • Introduced entry points for models, similar to parameter sets, and moved entry point handling to pybamm.dispatch.entry_points. There is now experimental support for loading third-party models outside of the PyBaMM framework via pybamm.Model("model_name"). This API is currently unstable until further notice and may be subject to change without warning. (#4490)
  • Allow for overriding the spatial method's extrapolation and for using constant extrapolation of boundary values (#5107)
  • Creates BaseProcessedVariable to enable object combination when adding solutions together (#5076)
  • Added a Constant symbol for named constants. This is a subclass of Scalar and is used to represent named constants such as the gas constant. This avoids constants being simplified out when constructing expressions. (#5070)
  • Generalise pybamm.DiscreteTimeSum to allow it to be embedded in other expressions (#5044)
  • Adds all key-value pair to output_variables sensitivity dictionaries, accessible through solution[var].sensitivities['all']. Aligns shape with conventional solution sensitivities object. (#5067)
  • Added a new BaseHysteresisOpenCircuitPotential class that sets variables for the lithiation and delithiation OCP and the hysteresis voltage (H = U_lith - U_delith). Allow the initial hysteresis state to be a function of position through the electrode. Allow the hysteresis decay rates of the Axen and Wycisk models to be a function of stoichiometry and temperature. Added a heat source term in each active material phase Q_hys = i_vol * (U - U_eq) where i_vol is the volumetric interfacial current density, U is the OCP (i.e. includes hysteresis), and U_eq is the "equilibrium OCP". Renamed the open-circuit potential models to be more descriptive. The options "Axen" and "Wycisk" are now "one-state hysteresis" and "one-state differential capacity hysteresis". The old option names still work but will raise a warning. (#4893)
  • Add support for output_variables to pybamm.DiscreteTimeSum and pybamm.ExplicitTimeIntegral expressions. (#5071)
  • Added 3D FEM and meshes supporting rectangular and cylindrical geometries (#5009)

Bug fixes

  • Fix non-deterministic ShapeError in 3D FEM gradient method (#5143)
  • Fixes negative electrode boundary values for half-cell voltage contributions. (#5139)
  • Makes A_cc L_z * L_y * number of layers (#5138)
  • Fixes TimeIntegral expression node summation when dependent on an input parameter. (#5119)
  • Fixed a bug that ignored the default duration of drive cycles for CRate steps and a bug that overwrote custom period arguments for drive cycles. (#5090)
  • Converts sensitivities to numpy objects, fixing bug in DiscreteTimeSum sensitivity calculation (#5037)
  • Raises error if pybamm.Interpolant given 1D x values that are not strictly increasing (#5061)
  • Fixes inconsistency of the returned shape of a pybamm.DiscreteTimeSum variable depending on output_variables being set or not. (#5098)
  • Fixed a bug where simplifications cause heavisides to evaluate as booleans (#4893)
  • Fixed a bug in the WyciskOpenCircuitPotential model where the differential capacity was not being evaluated correctly. (#4893)

Breaking changes

  • Changed behavior of drive cycle steps in pybamm.Experiments to treat each time point as a discontinuity, consistent with how input interpolants work. This ensures more accurate simulation of drive cycles with rapid changes. (#5141)
  • Removed the IREE code from the IDAKLU solver (#5080)
  • Removed support for Python 3.9 (#5052)
  • In OCP hysteresis models, users need to explicitly give the equilibrium, delithiation, and lithiation OCPs when using a hysteresis model. E.g., you must provide all three of "Negative electrode OCP [V]", "Negative electrode delithiation OCP [V]", and "Negative electrode lithiation OCP [V]". (#4893)

Notes

If you use PyBaMM, please cite it as below.

Files

pybamm-team/PyBaMM-v25.8.0.zip

Files (8.9 MB)

Name Size Download all
md5:599da641b0b0f2e6281ff847df5a0964
8.9 MB Preview Download

Additional details

Related works