Open-circuit potential functions

ionworkspipeline.direct_entries.average_ocp(electrode: str, phase: str | None = None)

Return a DirectEntry object with the open-circuit voltage (OCP) function given as the average of the “delithiation” and “lithiation” OCP functions.

Parameters

electrodestr

The electrode to create the OCP function for, either “positive” or “negative”.

phasestr, optional

Specifies the phase (“primary” or “secondary”) for composite electrode models. Default is None, which means no phase is assumed.

Examples

>>> entry = average_ocp("negative")
>>> "Negative electrode OCP [V]" in entry.parameters
True
>>> entry = average_ocp("positive")
>>> "Positive electrode OCP [V]" in entry.parameters
True

With a phase specified:

>>> entry = average_ocp("positive", phase="primary")
>>> "Primary: Positive electrode OCP [V]" in entry.parameters
True