## 5 Optimization through Parametric Analysis under Variable Input Conditions
Accordingly, it is possible to state that, according to the specific application, a good compromise for heat transfer could be a two-layer configuration (in cases where the weight and dimensions are not especially constraining issues) or the four-layer configuration, in which the penalization of heat transfer is compensated by the lower dimensions and weight of the TES. For the case of discharge, the parameters investigated were the flow rate of the HTF, which was already proven during experiments to be an important parameter in  
Figure 5: Temperatures in the PCM and refrigerant circuit during charging for different numbers of stacked PCM layers. Figure 6: Thermal power during charging for different numbers of stacked PCM layers. the operation of the system [30], and the number of stacked PCM layers. The results, for the case of four PCM layers and a HTF inlet of 12 \({}^{\circ}\)C are shown in Figures 7 and 8. From Figure 7, it is possible to notice that the same trend is observed for all the cases; i.e., a linear temperature increase, with a slope change when the melting process starts. What is interesting to note is that, for all the flow rates investigated, the PCM had still not completed the phase change after 2000 s, and that there was a considerable temperature difference between the PCM and the HTF. Indeed, especially for the case of 0.3 kg/s and 0.5 kg/s, already, after 1000 s the HTF outlet temperature was close to the inlet one (12 \({}^{\circ}\)C); thus, indicating that no useful effect can actually be supplied to the user. The average power supplied to the user is shown in Figure 8. During the first seconds, there is a peak, which increases with increasing flow rates, but already after 250 s, there is a strong decrease in the power supplied; down to values of 4 kW to 2 kW, when passing from 1.2 kg/s to 0.3 kg/s. As is common in other latent storage systems, the optimal HTF flow rate depends on the intended application [13; 14]; if high power has to be supplied to the user, it is possible to increase the HTF flow rate, whereas to have a more constant supply for a longer time, lower HTF flow rates are needed. However, as clearly highlighted, the configuration with four PCM layers still has several limitations, in terms of the heat transfer, as proven by the temperature difference between the PCM and the HTF. Such features might be exploited through suitable management strategies, as will be discussed in the next section. However, in order to highlight the effect of the PCM volume in between the HTF channels, the cases of one, two, and four layers were investigated. Figure 9 depicts the average PCM temperature evolution for the layouts chosen. There is a clear effect when reducing the number of layers: the phase transition is completed in less than 500 s for one-layer, 1200 s for two-layers, and almost 2500 s for four-layers. In order for the PCM to reach the temperature of the HTF, and therefore complete the heat exchange, also including the sensible part, it takes 1500 s for the one-layer layout, 2500 s for two-layers, and more than 4000 s for four-layers. Nonetheless, as already stated for the case of charging, reducing the number of layers would strongly increase the weight and dimensions of the heat exchanger, thus penalizing the heat transfer density. Moreover, in all the cases where a longer period of operation disconnected from the grid (i.e., without using a heat pump) is foreseen, the four-layer case can be the most advantageous one. A good compromise can be instead obtained with the two-layer layout. Figure 7: Average PCM temperature for different HTF flow rates during discharge for four layers and an HTF inlet at 12 \({}^{\circ}\)C.