Developing an ANFIS-based swarm concept model for estimating the relative viscosity of nanofluids

Nanofluid viscosity is an important physical property in convective heat transfer phenomena. How- ever, the current theoretical models for nanofluid viscosity prediction are only applicable across a limited range. In this study, 1277 experimental data points of distinct nanofluid relative viscosity (NF-RV) were gathered from a plenary literature review. In order to create a general model, adaptive network-based fuzzy inference system (ANFIS) code was expanded based on the independent vari- ables of temperature, nanoparticle diameter, nanofluid density, volumetric fraction, and viscosity of the base fluid. A statistical analysis of the data for training and testing (with R 2 = .99997) demonstrates the accuracy of the model. In addition, the results obtained from ANFIS are compared to similar experimental data and show absolute and maximum average relative deviations of about 0.42 and 6.45%, respectively. Comparisons with other theoretical models from previous research is used to verify the model and prove the prediction capabilities of ANFIS. Consequently, this tool can beofhugevalueinhelpingchemistsandmechanicalandchemicalengineers– especiallythosewho are dealing with heat transfer applications by nanofluids – by providing highly accurate predictions of NF-RVs.


Introduction
Nanofluids are comprised of a base liquid and uniformly dispersed solid nanoparticles. The word 'nanoparticle' refers to solid particles with a diameter of less than 100 nm. In general, nanofluids have a volumetric fraction of less than 4% nanoparticles (Kamiński & Ossowski, 2014). Nanofluids usually contain TiO 2 , Al 2 O 3 , SiC, SiO 2 , and CuO as nanoparticles, and deionized water, water, ethylene glycol, polyalphaolefin, ethanol, or a mixture of ethylene glycol or propylene glycol with water as the base fluid (Mahbubul, Saidur, & Amalina, 2012). Based on recent investigations, nanofluids' thermal conductivity is generally higher than that of the base fluid (Murshed, Leong, & Yang, 2008).
Fluid viscosity is a measure of fluid's internal resistance against flowing, which is the main thermophysical property of fluid -especially in convective thermal applications in the presence of fluid flow. Therefore, fluid viscosity can influence the pumping power needed by altering the friction head and convective heat transfer coefficient. Consequently, because of the complexities of nanofluid hydrodynamics caused by particle-particle collision, a precise model for predicting the viscosity of nanofluids would seem to be essential (Mehrabi, Sharifpur, & Meyer, 2013). In the past 20 years, a number of investigations have been completed on nanofluids, especially on nanofluid synthesis (H. Chen, Ding, & Tan, 2007; L. Chen, Xie, Li, & Yu, 2008) and thermal conductivity Ahmadi, Tatar, et al., 2018;Jung, Cho, Lee, & Kang, 2011;S. Lee, Choi, Li, & Eastman, 1999;Shaikh, Lafdi, & Ponnappan, 2007). However, few investigations related to nanofluid relative viscosity (NF-RV) have been carried out, even though this physical property plays a major role in the design of industrial equipment (H. Chen et al., 2007;Duangthongsuk & Wongwises, 2009;J.-H. Lee et al., 2008). Masuda, Ebata, and Teramae (1993) determined the viscosity of an aqueous nanoparticle solution (consisting of Al 2 O 3 , SiO 2 , and TiO 2 ), while other researchers have evaluated the viscosity of various different nanofluids experimentally (L. Chen et al., 2008;Murshed et al., 2008;Nguyen et al., 2007;Pak & Cho, 1998). In addition, the effects of independent variables like temperature and the shape, diameter, and volumetric fraction of the particles on NF-RV have been considered (Mahbubul et al., 2012;Rudyak & Krasnolutskii, 2014;Rudyak, Belkin, & Egorov, 2009). Modeling could provide an opportunity to formulate a general equation for predicting the viscosity of different nanofluids (Heidari & Ghoreishi, 2013). The Einstein (1906) model (μ nf = μ bf (1 + 2.5ϕ)) is essentially the first model for predicting NF-RV at a low volumetric fraction of around 0.02 (Eastman, Phillpot, Choi, & Keblinski, 2004). However, for higher volumetric fractions, models based on the power law assumption are superior. For a system of simplified hardened spheres, Krieger and Dougherty's (1959) half-empirical equation makes a good prediction of NF-RV (such as the viscosity ratio of the nanofluid relative to the base fluid). A decade later, Nielsen (1970) proposed a more general equation, while more recently Mehrabi et al. (2013) conducted a comprehensive study on the best correlations for NF-RV. However, model verification is the key point of modeling, which is controlled by simplistic assumptions that are applied to the development of the model.

