AERES: Thermodynamic and Economic Optimization Software for Hybrid Solar–Waste Heat Systems

Heliothermic technologies are affected by their low density, intermittence and low economic competitiveness. Hybrid solar–waste heat power systems can increase plant conversion efficiency and power generation while reducing intermittence. This study focused on the development of software (AERES) to economically optimize hybrid solar–waste heat power systems in terms of technology selection, sizing, operating conditions and power block characteristics. The technologies considered for algorithm selection were (i) heat exchangers that recover a wide range of waste heat sources, (ii) non-concentrating and concentrating solar collectors (a flat plate, an evacuated tube, a linear Fresnel and a parabolic trough), (iii) organic Rankine cycle power blocks and (iv) storage tanks (direct thermal storage systems). The last two technologies were represented by surrogate models so that a large number of decision variables could be optimized simultaneously. The optimization considered local climate conditions hourly to provide irradiation, local temperature and wind speed. The case studies indicated that optimized ORCs for waste heat recovery are economically competitive, reaching internal rates of return (IRRs) of 44%, 39% and 34% for a waste heat of 50 MWt at 350 ◦C, 300 ◦C and 250 ◦C, respectively. On the other hand, heliothermic technologies were not selected by the algorithm and provided non-competitive results for the analyzed cases.


Introduction
The progressive increase in global energy consumption and the need to reduce the greenhouse effect are driving researchers to seek more efficient processes and renewable energy sources. In this context, solar energy can be considered inexhaustible as it emits 1.7 × 10 8 GW of power to the earth's surface [1], which represents more than 5500 times the expected global capacity in 2050 [2].
The main challenges for the implementation of solar plants are their low energy density [3], the low capacity factor of generating units [4] and the geographic dependence on areas with high levels of solar radiation [5]. Solar thermal power plants (STPPs) can use energy storage systems to increase their capacity factors while decreasing the effects of solar intermittence [6]. Furthermore, solar concentrators can increase the global energy efficiency of power systems by increasing the operating temperature and reducing thermal losses in the receivers [7,8].
plate, evacuated tube, linear Fresnel or parabolic trough), WHR or optimized power blocks (ORCs). The system configuration, operational parameters and sizing were simultaneously optimized for the local climate and the temperature, power and type of the waste heat.

Hybrid Solar-Waste Heat Power System
Four solar thermal technologies were considered as possible components for the solar field, together with heat exchangers for up two waste heat sources: (i) a flat plate collector, (ii) a evacuated tube collector, (iii) a linear Fresnel reflector and (iv) a parabolic trough collector. Figure 1 shows the hybrid solar field (HSF) that was available for the algorithm selection of technologies and configuration. Four of the six numerated boxes represent solar collectors and two represent heat exchangers to make use of the waste heat sources. The solar collector and heat exchanger positions were not fixed and depended on their operational temperature. The solar hybrid power plant could use (or not) a direct thermal storage system (TES) to store the excess of energy from the HSF and supply the power block (PB) when the energy provided by the HSF was less than required.
presented in [20], indicating that hybridization results are very dependent on the chosen configuration, location and assumptions.
This work presents the methodology that was used to create a software to perform economic optimization for hybrid systems, which could be composed of solar fields (flat plate, evacuated tube, linear Fresnel or parabolic trough), WHR or optimized power blocks (ORCs). The system configuration, operational parameters and sizing were simultaneously optimized for the local climate and the temperature, power and type of the waste heat.

Hybrid Solar-Waste Heat Power System
Four solar thermal technologies were considered as possible components for the solar field, together with heat exchangers for up two waste heat sources: (i) a flat plate collector, (ii) a evacuated tube collector, (iii) a linear Fresnel reflector and (iv) a parabolic trough collector. Figure 1 shows the hybrid solar field (HSF) that was available for the algorithm selection of technologies and configuration. Four of the six numerated boxes represent solar collectors and two represent heat exchangers to make use of the waste heat sources. The solar collector and heat exchanger positions were not fixed and depended on their operational temperature. The solar hybrid power plant could use (or not) a direct thermal storage system (TES) to store the excess of energy from the HSF and supply the power block (PB) when the energy provided by the HSF was less than required.

