## 2 Material and Methods
### PEM Water Electrolyzer Modeling  
At this point, the thermodynamic analysis of the PEM water electrolyzer is presented, which also includes an electrochemical model to describe the performance properly. Both electricity and thermal energy are needed for the water electrolysis process. A portion of the ORC power production is provided to the PEM water electrolyzer (Pel,WE). First of all, the total energy (\(\Delta\)H) that is needed for hydrogen production is given generally through the following equation [27]:  
\[\Delta\mathrm{H}=\Delta\mathrm{G}+\mathrm{T}\cdot\Delta\mathrm{S} \tag{15}\] \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters of ORC** & **Values** \\ \hline Heat recovery system pinch point (PP) & 10 K \\ Temperature difference of the recuperator (\(\Delta\mathrm{T}_{\mathrm{rec}}\)) & 5 K \\ Temperature difference of the ORC condenser & 10 K \\ Superheating (\(\Delta\mathrm{T}_{\mathrm{sh}}\)) & 5 K \\ Pump’s Isentropic efficiency (\(\mathrm{n}_{\mathrm{is,pump}}\)) & 0.8 \\ Efficiency of the pump motor (\(\mathrm{n}_{\mathrm{motor}}\)) & 0.8 \\ Isentropic efficiency of the turbine (\(\mathrm{n}_{\mathrm{1s,turb}}\)) & 0.85 \\ Electromechanical efficiency (\(\mathrm{n}_{\mathrm{mg}}\)) & 0.97 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: ORC parameters. (\(\Delta\)G) is [PERSON]'s free energy and (T\(\cdot\)AS) represents the thermal energy demand. The flow rate of the produced hydrogen (\(\dot{\rm N}_{\rm hydr}\)) in mol/s is calculated below [28]:  
\[\dot{\rm N}_{\rm hydr}=\frac{\rm J}{2\cdot\rm FC}=\dot{\rm N}_{\rm w,reacted} \tag{16}\]  
In the above expression, J is the current density expressed in [A/m\({}^{2}\)], FC is the Faraday constant, and \(\dot{\rm N}_{\rm w,reacted}\) is the molar flow rate of reacted water. In addition, the molar flow rate of oxygen and water outlet are described by the equations below [28]:  
\[\dot{\rm N}_{\rm ox}=\frac{\rm J}{4\cdot\rm FC} \tag{17}\]  
\[\dot{\rm N}_{\rm w,out}=\dot{\rm N}_{\rm w,in}-\frac{\rm J}{2\cdot\rm FC} \tag{18}\]  
Moreover, the hydrogen fuel exergy rate (exhydr) is calculated as [28]:  
\[\rm ex_{hydr}=ex_{hydr,chem}+ex_{hydr,phy} \tag{19}\]  
(exhydr,chem) and (exhydr,phy) are chemical and physical exergy rates in kJ/mol, respectively. The hydrogen chemical exergy is considered to be 236.1 kJ/mol [29]. The physical exergy can be defined as below [28]:  
\[\rm ex_{hydr,phy}=(h-h_{0})-T_{0}\cdot(s-s_{0}) \tag{20}\]  
Enthalpy (h) and entropy (s) are calculated for the water electrolysis conditions, and the subscript \"0\" indicates the reference ambient conditions. The electricity input to the electrolyzer can be described below [28]:  
\[\rm P_{el,WE}=J\cdot V \tag{21}\]  
The cell potential is the sum of the reversible potential (V\({}_{0}\)), the activation overpotential of the anode (Vactan), the activation overpotential of the cathode (Vact, cath), and the ohmic overpotential of the electrolyte (Vohm). It is determined by the following expression [28]:  
\[\rm V=V_{0}+V_{act,an}+V_{act,cath}+V_{ohm} \tag{22}\]  
The reversible potential (V\({}_{0}\)) is defined by the Nernst equation [27]:  
\[\rm V_{0}=1.229-8.5\cdot 10^{-4}\cdot(T_{WE}-298.15) \tag{23}\]  
where (T\({}_{\rm WE}\)) is the temperature of the PEM electrolyzer and the membrane.