Fast and flexible physics-based battery models in Python
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, #3706)EvaluateAt
, that evaluates a spatial variable at a given position (#3573)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)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)ShapeError
when specifying "Ambient temperature [K]" as an Interpolant
with an isothermal model (#3761)f"{Domain} dead lithium concentration [mol.m-3]"
, not f"{Domain} lithium plating concentration [mol.m-3]"
as it did previously. (#3485)jax
and jaxlib
to the latest available versions and added Windows (Python 3.9+) support for the Jax solver (#3550)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)[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)ShapeError
when specifying "Ambient temperature [K]" as an Interpolant
with an isothermal model (#3761)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)EvaluateAt
, that evaluates a spatial variable at a given position (#3573)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)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)f"{Domain} dead lithium concentration [mol.m-3]"
, not f"{Domain} lithium plating concentration [mol.m-3]"
as it did previously. (#3485)jax
and jaxlib
to the latest available versions and added Windows (Python 3.9+) support for the Jax solver (#3550)[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)(y,z)
and time t
. The "edge" and "current collector" heat transfer coefficient parameters can also depend on (y,z)
(#3257)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)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)pybamm_install_jax
is deprecated. It is now replaced with pip install pybamm[jax]
(#3163)rpt-experiment
to demonstrate how to set up degradation experiments with RPTs (#2851)electrode_thickness_change
(#3329).check_ys_are_not_too_large
when trying to reference y-slice
where the referenced variable was not a pybamm.StateVector
(#3313
_Heaviside._evaluate_for_shape
which meant some expressions involving heaviside function and subtractions did not work (#3306)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
create_from_bpx()
(#3242)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)starting_solution
and last_state
(#3177)starting_solution
to work with start_time
experiments (#3177)Time [s]
, Time [min]
, Time [h]
(#3143)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)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)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)OptionWarning
is raised to let users know to update their parameters (#3257)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)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)SEI thickness [m]
, use Negative SEI thickness [m]
or Positive SEI thickness [m]
. (#3198)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)pybamm_install_jax
is deprecated. It is now replaced with pip install pybamm[jax]
(#3163)pip install pybamm[option]
e.g. pybamm[plot]
(#3044, #3475)(y,z)
and time t
. The "edge" and "current collector" heat transfer coefficient parameters can also depend on (y,z)
(#3257)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)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)pybamm_install_jax
is deprecated. It is now replaced with pip install pybamm[jax]
(#3163)rpt-experiment
to demonstrate how to set up degradation experiments with RPTs (#2851)electrode_thickness_change
(#3329).check_ys_are_not_too_large
when trying to reference y-slice
where the referenced variable was not a pybamm.StateVector
(#3313
_Heaviside._evaluate_for_shape
which meant some expressions involving heaviside function and subtractions did not work (#3306)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
create_from_bpx()
(#3242)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)starting_solution
and last_state
(#3177)starting_solution
to work with start_time
experiments (#3177)Time [s]
, Time [min]
, Time [h]
(#3143)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)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)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)OptionWarning
is raised to let users know to update their parameters (#3257)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)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)SEI thickness [m]
, use Negative SEI thickness [m]
or Positive SEI thickness [m]
. (#3198)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)pybamm_install_jax
is deprecated. It is now replaced with pip install pybamm[jax]
(#3163)pip install pybamm[option]
e.g. pybamm[plot]
(#3044)solution.save_data()
is called (#2931)start_time
to define when each step should be triggered (#2616)JaxSolver
's compatibility with Python 3.8
, 3.9
, 3.10
, and 3.11
(#2958)pybamm_install_odes
and update the required SUNDIALS version (#2958)bpx.py
to correctly generate parameters for "lumped" thermal model (#2860)solution.save_data()
is called (#2931)start_time
to define when each step should be triggered (#2616)JaxSolver
's compatibility with Python 3.8
, 3.9
, 3.10
, and 3.11
(#2958)importlib_metadata
as a required dependency for user installations (#3050)pybamm_install_odes
and update the required SUNDIALS version (#2958)bpx.py
to correctly generate parameters for "lumped" thermal model (#2860)