# Algorithms for Simulation of Shunt Currents in a Vanadium Redox Flow Battery
## 4 Methods
### Algorithms
#### 4.4.2 Codification of Node Equations
\[0=ICelli_{i-1,n}-ICh_{i-1,n}^{C,1}-ICh_{i-1,n}^{C,2}-ICell_{i,1}-ICh_{i,1}^{A,1 }-ICh_{i,1}^{A,2}\]1 (A29)

\[0=ICelli_{i-1,n}-ICh_{i-1,n}^{C,1}-ICh_{i-1,n}^{C,2}-ICell_{i,1}-ICh_{i,1}^{A,1 }-ICh_{i,1}^{A,2}\]2 (A30)\[0=ICelli_{i-1,n}-ICh_{i-1,n}^{C,1}-ICh_{i-1,n}^{C,2}-ICell_{i,1}-ICh_{i,1}^{A,1 }-ICh_{i,1}^{A,2}\]3 \[0=ICelli_{i-1,n}-ICh_{i-1,n}^{C,1}-ICh_{i-1,n}^{C,2}-ICell_{i,1}-ICh_{i,1}^{A,1 }-ICh_{i,1}^{A,2}\]4 (112) \[0=ICelli_{i-1,n}-ICh_{i-1,n}^{C,1}-ICh_{i-1,n}^{C,2}-ICell_{i,1}-ICh_{i,1}^{A,1 }-ICh_{i,1}^{A,2}\]5 (113) \[0=ICelli_{i-1,n}-ICh_{i-1,n}^{C,1}-ICh_{i-1,n}^{C,2}-ICell_{i,1}-ICh_{i,1}^{A,1 }-ICh_{i,1}^{A,2}\]6 \[0=ICelli_{i-1,n}-ICh_{i-1,n}^{C,1}-ICh_{i-1,n}^{C,2}-ICell_{i,1}-ICh_{i,1}^{A,1 }-ICh_{i,1}^{A,2}\]7 (114) \[0=ICelli_{i-1,n}-ICh_{i-1,n}^{C,1}-ICh_{i-1,n}^{C,2}-ICell_{i,1}-ICh_{i,1}^{A,1 }-ICh_{i,1}^{A,2}\]8

### Equations of the Middle Stacks of the Circuit

The Equations (115)-(116) are those relative to the middle stacks of the circuit. \[0=ICelli_{i-1,n}-ICh_{i-1,n}^{C,1}-ICh_{i-1,n}^{C,2}-ICell_{i,1}-ICh_{i,1}^{A,1 }-ICh_{i,1}^{A,2}\]9 \[0=ICh_{i,1}^{A,1}-IMn_{i,1}^{A,1}\]0 (116) \[0=ICh_{i,1}^{A,1}-IMn_{i,1}^{A,1}\]1 (117) \[0=ICh_{i,1}^{A,1}-IMn_{i,1}^{A,1}\]2

\[0=ICh_{i,1}^{A,1}-IMn_{i,1}^{A,1}\]3 \[0=ICh_{i,1}^{A,1}-IMn_{i,1}^{A,1}\]4 \[0=ICh_{i,1}^{A,1}-IMn_{i,1}^{A,1}\]5 (120) \[0=ICh_{i,1}^{A,1}-IMn_{i,1}^{A,1}\]6 \[0=ICh_{i,1}^{A,1}-IMn_{i,1}^{A,1}\]7 (121) \[0=ICh_{i,1}^{A,1}-IMn_{i,1}^{A,1}\]8 \[0=ICh_{i,1}^{A,1}-IMn_{i,1}^{A,1}\]9 (122) \[0=ICh_{i,1}^{A,2}-IMn_{i,1}^{A,2}-1 Br_{i}^{A,2}\]0

### Equations of Last Stack of the Circuit

The Equations (116)-(117) are those relative to the last stack of the circuit. \[0=ICh_{i,1}^{A,2}-IMn_{i,1}^{A,2}-1 Br_{i}^{A,2}\]1 \[0=ICh_{i,1}^{A,2}-IMn_{i,1}^{A,2}-1 Br_{i}^{A,2}\]2 (124) \[0=ICh_{i,1}^{A,2}-IMn_{i,1}^{A,2}-1 Br_{i}^{A,2}\]3 (125) \[0=ICh_{i,1}^{A,2}-IMn_{i,1}^{A,2}-1 Br_{i}^{A,2}\]4

\[0=ICh_{i,1}^{A,2}-IMn_{i,1}^{A,2}-1 Br_{i}^{A,2}\]5 \[0=ICh_{i,1}^{A,2}-IMn_{i,1}^{A,2}-1 Br_{i}^{A,2}\]6 \[0=ICh_{i,1}^{A,2}-IMn_{i,1}^{A,2}-1 Br_{i}^{A,2}\]7 (128) \[0=ICh_{i,1}^{A,2}-IMn_{i,1}^{A,2}-1 Br_{i}^{A,2}\]8

## Appendix A Equations of Single Stack

In the case that the battery has only one stack, the considerations made for the first and last cells of the circuit must be taken into account. Otherwise, no additional equations are added. ## References

* [PERSON] et al. (2016) [PERSON]; [PERSON]; [PERSON] [PERSON] A Dynamic Plug Flow Reactor Model for a Vanadium Redox Flow Battery Cell. _J. Power Sources_**2016**, 311, 57-67. [CrossRef]
* [PERSON] et al. (2019) [PERSON]; [PERSON]; [PERSON] [PERSON] Maximizing Vanadium Redox Flow Battery Efficiency: Strategies of Flow Rate Control. In Proceedings of the 2019 IEEE 28 th International Symposium on Industrial Electronics (ISIE), Vancouver, BC, Canada, 12-14 June 2019; pp. 1977-1982. * [PERSON] et al. (2023) [PERSON]; [PERSON]; [PERSON] Shunt Current Analysis of Vanadium Redox Flow Battery System with Multi-Stack Connections. _J. Energy Storage_**2023**, _73_, 109233. [CrossRef]
* [PERSON] et al. (2011) [PERSON]; [PERSON]; [PERSON] Shunt Current Loss of the Vanadium Redox Flow Battery. _J. Power Sources_**2011**, _196_, 10753-10757. [CrossRef]
* [PERSON] and [PERSON] (1988) [PERSON]; [PERSON] Predicting Shunt Currents in Stacks of Bipolar Plate Cells with Conducting Manifolds. _J. Electrochem. Soc._**1988**, _135_, 1609. [CrossRef]
* [PERSON] et al. (2021) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Locating Shunt Currents in a Multistack System of All-Vanadium Redox Flow Batteries. _ACS Sustain. Chem. Eng._**2021**, \(9\), 4648-4659. [CrossRef]
* [PERSON] and [PERSON] (2015) [PERSON]; [PERSON] [PERSON] Shunt Currents in Vanadium Flow Batteries: Measurement, Modelling and Implications for Efficiency. _J. Power Sources_**2015**, _284_, 547-553. [CrossRef]
* [PERSON] et al. (2018) [PERSON]; [PERSON]; [PERSON], [PERSON]; [PERSON] Modeling the Effect of Shunt Current on the Charge Transfer Efficiency of an All-Vanadium Redox Flow Battery. _J.