Optimum Design and Control of Heat Pumps for Integration into Thermohydraulic Networks

: Germany has become one of the leading players in the transformation of the electricity sector, now having up to 42% of electricity coming from renewable sources. However, the transformation of the heating sector is still in its infancy, and especially the provision of industrial process heating is highly dependent on unsustainable fuels. One of the most promising heating technologies for renewable energies is power-to-heat, especially heat pump technology, as it can use renewable electricity to generate heat e ﬃ ciently. This research explores the economic and technical boundary conditions regarding the integration of heat pumps into existing industrial thermohydraulic heating and cooling networks. To calculate the optimum design and control of heat pumps, a mixed-integer linear programming model (MILP) is developed. The model seeks the most cost-e ﬃ cient conﬁguration of heat pumps and stratiﬁed thermal storage tanks. Additionally, it optimizes the operation of all energy converters and stratiﬁed thermal storage tanks to meet a speciﬁed heating and cooling demand over one year. The objective function is modeled after the net present value (NPV) method and considers capital expenditures (costs for heat pumps and stratiﬁed thermal storage tanks) and operational expenditures (electricity costs and costs for conventional heating and cooling). The comparison of the results via a simulation model reveals an accuracy of more than 90%. decision can be justiﬁed by the large nominal heat ﬂow rate of 172 kW. This shows that the preselection negatively a ﬀ ects the outcome of the optimizer, as it reduces the variety of selection. However, without the preselection, the standard run with 15 min time steps computes over one week, while the preselection reduces the computational time to 14 h on a machine with an Intel(R) Core(TM) i7-7700K central processing unit of 4.20 GHz and random-access memory of 16 GB.


Introduction
Germany is in the midst of transforming its electricity sector, presently having up to 42% renewable generation. However, the decarbonization of the heating sector is lagging behind, especially in industrial process heating-even in low-temperature areas (40-150 • C)-with over 90% of unsustainable fuels [1,2]. Therefore, this research aims to assess methods of sustainable industrial processes for heating and cooling, suitable for the climate protection program 2030 of the German government ("Klimaschutzprogramm 2030") [3]. CO 2 pricing and the funding program for energy efficiency and process heating from renewable energies will lead industrial companies to adopt new designs for process heating [3] (p. 93). Regardless of the German government's decarbonization goals, the integration of heat pumps offers a financial and technical advantage, with potential final energy savings of 6.3% in the German industry [4] (p. 22). To achieve the best efficiency possible, the parallel provision of heating and cooling in thermohydraulic networks with a heat pump should be analyzed in future design processes [5] (p. 30).

Heat Pumps in Industrial Sites
The application of heat pumps in thermal generation circuits in industrial sites is limited because of their temperature range. Heat pumps in industrial applications can generate temperatures up to 100 • C if the heat source provides a sufficient temperature (higher temperatures are possible) [4] (p. 27). The temperature level depends on the industrial application, and therefore, heat pump operation should focus on industries requiring temperature levels below 100 • C. As Figure 1 shows, potential industries include plastics and rubber, mechanical engineering, publication and printing, automotive, paper, and food as they require not only process heating below 100 • C but process cooling with temperatures over 0 • C, which can be provided by heat pump technology [7] (p. 53). The parallel provision of process heating and cooling enables the heat pump to unleash its full potential, which could result in a 30,532 GWh·a −1 annual energy provision by heat pump operation [8] (pp. 82-83) [9] (p. 6). Figure 1 displays the energy percentage that operates below 100 • C (for heating) or over 0 • C (for cooling) according to the industry, for example, 8.71% of the total process cooling demand are over 0 • C and are consumed in the rubber industry [8] (pp. 82-83) [9] (p. 6). Despite these promising numbers, few companies presently leverage the potential of heat pumps. The potential even increases if cooling energy for air conditioning is explored as well. One of the main reasons for this unused potential is the complexity of heat pump integration, especially when both heating and cooling are part of the integration process.

Industrial Heating and Cooling Networks
To further understand the concept of the integration process thermohydraulic systems are explained. Thermohydraulic systems can be divided into several subsystems: generation circuit, distribution circuit, hydraulic circuit (closed system with its own mass flow rate), hydraulic network (combination of hydraulic circuits), and energy transfer unit. Distribution circuits control the distribution of heating and cooling by means of fluids (water) from the generators to consumers [6] (p. 4). Generator circuits are responsible for generating the required heating or cooling energy. Potential facilities for the generation of heating or cooling include boilers, heat pumps, cooling machines, and systems with heat exchangers for the use of solar energy [6] (p. 8). Generation and distribution circuits can be realized as single-circuit systems or two-circuit systems with complex network structures. The transfer technology in heating and cooling networks depends on application requirements. Possible transfer units include storages or heat exchangers [6] (p. 4).