Methodology
Both heat exchangers and solar collectors were modeled using Thermal Engineering Systems in the Python (TESPy) toolkit [22]. The TES energy loss and ORC power block were modeled using a surrogate model approach, which was developed in Scikit-learn [23]. The thermophysical properties were obtained using the CoolProp [24] python wrapper. The meteorological data from specific regions were obtained from the NREL weather database [25]. The energy and mass balances were evaluated in steady-state every hour. The potential and kinetic energy variations were neglected and no heat loss from the pipes or equipment was considered, except for the storage tanks and solar collectors.

Methodology
Both heat exchangers and solar collectors were modeled using Thermal Engineering Systems in the Python (TESPy) toolkit [22]. The TES energy loss and ORC power block were modeled using a surrogate model approach, which was developed in Scikit-learn [23]. The thermophysical properties were obtained using the CoolProp [24] python wrapper. The meteorological data from specific regions were obtained from the NREL weather database [25]. The energy and mass balances were evaluated in steady-state every hour. The potential and kinetic energy variations were neglected and no heat loss from the pipes or equipment was considered, except for the storage tanks and solar collectors.

Optimization
The economic objective function could be selected from the internal rate of return (IRR), net present value (NPV) and levelized cost of energy (LCOE). The optimization was carried out considering binary variables to represent technology selection and continuous variables that were related to the power block mass flow rate ( . m PB ), heat source inlet (T H ) and outlet (T C ) temperatures and the TES storage capacity, as well as the continuous design variables that were related to the aperture and heat transfer areas. Table 1 shows the decision variables and their upper and lower bounds, in which S represents the binary structure decision variables, A represents the aperture or heat transfer areas and i is a counter representing any chosen waste heat source or collector type. Simultaneous to the hybrid field optimization, the power block and storage tanks were optimized using surrogate models, which are described in their respective sections.
A genetic algorithm from jMetalPy [26] was used for optimization. A modification to the population of the first generation using a Latin hypercube stratification (LHS) for the continuous variables and all possible combinations of the binary variables was used in order to improve the quality of the first population.

