## Appendix A
If the outlet temperature of the DHW storage is always below \(\mathrm{\mathcal{s}_{\mathrm{DHW,msc}}^{(out)}}\), \(0\leq t<\tau_{\mathrm{msc}}\), as in the second case of (A16) the HP is turned on all the time and the compressor is controlled to provide always as much energy as needed to reach the set-point \(\mathrm{\mathcal{s}_{\mathrm{sp}}}\) at the condenser water outlet. If the HP reaches its minimum power within the time of the operation \(0\leq\tau_{\mathrm{msc}}\leq t\), the HP will be turned off at \(\tau_{\mathrm{msc}}\) and the energy is then provided by the RPW-HEX, only. The energy transferred from the refrigerant to the hot water over the RPW-HEX follows by integrating (A4) and finally the energy extracted from the stored energy in the RPW-HEX follows from integrating (A5) to:  
\[Q_{\mathrm{RPW,P}}(t)=\ Q_{\mathrm{DHW}}(t)-Q_{\mathrm{DHW}}^{0}-\frac{Q_{ \mathrm{con}}(t)}{1-\varepsilon_{\mathrm{RPW}}}\] (A17)From (A9) one can calculate the time \(\tau_{\rm DHW}\) needed to charge the DHW storages to a certain energy set-point \(Q_{\rm DHW}^{\rm SP}\) (e.g., the upper limit) analytically:  
\[\tau_{DHW}(Q_{\rm DHW}^{\rm SP})=-\frac{1}{a}\frac{d}{d}\left(d\,k_{1}-\ln(e^{dQ _{\rm DHW}^{\rm SP}}-b)\right)\] (A18)  
Inserting \(\tau_{\rm DHW}\) from (A18) as \(t\) in (A17) gives finally the energy \(Q_{\rm RPW,P}\) that has to be extracted from the RPW-HEX to charge the DHW-storage to this certain set-point \(Q_{\rm DHW}^{\rm SP}\). Figure 11 shows the contribution of the refrigerant and the PCM to the hot water generation in operating mode (c) over the time at a typical operation condition (\(\delta=0\)\({}^{\circ}\)C, \(\delta_{\rm SP}=43\)\({}^{\circ}\)C, \(\delta_{\rm C}=12\)\({}^{\circ}\)C, \(g_{\rm DHW}^{\rm(in)}=60\)\({}^{\circ}\)C, \(210\) L storage, standard-mode). Due to the increasing temperature of the water leaving the storage \(\delta_{\rm DHW,msc}^{\rm(out)}\) (decreasing cf. Figure 11a), the heat transfer rate decreases with time (cf. Figure 11a). Additionally, due to the restriction of the fixed set-point for the HP (\(\delta_{\rm SP}=43\)\({}^{\circ}\)C), the heat provided by the condenser has to decrease. Hence, the HP reaches the minimum operation speed of the compressor at \(\tau_{\rm msc}\) and the compressor turns off. Until the DHW storage is fully charged at \(\tau_{\rm DHW}\), the remaining energy must be provided by the PCM. At the end of the charging process, about one third of the energy for providing DHW at \(60\)\({}^{\circ}\)C was taken from the HP operating with a heating _COP_ and about two third of energy were taken from the energy stored in the RPW-HEX (which was also stored when the HP was operated in heating mode with a high COP (cf. Figure 11b). The time \(\tau_{\rm RPW}\) to extract a certain amount of energy from the RPW-HEX can be calculated numerically, e.g., with a Newton-solver, by inserting (A9) in (A17). Note that this is only possible if the energy stored in the RPW-HEX is lower than the maximum transferable energy from the RPW-HEX to the DHW storage which is limited by the DHW storage size or the defined maximum charging level of the DHW storage, respectively. If this is the case, the charging time can be calculated with (A18) and the remaining difference of energy remains in the RPW-HEX after the DHW-charging operation process.