Heat Pumps in Industrial Sites
The application of heat pumps in thermal generation circuits in industrial sites is limited because of their temperature range. Heat pumps in industrial applications can generate temperatures up to 100 °C if the heat source provides a sufficient temperature (higher temperatures are possible) [4] (p. 27). The temperature level depends on the industrial application, and therefore, heat pump operation should focus on industries requiring temperature levels below 100 °C. As Figure 1 shows, potential industries include plastics and rubber, mechanical engineering, publication and printing, automotive, paper, and food as they require not only process heating below 100 °C but process cooling with temperatures over 0 °C, which can be provided by heat pump technology [7] (p. 53). The parallel provision of process heating and cooling enables the heat pump to unleash its full potential, which could result in a 30,532 GWh•a −1 annual energy provision by heat pump operation [8] (pp. 82-83) [9] (p. 6). Figure 1 displays the energy percentage that operates below 100 °C (for heating) or over 0 °C (for cooling) according to the industry, for example, 8.71% of the total process cooling demand are over 0 °C and are consumed in the rubber industry [8] (pp. 82-83) [9] (p. 6). Despite these promising numbers, few companies presently leverage the potential of heat pumps. The potential even increases if cooling energy for air conditioning is explored as well. One of the main reasons for this unused potential is the complexity of heat pump integration, especially when both heating and cooling are part of the integration process.  Process heating and cooling in Germany depending on the industry, temperature range, and energy with the percentage of total process heating and cooling demand [8] (pp. 82-83) [9] (p. 6).

Methods for Optimal Integration of Heat Pumps
Currently, optimization techniques such as mixed-integer linear programming (MILP) are used to support planners in the heat pump integration process [10,11]. Such algorithms require several simplifications in the modeling of a heat pump and often do not consider design, control, and partial load behavior in combination [12][13][14][15]. Instead of focusing on the simultaneous supply of heating and cooling, only one of them is considered [12][13][14][15]. Therefore, this research addresses the design and control of a heat pump in one MILP algorithm, including state-of-the-art technology (partial load) [16], and simultaneous heating and cooling supply.
In conclusion, a tool was developed to help industrial companies to decarbonize their process heating and cooling supply. The tool calculates the optimal design and operation of heat pumps to integrate them into a thermohydraulic network. The tool is based on a MILP model, which designs the optimal constellation and operation of heat pumps, stratified thermal storage tanks, and a conventional energy converter. The optimization aims to maximize the net present value (NPV), considering an operation period of one year.
The MILP model is elaborated in Section 2. Section 3 validates the MILP model with a sensitivity analysis followed by a comparison with a simulation model, to accurately render the performance of the MILP model [17] (p. 32). In the final section, experiences and limitations of the approach are discussed and concluded.

