Design Optimization of Counter-Flow Double-Pipe Heat Exchanger Using Hybrid Optimization Algorithm

: Double-pipe counter-ﬂow heat exchangers are considered more suitable for heat recovery in the heat transfer industry. Numerous studies have been conducted to develop static tools for optimizing operating parameters of heat exchangers. Using this study, an improved heat exchanger system will be developed. This is frequently used to solve optimization problems and ﬁnd optimal solutions. The Taguchi method determines the critical factor affecting a speciﬁc performance parameter of the heat exchanger by identifying the signiﬁcant level of the factor affecting that parameter. Gray relational analysis was adopted to determine the gray relational grade to represent the multi-factor optimization model, and the heat exchanger gray relation coefﬁcient target values that were predicted have been achieved using ANN with a back propagation model with the Levenberg–Marquardt drive algorithm. The genetic algorithm improved the accuracy of the gray relational grade by assigning gray relational coefﬁcient values as input to the developed effective parameter. This study also demonstrated signiﬁcant differences between experimental and estimated values. According to the results, selecting the parameters yielded optimal heat exchanger performance. Using a genetic algorithm to solve a double-pipe heat exchanger with counterﬂow can produce the most efﬁcient heat exchanger.


Introduction
Global urbanization and a growing population have increased the demand for energy. Oil, gas, coal, etc., are fossil fuels, and their use has a negative impact on the environment. As a result, energy-saving strategies and renewable energy sources have been employed in order to address this problem [1]. As a result, an effective thermal system is being developed to reduce energy consumption. It is widely recognized that heat exchangers are essential components in a variety of industries, including electric, petroleum, electronics, chemical, and aerospace [2,3].
The design of heat exchangers has evolved significantly over time as heavy and light machinery are used in different industries. The Tubular Exchanger Manufacturers Association (TEMA) has developed and adopted standards that specify the design, construction, and dimensions of these systems [4][5][6][7]. Researchers have explored various techniques to enhance the performance of heat exchangers, including the use of coiled wires, spiral/twisted bands, winglets, ribs/fins/baffles, and riblets [8].
In the chemical, food, and automotive industries, heat transfer methods have evolved through industrial transformation [9]. However, optimizing the performance parameters of heat exchangers has become increasingly challenging [10]. To determine the effects of the parameters, researchers have used statistical analysis methods such as analysis of variance (ANOVA) and the Taguchi method, considering all possible combinations of variables. Limited studies in the literature have analyzed thermal system performance parameters. Heat exchanger performance has been analyzed using Taguchi and ANOVA methods in several of these studies [11].
A gray relational analysis (GRA) measures multiple objective parameters simultaneously and determines optimal parameters for different applications. According to Naqiuddin et al. heat transfer and flow characteristics were optimized by changing various design parameters using computational fluid dynamics and Taguchi GRA [12].
Previous studies have demonstrated the efficacy of data-driven models based on experimental data, such as artificial neural networks (ANNs) or fuzzy systems, in accurately predicting complex functions. Researchers have focused on developing ANN models to accurately predict the thermal conductivity of nanofluids, and the results have shown good agreement with experimental data [13]. Further, Sridharan [14] emphasized the value of artificial intelligence in predicting and controlling heat exchanger performance. Generalized regression neural networks provided the most accurate values (98.50%) compared to realtime experimental values.
Most studies that consider structural parameters use genetic algorithms for optimizing heat exchanger processes. It has been reported that genetic algorithms, neural networks, and particle swarm optimization can solve mathematical programming models, although they have limitations. This allows GA to function reliably and accurately without human intervention [15][16][17]. There are successful applications of genetic algorithms in optimizing finned heat exchangers [18]. For instance, Sanaye and Hajabdollahi [19] estimated two objective functions for plate-fin heat exchangers with staggered stripe ribs, namely maximum efficiency and minimum total annual cost, using GA. Xie et al. [20] demonstrated that a genetic algorithm can minimize the slab-fin type compact heat exchanger in terms of both volume and annual cost.
Despite advancements in optimizing structural parameters of heat exchangers, a comprehensive study assessing the contributions of performance parameters, such as effectiveness, thermal resistance, and overall heat transfer coefficient, to heat exchanger performance is lacking. This research aims to address this gap by combining gray relational analysis (GRA) with artificial neural networks (ANNs) and genetic algorithms (GAs) to determine the relative significance of these parameters in a specific order. This integrated approach can improve problem-solving capabilities and provide valuable insights for enhancing heat exchanger efficiency in various industries.