Algorithm Logic
The hybrid solar field could be operated according to the following modes, depending on the local time-dependent irradiance: (i) loading the hot tank; (ii) loading the hot tank and running the ORC; or (iii) running the ORC with the help of the hot tank. The operation mode was selected by the optimization algorithm for every hour of the specified period of time.
The hourly HSF mass flow rate ( . m HSF ) was calculated using Equation (1) as a function of the sum of the heat provided by the heat exchangers ( . Q W HR ) and solar collectors ( . Q col ) and the thermal fluid enthalpies, i.e., it was a function of the decision variables that were under selection.
The power block mass flow rate (

m TES
(2) Figure 2 shows the algorithm flowchart, which includes the optimization block and the thermodynamic block. Firstly, the algorithm read the input data, which was composed of economic and historic climate information as well as the avaliable collectors and waste heat characterisctics that were selected by the user. Then, it defined the typical meteorological period (the user could choose between 1, 4, 12 or 52 typical days or a whole typical year; however, for the sake of simplicity, Figure 2 is for one typical day) to compress the historical climate input and the number of possible combinations of collectors and waste heat sources as well as the LHS stratification of the decision variables. The optimization block defined the decision variables, i.e., the configuration and sizing of the HSF, the tank capacity and the power block operational point ( . m PB , T H and T C ), which were assigned to every individual that was provided by the genetic algorithm. The thermodinamic block, in turn, defined the best power block for the selected operational point based on its surrogate model and then calculated the hourly mass flow and the TES heat loss to define the power block status at each hour of the selected typical period.
compress the historical climate input and the number of possible combinations of collectors and waste heat sources as well as the LHS stratification of the decision variables. The optimization block defined the decision variables, i.e., the configuration and sizing of the HSF, the tank capacity and the power block operational point ( , and ), which were assigned to every individual that was provided by the genetic algorithm. The thermodinamic block, in turn, defined the best power block for the selected operational point based on its surrogate model and then calculated the hourly mass flow and the TES heat loss to define the power block status at each hour of the selected typical period.
The loop inside the thermodynamic block indicated that the ORC only worked under design conditions. When there was not enough energy for that, the hybrid field mass flow rate was decreased to keep its temperature constant, the ORC was turned off and the energy was stored in the hot tank. This stored energy was then used when there was enough to run the ORC under design conditions for at least one hour.
Then, the daily result was annualized in order to calculate the objective function result based on the lifespan of the plant.  The loop inside the thermodynamic block indicated that the ORC only worked under design conditions. When there was not enough energy for that, the hybrid field mass flow rate was decreased to keep its temperature constant, the ORC was turned off and the energy was stored in the hot tank. This stored energy was then used when there was enough to run the ORC under design conditions for at least one hour.
Then, the daily result was annualized in order to calculate the objective function result based on the lifespan of the plant.

Hybrid Solar-Waste Heat Field
Tubular heat exchangers were selected to make use of the waste heat. Their sizing was based on the overall heat transfer coefficient (U) and the logarithmic mean temperature dif-  (3). The overall heat transfer coefficient was calculated based on the cold and hot side convective coefficients and the fouling resistances, as presented in [27].
The solar collector energy balance was related to the amount of solar energy that was converted into thermal energy and delivered to the heat transfer fluid (HTF), see Equation (4). In this equation, . m HTF is the HTF mass flow rate, η C,t is the collector thermal efficiency, I s is the solar irradiance and A is the collector aperture area. For non-concentrating solar collectors, I s is the global horizontal irradiance (GHI) and for concentrating collectors, I s is the direct normal irradiance (DNI).
The collector thermal efficiency (η C,t ) was calculated based on (i) the optical losses due to the incidence angle, which is represented by the incidence angle modifier (IAM), (ii) the collector optical efficiency (η C, opt ) and (iii) the thermal energy loss, which is generally represented by the overall heat loss coefficient (U L ), see Equation (5) [7,8].
The I AM and U L values depend on the specific collector and can take local wind speed into account. The detailed formulation of these coefficients can be found in [28,29] for non-concentrating solar collectors, in [30,31] for linear Fresnel collectors and in [32,33] for parabolic trough collectors.

Power Block
The power block (PB) was based on organic Rankine cycle (ORC) technology. It was optimized in terms of structure, operational condition, heat transfer fluid and working fluid as a function of the heat transfer rate and heat source inlet and outlet temperatures, i.e., the decision variables of the power block, its working fluid and configuration change during optimization for each hybrid field that was tested. Four structures were considered: (i) a subcritical ORC, (ii) a subcritical recuperative ORC, (iii) a supercritical ORC and (iv) a supercritical recuperative ORC. Moreover, the six most commonly used commercial working fluids (D4, R134a, R245fa, ammonia, R1233zd and SES36) [34,35] and two heat transfer fluids (Dowtherm A and Syltherm 800) [36,37] were evaluated. Since the plate heat exchanger dimensions and fluid velocity were also decision variables, the pressure loss was restricted to avoid unrealistic configurations. Furthermore, due to the nature of dry fluids, condensation could occur inside the turbine during the expansion, even when its state at the end of expansion was superheated steam. Thus, the steam quality was assured by dividing the expansion into 10 constant pressure drop steps and checking the quality of the steam for each of them.
Each combination of structure, working fluid and heat transfer fluid was optimized in terms of its operational conditions by applying the jMetalPy [26] genetic algorithm (GA) using the decision variables and constraints that are shown in Table 2 [38]. Since the power block model was too complex to run for each hybrid field under selection (at each loop), a surrogate approach was used, i.e., a large number of inputs and outputs were generated and those points were used to create a simpler function that mimicked the thermodynamic and economic model. More details on this procedure can be found in [38].  Figure 3 shows the heat loss mechanisms that were considered, i.e., radiation (r), convection (c) and conduction (k), in each part of the tank. The ambient temperature was available hourly and the foundation temperature was maintained below 90 • C using a cooling system to avoid cracking, as indicated in [39]. The tank insulation thickness followed the Petrobras technical standard N-550 [40], which relates the insulation thickness to the tank diameter and its operational temperature. The NBR 7821 standard [41] was used to define the thickness of the tank's steel sheets.  Figure 3 shows the heat loss mechanisms that were considered, i.e., radiation (r) convection (c) and conduction (k), in each part of the tank. The ambient temperature wa available hourly and the foundation temperature was maintained below 90 °C using a cooling system to avoid cracking, as indicated in [39]. The tank insulation thicknes followed the Petrobras technical standard N-550 [40], which relates the insulation thickness to the tank diameter and its operational temperature. The NBR 7821 standard [41] was used to define the thickness of the tank's steel sheets. The model developed was compared to the work in [43,44] and differences o between 1.0% and 27.0% were found for different operational conditions. The difference were probably caused by the indirect methodology that was used to define the storag Figure 3. The TES thermal loss mechanisms (adopted from [39,42]).

Storage Tank Heat Loss
The model developed was compared to the work in [43,44] and differences of between 1.0% and 27.0% were found for different operational conditions. The differences were probably caused by the indirect methodology that was used to define the storage tank heat loss in those works, such as the time required for the temperature of the fluid inside tank to decrease by 1 • C and the power required to keep the fluid temperature constant. Since the tank models had to run for each hybrid field under selection, such as for the power block, a surrogate approach was used to replace the thermodynamic and economic model with a simpler model that could provide similar results.

Local Irradiance Data
A typical meteorological year (TMY) was used to compress the information of large historical periods. The months that comprised the TMY were selected as the best representatives for the period of time that was available for assessment on the NREL website, which is usually many years, considering the smallest Finkesltein-Schafer (FS) statistical distances for each weather characteristic, as indicated in [45]. The same concept was applied to define a typical meteorological day (TMD), so that the entire period could be condensed within a typical day. It is important to stress that not only are average values important, but the sequences of values over the hours are also essential to quantify the amount of stored energy and the TES loss and to estimate the collector thermal efficiency and absorbed energy. Even though the hourly irradiation of a typical day (24 h) was used to choose the best configuration using the developed program, the final result of the chosen configuration was calculated using all of the hours in a typical year (8760 h), which is emphasized later in the results section.

Economic Model
The plant costs were separated into (i) capital expenditure (CAPEX) and (ii) operational expenditure (OPEX). The CAPEX represented the purchase equipment cost (PEC), transportation, taxes and installation. The cost of all components was given according to Equation (6), as proposed by Bejan et al. [46]. The pressure factor ( f p ) and material factor ( f m ) were assumed to be 1 and X was the equipment capacity. The Chemical Engineering Plant Cost Index (CEPCI) was used to correct previous quotations by taking inflation or deflation into account. The reference cost (C re f ), reference capacity (X re f ) and exponent α were obtained using Thermoflex ® [47] and System Advisor Model (SAM) [48] data. The total PEC was obtained as a sum of each equipment cost.
The CAPEX was calculated as the sum of direct costs (DCs) and indirect costs (ICs). Both direct (Equation (7)) and indirect costs (Equation (8)) were obtained from the PEC by adding the multipliers and were expressed as a percentage of the total PEC [46]. Table 3 describes each of those coefficients. DC = (1 + p HTF + p PEI + p PP + p IC + p EEM + p CSAW + p SF )PEC (7) IC = (p ES + 1)p CON DC (8)

Case Study
A typical diesel engine exhaust gas (74.7% N 2 , 13.9% O 2 , 8.5% CO 2 and 2.9% H 2 O on mass basis) was considered as the waste heat and Candeias (−12.73 N, −38.48 L) was considered as the location. In order to cover different applications, the waste heat power ranged from 100 kWt to 50 MWt and its temperature ranged from 150 • C to 350 • C. These values were selected to meet the power block model limits [38]. Table 4 summarizes the main characteristics of the specific collectors that were considered (user input) for algorithm selection during optimization, aiming at the maximum internal rate of return (IRR) (objective function selected by the user). The values of the cost multipliers are shown in Table 3. An extra internalization factor ( f int ) of 1.2 and 2 for the power block and collectors, respectively, was considered to cover taxes and additional structural construction costs (wind barriers, trackers, etc.). A lifespan (Y) of 20 years, C OPEX, f ix and C OPEX,var of 66 USD/kWe and 4 USD/MWhe [48], respectively, and a long-term inflation rate (π) of 3% per year [50] were considered.
Additionally, three real waste heat sources near the selected area were analyzed: two reciprocating engine exhaust gases and a surplus of saturated steam.

Results and Discussion
The convergence of the genetic algorithm was tested experimentally and 100 generations were used. Nevertheless, a tool for the graphic visualization of the convergence, i.e., generation number vs. objective function, allowed the user to infer whether there was convergence or not. Figure 4 shows the IRR for the range of temperature and thermal power that was considered. The use of a waste heat source, i.e., a heat exchanger to recover the waste heat with no collectors or TES selected, was the best option for all cases, except for 0.1 MWt of waste heat. For the case of 0.1 MWt of waste heat at 150 • C, a PTC field and TES were selected (no use of waste heat) due to the low quality of the waste heat, i.e., low exergy caused by low temperature. The algorithm was free to select any of the four collectors (or combinations of the collectors) during optimization. However, probably due to its good ratio of price to performance, the parabolic trough collector was the only option chosen. For 0.1 MWt of waste heat at higher temperatures, the waste heat and TES were selected without a collector. The TES was used to supply the extra thermal power that was required by the power block, for which the minimum power input after all heat exchanges was 0.1 MWt (see Table 1). Furthermore, the 0.1 MWt line was the only one with technologies that were dependent on climate condition, i.e., solar collectors and/or TES (TES heat loss depends on local temperature while solar collectors depend on local temperature and wind velocity). 359 °C/2.2 MWt) and the second exhaust gas (purple rhombus at 300 °C/4.8 MWt) provided 0.13 USD/kWhe, 0.11 USD/kWhe and 0.11 USD/kWhe of LCOE, respectively, at their optimum IRR. Only the waste heat and ORC were selected by the algorithm for these cases. It should be noted that the saturated steam provided a high IRR, despite its low temperature. This happened due to its higher overall heat transfer coefficient ( ), which was 3.6 times higher than the value of the other two cases.  Figure 5 shows the response of the IRR to the electricity price for the three real cases and for the lowest point at Figure 4. The vertical lines over the bars in Figure 5 represent the amplitude of the IRR when the energy price increased or decreased by 50%. The results show that, despite the variations in energy price, PTC as a single thermal source was the best choice when the waste heat was at 150 °C and 100 kWt. The IRR remained noncompetitive though, reaching a maximum of 0% when the energy price increased. For solar collectors, the variations in energy price caused a variation in the IRR of around ±4.7%. The waste heat sources, in turn, presented greater variations in the IRR when the energy price decreased (−16.6% on average) compared to the variations when the energy price increased (+11.3% on average). In these cases, when the energy price increased, the optimization converged to a power plant that was similar to that selected under the original price conditions, but when the energy cost decreased, the plant operational and design variables were very different from those that were selected under the original price conditions. This increased the power block-specific costs and decreased the plant's installed capacity.  The isolated points in Figure 4 represent the real waste heat sources near the selected area. The saturated steam (red square at 170 • C/1.1 MWt), exhaust gas (orange triangle at 359 • C/2.2 MWt) and the second exhaust gas (purple rhombus at 300 • C/4.8 MWt) provided 0.13 USD/kWhe, 0.11 USD/kWhe and 0.11 USD/kWhe of LCOE, respectively, at their optimum IRR. Only the waste heat and ORC were selected by the algorithm for these cases. It should be noted that the saturated steam provided a high IRR, despite its low temperature. This happened due to its higher overall heat transfer coefficient (U), which was 3.6 times higher than the U value of the other two cases. Figure 5 shows the response of the IRR to the electricity price for the three real cases and for the lowest point at Figure 4. The vertical lines over the bars in Figure 5 represent the amplitude of the IRR when the energy price increased or decreased by 50%. The results show that, despite the variations in energy price, PTC as a single thermal source was the best choice when the waste heat was at 150 • C and 100 kWt. The IRR remained non-competitive though, reaching a maximum of 0% when the energy price increased. For solar collectors, the variations in energy price caused a variation in the IRR of around ±4.7%. The waste heat sources, in turn, presented greater variations in the IRR when the energy price decreased (−16.6% on average) compared to the variations when the energy price increased (+11.3% on average). In these cases, when the energy price increased, the optimization converged to a power plant that was similar to that selected under the original price conditions, but when the energy cost decreased, the plant operational and design variables were very different from those that were selected under the original price conditions. This increased the power block-specific costs and decreased the plant's installed capacity.
Comparisons of different typical periods of time are plotted in Figure 6: (a) a comparison of the results of a typical day and the results of using a typical day for technology selection and a typical year for final result, i.e., once the technology was selected using one typical day (24 h) and it was then evaluated under the climate conditions provided for an entire typical year (8760 h); (b) a comparison of the results of a period composed of four typical days (one for each season) and the results of using four typical days for technology selection and a typical year for the final result; and (c) a comparison of the results of technology selection using a typical day and the application of a typical year to obtain the final results and the results of using four typical days for technology selection Energies 2022, 15, 4284 11 of 14 and the application of a typical year to obtain the final results. The maximum difference in the IRR in this last case was 0.3%. This meant that the selection of technology was less sensitive to the typical period used than the final result, but a significant reduction in computational time was obtained due to the reduction from four typical days (5.8 h) to a single typical day (1.2 h) for the technology selection (results obtained using an i5-10400F with 4.3 GHz, 6 cores and 12 threads). Comparisons of different typical periods of time are plotted in Figure 6: (a) a comparison of the results of a typical day and the results of using a typical day for technology selection and a typical year for final result, i.e., once the technology was selected using one typical day (24 h) and it was then evaluated under the climate conditions provided for an entire typical year (8760 h); (b) a comparison of the results of a period composed of four typical days (one for each season) and the results of using four typical days for technology selection and a typical year for the final result; and (c) a comparison of the results of technology selection using a typical day and the application of a typical year to obtain the final results and the results of using four typical days for technology selection and the application of a typical year to obtain the final results. The maximum difference in the IRR in this last case was 0.3%. This meant that the selection of technology was less sensitive to the typical period used than the final result, but a significant reduction in computational time was obtained due to the reduction from four typical days (5.8 h) to a single typical day (1.2 h) for the technology selection (results obtained using an i5-10400F with 4.3 GHz, 6 cores and 12 threads).   Comparisons of different typical periods of time are plotted in Figure 6: (a) a comparison of the results of a typical day and the results of using a typical day for technology selection and a typical year for final result, i.e., once the technology was selected using one typical day (24 h) and it was then evaluated under the climate conditions provided for an entire typical year (8760 h); (b) a comparison of the results of a period composed of four typical days (one for each season) and the results of using four typical days for technology selection and a typical year for the final result; and (c) a comparison of the results of technology selection using a typical day and the application of a typical year to obtain the final results and the results of using four typical days for technology selection and the application of a typical year to obtain the final results. The maximum difference in the IRR in this last case was 0.3%. This meant that the selection of technology was less sensitive to the typical period used than the final result, but a significant reduction in computational time was obtained due to the reduction from four typical days (5.8 h) to a single typical day (1.2 h) for the technology selection (results obtained using an i5-10400F with 4.3 GHz, 6 cores and 12 threads).   All in all, heliothermic technologies were still not economically competitive in the studied cases and presented negative IRRs. On the other hand, the optimized ORCs seemed to be very competitive, depending on the waste heat characteristics.

Conclusions
A comprehensive software for the economic optimization of hybrid solar-waste heat 0.0% 0.5%