Materials and Methods
The planning process for the optimal integration of heat pumps is divided into four steps, displayed in Figure 2. In the first step, a potential library for heat pumps is extended by uploading new heat pump models. The optimization model uses this library, as only existing heat pumps should be considered. The library contains heat pump data in terms of the efficiency curve and electrical power curve. The library is then passed to a preselection algorithm to reduce the computational time of the optimization model. In the third step, the optimization model calculates the optimum constellation of heat pumps and stratified thermal storage tanks for a heating and cooling network to meet respective demand within the optimized operation of one year. The optimization model is formulated as a mathematical model from the problem class MILP consisting of a goal function, a solution space as well as decision variables. As MILP representation, the boundary conditions are formulated linearly while the decision variables can also consist of integer variables. The boundary conditions (here the thermohydraulic system) limit the solution space. The optimization computes the minimum or maximum of the objective function [11]. The last step is the optional comparison of the MILP results with a simulation model. The simulation model displays the MILP model in the modeling and simulation environment Dymola and is directly connected with the results from the MILP model through a functional mock-up interface (FMI) [18,19]. The MILP results are then passed to the user in an Excel sheet containing the configuration of heat pumps and stratified thermal storage tanks as well as their operations at each time step (on/off, heat/cold flow rate).   Figure 3 displays a thermohydraulic equivalent circuit of a heating network consisting of a generator circuit (right), a transfer unit (middle), and a distribution circuit (left). Thermal energy is generated by a heat pump (c) and a conventional energy converter (d). The heat pump is connected to a heat source (in this case a cooling network). To offer the heat pump flexibility on the generation side, a stratified thermal storage tank (later referred to as storage) (b) is installed. During the loading process of the storage, a heat rate flows from the flow to the return through the storage layers while the unloading process operates vice versa. The generated energy is transferred through a heat exchanger to the consumer (a). A MILP model is developed to depict the four components (heat pump, storage, conventional energy converter, consumer) mathematically. All mathematical expressions can be viewed in Table A5. The model integrates storages and heat pumps into an existing thermohydraulic network consisting of a distribution circuit, transfer unit, and generation circuit with a conventional energy converter. The thermohydraulic equivalent circuit represents the heating and cooling networks, which are modeled analogously to each other. The major assumption of the model is that all energy converters and the storage feed into the network with the same temperature T flow,c/h and receive the same return temperature T return,c/h t from the transfer unit (heat exchanger). However, the storage feed into the flow strand could be lower than T flow,c/h if all layers do not have the flow temperature. This results in a mixing temperature lower than the required demand temperature.

Mathematical Model
The MILP model seeks the most cost-efficient configuration of heat pumps and flexibility options (storages). The cost-efficient objective is achieved by optimizing the operation of the generation circuit to meet the demand over one year with a temporal resolution of ∆t. The objective function is modeled after the NPV method [20]  Q con,c/h t with conventional heating and cooling. The profit is calculated by subtracting the optimized opex from the unoptimized opex. The profit is discounted over a payback period A with an interest rate z. To achieve the most cost-efficient configuration, the objective function C tot,opti must be maximized: The satisfaction of heating or cooling demand . Q cd/hd t is ensured by the following condition: where S out,c/h t is the heat/cold flow rate out of the storage, S in,c/h t is the heat/cold flow rate into the storage, and is the heat/cold flow rate for every heat pump. The heat pump is modeled as a quasi-stationary process, and its heat/cold flow rate is calculated with the coefficient of performance (COP) [21] (pp. 312-314). It is assumed that the temperatures of the network do not change with the integration of the heat pumps and, therefore, are given (assumption is checked in Section 3.3). The COP and the electrical power curve are then linearized with a multiple linear regression [22] (pp. 51-53). An example data sheet is provided in Appendix A ( Figure A1). The COP and the maximum electrical power depend on the flow temperature in the heating circuit and the return temperature in the cooling circuit [7]. These temperatures are assumed to be given in 15 min time steps over one year. With the regressor functions for every heat pump and the given temperatures at each time step, the COP i,t , the maximum electrical power P max i,t , and the minimum electrical power P min Sustainability 2020, 12, 9421 6 of 23 The electrical power P i,t of a heat pump, i, can be chosen by the optimizer and is limited by the regressor function for the maximum electrical power P max i,t and minimum electrical power P min i of the heat pump i, with where b i in Equation (5) is the binary buying option and where u i,t in Equation (4) is the binary on-/off-switch for the heat pump. Equation (4) gives the optimizer the flexibility option of partial load by choosing P i,t between the maximum and minimum electrical power feed into the heat pump. The is calculated analogically to Equation (3) with [23]: Every heat pump can be turned on and off to offer the optimizer another flexibility option with the binary variable u i,t . The power circuit of a heat pump should not be interrupted too frequently; therefore, a minimum runtime T min is ensured with the following: The most important element of flexibility in the MILP model is related to storage. The optimizer can choose its dimension freely and is limited only by the space V max that the user can offer for hot and cold water storages (V st,h , V st,c ): The storage loading (marked as a red arrow) and unloading (marked as a blue arrow) in Figure 3 are modeled as the power flow of an electric battery: The current state of charge (SOC) is E c/w t (current energy level). It is calculated by the sum of SOC from time step t − 1 and the heat/cold flow rate S in,c/h t to load the storage over a time step length ∆t. The heat/cold flow rate S out,c/h t to unload the storage over a time step length ∆t is subtracted. The efficiencies for loading and unloading the storage are expressed by µ in and µ out . The energy losses of the storage from time step t − 1 to t are expressed by multiplying E c/w t with an efficiency ω. The energy level of the storage is limited by the current return temperature T return,c/h t and the constant flow temperature T flow,c/h : where ρ is the density of water and where c is the specific heat capacity of water. The storage is modeled as stratified storage, and these equations follow the assumption that the energy level of the storage is equal to zero if all layers have the return temperature T return,c/h t . The energy level of the storage is at its maximum if all layers have the flow temperature T flow,c/h . Furthermore, it is assumed Sustainability 2020, 12, 9421 7 of 23 that the storage unloads and loads always with the flow temperature T flow,c/h . The unloading and loading process is limited according to the following: where ∆m is the mass flow rate to load or unload the storage. To ensure stable flow conditions during the loading and unloading process, bidirectional flow is forbidden: where ϑ t is a binary variable and M is a Big-M-Coefficient [11] (p. 219). The binary variable ensures that during the loading process S out,c/h t will be equal to zero because ϑ t will be one: (1 − 1) · M = 0. During the unloading process ϑ t will be equal to zero to forbid loading the storage: therefore, the loading and unloading process is only limited by Equations (12) and (13).
In addition to the mathematical formulation, it should be noted that all parameters (technical or economic) can be easily changed (e.g., efficiencies, fluid parameters). Although the heat pump library is static, it can also be modified by the user. The model can select from all available heat pumps, which results in an exponential rise of the computational time, and therefore, an algorithm is developed to reduce computational time by preselecting possible options.

