# Evolutionary Design Optimization of an Alkaline Water Electrolysis Cell for Hydrogen Production
## 3 Set up of the Genetic Algorithm
### Evaluation  
In optimization, we need a normalized function to be maximized, so we will use an inverse function. In order to have a solution between 0 and 1, the inverse function is scaled using the theoretical minimum of the _CAPEX_ and the _OPEX_. The theoretical minimum of _OPEX_ is obtained by neglecting the diphasic effect. The calculated minimum and maximum of _CAPEX_ and _OPEX_ are given in the Table 6.  
\[ \begin{array}{l}U_{cellmin}\ =E_{rev}(T_{max},p_{min})\ +\ \left(\frac{h_{U 2 min}}{\sigma_{max}}\ +\ \frac{h_{U 2 min}}{\sigma_{max}}\right)j_{min}\ +\ b_{cath}\log(j_{min})\ +\ b_{an}\log(j_{min})\ +\ R\ j_{min}\\ \\ OPEX_{min}\ =\ \frac{U_{cellmin}\ F}{3600}EC\\ \\ U_{cellmax}\ =E_{rev}(T_{min},p_{max})\ +\ \left(\frac{h_{U 2 max}}{\sigma_{min}}\ +\ \frac{h_{U 2 max}}{\sigma_{min}}\right)j_{max}\ +\ b_{cath}\log(j_{max})\ +\ b_{an}\log(j_{max})\ +\ R\ j_{max}\\ \\ OPEX_{max}\ =\ \frac{U_{cellmin}\ F}{3600}\cdot EC\\ \\ CAPEX_{min}\ =\left(\frac{2\cdot F\text{-}C_{S}}{t\cdot M_{H_{2}}}\right)\ \frac{1}{j_{max}} \\ \end{array}  \tag{41}\]  
\[U_{cellmin}\ =E_{rev}(T_{min},p_{max})\ +\ \left(\frac{h_{U 2 max}}{\sigma_{min}}\ +\ \frac{h_{U 2 max}}{\sigma_{min}}\right)j_{max}\ +\ b_{cath}\log(j_{max})\ +\ b_{an}\log(j_{max})\ +\ R\ j_{max}\\ \\ OPEX_{max}\ =\ \frac{U_{cellmin}\cdot F}{3600}\cdot EC\\ \\ CAPEX_{min}\ =\left(\frac{2\cdot F\text{-}C_{S}}{t\cdot M_{H_{2}}}\right)\ \frac{1}{j_{max}} \\ \end{array} \tag{42}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Design Parameter** & \(x_{min}\) & \(x_{max}\) & \(Q_{wtd}\) \\ \hline \(h_{H_{2}}\) (m) & \(1.5\times 10^{-4}\) & \(1.5\times 10^{-3}\) & \(1\times 10^{-4}\) \\ \(h_{H_{2}}\) (m) & \(1.5\times 10^{-4}\) & \(1.5\times 10^{-3}\) & \(1\times 10^{-4}\) \\ \(p\) (bar) & \(1\) & \(30\) & \(1\) \\ \(H_{Lax}\) (m) & \(5\times 10^{-2}\) & \(10^{-1}\) & \(5\times 10^{-3}\) \\ \(T\) (K) & \(298\) & \(358\) & \(10\) \\ \(j\) (A m\({}^{-2}\)) & \(10^{3}\) & \(10^{4}\) & \(10^{2}\) \\ \(Y\) (c) & \(0.2\) & \(0.4\) & \(2.5\times 10^{-2}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Design parameter their intervals and their resolution. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Design Parameter** & \(Q_{wtd}\) & \(n_{b}\) & \(Q_{abt}\) & **Example** & **Coded Example** & **Decoded Example** \\ \hline \(h_{H_{2}}\) (m) & \(10^{-4}\) & \(4\) & \(9\times 10^{-5}\) & \(3\times 10^{-4}\) & \([0\,0\,0\,1\,1]\) & \(2.765\times 10^{-4}\) \\ \(h_{O}\) (m) & \(10^{-4}\) & \(4\) & \(9\times 10^{-5}\) & \(3\times 10^{-4}\) & \([0\,0\,0\,1\,1]\) & \(2.765\times 10^{-4}\) \\ \(p\) (bar) & \(1\) & \(7\) & \(7.7\times 10^{-1}\) & \(3\) & \([0\,0\,0\,0\,1]\) & \(2.54\) \\ \(H_{Lax}\) (m) & \(5\times 10^{-3}\) & \(4\) & \(3.33\times 10^{-3}\) & \(6\times 10^{-2}\) & \([0\,0\,1\,1]\) & \(5.94\times 10^{-2}\) \\ \(T\) (K) & \(10\) & \(3\) & \(7.85\) & \(3.08\times 10^{2}\) & \([0\,0\,1\,1]\) & \(3.04\times 10^{2}\) \\ \(j\) (A m\({}^{-2}\)) & \(10^{2}\) & \(7\) & \(7.08\times 10^{1}\) & \(2\times 10^{3}\) & \([0\,0\,0\,1\,1\,1]\) & \(1.98\times 10^{3}\) \\ \(Y\) (c) & \(2.5\times 10^{-2}\) & \(4\) & \(1.33\times 10^{-2}\) & \(0.3\) & \([0\,1\,1\,1]\) & \(2.87\times 10^{-1}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Design parameter and their quantification. Inversing the cost function, having the lowest hydrogen cost (\(F_{c}=F_{cmin}\)) corresponding to the highest fitness (\(\overline{F}_{max}=1\)) gives:  
\[\overline{F}=\frac{F_{cmin}}{F_{c}}=\frac{(CAPEX_{min}\ +\ OPEX_{min})}{ OPEX\ +\ CAPEX} \tag{45}\]  
Unfortunately, \(\overline{F}(F_{cmax})\), corresponding to the highest cost (then the lowest fitness \(F_{min}\)) is not 0, as it should be:  
\[\overline{F}_{min}=\frac{F_{cmin}}{F_{cmax}}=\frac{(CAPEX_{min}\ +\ OPEX_{min})}{( OPEX_{max}\ +\ CAPEX_{max})} \tag{46}\]  
Thus, it is interesting to make a linear transformation to take advantage of the whole range 0 to 1. With:  
\[