## 2 Methods  
### Case Study  
The selected building was assumed to be located in Stuttgart, in the German state of Baden-Wurttemberg, in the southwest side of the country where a reference building was defined for a continental climate where the studied system would be implemented. Moreover, a reference system was defined to compare the environmental and energetic performance with regard to the innovative system.  
As a reference building, a refurbished multi-family house (MFH) was considered as the most representative building typology for the building stock in continental climate regions. The building has a total of five floors, with two dwellings per floor and an individual staircase located inside the building envelope. Each dwelling has a living surface area of 50 m\({}^{2}\), inhabited by three people. The ceiling/floor heights considered were 2.5 m/3.0 m, while the building width/depth was 16.3 m/7.6 m. A flat concrete roof and a glazing ratio of 20% in the north and south facades were assumed according to the most common MFH. The building model includes two zones per dwelling (1-2 and 3-4), plus the staircase zone.  
The reference system consists of an air-water heat pump that can provide heat to a DHW storage tank by means of a heat exchanger located inside the storage tank, and also to the heating system of each dwelling, as shown in Figure 1. An electric heater inside the DHW tank was considered as a back-up for DHW production. The sizing of the main system components was carried out considering heating and DHW demand of the building (Table 1).  
The diagram of the general layout of the innovative system is shown in Figure 2. The main components of the system are a PV system connected to the heat pump, 10 sensible heat storage DHW storage tanks (one for each dwelling), a high-temperature latent heat storage tank, and an electric battery. The latent heat storage is connected at the compressor outlet to store part of the energy contained in the hot refrigerant gas that leaves the compressor, which is used to generate DHW in an efficient way. There are many innovative aspects in the proposed system, such as the direct integration of an innovative three-media refrigerant/PCM/water heat exchanger (RPW-HEX) in the hot superheated section of the heat pump, the use of electric storage combined with both sensible and latent heat storage, and the use of a DC microgrid and innovative control for coupling the electric grid with the thermal distribution. Therefore, the use of PV panels and both the thermal and electrical storage systems help increasing the share of renewable energy. A description of system operating modes can be found in [8].  
\begin{table}
\begin{tabular}{l l l l} \hline
**Component** & **Variable** & **Value** & **Unit** \\ \hline DHW storage tank & Storage capacity & 420 & L \\ Heat pump & Maximum thermal power & 35 & kW \\ \hline \end{tabular}
\end{table}
Table 1: Sizing of the main components for the reference system.  
Figure 1: Schematic diagram for the reference system.  
The sizing of the main system components was performed as follows: the sensible heat storage capacity was fixed according to indications from technology provider, the heat pump size was fixed to ensure the coverage of building space heating peak demand obtained from the dynamic simulations described in the following section (16 kW at the yearly minimum external temperature, \(-12\)\({}^{\circ}\)C), and the latent heat thermal energy storage size was fixed to maximize its contribution to DHW production. The PV system nominal power and the electrical storage capacity were designed through an iterative process and to ensure that the yearly self-consumption and self-sufficiency KPIs (key performance indicators), obtained from the dynamic simulations explained in the following section, are both greater than 40%. As a result, the sizing that the main system components should have is shown in Table 2.