Preselection Algorithm
The preselection algorithm consists of a power limit through the nominal heat output and an efficiency comparison. The assumed spread between the cooling and heating demands in the industry is typically quite large, where . Q cd t . Q hd t , which means that the cooling demand would be the limiting factor of the heat pump operation [24]. That said, the nominal heat output . Q nom,h of a heat pump with a constant COP prep is limited by the cumulative cooling demand Q cd over the period τ p with [4] (p. 54): In addition to the power limit of the heat pump, the algorithm calculates the average COP av i for every heat pump i depending on the given temperatures T return,c/h t and T flow,c/h . Then, a defined number of heat pump models with the highest COP av i are selected. The algorithm preselects certain heat pump models (ms) and limits their amount (am) of purchases of the same heat pump model. These parameters can be modified and significantly change computational time.

Simulation Model
A simulation model was developed for validation purposes (see Figure 4). The model was developed in the Modelica modeling language using the libraries: "ModelicaStandardLibrary" and "Buildings" [25]. The generator circuit receives a signal with the current return temperature from the boundary block in Figure 4d  is controlled by a valve (SV6 or SV7 in Figure 4a-"Modelica.Fluid.ValvesIncompressible"). The storage is modeled as stratified storage (see Figure 4b-"Buildings.Fluid.Storage.Stratified"). The heat pumps (HP_1) cooling component is modeled by a heating/cooling block as well ("Buildings. Fluid.HeatExchangers.HeaterCooler_u"). It receives a signal of the current cold flow rate calculated by the COP and the electrical power, which are based on the regressor function from the MILP model and have the cold return temperature of every simulation step and the hot flow temperature as an input. A heating block ("Buildings. Fluid.HeatExchangers. Heater_T") receives the electrical power, the COP, the maximum heat flow rate, and the needed heat flow temperature as inputs. The output of this block is the actual heat flow rate, which is needed to calculate the electrical power for the NPV C tot,sim . Before the fluid flows into the consumer, its temperature is adjusted to the prescribed flow temperature T flow,c/h with the first block in Figure 4c   The results of the MILP model are necessary inputs for the simulation model. The simulation model requires information about the heat pump constellation (b i ) (heat pump model and purchase amount) and the storage size for the heating and cooling network, if needed. The operation signals of every energy converter in the generation circuit (including the storages) and the distribution circuit are passed to the simulation model as well. In conclusion, the following results and parameters are given to the simulation: • flow temperatures T flow,c/h to adjust the heat pump operation, • regression function to calculate the COP it and the maximum electrical power P max i,t for the heat pump operation in the simulation with the simulation's return temperature and the passed flow temperature T flow,c/h , • minimum electrical power P min i to limit the heat pumps' operation in the simulation, The listing is summarized in Table A4. The COP and the electrical power input of every heat pump are recalculated in each time step based on the resulting temperatures in the simulation (see regressor function in Table A4). The heat and cold flow rates of the heat pumps in the simulation model are calculated in analogy with the mathematical model; however, the simulation has a much sharper resolution of 60 s time steps. In the simulation model, the fluid in front of the consumer is forced to emerge with the flow temperature T flow,c/h . In case of incorrect calculations in the mathematical optimization resulting in an incorrect flow temperature, the additional power to lift or lower the fluid's temperature is added in terms of amount to the conventional energy converter . Q sim,con,c/h t . After the simulation is finished, the new values for electrical power P sim i,t and conventional heating/cooling . Q sim,con,c/h t are inserted into Equation (1) to calculate the objective function value C tot,sim for the simulation run. The error Er between the objective values C tot,sim and C tot,opti is calculated using the following formula:

