pybop.models.empirical#
Submodules#
Classes#
Overwrites and extends BaseModel class for circuit-based PyBaMM models. |
|
The Thevenin class represents an equivalent circuit model based on the Thevenin model in PyBaMM. |
Package Contents#
- class pybop.models.empirical.ECircuitModel(pybamm_model, name='Empirical Base Model', parameter_set=None, geometry=None, submesh_types=None, var_pts=None, spatial_methods=None, solver=None, **model_kwargs)[source]#
Bases:
pybop.models.base_model.BaseModelOverwrites and extends BaseModel class for circuit-based PyBaMM models.
- Parameters:
pybamm_model (pybamm.BaseModel) – A subclass of the pybamm Base Model.
name (str, optional) – The name for the model instance, defaulting to “Empirical Base Model”.
parameter_set (pybamm.ParameterValues or dict, optional) – The parameters for the model. If None, default parameters provided by PyBaMM are used.
geometry (dict, optional) – The geometry definitions for the model. If None, default geometry from PyBaMM is used.
submesh_types (dict, optional) – The types of submeshes to use. If None, default submesh types from PyBaMM are used.
var_pts (dict, optional) – The discretization points for each variable in the model. If None, default points from PyBaMM are used.
spatial_methods (dict, optional) – The spatial methods used for discretization. If None, default spatial methods from PyBaMM are used.
solver (pybamm.Solver, optional) – The solver to use for simulating the model. If None, the default solver from PyBaMM is used.
**model_kwargs (optional) –
Valid PyBaMM model option keys and their values. For example, build : bool, 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.
- _check_params(inputs: pybop.models.base_model.Inputs = None, allow_infeasible_solutions=True)[source]#
Check the compatibility of the model parameters.
- Parameters:
inputs (Inputs) – The input parameters for the simulation.
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
- class pybop.models.empirical.Thevenin(name='Equivalent Circuit Thevenin Model', **model_kwargs)[source]#
Bases:
pybop.models.empirical.base_ecm.ECircuitModelThe Thevenin class represents an equivalent circuit model based on the Thevenin model in PyBaMM.
This class encapsulates the PyBaMM equivalent circuit Thevenin model, providing an interface to define the parameters, geometry, submesh types, variable points, spatial methods, and solver to be used for simulations.
- Parameters:
name (str, optional) – A name for the model instance. Defaults to “Equivalent Circuit Thevenin 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.
- 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.
- _check_params(inputs: pybop.parameters.parameter.Inputs = None, allow_infeasible_solutions=True)[source]#
Check the compatibility of the model parameters.
- Parameters:
inputs (Inputs) – The input parameters for the simulation.
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