## 2 Materials and Methods
### Thermal Analysis of SCs Operating at Constant Power Based on the Incomplete Gamma Function  
The thermal model of the SC is based on the classical analogy with an electric circuit, as is shown in Figure 4[33], where \(P_{d}\) represents the power losses at the internal resistance of the cell, \(P_{amb}\) stands for the heat power losses, \(T_{amb}\) is the ambient temperature (considered constant), \(T_{cell}\) is the temperature of the cell, \(P_{internal}\) is the heat power that increases the thermal energy stored in the SC, and \(\rm{RTH}\) [\({}^{\circ}\)C/W] and \(\rm{CTH}\) [\({}^{\circ}\)C], respectively, are the thermal resistance and capacitance of the cell. Both \(\rm{RTH}\) and \(\rm{CTH}\) are usually provided by the manufacturer or can be calculated by conducting simple experimental tests. The differential equation that determines the thermal behavior of the cell is as follows:  
\[\rm{P_{d}}=C_{TH}.\theta/+\frac{\theta}{R_{TH}}, \tag{11}\]  
\(\theta\) being the difference between the cell and ambient temperatures:  
\[\rm{\theta}=T_{cell}-T_{amb}. \tag{12}\]  
Equation (11) can be expressed as a function of \(\rm{g_{1}}\) by applying the chain rule:  
\[\rm{P_{d}}=C_{TH}.\frac{d\theta}{dg_{1}}.\frac{dg_{1}}{dt}+\frac{\theta}{R_{ TH}}=C_{TH}.\frac{d\theta}{dg_{1}}.g_{1}^{\prime}+\frac{\theta}{R_{TH}}. \tag{13}\]  
The time derivative of \(\rm{g_{1}}\), \(\rm{g_{1}}^{\prime}\), can be calculated by deriving Equation (1) and expressing the result as a function of \(\rm{g_{1}}\) itself:  
\[\rm{g_{1}}^{\prime}=\frac{dg_{1}}{dt}=-\frac{2}{R\cdot C}.\frac{W_{-1}\left( \frac{-\exp\left(\frac{-\exp\left(\frac{-\exp\left(\frac{-\theta}{R\cdot C} \right)}{2R\cdot P}\right)}\right)}{1+W_{-1}\left(\frac{-\exp\left(\frac{-\exp \left(\frac{-\theta}{R\cdot C}\right)}{2R\cdot P}\right)}\right)}=\frac{2}{R \cdot C}.\frac{g_{1}}{1-g_{1}}. \tag{14}\]  
Figure 4: Thermal model of an SC based on an analogy with an electrical circuit. Figure 3: Upper Incomplete Gamma Function for different values of a. By combining Equations (5), (13) and (14), a first-order differential equation on \(\theta\) as a function of \(g_{1}\) can be obtained:  
\[\frac{d\theta}{dg_{1}}=\left(\frac{R\cdot C}{2\cdot R_{TH}\cdot C_{TH}}\right) \cdot\frac{g_{1}-1}{g_{1}}\cdot\theta-\left(\frac{R\cdot C\cdot P}{2\cdot C_{TH }}\right)\cdot\frac{g_{1}-1}{g_{1}}^{2}. \tag{15}\]  
In order to simplify Equation (15), a and b are defined as follows:  
\[a=\frac{R\cdot C}{2\cdot R_{TH}\cdot C_{TH}}=\frac{\tau}{2\cdot\tau_{TH}}, \tag{16}\]  
\[b=-\frac{R\cdot C\cdot P}{2\cdot C_{TH}}=-\frac{\tau\cdot P}{2\cdot C_{TH}}, \tag{17}\]  
where \(\tau\) and \(\tau_{TH}\), respectively, are the electrical and thermal constants. Because in most commercial cells \(\tau_{TH}\gg\tau\), the value of a is within 0 and 1; 0 < a < 1. Moreover, as can be deduced from Equations (16) and (17), a is dimensionless, whereas b is measured in temperature units. These values can be assumed to be constant within the temperature range that goes from 0 \({}^{\circ}\)C to 65 \({}^{\circ}\)C because the electrical parameters of the cells, R and C, barely change in that span, as indicated by manufacturers [62; 63], and P is assumed to be constant in this study. Therefore, Equation (15) can be expressed more compactly as:  
\[\frac{d\theta}{dg_{1}}=\left(\frac{g_{1}-1}{g_{1}}\right)\cdot\left(a\cdot \theta+\frac{b}{g_{1}}\right). \tag{18}\]  
The general solution of Equation (18) is as follows:  
\[\rm{\theta}=T_{cell}-T_{amb}. \tag{12}\]0  
where \(k\) is the constant of integration, dependent on the initial temperature of the cell and \(\Gamma(a,x)\) is the aforementioned Upper Incomplete Gamma Function.