Releases: pybamm-team/PyBaMM
Releases · pybamm-team/PyBaMM
v23.2
v23.1
Features
- Changed linting from
flake8
toruff
(#2630). - Changed docs theme to pydata theme and start to improve docs in general (#2618).
- New
contact resistance
option, new parameterContact resistance [Ohm]
and new variableContact overpotential [V]
(#2598). - Steps in
Experiment
can now be tagged and cycle numbers be searched based on those tags (#2593).
Bug fixes
v22.12
Features
- Added functionality to create
pybamm.ParameterValues
from a BPX standard JSON file (#2555). - Allow the option "surface form" to be "differential" in the
MPM
(#2533) - Added variables "Loss of lithium due to loss of active material in negative/positive electrode [mol]". These should be included in the calculation of "total lithium in system" to make sure that lithium is truly conserved. (#2529)
initial_soc
can now be a string "x V", in which case the simulation is initialized to start from that voltage (#2508)- The
ElectrodeSOH
solver can now calculate electrode balance based on a target "cell capacity" (requires cell capacity "Q" as input), as well as the default "cyclable cell capacity" (requires cyclable lithium capacity "Q_Li" as input). Use the keyword argumentknown_value
to control which is used. (#2508)
Bug fixes
- Fixed bug with
EntryPoints
in Spyder IDE (#2584) - Fixed electrolyte conservation when options {"surface form": "algebraic"} are used
- Fixed "constant concentration" electrolyte model so that "porosity times concentration" is conserved when porosity changes (#2529)
- Fix installation on
Google Colab
(pybtex
andColab
issue) (#2526)
Breaking changes
- Renamed "Negative/Positive electrode SOC" to "Negative/Positive electrode stoichiometry" to avoid confusion with cell SOC (#2529)
- Removed external variables and submodels. InputParameter should now be used in all cases (#2502)
- Trying to use a solver to solve multiple models results in a RuntimeError exception (#2481)
- Inputs for the
ElectrodeSOH
solver are now (i) "Q_Li", the total cyclable capacity of lithium in the electrodes (previously "n_Li", the total number of moles, n_Li = 3600/F * Q_Li) (ii) "Q_n", the capacity of the negative electrode (previously "C_n"), and "Q_p", the capacity of the positive electrode (previously "C_p") (#2508)
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)