Surrogate modeling and optimization for the unequal diameter radial diffuser of stratified thermal energy storage tanks

Stratified thermal energy storage (TES) tanks are widely used in thermal power plants to enhance the electric power peak load shifting capability and integrate high renewable energy shares. In this study, a data‐driven surrogate modeling and optimization study of the unequal diameter radial diffuser previously proposed by the present authors is conducted. First, based on the orthogonal experimental design, numerical experiments are performed to generate the performance database. Then, the database is used to establish the data‐driven surrogate model via the support vector machine. Subsequently, the single‐objective optimization and multiobjective optimization of an unequal diameter radial diffuser are conducted using the genetic algorithm. For the single‐objective optimization, the optimal thermocline thickness is 0.829 m when the diameter ratio of the long baffle and the tank is 0.426, the diameter ratio of the short baffle and the long baffle is 0.823, and the distance between the two baffles is 228.51 mm. For multiobjective optimization, the obtained Pareto optimal solutions are obtained. Under the premise of maintaining excellent thermal stratification, the selected Point C can reduce the steel cost by 88.1%. The research results are helpful for designing efficient and economical unequal diameter radial diffusers for TES tanks.

the "3060" goal. Due to location, weather, and season variations, renewable energy has the characteristics of discontinuity and instability. 1 Renewable energy generation greatly impacts the power grid, increasing the imbalance of the supply and demand of electricity. 2 To reduce the abandonment of renewable energy generation, thermal energy storage (TES) technologies are widely used. Among the TES technologies, the stratified TES tank is an extensively employed technology to balance the supply and demand of electricity. Thus, thermal power plants usually install stratified TES tanks to enhance their electric power peak load shifting capability and integrate high renewable energy shares.
Stratified TES tanks have an application history of over three decades. In the 1970s and 1980s, many TES technologies were at the exploratory trial stage, but stratified TES tanks came out on top due to their simplicity and low cost. The principle of stratified TES tanks is thermal stratification caused by the density difference between hot water and cold water. Stratified TES tanks usually employ a diffuser design and have a large volume, which is different from domestic hot water tanks. Under the action of the diffuser, the water exhibits a thermal stratification phenomenon (i.e., colder water in the lower part and warmer water in the upper part). The working principle for a stratified TES tank, including the charging and discharging process, is illustrated in Figure 1. The diffusers mainly consist of radial diffusers, octagonal diffusers, and H-type diffusers. 3 Due to their good thermal stratification, economy, easy installation, and simple structure, radial diffusers are more prevalent in practical engineering. Usually, the two baffles for the radial diffuser have an equal diameter. Recently, the present authors proposed a novel unequal diameter radial diffuser, 4 as shown in Figure 2. The research indicates that the new diffuser design has excellent thermal stratification and can greatly reduce the costs.
Due to its superior performance, the proposed unequal diameter radial diffuser is very promising. As the core part of the stratified TES tank, the diffuser significantly influences thermal stratification performance and cost. Therefore, it is important to enhance the thermal stratification and reduce the cost by optimizing the structural parameters of the diffuser using an intelligent optimization algorithm. The key idea of the diffuser's optimal design is to explore the optimal matching relationship between the diffuser performance and diffuser design under the specified operating conditions. Diffuser performance assessment mainly uses two indicators (i.e., the thermal stratification performance and the diffuser cost). The thermal stratification performance is usually evaluated using the thermocline thickness. If only the thermocline thickness is used, the problem is a single-objective optimization problem. If both the thermocline thickness and diffuser cost are used, the problem is a multiobjective optimization problem. At present, intelligent optimization algorithms have been extensively used for optimizing industrial equipment in various fields. Unfortunately, to the authors' best knowledge, there is no research on the optimization of radial diffusers in the open literature. Among the different optimization algorithms, the genetic algorithm 5,6 and the nondominated sorting genetic algorithm-II (NSGA-II) 7 are more prevalent for singleobjective optimization and multiobjective optimization, respectively.
To address the improvement of the proposed unequal diameter radial diffuser, single-objective and F I G U R E 1 Schematic of the working principle for a stratified thermal energy storage tank: (A) Charging process and (B) discharging process multiobjective optimizations using the generic algorithm and NSGA-II algorithm, respectively, must be conducted.
The optimization process needs to continually update the fitness functions (i.e., thermocline thickness and diffuser cost in this case). The computation of the diffuser cost is very straightforward, and the challenge lies in the computation of the thermocline thickness. The methods for determining the thermocline thickness mainly consist of experimental measurements, numerical simulations, and data-driven surrogate models. There are two commonly used experimental measurement methods. One is inserting temperature sensors (e.g., thermocouples) at different heights of the tank.  The other is installing a temperature measurement cable vertically in the tank wall. 15 By analyzing the temperature data collected through a data acquisition system, the thermocline thickness can be obtained. Experimental measurement methods are difficult and expensive and mainly work after the construction of stratified TES. It is impossible to obtain the thermocline thickness using experimental measurements in the design stage.
With the rapid increase in computer performance and the improvement of numerical techniques, computational fluid dynamics (CFD) has developed into a powerful tool for studying thermal stratification in stratified TES tanks. Without the need for experimental measurements, the CFD method can achieve a more realistic thermal stratification characterization by using high temporal and spatial resolutions. The models for CFD methods can be classified into one-dimensional (1D) models, 2,16-20 two-dimensional (2D) models, [21][22][23] and three-dimensional (3D) models. [24][25][26][27][28][29][30][31][32] For the 1D models, energy balance over each control volume is conducted, thus leading to a series of coupled partial differential equations in time and vertical height. 20 1D models have far higher computational efficiency than 2D models and 3D models; thus, these models mainly serve for model-based control design or real-time simulation. 12 However, 1D models have no ability to adequately characterize the flow structure due to their oversimplification. 10 The simulation results of 2D models and 3D models are more realistic and accurate. Therefore, they are more useful for making key decisions in the early design stage using offline simulations. At present, there are a variety of CFD studies on stratified TES tanks.
However, CFD simulations for large-scale stratified TES tanks are still time-consuming. At present, datadriven surrogate models, which can considerably reduce the computation time from days to seconds, have been extensively employed to model complex nonlinear systems. Among these surrogate models, artificial neural networks (ANNs) 33 and support vector machines (SVMs) 34 are more prevalent. ANNs have strong learning and induction abilities for parallel distributed problems and nonlinear problems and can obtain good results through fast analysis. The most widely used ANN is the BP neural network. It has outstanding advantages in addressing nonlinear problems, self-learning and adaptive adjustment, the generalization of classification methods, and increasing the fault tolerance of neural network training. However, BP also has some unavoidable issues, such as local minimization and slow convergence speed, depending on the research samples. The SVM is an intelligent algorithm proposed by Cortes and Vapnik in 1995. Compared with the ANN, the SVM can obtain excellent prediction performance using fewer sample points. The CFD model is adopted to generate the sample points in the present study. Since there are few sample points, the SVM is suitable for establishing a data-driven surrogate model.
Based on the above analysis, to optimize the unequal diameter radial diffuser proposed by the present authors, data-driven surrogate modeling and optimization are conducted in this study. First, the CFD model is adopted to establish a surrogate model via the SVM approach. Then, the genetic algorithm is employed to optimize the F I G U R E 2 Schematic of radial diffusers for stratified thermal energy storage tanks: (A) Traditional equal diameter radial diffuser and (B) unequal diameter radial diffuser proposed by the present authors thermal stratification performance of the diffuser, and the fitness function is calculated using the surrogate model. Finally, multiobjective optimization is conducted to optimize both the thermal stratification performance and diffuser cost. The research results are helpful for the design and optimization of radial diffusers for stratified TES tanks.
The unsteady 2D axisymmetric model is used to simulate the fluid flow and heat transfer process inside a tank. The density difference caused by the temperature gradient is treated with the Boussinesq approximation. The governing equations consist of the continuity equation, momentum equation, energy equation, and standard k-ε model. Table 1 summarizes the governing equations for this model. The CFD simulation is performed using Ansys Fluent. The governing equations are discretized via the finite volume method based on the collocated grids. The convective term is discretized using the second-order upwind scheme, and the diffusive term is discretized using the second-order central differencing scheme. The pressure term is discretized using the PRESTO! scheme due to the large body force. The pressure-velocity coupling is solved using the semi-implicit method for pressure-linked equations (SIMPLE). The energy equation's convergence criterion is 10 −6 , and the convergence criterion for the other equations is 10 −3 . Figure 3 shows the diagram of the computational domain and grid system for the studied tank. Structured quadrilateral grids are generated using the ICEM CFD software. The tank's operational pressure is 0.1 MPa. Both the charging flow rate and discharging flow rate are 1088.6 m 3 h.
The hot water temperature and cold water temperature are 371 and 331 K, respectively. The charging time and the discharging time are 8 h. More detailed information on the CFD model can be found in our previous publication. 4

