pybop.models.empirical.base_ecm#

Classes#

ECircuitModel

Overwrites and extends BaseModel class for circuit-based PyBaMM models.

Module Contents#

class pybop.models.empirical.base_ecm.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.BaseModel

Overwrites 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