pybop.models.lithium_ion.echem#
Classes#
Wraps the Doyle-Fuller-Newman (DFN) model for simulating lithium-ion batteries, as implemented in PyBaMM. |
|
Represents the grouped-parameter version of the Single Particle Model. |
|
Represents the grouped-parameter version of the Single Particle Model with Electrolyte (SPMe). |
|
Wraps the Many Particle Model (MPM) for simulating lithium-ion batteries, as implemented in PyBaMM. |
|
Wraps the Multi-Species Multi-Reaction (MSMR) model for simulating lithium-ion batteries, as implemented in PyBaMM. |
|
Represents the Single Particle Diffusion Model for GITT pulses. |
|
Wraps the Single Particle Model (SPM) for simulating lithium-ion batteries, as implemented in PyBaMM. |
|
Represents the Single Particle Model with Electrolyte (SPMe) for lithium-ion batteries. |
|
Represents the Weppner & Huggins model for GITT pulses. |
Module Contents#
- class pybop.models.lithium_ion.echem.DFN(name='Doyle-Fuller-Newman Model', eis: bool = False, **model_kwargs)[source]#
Bases:
pybop.models.lithium_ion.base_echem.EChemBaseModelWraps the Doyle-Fuller-Newman (DFN) model for simulating lithium-ion batteries, as implemented in PyBaMM.
The DFN represents lithium-ion battery dynamics using multiple spherical particles to simulate the behaviour of the negative and positive electrodes. This model includes electrolyte dynamics, solid-phase diffusion, and Butler-Volmer kinetics. This model is the full-order representation used to reduce to the SPM, and SPMe models.
- Parameters:
name (str, optional) – A name for the model instance, defaulting to “Doyle-Fuller-Newman Model”.
eis (bool, optional) – A flag to build the forward model for EIS predictions. Defaults to False.
**model_kwargs (optional) –
Valid PyBaMM model option keys and their values, for example: parameter_set : pybamm.ParameterValues or dict, optional
The parameters for the model. If None, default parameters provided by PyBaMM are used.
- geometrydict, optional
The geometry definitions for the model. If None, default geometry from PyBaMM is used.
- submesh_typesdict, optional
The types of submeshes to use. If None, default submesh types from PyBaMM are used.
- var_ptsdict, optional
The discretization points for each variable in the model. If None, default points from PyBaMM are used.
- spatial_methodsdict, optional
The spatial methods used for discretization. If None, default spatial methods from PyBaMM are used.
- solverpybamm.Solver, optional
The solver to use for simulating the model. If None, the default solver from PyBaMM is used.
- buildbool, optional
If True, the model is built upon creation (default: False).
- optionsdict, optional
A dictionary of options to customise the behaviour of the PyBaMM model.
- class pybop.models.lithium_ion.echem.GroupedSPM(name='Grouped Single Particle Model', eis=False, **model_kwargs)[source]#
Bases:
pybop.models.lithium_ion.base_echem.EChemBaseModelRepresents the grouped-parameter version of the Single Particle Model.
- Parameters:
name (str, optional) – A name for the model instance, defaulting to “Grouped Single Particle Model”.
**model_kwargs (optional) –
Valid PyBaMM model option keys and their values, for example: parameter_set : pybamm.ParameterValues or dict, optional
The parameters for the model. If None, default parameters provided by PyBaMM are used.
- geometrydict, optional
The geometry definitions for the model. If None, default geometry from PyBaMM is used.
- submesh_typesdict, optional
The types of submeshes to use. If None, default submesh types from PyBaMM are used.
- var_ptsdict, optional
The discretization points for each variable in the model. If None, default points from PyBaMM are used.
- spatial_methodsdict, optional
The spatial methods used for discretization. If None, default spatial methods from PyBaMM are used.
- solverpybamm.Solver, optional
The solver to use for simulating the model. If None, the default solver from PyBaMM is used.
- optionsdict, optional
A dictionary of options to customise the behaviour of the PyBaMM model.
- _check_params(inputs, parameter_set, allow_infeasible_solutions)[source]#
Check compatibility of the model parameters.
- Parameters:
inputs (Inputs) – The input parameters for the simulation.
parameter_set (pybop.ParameterSet) – A PyBOP parameter set object or a dictionary containing the parameter values.
allow_infeasible_solutions (bool, optional) – If True, infeasible parameter values will be allowed in the optimisation (default: True).
- Returns:
A boolean which signifies whether the parameters are compatible.
- Return type:
bool
- _set_initial_state(initial_state: dict, inputs=None)[source]#
Set the initial state of charge for the grouped SPMe. Inputs are not used.
- Parameters:
initial_state (dict) – A valid initial state, e.g. the initial state of charge or open-circuit voltage.
inputs (Inputs, optional) – The input parameters to be used when building the model.
- class pybop.models.lithium_ion.echem.GroupedSPMe(name='Grouped Single Particle Model with Electrolyte', eis=False, **model_kwargs)[source]#
Bases:
pybop.models.lithium_ion.base_echem.EChemBaseModelRepresents the grouped-parameter version of the Single Particle Model with Electrolyte (SPMe).
- Parameters:
name (str, optional) – A name for the model instance, defaulting to “Grouped Single Particle Model with Electrolyte”.
**model_kwargs (optional) –
Valid PyBaMM model option keys and their values, for example: parameter_set : pybamm.ParameterValues or dict, optional
The parameters for the model. If None, default parameters provided by PyBaMM are used.
- geometrydict, optional
The geometry definitions for the model. If None, default geometry from PyBaMM is used.
- submesh_typesdict, optional
The types of submeshes to use. If None, default submesh types from PyBaMM are used.
- var_ptsdict, optional
The discretization points for each variable in the model. If None, default points from PyBaMM are used.
- spatial_methodsdict, optional
The spatial methods used for discretization. If None, default spatial methods from PyBaMM are used.
- solverpybamm.Solver, optional
The solver to use for simulating the model. If None, the default solver from PyBaMM is used.
- optionsdict, optional
A dictionary of options to customise the behaviour of the PyBaMM model.
- _check_params(inputs, parameter_set, allow_infeasible_solutions)[source]#
Check compatibility of the model parameters.
- Parameters:
inputs (Inputs) – The input parameters for the simulation.
parameter_set (pybop.ParameterSet) – A PyBOP parameter set object or a dictionary containing the parameter values.
allow_infeasible_solutions (bool, optional) – If True, infeasible parameter values will be allowed in the optimisation (default: True).
- Returns:
A boolean which signifies whether the parameters are compatible.
- Return type:
bool
- _set_initial_state(initial_state: dict, inputs=None)[source]#
Set the initial state of charge for the grouped SPMe. Inputs are not used.
- Parameters:
initial_state (dict) – A valid initial state, e.g. the initial state of charge or open-circuit voltage.
inputs (Inputs, optional) – The input parameters to be used when building the model.
- class pybop.models.lithium_ion.echem.MPM(name='Many Particle Model', eis: bool = False, **model_kwargs)[source]#
Bases:
pybop.models.lithium_ion.base_echem.EChemBaseModelWraps the Many Particle Model (MPM) for simulating lithium-ion batteries, as implemented in PyBaMM.
The MPM represents lithium-ion battery dynamics using a distribution of spherical particles for each electrode. This model inherits the SPM class.
- Parameters:
name (str, optional) – A name for the model instance, defaulting to “Many Particle Model”.
eis (bool, optional) – A flag to build the forward model for EIS predictions. Defaults to False.
**model_kwargs (optional) –
Valid PyBaMM model option keys and their values, for example: parameter_set : pybamm.ParameterValues or dict, optional
The parameters for the model. If None, default parameters provided by PyBaMM are used.
- geometrydict, optional
The geometry definitions for the model. If None, default geometry from PyBaMM is used.
- submesh_typesdict, optional
The types of submeshes to use. If None, default submesh types from PyBaMM are used.
- var_ptsdict, optional
The discretization points for each variable in the model. If None, default points from PyBaMM are used.
- spatial_methodsdict, optional
The spatial methods used for discretization. If None, default spatial methods from PyBaMM are used.
- solverpybamm.Solver, optional
The solver to use for simulating the model. If None, the default solver from PyBaMM is used.
- buildbool, optional
If True, the model is built upon creation (default: False).
- optionsdict, optional
A dictionary of options to customise the behaviour of the PyBaMM model.
- class pybop.models.lithium_ion.echem.MSMR(name='Multi-Species Multi-Reaction Model', eis: bool = False, **model_kwargs)[source]#
Bases:
pybop.models.lithium_ion.base_echem.EChemBaseModelWraps the Multi-Species Multi-Reaction (MSMR) model for simulating lithium-ion batteries, as implemented in PyBaMM.
The MSMR represents lithium-ion battery dynamics using a distribution of spherical particles for each electrode. This model inherits the DFN class.
- Parameters:
name (str, optional) – A name for the model instance, defaulting to “Multi-Species Multi-Reaction Model”.
eis (bool, optional) – A flag to build the forward model for EIS predictions. Defaults to False.
**model_kwargs (optional) –
Valid PyBaMM model option keys and their values, for example: parameter_set : pybamm.ParameterValues or dict, optional
The parameters for the model. If None, default parameters provided by PyBaMM are used.
- geometrydict, optional
The geometry definitions for the model. If None, default geometry from PyBaMM is used.
- submesh_typesdict, optional
The types of submeshes to use. If None, default submesh types from PyBaMM are used.
- var_ptsdict, optional
The discretization points for each variable in the model. If None, default points from PyBaMM are used.
- spatial_methodsdict, optional
The spatial methods used for discretization. If None, default spatial methods from PyBaMM are used.
- solverpybamm.Solver, optional
The solver to use for simulating the model. If None, the default solver from PyBaMM is used.
- buildbool, optional
If True, the model is built upon creation (default: False).
- optionsdict, optional
A dictionary of options to customise the behaviour of the PyBaMM model.
- class pybop.models.lithium_ion.echem.SPDiffusion(name='Single Particle Diffusion Model', eis: bool = False, **model_kwargs)[source]#
Bases:
pybop.models.lithium_ion.base_echem.EChemBaseModelRepresents the Single Particle Diffusion Model for GITT pulses.
- Parameters:
name (str, optional) – A name for the model instance, defaulting to “Single Particle Diffusion Model”.
eis (bool, optional) – A flag to build the forward model for EIS predictions. Defaults to False.
**model_kwargs (optional) –
Valid PyBaMM model option keys and their values, for example: parameter_set : pybamm.ParameterValues or dict, optional
The parameters for the model. If None, default parameters provided by PyBaMM are used.
- optionsdict, optional
A dictionary of options to customise the behaviour of the PyBaMM model.
- _check_params(inputs, parameter_set, allow_infeasible_solutions)[source]#
Check compatibility of the model parameters.
- Parameters:
inputs (Inputs) – The input parameters for the simulation.
parameter_set (pybop.ParameterSet) – A PyBOP parameter set object or a dictionary containing the parameter values.
allow_infeasible_solutions (bool, optional) – If True, infeasible parameter values will be allowed in the optimisation (default: True).
- Returns:
A boolean which signifies whether the parameters are compatible.
- Return type:
bool
- _set_initial_state(initial_state: dict, inputs=None)[source]#
Set the initial state of charge for the grouped SPMe. Inputs are not used.
- Parameters:
initial_state (dict) – A valid initial state, e.g. the initial state of charge or open-circuit voltage.
inputs (Inputs, optional) – The input parameters to be used when building the model.
- class pybop.models.lithium_ion.echem.SPM(name='Single Particle Model', eis: bool = False, **model_kwargs)[source]#
Bases:
pybop.models.lithium_ion.base_echem.EChemBaseModelWraps the Single Particle Model (SPM) for simulating lithium-ion batteries, as implemented in PyBaMM.
The SPM is a simplified physics-based model that represents a lithium-ion cell using a single spherical particle to simulate the behaviour of the negative and positive electrodes.
- Parameters:
name (str, optional) – A name for the model instance, defaulting to “Single Particle Model”.
eis (bool, optional) – A flag to build the forward model for EIS predictions. Defaults to False.
**model_kwargs (optional) –
Valid PyBaMM model option keys and their values, for example: parameter_set : pybamm.ParameterValues or dict, optional
The parameters for the model. If None, default parameters provided by PyBaMM are used.
- geometrydict, optional
The geometry definitions for the model. If None, default geometry from PyBaMM is used.
- submesh_typesdict, optional
The types of submeshes to use. If None, default submesh types from PyBaMM are used.
- var_ptsdict, optional
The discretization points for each variable in the model. If None, default points from PyBaMM are used.
- spatial_methodsdict, optional
The spatial methods used for discretization. If None, default spatial methods from PyBaMM are used.
- solverpybamm.Solver, optional
The solver to use for simulating the model. If None, the default solver from PyBaMM is used.
- buildbool, optional
If True, the model is built upon creation (default: False).
- optionsdict, optional
A dictionary of options to customise the behaviour of the PyBaMM model.
- class pybop.models.lithium_ion.echem.SPMe(name='Single Particle Model with Electrolyte', eis: bool = False, **model_kwargs)[source]#
Bases:
pybop.models.lithium_ion.base_echem.EChemBaseModelRepresents the Single Particle Model with Electrolyte (SPMe) for lithium-ion batteries.
The SPMe extends the basic Single Particle Model (SPM) by incorporating electrolyte dynamics, making it suitable for simulations where electrolyte effects are non-negligible. This class provides a framework to define the model parameters, geometry, mesh types, discretization points, spatial methods, and numerical solvers for simulation within the PyBaMM ecosystem.
- Parameters:
name (str, optional) – A name for the model instance, defaulting to “Single Particle Model with Electrolyte”.
eis (bool, optional) – A flag to build the forward model for EIS predictions. Defaults to False.
**model_kwargs (optional) –
Valid PyBaMM model option keys and their values, for example: parameter_set : pybamm.ParameterValues or dict, optional
The parameters for the model. If None, default parameters provided by PyBaMM are used.
- geometrydict, optional
The geometry definitions for the model. If None, default geometry from PyBaMM is used.
- submesh_typesdict, optional
The types of submeshes to use. If None, default submesh types from PyBaMM are used.
- var_ptsdict, optional
The discretization points for each variable in the model. If None, default points from PyBaMM are used.
- spatial_methodsdict, optional
The spatial methods used for discretization. If None, default spatial methods from PyBaMM are used.
- solverpybamm.Solver, optional
The solver to use for simulating the model. If None, the default solver from PyBaMM is used.
- buildbool, optional
If True, the model is built upon creation (default: False).
- optionsdict, optional
A dictionary of options to customise the behaviour of the PyBaMM model.
- class pybop.models.lithium_ion.echem.WeppnerHuggins(name='Weppner & Huggins Model', eis: bool = False, **model_kwargs)[source]#
Bases:
pybop.models.lithium_ion.base_echem.EChemBaseModelRepresents the Weppner & Huggins model for GITT pulses.
- Parameters:
name (str, optional) – A name for the model instance, defaulting to “Weppner & Huggins Model”.
eis (bool, optional) – A flag to build the forward model for EIS predictions. Defaults to False.
**model_kwargs (optional) –
Valid PyBaMM model option keys and their values, for example: parameter_set : pybamm.ParameterValues or dict, optional
The parameters for the model. If None, default parameters provided by PyBaMM are used.
- optionsdict, optional
A dictionary of options to customise the behaviour of the PyBaMM model.
- _check_params(inputs, parameter_set, allow_infeasible_solutions)[source]#
Check compatibility of the model parameters.
- Parameters:
inputs (Inputs) – The input parameters for the simulation.
parameter_set (pybop.ParameterSet) – A PyBOP parameter set object or a dictionary containing the parameter values.
allow_infeasible_solutions (bool, optional) – If True, infeasible parameter values will be allowed in the optimisation (default: True).
- Returns:
A boolean which signifies whether the parameters are compatible.
- Return type:
bool