Data sets
There are a number of experimental investigations of NF-RV (H. Chen et al., 2007;Duangthongsuk & Wongwises, 2009; J.-H. Lee et al., 2008;S. W. Lee, Park, Kang, Bang, & Kim, 2011;Murshed et al., 2008;Singh & Kundan, 2013;Zhao, Luo, Ni, & Cen, 2009). The independent variables in these studies include temperature, volume concentration, nanoparticle diameter, shape, and aspect ratio, and inter-particle spacing. In addition, the effects of settling time, fluid density, fluid polarity, etc. on NF-RV have also been investigated experimentally (Meyer, Nwosu, Sharifpur, & Ntumba, 2012). In previous studies, three independent variables such as temperature, nanoparticle diameter, and nanoparticle volumetric fraction were chosen as the model inputs. However, these models are only carried out for specific nanofluids, so they are not universal and applicatory to all nanofluids (Mehrabi et al., 2013). In the present study, these three variables are also applied; however, other input parameters are introduced in order to generalize the model to different types of nanoparticle. The fourth input parameter can be the molecular weight or bulk density of the nanoparticles. It is inferred that the ANFIS model's ability can be improved by including the nanoparticle bulk density as another input parameter. The fifth input parameter is the viscosity of the base fluid. A detailed analysis and specification of the 1277 data points for the NF-RVs across a wide range of different input parameters is shown in Tables 1 and 2. These data points are classified into two groups, the first of which was used for training the system and the second of which was used for verifying the model; three quarters of the data points were used as training data and the remainder were used as testing data. Figure 1 presents the schematic structure of fuzzy inference system (FIS) processing, which is comprised of four sections: the knowledge base, the inference engine, fuzzification inference, and defuzzification (Jang, 1993). The ANFIS model has diverse interconnected nodes in its structure. A number of these nodes have adaptive sections, which means that their output is limited by setting the value for that node.

ANFIS structure
For the FIS, x 1 and x 2 are assumed for the importing variables and y is assumed for the exporting variable. Then, principles are formed as conditional statements (e.g., if x 1 = A and x 2 = B then y = f (x 1 , x 2 )), in which A and B are considered fuzzy sets (FSs) and y is named a   crisp function (CF). CFs can be any function (generally of a polynomial form) that is capable of giving an output under specific conditions (Jang, 1993).
In the case of assuming the status of f (x 1 , x 2 ) = cte, a Sugeno-type fuzzy model with an order of zero is obtained. For a particular condition, any available law will follow the similar resultant section. In the case of assuming a first-order polynomial for f (x 1 , x 2 ), a firstorder Sugeno FIS is encountered.
The method proposed in Takagi and Sugeno (1993) has become the most popular choice for ANFIS development; it has been used in various studies across different fields due to its excellent efficiency. Therefore, in the present study, a Takagi-Sugeno FIS is applied to the prediction of NF-RV values.
For the assumption of two first-order polynomials, laws of the Takagi-Sugeno type can be written as follows (Takagi & Sugeno, 1993):  Note: AARD = average absolute relative deviation; RMSE = root mean square error; STD = standard.
Then a weighting-based averaging method is used for calculating the average of different existing laws' outputs, which is assumed as an output for the model. This structure is described schematically using squares and circles in Figure 2, which represent adaptive and fixed nodes, respectively. There are five layers that nodes can be placed inside, and it can be seen that the nodes in each layer act in the same way (Baghban, Bahadori, et al., 2017;Baghban, Kardani, & Habibzadeh, 2017;Baghban, Mohammadi, & Taleghani, 2017).
In Layer 1, the nodes that are connected to inputs operate certain membership functions (MFs). Gaussiantype memberships functions, as formulated below, are the most common type of MF: where O is the layer output, σ is the variance parameter, and Z is the Gaussian MF center. The suggested model optimizes these parameters in order to improve accuracy. In Layer 2, the following equation is applied in order to evaluate the antecedent's condition consistency and the reliability of the model: Layer 3 applies the following equation in order to normalize the values of W i predicted in the prior step:  Einstein (1906) μ nf (CP) = μ bf (1 + 2.5ϕ) Spherical particles, low particle volumetric fraction ϕ < 0.02 Maïga et al. (2004) μ nf (CP) = μ bf (1 + 7.3ϕ + 123ϕ 2 ) Batchelor (1977) μ nf (CP) = μ bf (1 + 2.5ϕ + 6.5ϕ 2 ) Chen et al.  Layer 4 is responsible for specifying the output linguistic terms, using the following equation to specify the result level: In order to optimize the efficiency, the linear parameters m i , n i , and r i are improved by ANFIS. Finally, in Layer 5 all laws that are connected to an output parameter are considered by the following equation:

