## Appendix A
Note that with the aid of the three-way valve (component M in Figure 1), the inlet temperature to the DHW storage \(\delta_{\rm DHW}^{\rm(in)}\) is held constant at a fixed temperature by mixing the process water leaving the RPW-HEX with the water leaving the condenser in the real machine. Hence it can be assumed as constant. The maximum energy can be stored if the entire storage is charged to \(\delta_{\rm h}\) (\(\ell=0\)) and the storage is empty if the entire storage has a temperature of \(\delta_{\rm c}\) (\(\ell=L\)). Heating of the DHW storage only takes place in the cold region of the storage. Using an NTU description for a constant wall temperature (\(\delta_{\rm c}\)) one finds for the heat transfer to the DHW storage:  
\[\dot{Q}_{\rm DHW}=\ \dot{m}_{\rm w}c_{\rm p,w}\bigg{(}s_{\rm DHW}^{\rm(in)}- \delta_{\rm c}\bigg{)}\left(1-e^{-\frac{\alpha\  
lumped parameter approach, where a perfectly mixed water volume was assumed. The behavior of the outlet temperature in the region of interest (low temperatures indicated by the strong solid line of the moving boundary approach in Figure A1b) can be reproduced significantly better with the presented approach. Nevertheless, the moving boundary method will always underestimate the real temperature whereas the lumped parameter approach will always overestimate the real temperature.  
Inserting (A12) in (A2) gives an equation for the heat transfer rate to the DHW storage dependent on time:  
\[\dot{Q}_{\mathrm{DHW}}(t)=\ a\left(1-\frac{b}{\mathrm{e}^{d\ (k_{1}-at)}+b}\right)\] (A13)  
The heat transfer at the condenser is limited by two constraints. Firstly, by the set point temperature \(\mathrm{\mathcal{s}_{\mathrm{sp}}}\) (outlet temperature of the water after the condenser) and secondly by the minimum heat transfer that is provided at the minimal rotational speed of the compressor \(\dot{Q}_{\mathrm{con,msc}}\). The compressor turns off, once \(\mathrm{\mathcal{s}_{\mathrm{DHW,msc}}^{(out)}}\) at the minimum speed of the compressor is reached:  
\[\mathrm{\mathcal{s}_{\mathrm{DHW,msc}}^{(out)}}=\mathrm{\mathcal{s}_{\mathrm{ sp}}}\ -\frac{\dot{Q}_{\mathrm{con,msc}}}{\dot{m}_{\mathrm{w}}\mathrm{c}_{\mathrm{p,w}}}\] (A14)  
Inserting (A14) in (A12) and numerical rearrangement gives an equation for the time when the minimum rotational speed is reached:  
\[\tau_{\mathrm{msc}}=\frac{1}{a}\left(k_{1}-\frac{\ln(b)}{d}-\frac{\ln\left( \frac{\mathrm{\mathcal{s}_{\mathrm{DHW}}^{(\mathrm{in})}-\mathrm{\mathcal{s} _{c}}}}{\delta_{\mathrm{sp}}-\frac{\dot{Q}_{\mathrm{msc}}}{\dot{m}_{\mathrm{ w}}\mathrm{c}_{\mathrm{p,w}}}}-1\right)}{d}\right).\] (A15)  
With (A2), (A3) and the considerations discussed before, one finds an equation for the energy transferred over the condenser during operation mode (c) depending on the time \(t\):  
\[Q_{\mathrm{con}}(t)\ =\ \left\{ \begin{array}{ll}0&\tau_{\mathrm{min}}<0\\ \mathcal{Q}_{\mathrm{DHW}}(t)-Q_{\mathrm{DHW}}^{0}-\dot{m}_{\mathrm{w}}\mathrm{ c}_{\mathrm{p,w}}\left(\mathrm{\mathcal{s}_{\mathrm{DHW}}^{(\mathrm{in})}}- \mathrm{\mathcal{s}_{\mathrm{sp}}}\right)t&0\ \leq\ t<\tau_{\mathrm{msc}}\\ Q_{\mathrm{DHW}}(\tau_{\mathrm{min}})-Q_{\mathrm{DHW}}^{0}-\dot{m}_{\mathrm{w}} \mathrm{c}_{\mathrm{p,w}}\left(\mathrm{\mathcal{s}_{\mathrm{DHW}}^{(\mathrm{in })}}-\mathrm{\mathcal{s}_{\mathrm{sp}}}\right)\tau_{\mathrm{msc}}&0\ \ \leq\ \tau_{\mathrm{msc}}\ \leq\ t \end{array} \right.\] (A16)  
If \(\tau_{\mathrm{msc}}\) from (A15) is negative as in the first case of (A16), the HP is always off because the outlet temperature of the DHW storage is already above \(\mathrm{\mathcal{s}_{\mathrm{DHW,msc}}^{(out)}}\) at the beginning (\(t=0\)). Therefore no energy is transferred directly from the refrigerant to the process water (\(Q_{\mathrm{con}}=0\), \(Q_{\mathrm{RPW,R}}=0\)) and all the energy for the storage has to be provided by the RPW-HEX.