Introduction

Today, the issue of heat transfer in power plants and industries has become a major challenge1,2,3,4,5,6,7. Researchers are always looking to increase the efficiency of heating equipment with different methods8,9,10. Nanofluids are one of the newest and best ways to improve the thermal performance of fluid systems. Choi11 first coined the term nanofluid to describe very small particles (nanoparticles less than 100 nm in diameter) suspended in a fluid. In nanofluids, one or more solid particles are added to the fluid, which increases the rate of heat transfer and change in viscosity12, 13. Some nanoparticles are in the form of oxides and play an important role in the dispersion and suspension of fluid, and some are in the form of non-oxide metal particles14,15,16. One of the main properties of fluids is viscosity. Viscosity can be mentioned as the inhibitory force and the magnitude of the frictional properties of the fluid17. In addition, viscosity is a function of temperature and pressure18. Fluid viscosity is commonly used for engineering designs and the definition of dimensionless numbers such as Reynolds and Prandtl19. In addition, fluid viscosity is used to calculate the required power of pumps, mixing processes, piping systems, liquid pulverization, fluid storage, fluid injection, and fluid transport20. Hybrid nanofluids combine two heterogeneous nanoparticles (hybrid nanocomposites) suspended in the base fluid21,22,23,24. The purpose of using hybrid nanocomposites in an intermediate fluid is to improve the heat transfer characteristics of the base fluid through the combined thermophysical characteristics of effective nanomaterials25,26,27,28. In recent years, various fluids such as water, ethylene glycol, and various oils were used as operating fluids in industry and engineering design. Given the growing need for cooling systems with high heat losses due to viscosity changes, scientists and researchers have been encouraged to achieve fluids with higher heat transfer properties (increased heat transfer rate) and effective viscosity over temperature. The amount of viscosity in nanofluid design is very critical for fluid flow29. Due to pressure drops in the pump, fluid concentration is known to be important in industrial applications. In the last decade, researchers have presented various researches on thermophysical parameters (temperature, particle size φ, shape, size, impact of time or agglomeration, μnf, and base fluids) and transverse theoretical and laboratory relations30, 31. The knowledge of predicting the test process is a powerful tool for engineers who want to design and produce their products with excellent quality and the lowest cost. Therefore, ANNs are considered computational methods in artificial intelligence systems and new computational methods to predict the output responses of complex systems32,33,34,35. The main idea of ​​such ANNs is, to some extent (inspired by how the biological neural system works to process data and information to learn and create knowledge. The key element of this idea is to create new structures for the information processing system. Many super-interconnected processing elements called neurons have formed to solve problems and transmit information through synapses (electromagnetic communication). ANNs are among the most advanced and modern methods in simulation36,37,38. Today, they have been widely used in all engineering sciences as a powerful tool in simulating phenomena whose conceptual analysis is difficult. In this method, the observational data is taught to the model, and after training the model, it performs forecasting and simulation work with appropriate accuracy. In recent years, researchers have used ANNs to predict the thermal conductivity of nanofluids and determine the appropriate μnf39,40,41,42,43,44. For example, Miao et al.45 used ANNs to predict the μnf of a mixture of ethanol and methanol over a temperature range. The results show that the ANN model predicts the μnf of the compound with great accuracy. Yousefi et al.46 investigated the viscosities of metal oxides such as SiO2, Al2O3, CuO and TiO2 suspended in ethanol and water by the ANN method. The predicted results were in good agreement with the experimental results obtained. Therefore, this method is suitable for estimating the μnf of nanofluids containing metal oxide. Atashrouz et al.47 predicted the μnf of SiO2, Al2O3, CuO, and TiO2 nanofluids suspended on water, ethylene glycol, and propylene glycol by ANNs. The results show that this method is suitable for predicting the \(\mu_{nf}\). Zhao et al.48 investigated the μnf of Al2O3 and CuO metal oxides water- suspended by ANNs. The predicted results were in good agreement with the experimental values obtained. Esfe et al.49 predicted the \(\mu_{nf}\) of Fe/EG nanofluids by the ANN method. The predicted results are in good agreement with the experimental values obtained. Therefore, this method is very efficient in predicting the \(\mu_{nf}\). Studies show that the prediction of \(\mu_{nf}\) using ANNs is not very old and is being addressed by researchers. Therefore, this manuscript analyzed the influence of different φ alongside variable temperatures on μnf of MWCNT–Al2O3 (30–70%)/oil SAE40 hybrid nanofluid. For this reason, the \(\mu_{nf}\) has been derived for 203 various experiments through a series of experimental tests, including a combination of 7 different \(\phi\), 6 various temperatures, and 5 shear rates. These data were then used to train an ANN to generalize results in the predefined ranges for two input parameters. For this reason, a feed-forward Perceptron ANN with two inputs (T and \(\phi\)) and one output (\(\mu_{nf}\)) was used. The best topology of the ANN was determined by trial and error, and a two-layer with 10 neurons in the hidden layer with the tansig function had the best performance.

As observed in the literature, the use of post-processing methods such as artificial neural networks, response surface and optimization methods in various sciences, including nanofluid science has been very welcomed. The reason for this welcome is the reduction of time and financial costs in laboratory studies. However, the use of artificial neural networks and other post-processing methods to predict the behavior of nanofluids requires access to valid laboratory results. Hemmat Esfe Research Group is one of the active groups in the field of laboratory studies of nanofluids, which has provided more than 200 valuable experimental databases for other researchers to perform post-processing studies on various thermophysical properties of normal and hybrid nanofluids50,51,52,53,54,55,56. Feasibility studies of this research group in the field of application of nanofluids in increasing oil extraction57,58 and also the use of nanofluids in lubricants in order to minimize the damage caused by cold start of the car engine59,60,61 are other activities of this group.

ANN configuration

An ANN is a powerful tool for processing raw data inspired by human brain structure and consists of many neurons that collaborate to model a system62. The configuration of ANNs is made up of several weighted elements. The nodes are the artificial neurons, and the directional arrows and the weights show the relationship between the outputs and the inputs of the neurons. ANNs are categorized into two groups based on their morphology: The first category is called feed-forward ANN, and the latter is called the recurrent ANNs. According to the experimental data in this study that are static and that feed-forward ANNs have high potential in function estimation, a feed-forward perceptron ANN has been used. The relationship between input and output data is nonlinear; therefore, a multilayer Perceptron ANN should simulate this nonlinear relationship. Accordingly, in this study, the network is constructed of two layers with nonlinear functions. This configuration has proven accuracy in function approximation in different studies. The backpropagation algorithms are efficient and effective; hence, several methods in this ANN training scheme are used, and their performance is compared. Different ANNs with various neuron numbers and transfer functions in the hidden layer have been examined. The best topology was determined by trial and error and minimizing the ANN error. The best results were obtained using 10 neurons in the second layer with hyperbolic tangent function and linear function in the output layer. A graph of a typical multilayer ANN is presented in Fig. 1 alongside different inputs and outputs.

Figure 1
figure 1

A multilayer perceptron ANN graph alongside inputs and outputs data.

For training an ANN, the first step is to create a database of experimental or simulation patterns to feed the network for learning. To this end, 203 different samples in terms of temperature and \(\phi\) were prepared for MWCNT–Al2O3 (30–70%)/oil SAE40 hybrid nanofluid. Usually, the raw data is divided into 70% for training, 15% for validation, and 15% for testing. The validation data prevents the ANN from overtraining using Early stop and generalizes the ANN results. In this study, 203 samples were gained from 7 different \(\phi\), 6 various temperatures, and 5 shear rates. The experimental data used for training the ANN is shown in Table 1.

Table 1 \(\mu_{nf}\) versus temperature with different \(\phi\).

The deviation of \(\mu_{nf}\) and its range is presented in Fig. 2 based on different temperatures, in Fig. 3 versus \(\phi\), and Fig. 4 based on various shear rates.

Figure 2
figure 2

\(\mu_{nf}\) deviation based on temperature values.

Figure 3
figure 3

\(\mu_{nf}\) variation versus \(\phi\).

Figure 4
figure 4

The \(\mu_{nf}\) variation versus shear rate.

The first step in using ANN is to train the ANN with 70% of the training data and assess the ANN training status; then, the 15% of data that is not used for training is fed, and their performance is computed using the comparison between true and true values and real ANN output. The ANN with the highest performance (the lowest error level) is chosen as the best ANN for the simulation of the system. Due to the random nature of training weights of the ANN, each ANN is trained 50 times from random with each training method, and the model with the highest performance is chosen as a model for the system. As indicated previously, determining the number of neurons in the hidden layer has an important influence on the modeling performance; hence various topologies (number of neurons in hidden layer and transfer function) were considered for each ANN, and the best combination is determined trial and error. The best performance is obtained using 10 neurons with tangent-hyperbolic sigmoid function in the second and linear transfer output layer. Detailed information on ANN configuration is shown in Table 2.

Table 2 The ANN topology.

Training methods

One novelty of this study is to obtain the more effective method for ANN training which is more robust and has the highest performance in μnf estimation. For this reason, several training methods for feed-forward perceptron ANNs have been used in MATLAB software (Stable release: R2021a/March 17, 2021)63,64,65,66,67,68. The error value for each method alongside other information (including function name in MATLAB and the method e explanation) are gathered in Table 3. Moreover, a detailed comparison of different training methods' error rates is presented in Fig. 5.

Table 3 Error value comparison of various training methods in MATLAB software.
Figure 5
figure 5

A comparison of error value for different training methods in MATLAB.

The presented mean square error (MSE) between the actual output and target values for the various forward-based training methods. Other methods have also been reviewed, which have been omitted due to inconsistencies with the physics of the problem and non-convergence of the answers. Among the applied training methods, the trainbr method showed to be the best training method for this problem due to the highest performance; therefore, this method will be explained and analyzed in the form of Regression and Performance graphs.

Trained ANN performance

One of the most important indexes showing the training state of an ANN is the Performance graph, which presents the variation of MSE versus training stages. The performance chart of \(\mu_{nf}\) is viewed in Fig. 6 for MWCNT–Al2O3 (30–70%)/oil SAE40 nanofluid. The MSE in the vertical axis is presented in this chart versus training iteration on the horizontal axis (Epoch). Three different data, including Training, Validation, and Test, are observed in this figure representing MSE for the trained points, validation, and test points, respectively. At the first training stage, that ANN has random weights, the MSE value is at the highest level, while after several iterations of training, it is reduced. In this figure, the MSE value for training data is much lower than the rest (validation and test) at the stop iteration. This is the effect of the Early stop strategy for preventing overlearning and displays that the untrained new points have higher MSE rates than trained points fed to the system. The best stop time for the highest performance is indicated with a green circle in the figure, with the lowest MSE in the total iterations. As there are 50 different ANNs for each training scheme, the ANN with the least MSE is the best solution to estimate the μnf for any combination of inputs.

Figure 6
figure 6

Performance diagram of μnf output.

Another indicator to determine the ANN training state is the Regression diagram and the correlation factor between the actual output data and the target values. This diagram is presented in Fig. 7 for \(\mu_{nf}\) and shows the correspondence of real ANN outputs and desired values. The horizontal axis corresponds to target values in this graph, while the vertical axis shows the ANN output. In this figure, three different parameters are important. These indexes include correlation coefficient value (R), slope value (M), and bias (B). An ideal ANN must have the same output as target values, and in this condition, the correlation value and slope are equal to 1, and the bias value should be equal to 0. It can be seen that in all four graphs, the slope of the regression line is almost equal to 1; hence it can be deduced that the results are output values of the ANN that have satisfactory accuracy and are sufficiently close to target values. Moreover, the scattering style of points is at a minimum level, and all of the points are located on the bisector of the plane.

Figure 7
figure 7

Regression diagram for \(\mu_{nf}\) output.

In Table 4, the error rate of trained ANNs is presented for \(\mu_{nf}\), and it is noticeable that the error value is very low and has an acceptable margin.

Table 4 Trained ANNs error rates for \(\mu_{nf}\).

The error diagram of different experimental data of \(\mu_{nf}\) is presented in Fig. 8. It indicates that the frequency of zero-range error values is very high, proving that the ANN is well trained and creates a good estimation for \(\mu_{nf}\).

Figure 8
figure 8

Experimental data error value for \(\mu_{nf}\).

Another important clue for a well-trained ANN is a histogram error value, as shown in Fig. 9. The histogram chart depicts the frequency or count of errors in different error margins ​​in a bar chart. Therefore, the frequency of errors in the vertical axis is presented versus different error margin values in the horizontal axis. The more near-zero frequencies, the more accurate ANN. In this figure, the Zero Error line is indicated by red color. It is seen that most bins with a high frequency of errors are gathered around this line, which is affirmative proof of a suitable choice of training method and its acceptable outcome.

Figure 9
figure 9

The ANN error histograms for \(\mu_{nf}\).

Another comparison between actual data and ANN outputs is presented in Fig. 10 for \(\mu_{nf}\). As shown in Fig. 10, a very good agreement between these data can be seen, which shows proper ANN training.

Figure 10
figure 10

Comparison of ANN outputs and target values for \(\mu_{nf}\).

Analyzing untrained data

Another comparison chart is presented in 3D space for \(\mu_{nf}\) versus temperature and \(\phi\) to investigate the trained ANN's appropriateness for predicting \(\mu_{nf}\) for untrained data (see Fig. 11).

Figure 11
figure 11

3D graph of \(\mu_{nf}\).

This graph shows the ANN output for untrained points in colored mesh, while the trained points are depicted with red stars. Thus, we can see that the stars are located on the 3D surface, and a close correspondence exists between trained ANN results for untrained data and the target values. Based on all of the diagrams presented for the trained ANNs, we can conclude that a well-trained ANN can be used as an approximating function for predicting \(\mu_{nf}\). In addition, the \(\phi\) has a more significant influence on \(\mu_{nf}\) value in contrast to a temperature which has a negligible effect on the output values.

Conclusion

In summary, the dynamic viscosity of MWCNT–Al2O3/oil SAE40 nanofluid is investigated at different nanoparticle percentages and temperatures by ANN. In this study, the best topology of the ANN was determined by trial and error, and a two-layer with 10 neurons in the hidden layer with the tansig function had the best performance. Also, to analyze the effect of various training algorithms on the performance of \(\mu_{nf}\) prediction, 10 different training functions were used. The results show that a well-trained ANN is created using the trainbr algorithm and showed an MSE value of 4.3e−3 along 0.999 as a correlation coefficient for predicting \(\mu_{nf}\). To parameters of nanoparticle percentages and temperatures have a significant effect on the dynamic viscosity. Therefore, an increase \(\phi\) has an impressive growth of \(\mu_{nf}\) value for all temperatures. And by increasing the temperature, the \(\mu_{nf}\) will decrease for all various \(\phi\). At the same time, this decrement is more noticeable in higher \(\phi\). For example, an increase of the temperature from 25 to 50 °C changes the μnf of the pure fluid by only about 200%, while the same changes of temperature in \(\phi\) = 1% will cause a 350% drop in μnf. The academic community and industrial society can use the obtained data in the present manuscript to find the optimal condition in the preparation and production of nanofluids to reduce the energy consumption of industrial instruments. As a suggestion, we recommend using other configuration of neural networks including GMDH network and comparing the obtained results in this paper with the ones obtained through other methods. Moreover, implementation of experiments with other parameters or the same parameters used in this manuscript with other margins is highly recommended for better understanding of this hybrid nano-fluid.