Model development
In the first stage of the development of the model, an initial structure for the FIS was created using the MATLAB 2014 genfis function. The Takagi-Sugeno-Kang type of FIS can be obtained using various methods, including grid partition, the lookup table method, fuzzy c-means, and the subtractive clustering method. In the proposed ANFIS model, the subtractive clustering method and Gaussian MFs were applied to the initial structure and the MF type, respectively. In addition, 15 clusters were used; therefore, based on the input and MF parameters, a total of 180 parameters existed for tuning. The FIS structure, once created, needed to be trained to improve
the model's efficiency. In the present study, FIS training was undertaken using the particle swarm optimization (PSO) method in MATLAB 2014. The improved MFs of the trained FIS are demonstrated in Figure 3. The optimal structure was obtained at an iteration of 1200 and a population size of 80.

Model verification
Verification of the proposed PSO-ANFIS model was carried out using both statistical and graphical methods.
The experimental and estimated values are presented in Figure 4 for both the training and testing data sets, and it can be seen that they are in good agreement. A cross plot of the model, which compares the predicted NF-RV data with the experimental values, is shown in Figure 5. It can be seen that the data points are spread close to the y = x line, which means that the predicted data exhibits adequate consistency and good agreement with the target NF-RV values. The relative error of the model predictions compared to the target NF-RV data is shown in Figure 6. It can be seen that most of the errors are grouped close to the zero lines, which proves the accuracy and reliability of the proposed model. It is also notable that the maximum

Figure 9.
Comparison between the NF-RV data predicted by different models and the experimental data for SiO2-DI water, t = 25°C, nanoparticle diameter = 7 nm (Zhao et al., 2009). model error is less than 10%. Four statistical parameters for assessing the accuracy of the proposed model are also introduced as follows: Table 3 shows the values of these parameters for the training and testing data sets. The data points were randomly divided into training and testing classes. It is clear that the proposed model has a low average absolute relative deviation (AARD) value and a relatively high R 2 value, which confirms the model's applicability and reliability.

