## 3 The Modelization of Frosting and Defrosting Cycles and Heat Pump Performance
The enthalpy \(\mathrm{h}_{2}\) of the air stream at the outlet of the evaporator can be calculated approximately (neglecting the enthalpy of the of the water that condenses on the finned coil) by applying an energy balance to the heat exchanger:  
\[\mathrm{h}_{2}=\mathrm{h}_{1}-\frac{\mathrm{Q}_{\mathrm{ev}}}{\mathrm{m}_{ \mathrm{a}}}, \tag{8}\]  
where \(\mathrm{Q}_{\mathrm{ev}}\) (kW) is the thermal power exchanged with the outdoor air by the machine's evaporator, and \(\mathrm{m}_{\mathrm{a}}\) (kg/s) is the air mass flow rate exiting the evaporator (also, in this  
Figure 7: Evaporator of the HP considered as a “black box”. case, the air mass flow rate exiting the evaporator is the same the one that enters the heat exchanger whenever the mass of water condensed on the evaporator may be neglected). Typically, the quantity of air processed by a heat pump is a parameter given in the technical datasheet of the unit, and the term \(\mathrm{Q_{ev}}\) can be calculated applying an energy balance to the whole heat pump. In fact, the unit works by extracting the power \(\mathrm{Q_{ev}}\) from the evaporator, thus providing the thermal power \(\mathrm{P_{th}}\) to the condenser and absorbing the electric power \(\mathrm{P_{el}}\). Hence  
\[\mathrm{Q_{ev}}=\mathrm{P_{th}}\bigg{(}1-\frac{1}{\mathrm{COP}}\bigg{)}, \tag{9}\]  
where COP is the coefficient of performance of the HP, defined as the ratio between thermal power \(\mathrm{P_{th}}\) and electric power \(\mathrm{P_{el}}\). This simple model of a RCD can be easily implemented in TRNSYS with no additional data on the heat pump evaporator, using only technical data from the heat pump datasheet. In [11], the authors simulated the RCD using time-dependent functions for electric and thermal power during the defrosting phase; a similar analysis can only be made if a huge amount of data are available from the manufacturer or if long-term experiments are conducted on a specific heat pump. Referring to the three heat pumps that are be investigated in this paper, the electric power input of the heat pump and the thermal power taken from the water tank are considered as constants along the defrost cycle. Their values are shown in Figure 7.0 Furthermore, additional details on the choice of both the values for the electric power and the thermal power are given in Figure 7.1 In detail, we assume for the same energy for the whole defrost cycle as well as the same electric energy input for each different HP, as proposed in [11]. In particular, the thermal and electric power trends along a generic defrost cycle are reported in Figure 8, according to the model proposed in [11]. The thermal power trend is modelled with two parabolic branches, while the electric power is modeled with two linear functions. In the same figure, the thermal and electric power considered in this analysis are reported, i.e., two constant functions during the whole defrost cycle of 300 s. In Figure 8, the surfaces below the lines are equal to both, with reference to the thermal power (a) and to the electric power (b). Moreover, the duration of the defrost cycle is taken as in [11] and corresponds to a mean time used by the manufacturers on their control systems. The air mass processed by the heat pumps is assumed to be a linearly increasing function of the thermal power of the machine, according to data given by a manufacturer [32]: used data refer to heat pumps characterized by a nominal thermal power ranging from 4.7 kW to 31 kW. The values of the air mass processed by the three HPs considered are presented in Table 5 and were obtained applying a linear interpolation on the abovementioned data given by the HPs' manufacturers. In Figure 9, the defrost control implemented in TRNSYS is shown through a flowchart diagram. It can be noticed that the defrost phase only starts if two conditions are simultaneously satisfied: (1) the enthalpy of the air at evaporator outlet is lower than the enthalpy at the dew point; (2) the HP is turned on.