Results
The presented method and model were applied to an industrial use case. Firstly, a parameter study was conducted to analyze the behavior of the mathematical model. Secondly, the method, including the preselection, mathematical model, and simulation model, was applied. Thus, the results of the MILP model and the simulation model can be compared to evaluate the error Er and proof the temperature assumptions (see Section 2.1).

Industrial Use Case
An industrial use case serves as the basis for the sensitivity analysis. Figure 5 displays the cumulative heating (b) and cooling demand (a) of the industrial example. The demands differ by a factor of 10, and the major cooling power operates below 1 MW while the major heating power operates below 3 MW. The heating demand has peaks up to 20 MW while the cooling demand reaches its maximum around 2 MW.

Sensitivity Analysis
The sensitivity analysis is divided into several parameter studies and is performed without the validation of the simulation model (validation follows in Section 3.3). Table 2 presents the input for the MILP model, which serves as a comparative example (standard) for the parameter study. The mass flow rates for the heating and cooling network . m c/h t are calculated using the demand and the given temperatures [21] (pp. 327-328). The maximum temperature spread ∆T max between the flow and return temperature is 6 K, and the time step is set to 60 min for the parameter study.  Table 3 displays the parameter variation for the parameter study. Demands are reduced individually and collectively to examine the influence of the respective demand (heating/cooling). Furthermore, temperature changes are investigated to evaluate their influence on efficiency and to understand how the tool reacts. The change in the specific costs should highlight the benefit of the heat pump and how the specific costs differently affect the NPV. The influence of the storage is determined, as well. The variation of the heat pump selection and the buying amount of one model primarily examines the influence of the preselection algorithm. An example of the heat pump selection would be two possible heat pump models (ms = 2) and each model can be purchased three times (am = 3).

Standard Case
For comparative reasons, the standard run or reference case of the MILP model (Table 3) is briefly introduced. Table 4 presents the heat pumps from the preselection with the average efficiency COP av  The storage is primarily unloaded during the weekend when the heating demand (see Figure 6) is not sufficiently high to run all heat pumps available. During the week, heat pump operation is limited only by cooling demand, as observable in Figure 6. Notably, the storage is more loaded than unloaded (11.9%), which results in unused energy over the year. Therefore, the storage size calculated by the model should be viewed critically.  The storage is primarily unloaded during the weekend when the heating demand (see Figure 6) is not sufficiently high to run all heat pumps available. During the week, heat pump operation is limited only by cooling demand, as observable in Figure 6. Notably, the storage is more loaded than unloaded (11.9%), which results in unused energy over the year. Therefore, the storage size calculated by the model should be viewed critically.
In conclusion, the heat pump operation during the week is very stable, because of the flattened slope of the cooling demand ( Figure 5). The coverage of demand in Figure 6 and the high NPV suggest that the tool attempts to completely cover cooling demand with heat pumps regardless of parameter variation. Exceptions might include variations of specific costs and temperatures.

Demand
For the parameter variation of demand, it is reduced from 80% to 60% to 40%. First, the heating demand is reduced, followed by the cooling demand, and then both demands. The mass flow rate is adjusted so that the temperatures in the thermohydraulic network remain constant. The preselection of heat pumps remains the same as for the standard run because the algorithm calculates its preselection with the averaged cooling demand and not the heating demand. Other thermodynamic parameters stay unchanged.
The reduction of the heating demand has almost no effect on the results because even a 40% heating demand allows complete coverage of the cooling demand by heat pump operation. In In conclusion, the heat pump operation during the week is very stable, because of the flattened slope of the cooling demand ( Figure 5). The coverage of demand in Figure 6 and the high NPV suggest that the tool attempts to completely cover cooling demand with heat pumps regardless of parameter variation. Exceptions might include variations of specific costs and temperatures.