Gray Relational Analysis Optimization (GRA)
GRA is capable of solving problems with a variety of objectives. The concept behind it is gray relational analysis, which considers both objective values and data uncertainty or imprecision in order to compare multiple options or solutions.
The GRA optimization process involves the following steps: 1.
Define the decision factor variables and the optimized goal functions.

2.
Gather information for the decision factor factors and function goals.

3.
Use gray relational analysis to evaluate and compare the different options or solutions based on their objective values and the uncertainty or imprecision of the data.

4.
The optimal solution is determined by analyzing gray relational data.
Grey Relation Analysis has the unique advantage of being able to handle both qualitative and quantitative data while concurrently balancing multiple conflicting objectives. Additionally, it can effectively handle uncertainty or imprecision in the data, which is often present in real-world problems.
Multi-objective optimization problems with uncertain or imprecise data have been solved using GRA optimization in a variety of fields, including engineering, finance, and management science [21][22][23][24].
The gray relational analysis (GRA) process involves several steps, including the use of formulas to evaluate the relative importance of variables and optimize a system or process. The specific steps and formulas used in GRA can vary depending on the problem and research design, but a general step-by-step process with formulas is as follows: Step 1: Normalization-The raw data and pre-processing are normalized using the following formulas. The responses are normalized linearly between zero and one. Generating gray relations is the process that is involved in this step.
These equations were used to normalize the original sequence: Step 2: Analysis of Deviations-The normalized responses are analyzed for deviations using the following formula to determine the deviational sequence.
where X * 0 (k) is the reference section and (X * i (k)) is the comparative sequence.
Step 3: Gray Relational Coefficient-A gray relational coefficient is used to compare an idealized result with a real normalized result. This formula can be used to calculate GRC.A threshold of ζ = 0.5 is used in this study.
Step 4: Gray Relational Grade-The gray relational grade (GRG) of an output is calculated by averaging its GRC over all outputs corresponding to every run.
This step-by-step process and associated formulas allow evaluating the relative importance of variables and optimizing a system or process using gray relational analysis.

Artificial Neural Network
Machine learning simulates the functions of the human brain with an artificial neural network (ANN). ANNs comprise interconnected neurons that process and transmit information, linked by synapses acting as connection weights. The input layer receives data, transmitting it to hidden layers for processing and ultimately to the output layer for final results. ANNs vary in layer and neuron number depending on task complexity, with feed-forward, recurrent, and convolutional networks being common types. Feedforward networks only have unidirectional information flow, while recurrent networks have feedback connections allowing cyclic flow, and convolutional networks are designed for image processing. ANNs require training by adjusting interneuron connection strengths to improve performance on a given task. Back-propagation, commonly used for training, adjusts weights using gradient descent. ANNs are extensively applied in imaging, speech and natural language processing, decision-making, and other fields. As data and computational resources become more available, ANNs' accuracy and power in solving complex problems continue to increase. ANNs represent a powerful machine learning tool that will keep improving with technology and data availability [25][26][27][28][29].
The following steps can be followed to create and train an ANN: 1.
Data preparation: In order to train the model, the dataset must first be prepared. This dataset should include input and output pairs, where the input is in the form of a matrix, with each row representing a sample, and the output is in the form of a matrix or vector with the same number of rows as the input matrix.

2.
Network creation: The next step is to create the network structure using commands such as "feed forward net" or "pattern net" for feed forward or pattern recognition networks, respectively. By specifying layers and neurons, the user can create a network of any size.

3.
Network configuration: Once the network is created, it can be configured by setting the transfer function for each layer, as well as the training algorithm and performance function. This step is crucial for achieving optimal performance on the specific task.

4.
Training: The network is trained using the "train" command along with the input and output data. Weights are adjusted across neurons in a model to improve performance.

5.
Testing: After training, the network can be tested using the "sim" command with new input data. A comparison between the network's output and expected output can be used to determine the model's performance. 6.
Deployment: The network can be used to predict or classify new data once it has been trained and tested.

Genetic Algorithm
A genetic algorithm mimics natural selection in biology by utilizing an optimization method. They are widely used for finding near-optimal solutions to complex problems in a computationally efficient manner. Genetic Algorithms were based on the principles of population generation, evaluation of solution quality using fitness functions, genetic operators, such as crossovers and mutations, for producing new candidate solutions, and selection criteria for selecting the best solutions for reproduction. [30][31][32][33][34].
A brief summary of the step-by-step process for implementing a genetic algorithm is provided below.

