# Performance Analysis of a Zero-Energy Building Using Photovoltaics and Hydrogen Storage
## 2 Material and Methods
### Basic Mathematical Part  
The electricity consumption of the heat pump in the heating mode (\(\mathrm{P_{el,hp,heat}}\)) is calculated as:  
\[\mathrm{P_{el,hp,heat}}=\frac{\mathrm{Q_{heat}}}{\mathrm{COP}} \tag{1}\]  
The electricity consumption of the heat pump in the cooling mode (\(\mathrm{P_{el,hp,cool}}\)) is calculated as:  
\[\mathrm{P_{el,hp,cool}}=\frac{\mathrm{Q_{cool}}}{\mathrm{EER}} \tag{2}\]  
The electricity consumption for the DHW production (\(\mathrm{P_{el,DHW}}\)) is calculated as:  
\[\mathrm{P_{el,DHW}}=\frac{\mathrm{Q_{DHW}}}{\mathrm{\eta_{el,DHW}}} \tag{3}\]  
The DHW thermal demand (\(\mathrm{Q_{DHW}}\)) is calculated as:  
\[\mathrm{Q_{DHW}}=\mathrm{m_{DHW}}\cdot\mathrm{c_{P}}\cdot\left(\mathrm{T_{DHW} }-\mathrm{T_{grid}}\right) \tag{4}\]  
The electricity demand for the appliances & lighting (\(\mathrm{P_{el,a-l}}\)) is calculated utilizing the floor area of the building (\(\mathrm{A_{floor}}\)), the specific load (\(\mathrm{q_{a-l}}\)) and the operating fraction according to the time (fr):  
\[\mathrm{P_{el,a-1}}=\mathrm{A_{floor}}\cdot\mathrm{q_{a-1}}\cdot\mathrm{fr} \tag{5}\]  
The total electricity demand (\(\mathrm{P_{el,tot}}\)) is calculated as below:  
\[\mathrm{P_{el,tot}}=\mathrm{P_{el,hp,heat}}+\mathrm{P_{el,hp,cool}}+\mathrm{P_{el,DHW}}+\mathrm{P_{el,a-1}} \tag{6}\]  
The photovoltaic electrical efficiency can be calculated by the next equation [37]:  
\[\mathrm{\eta_{el}}=\mathrm{\eta_{el,ref}}\cdot\left(1-\beta\cdot\left(\mathrm{ T_{cell}}-\mathrm{T_{ref}}\right)\right) \tag{7}\]  
where the reference temperature (\(\mathrm{T_{ref}}\)) was selected at 25 \({}^{\circ}\)C in this work.  
The cell temperature can be estimated by the next formula [38]:  
\[\mathrm{T_{cell}}=\mathrm{T_{am}}+\mathrm{f}\cdot\mathrm{G_{T}} \tag{8}\]  
In this work, the cell temperature parameter (f) was selected close to 0.04 m\({}^{2}\)K/W according to the literature [37; 38].  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline SCOP of the heat pump & 4.0 \\ SEER of the heat pump & 4.0 \\ DHW electrical heater efficiency & 95\% \\ DHW daily demand & 50 L/person \\ DHW temperature & 45 \({}^{\circ}\)C \\ Water mean grid temperature & 18 \({}^{\circ}\)C \\ Electrolyzer mean conversion efficiency & 60\% \\ Fuel cell mean conversion efficiency & 40\% \\ Density of the stored hydrogen & 7.7 kg/m\({}^{3}\) \\ Hydrogen lower heating value & 120 MJ/kg \\ Photovoltaic nominal electrical efficiency & 19.7\% \\ Temperature reduction coefficient & \(-\)0.004 K\({}^{-1}\) \\ Tilt angle of the photovoltaic panels & 30\({}^{\circ}\) \\ Azimuth angle of the photovoltaic panels & 0\({}^{\circ}\) \\ \hline \hline \end{tabular}
\end{table}
Table 2: Basic data for the investigated system.  
The electricity production of the photovoltaic field is calculated as:  
\[\mathrm{P_{el,pv}}=\mathrm{n_{el}}\cdot\mathrm{A_{pv}}\cdot\mathrm{G_{T}} \tag{9}\]  
When the produced electricity from the photovoltaic field is higher than the demand, the electricity quantity that feeds the electrolyizer is calculated as below:  
\[\mathrm{P_{el,elect}}=\mathrm{P_{el,pv}}-\mathrm{P_{el,tot}}>0 \tag{10}\]  
In this case (charging/storage mode), the produced hydrogen (\(\mathrm{m_{H2,prod}}\)) is calculated as below:  
\[\mathrm{m_{H2,prod}}=\frac{\mathrm{n_{elect}}\cdot\mathrm{P_{el,elect}}}{\mathrm{ LHV}} \tag{11}\]  
When the produced electricity from the PV is lower than the demand, the electricity quantity that has to be produced by the fuel cell is calculated as below:  
\[\mathrm{P_{el,fc}}=\mathrm{P_{el,tot}}-\mathrm{P_{el,pv}}>0 \tag{12}\]  
In this case (discharging mode), the hydrogen consumption (\(\mathrm{m_{H2,cons}}\)) is calculated as below:  
\[\mathrm{m_{H2,cons}}=\frac{\mathrm{P_{el,fc}}}{\mathrm{n_{fc}}\cdot\mathrm{LHV}} \tag{13}\]