Demand
For the parameter variation of demand, it is reduced from 80% to 60% to 40%. First, the heating demand is reduced, followed by the cooling demand, and then both demands. The mass flow rate is adjusted so that the temperatures in the thermohydraulic network remain constant. The preselection of heat pumps remains the same as for the standard run because the algorithm calculates its preselection with the averaged cooling demand and not the heating demand. Other thermodynamic parameters stay unchanged.
The reduction of the heating demand has almost no effect on the results because even a 40% heating demand allows complete coverage of the cooling demand by heat pump operation. In addition, the heat pump constellation stays the same for all three reduction steps (80%, 60%, 40%), as Table 5 demonstrates. However, the tool decides to buy two small heat pumps instead of one large-scale heat pump, which can be justified by a greater need for flexibility in low-peak areas of the heating demand. This decision results in a lower NPV compared to the standard run. The reduction of the cooling demand results in a much more significant change because the reduced demand limits heat pump operation. The tool decides to buy three small heat pumps (BWC 351 A07) and five large-scale heat pumps (BW 351 A18). Moreover, it selects cold water storage with a volume of 1528 L. The ratio of loading to unloading is 16.75%; the tool loads the storage without unloading it to cover more heating demand with the heat pumps. This raises the question of whether the cold water storage size for this application makes sense in practice. The NPV is reduced by almost 20% in comparison to the standard; this reduction of cooling demand by 20% has a greater impact than reducing heating demand by 60%.
A similar development as for the 80% cooling demand is observed with the 60% cooling demand. The NPV is drastically reduced, fewer heat pumps are purchased (four large-scale heat pumps-BW 351 A18, two small heat pumps-BWC 351 A07), and the cold water storage size is reduced to 835 L (loading/unloading ratio of 22.5%). Apparently, larger storage is no longer economical, and the energy surplus in the storage indicates that the choice of the cold water storage is again critical and should, if necessary, be lower in practice. Here, the NPV has been reduced by 38% compared with the standard. The cooling demand remains almost completely covered by heat pumps. The test run with a 40% cooling demand results in the purchase of three large-scale heat pumps (BW 351 A18) and cold water storage with a volume of 777 L, whose loading surplus is 21.6%. The NPV is reduced by 59% and develops in line with the other reduction steps of the cooling demand.
Within the joint stepwise reduction of the demand, a similar behavior as that of the reduction of the cooling demand is to be expected, since here, a clear dependence is presented. Therefore, the tool arrives at similar results, with the 80% heating and 80% cooling demand, as for the 80% cooling demand. The tool selects the same heat pump configuration as that of the 20% cooling demand reduction. The purchased cold water storage has a volume of 1940 L and a loading surplus of 15.5%. The excess in the storage is lower because the heating demand is reduced as well. The coverage of demand is analogous to the case of the 80% cooling demand. The NPV has been reduced by 21%, which differs slightly (<1%) from the case of the 80% cooling demand.
The cases for the reduction of the cooling and heating demand by 40% and 60% result in a similar configuration as with the cases for the cooling demand reduction by 40% and 60%. The NPV is 4% lower with the 40% reduction of heating and cooling demand and 6% lower with the 60% reduction of heating and cooling demand. Figure 7 displays the NPV development of all changes in demand. In sum, the following insights can be gained from the change in demand:

•
The tool will always try to completely cover the lower demand with heat pumps (in this example, this refers to the cooling demand).

•
The chosen volume of storage might not make sense despite the tool's selection, as it may be primarily loaded.

•
The size of cold water storage depends on both the heating and cooling demand.

•
The NPV is primarily dependent on the lower demand curve (in this example, this refers to the cooling demand).

Temperature
For the temperature variation, the flow temperatures are changed. The difference between the return and flow temperature remains a maximum of 6 K in both networks. Regardless of the temperatures, no changes are made to the specified standard. Furthermore, it is possible that the preselection changes, as other heat pumps in the temperature area, may have a better COP. The temperature change will have little effect on the coverage of demand; therefore, the focus lies on the development of the NPV.
Tables A1-A3 reveal that the tool increases the number of heat pumps to fully cover the cooling demand with the heat pump operation. Due to the decrease in the COP caused by a higher temperature spread, more heat pumps are needed. Additionally, the NPV decreases with the temperature spread (see Figure 8) as expected because the starting investment increases and because the financial advantage of heat pump operation decreases with their COP. If the flow temperature of the heating circuit is equal to 90 • C and the flow temperature of the cooling circuit is equal to 5 • C, the purchase of a heat pump is no longer economical. The temperature variation leads to the following conclusions: • A rising temperature spread between the heat source and the heat sink leads to lower efficiency.

