Models¶
Schemas for battery models supported by the pipeline. Mirrors
ionworkspipeline.models.
Schemas for models.
- class ionworks_schema.models.ECM(options=None)¶
Bases:
BaseSchemaA class for the Equivalent Circuit Model.
Extends:
ionworks_schema.base.BaseSchema- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'populate_by_name': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ionworks_schema.models.LumpedSPMR(options=None)¶
Bases:
BaseSchemaA class for the Lumped Single Particle Model with Resistance.
Extends:
ionworks_schema.base.BaseSchema- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'populate_by_name': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ionworks_schema.models.LumpedSPMeR(options=None)¶
Bases:
BaseSchemaA class for the Lumped Single Particle Model with electrolyte and Resistance.
Extends:
ionworks_schema.base.BaseSchema- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'populate_by_name': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ionworks_schema.models.MSMRFullCellModel(negative_electrode_model, positive_electrode_model, options=None)¶
Bases:
BaseSchemaFull-cell MSMR model of the open-circuit potential — pairs a negative and positive half-cell MSMR model into one full-cell OCV.
Use this with
MSMRFullCellto fit an MSMR description of a full cell from full-cell OCV data.Parameters¶
- negative_electrode_model
MSMRHalfCellModel MSMR model for the negative electrode.
- positive_electrode_model
MSMRHalfCellModel MSMR model for the positive electrode.
- optionsdict, optional
Extra options forwarded to the underlying model.
Extends:
ionworks_schema.base.BaseSchema- negative_electrode_model: Annotated[dict[str, Any] | BaseSchema, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]¶
- positive_electrode_model: Annotated[dict[str, Any] | BaseSchema, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')])]¶
- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'populate_by_name': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- negative_electrode_model
- class ionworks_schema.models.MSMRHalfCellModel(electrode, options=None)¶
Bases:
BaseSchemaHalf-cell MSMR (Multi-Species Multi-Reaction) model for one electrode’s open-circuit potential.
Parameters¶
- electrodestr
Electrode the model describes —
"positive"or"negative".- optionsdict, optional
Model settings:
capacity function: capacity function used by the model.Default
None.
species format: how each MSMR species is parameterised —"Qj"(capacity) or"Xj"(mole fraction). Default"Qj".
direction:"delithiation","lithiation", orNone(no direction assumed). Default
None.
particle phases: number of phases in the electrode —"1"for a single-phase electrode (default) or"2"for a composite with primary and secondary phases.
Extends:
ionworks_schema.base.BaseSchema- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'populate_by_name': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ionworks_schema.models.SingleElectrodeLumpedSPMR(options=None)¶
Bases:
BaseSchemaA class for the single-electrode Lumped SPM with Resistance.
Extends:
ionworks_schema.base.BaseSchema- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'populate_by_name': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].