## 2 System Description and Modelling
### Mathematical Modelling
#### 2.2.2 The Heat Pump Model  
1. [label=.] 2. Compressor  
The compressor of the HTTP system is selected to be of a screw type (Hanbell RC2-100G) [28], with a displacement of 98 m\({}^{3}\)/h at 2950 rpm and a volume ratio of 3.0. The compressor model in Simscape uses as input the evaporation, condensation and ambient temperature. As the compressor manufacturer provides information about the mass flow and power coefficients (Table 1) through the polynomial \(y\) below for R134a, the mass flow rate and the power consumption are estimated as a function of the evaporation and condensation temperatures, \((T_{ev},\ T_{cd})\). The mass flow rate in kg/h and the power consumption in W are calculated using the following equation with the respective coefficients from Table 1:  
\[y=c_{1}+c_{2}\times T_{ev}+c_{3}\times T_{cd}+c_{4}\times{T_{ev}}^{2}+c_{5} \times T_{ev}\times T_{cd}+c_{6}\times{T_{cd}}^{2}+c_{7}\times{T_{ev}}^{3}+c_{8 }\times T_{cd}\times{T_{ev}}^{2}+c_{9}\times T_{ev}\times{T_{cd}}^{2}+c_{10} \times{T_{cd}}^{3} \tag{5}\]  
The condenser of the heat pump is modeled as a shell and tube heat exchanger using the condenser-evaporator (TL-MA) block model, where energy is transferred from the refrigerant to the colder brine and various parameters, such as flow arrangement (counter flow) and geometrical characteristics and is set to reflect the problem specifications. Heat transfer between the hot side (refrigerant) and cold side (brine) is calculated based on the effectiveness-number of transfer units (\(\varepsilon\)-NTU) method for the counter-flow heat exchanger. The heat transfer is divided into three zones (liquid, mixture and vapor) and the heat transfer is calculated for each phase. The heat transfer calculation is based on the Gnielinski correlation for the subcooled liquid or superheated vapor zones, while the Cavallini-Zecchin correlation is used for the liquid-vapor mixture zone. The heat transfer characteristics of the condenser are summarized in Table 2.  
3. Expansion valve  
A thermostatic expansion valve was modeled by Simscape blocks, thermostatic expansion valve (2P), for the expansion process and was placed between the condenser and the evaporator of the heat pump system, moderating the flow into the evaporator. The opening of the valve was automatically adjusted by the Simscape block in order to achieve the desired superheat in the evaporator outlet (5K). \begin{table}
\begin{tabular}{c c c} \hline \hline
**Coefficient** & **For Power Consumption Estimation** & **For Mass Flow Rate Estimation** \\ \hline \(c_{1}\) & \(-\)41,051 & 4527.2 \\ \(c_{2}\) & 733.81 & 49.7467 \\ \(c_{3}\) & 1935.7 & \(-\)145.1809 \\ \(c_{4}\) & 14.075 & \(-\)0.18796 \\ \(c_{5}\) & \(-\)25.59 & 0.26831 \\ \(c_{6}\) & \(-\)20.338 & 2.06611 \\ \(c_{7}\) & 0.0261 & 0.019067 \\ \(c_{8}\) & \(-\)0.2159 & \(-\)0.003456 \\ \(c_{9}\) & 0.237 & \(-\)0.001059 \\ \(c_{10}\) & 0.0929 & \(-\)0.010284 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Power consumption and mass flow rate coefficients given by [PERSON] for the RC2-100G compressor model. \begin{table}
\begin{tabular}{l c c} \hline \hline
**Parameter** & **HTHP Condenser** & **HTHP Evaporator** \\ \hline Heat transfer coef. (W/m\({}^{2}\)K) & 1530 & 306 \\ Heat transfer area (m\({}^{2}\)) & 10.6 & 5.28 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Geometric characteristics of the heat pump’s evaporator and condenser. iv. Evaporator  
The evaporator of the heat pump system is modeled by Simscape blocks as a shell and tube, where heat is transferred from the vapor that exits the flash tank to the refrigerant in order to evaporate it, while the vapor is condensed. Similarly with the condenser case, the evaporator is modeled as a heat exchanger divided into three zones along the length of the pipe (liquid zone, mixture zone and vapor zone) to model the phase change in the fluid, while the heat transfer rate is based on the change in specific enthalpy in each zone.