## 2 Materials and Methods
### Electrical Analysis of a DLSC Charged or Discharged with a Voltage Source
If the secondary or lower branch of the Lambert W function, W\({}_{-1}\)(\(-|\)x\(|\)), were taken as a solution, as \(|\)x\(|\) tends to zero, it would tend to \(-\infty\), as would the function g and hence the internal voltage of the DLSC, which would not make physical sense. Figure 2 shows the evolution of the variable g over time, both in the charging and discharging processes. In both cases, for very large values of time, t, the variable g will tend to zero, which will be its limiting value. \[C(u)=C_{0}+\frac{C_{N}}{U_{N}}.\left(1-\frac{C_{0}}{C_{N}}\right)\cdot u=C_{N} \cdot k_{0}+\frac{C_{N}}{U_{N}}.(1-k_{0})\cdot u. \tag{2}\]0 Evolution of the variable g over time, during charging and discharging processes. On the other hand, from Equations (8) and (22), it is easy to deduce the value of the external voltage as a function of the variable g:  
\[C(u)=C_{0}+\frac{C_{N}}{U_{N}}.\left(1-\frac{C_{0}}{C_{N}}\right)\cdot u=C_{N} \cdot k_{0}+\frac{C_{N}}{U_{N}}.(1-k_{0})\cdot u. \tag{2}\]1  
The power dissipated as heat in the internal resistance R of the DLSC, \(p_{d}\), can also be expressed as a function of the variable g in the following way:  
\[C(u)=C_{0}+\frac{C_{N}}{U_{N}}.\left(1-\frac{C_{0}}{C_{N}}\right)\cdot u=C_{N} \cdot k_{0}+\frac{C_{N}}{U_{N}}.(1-k_{0})\cdot u. \tag{2}\]2  
Similarly, the power dissipated in the internal resistance of the voltage source, \(R_{c}\), presents the same function as \(P_{d}\), changing R to \(R_{c}\); that is:  
\[C(u)=C_{0}+\frac{C_{N}}{U_{N}}.\left(1-\frac{C_{0}}{C_{N}}\right)\cdot u=C_{N} \cdot k_{0}+\frac{C_{N}}{U_{N}}.(1-k_{0})\cdot u. \tag{2}\]3  
The power absorbed by the voltage source, \(E\), representing the no-load voltage of the voltage source is:  
\[C(u)=C_{0}+\frac{C_{N}}{U_{N}}.\left(1-\frac{C_{0}}{C_{N}}\right)\cdot u=C_{N} \cdot k_{0}+\frac{C_{N}}{U_{N}}.(1-k_{0})\cdot u. \tag{2}\]4  
The output power of the DLSC, i.e., the power consumed by the voltage source, \(P_{out}\) is obtained by simply multiplying the external voltage by the current; therefore:  
\[C(u)=C_{0}+\frac{C_{N}}{U_{N}}.\left(1-\frac{C_{0}}{C_{N}}\right)\cdot u=C_{N} \cdot k_{0}+\frac{C_{N}}{U_{N}}.(1-k_{0})\cdot u. \tag{2}\]5  
The energy dissipated in the internal resistance, \(R\), of the DLSC, \(e_{d}\), is obtained by integrating the power loss, \(p_{d}\), obtained in (24). In doing so, it is considered that:  
\[C(u)=C_{0}+\frac{C_{N}}{U_{N}}.\left(1-\frac{C_{0}}{C_{N}}\right)\cdot u=C_{N} \cdot k_{0}+\frac{C_{N}}{U_{N}}.(1-k_{0})\cdot u. \tag{2}\]6  
Deriving g(t) as a function of time, as presented in (19), after some simplifications, it is obtained that:  
\[C(u)=C_{0}+\frac{C_{N}}{U_{N}}.\left(1-\frac{C_{0}}{C_{N}}\right)\cdot u=C_{N} \cdot k_{0}+\frac{C_{N}}{U_{N}}.(1-k_{0})\cdot u. \tag{2}\]7  
The expression for g' in (29) is valid for both charging and discharging, without the need to change the sign. If the value g' obtained in (29) and the value of \(p_{d}\) calculated in (24) are substituted into (28), integrating both members of the obtained equation, the result is the value of the energy dissipated in the resistance \(R\), \(e_{d}\), depending on the variable g:  
\[C(u)=C_{0}+\frac{C_{N}}{U_{N}}.\left(1-\frac{C_{0}}{C_{N}}\right)\cdot u=C_{N} \cdot k_{0}+\frac{C_{N}}{U_{N}}.(1-k_{0})\cdot u. \tag{2}\]8  
In the expression given in (30), \(g_{0}\) is the value of g evaluated in t = 0 that, according to (20), results in \(g_{0}=U_{0}-E\). The energy dissipated in \(R_{\rm c}\), \(e_{dRc}\), follows the same evolution as \(e_{d}\), by only changing the value of R that appears in the numerators by \(R_{c}\), i.e.,  
\[C(u)=C_{0}+\frac{C_{N}}{U_{N}}.\left(1-\frac{C_{0}}{C_{N}}\right)\cdot u=C_{N} \cdot k_{0}+\frac{C_{N}}{U_{N}}.(1-k_{0})\cdot u. \tag{2}\]9Another variable that is important to consider is the instantaneous energy stored in the DLSC.