1.
Problem definition: Define the problem that needs to be solved and determine the objective function that will be used to evaluate the quality of solutions.

2.
Encoding: Represent the problem using a suitable encoding method, such as binary or real-valued encoding.

3.
Initialization: Create an initial population of solutions using a random or heuristic method.

4.
Evaluation: By calculating the objective function for each solution in a population, assess its quality.

5.
Selection: A select group of the most effective solutions to serve as parents to the next generation should be selected. 6.
Crossover: Combine the selected parents to create new solutions using crossover operators, such as one-point or two-point crossover.

7.
Mutation: Introduce small random changes to the new solutions using mutation operators, such as bit-flip or polynomial mutation. 8.
Replacement: Replace the worst solutions in the population with the new solutions. 9.
Repeat steps 4-8 for a specified number of generations or until a satisfactory solution is found. Genetic regulatory algorithms (GRAs) are a computational technique inspired by biological systems that use artificial neural networks (ANNs) and genetic algorithms (GAs) to optimize solutions. GRA combines the power of ANNs, which are computational models inspired by the human brain, with GAs, which mimic the processes of natural selection and evolution. By applying genetic operators, such as mutation and crossover, to the parameters of ANNs, GRA can evolve and improve the performance of neural networks in solving complex problems. This integration of GRA, ANNs, and GAs enables the development of robust and adaptive computational systems capable of learning and adapting to changing environments.

Proposed Research Framework
Hybrid optimization is a technique that combines multiple optimization methods to improve the performance of the optimization process.
Gray relation analysis (GRA) analyzes the relationship between multiple variables and identifies the degree of relevance between them, which is commonly used in decisionmaking, optimization, and control systems. The integration of GRA with neural networks and genetic algorithms (GA) has been shown to enhance the ability to solve complex problems and improve the accuracy of predictions.
In order to combine GRA with neural networks and GA, the following steps can be taken:

1.
To select the most significant variables for the problem at hand, GRA determines the degree of relevance between several variables.

2.
The next step is to train a neural network with inputs from the selected variables and outputs from the desired ones.

3.
Genetic algorithms are then applied to optimize the neural network's structure and parameters to improve its performance.
The integration of GRA, neural networks, and GA can be applied to solve complex issues such as pattern recognition, control systems, and multi-objective optimization. By using this hybrid approach, important variables can be identified through GRA, the neural network can model the relationship between variables, and GA can optimize the neural network's performance.
However, it's important to acknowledge that combining these methods is not a straightforward process and requires a good understanding of each method and how they can be integrated to solve a specific problem. A good dataset and evaluation metric are also crucial for achieving good results. Figure 1 illustrates the hybrid optimization method model. Processes 2023, 11, x FOR PEER REVIEW 6 of 16

Equipment Details
Double-pipe heat exchangers refer to heat exchangers that consist of two pipes, with one pipe located within the other and the annular space between them serving as the heat transfer area. In this experiment, a hot fluid is passed through an inner tube while a cold fluid is circulated through an outer pipe in the opposite direction. Control valves regulate fluid flow by monitoring the temperatures at the inlet and outlet. The system is kept constant in terms of heat and liquid introduction. Varying mass flow rates are examined through a series of experiments. The specifications of the experimental setup are provided in Table 1 and illustrated in

Design and Results of an Experiment Equipment Details
Double-pipe heat exchangers refer to heat exchangers that consist of two pipes, with one pipe located within the other and the annular space between them serving as the heat transfer area. In this experiment, a hot fluid is passed through an inner tube while a cold fluid is circulated through an outer pipe in the opposite direction.

Parameter
Value Geometrical Aspect

Parameter
Value Geometrical Aspect Nature of heat exchange Indirect contact

Overall Heat Transfer Coefficient
The heat transfer rate can be calculated using the equation: where Qc is the heat transfer rate of the cold fluid and Qh is the heat transfer rate of the hot fluid.
To calculate Qc and Qh, the following equations can be used: Qh = Mh * Cph * (T 2 − T 1 ) where Mc is the mass flow rate of the cold fluid, Mh is the mass flow rate of the hot fluid, Cp,c is the specific heat capacity of the cold fluid, Cp,h is the specific heat capacity of the hot fluid, t 1 and t 2 are the inlet and outlet temperatures of the cold fluid, and T 1 and T 2 are the inlet and outlet temperatures of the hot fluid. The overall heat transfer coefficient (U) can be calculated using the following equation: where h 1 and h 2 are the heat transfer coefficients for the hot and cold fluids on the inner and outer pipe surfaces, respectively, r 1 and r 2 are the thermal resistances of the inner and outer pipes, respectively, and k is the thermal conductivity of the pipe material.

