Releases: pybamm-team/PyBaMM
Releases · pybamm-team/PyBaMM
v22.11.1
v22.11
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
andreference
attributes toVariable
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
toimportlib_metadata
for handling entry points (#2500) - Fixed some bugs related to processing
FunctionParameter
toInterpolant
(#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
andcached_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
returns2*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
andComposite
lead-acid models, and some submodels specific to those models (#2431)
v22.10
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 whenget
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
, andDiscretisation.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
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 toParameterValues
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
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]
andThroughput energy [W.h]
to standard variables and summary variables, to assist with degradation studies. Throughput variables are only calculated ifcalculate discharge energy
is set totrue
.Time [s]
andTime [h]
also added to summary variables. (#2249) - Added
lipf6_OKane2022
electrolyte toOKane2022
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 nowparam.n.prim.c_max
(#2248)
v22.7
Features
- Moved general code about submodels to
BaseModel
instead ofBaseBatteryModel
, 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 calledx-average side reactions
which allows to set this (note that forSPM
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 callbool()
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
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 forSymbol
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 ofSymbol.id
(internal change only, should not affect external facing functions) (#1978)
v22.5
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 nowparam.n.c_max
(#2063)
v22.4
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
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 thaninputs
(#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)