## 2 Model Development
Fulfilling both conditions leads to a new \(\eta_{c}\) for the current time step \(j\). At the end of every time step, the cell voltage and the new material balances across the cell are calculated according to Equations (1) and (2). As described earlier, two species are responsible for current generation during the electrochemical reaction. For discharging, the iron chloride reaction occurs at cell voltages  
\[F:\text{Faraday constant}\]3 Activity diagram representing the implemented code. of \(E\leq E_{OCV,Fe}\) and is thus below \(E_{OCV,Ni}\). Therefore, the respective OCVs are used as initial conditions. This derives two cases for the reaction process (example discharging process): \(E>E_{OCV,Fe}\)  
* Equilibrium voltage in Equation (5), \(E_{OCV}=E_{OCV,Ni}\). * In this case, only \(NiCl_{2}\) is converted, because in this voltage range the iron reduction is thermodynamically not preferred. * The electrochemical reaction follows Equation (1). \(E\leq E_{OCV,Fe}\)  
* Equilibrium voltage in Equation (5), \(E_{OCV}=E_{OCV,Fe}\). * In this case, both \(NiCl_{2}\) and \(FeCl_{2}\) are converted, because in this voltage range iron reduction is also thermodynamically preferred. * The electrochemical reaction follows Equations (1) and (2). Note: The model allows running (multiple) consecutive charging and discharging sequences. No homogeneous distribution of the materials is necessary as an initial condition. Rather, the (inhomogeneous) material distribution from the previous process can be transferred, as it may result from a termination at different state of charges. For this feature, it is indispensable to be able to model the charging and discharging processes. Modelling Heat GenerationNa-\(MCl_{2}\) cells are operated at high temperatures around 300 \({}^{\circ}\)C, which need to be ensured by an adequate battery thermal management system (BTMS) [26], particularly because temperature has a great impact on cell performance, life time and reliability [27; 28]. Temperatures above 155 \({}^{\circ}\)C ensure a liquid state of the sodium anode and of the secondary electrolyte. Recently, [PERSON] et al. showed that higher operation temperatures help increase the ionic conductivity of either the solid or the liquid electrolyte, which decreases the internal cell resistance significantly [29]. Furthermore, the electrochemical reaction is affected by the operation temperature since OCV and \(j_{0}\) are temperature-dependent variables. However, by using a heat regulation system, the effect of temperature variations during operation can be neglected [14]. Hence, the model is set at isothermal conditions. Nevertheless, in order to ensure such stable temperature conditions, an appropriate dimensioning of the heat exchange system is indispensable. Importantly, heat is not provided exclusively by the BTMS and its connected heater. Heat is mainly generated by the electrochemical reaction itself as well as by internal resistances of the battery cell. [PERSON] et al. provided a global energy balance to estimate the overall heat generation by an electrochemical cell [30]. This approach is valid under the assumption of a homogeneous reaction and temperature distribution in the reaction volume. However,similar to the electrochemical reaction, a heat generation front is expected to move through the cell during the charging and discharging processes. Since the electrochemical reaction has the greatest impact on heat generation within the cell, it must be resolved in the cathodic volume. Here, the liquid electrolyte can be assumed to be constant in composition as the precipitation and dissolution has been found to possess infinitely fast kinetics [14]. Therefore, we also assume no concentration gradients of the secondary electrolyte along the battery dimension and no related heat effects such as heat generation due to mixing.