Effectiveness
The following equation can be used to calculate the effectiveness of a counterflow double-pipe heat exchanger: where M c and M h are the mass flow rates of cold and hot water, T 1 and t 1 are the inlet temperatures of hot and cold water, and T 2 and t 2 are the outlet temperatures of hot and cold water, respectively. The determination of inlet and outlet water temperatures, which are influenced by the mass flow rates of the two streams, is a crucial factor in evaluating the efficiency of

Thermal Resistance
The thermal resistance equations for a counterflow double-pipe heat exchanger can be expressed as: where R is the thermal resistance, M c and M h are the mass flow rates of the cold and hot fluids, respectively, C pc and C ph are the specific heats of the cold and hot fluids, respectively, T 1 and T 2 are the inlet and outlet temperatures of the hot fluid, and t 1 and t 2 are the inlet and outlet temperatures of the cold fluid.
If the effectiveness of the heat exchanger is known, the thermal resistance can be calculated as: where ε is the effectiveness, U is the overall heat transfer coefficient, and A is the heat transfer surface area.

Design of Experiments
An experimental design was created using the Taguchi method in this study. In this approach, multiple variables are considered to optimize the experimental design by considering their effects on output responses. The total degrees of freedom were used to determine the proper orthogonal array. The Taguchi method is an effective tool for identifying key factors affecting output response and minimizing variability. An estimation of the initial response can be calculated by identifying the optimal combination of factors.
According to the experimental arrangement, 60 • C hot fluid entering the center core barrel passes through valve V1 at a temperature of 60 • C. This is done from the hot fluid reservoir. The hot fluid exits the center tube at a temperature of T2, as measured by TS2. Through valve V3, a 32 • C cold liquid flows into the outer tube against the hot liquid (with valves V2 and V4 closed). TS4 measures t2 as the exit temperature through valve V5.
This study conducted 16 sets of experiments to assess the effects of varying mass flow rates, from 1 kg/min ± 1.42% to 4 kg/min ± 1.42%. The results from these experiments are presented in Table 2, and summarized in Table 3.

GRA-Based Optimization
An analysis of multiple performance characteristics of a heat exchanger system was conducted using the GRA method. The resulting response was normalized between 0 and 1 (Equation (1)), resulting in a single-objective optimization problem. The normalization equation used was selected for its ability to maximize T 2 , t 2 , U, €, and TR, which are the desired parameters. By utilizing the GRA method, a single-objective optimization problem was obtained from the original multi-objective problem, which had multiple performance characteristics [36].
After normalization, the GRC (ξ (0, i) (k)) was determined using Equation (4). An idealizing value and actual values are represented by GRC coefficient. The calculation involves the identification coefficient (ζ), which is limited to the range of 0 < ζ < 1. Although the selection of any value within this range does not affect the order of parameter importance in the GRA method, a commonly used value is 0.5 [37][38][39].
Equation (5) was used to compute the gray relational grade (γi) using different weight factors. After calculating the GRC, the resulting γi value was utilized to measure the degree of correlation between the reference and comparative sequences. An ideal gray relational grade of 1 indicates that the two sequences are identical. The highest gray relational grade represents the best result, which is achieved when the maximum T 2 , t 2 , U, €, and TR values are attained.
The assignment of weight factors to each response is a critical step in the application of the gray relational analysis (GRA) technique, as the importance of different responses may vary in real-world engineering problems. While some researchers may choose to assign equal weight to multiple responses, this approach may not always yield reliable results. Hence, it is imperative to adopt a suitable procedure to determine the weight factors, taking into account the effects of parameter variations on T 2 , t 2 , U, €, and TR.
To obtain the overall multi-response output, known as the genetic response grade (GRG), the GRCs for each response were averaged, as shown in Table 4.

