Single phase nanofluid thermal conductivity and viscosity prediction using neural networks and its application in a heated pipe of a circular cross section

This study investigates the single‐phase simulation of nanofluid with a neural network incorporated into the thermophysical properties in governing equations for the single‐phase treatment. The thermophysical properties affected are the viscosity, and the thermal conductivity, as both properties have been the area of contention in the study of nanofluid. The neural network is trained from experimental data gleaned from the available literature. The single phase and neural network are set up and solved using the finite element method in available commercial code. Grid independence was carried out, and the results were validated with experimental data that the neural networks were not trained with. It was observed that the lowest accuracy from the several simulations was 0.679% average percentage error. The results obtained agreed that nanofluids' thermal conductivity and viscosity can be accurately modeled for most single‐material nanofluids and hence reducing the error in the simulations of nanofluids using the single‐phase model which assumes the nanofluids are homogeneous and their properties are enhanced and effective.


| Nanofluid modeling challenge
Numerical studies of nanofluids pose a serious challenge to nanotechnology researchers, this challenge has hampered progress in nanofluids applications by limiting the number of trusted and verified simulation results. However, numerical studies are very important in the product development process. [1][2][3][4][5][6][7][8][9][10][11][12][13] The inconsistent numerical findings by different researchers are also a challenge since they use different formulations to represent nanofluids and hence obtain differing results. To overcome these challenges, costly experiments must be carried out and repeated many times. This greatly increases the product development time.
Vajjha et al. 14 carried out a single-phase treatment of nanofluids. Their numerical study was carried out on a three-dimensional flow geometry. The three-dimensional geometry was flat tubes of an automobile radiator. They studied the heat transfer and laminar flow of two nanofluids: ethylene glycol-water mixture as base fluid and Al 2 O 3 and CuO nanoparticles. They accessed the advantage of nanofluids over the base fluid. They observed that the heat transfer coefficient and average friction factor increased whenever the volume fraction was increased. However. Their simulations had a maximum and average deviation of 3.1% and 1.1% from the Shah and London correlation in the Nusselt number.
Ahmed et al. 15 numerically investigated Al 2 O 3 -water nanofluid convective heat transfer under laminar flow over tube banks with constant wall temperature conditions. They considered a staggered arrangement of circular-tube banks. They observed that the best results were obtained at a transverse pitch ratio of 2.5 and longitudinal pitch ratio of 1.5, with nanoparticles volume fraction of 5% over a Reynolds number range. Their results had an 18% maximum deviation from previous numerical studies. Moraveji et al. 16 in an article, presented the results of a computational fluid dynamics study of the single-phase convective heat transfer effect on the nanofluid flow in the developing region of a tube with constant heat flux. They used Al 2 O 3 -water nanofluid with particle sizes of 45 and 150 nm and particle volume fractions of 1, 2, 4, and 6 wt.%. They studied a range of Reynolds numbers and obtained a Nusselt number equation in terms of dimensionless numbers. They obtained a maximum error of 10%.
Namburu et al. 17 numerically studied CuO, Al 2 O 3, and SiO 2 in an ethylene glycol and water mixture in a turbulent flow. They used a circular tube with constant heat flux conditions. They developed and validated new correlations for viscosity that depends on volume fraction and temperature from experimental data. However, their study showed a maximum and average deviation of 3.2% and 1.9% from the Blasius theoretical equation.
Özerinç et al., 18 in an article, stated that "To utilize nanofluids in practical applications, accurate prediction of forced convection heat transfer of nanofluids is necessary." They used the nanofluid thermophysical properties to apply the classical correlations of forced convection heat transfer developed for the flow of pure fluids to nanofluids. They compared their results with experimental data and observed that their method underestimates heat transfer enhancement. Furthermore, they studied the thermal dispersion by using single-phase and temperature-dependent thermal conductivity and observed that the single-phase treatment with temperature-dependent thermal conductivity and thermal dispersion was an accurate way of capturing the heat transfer enhancement. However, they obtained a numerical result with an 11% deviation from the experimental data.
From the above review, we can observe high discrepancies in similar simulation studies. Furthermore, nanofluids can technically be applied in situations where an increase in heat transfer is desirable for product development. Some main applications of nanofluid are given in Saidur et al. 19 : Space, defense and ships, nuclear reactors, medical applications, antibacterial activities, grinding, cooling electronics, chillers, domestic refrigerators, engine cooling/vehicle thermal management, detection of knock occurrence in a gas spark ignition engine, coolant in machining, cooling of diesel-electric generator, diesel combustion, boiler flue gas temperature reduction, solar water heating, cooling and heating in buildings, transformers use, heat exchangers, drilling, new sensors for improving exploration, application of nanofluids in thermal absorption system, application in a fuel cell.
In conclusion, accurate simulation for nanofluids is critical in product development, and the simplicity of the simulation improves the process even more. A simulation that is less computationally expensive will ensure that results are generated quickly. Furthermore, no model exists that accurately accounts for a large number of nanofluids with only the properties of the base fluid and the nanoparticle known; the resulting model from this study has been designed and proven to be effective in doing so-making accurate predictions of the thermal conductivity and viscosity of all single material nanofluids. It has also been demonstrated that the simulations are more accurate in predicting temperature profiles of flows in circular crosssectional pipes.
The procedure presented in this study provides a method that eliminates the need for correlations. It is also applicable to most nanofluids containing a single type of nanoparticle as well as a base fluid.

