EIS Simulation#

class pybamm.EISSimulation(model, parameter_values=None, geometry=None, submesh_types=None, var_pts=None, spatial_methods=None)[source]#

Frequency-domain EIS simulation built on BaseSimulation.

Parameters:
  • model (pybamm.BaseModel) – The model to be simulated.

  • parameter_values (pybamm.ParameterValues, optional) – Parameters and their corresponding numerical values.

  • geometry (pybamm.Geometry, optional) – The geometry upon which to solve the model.

  • submesh_types (dict, optional) – A dictionary of the types of submesh to use on each subdomain.

  • var_pts (dict, optional) – A dictionary of the number of points used by each spatial variable.

  • spatial_methods (dict, optional) – A dictionary of the types of spatial method to use on each domain.

Extends: pybamm.simulation.base_simulation.BaseSimulation

nyquist_plot(**kwargs)[source]#

Generate a Nyquist plot from the most recent solution.

Parameters:

**kwargs – Keyword arguments forwarded to pybamm.nyquist_plot().

Returns:

  • fig (matplotlib.figure.Figure or None)

  • ax (matplotlib.axes.Axes)

solve(frequencies, inputs=None, initial_soc=None)[source]#

Compute impedance at the given frequencies.

Solves the linear system (i*omega*M - J) x = b at each frequency using a direct sparse solver.

Parameters:
  • frequencies (array-like) – Frequencies in Hz at which to compute impedance.

  • inputs (dict, optional) – Input parameters to pass to the model.

  • initial_soc (float or str, optional) – Initial State of Charge. If given, the model is rebuilt with the new SOC before solving.

Returns:

Solution containing frequencies and complex impedance values.

Return type:

pybamm.EISSolution