ANN-GA-Based Optimization
Heat exchanger parameters were represented by four neurons in the input layer, and responses were represented by five neurons in the output layer. The optimal number of neurons and hidden layers in the hidden layer were determined using trial and error in the MATLAB software. For training, we obtained an MSE of 0.03, and for testing, we obtained an MSE of 0.015. In this BPNN network, the egress and hidden layers were activated by purelin and tansig, respectively. The training function was Levenberg-Marquardt (trainlm), and the stopping criteria were 10,000, 0.001, 0.00001, and 1000, respectively, for the maximum epoch number, the performance goal, and the minimum performance gradient. Figure 4 shows the network architecture configuration. Table 5 presents the prediction data for the predicted gray relational coefficient (PGRC) of output parameters and predicted gray relation grade (PGRG).
A training set and a test set were used to develop the ANN model. According to Figure 5, there was an average error of less than 9% for each response when comparing experimental and ANN-predicted values. The two values are significantly in agreement. Figure 6 shows the correlation coefficients between all data, training, and testing datasets. Inferring response levels with the ANN model proved to be highly accurate. This study optimized the ANN model parameters with the genetic algorithm (GA) to improve the accuracy of the heat exchanger GRA ranking prediction. To minimize the difference between predicted and actual GRA ranking values, we used the GA to find the optimal neural network weights and biases. It took several iterations for the optimized ANN model to achieve a correlation coefficient of 0.98417, which indicates a high level of accuracy in the GRA ranking prediction. Combining ANN and GA techniques can improve the accuracy of heat exchanger performance predictions. Table 6 shows the results.

ANN-GA-Based Optimization
Heat exchanger parameters were represented by four neurons in the input layer, an responses were represented by five neurons in the output layer. The optimal number neurons and hidden layers in the hidden layer were determined using trial and error the MATLAB software. For training, we obtained an MSE of 0.03, and for testing, we o tained an MSE of 0.015. In this BPNN network, the egress and hidden layers were ac vated by purelin and tansig, respectively. The training function was Levenberg-Ma quardt (trainlm), and the stopping criteria were 10,000, 0.001, 0.00001, and 1000, respe tively, for the maximum epoch number, the performance goal, and the minimum perfo mance gradient. Figure 4 shows the network architecture configuration. Table 5 presen the prediction data for the predicted gray relational coefficient (PGRC) of output param eters and predicted gray relation grade (PGRG).   A training set and a test set were used to develop the ANN model. According to Figure 5, there was an average error of less than 9% for each response when comparing experimental and ANN-predicted values. The two values are significantly in agreement. Figure 6 shows the correlation coefficients between all data, training, and testing datasets. Inferring response levels with the ANN model proved to be highly accurate.    This study optimized the ANN model parameters with the genetic algorithm (GA) to improve the accuracy of the heat exchanger GRA ranking prediction. To minimize the difference between predicted and actual GRA ranking values, we used the GA to find the optimal neural network weights and biases. It took several iterations for the optimized ANN model to achieve a correlation coefficient of 0.98417, which indicates a high level of accuracy in the GRA ranking prediction. Combining ANN and GA techniques can improve the accuracy of heat exchanger performance predictions. Table 6 shows the results.

Conclusions
This study assessed the performance of double-tube heat exchangers using GRA, ANN, and GA techniques. In evaluating the heat transfer coefficient, effectiveness, thermal resistance and thermal efficiency were taken into account. Temperature resistance measures the resistance to heat flow through a heat exchanger, while efficiency measures the efficiency of heat transfer between hot and cold fluids. An efficient heat transfer is implied by a low thermal resistance. Based on the thermal properties of the materials and the design of the heat exchanger, the overall heat transfer coefficient measures the efficiency of heat transfer.
To accurately predict the response value of double-tube heat exchangers, an ANN model was developed. Heat exchanger performance was most significantly influenced by the overall heat transfer coefficient, according to GRA analysis. An average error of less than 9% was observed between experimental and expected values using the ANN model. The ANN model predictions were highly accurate in relation to the experimental values, indicating high correlation coefficients.
An ANN model parameter was optimized using a GA to improve the GRA ranking prediction accuracy. Using the GA, the neural network's weights and biases were optimized for minimizing the difference between predicted and actual GRA rankings. With a correlation coefficient of 0.98417, the optimized ANN model achieved a high correlation. As a result, the GRA ranking of the heat exchanger was predicted very accurately. By combining GRA, ANN, and GA techniques, heat exchanger performance prediction accuracy can be significantly improved, and these results can possibly be applied to other heat exchanger designs as well.