## 2 Methods
### Simulation Models  
The HPWH considered for systems 1, 2, and 3 was an all-in-one air-to-water device. This kind of system uses its DHW tank as a hot sink and includes two wrap-around heat-exchangers. The first one is used as a condenser in the heat pump cycle, while the other is suitable for connecting additional heat sources. The main features of the HPWH are listed in Table 1. These data refer to the standard UNI EN 16147:2011 [38] that introduced two testing cycles. Both tests rely on a heating cycle aimed at warming water from 10 \({}^{\circ}\)C to 55 \({}^{\circ}\)C. In the first test, inlet air temperature and humidity were fixed at 7 \({}^{\circ}\)C and 89%, respectively (cycle A7/W10-55), while the second test relied on inlet air temperature at 15 \({}^{\circ}\)C and relative humidity at 74% (cycle A15/W10-55). The HPWH model was run in stationary conditions with an input according to EN 16147:2011. Since no Trnsys type is available for simulating the described HPWH, a specific model was set up for the heat pump operation (Figure 3). It was based on the combined use of two available types. In particular, type 938 [39] was used for performing the air-to-water heat pump cycle obtaining the heat delivered to the water sink (Q-to-water) at a given time step (15 min). Q-to-water was used as input in type 1237 [40] to evaluate the water tank temperature at the specific tapping condition. The water temperature was used as input in type 938 with the tank as the heat sink of the HP. The refrigerant flow rate was evaluated as a function of Q-to-water, forcing a temperature difference between the \begin{table}
\begin{tabular}{c c c} \hline \hline
**Features** & & \\ \hline Heating with heat pump, maximum temperature & 65 & \({}^{\circ}\)C \\ Warm-up time at chosen cycle A15/W10-55(*) & 5:17 & h:min \\ Warm-up time at chosen cycle A7/W10-55(*) & 6:10 & h:min \\ Energy consumption by chosen cycle A15/W10-55 & 3.95 & kWh \\ Energy consumption by chosen cycle A7/W10-55 & 4.05 & kWh \\ COPDHW A15/W10-55 & 3.07 & - \\ COPDHW A7/W10-55 & 3.00 & - \\ Maximum power consumption with heat pump & 490 & W \\ Back-up electric resistance heater power & 2000 & W \\ Nominal air-flow rate & 480 & m\({}^{3}\)-h\({}^{-1}\) \\ Volume & 200 & litres \\ Maximum tank temperature with electric resistance & 90 & \({}^{\circ}\)C \\ U-Value of the DHW tank shell & 0.9 & W(m\({}^{2}\)-K)\({}^{-1}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Heat pump water heater (HPWH) features from technical datasheet. DHW—domestic hot water. Figure 2: Scheme of the simulated plants. inlet/outlet of the fluid equal to 5 \({}^{\circ}\)C in each time-step. The proposed model was run at the nominal condition described in EN-16147:2011 (A15/W10-55 and A7/W10-55 cycles). It was validated through the comparison of figures of energy consumption, coefficient of performance (COP), and warm-up time reported in the technical data sheet, obtaining relative errors below 10%. Figure 3 shows the simulation model scheme. As previously mentioned, System 2 was modeled to test how thermal and electrical storage could interact each other for achieving the maximum energy (electricity) saving target by ensuring comfort conditions and by exploiting the solar radiation source as much as possible. For this reason, three different PV plants were supposed based on the results of HPWH simulation: two stand-alone (SA) systems, characterized by two different rated peak powers, and a grid-connected system. The PV panel component system characteristics are presented in more detail in the next paragraph, while component features are listed in Tables 2 and 3. For the systems based on combination with solar thermal collectors (3 and 4), different configurations were supposed. First of all, the main solar thermal component consisted of a flat-plate collector with highly selective surface properties (efficiency parameters are listed in Table 3). Furthermore, we considered a forced circulation water loop scheme, driven by a 50-W pump.