Skip to content

Releases: pybamm-team/PyBaMM

v24.1

31 Jan 09:24
bb6fc9b
Compare
Choose a tag to compare

Features

  • The pybamm_install_odes command now includes support for macOS systems and can be used to set up SUNDIALS and install the scikits.odes solver on macOS (#3417, #3706)
  • Added support for Python 3.12 (#3531)
  • Added method to get QuickPlot axes by variable (#3596)
  • Added custom experiment terminations (#3596)
  • Mechanical parameters are now a function of stoichiometry and temperature (#3576)
  • Added a new unary operator, EvaluateAt, that evaluates a spatial variable at a given position (#3573)
  • Added a method, insert_reference_electrode, to pybamm.lithium_ion.BaseModel that insert a reference electrode to measure the electrolyte potential at a given position in space and adds new variables that mimic a 3E cell setup. (#3573)
  • Serialisation added so models can be written to/read from JSON (#3397)
  • Added a get_parameter_info method for models and modified "print_parameter_info" functionality to extract all parameters and their type in a tabular and readable format (#3584)
  • Mechanical parameters are now a function of stoichiometry and temperature (#3576)

Bug fixes

  • Fixed a bug that lead to a ShapeError when specifying "Ambient temperature [K]" as an Interpolant with an isothermal model (#3761)
  • Fixed a bug where if the first step(s) in a cycle are skipped then the cycle solution started from the model's initial conditions instead of from the last state of the previous cycle (#3708)
  • Fixed a bug where the lumped thermal model conflates cell volume with electrode volume (#3707)
  • Reverted a change to the coupled degradation example notebook that caused it to be unstable for large numbers of cycles (#3691)
  • Fixed a bug where simulations using the CasADi-based solvers would fail randomly with the half-cell model (#3494)
  • Fixed bug that made identical Experiment steps with different end times crash (#3516)
  • Fixed bug in calculation of theoretical energy that made it very slow (#3506)
  • The irreversible plating model now increments f"{Domain} dead lithium concentration [mol.m-3]", not f"{Domain} lithium plating concentration [mol.m-3]" as it did previously. (#3485)

Optimizations

  • Updated jax and jaxlib to the latest available versions and added Windows (Python 3.9+) support for the Jax solver (#3550)

Breaking changes

  • The parameters GeometricParameters.A_cooling and GeometricParameters.V_cell are now automatically computed from the electrode heights, widths and thicknesses if the "cell geometry" option is "pouch" and from the parameters "Cell cooling surface area [m2]" and "Cell volume [m3]", respectively, otherwise. When using the lumped thermal model we recommend using the "arbitrary" cell geometry and specifying the parameters "Cell cooling surface area [m2]", "Cell volume [m3]" and "Total heat transfer coefficient [W.m-2.K-1]" directly. (#3707)
  • Dropped support for the [jax] extra, i.e., the Jax solver when running on Python 3.8. The Jax solver is now available on Python 3.9 and above (#3550)

v24.1rc2

24 Jan 13:23
Compare
Choose a tag to compare
v24.1rc2 Pre-release
Pre-release

Bug fixes

  • Fixed a bug that lead to a ShapeError when specifying "Ambient temperature [K]" as an Interpolant with an isothermal model (#3761)

v24.1rc1

17 Jan 10:16
Compare
Choose a tag to compare
v24.1rc1 Pre-release
Pre-release

Bug fixes

  • Fixed a bug where if the first step(s) in a cycle are skipped then the cycle solution started from the model's initial conditions instead of from the last state of the previous cycle (#3708)
  • Fixed a bug where the lumped thermal model conflates cell volume with electrode volume (#3707)

v24.1rc0

09 Jan 16:50
Compare
Choose a tag to compare
v24.1rc0 Pre-release
Pre-release

Features

  • The pybamm_install_odes command now includes support for macOS systems and can be used to set up SUNDIALS and install the scikits.odes solver on macOS (#3417)
  • Added support for Python 3.12 (#3531)
  • Added method to get QuickPlot axes by variable (#3596)
  • Added custom experiment terminations (#3596)
  • Mechanical parameters are now a function of stoichiometry and temperature (#3576)
  • Added a new unary operator, EvaluateAt, that evaluates a spatial variable at a given position (#3573)
  • Added a method, insert_reference_electrode, to pybamm.lithium_ion.BaseModel that insert a reference electrode to measure the electrolyte potential at a given position in space and adds new variables that mimic a 3E cell setup. (#3573)
  • Serialisation added so models can be written to/read from JSON (#3397)
  • Added a get_parameter_info method for models and modified "print_parameter_info" functionality to extract all parameters and their type in a tabular and readable format (#3584)
  • Mechanical parameters are now a function of stoichiometry and temperature (#3576)

Bug fixes

  • Reverted a change to the coupled degradation example notebook that caused it to be unstable for large numbers of cycles (#3691)
  • Fixed a bug where simulations using the CasADi-based solvers would fail randomly with the half-cell model (#3494)
  • Fixed bug that made identical Experiment steps with different end times crash (#3516)
  • Fixed bug in calculation of theoretical energy that made it very slow (#3506)
  • The irreversible plating model now increments f"{Domain} dead lithium concentration [mol.m-3]", not f"{Domain} lithium plating concentration [mol.m-3]" as it did previously. (#3485)

Optimizations

  • Updated jax and jaxlib to the latest available versions and added Windows (Python 3.9+) support for the Jax solver (#3550)

Breaking changes

  • Dropped support for the [jax] extra, i.e., the Jax solver when running on Python 3.8. The Jax solver is now available on Python 3.9 and above (#3550)

v23.9

20 Nov 15:22
97ca773
Compare
Choose a tag to compare

Features

  • The parameter "Ambient temperature [K]" can now be given as a function of position (y,z) and time t. The "edge" and "current collector" heat transfer coefficient parameters can also depend on (y,z) (#3257)
  • Spherical and cylindrical shell domains can now be solved with any boundary conditions (#3237)
  • Processed variables now get the spatial variables automatically, allowing plotting of more generic models (#3234)
  • Numpy functions now work with PyBaMM symbols (e.g. np.exp(pybamm.Symbol("a")) returns pybamm.Exp(pybamm.Symbol("a"))). This means that parameter functions can be specified using numpy functions instead of pybamm functions. Additionally, combining numpy arrays with pybamm objects now works (the numpy array is converted to a pybamm array) (#3205)
  • Half-cell models where graphite - or other negative electrode material of choice - is treated as the positive electrode (#3198)
  • Degradation mechanisms SEI, SEI on cracks and lithium plating can be made to work on the positive electrode by specifying the relevant options as a 2-tuple. If a tuple is not given and working electrode is set to both, they will be applied on the negative electrode only. (#3198)
  • Added an example notebook to demonstrate how to use half-cell models (#3198)
  • Added option to use an empirical hysteresis model for the diffusivity and exchange-current density (#3194)
  • Double-layer capacity can now be provided as a function of temperature (#3174)
  • pybamm_install_jax is deprecated. It is now replaced with pip install pybamm[jax] (#3163)
  • Implement the MSMR model (#3116)
  • Added new example notebook rpt-experiment to demonstrate how to set up degradation experiments with RPTs (#2851)

Bug fixes

  • Fixed a bug where the JaxSolver would fails when using GPU support with no input parameters (#3423)
  • Make pybamm importable with minimal dependencies (#3044, #3475)
  • Fixed a bug where supplying an initial soc did not work with half cell models (#3456)
  • Fixed a bug where empty lists passed to QuickPlot resulted in an IndexError and did not return a meaningful error message (#3359)
  • Fixed a bug where there was a missing thermal conductivity in the thermal pouch cell models (#3330)
  • Fixed a bug that caused incorrect results of “{Domain} electrode thickness change [m]” due to the absence of dimension for the variable electrode_thickness_change(#3329).
  • Fixed a bug that occured in check_ys_are_not_too_large when trying to reference y-slice where the referenced variable was not a pybamm.StateVector (#3313
  • Fixed a bug with _Heaviside._evaluate_for_shape which meant some expressions involving heaviside function and subtractions did not work (#3306)
  • Attributes of pybamm.Simulation objects (models, parameter values, geometries, choice of solver, and output variables) are now private and as such cannot be edited in-place after the simulation has been created (#3267
  • Fixed bug causing incorrect activation energies using create_from_bpx() (#3242)
  • Fixed a bug where the "basic" lithium-ion models gave incorrect results when using nonlinear particle diffusivity (#3207)
  • Particle size distributions now work with SPMe and NewmanTobias models (#3207)
  • Attempting to set working electrode to negative now triggers an OptionError. Instead, set it to positive and use what would normally be the negative electrode as the positive electrode. (#3198)
  • Fix to simulate c_rate steps with drive cycles (#3186)
  • Always save last cycle in experiment, to fix issues with starting_solution and last_state (#3177)
  • Fix simulations with starting_solution to work with start_time experiments (#3177)
  • Fix SEI Example Notebook (#3166)
  • Thevenin() model is now constructed with standard variables: Time [s], Time [min], Time [h] (#3143)
  • Error generated when invalid parameter values are passed (#3132)
  • Parameters in Prada2013 have been updated to better match those given in the paper, which is a 2.3 Ah cell, instead of the mix-and-match with the 1.1 Ah cell from Lain2019 (#3096)
  • The OneDimensionalX thermal model has been updated to account for edge/tab cooling and account for the current collector volumetric heat capacity. It now gives the correct behaviour compared with a lumped model with the correct total heat transfer coefficient and surface area for cooling. (#3042)

Optimizations

  • Improved how steps are processed in simulations to reduce memory usage (#3261)
  • Added parameter list support to JAX solver, permitting multithreading / GPU execution (#3121)

Breaking changes

  • The parameter "Exchange-current density for lithium plating [A.m-2]" has been renamed to "Exchange-current density for lithium metal electrode [A.m-2]" when referring to the lithium plating reaction on the surface of a lithium metal electrode (#3445)
  • Dropped support for i686 (32-bit) architectures on GNU/Linux distributions (#3412)
  • The class pybamm.thermal.OneDimensionalX has been moved to pybamm.thermal.pouch_cell.OneDimensionalX to reflect the fact that the model formulation implicitly assumes a pouch cell geometry (#3257)
  • The "lumped" thermal option now always used the parameters "Cell cooling surface area [m2]", "Cell volume [m3]" and "Total heat transfer coefficient [W.m-2.K-1]" to compute the cell cooling regardless of the chosen "cell geometry" option. The user must now specify the correct values for these parameters instead of them being calculated based on e.g. a pouch cell. An OptionWarning is raised to let users know to update their parameters (#3257)
  • Numpy functions now work with PyBaMM symbols (e.g. np.exp(pybamm.Symbol("a")) returns pybamm.Exp(pybamm.Symbol("a"))). This means that parameter functions can be specified using numpy functions instead of pybamm functions. Additionally, combining numpy arrays with pybamm objects now works (the numpy array is converted to a pybamm array) (#3205)
  • The SEI, SEI on cracks and lithium plating submodels can now be used on either electrode, which means the __init__ functions for the relevant classes now have domain as a required argument (#3198)
  • Likewise, the names of all variables corresponding to those submodels now have domains. For example, instead of SEI thickness [m], use Negative SEI thickness [m] or Positive SEI thickness [m]. (#3198)
  • If options["working electrode"] == "both" and either SEI, SEI on cracks or lithium plating are not provided as tuples, they are automatically made into tuples. This directly modifies extra_options, not default_options to ensure the other changes to default_options still happen when required. (#3198)
  • Added option to use an empirical hysteresis model for the diffusivity and exchange-current density (#3194)
  • Double-layer capacity can now be provided as a function of temperature (#3174)
  • pybamm_install_jax is deprecated. It is now replaced with pip install pybamm[jax] (#3163)
  • PyBaMM now has optional dependencies that can be installed with the pattern pip install pybamm[option] e.g. pybamm[plot] (#3044, #3475)

v23.9rc1

14 Nov 19:54
Compare
Choose a tag to compare
v23.9rc1 Pre-release
Pre-release

Bug fixes

  • Fixed a bug where the JaxSolver would fails when using GPU support with no input parameters (#3423)
  • Make pybamm importable with minimal dependencies (#3044, #3475)
  • Fixed a bug where supplying an initial soc did not work with half cell models (#3456)

v23.9rc0

05 Oct 09:42
Compare
Choose a tag to compare
v23.9rc0 Pre-release
Pre-release

Features

  • The parameter "Ambient temperature [K]" can now be given as a function of position (y,z) and time t. The "edge" and "current collector" heat transfer coefficient parameters can also depend on (y,z) (#3257)
  • Spherical and cylindrical shell domains can now be solved with any boundary conditions (#3237)
  • Processed variables now get the spatial variables automatically, allowing plotting of more generic models (#3234)
  • Numpy functions now work with PyBaMM symbols (e.g. np.exp(pybamm.Symbol("a")) returns pybamm.Exp(pybamm.Symbol("a"))). This means that parameter functions can be specified using numpy functions instead of pybamm functions. Additionally, combining numpy arrays with pybamm objects now works (the numpy array is converted to a pybamm array) (#3205)
  • Half-cell models where graphite - or other negative electrode material of choice - is treated as the positive electrode (#3198)
  • Degradation mechanisms SEI, SEI on cracks and lithium plating can be made to work on the positive electrode by specifying the relevant options as a 2-tuple. If a tuple is not given and working electrode is set to both, they will be applied on the negative electrode only. (#3198)
  • Added an example notebook to demonstrate how to use half-cell models (#3198)
  • Added option to use an empirical hysteresis model for the diffusivity and exchange-current density (#3194)
  • Double-layer capacity can now be provided as a function of temperature (#3174)
  • pybamm_install_jax is deprecated. It is now replaced with pip install pybamm[jax] (#3163)
  • Implement the MSMR model (#3116)
  • Added new example notebook rpt-experiment to demonstrate how to set up degradation experiments with RPTs (#2851)

Bug fixes

  • Fixed a bug where empty lists passed to QuickPlot resulted in an IndexError and did not return a meaningful error message (#3359)
  • Fixed a bug where there was a missing thermal conductivity in the thermal pouch cell models (#3330)
  • Fixed a bug that caused incorrect results of “{Domain} electrode thickness change [m]” due to the absence of dimension for the variable electrode_thickness_change(#3329).
  • Fixed a bug that occured in check_ys_are_not_too_large when trying to reference y-slice where the referenced variable was not a pybamm.StateVector (#3313
  • Fixed a bug with _Heaviside._evaluate_for_shape which meant some expressions involving heaviside function and subtractions did not work (#3306)
  • Attributes of pybamm.Simulation objects (models, parameter values, geometries, choice of solver, and output variables) are now private and as such cannot be edited in-place after the simulation has been created (#3267
  • Fixed bug causing incorrect activation energies using create_from_bpx() (#3242)
  • Fixed a bug where the "basic" lithium-ion models gave incorrect results when using nonlinear particle diffusivity (#3207)
  • Particle size distributions now work with SPMe and NewmanTobias models (#3207)
  • Attempting to set working electrode to negative now triggers an OptionError. Instead, set it to positive and use what would normally be the negative electrode as the positive electrode. (#3198)
  • Fix to simulate c_rate steps with drive cycles (#3186)
  • Always save last cycle in experiment, to fix issues with starting_solution and last_state (#3177)
  • Fix simulations with starting_solution to work with start_time experiments (#3177)
  • Fix SEI Example Notebook (#3166)
  • Thevenin() model is now constructed with standard variables: Time [s], Time [min], Time [h] (#3143)
  • Error generated when invalid parameter values are passed (#3132)
  • Parameters in Prada2013 have been updated to better match those given in the paper, which is a 2.3 Ah cell, instead of the mix-and-match with the 1.1 Ah cell from Lain2019 (#3096)
  • The OneDimensionalX thermal model has been updated to account for edge/tab cooling and account for the current collector volumetric heat capacity. It now gives the correct behaviour compared with a lumped model with the correct total heat transfer coefficient and surface area for cooling. (#3042)

Optimizations

  • Improved how steps are processed in simulations to reduce memory usage (#3261)
  • Added parameter list support to JAX solver, permitting multithreading / GPU execution (#3121)

Breaking changes

  • Dropped support for i686 (32-bit) architectures on GNU/Linux distributions (#3412)
  • The class pybamm.thermal.OneDimensionalX has been moved to pybamm.thermal.pouch_cell.OneDimensionalX to reflect the fact that the model formulation implicitly assumes a pouch cell geometry (#3257)
  • The "lumped" thermal option now always used the parameters "Cell cooling surface area [m2]", "Cell volume [m3]" and "Total heat transfer coefficient [W.m-2.K-1]" to compute the cell cooling regardless of the chosen "cell geometry" option. The user must now specify the correct values for these parameters instead of them being calculated based on e.g. a pouch cell. An OptionWarning is raised to let users know to update their parameters (#3257)
  • Numpy functions now work with PyBaMM symbols (e.g. np.exp(pybamm.Symbol("a")) returns pybamm.Exp(pybamm.Symbol("a"))). This means that parameter functions can be specified using numpy functions instead of pybamm functions. Additionally, combining numpy arrays with pybamm objects now works (the numpy array is converted to a pybamm array) (#3205)
  • The SEI, SEI on cracks and lithium plating submodels can now be used on either electrode, which means the __init__ functions for the relevant classes now have domain as a required argument (#3198)
  • Likewise, the names of all variables corresponding to those submodels now have domains. For example, instead of SEI thickness [m], use Negative SEI thickness [m] or Positive SEI thickness [m]. (#3198)
  • If options["working electrode"] == "both" and either SEI, SEI on cracks or lithium plating are not provided as tuples, they are automatically made into tuples. This directly modifies extra_options, not default_options to ensure the other changes to default_options still happen when required. (#3198)
  • Added option to use an empirical hysteresis model for the diffusivity and exchange-current density (#3194)
  • Double-layer capacity can now be provided as a function of temperature (#3174)
  • pybamm_install_jax is deprecated. It is now replaced with pip install pybamm[jax] (#3163)
  • PyBaMM now has optional dependencies that can be installed with the pattern pip install pybamm[option] e.g. pybamm[plot] (#3044)

v23.5

03 Jul 11:29
5e28bb9
Compare
Choose a tag to compare

Features

  • Enable multithreading in IDAKLU solver (#2947)
  • If a solution contains cycles and steps, the cycle number and step number are now saved when solution.save_data() is called (#2931)
  • Experiments can now be given a start_time to define when each step should be triggered (#2616)

Optimizations

  • Test JaxSolver's compatibility with Python 3.8, 3.9, 3.10, and 3.11 (#2958)
  • Update Jax (0.4.8) and JaxLib (0.4.7) compatibility (#2927)

Bug fixes

  • Realign 'count' increment in CasadiSolver._integrate() (#2986)
  • Fix pybamm_install_odes and update the required SUNDIALS version (#2958)
  • Fixed a bug where all data included in a BPX was incorrectly assumed to be given as a function of time.(#2957)
  • Remove brew install for Mac from the recommended developer installation options for SUNDIALS (#2925)
  • Fix bpx.py to correctly generate parameters for "lumped" thermal model (#2860)

Breaking changes

  • Deprecate functionality to load parameter set from a csv file. Parameter sets must now be provided as python dictionaries (#2959)

v23.5rc0

19 Jun 14:17
Compare
Choose a tag to compare
v23.5rc0 Pre-release
Pre-release

Bug fixes

  • Realign 'count' increment in CasadiSolver._integrate() (#2986)

Features

  • Enable multithreading in IDAKLU solver (#2947)
  • If a solution contains cycles and steps, the cycle number and step number are now saved when solution.save_data() is called (#2931)
  • Experiments can now be given a start_time to define when each step should be triggered (#2616)

Optimizations

  • Test JaxSolver's compatibility with Python 3.8, 3.9, 3.10, and 3.11 (#2958)
  • Update Jax (0.4.8) and JaxLib (0.4.7) compatibility (#2927)
  • Removed importlib_metadata as a required dependency for user installations (#3050)

Bug fixes

  • Fix pybamm_install_odes and update the required SUNDIALS version (#2958)
  • Fixed a bug where all data included in a BPX was incorrectly assumed to be given as a function of time.(#2957)
  • Remove brew install for Mac from the recommended developer installation options for SUNDIALS (#2925)
  • Fix bpx.py to correctly generate parameters for "lumped" thermal model (#2860)

Breaking changes

  • Deprecate functionality to load parameter set from a csv file. Parameter sets must now be provided as python dictionaries (#2959)

v23.4.1

02 May 18:03
7c9bcfb
Compare
Choose a tag to compare

Bug fixes

  • Fixed a performance regression introduced by citation tags (#2862). Citations tags functionality is removed for now.