| THERMOPHYSICAL PROPERTIES OF NANOFLUIDS
When solid particles of small size (1-100 nm) are added to a conventional fluid, the property of the new fluid is enhanced. Researchers have suggested several correlations for representing these new properties, but there are still problems with regard to the proper correlations for viscosity and thermal conductivity for many nanofluids with acceptable accuracy. 20 2.1 | Nanofluid density and specific heat

| Nanofluid viscosity and thermal conductivity
For the nanofluid viscosity and thermal conductivity, individual neural network models were developed. Data was gleaned from studies in open literature, as illustrated in Table 1, and grouped according to the nanofluid's constituents (metals and oxides-nanoparticles and base fluids): Al-transformer oil, 21 CuO-transformer oil, 21 CNT-engine oil, 22 Al-engine oil, 22 Mg (OH) 2 -ethylene glycol, 23 Al 2 O 3 -ethylene glycol, 24 ZnO-ethylene glycol, 25 TiO 2 -ethylene glycol, 22 SiC-ethylene glycol, 26 CuO-ethylene glycol, 21 Al-ethylene glycol, 22 Al 2 Cu-ethylene glycol, 27 Ag 2 Al-ethylene glycol, 27 SiC-water, 26 Al 2 O 3 -water, 28 TiO 2 -water, 29 Al-water, 21 CuO-water, 21 Ag 2 Al-water, 27 Ag 2 Cu-water, 27 and SiO 2 -water. 30 The data of viscosity gleaned included information on the following nanofluids, Data was also gleaned from studies in open literature grouped according to the nanofluid's constituents (metals and oxides-nanoparticles and base fluids): TiO 2 -water, 22 CuO-ethylene glycol, 31 30 CuO-water, 33 ZnO-ethylene glycol, 25 and Al 2 O 3 -water. 34 The data for viscosity was 885 rows and each having nine properties. The data for thermal conductivity was 489 rows and each having 10 properties. Table 2 shows the definition, meaning, and units of each variable selected as inputs and outputs in this study.

| Viscosity modeling
The neural network model, as shown in Figure 1, consists of one hidden layer with 10 neurons and the Log-Sigmoid transfer function, and the output layer consisted of the linear transfer function. The network takes eight variables as inputs. They are nanoparticle-specific heat, density, particle size, volume fraction, Temperature of the fluid, density, specific heat capacity, and viscosity of the base fluid. The training algorithm is the Levenberg-Marquardt algorithm. This algorithm utilizes more memory but takes lesser time.