| Data-driven surrogate model
Single-objective and multiobjective optimizations need to update the fitness function. The computational time of a case using the CFD simulation may require several days, which is unacceptable for updating the fitness function. Thus, a data-driven surrogate model is established using the SVM. The idea of the SVM is to transform a nonlinear problem of the original space into a linear problem of the T A B L E 1 Governing equations for the computational fluid dynamics simulation

Equations
Mathematical description

Continuity equation
high-dimensional feature space. The advantage of SVM lies in the high accuracy with few sample points. Sufficient data are necessary to establish the inputoutput relationship in data-driven surrogate modeling. Orthogonal experimental design, which can study the influence of design variables on objective functions via limited CFD simulations (or experimental measures), is widely used in designing the sample space. Each structural parameter (x 1 , x 2 , and x 3 ) has five levels, covering a wide range, as shown in Table 2. For the optimization problem of water distributor with three variables and five values in this study, the optimal design points in the whole design space can be obtained only by conducting numerical simulation experiments on 25 design points. To test the accuracy of the above fast prediction method of water distributor performance, five additional design samples were added as test sets, specific data are shown in Table 3.
The open-source MATLAB library LIBSVM is used to implement the surrogate model. LIBSVM provides several kernel functions, such as the linear, polynomial, radial basis (RBF), sigmoid, and precomputed kernel functions. Based on a comparison of the adaptability, the RBF kernel function is employed in the present work. Developing the surrogate model needs to optimize two hyperparameters (i.e., cost parameter [c] and gamma [g]), which are tuned via fivefold cross-validation. Furthermore, the input data and output data are normalized before and after training. Detailed information on the SVM can be found in Ferrari. 35 The relationship between the structural parameters of the radial diffuser and the diffuser performance is defined with the developed surrogate model. Therefore, by inputting the three structural parameters of the unequal diameter radial diffuser, the thermocline thickness and diffuser cost can be obtained via the surrogate model. Their relationship can be expressed as follows: (1)

