Releases: pybamm-team/PyBaMM
Releases · pybamm-team/PyBaMM
v24.11.2
v24.11.1
v24.11.0
Features
- Added
CoupledVariable
which provides a placeholder variable whose equation can be elsewhere in the model. (#4556) - Adds support to
pybamm.Experiment
for theoutput_variables
option in theIDAKLUSolver
. (#4534) - Adds an option "voltage as a state" that can be "false" (default) or "true". If "true" adds an explicit algebraic equation for the voltage. (#4507)
- Improved
QuickPlot
accuracy for simulations with Hermite interpolation. (#4483) - Added Hermite interpolation to the (
IDAKLUSolver
) that improves the accuracy and performance of post-processing variables. (#4464) - Added basic telemetry to record which functions are being run. See Telemetry section in the User Guide for more information. (#4441)
- Added
BasicDFN
model for sodium-ion batteries (#4451) - Added sensitivity calculation support for
pybamm.Simulation
andpybamm.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 accompanyingpybamm.DiscreteTimeData
class to store the data times and values (#4501)
Optimizations
- Performance refactor of JAX BDF Solver with default Jax method set to
"BDF"
. (#4456) - Improved performance of initialization and reinitialization of ODEs in the (
IDAKLUSolver
). (#4453) - Removed the
start_step_offset
setting and disabled minimumdt
warnings for drive cycles with the (IDAKLUSolver
). (#4416)
Bug Fixes
- 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 toSign
which was erroneously omitted previously. (#4517) - Fixed bug where IDAKLU solver failed when
output variables
were specified and an extrapolation event is present. (#4440)
Breaking changes
- Deprecated
pybamm.Simulation.set_parameters
andpybamm.Simulation.set_up_and_parameterise_experiment
functions inpybamm/simulation.py
. (#3752) - Removed all instances of
param = self.param
and now directly accessself.param
across the codebase. This change simplifies parameter references and enhances readability. (#4484) - Removed the deprecation warning for the chemistry argument in
pybamm.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 toadd_events_from
to better reflect its purpose. (#4421)
v24.9.0
Features
- Added additional user-configurable options to the (
IDAKLUSolver
) and adjusted the default values to improve performance. (#4282) - Added the diffusion element to be used in the Thevenin model. (#4254)
Optimizations
- Update
IDAKLU
tests and benchmarks to use adaptive time stepping. (#4390) - Improved adaptive time-stepping performance of the (
IDAKLUSolver
). (#4351) - Improved performance and reliability of DAE consistent initialization. (#4301)
- Replaced rounded Faraday constant with its exact value in
bpx.py
for better comparison between different tools. (#4290)
Bug Fixes
- Fixed memory issue that caused failure when
output variables
were specified with (IDAKLUSolver
). (#4379) - Fixed bug where IDAKLU solver failed when
output variables
were specified and an event triggered. (#4300)
Breaking changes
v24.5
Features
- 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 toL_inner_0 / 10000
andL_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 forExperiment.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
inBaseSolver.solve()
to be constructed with contextfork
. Adds small example for multiprocess inputs. (#3974) - Lithium plating now works on composite electrodes (#3919)
- Added lithium plating parameters to
Ecker2015
andEcker2015_graphite_halfcell
parameter sets (#3919) - Added custom experiment steps (#3835)
- 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) - Modified
step
function to take an array of timet_eval
as an argument and deprecated use ofnpts
. (#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 inprint_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)
- Added a JAX interface to the IDAKLU solver (#3658)
Bug Fixes
- 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 byParameterValues.update({name:value})
andSolver.solve(inputs={name:value})
. Fixes parameter translation from old name to new name, with corrected tests. (#4072 - Set the
remove_independent_variables_from_rhs
toFalse
by default, and moved the option fromDiscretisation.process_model
toDiscretisation.__init__
. This fixes a bug related to the discharge capacity, but may make the simulation slower in some cases. To set the option toTrue
, useSimulation(..., 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) - Added scale to dead lithium variable (#3919)
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 bothSimulation
andSolution
objects. Added new methods in bothSimulation
andSolution
classes for allow the syntaxsimulation.plot_voltage_components
andsolution.plot_voltage_components
. Updatedtest_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)
- Allow input parameters in ESOH model (#3921)
- Use casadi MX.interpn_linear function instead of plugin to fix casadi_interpolant_linear.dll not found on Windows (#4077)
Optimizations
- Sped up initialization of a
ProcessedVariable
by making the internalxarray.DataArray
initialization lazy (only gets created if interpolation is needed) (#3862)
Breaking changes
- 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 underpybamm/input/parameters
have not been removed. (#4098) - Removed
check_model
argument fromSimulation.solve
. To change thecheck_model
option, useSimulation(..., 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
andJAX
) pre-installed. (#3992) - Removed support for Python 3.8 (#3961)
- 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 thepybamm[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 thepybamm[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)
- Dropped support for BPX version 0.3.0 and below (#3414)
- The function
get_spatial_var
in `pybamm.Qui...
v24.5rc2
Features
- 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 toL_inner_0 / 10000
andL_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 forExperiment.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
inBaseSolver.solve()
to be constructed with contextfork
. Adds small example for multiprocess inputs. (#3974) - Lithium plating now works on composite electrodes (#3919)
- Added lithium plating parameters to
Ecker2015
andEcker2015_graphite_halfcell
parameter sets (#3919) - Added custom experiment steps (#3835)
- 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) - Modified
step
function to take an array of timet_eval
as an argument and deprecated use ofnpts
. (#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 inprint_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)
Bug Fixes
- 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 byParameterValues.update({name:value})
andSolver.solve(inputs={name:value})
. Fixes parameter translation from old name to new name, with corrected tests. (#4072 - Set the
remove_independent_variables_from_rhs
toFalse
by default, and moved the option fromDiscretisation.process_model
toDiscretisation.__init__
. This fixes a bug related to the discharge capacity, but may make the simulation slower in some cases. To set the option toTrue
, useSimulation(..., 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) - Added scale to dead lithium variable (#3919)
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 bothSimulation
andSolution
objects. Added new methods in bothSimulation
andSolution
classes for allow the syntaxsimulation.plot_voltage_components
andsolution.plot_voltage_components
. Updatedtest_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)
- Allow input parameters in ESOH model (#3921)
- Use casadi MX.interpn_linear function instead of plugin to fix casadi_interpolant_linear.dll not found on Windows (#4077)
Optimizations
- Sped up initialization of a
ProcessedVariable
by making the internalxarray.DataArray
initialization lazy (only gets created if interpolation is needed) (#3862)
Breaking changes
- 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 underpybamm/input/parameters
have not been removed. (#4098) - Removed
check_model
argument fromSimulation.solve
. To change thecheck_model
option, useSimulation(..., 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
andJAX
) pre-installed. (#3992) - Removed support for Python 3.8 (#3961)
- 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 thepybamm[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 thepybamm[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)
- Dropped support for BPX version 0.3.0 and below (#3414)
v24.5rc1
Features
- 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 toL_inner_0 / 10000
andL_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 forExperiment.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
inBaseSolver.solve()
to be constructed with contextfork
. Adds small example for multiprocess inputs. (#3974) - Lithium plating now works on composite electrodes (#3919)
- Added lithium plating parameters to
Ecker2015
andEcker2015_graphite_halfcell
parameter sets (#3919) - Added custom experiment steps (#3835)
- 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) - Modified
step
function to take an array of timet_eval
as an argument and deprecated use ofnpts
. (#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 inprint_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)
Bug Fixes
- 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 byParameterValues.update({name:value})
andSolver.solve(inputs={name:value})
. Fixes parameter translation from old name to new name, with corrected tests. (#4072 - Set the
remove_independent_variables_from_rhs
toFalse
by default, and moved the option fromDiscretisation.process_model
toDiscretisation.__init__
. This fixes a bug related to the discharge capacity, but may make the simulation slower in some cases. To set the option toTrue
, useSimulation(..., 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) - Added scale to dead lithium variable (#3919)
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 bothSimulation
andSolution
objects. Added new methods in bothSimulation
andSolution
classes for allow the syntaxsimulation.plot_voltage_components
andsolution.plot_voltage_components
. Updatedtest_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)
- Allow input parameters in ESOH model (#3921)
- Use casadi MX.interpn_linear function instead of plugin to fix casadi_interpolant_linear.dll not found on Windows (#4077)
Optimizations
- Sped up initialization of a
ProcessedVariable
by making the internalxarray.DataArray
initialization lazy (only gets created if interpolation is needed) (#3862)
Breaking changes
- 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 underpybamm/input/parameters
have not been removed. (#4098) - Removed
check_model
argument fromSimulation.solve
. To change thecheck_model
option, useSimulation(..., 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
andJAX
) pre-installed. (#3992) - Removed support for Python 3.8 (#3961)
- 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 thepybamm[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 thepybamm[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)
- Dropped support for BPX version 0.3.0 and below ([#3414](https://github.com/pybamm-team/PyBaMM/pull/...
v24.5rc0
Features
- 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 toL_inner_0 / 10000
andL_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 forExperiment.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
inBaseSolver.solve()
to be constructed with contextfork
. Adds small example for multiprocess inputs. (#3974) - Lithium plating now works on composite electrodes (#3919)
- Added lithium plating parameters to
Ecker2015
andEcker2015_graphite_halfcell
parameter sets (#3919) - Added custom experiment steps (#3835)
- 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) - Modified
step
function to take an array of timet_eval
as an argument and deprecated use ofnpts
. (#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 inprint_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)
Bug Fixes
- 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 byParameterValues.update({name:value})
andSolver.solve(inputs={name:value})
. Fixes parameter translation from old name to new name, with corrected tests. (#4072 - Set the
remove_independent_variables_from_rhs
toFalse
by default, and moved the option fromDiscretisation.process_model
toDiscretisation.__init__
. This fixes a bug related to the discharge capacity, but may make the simulation slower in some cases. To set the option toTrue
, useSimulation(..., 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) - Added scale to dead lithium variable (#3919)
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 bothSimulation
andSolution
objects. Added new methods in bothSimulation
andSolution
classes for allow the syntaxsimulation.plot_voltage_components
andsolution.plot_voltage_components
. Updatedtest_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)
- Allow input parameters in ESOH model (#3921)
- Use casadi MX.interpn_linear function instead of plugin to fix casadi_interpolant_linear.dll not found on Windows (#4077)
Optimizations
- Sped up initialization of a
ProcessedVariable
by making the internalxarray.DataArray
initialization lazy (only gets created if interpolation is needed) (#3862)
Breaking changes
- 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 underpybamm/input/parameters
have not been removed. (#4098) - Removed
check_model
argument fromSimulation.solve
. To change thecheck_model
option, useSimulation(..., 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
andJAX
) pre-installed. (#3992) - Removed support for Python 3.8 (#3961)
- 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 thepybamm[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 thepybamm[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)
- Dropped support for BPX version 0.3.0 and below (#3414)
v24.1
Features
- The
pybamm_install_odes
command now includes support for macOS systems and can be used to set up SUNDIALS and install thescikits.odes
solver on macOS (#3417, #3706) - Added support for Python 3.12 (#3531)
- Added method to get QuickPlot axes by variable (#3596)
- Added custom experiment terminations (#3596)
- 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
, topybamm.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) - Mechanical parameters are now a function of stoichiometry and temperature (#3576)
Bug fixes
- Fixed a bug that lead to a
ShapeError
when specifying "Ambient temperature [K]" as anInterpolant
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]"
, notf"{Domain} lithium plating concentration [mol.m-3]"
as it did previously. (#3485)
Optimizations
- Updated
jax
andjaxlib
to the latest available versions and added Windows (Python 3.9+) support for the Jax solver (#3550)
Breaking changes
- The parameters
GeometricParameters.A_cooling
andGeometricParameters.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)