| Thermal conductivity modeling
The neural network model, as shown in Figure 2, consists of one hidden layer with 10 neurons and the Log-Sigmoid transfer function, and the output layer consisted of the linear transfer function. The network takes nine variables as inputs. They are nanoparticle-specific heat, density, thermal conductivity, particle size, volume fraction, Temperature of the fluid, density, ONYIRIUKA | 3519 T A B L E 1 Reference information with respect to the obtained data.

| Governing equations
The following equations represent the single-phase assumption for nanofluids. 15 In this formulation, the thermophysical property of the fluid (the density, viscosity, specific heat capacity, and thermal conductivity) is replaced with those of the nanofluid. The viscosity and thermal conductivity of the nanofluid are obtained directly from the neural network model, given the individual properties of the nanoparticles and the base fluid, along with the volume fraction, particle size, and fluid temperature. However, the specific heat capacity and density of the nanofluids are computed from Equations (1) and (2).

| Continuity
∇. represents the divergence of the velocity vector v⃗ (m/s), and it results in a scalar, and v⃗ represents the velocity of flow through the pipe.

| Momentum
The P (Pa. s) is the pressure of the fluid through the pipe.
F I G U R E 1 Neural network architecture for the nanofluid viscosity.
F I G U R E 2 Neural network architecture for the nanofluid thermal conductivity.

| Energy
T (K) represents the temperature of the nanofluid flow in the pipe, and k (W/mK) nf is the thermal conductivity of the nanofluid.
is the heat transfer coefficient of the fluid in the pipe, q (W/m 2 ) is the constant heat flux applied to the pipe's wall, and T (K) w is the temperature of the pipe's wall.

| Simulation setup
The different components of the simulation are presented here: Table 3, shows the specific numerical values of four water-based nanofluids used in this study namely: Al 2 O 3 , CuO, TiO 2 , and ZrO 2 -water. Table 4 shows the four scenarios and nanofluids settings that were considered in this study, they were obtained from the available literature. [35][36][37][38][39] Table 5, shows the three mesh sizes that were investigated.

| COMSOL solver settings
The constant Newton nonlinear method with a maximum iteration of 1000 and termination by solution was applied along with the parallel direct solver for handling a large system of sparse linear equations on multicore architectures that are using a shared-memory, a pivoting perturbation of 1E−13.  Figure 3 shows the plot of mean squared error with epochs, an epoch represents the number of times all the training vectors are used to update the weights. The mean squared error is the computation of the square of the mean error between the observations and predictions. The best performance was gotten at the 22nd epoch. We can observe the network converge smoothly, implying that the network was able to find an optimal solution and that the network had a possibly ideal configuration. We can also observe that all the curves converge to the same point. It shows that the network performs equally well in both training and validation. A model that is underfitting will have a high training and testing error, while one that overfits will have extremely low training error but high testing error. But in this case, the errors are about the same range and relatively low. Figure 4 shows the error histogram with 20 bins. It is the plot of the error and the corresponding instances in the data for training, validation, and testing. Bins are the number of vertical bars being observed on the graph. The total error ranges from the leftmost (−0.00414) to the rightmost (0.002594). A large part of the data (training, validation, and test data) falls into the 0.000112 error bin, which is within the zero-error range. Figure 5 shows the change of gradient, mu, and validation failure with epochs. At epoch 22, the gradient is 8.5656e−08, which is relatively small, this means the training and testing of the network are good. It can also be observed that the gradient decreases with epoch. The validation check is zero at the 22nd epoch. Figure 6 shows the regression plot for the training, validation, test, and all of them together. The training set had an R 2 of 0.99839, the validation set had an R 2 of 0.99712, and the test set had an R 2 of 0.99465, while when all the datasets are considered as a whole, we have an R 2 of 0.99772. The R 2 value is very close to 1, showing a good fit of the neural network to all the data combinations from training, validation, testing, and all. Figure 7 shows the performance plot of the neural network for nanofluid thermal conductivity. From the plot, the generalization stops improving at epoch 34, and hence the training is stopped. The convergence of the neural network can be observed. The best validation performance was found to be 0.00067627 at the 34th epoch. Figure 8 shows the error histogram plot for the nanofluid thermal conductivity. It can be observed that most of the data set fell within the error of 0.001133, close to the zero error. The error in all datasets falls within −0.09821 (leftmost) and 0.1714 (rightmost). Figure 9 shows the train state for the nanofluid thermal conductivity. It can be observed that the gradient decreased with the epoch. The mu also decreased with the epoch. The validation checks had six consecutive failures from the 34th epoch. Which indicates that the network had stopped generalizing.