| Single-objective and multiobjective optimization
When the thermocline thickness is considered the objective, this problem is a typical single-objective optimization problem. By adjusting the structural parameters of the unequal diameter radial diffuser, the thinnest thermocline thickness is obtained. The mathematical model for single-objective optimization, including the optimization objective, optimization variables, and constraint condition, is as follows: Single-objective optimization is performed using the genetic algorithm, which is based on the mechanism of biological evolution. In the genetic algorithm, the information of the search space is automatically accumulated to obtain the optimum solutions.
The relationship between the thermocline thickness and diffuser cost is conflicting. When both the thermocline thickness and diffuser cost are considered optimization objectives, the optimization is a typical multiobjective optimization problem, which can be modeled as follows: Multiobjective optimization is performed using the NSGA-II algorithm, which introduces fast nondominated sorting and crowded sorting. Figure 4 illustrates the principle of the NSGA-II algorithm. The details on the NSGA-II algorithm can be found in Deb et al. 7 3 | RESULTS AND DISCUSSION

| Performance analysis of the surrogate model
An orthogonal experimental design is adopted to generate the training set. The training set includes 25 sample points, and the thermocline thickness is calculated using the CFD model. Moreover, the test set, including five sample points, is employed to validate the surrogate model's generalization ability. Since the surrogate model is established based on the different structural parameters of the unequal diameter radial diffuser, it can predict the thermocline thickness by inputting the diffuser parameter. The accuracy of the surrogate model is evaluated using the squared correlation coefficient (R 2 ), mean squared error (MSE), average relative error (δ mean ), and maximum relative error (δ max ).
where m is the number of sample points, y i is the numerical result from the CFD simulation, y′ is the predicted result from the surrogate model, and ȳ i is the mean thermocline thickness for the CFD simulation. Figure 5 compares the thermocline thickness from the CFD simulation and surrogate model. As illustrated in the figure, except for sample point 6, the prediction results of the surrogate model agree well with the numerical results. The thermocline thickness of sample point 6 is relatively thick; thus, it will not affect the optimization results. The R 2 and MSE on the training set are 0.96112 and 0.0070263, respectively. The R 2 and MSE on the test set are 0.8202 and 0.036878, respectively. First, the R 2 and MSE on the test set are worse than those on the training set, which is reasonable in developing the surrogate model. Second, the fewer sample points for the test set also contribute to the deterioration of these two indexes. The average and maximum relative errors can further assess the accuracy of the surrogate model. On the training set, the average and maximum relative errors are 0.66% and 6.56%, respectively. On the test set, the average and maximum relative errors are 0.27% and 0.63%, respectively. Therefore, the established surrogate model is accurate and can obtain the thermocline thickness of stratified TES tanks with different structural parameters for an unequal diameter radial diffuser. Furthermore, the surrogate model's computational cost (several milliseconds) is much lower than that of the CFD simulation (several days). In the subsequent singleobjective and multiobjective optimizations, the fitness function of an individual for the stratified TES tanks is computed using the surrogate model.

