## 3 The Modelization of Frosting and Defrosting Cycles and Heat Pump Performance  
In this paper, reverse-cycle defrosting (RCD) was considered to melt the ice that is unavoidably deposited on the evaporator. In fact, among the many solutions to melt the ice build-up on the evaporator, RCD is the most widespread methodology adopted by commercial air-to-water heat pumps [28]. During the defrosting transient, the heat pump reverses the thermodynamic cycle and transfers the heat from the building to the external finned heat exchanger. It is important to stress how, in this case, the water thermal storage installed within the heating system allows the mitigation of the negative impact of the defrost cycles on indoor comfort conditions. In fact, thermal energy can be drawn from this element, avoiding a noticeable decrease in internal air temperature. As highlighted by the literature, there are many possible control logics of defrost cycles. In particular, the defrosting technique (e.g., RCD, hot-gas bypass, water spray, electric heating), the duration of defrost cycle, and the algorithm to start defrosting are elements that have been deeply investigated by researchers and heat pump manufacturers [13; 28; 29]. In this analysis, we considered a constant pump cycle duration that was equal to 5 min [30] with a constant electric power absorbed by the heat pump and a constant thermal power drawn by the tank during the whole defrost cycle. A simple model for establishing when the heat pump needed defrosting was introduced. The evaporator of  
Figure 6: Layout of the heating system implemented in TRNSYS. the machine was considered as a black box (an open thermodynamic system), as shown in Figure 7. The air stream entered the evaporator in conditions expressed by Subscript 1 and exited in the conditions expressed by Subscript 2. The term \(\mathrm{m}_{w}\) (kg/s) represents the mass flow rate of water condensed on the heat exchanger that may freeze. The symbol t refers to the temperature, x refers to the vapor quality, and h refers to the specific enthalpy of the air stream. All of the parameters associated with Entry State 1 are known since they refer to the conditions of the outdoor ambient air. Using the psychometric formula proposed by [31]:  
\[\mathrm{h}=1.006\mathrm{t}+\mathrm{x}(2501+1.84\mathrm{t}), \tag{3}\]  
the enthalpy \(\mathrm{h}_{1}\) (kJ/kg) as well as the dew point temperature \(\mathrm{t}_{\mathrm{DP}}\) (\({}^{\circ}\)C) can be calculated and given by  
\[\mathrm{t}_{\mathrm{DP}}=\frac{4030.183}{16.6536-\mathrm{ln}\left(\frac{ \mathrm{P}_{\mathrm{sat}}}{1000}\right)}-235, \tag{4}\]  
\[\mathrm{P}_{\mathrm{sat}}=1000\exp\left(16.6536-\frac{4030.183}{\mathrm{t}+2 35}\right) \tag{5}\]  
where \(\mathrm{P}_{\mathrm{sat}}\) (Pa) is the saturation vapor pressure of the water vapor available in the air at the conditions expressed by Subscript 1. The vapor quality of the mixture at the dew point can be calculated as well, by means of the relation  
\[\mathrm{x}_{\mathrm{DP}}=0.622\frac{\varphi\mathrm{P}_{\mathrm{sat}}}{\mathrm{ P}_{\mathrm{tot}}-\varphi\mathrm{P}_{\mathrm{sat}}}, \tag{6}\]  
where \(\varphi\) is the relative humidity (in this case \(\varphi=1\)) and \(\mathrm{p}_{\mathrm{tot}}\) (Pa) is the atmospheric pressure at the altitude of the selected location. Equations (4) and (6) allow the air enthalpy at the dew point to be obtained, namely  
\[\mathrm{h}_{\mathrm{DP}}=1.006\mathrm{t}_{\mathrm{DP}}+\mathrm{x}_{\mathrm{DP }}(2501+1.84\mathrm{t}_{\mathrm{DP}}). \tag{7}\]  
The air enthalpy at the dew point gives information about the moisture formation (and subsequently, the possible frost formation) on the evaporator of the heat pump: if the air enthalpy at the outdoor heat exchanger outlet in Condition 2 is lower than \(\mathrm{h}_{\mathrm{DP}}\), frost formation on the heat exchanger may occur, and the defrost cycle has to start after a certain interval.