Library

Library and Material schemas for reusable parameter sets.

Library schemas.

class ionworks.pipeline.library.Material(name: str, description: str | None = None, parameter_values: dict[str, Any] | None = None)[source]

Bases: BaseModel

Material configuration.

Holds a named parameter set — the three thermodynamic host-site fields for MSMR-style materials, or any other pybamm-compatible parameter values for the material.

Parameters:
  • name (str) – Human-readable material identifier (e.g. "NMC - Verbrugge 2017"). Used as the lookup key in the library.

  • description (str, optional) – Free-text description of the material — typically includes the citation or source the parameter values were taken from.

  • parameter_values (dict, optional) – Mapping of pybamm parameter names to their values for this material. For MSMR materials typically contains the host-site standard potentials, occupancy fractions, and ideality factors.

model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
description: str | None
parameter_values: dict[str, Any]
classmethod from_library(name: str) → Material[source]
class ionworks.pipeline.library.Library[source]

Bases: BaseModel

Material library access.

Exposes the bundled set of reference materials (e.g. graphite, NMC, LFP) via static lookups by name.

static list_materials() → list[str][source]

Return the names of all bundled materials.

static get_material(name: str) → Material[source]

Return the Material registered under name.

Raises:

KeyError – If name is not registered in the library.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].