| Single-objective optimization of unequal diameter radial diffuser
Single-objective optimization is performed using the genetic algorithm, and the fitness function is computed via the developed surrogate model. The objective function is the thermocline thickness, and the optimization variables are the long baffle and the tank's diameter ratio (x 1 ), the short baffle and the long baffle's diameter ratio (x 2 ), and the distance between the two baffles (x 3 ). In the optimization process, the initial population size is 200. The crossover probability is 0.85, and the mutation probability is 0.1. The results of single-objective optimization are presented in Table 4. The optimized thermocline thickness is 0.829 m; and the corresponding variables are 0.426, 0.823, and 228.51 mm, respectively.
To verify the single-objective optimization results, the stratified TES tank with optimized design parameters is simulated using the CFD method. Figure 6 presents the thermocline thickness evaluated using the CFD simulation for the single-objective optimization. The deviation between the surrogate model and CFD simulation is | 2503 0.01 m, and the relative error is only 1.19%. The results show that the genetic algorithm based on the surrogate model is accurate and can guide the optimal design of the unequal diameter radial diffuser. Figure 7 compares the evolution of the temperature contour for the unequal diameter radial diffuser before and after single-objective optimization. As illustrated in the figure, the temperature contours for the radial diffuser before and after optimization, including the commissioning, discharging, and charging processes, are very similar. Furthermore, the thermocline thickness for the unequal diameter radial diffuser is slightly thinner after optimization.
To quantitatively compare the thermocline's evolution before and after optimization, the thermocline thickness during the operational processes is plotted using the user defined function (UDF). Figure 8 illustrates the evolution of the thermocline thickness before and after single-objective optimization. The data show that the thermocline thickness after optimization is 0.839 m, which is 0.037 m less than that before optimization. In other words, the optimal design of the unequal diameter radial diffuser can reduce the thermocline thickness by 4.2%. Moreover, the heat storage space of the stratified TES tank can be increased by 11.6 m 3 . Therefore, single-objective optimization is helpful for improving thermal stratification performance.

