This document records the current PyBaMMCellModel interface contract and the architectural consequences for Native PathSim parallel-pack research.
This is an interface and architecture audit only.
The current wrapper contract is:
Input:
- Applied current
State update:
update(current, dt)
Outputs:
- Terminal voltage
- SOC
- Capacity
- Resistance
Equivalent interpretation:
I -> cell physics -> V- Not
V -> cell physics -> I
The base interface requires current-driven state advance:
update(current, dt)inCellModel- No voltage-driven update contract exists in the current abstraction
PyBaMMCellModel injects a current input parameter into the PyBaMM simulation:
- internal input label:
Cell current [A] - PyBaMM parameter binding:
Current function [A] = InputParameter(Cell current [A]) - initialization solve uses that current input with value
0.0
Runtime progression occurs through:
update(current, dt)- stepping the PyBaMM simulation with the supplied current input
The wrapper exposes terminal voltage through:
get_voltage()
It also exposes:
get_soc()get_capacity()get_resistance()
The current architecture is fundamentally:
Pack current
-> current splitter
-> branch currents Ia, Ib
-> current-driven cell wrappers
-> cell voltages Va, Vb
This means branch current is prescribed upstream of the cell wrappers.
Therefore the current architecture cannot generate spontaneous equalization current during rest.
The existing splitter logic computes branch currents directly from pack current:
Ia = Ipack * (Rb / (Ra + Rb))Ib = Ipack * (Ra / (Ra + Rb))
At rest:
Ipack = 0
Therefore:
Ia = 0Ib = 0
Even if:
SOC_A != SOC_BOCV_A != OCV_BVa != Vb
those mismatches do not create spontaneous equalization current inside the current-splitting topology, because the branch currents are already fixed by the external pack-current rule.
Do not assume that simply declaring:
CellA || CellB
automatically creates equalization current in the current codebase.
That statement is false for the current wrapper and topology.
The limitation is not PathSim alone. The limiting factor is the combination of:
- a current-driven cell wrapper contract, and
- a current-splitting pack topology that prescribes branch current from
Ipack
The previously used relation:
Ibal = (Va - Vb) / (RcA + RcB)
should now be treated as:
- an external PoC approximation of the algebraic network solution
- not the final physical architecture by itself
That equation approximates what a network solver would produce when KCL/KVL constraints are explicitly solved.
The relevant research question is:
Can a PathSim algebraic network solve Ia, Ib, and Vbus first, and then provide the solved branch currents to the PyBaMM wrappers?
Target concept:
- PathSim network solves:
IaIbVbus
- PyBaMM consumes:
Ia/Ib
- PyBaMM returns:
Va/Vb
PyBaMM should own electrochemical cell physics.
Input:
- Current
Outputs:
- Voltage
- SOC
- Capacity
- Resistance
PathSim should own network physics.
Unknowns:
IaIbVbus
Constraints:
- KCL
- KVL
An adapter layer should:
- convert PathSim-solved branch current into PyBaMM current input
- expose PyBaMM terminal voltage back into the network equations
- manage timing/order between algebraic solve and cell-state update
Structure:
Ipackprovided externally- splitter computes
Ia,Ib - cells consume branch current
- voltages are observed afterward
Properties:
- simple
- fast
- cannot create spontaneous rest equalization when
Ipack = 0
Structure:
Va,Vb,RcA,RcB,Ipackdefine the network state- algebraic unknowns are solved:
IaIbVbus
- solved branch currents are then fed into current-driven cell wrappers
Representative constraints:
Ia + Ib = IpackVbus = Va - Ia * RcAVbus = Vb - Ib * RcB
Properties:
- can produce spontaneous equalization when voltage mismatch exists
- is consistent with observed Native PathSim AlgebraicConstraint PoC behavior
- still requires careful interface control because the cell wrappers are not voltage-driven branch elements today
At minimum, the following must be resolved:
- Explicit boundary contract
- Define whether the wrapper remains current-driven only, or whether a new branch-component wrapper is needed.
- Solve/update ordering
- Define when
VaandVbare sampled. - Define when
IaandIbare solved. - Define when cell states are advanced.
- Adapter semantics
- Provide a stable adapter that bridges:
- algebraic network solve
- current-driven PyBaMM stepping
- Voltage meaning
- Freeze the interpretation of
get_voltage():- terminal voltage after imposed current step
- sampled voltage before update
- or another explicitly defined timing convention
- Logging and diagnostics
- Log
Ia,Ib,Vbus,Va,Vb, KCL residual, and KVL residual with phase-aware timing semantics.
- Optional future interface extension
- Investigate whether a voltage/node-coupled wrapper abstraction is possible or whether current-driven adaptation is the permanent architecture.
The current PyBaMMCellModel wrapper is current-driven.
That contract is compatible with:
- external branch-current solution
- algebraic network solve followed by current injection into the wrapper
That contract is not currently compatible with:
- a direct voltage-driven branch element where branch current is solved internally from imposed terminal voltage
So, before a true PathSim-native parallel-cell network can be claimed, the project must explicitly separate:
- cell physics ownership in PyBaMM
- network physics ownership in PathSim
- adapter-layer responsibility between them
Important clarification:
The inability to generate spontaneous equalization current is not a limitation of PyBaMM itself.
It is a consequence of the current wrapper contract and current-splitting topology used in this project.