Comparative evaluations
The proposed ANFIS model was developed to calculate the NF-RVs, which are listed in Table 2. Several models from the literature (see Table 4) were selected for comparison with the results generated by the proposed model.
The predicted NF-RVs of TiO 2 and water with a particle diameter of 21 nm at room temperature as a function of volumetric fraction are compared to the experimental results in Figure 7(a) (Duangthongsuk & Wongwises, 2009). It can be seen that the NF-RV predicted by the ANFIS model is in good agreement with the experimental data. In addition, it seems that in the range of 0.0 to 2.5% the more the volumetric fraction of the particle the more the NF-RV values. It should be noted that in previous models such as those presented in Einstein (1906), H. Chen et al. (2007), Batchelor (1977), Maı¨ga et al. (2004), andBrinkman (1952), the NF-RV is investigated as a function of the viscosity of the base fluid and the volumetric fraction. Thus, the viscosity predicted by these models is fixed against time changes. The trend of the NF-RVs calculated by previous models is steady versus temperature variations. A comparison of the experimental data and the calculated NF-RVs of TiO 2 and water nanofluid versus the particle volumetric fraction is presented in Figure 7(b).
The experimental data are compared to the calculated NF-RVs for Al 2 O 3 and water with a particle diameter of 36 nm and a volumetric fraction of 1% versus temperature in Figure 8(a) (Nguyen et al., 2007). The NF-RVs predicted by the ANFIS model are in very good agreement with the experimental data. The results of the other models are in reasonable to good agreement with the experimental data, with the exception of the model of Hosseini et al. (2010), which is greatly affected by the temperature and varies considerably from the experimental results. The NF-RVs for Al 2 O 3 and water with a particle diameter of 47 nm at room temperature against particle volumetric  fraction are illustrated in Figure 8(b) (Jamshidi, Farhadi, Ganji, & Sedighi, 2012). Ascending attitude in all the theoretical models is observed; however, the ANFIS model shows the best agreement with the experimental data.
The experimental data are compared to the calculated NF-RVs for SiO 2 and deionized water with a particle diameter of 7 nm at room temperature versus the nanoparticle volumetric fraction in Figure 9 (Zhao et al., 2009). It is clear that the ANFIS calculations are in very good agreement with the experimental data, and compare favorably with the results of the other models.
The experimental data are compared to the calculated NF-RVs for CuO and water with a particle diameter of 29 nm and a volumetric fraction of 1% versus temperature in Figure 10(a) (Nguyen et al., 2007). It can be seen that only the ANFIS model has a very good fit to the experimental data compared to the other models. The calculated NF-RVs of CuO and water versus the volumetric fraction are compared to the experimental data in Figure 10 that the predictions of the proposed ANFIS model are in very good agreement with the experimental data for all the NF-RV values. This demonstrates that the proposed model is a flexible and accurate tool for modeling complex non-linear dependencies between a number of parameters without predefining the correlation structures.

Sensitivity analysis
The proposed ANFIS model can potentially provide good dependency between the inputs and the output. In order to investigate how the inputs affect the output, a sensitivity analysis was undertaken. The most effective input can be recognized by the relevance factor r, which is in the range of −1 to +1 and is stated by the following equation (Hosseinzadeh & Hemmati-Sarapardeh, 2014): where X k,i is the ith importing parameter, Y i is the ith exporting value, X k is the average value of the kth input, Y is the average value of exporting parameter, and n is the number of sets. The absolute value of r has a direct relation on the output. As can be seen in Figure 11, the NF-RV shows a straight dependency on the particle diameter, the particle volumetric fraction, and the particle density, and an opposite dependency on the temperature and the viscosity of the base fluid. In addition, the particle vol-umetric fraction is the most effective input variable by a 0.71 relation factor and the temperature is the most ineffective parameter by a −0.023 relation factor.

Conclusion
In this study, a generalizable and precise model for predicting NF-RVs is proposed using ANFIS. The input variables consist of the temperature, base fluid viscosity, and nanoparticle volumetric fraction, diameter, and density. The ANFIS model results were compared to experimental training and testing data, and the validity and sufficiency of the proposed model for a wide range of input variables was affirmed by an AARD value of 0.98% and an R 2 value of .9997. In addition, the proposed model results were compared to literature correlations and existing theoretical models, and it was shown that the proposed model generates accurate and reliable results compared to prior modeling of NF-RVs. Consequently, this tool is potentially of huge value, as it can provide chemists and mechanical and chemical engineers -especially those who deal with heat transfer applications by nanofluids -with a tool for estimating NF-RVs with a high degree of accuracy. In future work, other approaches such as using different types of ANNs and support vector machines (SVMs) optimized using different algorithms can be implemented and compared with the results generated by the ANFIS model proposed in the present study.

Disclosure statement
No potential conflict of interest was reported by the authors.