| Multiobjective optimization of unequal diameter radial diffuser
Multiobjective optimization is conducted using the NSGA-II algorithm, and the fitness function is also computed via a developed surrogate model. The objective functions are the thermocline thickness and diffuser cost. These two objective functions are conflicting (reducing the thermocline thickness means increasing the diffuser cost and vice versa). In other words, the thermocline thickness and diffuser cost exhibit a trade-off. The diffuser cost mainly depends on the volume. Since the top and bottom diffusers have the same baffle thicknesses, the cross-sectional area is used to assess the diffuser cost for simplicity. The optimization variables are the same as in single-objective optimization. In the optimization process, the initial population size is F I G U R E 6 Computational fluid dynamics (CFD) validation of the single-objective optimization results F I G U R E 7 Comparison of the operating processes of a stratified thermal energy storage tank before and after single-objective optimization: (A) Commissioning process, (B) discharging process, and (C) charging process 200. The crossover probability is 0.85, and the mutation probability is 0.1. Figure 9 displays the Pareto optimal solutions obtained using the NSGA-II, which contains 60 individuals. As illustrated in the figure, any two points do not have the same objective functions, indicating that the optimal solutions cannot dominate each other. For instance, if the thermocline thickness is reduced, the diffuser cost will inevitably increase. The figure marks five unique optimal points (i.e., points A, B, C, D, and E). The thermocline thickness of point A is the thinnest, but its diffuser cost is the highest. Conversely, point E has the thickest thermocline but the most economical cost. When we move point A to point B, the thermocline is slightly thicker, and the diffuser cost is considerably reduced. When we move point D to point E, the diffuser cost has almost no reduction, and the thermocline is significantly thicker. For point C, the thermocline thickness and diffuser cost are adequately balanced.
The relationship between the structural parameters and performance for the Pareto optimal solutions is useful for designing an unequal diameter radial diffuser. Figure 8 illustrates the variations in thermocline thickness with the different structural parameters of the unequal diameter radial diffuser. When x 1 is approximately 0.15, the thermocline thickness has a relatively wide variation range. Increasing x 1 can further reduce the thermocline thickness, but the effect is unsubstantial. x 2 has a larger influence on the thermocline thickness. As x 2 increases, the thermocline thickness is considerably reduced. When x 2 is less than 0.3, the effect is more obvious. When x 2 is larger than 0.3, reducing the diameter ratio will cause a smaller thermocline variation. An increase in x 3 will lead to a reduction in the thermocline thickness in most cases.
The variations in the optimization variables when moving from point A to point E are also plotted in Figure 10. We can find some interesting relationships from the figure, which can provide useful guidance for choosing the diffuser. For instance, when moving point B to point E, x 1 is almost constant, x 3 varies little, and the variation in the thermocline thickness is mainly dependent on x 2 . When moving point A to point B, x 2 is almost constant, x 3 varies little, and the variation range of x 1 is relatively larger. Figure 11 illustrates the variations in the diffuser area with the different structural parameters of the radial diffuser. In general, the diffuser area increases as variables x 1 , x 2 , and x 3 increase. When moving point A to point B, x 2 and x 3 are almost constant, and x 3 varies linearly. When moving point B to point D, x 1 and x 3 are F I G U R E 8 Variation of the thermocline thickness with time for stratified thermal energy storage tanks before and after singleobjective optimization F I G U R E 9 Pareto optimal solutions for the stratified thermal energy storage tanks with an unequal diameter radial diffuser F I G U R E 10 Relationship between the optimization variables and thermocline thickness for Pareto optimal solutions almost constant, and x 2 varies linearly. When moving point D to point E, x 1 is almost constant, and x 2 and x 3 vary linearly.
Further analysis is conducted for point C, and the optimization variables and optimization objectives are presented in Table 5. The stratified TES tank with the structural parameters corresponding to point C is simulated using the CFD method. Figure 12 presents the thermocline thickness evaluated using the CFD simulation for multiobjective optimization. The deviation between the surrogate model and CFD simulation is 0.008 m, and the relative error is only 0.9%. Thus, the optimization method, combined with the surrogate model and NSGA-II, can provide reliable optimization results for the radial diffuser of stratified TES tanks. Figure 13 compares the evolution of the temperature contour for the radial diffuser before and after multiobjective optimization. As illustrated in the figure, the temperature contours for the radial diffuser before and after optimization, including those during the commissioning process, discharging process, and charging process, are very similar. The thermocline thickness does not have an obvious difference before and after multiobjective optimization.
To quantitatively analyze the evolution of the thermocline before and after multiobjective optimization, the thermocline thickness during the operational processes is plotted using the UDF. Figure 14 compares the evolution of the thermocline thickness for the unequal diameter radial diffuser before and after multiobjective optimization. As shown in the figure, the thermocline thickness after optimization is very close to that of the benchmark case. The deviation of the thermocline thickness for the diffuser before and after optimization is only 0.002 m. However, the diffuser areas before and after optimization are 196.35 and 23.32 m 2 , respectively. In other words, the steel cost is reduced by 88.1%. Therefore, multiobjective optimization is helpful for reducing the diffuser cost while maintaining the thermal stratification performance.

| CONCLUSION
In this study, a data-driven surrogate model based on the SVM is established for a stratified TES tank with the unequal diameter radial diffuser previously proposed by the present authors. Then, the single-objective and multiobjective optimizations for the unequal diameter radial diffuser are conducted using the genetic algorithm, and the fitness function is evaluated via the surrogate model. The main conclusions are as follows.
(1) The squared correlation coefficient and mean squared error of the surrogate model are 0.96112 and 0.0070263, respectively. Moreover, the average and maximum relative errors are 0.66% and 6.56%, respectively. The surrogate model's accuracy is reliable, and its computational costs are much less those that of numerical simulation. (2) For the single-objective optimization, the optimized thermocline thickness is 0.829 m; and the corresponding variables are 0.426, 0.823, and 228.51 mm, respectively. By using the optimal unequal diameter radial diffuser, the thermal stratification performance can be improved by 4.2%, and the heat storage space of the stratified TES tank can be increased by 11.6 m 3 .