*2.3. Step 3: Optimise the Heat Pumps*

Based on Step 2, the HP operating variables are optimised, and the optimal performance result is obtained by establishing the optimisation objective function of the HP, setting the range of independent variables and adding constraint conditions of the equation in Petro-SIM. It is necessary to optimise the HP based on the simulation to obtain its best performance. Petro-SIM has a multivariable optimiser. The optimiser can be used to optimise selected independent variables within defined ranges when a simulation converges, to minimise or maximise the objective function. The optimisation functionality of Petro-SIM can manipulate multiple process variables. It can be used for constrained optimisation expression with some flexibility, such as solving the objective function to maximise profit or minimise utility consumption. The iterative calculation method of the Optimiser in Petro-SIM is based on the IPOPT solver [27]. In this study, the HP system is optimised by adding an Optimiser unit in the Petro-SIM simulation. In the Optimiser, the independent variables, objective and constraints are defined to perform the optimisation. In this study, the optimisation independent variables were set as the outlet pressure (or temperature) of the Compressor and the outlet pressure (or temperature) of the Expander/VLV. The constraints are set as the ΔTmin of the HXs. The optimisation objective function is COP of the HP. The performance of a HP is generally evaluated by the COP. The COP of a HP is defined in Equation (1) [33].

$$\text{COP} = \frac{Q\_h}{W} \tag{1}$$

and

$$\mathcal{W} = Q\_h - Q\_\mathcal{c} \tag{2}$$

where: *Qh*—Heat output of the heat pump, kW; *W*—Electrical or power consumption of the HP, kW.

The identification of the HP behaviour and best performance is performed by maximising the COP value of the HP under consideration, using the model set up in Petro-SIM [27]. The specifications of the temperatures and duties are varied within ranges expected from the considered process type, and the behaviour of the system is investigated. The procedure then provides the best HP—process configuration with the optimal values of the pressures after the compressor and the expander of the selected HP.
