pymatgen.apps.battery.battery_abc module

This module defines the abstract base classes for battery-related classes. Regardless of the kind of electrode, conversion or insertion, there are many common definitions and properties, e.g., average voltage, capacity, etc. which can be defined in a general way. The Abc for battery classes implements some of these common definitions to allow sharing of common logic between them.

class AbstractElectrode[source]

Bases: collections.abc.Sequence, monty.json.MSONable

An Abstract Base Class representing an Electrode. It is essentially a sequence of VoltagePairs. Generally, subclasses only need to implement three abstract properties: voltage_pairs, working_ion and working_ion_entry.

The general concept is that all other battery properties such as capacity, etc. are derived from voltage pairs.

One of the major challenges with representing battery materials is keeping track of the normalization between different entries. For example, one entry might be TiO2 with one unit cell whereas another is LiTi2O4 with two unit cells. When computing battery properties, it is needed to always use a universal reference state otherwise you have normalization errors (e.g., the energy of LiTi2O4 must be divided by two to be compared with TiO2).

For properties such as volume, mass, or mAh transferred within the voltage pair, a universal convention is necessary. AbstractElectrode can query for extrinsic properties of several different AbstractVoltagePairs belonging to a single charge/discharge path and be confident that the normalization is being carried out properly throughout, even if more AbstractVoltagePairs are added later.

The universal normalization is defined by the reduced structural framework of the entries, which is common along the entire charge/discharge path. For example, LiTi2O4 has a reduced structural framework of TiO2. Another example is Li9V6P16O58 which would have a reduced structural framework of V3P8O29. Note that reduced structural frameworks need not be charge-balanced or physical, e.g. V3P8O29 is not charge-balanced, they are just a tool for normalization.

Example: for a LiTi2O4 -> TiO2 AbstractVoltagePair, extrinsic quantities like mAh or cell volumes are given per TiO2 formula unit.

Developers implementing a new battery (other than the two general ones already implemented) need to implement a VoltagePair and an Electrode.

get_average_voltage(min_voltage=None, max_voltage=None)[source]

Average voltage for path satisfying between a min and max voltage.

Parameters
  • min_voltage (float) – The minimum allowable voltage for a given step.

  • max_voltage (float) – The maximum allowable voltage allowable for a given step.

Returns

Average voltage in V across the insertion path (a subset of the path can be chosen by the optional arguments)

get_capacity_grav(min_voltage=None, max_voltage=None, use_overall_normalization=True)[source]

Get the gravimetric capacity of the electrode.

Parameters
  • min_voltage (float) – The minimum allowable voltage for a given step.

  • max_voltage (float) – The maximum allowable voltage allowable for a given step.

  • use_overall_normalization (booL) – If False, normalize by the discharged state of only the voltage pairs matching the voltage criteria. if True, use default normalization of the full electrode path.

Returns

Gravimetric capacity in mAh/g across the insertion path (a subset of the path can be chosen by the optional arguments).

get_capacity_vol(min_voltage=None, max_voltage=None, use_overall_normalization=True)[source]

Get the volumetric capacity of the electrode.

Parameters
  • min_voltage (float) – The minimum allowable voltage for a given step.

  • max_voltage (float) – The maximum allowable voltage allowable for a given step.

  • use_overall_normalization (booL) – If False, normalize by the discharged state of only the voltage pairs matching the voltage criteria. if True, use default normalization of the full electrode path.

Returns

Volumetric capacity in mAh/cc across the insertion path (a subset of the path can be chosen by the optional arguments)

get_energy_density(min_voltage=None, max_voltage=None, use_overall_normalization=True)[source]
Parameters
  • min_voltage (float) – The minimum allowable voltage for a given step.

  • max_voltage (float) – The maximum allowable voltage allowable for a given step.

  • use_overall_normalization (booL) – If False, normalize by the discharged state of only the voltage pairs matching the voltage criteria. if True, use default normalization of the full electrode path.

Returns

Energy density in Wh/L across the insertion path (a subset of the path can be chosen by the optional arguments).

get_specific_energy(min_voltage=None, max_voltage=None, use_overall_normalization=True)[source]

Returns the specific energy of the battery in mAh/g.

Parameters
  • min_voltage (float) – The minimum allowable voltage for a given step.

  • max_voltage (float) – The maximum allowable voltage allowable for a given step.

  • use_overall_normalization (booL) – If False, normalize by the discharged state of only the voltage pairs matching the voltage criteria. if True, use default normalization of the full electrode path.

Returns

Specific energy in Wh/kg across the insertion path (a subset of the path can be chosen by the optional arguments)

property max_delta_volume[source]

Maximum volume change along insertion

property max_voltage[source]

Highest voltage along insertion

property max_voltage_step[source]

Maximum absolute difference in adjacent voltage steps

property min_voltage[source]

Lowest voltage along insertion

property normalization_mass[source]

Mass used for normalization. This is the mass of the discharged electrode of the last voltage pair.

Type

Returns

property normalization_volume[source]

Mass used for normalization. This is the vol of the discharged electrode of the last voltage pair.

Type

Returns

property num_steps[source]

The number of distinct voltage steps in from fully charge to discharge based on the stable intermediate states

abstract property voltage_pairs[source]

Returns all the VoltagePairs

abstract property working_ion[source]

The working ion as an Element object

abstract property working_ion_entry[source]

The working ion as an Entry object

class AbstractVoltagePair[source]

Bases: object

An Abstract Base Class for a Voltage Pair.

abstract property frac_charge[source]

Frac of working ion in charged pair.

Type

Returns

abstract property frac_discharge[source]

Frac of working ion in discharged pair.

Type

Returns

abstract property mAh[source]

Energy in mAh.

Type

Returns

abstract property mass_charge[source]

Mass of charged pair.

Type

Returns

abstract property mass_discharge[source]

Mass of discharged pair.

Type

Returns

abstract property vol_charge[source]

Vol of charged pair.

Type

Returns

abstract property vol_discharge[source]

Vol of discharged pair.

Type

Returns

abstract property voltage[source]

Voltage of voltage pair.

Type

Returns

abstract property working_ion_entry[source]

Working ion as an entry.

Type

Returns