BatteryComponents
A Dyad component library for lithium-ion batteries. It provides equivalent circuits and physics-based electrochemical models behind one pack component, so a single cell and a pack of cells are the same model at different dimensions.
Start with Building a model, which goes from a single cell to a pack end to end. Choosing an appropriate model weighs the four model families against each other, Parameter sets lists the published chemistries, and the component reference describes each component.
What is in the library
One pack. ArrayBatteryPack models series × parallel cells with scalar electrical pins, interconnection resistances on every cell branch and series link, and two array heat ports. A cell is the 1 × 1 case of it. Five structural selections choose what it models: the model family, the circuit topology, the parameter set, the thermal treatment and the degradation interface.
Four model families. The pseudo-two-dimensional Doyle-Fuller-Newman model, the single particle model with electrolyte, the single particle model, and the equivalent circuits. The first three resolve transport inside the electrodes and the electrolyte; the last has a handful of states and is what battery management systems are usually built on.
Six circuit topologies. Rint, Thevenin of any order, dual polarization, PNGV, a bulk and surface capacitor network, and the published Chen and Rincón-Mora fit, available as complete cells or as the reusable elements they are built from. A seventh, EDLC, replaces the faradaic cell with a double-layer capacitor and is parameterized by a capacitance, a series resistance and a voltage rating.
Published parameter sets for lithium cobalt oxide, nickel manganese cobalt, nickel cobalt aluminium, iron phosphate and lithium metal chemistries, two circuit identifications and one measured ultracapacitor, each attributed per physical quantity to its source.

What it does not do
Cycling protocols, stop conditions and experiment logs have no Dyad components. A model that must follow a charge, hold and rest schedule drives the pack from a source of your own.
Compilation scalarizes the pack. The symbolic model holds a fixed number of array equations whatever the pack's dimensions, but mtkcompile expands them per cell, so compile time and the size of the numerical problem grow with the cell count.