Skip to content

Releases: pybamm-team/PyBaMM

v25.8.0

04 Aug 18:56
1b00b5a
Compare
Choose a tag to compare

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)

v25.6.0

27 May 17:35
6bb07fc
Compare
Choose a tag to compare

Features

  • Renamed MSMR parameters from symbols to written out names with units as a non-breaking change with a deprecation warning. (#5027)

Optimizations

  • Update docs, examples and tests to use IDAKLUSolver. (#4996)
  • Add a solver option to change on_extrapolation behavior to "error", "warn", or "ignore" on extrapolation events. (#4993)
  • Improve reliability of CasadiAlgebraicSolver and added an option for the step_tol of the Newton iteration. (#4985)
  • Speed up calculation of variable sensitivities in ProcessedVariable (#5000)

Bug fixes

  • Fixed a bug in the QuickPlot which would return empty values for 1D variables at the beginning and end of a timespan. (#4991)
  • Fixed a bug in the Exponential1DSubMesh where the mesh was not being created correctly for non-zero minimum values. (#4989)
  • Fixed sensitivity calculation for pybamm.DiscreteTimeSum. (#5007)

Breaking changes

  • Remove sensitivity functionality for Casadi and Scipy solvers, only pybamm.IDAKLU solver can calculate sensitivities. (#4975)

v25.4.2

17 Apr 21:08
6c615f7
Compare
Choose a tag to compare

Bug fixes

  • Improve reliability of AlgebraicSolver and change ElectrodeSOHHalfCell solver to a Trust-Region method. (#4982)

v25.4.1

16 Apr 21:03
abdef68
Compare
Choose a tag to compare

Bug fixes

  • Remove a regularization term in the harmonic mean. (#4977)

Breaking changes

  • Changed default solver to pybamm.IDAKLUSolver. (#4915)

v25.4.0

02 Apr 13:51
a2a0330
Compare
Choose a tag to compare

Features

  • Revision of the hysteresis notebook to include the method implemented in the module axen_ocp. (#4880)
  • Added axen_ocp module within submodel interface.open_circuit_potential to handle an OCP with hysteresis. (#4816)
  • Creates a 'calc_esoh' property in battery models (#4825)
  • Added 'get_summary_variables' to return dictionary of computed summary variables (#4824)
  • Added support for particle size distributions combined with particle mechanics. (#4807)
  • Added InputParameter support in PyBamm experiments (#4826)
  • Added support for the "pchip" interpolator using the CasADI backend. (#4871)

Breaking changes

  • Added skip_ok option to step to allow for steps to be skipped if they are infeasible at initial conditions. (#4839)
  • Deprecated CrateTermination and renamed it to CRateTermination. (#4834)

Bug fixes

  • Fixed a bug with observing the outputs of 2D FEM simulations. (#4912)
  • Fixed a bug in simulating FEM models with the IDAKLUSolver. (#4879)
  • Moved concentration inside x-averaged when calculating LLI due to LAM variables (#4858)
  • Fixed a bug that caused the variable "Loss of lithium due to {domain} lithium plating"to have the domain "current collector" (should not have any domain at all) if the "x-average side reactions" option was set to "true". (#4844)
  • Fixed interpolation bug in pybamm.QuickPlot with spatial variables. (#4841)

Optimizations

  • Performance improvements to IDAKLUSolver initialization and processed variables. (#4878)
  • Improved search to handle cases with shorter input strings and provide more relevant results. (#4735)

v25.1.1

21 Jan 18:14
817ac83
Compare
Choose a tag to compare

Features

  • Added Operators to current and voltage termination events. (#4770)

Bug fixes

  • Fixed a bug which caused the ec-reaction limited SEI model to give
    incorrect results (#4774)

v25.1.0

15 Jan 14:18
590fdfe
Compare
Choose a tag to compare

Features

  • Added a dt_min option to the (IDAKLUSolver). (#4736)
  • Automatically add state variables of the model to the output variables if they are not already present (#4700)
  • Enabled using SEI models with particle size distributions. (#4693)
  • Added symbolic mesh which allows for using InputParameters for geometric parameters (#4665)
  • Enhanced the search method to accept multiple search terms in the form of a string or a list. (#4650)
  • Made composite electrode model compatible with particle size distribution (#4687)
  • Added Symbol.post_order() method to return an iterable that steps through the tree in post-order fashion. (#4684)
  • Porosity change now works for composite electrode (#4417)
  • Added two more submodels (options) for the SEI: Lars von Kolzenberg (2020) model and Tunneling Limit model (#4394)

Breaking changes

  • Updated BPX to v0.5.0 and made changes for the switch to Pydantic V2 (#4701)
  • Summary variables now calculated only when called, accessed via a class in the same manner as other variables rather than a dictionary. (#4621)
  • The conda distribution (pybamm) now installs all optional dependencies available on conda-forge. Use the new pybamm-base conda
    package to install PyBaMM with only the required dependencies. (conda-forge/pybamm-feedstock#70)
  • Separated extrapolation options for pybamm.BoundaryValue and pybamm.BoundaryGradient, and updated the default to be "linear" for the value and "quadratic" for the gradient. (#4614)
  • Double-layer SEI models have been removed (with the corresponding parameters). All models assume now a single SEI layer. (#4470)
  • Moved the IDAKLU solver to a standalone pybammsolvers package. This will
    make PyBaMM a pure Python package and make installing and using the solver
    easier. (#4487)
  • Wycisk OCP model now requires an parameter to set the initial condition. (#4374)

Bug fixes

  • Fixed bug when using stoichiometry-dependent diffusivity with the DFN model with a particle size distribution. (#4726)
  • Remove internal use of deprecated set_parameters function in the Simulation class which caused warnings. (#4638)
  • Provide default value for Symbol.mesh attribute to avoid errors when adding variables after discretisation. (#4644)

v24.11.2

27 Nov 19:35
f73e056
Compare
Choose a tag to compare

Bug fixes

  • Reverted modifications to quickplot from #4529 which caused issues with the plots displaying correct variable names. (#4622)

v24.11.1

23 Nov 03:00
9d59593
Compare
Choose a tag to compare

Features

  • Modified quick_plot.plot to accept a list of times and generate superimposed graphs for specified time points. (#4529)

Bug Fixes

  • Added some dependencies which were left out of the pyproject.toml file (#4602)

v24.11.0

21 Nov 14:23
5b1ef70
Compare
Choose a tag to compare

Features

  • Added CoupledVariable which provides a placeholder variable whose equation can be elsewhere in the model. (#4556)
  • Adds support to pybamm.Experiment for the output_variables option in the IDAKLUSolver. (#4534)
  • Adds an option "voltage as a state" that can be "false" (default) or "true". If "true" adds an explicit algebraic equation for the voltage. (#4507)
  • Improved QuickPlot accuracy for simulations with Hermite interpolation. (#4483)
  • Added Hermite interpolation to the (IDAKLUSolver) that improves the accuracy and performance of post-processing variables. (#4464)
  • Added basic telemetry to record which functions are being run. See Telemetry section in the User Guide for more information. (#4441)
  • Added BasicDFN model for sodium-ion batteries (#4451)
  • Added sensitivity calculation support for pybamm.Simulation and pybamm.Experiment (#4415)
  • Added OpenMP parallelization to IDAKLU solver for lists of input parameters (#4449)
  • Added phase-dependent particle options to LAM (#4369)
  • Added a lithium ion equivalent circuit model with split open circuit voltages for each electrode (SplitOCVR). (#4330)
  • Added the pybamm.DiscreteTimeSum expression node to sum an expression over a sequence of data times, and accompanying pybamm.DiscreteTimeData class to store the data times and values (#4501)

Optimizations

  • Performance refactor of JAX BDF Solver with default Jax method set to "BDF". (#4456)
  • Improved performance of initialization and reinitialization of ODEs in the (IDAKLUSolver). (#4453)
  • Removed the start_step_offset setting and disabled minimum dt warnings for drive cycles with the (IDAKLUSolver). (#4416)

Bug Fixes

  • Added error for binary operators on two concatenations with different numbers of children. Previously, the extra children were dropped. Also fixed bug where Q_rxn was dropped from the total heating term in half-cell models. (#4562)
  • Fixed bug where Q_rxn was set to 0 for the negative electrode in half-cell models. (#4557)
  • Fixed bug in post-processing solutions with infeasible experiments using the (IDAKLUSolver). (#4541)
  • Disabled IREE on MacOS due to compatibility issues and added the CasADI
    path to the environment to resolve issues on MacOS and Linux. Windows
    users may still experience issues with interpolation. (#4528)
  • Added _from_json() functionality to Sign which was erroneously omitted previously. (#4517)
  • Fixed bug where IDAKLU solver failed when output variables were specified and an extrapolation event is present. (#4440)

Breaking changes

  • Deprecated pybamm.Simulation.set_parameters and pybamm.Simulation.set_up_and_parameterise_experiment functions in pybamm/simulation.py. (#3752)
  • Removed all instances of param = self.param and now directly access self.param across the codebase. This change simplifies parameter references and enhances readability. (#4484)
  • Removed the deprecation warning for the chemistry argument in
    pybamm.ParameterValues (#4466)
  • The parameters "... electrode OCP entropic change [V.K-1]" and "... electrode volume change" are now expected to be functions of stoichiometry only instead of functions of both stoichiometry and maximum concentration (#4427)
  • Renamed set_events function to add_events_from to better reflect its purpose. (#4421)