Updated BPX to v0.5.0 and made changes for the switch to Pydantic V2 (#4701)
Summary variables now calculated only when called, accessed via a class in the same manner as other variables rather than a dictionary. (#4621)
The conda distribution (pybamm) now installs all optional dependencies available on conda-forge. Use the new pybamm-base conda
package to install PyBaMM with only the required dependencies. (conda-forge/pybamm-feedstock#70)
Separated extrapolation options for pybamm.BoundaryValue and pybamm.BoundaryGradient, and updated the default to be “linear” for the value and “quadratic” for the gradient. (#4614)
Double-layer SEI models have been removed (with the corresponding parameters). All models assume now a single SEI layer. (#4470)
Moved the IDAKLU solver to a standalone pybammsolvers package. This will
make PyBaMM a pure Python package and make installing and using the solver
easier. (#4487)
Wycisk OCP model now requires an parameter to set the initial condition. (#4374)
Added BasicDFN model for sodium-ion batteries (#4451)
Added sensitivity calculation support for pybamm.Simulation and pybamm.Experiment (#4415)
Added OpenMP parallelization to IDAKLU solver for lists of input parameters (#4449)
Added phase-dependent particle options to LAM (#4369)
Added a lithium ion equivalent circuit model with split open circuit voltages for each electrode (SplitOCVR). (#4330)
Added the pybamm.DiscreteTimeSum expression node to sum an expression over a sequence of data times, and accompanying pybamm.DiscreteTimeData class to store the data times and values (#4501)
Added error for binary operators on two concatenations with different numbers of children. Previously, the extra children were dropped. Also fixed bug where Q_rxn was dropped from the total heating term in half-cell models. (#4562)
Fixed bug where Q_rxn was set to 0 for the negative electrode in half-cell models. (#4557)
Fixed bug in post-processing solutions with infeasible experiments using the (IDAKLUSolver). (#4541)
Disabled IREE on MacOS due to compatibility issues and added the CasADI
path to the environment to resolve issues on MacOS and Linux. Windows
users may still experience issues with interpolation. (#4528)
Added _from_json() functionality to Sign which was erroneously omitted previously. (#4517)
Fixed bug where IDAKLU solver failed when output variables were specified and an extrapolation event is present. (#4440)
Deprecated pybamm.Simulation.set_parameters and pybamm.Simulation. set_up_and_parameterise_experiment functions in pybamm.simulation.py. (#3752)
Removed all instances of param = self.param and now directly access self.param across the codebase. This change simplifies parameter references and enhances readability. (#4484)
Removed the deprecation warning for the chemistry argument in
ParameterValues (#4466)
The parameters “… electrode OCP entropic change [V.K-1]” and “… electrode volume change” are now expected to be functions of stoichiometry only instead of functions of both stoichiometry and maximum concentration (#4427)
Renamed set_events function to add_events_from to better reflect its purpose. (#4421)
Added functionality to pass in arbitrary functions of time as the argument for a (pybamm.step). (#4222)
Added new parameters "f{pref]Initial inner SEI on cracks thickness [m]" and "f{pref]Initial outer SEI on cracks thickness [m]", instead of hardcoding these to L_inner_0 / 10000 and L_outer_0 / 10000. (#4168)
Added pybamm.DataLoader class to fetch data files from pybamm-data and store it under local cache. (#4098)
Added time as an option for Experiment.termination. Now allows solving up to a user-specified time while also allowing different cycles and steps in an experiment to be handled normally. (#4073)
Added plot_thermal_components to plot the contributions to the total heat generation in a battery (#4021)
Added functions for normal probability density function (pybamm.normal_pdf) and cumulative distribution function (pybamm.normal_cdf) (#3999)
“Basic” models are now compatible with experiments (#3995)
Updates multiprocess Pool in BaseSolver.solve() to be constructed with context fork. Adds small example for multiprocess inputs. (#3974)
Lithium plating now works on composite electrodes (#3919)
Added lithium plating parameters to Ecker2015 and Ecker2015_graphite_halfcell parameter sets (#3919)
MSMR open-circuit voltage model now depends on the temperature (#3832)
Added support for macOS arm64 (M-series) platforms. (#3789)
Added the ability to specify a custom solver tolerance in get_initial_stoichiometries and related functions (#3714)
Added a JAX interface to the IDAKLU solver (#3658)
Modified step function to take an array of time t_eval as an argument and deprecated use of npts. (#3627)
Renamed “electrode diffusivity” to “particle diffusivity” as a non-breaking change with a deprecation warning (#3624)
Add support for BPX version 0.4.0 which allows for blended electrodes and user-defined parameters in BPX(#3414)
Added by_submodel feature in print_parameter_info method to allow users to print parameters and types of submodels in a tabular and readable format (#3628)
Added WyciskOpenCircuitPotential for differential capacity hysteresis state open-circuit potential submodel (#3593)
Transport efficiency submodel has new options from the literature relating to different tortuosity factor models and also a new option called “tortuosity factor” for specifying the value or function directly as parameters (#3437)
Heat of mixing source term can now be included into thermal models (#2837)
Fixed bug where passing deprecated electrode diffusivity parameter resulted in a breaking change and/or the corresponding diffusivity parameter not updating. Improved the deprecated translation around BPX. (#4176)
Fixed a bug where a factor of electrode surface area to volume ratio is missing in the rhs of the LeadingOrderDifferential conductivity model (#4139)
Fixes the breaking changes caused by #3624, specifically enables the deprecated parameter electrode diffusivity to be used by ParameterValues.update({name:value}) and Solver.solve(inputs={name:value}). Fixes parameter translation from old name to new name, with corrected tests. (#4072
Set the remove_independent_variables_from_rhs to False by default, and moved the option from Discretisation.process_model to Discretisation.__init__. This fixes a bug related to the discharge capacity, but may make the simulation slower in some cases. To set the option to True, use Simulation(..., discretisation_kwargs={"remove_independent_variables_from_rhs": True}). (#4020)
Fixed a bug where independent variables were removed from models even if they appeared in events (#4019)
Fix bug with upwind and downwind schemes producing the wrong discretised system (#3979)
Allow evaluation of an Interpolant object with a number (#3932)
plot_voltage_components now works even if the time does not start at 0 (#3915)
Fixed bug where separator porosity was used in calculation instead of transport efficiency (#3905)
Initial voltage can now match upper or lower cut-offs exactly (#3842)
Fixed a bug where 1+1D and 2+1D models would not work with voltage or power controlled experiments(#3829)
Update IDAKLU solver to fail gracefully when a variable is requested that was not in the solves output_variables list (#3803)
Updated _steps_util.py to throw a specific exception when drive cycle starts at t>0 (#3756)
Updated plot_voltage_components.py to support both Simulation and Solution objects. Added new methods in both Simulation and Solution classes for allow the syntax simulation.plot_voltage_components and solution.plot_voltage_components. Updated test_plot_voltage_components.py to reflect these changes (#3723).
The SEI thickness decreased at some intervals when the ’electron-migration limited’ model was used. It has been corrected (#3622)
Sped up initialization of a ProcessedVariable by making the internal xarray.DataArray initialization lazy (only gets created if interpolation is needed) (#3862)
Functions that are created using pybamm.Function(function_object, children) can no longer be differentiated symbolically (e.g. to compute the Jacobian). This should affect no users, since function derivatives for all “standard” functions are explicitly implemented (#4196)
Removed data files under pybamm/input and released them in a separate repository upstream at pybamm-data. Note that data files under pybamm/input/parameters have not been removed. (#4098)
Removed check_model argument from Simulation.solve. To change the check_model option, use Simulation(..., discretisation_kwargs={"check_model": False}). (#4020)
Removed multiple Docker images. Here on, a single Docker image tagged pybamm/pybamm:latest will be provided with both solvers (IDAKLU and JAX) pre-installed. (#3992)
Renamed “ocp_soc_0_dimensional” to “ocp_soc_0” and “ocp_soc_100_dimensional” to “ocp_soc_100” (#3942)
The ODES solver was removed due to compatibility issues. Users should use IDAKLU, Casadi, or JAX instead. (#3932)
Integrated the [pandas] extra into the core PyBaMM package, deprecating the pybamm[pandas] optional dependency. Pandas is now a required dependency and will be installed upon installing PyBaMM (#3892)
Renamed “have_optional_dependency” to “import_optional_dependency” (#3866)
Integrated the [latexify] extra into the core PyBaMM package, deprecating the pybamm[latexify] set of optional dependencies. SymPy is now a required dependency and will be installed upon installing PyBaMM (#3848)
Renamed “testing” argument for plots to “show_plot” and flipped its meaning (show_plot=True is now the default and shows the plot) (#3842)
The function get_spatial_var in pybamm.QuickPlot.py is made private. (#3755)
Dropped support for BPX version 0.3.0 and below (#3414)
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)
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)
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)
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)
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)
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)
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)
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)
Added verbose logging to pybamm.print_citations() and citation tags for the pybamm.Citations class so that users can now see where the citations were registered when running simulations (#2862)
Updated to casadi 3.6, which required some changes to the casadi integrator (#2859)
PyBaMM is now natively supported on Apple silicon chips (M1/M2) (#2435)
PyBaMM is now supported on Python 3.10 and 3.11 (#2435)
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)
ElectrodeSOH.solve now returns a {str: float} dict instead of a pybamm.Solution object (to avoid having to do .data[0] every time). In any code that uses sol = ElectrodeSOH.solve(), sol[key].data[0] should be replaced with sol[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 by pybamm.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 and length_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)
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 argument known_value to control which is used. (#2508)
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)
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)
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 when get 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)
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, and Discretisation.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)
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)
When creating a pybamm.Interpolant the default interpolator is now “linear”. Passing data directly to ParameterValues 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)
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] and Throughput energy [W.h] to standard variables and summary variables, to assist with degradation studies. Throughput variables are only calculated if calculate discharge energy is set to true. Time [s] and Time [h] also added to summary variables. (#2249)
Added lipf6_OKane2022 electrolyte to OKane2022 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)
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)
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 called x-average side reactions which allows to set this (note that for SPM it is always x-averaged). (#2099)
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)
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) (#2104)
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)
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)
Isothermal models now calculate heat source terms (but the temperature remains constant). The models now also account for current collector heating when dimensionality=0 (#1929)
Added new models for power control and resistance control (#1917)
Initial concentrations can now be provided as a function of r as well as x (#1866)
The domain setter and auxiliary_domains getter have been deprecated, domains setter/getter should be used instead. The domain getter is still active. We now recommend creating symbols with domains={...} instead of domain=..., auxiliary_domains={...}, but the latter is not yet deprecated (#1866)
Added thermal parameters (thermal conductivity, specific heat, etc.) to the Ecker2015 parameter set from Zhao et al. (2018) and Hales et al. (2019) (#1683)
Added plot_summary_variables to plot and compare summary variables (#1678)
The DFN model can now be used directly (instead of BasicDFNHalfCell) to simulate a half-cell (#1600)
The substring ’negative electrode’ has been removed from variables related to SEI and lithium plating (e.g. ‘Total negative electrode SEI thickness [m]’ replaced by ‘Total SEI thickness [m]’) (#1654)
Added LG M50 (NMC811 and graphite + SiOx) parameter set from O’Regan 2022 (#1594)
pybamm.base_solver.solve function can take a list of input parameters to calculate the sensitivities of the solution with respect to. Alternatively, it can be set to True to calculate the sensitivities for all input parameters (#1552)
Added capability for quaternary domains (in addition to primary, secondary and tertiary), increasing the maximum number of domains that a Symbol can have to 4. (#1580)
Tabs can now be placed at the bottom of the cell in 1+1D thermal models (#1581)
Added temperature dependence on electrode electronic conductivity (#1570)
pybamm.base_solver.solve function can take a list of input parameters to calculate the sensitivities of the solution with respect to. Alternatively, it can be set to True to calculate the sensitivities for all input parameters (#1552)
Added a new lithium-ion model MPM or Many-Particle Model, with a distribution of particle sizes in each electrode. (#1529)
Added 2 new submodels for lithium transport in a size distribution of electrode particles: Fickian diffusion (FickianSingleSizeDistribution) and uniform concentration profile (FastSingleSizeDistribution). (#1529)
Added a “particle size” domain to the default lithium-ion geometry, including plotting capabilities (QuickPlot) and processing of variables (ProcessedVariable). (#1529)
Added fitted expressions for OCPs for the Chen2020 parameter set (#1526)
Added initial_soc argument to Simualtion.solve for specifying the initial SOC when solving a model (#1512)
Added Base Parameters class and SymPy in dependencies (#1495)
Added a new “reaction-driven” model for LAM from Reniers et al (2019) (#1490)
Some features (“loss of active material” and “particle mechanics”) can now be specified separately for the negative electrode and positive electrode by passing a 2-tuple (#1490)
plot and plot2D now take and return a matplotlib Axis to allow for easier customization (#1472)
ParameterValues.evaluate can now return arrays to allow function parameters to be easily evaluated (#1472)
Added option to save only specific cycle numbers when simulating an Experiment (#1459)
Added capacity-based termination conditions when simulating an Experiment (#1459)
Added “summary variables” to track degradation over several cycles (#1459)
Added ElectrodeSOH model for calculating capacities and stoichiometric limits (#1459)
Added ConcatenationVariable, which is automatically created when variables are concatenated (#1453)
Added “fast with events” mode for the CasADi solver, which solves a model and finds events more efficiently than “safe” mode. As of PR #1450 this feature is still being tested and “safe” mode remains the default (#1450)
Refactored the particle submodel module, with the models having no size distribution now found in particle.no_distribution, and those with a size distribution in particle.size_distribution. Renamed submodels to indicate the transport model (Fickian diffusion, polynomial profile) and if they are “x-averaged”. E.g., FickianManyParticles and FickianSingleParticle are now no_distribution.FickianDiffusion and no_distribution.XAveragedFickianDiffusion (#1602)
Changed sensitivity API. Removed ProcessedSymbolicVariable, all sensitivity now handled within the solvers and ProcessedVariable (#1552,#2276)
The Yang2017 parameter set has been removed as the complete parameter set is not publicly available in the literature (#1577)
Changed how options are specified for the “loss of active material” and “particle cracking” submodels. “loss of active material” can now be one of “none”, “stress-driven”, or “reaction-driven”, or a 2-tuple for different options in negative and positive electrode. Similarly “particle cracking” (now called “particle mechanics”) can now be “none”, “swelling only”, “swelling and cracking”, or a 2-tuple (#1490)
Changed the variable in the full diffusion model from “Electrolyte concentration” to “Porosity times concentration” (#1476)
Renamed lithium-ion folder to lithium_ion and lead-acid folder to lead_acid in parameters (#1464)
several new models, including reversible and irreversible plating submodels, submodels for loss of active material, Yang et al.’s (2017) coupled SEI/plating/pore clogging model, and the Newman-Tobias model
internal optimizations for solving models, particularly for simulating experiments, with more accurate event detection and more efficient numerical methods and post-processing
parallel solutions of a model with different inputs
a cleaner installation process for Mac when installing from PyPI, no longer requiring a Homebrew installation of Sundials
improved plotting functionality, including adding a new ‘voltage component’ plot
several other new features, optimizations, and bug fixes, summarized below
Added plot_voltage_components to easily plot the component overpotentials that make up the voltage (#1419)
Made QuickPlot more customizable and added an example (#1419)
Solution objects can now be created by stepping different models (#1408)
Added Yang et al 2017 model that couples irreversible lithium plating, SEI growth and change in porosity which produces a transition from linear to nonlinear degradation pattern of lithium-ion battery over extended cycles(#1398)
Added support for Python 3.9 and dropped support for Python 3.6. Python 3.6 may still work but is now untested (#1370)
Added the electrolyte overpotential and Ohmic losses for full conductivity, including surface form (#1350)
Added functionality to Citations to print formatted citations (#1340)
Updated the way events are handled in CasadiSolver for more accurate event location (#1328)
Added error message if initial conditions are outside the bounds of a variable (#1326)
Added temperature dependence to density, heat capacity and thermal conductivity (#1323)
Added temperature dependence to the transference number (t_plus) (#1317)
Added option to express experiments (and extract solutions) in terms of cycles of operating condition (#1309)
The event time and state are now returned as part of Solution.t and Solution.y so that the event is accurately captured in the returned solution (#1300)
Added reversible and irreversible lithium plating models (#1287)
Reformatted the BasicDFNHalfCell to be consistent with the other models (#1282)
Added option to make the total interfacial current density a state (#1280)
Added functionality to initialize a model using the solution from another model (#1278)
Updated solvers’ method solve() so it can take a list of inputs dictionaries as the inputs keyword argument. In this case the model is solved for each input set in the list, and a list of solutions mapping the set of inputs to the solutions is returned. Note that solve() can still take a single dictionary as the inputs keyword argument. In this case the behaviour is unchanged compared to previous versions.(#1261)
Added composite surface form electrolyte models: CompositeDifferential and CompositeAlgebraic (#1207)
The Solution class now only creates the concatenated y when the user asks for it. This is an optimization step as the concatenation can be slow, especially with larger experiments (#1331)
If solver method solve() is passed a list of inputs as the inputs keyword argument, the resolution of the model for each input set is spread across several Python processes, usually running in parallel on different processors. The default number of processes is the number of processors available. solve() takes a new keyword argument nproc which can be used to set this number a manually.
Variables are now post-processed using CasADi (#1316)
Operations such as 1*x and 0+x now directly return x (#1252)
Removed Simplification class and .simplify() function (#1369)
All example notebooks in PyBaMM’s GitHub repository must now include the command pybamm.print_citations(), otherwise the tests will fail. This is to encourage people to use this command to cite the relevant papers (#1340)
Notation has been homogenised to use positive and negative electrode (instead of cathode and anode). This applies to the parameter folders (now called 'positive_electrodes' and 'negative_electrodes') and the options of active_material and particle_cracking submodels (now called 'positive' and 'negative') (#1337)
Interpolant now takes x and y instead of a single data entry (#1312)
Boolean model options (‘sei porosity change’, ‘convection’) must now be given in string format (’true’ or ‘false’ instead of True or False) (#1280)
Operations such as 1*x and 0+x now directly return x. This can be bypassed by explicitly creating the binary operators, e.g. pybamm.Multiplication(1, x) (#1252)
'Cell capacity [A.h]' has been renamed to 'Nominal cell capacity [A.h]'. 'Cell capacity [A.h]' will be deprecated in the next release. (#1352)
This release introduces a new aging model for particle mechanics, a new reduced-order model (TSPMe), and a parameter set for A123 LFP cells. Additionally, there have been several backend optimizations to speed up model creation and solving, and other minor features and bug fixes.
The parameters “Positive/Negative particle distribution in x” and “Positive/Negative surface area to volume ratio distribution in x” have been deprecated. Instead, users can provide “Positive/Negative particle radius [m]” and “Positive/Negative surface area to volume ratio [m-1]” directly as functions of through-cell position (x [m]) (#1237)
This release adds new operators for more complex models, some basic sensitivity analysis, and a spectral volumes spatial method, as well as some small bug fixes.
Added variables which track the total amount of lithium in the system (#1136)
Added Upwind and Downwind operators for convection (#1134)
Added Getting Started notebook on solver options and changing the mesh. Also added a notebook detailing the different thermal options, and a notebook explaining the steps that occur behind the scenes in the Simulation class (#1131)
Added particle submodel that use a polynomial approximation to the concentration within the electrode particles (#1130)
The “fast diffusion” particle option has been renamed “uniform profile” (#1130)
The modules containing standard parameters are now classes so they can take options
(e.g. standard_parameters_lithium_ion is now LithiumIonParameters) (#1120)
Renamed quick_plot_vars to output_variables in Simulation to be consistent with QuickPlot. Passing quick_plot_vars to Simulation.plot() has been deprecated and output_variables should be passed instead (#1099)
Simulation.specs and Simulation.set_defaults have been deprecated. Users should create a new Simulation object for each different case instead (#1090)
The solution times t_eval must now be provided to Simulation.solve() when not using an experiment or prescribing the current using drive cycle data (#1086)
Geometry should no longer be given keys ‘primary’ or ‘secondary’ (#1032)
Calls to ProcessedVariable objects are now made using dimensional time and space (#1028)
For variables discretised using finite elements the result returned by calling ProcessedVariable is now transposed (#1020)
Renamed “surface area density” to “surface area to volume ratio” (#975)
Replaced “reaction rate” with “exchange-current density” (#975)
Changed the implementation of reactions in submodels (#948)
Removed some inputs like T_inf, R_g and activation energies to some of the standard function parameters. This is because each of those inputs is specific to a particular function (e.g. the reference temperature at which the function was measured). To change a property such as the activation energy, users should create a new function, specifying the relevant property as a Parameter or InputParameter (#942)
The thermal option ‘xyz-lumped’ has been removed. The option ’thermal current collector’ has also been removed (#938)
The ‘C-rate’ parameter has been deprecated. Use ‘Current function [A]’ instead. The cell capacity can be accessed as ‘Cell capacity [A.h]’, and used to calculate current from C-rate (#952)
Add ambient temperature as a function of time (#872)
Added CasadiAlgebraicSolver for solving algebraic systems with CasADi (#868)
Added electrolyte functions from Landesfeind (#860)
Add new symbols VariableDot, representing the derivative of a variable wrt time,
and StateVectorDot, representing the derivative of a state vector wrt time
(#858)
This release introduces many new features and optimizations. All models can now be solved using the pip installation - in particular, the DFN can be solved in around 0.1s. Other highlights include an improved user interface, simulations of experimental protocols (GITT, CCCV, etc), new parameter sets for NCA and LGM50, drive cycles, “input parameters” and “external variables” for quickly solving models with different parameter values and coupling with external software, and general bug fixes and optimizations.
Added functionality to Solution that automatically gets t_eval from the data when simulating drive cycles and performs checks to ensure the output has the required resolution to accurately capture the input current (#819)
Added Citations object to print references when specific functionality is used (#818)
Updated Solution to allow exporting to matlab and csv formats (#811)
Added functionality to solve DAE models with non-smooth current inputs (#808)
Added functionality to simulate experiments and testing protocols (#807)
Added fuzzy string matching for parameters and variables (#796)
Changed ParameterValues to raise an error when a parameter that wasn’t previously defined is updated (#796)
Added some basic models (BasicSPM and BasicDFN) in order to clearly demonstrate the PyBaMM model structure for battery models (#795)
Allow initial conditions in the particle to depend on x (#786)
Added the harmonic mean to the Finite Volume method, which is now used when computing fluxes (#783)
Refactored Solution to make it a dictionary that contains all of the solution variables. This automatically creates ProcessedVariable objects when required, so that the solution can be obtained much more easily. (#781)
Added a step to discretisation that automatically compute the inverse of the mass matrix of the differential part of the problem so that the underlying DAEs can be provided in semi-explicit form, as required by the CasADi solver (#769)
Added the gradient operation for the Finite Element Method (#767)
Added InputParameter node for quickly changing parameter values (#752)
Added submodels for operating modes other than current-controlled (#751)
Changed finite volume discretisation to use exact values provided by Neumann boundary conditions when computing the gradient instead of adding ghost nodes(#748)
Added optional R(x) distribution in particle models (#745)
Generalized importing of external variables (#728)
Separated active and inactive material volume fractions (#726)
Allow abs tolerance to be set by variable for IDA KLU solver (#700)
Added Simulation class (#693) with load/save functionality (#732)
Added interface to CasADi solver (#687, #691, #714). This makes the SUNDIALS DAE solvers (Scikits and KLU) truly optional (though IDA KLU is recommended for solving the DFN).
Added option to use CasADi’s Algorithmic Differentiation framework to calculate Jacobians (#687)
Added method to evaluate parameters more easily (#669)
Added Jacobian class to reuse known Jacobians of expressions (#665)
Added Interpolant class to interpolate experimental data (e.g. OCP curves) (#661)
Added interface (via pybind11) to sundials with the IDA KLU sparse linear solver (#657)
Allowed parameters to be set by material or by specifying a particular paper (#647)
Set relative and absolute tolerances independently in solvers (#645)
Added basic method to allow (a part of) the State Vector to be updated with results obtained from another solution or package (#624)
The parameters “Bruggeman coefficient” must now be specified separately as “Bruggeman coefficient (electrolyte)” and “Bruggeman coefficient (electrode)”
The current classes (GetConstantCurrent, GetUserCurrent and GetUserData) have now been removed. Please refer to the change-input-current notebook for information on how to specify an input current
Parameter functions must now use pybamm functions instead of numpy functions (e.g. pybamm.exp instead of numpy.exp), as these are then used to construct the expression tree directly. Generally, pybamm syntax follows numpy syntax; please get in touch if a function you need is missing.
The current must now be updated by changing “Current function [A]” or “C-rate” instead of “Typical current [A]”