Half-Cell Pipelines

Pre-built dictionaries of pipeline elements to use in half-cell workflows. Note that in PyBaMM simulations, the Li metal counter electrode is referred to as the “Negative electrode” and the working electrode is referred to as the “Positive electrode”.

ionworkspipeline.pipelines.half_cell.defaults(c_e=1000, T=298.15)

Returns a dictionary of pipeline elements that are used to generate the default parameters for a lithium counter electrode and electrolyte in a half-cell model.

Parameters

c_efloat, optional

The concentration of lithium in the electrolyte in mol/m^3. The default is 1000.

Tfloat, optional

The temperature in K. The default is 298.15.

ionworkspipeline.pipelines.half_cell.ocp_msmr(electrode, data, params_to_fit, objective_kwargs=None, datafit_kwargs=None)

Returns a dictionary of pipeline elements that are used to fit the parameters for the MSMR model of the open circuit potential (OCP).

Parameters

electrodestr

The electrode to fit the parameters for. This should be either “positive” or “negative”.

datapandas.DataFrame

The data to use for the fit.

params_to_fitdict

A dictionary of parameters to fit. The keys should be the names of the parameters, and the values should be ionworkspipeline.Parameter objects.

objective_kwargsdict, optional

A dictionary of options to pass to the objective.

datafit_kwargsdict, optional

A dictionary of options to pass to the data fit.

ionworkspipeline.pipelines.half_cell.ocp_msmr_interpolant(electrode, data, params_to_fit, objective_kwargs=None, datafit_kwargs=None, voltage_limits=None)

Returns a dictionary of pipeline elements that are used to fit the parameters for the MSMR model of the open circuit potential (OCP) and create an interpolant for the OCP.

Parameters

electrodestr

The electrode to fit the parameters for. This should be either “positive” or “negative”.

datapandas.DataFrame

The data to use for the fit.

params_to_fitdict

A dictionary of parameters to fit. The keys should be the names of the parameters, and the values should be ionworkspipeline.Parameter objects.

objective_kwargsdict, optional

A dictionary of options to pass to the objective.

datafit_kwargsdict, optional

A dictionary of options to pass to the data fit.

voltage_limitstuple of float, optional

The limits of the voltage to use when creating the interpolant. If not provided, the limits of the data are used.

ionworkspipeline.pipelines.half_cell.gitt_diffusivity_msmr(ocp_data, gitt_data, params_to_fit, objective_kwargs=None, datafit_kwargs=None, fit_by_cycle=False)

Returns a dictionary of pipeline elements that are used to fit half-cell parameters to GITT or other pulse data. The diffusivity is calculated from the OCP data using the MSMR model (see ionworkspipeline.calculations.DiffusivityFromMSMRData). Any remaining parameters to fit are passed to a subsequent data fit.

Parameters

ocp_datapandas.DataFrame

The OCP data to use for the diffusivity calculation.

gitt_datapandas.DataFrame

The GITT (or other pulse) data to use for the fit.

params_to_fitdict

A dictionary of parameters to fit. The keys should be the names of the parameters, and the values should be ionworkspipeline.Parameter objects.

objective_kwargsdict, optional

A dictionary of options to pass to the objective.

datafit_kwargsdict, optional

A dictionary of options to pass to the data fit.

fit_by_cyclebool, optional

If True, the data is split by cycle and a separate ionworkspipeline.objectives.Pulse objective is created for each cycle. Otherwise a ionworkspipeline.objectives.CurrentDriven objective is created. Default is False.

ionworkspipeline.pipelines.half_cell.gitt_diffusivity_interpolant(diffusivity_data, gitt_data, params_to_fit, scale_factor=False, objective_kwargs=None, datafit_kwargs=None, fit_by_cycle=False)

Returns a dictionary of pipeline elements that are used to fit half-cell parameters to GITT or other pulse data. A (possibly scaled) interpolant for the diffusivity is created from the diffusivity data (see ionworkspipeline.calculations.DiffusivityDataInterpolant). Any remaining parameters to fit are passed to a subsequent data fit.

Parameters

diffusivity_datapd.DataFrame

Diffusivity data with the following columns:

  • “Stoichiometry”array

    The stoichiometry values.

  • “Diffusivity [m2.s-1]”array

    The corresponding diffusivity values.

gitt_datapandas.DataFrame

The GITT (or other pulse) data to use for the fit.

params_to_fitdict

A dictionary of parameters to fit. The keys should be the names of the parameters, and the values should be ionworkspipeline.Parameter objects.

scale_factorbool, optional

If True, a scale factor which multiplies the output of the diffusivity interpolant is fitted. The parameter is named “Positive particle diffusivity scale factor”. Default is False.

objective_kwargsdict, optional

A dictionary of options to pass to the objective.

datafit_kwargsdict, optional

A dictionary of options to pass to the data fit.

fit_by_cyclebool, optional

If True, the data is split by cycle and a separate ionworkspipeline.objectives.Pulse objective is created for each cycle. Otherwise a ionworkspipeline.objectives.CurrentDriven objective is created. Default is False.