•
As long as the purchase of a heat pump is economical, the cooling demand will be covered fully by heat pumps.

•
With a flow temperature of the cooling circuit of 5 • C and a flow temperature of the heating circuit of 90 • C, the purchase of a heat pump is no longer economical.

Costs
The variation of specific costs does not influence preselection or COP; therefore, the preselected heat pumps are the same as for the standard run (Table 4). Figure 9 displays the reduction of specific costs for heating and cooling by 2 ct·kWh −1 , and it can be observed that the reduction of specific heating costs results in a much gentler slope of the NPV function than the reduction of specific cooling costs. This slope difference can be justified by Equations (3) and (6). If a heat pump is running, it can provide more heating energy than cooling energy; therefore, less heat must be provided by the conventional energy converter. Additionally, it can be noted that the increase in specific costs for electricity has the lowest influence on the NPV because of the COP (see Equations (3) and (6)).
Even if the specific costs for heating and cooling are reduced to 2 ct·kWh −1 , it remains economical to purchase a heat pump. The high demand for the industrial use case allows for refinancing the heat pump to reach the break-even point after the payback period with an NPV of approximately 150,000 €. Only if either of the specific costs is reduced to 1 ct·kWh −1 , the tool will not decide to purchase a heat pump.

Storage
To further analyze the influence of storage integration, a model without the flexibility option is tested. For this run, the input parameters for the MILP model remain unchanged; therefore, the preselection and average of the COP remain the same.
The tool decides to buy another small heat pump (BWC 351 A07) on top of the heat pump configuration of the standard run. This decision can be justified by a lack of flexibility to cover the acyclic demand for heating and cooling, which results in a slightly lower NPV of 2.577 Mill. €. Therefore, the storage model has a reason to exist in the MILP model.

Preselection Algorithm
The altering of the preselection will test the algorithm and its influence on the optimization. To test the algorithm, the preselection allows all 15 heat pumps (ms = 15), and the tool is allowed to purchase each heat pump three times (am = 3). This high variety of heat pump models (standard run: ms = 5) reveals whether any heat pumps are purchased that have not passed the preselection in the standard run. This faulty selection can occur primarily because the optimizer classifies the nominal heat flow rate as a more important criterion than the COP. However, if all heat pumps pass the nominal heat flow rate criterion (Equation (16)) then the preselection algorithm selects-for the standard run-the five models with the highest COP. These five models may have a much lower nominal heat flow rate than other models, but now the optimizer can only choose between the five models.
The tool decides to purchase three large-scale heat pumps of the same model (BWC 201 A17), which has not passed preselection in the standard run. The optimizer's decision can be justified by the large nominal heat flow rate of 172 kW. This shows that the preselection negatively affects the outcome of the optimizer, as it reduces the variety of selection. However, without the preselection, the standard run with 15 min time steps computes over one week, while the preselection reduces the computational time to 14 h on a machine with an Intel(R) Core(TM) i7-7700K central processing unit of 4.20 GHz and random-access memory of 16 GB.

Analysis with the Simulation Model
The comparison of the simulation model and the optimization model checks the assumption that the heat pump implementation does not change the temperatures in the network, and therefore, the COP and the maximum electrical power of the heat pumps can be calculated prior to the optimization. Validation via the simulation model is performed using an optimization run with 15 min time steps to improve accuracy. The standard input parameters are used. The preselection is reduced to three heat pumps that can be purchased five times to reduce computational time. A large-scale heat pump (BW 351 A18) has been purchased five times, and seven small heat pumps (five times BWC 351 A07, twice BW 351 A07) have been purchased. In addition, cold water storage with a volume of 6100 L has been selected. The NPV of the optimization has a value of 2.5 Mill. € and the simulation calculates a value of 2.3 Mill. €, which results in an error of 7.68% (Equation (17)). Figure 10 provides more information about the actual difference of heat pump operation between the simulation and the optimization than the error does. The heat flow rate of the conventional energy converter is displayed for the optimization (a) and the simulation (b). The difference between these rates (c) is also observed. If the simulated conventional energy converter requires more or less power to reach the flow temperature than the optimized conventional energy converter, it will indicate a failure of the assumption concerning the temperatures in the network. This failure would result in a false optimization since the COP is calculated prior to the MILP run. However, both conventional energy converters behave similarly. The analysis with the aid of the simulation model provides valuable knowledge regarding the application area of the tool. The assumption for the temperatures appears to be especially critical for peak areas greater than 7 MW (heating demand). This development in peak areas leads to the conclusion that an application of the tool is favorable for demands where high base loads of heating and cooling must be covered.

