Skip to content

Releases: pybamm-team/PyBaMM

v22.11

04 Dec 23:49
efd426c
Compare
Choose a tag to compare

Features

  • Updated parameter sets so that interpolants are created explicitly in the parameter set python file. This does not change functionality but allows finer control, e.g. specifying a "cubic" interpolator instead of the default "linear" (#2510)
  • Equivalent circuit models (#2478)
  • New Idaklu solver options for jacobian type and linear solver, support Sundials v6 (#2444)
  • Added scale and reference attributes to Variable objects, which can be use to make the ODE/DAE solver better conditioned (#2440)
  • SEI reactions can now be asymmetric (#2425)

Bug fixes

  • Switched from pkg_resources to importlib_metadata for handling entry points (#2500)
  • Fixed some bugs related to processing FunctionParameter to Interpolant (#2494)

Optimizations

  • ParameterValues now avoids trying to process children if a function parameter is an object that doesn't depend on its children (#2477)
  • Implemented memoization via cache and cached_property from functools (#2465)
  • Added more rules for simplifying expressions, especially around Concatenations. Also, meshes constructed from multiple domains are now cached (#2443)
  • Added more rules for simplifying expressions. Constants in binary operators are now moved to the left by default (e.g. x*2 returns 2*x) (#2424)

Breaking changes

  • Interpolants created from parameter data are now "linear" by default (was "cubic") (#2494)
  • Renamed entry point for parameter sets to pybamm_parameter_sets (#2475)
  • Removed code for generating ModelingToolkit problems (#2432)
  • Removed FirstOrder and Composite lead-acid models, and some submodels specific to those models (#2431)

v22.10

31 Oct 07:52
a5aca9c
Compare
Choose a tag to compare

Features

  • Third-party parameter sets can be added by registering entry points to pybamm_parameter_set (#2396)
  • Added three-dimensional interpolation (#2380)

Bug fixes

  • pybamm.have_julia() now checks that julia is properly configured (#2402)
  • For simulations with events that cause the simulation to stop early, the sensitivities could be evaluated incorrectly to zero (#2337)

Optimizations

  • Reformatted how simulations with experiments are built (#2395)
  • Added small perturbation to initial conditions for casadi solver. This seems to help the solver converge better in some cases (#2356)
  • Added ExplicitTimeIntegral functionality to move variables which do not appear anywhere on the rhs to a new location, and to integrate those variables explicitly when get is called by the solution object. (#2348)
  • Added more rules for simplifying expressions (#2211)
  • Sped up calculations of Electrode SOH variables for summary variables (#2210)

Breaking change

  • Removed pybamm.SymbolReplacer as it is no longer needed to set up simulations with experiments, which is the only place where it was being used (#2395)
  • Removed get_infinite_nested_dict, BaseModel.check_default_variables_dictionaries, and Discretisation.create_jacobian methods, which were not used by any other functionality in the repository (#2384)
  • Dropped support for Python 3.7 after the release of Numpy v1.22.0 (#2379)
  • Removed parameter cli tools (add/edit/remove parameters). Parameter sets can now more easily be added via python scripts. (#2342)
  • Parameter sets should now be provided as single python files containing all parameters and functions. Parameters provided as "data" (e.g. OCP vs SOC) can still be csv files, but must be either in the same folder as the parameter file or in a subfolder called "data/". See for example Ai2020 (#2342)

v22.9

29 Sep 17:26
a1091ec
Compare
Choose a tag to compare

Features

  • Added function pybamm.get_git_commit_info(), which returns information about the last git commit, useful for reproducibility (#2293)
  • Added SEI model for composite electrodes (#2290)
  • For experiments, the simulation now automatically checks and skips steps that cannot be performed (e.g. "Charge at 1C until 4.2V" from 100% SOC) (#2212)

Bug fixes

  • Arrhenius function for nmc_OKane2022 positive electrode actually gets used now (#2309)
  • Added SEI on cracks to loop over all interfacial reactions (#2262)
  • Fixed X-averaged SEI on cracks concentration so it's an average over x only, not y and z (#2262)
  • Corrected initial state for SEI on cracks (#2262)

Optimizations

  • Default options for particle mechanics now dealt with differently in each electrode (#2262)
  • Sped up calculations of Electrode SOH variables for summary variables (#2210)

Breaking changes

  • When creating a pybamm.Interpolant the default interpolator is now "linear". Passing data directly to ParameterValues using the [data] tag will be still used to create a cubic spline interpolant, as before (#2258)
  • Events must now be defined in such a way that they are positive at the initial conditions (events will be triggered when they become negative, instead of when they change sign in either direction) (#2212)

v22.8

30 Aug 15:33
1f01c1e
Compare
Choose a tag to compare

Features

  • Added CurrentSigmoidOpenCircuitPotential model to model voltage hysteresis for charge/discharge (#2256)
  • Added "Chen2020_composite" parameter set for a composite graphite/silicon electrode. (#2256)
  • Added new cumulative variables Throughput capacity [A.h] and Throughput energy [W.h] to standard variables and summary variables, to assist with degradation studies. Throughput variables are only calculated if calculate discharge energy is set to true. Time [s] and Time [h] also added to summary variables. (#2249)
  • Added lipf6_OKane2022 electrolyte to OKane2022 parameter set (#2249)
  • Reformated submodel structure to allow composite electrodes. Composite positive electrode is now also possible. With current implementation, electrodes can have at most two phases. (#2248)

Bug fixes

  • Added new parameter Ratio of lithium moles to SEI moles (short name z_sei) to fix a bug where this number was incorrectly hardcoded to 1. (#2222)
  • Changed short name of parameter Inner SEI reaction proportion from alpha_SEI to inner_sei_proportion, to avoid confusion with transfer coefficients. (#2222)
  • Deleted legacy parameters with short names beta_sei and beta_plating. (#2222)
  • Corrected initial SEI thickness for OKane2022 parameter set. (#2218)

Optimizations

  • Simplified scaling for the exchange-current density. The dimensionless parameter C_r is kept, but no longer used anywhere (#2238)
  • Added limits for variables in some functions to avoid division by zero, sqrt(negative number), etc (#2213)

Breaking changes

  • Parameters specific to a (primary/secondary) phase in a domain are doubly nested. e.g. param.c_n_max is now param.n.prim.c_max (#2248)

v22.7

05 Aug 10:27
5f4913d
Compare
Choose a tag to compare

Features

  • Moved general code about submodels to BaseModel instead of BaseBatteryModel, making it easier to build custom models from submodels. (#2169)
  • Events can now be plotted as a regular variable (under the name "Event: event_name", e.g. "Event: Minimum voltage [V]") (#2158)
  • Added example showing how to print whether a model is compatible with a parameter set (#2112)
  • Added SEI growth on cracks (#2104)
  • Added Arrhenius temperature dependence of SEI growth (#2104)
  • The "Inner SEI reaction proportion" parameter actually gets used now (#2104)
  • New OKane2022 parameter set replaces Chen2020_plating (#2104)
  • SEI growth, lithium plating and porosity change can now be set to distributed in SPMe. There is an additional option called x-average side reactions which allows to set this (note that for SPM it is always x-averaged). (#2099)

Optimizations

  • Improved eSOH calculations to be more robust (#2192,#2199)
  • The (2x2x2=8) particle diffusion submodels have been consolidated into just three submodels (Fickian diffusion, polynomial profile, and x-averaged polynomial profile) with optional x-averaging and size distribution. Polynomial profile and x-averaged polynomial profile are still two separate submodels, since they deal with surface concentration differently.
  • Added error for when solution vector gets too large, to help debug solver errors (#2138)

Bug fixes

  • Fixed error reporting for simulation with experiment (#2213)
  • Fixed a bug in Simulation that caused initial conditions to change when solving an experiment multiple times (#2204)
  • Fixed labels and ylims in plot_voltage_components(#2183)
  • Fixed 2D interpolant (#2180)
  • Fixes a bug where the SPMe always builds even when build=False (#2169)
  • Some events have been removed in the case where they are constant, i.e. can never be reached (#2158)
  • Raise explicit NotImplementedError if trying to call bool() on a pybamm Symbol (e.g. in an if statement condition) (#2141)
  • Fixed bug causing cut-off voltage to change after setting up a simulation with a model (#2138)
  • A single solution cycle can now be used as a starting solution for a simulation (#2138)

Breaking changes

  • Exchange-current density functions (and some other functions) now take an additional argument, the maximum particle concentration for that phase (#2134)
  • Loss of lithium to SEI on cracks is now a degradation variable, so setting a particle mechanics submodel is now compulsory (NoMechanics will suffice)

v22.6

30 Jun 08:01
7c5b44e
Compare
Choose a tag to compare

Features

  • Added open-circuit potential as a separate submodel (#2094)
  • Added partially reversible lithium plating model and new OKane2022 parameter set to go with it (#2043)
  • Added __eq__ and __hash__ methods for Symbol objects, using .id (#1978)

Optimizations

  • Stoichiometry inputs to OCP functions are now bounded between 1e-10 and 1-1e-10, with singularities at 0 and 1 so that OCP goes to +- infinity (#2095)

Breaking changes

  • Changed some dictionary keys to Symbol instead of Symbol.id (internal change only, should not affect external facing functions) (#1978)

v22.5

30 May 20:14
e1f52ff
Compare
Choose a tag to compare

Features

  • Added functionality to generate Julia expressions from a model. See PyBaMM.jl for how to use these (#1942))
  • Added basic callbacks to the Simulation class, and a LoggingCallback (#1880))

Bug fixes

  • Corrected legend order in "plot_voltage_components.py", so each entry refers to the correct overpotential. (#2061)

Breaking changes

  • Changed domain-specific parameter names to a nested attribute, e.g. param.c_n_max is now param.n.c_max (#2063)

v22.4

03 May 19:36
3b8d775
Compare
Choose a tag to compare

v22.4 - 2022-04-30

Features

  • Added a casadi version of the IDKLU solver, which is used for model.convert_to_format = "casadi" (#2002)

Bug fixes

  • Remove old deprecation errors, including those in parameter_values.py that caused the simulation if, for example, the reaction rate is re-introduced manually (#2022)

v22.3

30 Mar 06:34
dd0d4b5
Compare
Choose a tag to compare

Features

  • Added "Discharge energy [W.h]", which is the integral of the power in Watts, as an optional output. Set the option "calculate discharge energy" to "true" to get this output ("false" by default, since it can slow down some of the simple models) (#1969))
  • Added an option "calculate heat source for isothermal models" to choose whether or not the heat generation terms are computed when running models with the option thermal="isothermal" (#1958)

Bug fixes

  • Fix bug where sensitivity calculation failed if len of calculate_sensitivities was less than inputs (#1897)
  • Fixed a bug in the eSOH variable calculation when OCV is given as data (#1975)
  • Fixed a bug where isothermal models did not compute any heat source terms (#1958)

Breaking changes

  • Dropped support for Windows 32-bit architecture (#1964)

v22.2

01 Mar 11:07
233d476
Compare
Choose a tag to compare

Features

  • Isothermal models now compute heat source terms (but the temperature remains constant). The models now also account for current collector heating when dimensionality=0 (#1929)
  • Added new models for power control and resistance control (#1917)
  • Initial concentrations can now be provided as a function of r as well as x (#1866)

Bug fixes

  • Fixed a bug where thermal submodels could not be used with half-cells (#1929)
  • Parameters can now be imported from a directory having "pybamm" in its name (#1919)
  • scikit.odes and SUNDIALS can now be installed using pybamm_install_odes (#1916)

Breaking changes

  • The domain setter and auxiliary_domains getter have been deprecated, domains setter/getter should be used instead. The domain getter is still active. We now recommend creating symbols with domains={...} instead of domain=..., auxiliary_domains={...}, but the latter is not yet deprecated (#1866)