| Thermal conductivity
F I G U R E 3 Neural network performance plot for nanofluid viscosity.
ONYIRIUKA | 3525 Figure 10 shows the regression plot of the neural network for nanofluid thermal conductivity. It captures the R 2 for all data combinations: the training set had an R 2 of 0.99675, the validation set had an R 2 of 0.99385, the test set had an R 2 of 0.9972, while the whole data set had an R 2 of 0.99641. It is worthy of note that the R 2 for all data set combinations was close to 1, indicating a good fit of the neural network with the data sets. Figure 11 shows the grid convergence. The plot of pipe wall temperature with the length of the pipe was used. The temperature was shown to increase with pipe length as expected physically when there is a heat flux boundary condition on the walls of the pipe. The grid converges with the experimental results. The experimental data was gotten from the work of Kim et al. 40 with Al 2 O 3 -water nanofluid. Three mesh sizes (fine mesh, finer mesh, and extra fine mesh) were tested, and the test stopped at the mesh that gave the most accurate results. The average percentage deviations of the meshes from the experimental data are fine mesh (0.0224%), finer mesh (0.0165%), and extra fine mesh (~0%). It also shows the grid independence as the mesh deviation from each other is much less than 1%) meaning the results will not change with the mesh sizes studied. It also shows that the nanofluid thermal characteristics were accurately resolved. Figure 12 shows the plot of temperature with the length of pipe for experimental data of Asirvatham et al. 36 The CuO-water nanofluid was used for the test. A good fit of the experimental results and the simulation with neural network properties can be observed. The average percentage error was found to be 0.679%. This implies an accurate resolution of the nanofluid thermal flow. We can also observe the maximum deviation from the experimental work occurs at the tail end of the pipe.  Figure 13 shows the plot of temperature with the length of pipe for experimental data of Murshed et al. 37 The TiO 2 -water nanofluid was used for the test. A good fit of the experimental results and the simulation with neural network properties can be observed. The average percentage error was found to be~0%. This shows that the nanofluid thermal flow was accurately resolved. Figure 14 shows the plot of temperature with the length of pipe for experimental data of Rea et al. 38 The ZrO 2 -water nanofluid was used for the test. A good fit of the experimental results and the simulation with neural network properties can be observed. The average percentage error was found to be~0.067%. This shows that the nanofluid thermal flow was accurately resolved. Additionally, this nanofluid was not even part of the data set. This goes to show the procedure is fully verified and validated since the neural network can generalize for even a sample that whose properties were not captured in the data collection step.

| Summary of results
First, Figure 11 illustrated the grid convergence. The pipe's length was shown on the X-axis in meters (m), while the temperature was shown on the Y-axis in Kelvin (K). The pipe was of circular cross-section. It was heated on the walls with a constant heat flux. The temperature of the wall along the length of the pipe is estimated. Three mesh sizes-fine, finer, and extra fine-were presented, and their solutions were contrasted with the findings of Kim et al.'s experimental work. 40 An observed convergence to the solution led to the selection of a mesh. The temperature versus pipe length plot for the nanofluids CuO-water, TiO 2 -water, and ZrO 2 -water was then shown in Figures 12-14. The purpose of displaying these plots was to illustrate how the generalized neural network can be utilized as an input for the thermophysical properties of nanofluids, specifically thermal conductivity and viscosity. This technique enhances the accuracy of single-phase simulations. One of the nanofluids displayed in these graphs was not included during the neural network's training. These charts serve as evidence of how well the neural network model matches the experimental data.
Therefore, we can conclude that this approach of selecting features that are specific to nanofluid samples can produce generalized models.

