v23.9rc0
Pre-release
Pre-release
Features
- The parameter "Ambient temperature [K]" can now be given as a function of position
(y,z)and timet. 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"))returnspybamm.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 cracksandlithium platingcan be made to work on the positive electrode by specifying the relevant options as a 2-tuple. If a tuple is not given andworking electrodeis set toboth, 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_jaxis deprecated. It is now replaced withpip install pybamm[jax](#3163)- Implement the MSMR model (#3116)
- Added new example notebook
rpt-experimentto 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_largewhen trying to referencey-slicewhere the referenced variable was not apybamm.StateVector(#3313 - Fixed a bug with
_Heaviside._evaluate_for_shapewhich meant some expressions involving heaviside function and subtractions did not work (#3306) - Attributes of
pybamm.Simulationobjects (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 electrodetonegativenow triggers anOptionError. Instead, set it topositiveand 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_solutionandlast_state(#3177) - Fix simulations with
starting_solutionto work withstart_timeexperiments (#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
Prada2013have 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
OneDimensionalXthermal 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.OneDimensionalXhas been moved topybamm.thermal.pouch_cell.OneDimensionalXto 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
OptionWarningis raised to let users know to update their parameters (#3257) - Numpy functions now work with PyBaMM symbols (e.g.
np.exp(pybamm.Symbol("a"))returnspybamm.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 cracksandlithium platingsubmodels can now be used on either electrode, which means the__init__functions for the relevant classes now havedomainas a required argument (#3198) - Likewise, the names of all variables corresponding to those submodels now have domains. For example, instead of
SEI thickness [m], useNegative SEI thickness [m]orPositive SEI thickness [m]. (#3198) - If
options["working electrode"] == "both"and eitherSEI,SEI on cracksorlithium platingare not provided as tuples, they are automatically made into tuples. This directly modifiesextra_options, notdefault_optionsto ensure the other changes todefault_optionsstill 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_jaxis deprecated. It is now replaced withpip 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)