Releases: pybamm-team/PyBaMM
Releases · pybamm-team/PyBaMM
v23.4
Bug fixes
- Parameter sets can now contain the key "chemistry", and will ignore its value (this previously would give errors in some cases) (#2901)
- Fixed a bug in the discretisation of initial conditions of a scaled variable (#2856)
- Fixed keyerror on "all" when getting sensitivities from IDAKLU solver(#2883)
Breaking changes
- Made
Jupyter
a development only dependency. NowJupyter
would not be a required dependency for users while installingPyBaMM
. (#2846)
v23.3
Features
- Added option to limit the number of integrators stored in CasadiSolver, which is particularly relevant when running simulations back-to-back #2823
- Added new variables, related to electrode balance, for the
ElectrodeSOH
model (#2807) - Added method to calculate maximum theoretical energy. (#2777) and add to summary variables (#2781)
- Renamed "Terminal voltage [V]" to just "Voltage [V]". "Terminal voltage [V]" can still be used and will return the same value as "Voltage [V]". (#2740)
- Added "Negative electrode surface potential difference at separator interface [V]", which is the value of the surface potential difference (
phi_s - phi_e
) at the anode/separator interface, commonly controlled in fast-charging algorithms to avoid plating. Also added "Positive electrode surface potential difference at separator interface [V]". (#2740) - Added "Bulk open-circuit voltage [V]", which is the open-circuit voltage as calculated from the bulk particle concentrations. The old variable "Measured open circuit voltage [V]", which referred to the open-circuit potential as calculated from the surface particle concentrations, has been renamed to "Surface open-circuit voltage [V]". (#2740) "Bulk open-circuit voltage [V]" was briefly named "Open-circuit voltage [V]", but this was changed in (#2845)
- Added an example for
plot_voltage_components
, explaining what the different voltage components are. (#2740)
Bug fixes
- Fixed excessive RAM consumption when running multiple simulations (#2823)
- Fixed a bug where variable bounds could not contain
InputParameters
(#2795) - Improved
model.latexify()
to have a cleaner and more readable output (#2764) - Fixed electrolyte conservation in the case of concentration-dependent transference number (#2758)
- Fixed
plot_voltage_components
so that the sum of overpotentials is now equal to the voltage (#2740) - Fixed use of last_state as starting_solution in Simulation.solve() (#2822)
Optimizations
Breaking changes
ElectrodeSOH.solve
now returns a{str: float}
dict instead of apybamm.Solution
object (to avoid having to do.data[0]
every time). In any code that usessol = ElectrodeSOH.solve()
,sol[key].data[0]
should be replaced withsol[key]
. (#2779)- Removed "... cation signed stoichiometry" and "... electrons in reaction" parameters, they are now hardcoded. (#2778)
- When using
solver.step()
, the first time point in the step is shifted bypybamm.settings.step_start_offset
(default 1 ns) to avoid having duplicate times in the solution steps from the end of one step and the start of the next. (#2773) - Renamed "Measured open circuit voltage [V]" to "Surface open-circuit voltage [V]". This variable was calculated from surface particle concentrations, and hence "hid" the overpotential from particle gradients. The new variable "Bulk open-circuit voltage [V]" is calculated from bulk particle concentrations instead. (#2740)
- Renamed all references to "open circuit" to be "open-circuit" instead. (#2740)
- Renamed parameter "1 + dlnf/dlnc" to "Thermodynamic factor". (#2727)
- All PyBaMM models are now dimensional. This has been benchmarked against dimensionless models and found to give around the same solve time. Implementing dimensional models greatly reduces the barrier to entry for adding new models. However, this comes with several breaking changes: (i) the
timescale
andlength_scales
attributes of a model have been removed (they are no longer needed) (ii) several dimensionless variables are no longer defined, but the corresponding dimensional variables can still be accessed by adding the units to the name (iii) some parameters used only for non-dimensionalization, such as "Typical current [A]", have been removed (#2419)
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)