| Use of the study's model
Two models were created as a result that can read the temperature and other input parameters from the simulation. These models return the thermal conductivity and viscosity of the nanofluid as inputs to the single phase model.
In this study, the models were implemented as two MATLAB functions that read the temperature from the COMSOL simulation process, along with the other input parameters they were trained with. The thermal conductivity and viscosity of the nanofluid predicted by these models are then used as inputs to COMSOL's single phase solver, which provides precise solutions for the single phase model. This model accurately predicts the thermal conductivity and viscosity of a single material nanofluid of interest, including the most commonly used nanofluids. It outperforms other models in predicting the thermal conductivity and viscosity of nanofluids. [41][42][43][44][45][46] The model utilizes readily available data as input, eliminating the need for attribute precomputation. It has a simple architecture with a regression neural network and can quickly provide predictions when given inputs. To verify the model's effectiveness, an approach was used that involved testing it with out-of-sample data representing different nanofluid types that were not included in the model's training.
The model is easy to implement in commercial computational fluid dynamics tools like COMSOL.
F I G U R E 9 Neural network train state plot for nanofluid thermal conductivity.
Its input features were chosen to uniquely represent various types of nanofluids, making it a general model. Unlike other models that primarily focus on non-nanofluid specific aspects.
Here are the usage instructions to implement the model in a MATLAB and COMSOL scenario: Step 1: Collect data, which can be obtained from various sources.
Step 2: Select the features based on their ability to uniquely represent each nanofluid type.
Step 3: Develop the model by training it with appropriate activation functions like the Log-Sigmoid function and architecture.
Step 4: Test the model's accuracy using 15% of the available data.
Step 5: Evaluate the model's effectiveness against unseen nanofluid types during training and testing 2. Step 6: Deploy the model by configuring the pipe geometry and setting up and connecting various physics in COMSOL's single phase model. Two functions with the same names as in MATLAB are created, and their names are passed as values for the thermal conductivity and viscosity of the COMSOL and MATLAB LiveLink setup. Assign other material properties, use the computational fluid dynamics solver to compute results, and plot and assess the results.

| Present study limitations
The primary objective of this research was not to predict the thermophysical characteristics of hybrid nanofluids. Although the physical behavior of single material nanofluids was harnessed F I G U R E 13 Plot of temperature with the length of pipe for TiO 2 -water nanofluid.
F I G U R E 14 Plot of temperature with the length of pipe for ZrO 2 -water nanofluid. ONYIRIUKA as a byproduct of the process, it was not the primary focus as the main objective was to achieve model generalization. Moreover, the figures were plotted using temperature instead of the heat transfer coefficient, which could result in temperature comparisons and heat transfer coefficient comparisons not being on the same scale.

| CONCLUSION
This study has demonstrated that both single-phase models and neural networks when used together can accurately simulate the characteristics of nanofluids. Using a neural network, the viscosity and thermal conductivity of the nanofluid can be predicted in real time by passing the fluid temperature and other parameters as input. The neural network then replaces the thermophysical properties in the single-phase governing equations, resulting in a nonlinear model formulation. Further development could involve creating a standalone program for particulate fluids that includes the particle and base fluid as the main components. It is worth noting that the neural network in this study was designed for nonhybrids, and considering hybrids in this setup may not strictly align with physical principles.

CONFLICT OF INTEREST STATEMENT
The author declare no conflict of Interest.