pybop.models.lithium_ion.echem_base#

Classes#

EChemBaseModel

Overwrites and extends BaseModel class for electrochemical PyBaMM models.

Module Contents#

class pybop.models.lithium_ion.echem_base.EChemBaseModel[source]#

Bases: pybop.models.base_model.BaseModel

Overwrites and extends BaseModel class for electrochemical PyBaMM models.

_check_params(inputs=None, parameter_set=None, allow_infeasible_solutions=True)[source]#

Check compatibility of the model parameters.

Parameters:
  • inputs (dict) – 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

approximate_capacity(x)[source]#

Calculate and update an estimate for the nominal cell capacity based on the theoretical energy density and an average voltage.

The nominal capacity is computed by dividing the theoretical energy (in watt-hours) by the average open circuit potential (voltage) of the cell.

Parameters:

x (array-like) – An array of values representing the model inputs.

Returns:

The nominal cell capacity is updated directly in the model’s parameter set.

Return type:

None

cell_mass(parameter_set=None)[source]#

Calculate the total cell mass in kilograms.

This method uses the provided parameter set to calculate the mass of different components of the cell, such as electrodes, separator, and current collectors, based on their densities, porosities, and thicknesses. It then calculates the total mass by summing the mass of each component.

Parameters:

parameter_set (dict, optional) – A dictionary containing the parameter values necessary for the mass calculations.

Returns:

The total mass of the cell in kilograms.

Return type:

float

cell_volume(parameter_set=None)[source]#

Calculate the total cell volume in m3.

This method uses the provided parameter set to calculate the total thickness of the cell including electrodes, separator, and current collectors. It then calculates the volume by multiplying by the cross-sectional area.

Parameters:

parameter_set (dict, optional) – A dictionary containing the parameter values necessary for the volume calculation.

Returns:

The total volume of the cell in m3.

Return type:

float

set_rebuild_parameters()[source]#

Sets the parameters that can be changed when rebuilding the model.

Returns:

A dictionary of parameters that can be changed when rebuilding the model.

Return type:

dict