Discussion and Conclusions
This paper presents a method to calculate the optimal integration of heat pumps into industrial thermohydraulic networks by considering design decisions and operation strategies. The method consists of a heat pump database, a preselection algorithm, a mathematical model, and a simulation model. The mathematical model, as a MILP representation, can model heat pump integration combining design and optimal control with consideration of partial load behavior and simultaneous provision of heating and cooling. Additionally, the integration of storages for heating and cooling is displayed.
The parameter analysis has considered, for example, varying energy demands, temperatures, and costs, showing that the mathematical model behaves correctly within its framework and that the results of the analysis are logically valid. Moreover, the results of the calculations show that the integration of heat pumps in combination with energy storage is highly energy-efficient which positively affects the opex, as shown in the high NPVs. However, the chosen industrial example is seemingly ideal for heat pump utilization based on the developed application tool, as cooling demand can be covered by heat pumps alone. This good fit explains the extremely high profits achieved in the test runs. To tackle the relatively high calculation times of the mathematical model, a preselection algorithm has been implemented. On the one hand, this may lead to a less-than-optimal configuration of heat pumps and storages; on the other hand, the reduced calculation time makes the tool applicable. A first parameter study indicates that the preselection algorithm decides properly which technologies should be included in the optimization run.
The integrated simulation model primarily verifies assumptions about temperature development and, thus, allows for new modeling of heat pumps by calculating the COP in the baseload range beforehand. This assumption is correct in most cases, especially in baseload scenarios in which heat pumps can be used efficiently. Nevertheless, the simulation model shows a relatively high error in peak load scenarios, in the use case in ranges higher than 7 MW. The overall error between the mathematical and the simulation model is 7.7% within the use case. Nevertheless, the tool offers optimum control of heat pumps, conventional energy converters, and storages, giving it a decisive advantage over conventional designs.
In conclusion, the parameter analysis shows three major important outcomes. Firstly, the tool reacts sensibly to the variation of cooling demand because it limits heat pump operation. Therefore, a clear dependence of the NPV on the lower demand curve is shown. Secondly, the effect of the temperature spread between the heating and cooling network also has a major impact on the NPV because a high temperature spread results in a lower COP. Lastly, the specific costs obviously affect the outcome of the objective function. However, the specific cost for electricity has a much lower impact on the NPV than do costs for heating and cooling (see Figure 9). This differential impact occurs because the generated heating and cooling energy is larger than the necessary electrical input for the heat pump if the COP is over 1 (see Equations (3) and (6)). This clearly emphasizes the importance of heat pumps in the industry and especially the parallel provision of heating and cooling by heat pump operation. Additionally, the model provides users with a heat pump library to select from, which can be customized for their purposes instead of assuming a static heat pump integration [12][13][14][15]. Another asset of the model is the storage integration because the significant difference in the demand curves cannot efficiently be covered by heat pump operation, as shown in Section 3.2.5.
Overall, the presented method can provide the optimum design of heat pumps and storages, based on the control strategy for 15 min time steps over one year depending on historical data from the thermohydraulic network. The comparison of the NPV from the MILP model (C tot,opti ) and the simulation model (C tot,sim ) reveals an accuracy of the optimization model of more than 90% (see Equation (17)). As the model does not consider all costs of a planning and implementation process (planning costs, costs for pipes and construction, etc.), in future works, these costs should be analyzed and integrated into the tool. The method shows that the planning process should involve a detailed simulation model to verify the thermohydraulic design of the optimization output. In addition to the design, the simulation can react to the optimized operation to further improve the control of generators.
Lastly, a more detailed storage model in the simulation would positively impact the decision-making certainty of a planner. A graphical user interface would increase the usability of the planning tool.