Lemonergy · Studio block

Battery pack assembly

Generated series/parallel cell hierarchy with individual SOC, RC and temperature states, KCL current sharing and optional thermal links. Causal pack-current boundary.

Implementation ID
battery-pack-assembly
Reviewed
2026-10-27

Behavior

Builds an explicit series/parallel hierarchy with a separate SOC, two RC voltages and temperature for every cell. Subtree voltage/resistance reduction and Kirchhoff current sharing determine each cell current. Optional thermal links exchange equal and opposite heat. Per-cell overrides introduce controlled variation.

Interface

Battery pack assembly interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Battery pack assemblyStudio blockcurrentambientexternalHeatvoltagecellVoltagecellCurrentcellSoccellTemperaturecellHeatnodeVoltagenodeCurrent
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
currentinputASigned pack current; scalar.
ambientinputKCell ambient temperatures; 24 channels at the default configuration.
externalHeatinputWExternal cell heat inputs; 24 channels at the default configuration.
voltageoutputVPack terminal voltage; scalar.
cellVoltageoutputVIndividual cell voltages; 24 channels at the default configuration.
cellCurrentoutputAIndividual cell currents; 24 channels at the default configuration.
cellSocoutput1 (fraction)Individual cell SOC; 24 channels at the default configuration.
cellTemperatureoutputKIndividual cell temperatures; 24 channels at the default configuration.
cellHeatoutputWIndividual cell heat generation; 24 channels at the default configuration.
nodeVoltageoutputVHierarchy node voltages; 43 channels at the default configuration.
nodeCurrentoutputAHierarchy node currents; 43 channels at the default configuration.

Parameters

Defaults are initial model values. Select values for your own model and operating conditions.

Configuration fields
ParameterUnitDefaultMeaning and limits
Parallel cells in each group
parallelCells
12Parallel cells in each group. This is an editable model input; the default belongs to the synthetic worked example.
Series groups in each module
seriesGroups
13Series groups in each module. This is an editable model input; the default belongs to the synthetic worked example.
Modules in each assembly
modules
12Modules in each assembly. This is an editable model input; the default belongs to the synthetic worked example.
Module connection (0 series, 1 parallel)
moduleConnection
0 series, 1 parallel00 connects modules in series; 1 connects them in parallel.
Series assemblies in each string
seriesAssemblies
11Series assemblies in each string. This is an editable model input; the default belongs to the synthetic worked example.
Parallel pack strings
parallelStrings
12Parallel pack strings. This is an editable model input; the default belongs to the synthetic worked example.
Cell parameters [Ah, Ω, Ω, F, Ω, F, J/K, W/K, SOC, K, V offset]
cellProfile
See field order[5, 0.02, 0.02, 500, 0.01, 2000, 100, 1, 0.8, 298.15, 0]Ordered fields: capacity (Ah), R0 (Ω), R1 (Ω), C1 (F), R2 (Ω), C2 (F), heat capacity (J/K), ambient conductance (W/K), initial SOC, initial temperature (K), OCV offset (V).
Open-circuit voltage table [SOC fraction, V]
ocvTable
See field order[[0, 3.7], [1, 3.7]]Open-circuit voltage table [SOC fraction, V]. Rows are ordered coordinate/value pairs; the first column must be strictly increasing.
Overrides [cell index, parameter index, value]
cellOverrides
See field order[]Rows contain zero-based cell index, zero-based cell-profile parameter index and replacement value. Empty means every cell uses the base profile.
Thermal links [cell index, cell index, W/K]
thermalEdges
See field order[]Rows contain two distinct zero-based cell indices and conductance (W/K). Each edge exchanges equal and opposite heat. Empty means no cell-to-cell links.

Equations and rules

  • series: current is shared; voltages add
  • parallel: terminal voltage is shared; branch currents sum to imposed current
  • Icell = (Ecell - Vparallel) / Rcell
  • Qij = Gij*(Ti-Tj); Qji = -Qij

Worked example

Battery pack assembly worked example

Use the defaults below with Signed pack current = 12 A, Cell ambient temperatures = 24 channels each 298.15 K, External cell heat inputs = 24 channels each 0 W. At 0 s, Pack terminal voltage is 21.84 V. Additional checks are listed below.

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
Pack terminal voltage
voltage
021.84V1e-08
Individual cell currents
cellCurrent
024 channels × 3A1e-08
Individual cell SOC
cellSoc
024 channels × 0.81 (fraction)1e-08
Individual cell SOC
cellSoc
1024 channels × 0.79833333333333331 (fraction)1e-08

Explore the recorded outputs

Battery pack assembly recorded example

Battery pack assembly / Pack terminal voltage
Battery pack assembly / Pack terminal voltage against timeRecorded synthetic simulation values. Time in seconds; output in V.21.51774021.604272.521.69081521.777347.521.8638710VTime (s)
Battery pack assembly / Pack terminal voltage: 21.84 V at 0 s

103 actual recorded samples. Lines are visual guides between samples. Synthetic example, not measured cell data.

Download the recorded samples (JSON) · Open this Studio example after release

Use in a workflow

Battery pack assembly worked example

Generated series/parallel cell hierarchy with individual SOC, RC and temperature states, KCL current sharing and optional thermal links. Causal pack-current boundary.

  1. Battery pack assembly: Builds an explicit series/parallel hierarchy with a separate SOC, two RC voltages and temperature for every cell. Subtree voltage/resistance reduction and Kirchhoff current sharing determine each cell current. Optional thermal links exchange equal and opposite heat. Per-cell overrides introduce controlled variation.
    • Use the parameter values in the block reference.
    • Implementation tested locally; public release pending.
Open Studio example after release

Connected concepts

Limits and interpretation

  • Bounded to 256 cells with the supported series/parallel construction. External pack current is imposed causally; no arbitrary geometry, conserving terminal adapter or topology reconfiguration. Each cell parameter set still needs characterization.
  • The example verifies numerical behavior for synthetic parameters. Cell characterization and validation for an intended use are separate tasks.

Scientific and mathematical references

These sources explain the scientific and mathematical background. The behavior, interface and limits above define the Lemonergy implementation; a citation does not imply every model option in the source is implemented.

  1. A General Energy Balance for Battery Systems

    Dawn Bernardi, Ellen Pawlikowski, John Newman · Journal of The Electrochemical Society · 1985

    Technical reference · Battery energy balance and irreversible and reversible heat contributions. Reduced thermal models require explicit assumptions and current-sign conventions.

  2. Extended Kalman filtering for battery management systems of LiPB-based HEV battery packs: Part 2. Modeling and identification

    Gregory L. Plett · Journal of Power Sources · 2004

    Technical reference · Battery charge balance, open-circuit voltage, ohmic loss, polarization dynamics and model identification; parameters require cell-specific data.

Implementation sources

This reference follows the public interface and locally verified numerical checks for an upcoming release.

Contract: Lemonergy Studio public contract · Verification record: verification-2026-10-27

  • docs/glossary/native-block-verification.json

This implementation and its workflow uses (JSON) · Knowledge graph (JSON-LD)