Application of Legendre polynomials based neural networks for the analysis of heat and mass transfer of a non-Newtonian fluid in a porous channel

In this paper, the mathematical models for flow and heat-transfer analysis of a non-Newtonian fluid with axisymmetric channels and porous walls are analyzed. The governing equations of the problem are derived by using the basic concepts of continuity and momentum equations. Furthermore, artificial intelligence-based feedforward neural networks (ANNs) are utilized with hybridization of a generalized normal-distribution optimization (GNDO) algorithm and sequential quadratic programming (SQP) to study the heat-transfer equations and calculate the approximate solutions for the momentum of a non-Newtonian fluid. Legendre polynomials based Legendre neural networks (LNN) are used to develop a mathematical model for the governing equations, which are further exploited by the global search ability of GNDO and SQP for rapid localization convergence. The proposed technique is applied to study the effect of variations in Reynolds number Re on the velocity profile (f′)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$(f^{\prime })$\end{document} and the temperature profile (q)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$(q)$\end{document}. The results obtained by the LeNN-GNDO-SQP algorithm are compared with the differential transformation method (DTM), which shows the stability of the results and the correctness of the technique. Extensive graphical and statistical analyses are conducted in terms of minimum, mean, and standard deviation based on fitness value, absolute errors, mean absolute deviation (MAD), error in the Nash–Sutcliffe efficiency (NSE), and root mean square error (RMSE).


Introduction
In recent years, the problems of non-Newtonian fluid flow have been a topic of discussion for many researchers. The fundamental reason for this high level of interest was its numerous applications in various engineering domains, particularly the interest in non-Newtonian fluid-flow and heat-transfer problems such as cooling, hot rolling, lubrication, and drag reduction. Debruge [1] in 1972 extends the applications of heat-transfer flow [2][3][4] and investigates the problem through a porous channel. There was interest in increasing the resistance of the blades to the hot stream around the blades for cooling. However, the cooling process leads to excess energy consumption, which essentially leads to a reduction in turbine performance [5]. Some accomplished work is listed, providing a brief review of heat and mass transfer in carbon-nanotube nanofluids [6], the Eyring-Powell model [7], and Walter's B-fluid model [8]. Most real-world phenomena arising in engineering and fluid dynamics are generally presented by highly nonlinear differential equations, and finding exact solutions to nonlinear problems is difficult. In the last decade, many numerical and perturbation techniques have been developed to solve difficult mathematical models. Sheikholeslami investigates the effect of heat transfer in the flow of nanofluids over a permeable stretching wall and by using the perturbation method [9,10]. The authors of [11] used a shooting method to study the stagnation-point flow of an EMHD micropolar nanofluid with mixed-convection and slip-boundary conditions. Umair [12][13][14] studied the effect of (Ag and TiO2)/water nanoparticles shape effect on heat transfer using a homotopy analysis method (HAM). Ganji [15,16] uses the homotopy perturbation method (HPM) to study the heat transfer of Cu-water nanofluids between parallel plates. The Adomain decomposition method (ADM) [17,18], the Hyers-Ulam stability approach [19], the B-spline collocation method [20,21] and optimal homoptopy perturbation (OHAM) [22,23] methods were also developed to study the numerical solutions of heat and mass transfer of the fluid models. Recently, Sepasgozar [5] in 2017 implemented a differential transformation method to study the effect of heat and mass transfer of a fluid in a porous channel. The basic idea of DTM has been presented in previous papers [24][25][26]. Analysis of these numerical methods demonstrates that they are deterministic and require prior information about the problem [27][28][29].
In recent times, artificial neural networks (ANNs) based on unsupervised metaheuristic algorithms are developed to solve various nonlinear difficult mathematical models. Some recent applications include the numerical solution of multiterm variable-order fractional differential equations [30,31], countercurrent imbibition phenomena in secondary oil-recovery processes [32,33], modeling and identification of heat-exchanger processes [34], solution of Bratu and nonlinear Emden-Fowler differential equations [35,36], diabetic retinopathy classification using fundus images [37], the wire-coating process [38], temperature profile of porous and longitudinal fin models [39][40][41], chemical processes [42] and chaos-based secure communication (CBSC) systems [43]. The above methods motivated the authors to develop a soft-computing technique based on the hybridization of a function approximating the ability of Legendre neural networks and the global search ability of the generalized normal-distribution optimization (GNDO) algorithm and local search mechanism of sequential quadratic programming (SQP).
In this study, our aim is to design and implement a gradient-free soft-computing technique that can handle the real-world problems like heat-and mass-transfer problems in a porous channel with ease of implementation, accuracy, reliability, and with fewer arbitrary parameters required to set up the method. To examine the robustness and stability of our proposed algorithm, we performed multiple simulations. The outcomes of our designed algorithm are summarized as: • Flow-and heat-analysis models of a non-Newtonian viscoelastic fluid are formulated using the basic concepts of continuity and momentum equations in cylindrical coordinates. The problem is further reduced to ordinary differential equations. • Series solutions based on Legendre polynomials are constructed for different cases of heat-and mass-transfer analysis of fluid flow in a porous channel. The unknown parameters of the LeNN in fitness functions based on mean square error are minimized by using hybridization of the generalized normal-distribution optimization (GNDO) algorithm and sequential quadratic programming (SQP). • The approximate solutions obtained by the LeNN-GNDO-SQP algorithm are compared with the differential transformation method (DTM) that validates the accuracy of the design algorithm. Moreover, the design algorithm is executed for 100 independent runs to study the convergence of solutions. For this purpose, various performance indicators are defined in terms of mean absolute deviation (MAD), Theil's inequality coefficient (TIC), root mean square error (RMSE), and Nash-Sutcliffe efficiency. The results of these indicators approaches to zero shows the perfect modeling of solutions and efficiency and robustness. Finally, analyses based on the computational complexity of the proposed algorithm are conducted that represent the speed of convergence of the LeNN-GNDO-SQP algorithm in solving difficult nonlinear real-world problems.

Formulation of the problem 2.1 Flow analysis
In this section, the mathematical model for flow and heat transfer is developed for a non-Newtonian viscoelastic fluid on a turbine disc for cooling purposes. Figure 1 represents the schematic view of the problem. The surface of a disc is along the r-axis and normal to the z-axis. The disc in a porous channel is at a distance z = L. Non-Newtonian fluid is injected uniformly along the z direction to cool the heated wall that coincides with the r-axis. From Fig. 1 it can be seen that the cooling problem with injection is considered as stagnation-point flow. In cylindrical coordinates, asymmetric, steady and non-Newtonian where, τ rr , τ rz , τ zr and τ zz are stress components. The boundary conditions for the above analytical model are here, V is the velocity of the injected fluid, u z and u r are the velocity components along the z and r directions, respectively, ρ denotes density and pressure is represented by P. For the special case of a viscoelastic fluid, Rivlin [44] showed that if at a point x k and a time t the stress components are assumed to be polynomials in the acceleration gradient δa m δx n (m, n = 1, 2, 3) and the velocity gradient δv m δx n (m, n = 1, 2, 3), and in addition if the medium is also isotropic, then the stress matrix can be written as where, φ k , (k = 1, 2, 3) are polynomials in A, B and A 2 , respectively. Also, I denotes a unit matrix, and A and B are symmetric matrices defined as Now, the stress components can be given as [5] In order to find a solution for the problem shown in Fig. 1, a stream function is defined that identically satisfies the continuity equation where η = z L , the velocity components in the r and z directions are defined as Using Eqs. (13)- (15) in governing equation of motion Eq. (2) and Eq. (3) that reduces to To eliminate the terms representing pressure, Eq. (16) is differentiated with respect to z and Eq. (17) with respect to r. The resultant equation after subtraction is given as: where, K 1 = 2 ρL 2 , K 2 = 3 ρL 2 are the injected Reynolds number. Putting K 2 = 0, Eq. (18) reduces to subjected to boundary conditions

Heat-transfer analysis
The nondimensionless form of the energy equation with viscous dissipation is given by where, P, ρ, T,k and C are pressure, density, temperature, coefficient of fluid and specific heat, respectively, ϕ denotes the dissipation function. The temperature distribution at the blade wall (z = 0) can be written as here, T 0 denotes the incoming coolant temperature. The following equation, along with the boundary conditions, is obtained after neglecting the dissipation effect:

Proposed methodology
The proposed methodology for solving the governing mathematical model of heat and mass transfer of a non-Newtonian viscoelastic fluid consists of two phases. In the first phase, Legendre polynomials based Legendre neural networks are designed. In the second phase, the designed network is used in an unsupervised manner to calculate the fitness value by optimizing unknown weights in the LeNN structure. Figure 2 depicts the structure of a single-layer Legendre Neural Network (LeNN), which consists of input and one output layer and a functional expansion block based on Legendre polynomials. The hidden layer is eliminated by transforming the input pattern to a higherdimensional space using Legendre polynomials [45]. They are orthogonal on [-1, 1] and constitute the set of orthogonal polynomials. The first ten Legendre polynomials are given in Table 1.

Formulation of fitness function
An unsupervised fitness or objective function is formulated for the problem and its boundary conditions in the form of mean square error are given below where ε 1 is an error function of the differential equation and ε 1 corresponds to the error function of the boundary conditions. The fitness function for the governing equation of the model representing flow analysis of the non-Newtonian fluid is given as Also, the fitness function for the heat-transfer analysis of the fluid is given as where ε 1 and ε 2 are defined as Also, the corresponding boundary conditions are defined as The intension of formulating fitness functions for the problem of heat-and mass-transfer analysis is to obtain appropriate weights in the LeNN structure that would minimize the error. The parameters for which the value of the fitness function approaches to zero then consequently the exact solution for the problem is approximated accurately by the proposed method.

Training of neurons
In this section, the procedure adopted for training of weights in a feedforword LeNN model for optimization of the fitness functions Eq. (33) and Eq. (36) is presented, which is based on hybridization of unsupervised and supervised learning of GNDO and SQP, respectively.

Generalized normal-distribution optimization
The generalized normal-distribution optimization (GNDO) algorithm is a novel metaheuristic technique presented by Yiying Zhang [46] inspired by generalized normaldistribution theory. The GNDO algorithm is widely used for parameter extraction of the model. Unlike other metaheuristic algorithms, the GNDO is easy to implement, as it requires the essential population size and termination criteria. The GNDO has a simple structure in which the position of each individual is updated by using a normaldistribution curve. The working strategy of the GNDO algorithm is subdivided into two phases, exploitation and exploration. A graphical overview of the GNDO is shown in Fig. 3.
Exploitation Exploitation is a process of finding the best solution around the search space consisting of the current positions of all individuals. Initially, the model for optimization by a generalized distribution model is given as where, v t i ,μ i ,δ i andη, are trial vector, generalized mean position, generalized standard variance and penalty factor, respectively. Moreover,η,δ i andμ i are formulated aŝ Here, M is mean position, x t Best is current best so far, a, b, ζ 1 and ζ 2 are random numbers between 0 and 1. Furthermore,η"δ i andμ i are discussed in the exploration phase.
Exploration Exploration refers to the searching of the population space to obtain the best solution. Exploration of the GNDO is based on three randomly selected individuals, as given below: Local information sharing Here, v 1 and v 2 are trial vectors, β is an adjustment parameter, ζ 3 and ζ 4 are random numbers between 0 and 1 that are subjected to a standard normal distribution. The trial vectors are computed as: where p1, p2 and p3 are integers. It is worth mentioning that the GNDO algorithm is inspired by the relationship between the normal-distribution law and traditional teaching phenomena, the search process of metaheuristics and group-teaching phenomena, respectively. GNDO has been applied to study the parameter extraction of photovoltaic models [46].

Sequential quadratic programming
The best performance (weights) obtained by the GNDO algorithm are refined by the process of hybridization with an efficient local search technique known as sequential quadratic programming using a MATLAB toolbox setting. SQP is one of the powerful methods for numerical solution of constrained nonlinear optimization problems. It was developed in 1963 and further refined in 1970. SQP has been applied to a number of problems that prove its power, accuracy and efficiency. Nocedal and Wright [47] discuss SQP in detail and also give a mathematical formulation for various large-scale numerical optimization problems. Some recent applications of SQP are a numerical solution for a simple LNG process [48], exploiting convexity in direct optimal control [49], a chaotic map for ELD optimization [50], short-term hydrothermal coordination [51] and maximum likelihood-based measurement noise covariance estimation [52].

Hybrid LeNN-GNDO-SQP algorithm
The necessary details of the procedural steps for the proposed algorithm are given as: Step 1 Initialization of GNDO: Unknown parameters are generated randomly from the population space with the number of entries equal to the number of neurons in the LeNN structure. Mathematically, it can be written as where φ, ω and β are real values from the population space. Parameter setting for the GNDO algorithm is given in Table 2.
Step 2 Fitness Evaluation: Fitness functions Eq. (33) and Eq. (36) are evaluated to calculate the fitness value for the heat-and mass-transfer problem using the weights generated in the previous step. Step 3 Termination Criterion: The GNDO algorithm stops executing when the following termination criteria are achieved: • Objective value, i.e., ε → 10 -15 .
• Predefined number of iterations is achieved.
If the stopping criteria are fulfilled, then go to step 5, otherwise continue.
Step 4 Storage: Store the optimal best weight corresponding to the minimum fitness value of the objective function and the time taken for the execution.
Step 5 Hybridization: SQP starts the process for minimization of Eq. (33) and Eq. (36) by taking the global best weights of GNDO as initial guesses.
Step 6 Fitness Evaluation: SQP starts the supervised learning, update the weights and evaluate the fitness function until the following termination conditions are satisfied.
• Predefined number of iterations is achieved.
Step 7 Storage: Store the best weight, minimum fitness value and time taken for the execution by SQP and the total time by GNDO-SQP in seconds.
Repeat the procedure from steps 1-7 for a sufficiently large number of independent runs to generate a large data set for reliable statistical analysis. The pseudocode for the proposed technique is given as Algorithm 1.
The LeNN-GNDO-SQP algorithm has a simple structure and easy implementation because it only requires essential parameter setting and terminal conditions for execution. The GNDO algorithm updates the position of an individual using a generalized normaldistribution formula, and SQP complements its local convergence. Since Legendre polynomials are orthogonal on [-1, 1], the experimental analysis shows that the proposed algorithm converges to the best solutions for a number of real-world problems by training the weights from the interval [-1, 1]. It has been noted that convergence of the design scheme is slightly affected by increasing the domain.

Performance indices
In this section, to study the performance of the design scheme for solving the mathematical model of flow and heat analysis due to variations in Reynolds number Re, the performance indicators in terms of mean absolute deviation (MAD), Theil's inequality coefficient (TIC), root mean square error (RMSE) and Nash-Sutcliffe efficiency (NSE) are formulated as [32,53].
where, f m is the analytical solution andf m represents the approximate solution by the proposed algorithm, while N denotes the number of grid points.

Numerical experimentation and discussion
In this section, we discuss a different problem with multiple scenarios depending on the variations in Re on heat and mass analysis of a non-Newtonian fluid. A flow chart of the problem studied in this paper is presented in Fig. 4.
In this problem, the LeNN-GNDO-SQP algorithm is applied to study the effect of variations in Reynolds number (Re) on the velocity profile. Approximate solutions for the velocity profile along with absolute errors for each case are given in Table 3 and graphically shown in Figs. 5(a) and 6(a), respectively. It is observed that the velocity profile of the fluid increases at higher values of the Reynolds number. Table 4 presents the results for changes in the velocity profile f . Furthermore, to study the convergence, stability and robustness of the technique, multiple executions have been carried out. The behavior of the fitness function, see Eqs. (52)-(55), for each case are shown in Fig. 6. It can be observed that for most of the simulation, the value of the fitness function lies between 10 -5 to 10 -7 for each case, which shows the stability of the solutions. Table 5 represents the statistics of absolute errors in terms of minimum, mean and standard deviations. It can be seen that the absolute errors for each case of problem 1 lie around 10 -7 to 10 -12 , 10 -6 to 10 -12 , 10 -4 to 10 -10 and 10 -3 to 10 -9 , respectively. The performance of the mean absolute deviation, Theil's inequality coefficient and the root mean square error in terms of minimum, mean and standard deviations are given in Table 6. The results of MAD, TIC and RMSE during multiple executions are shown through Fig. 7. Global values of performance indices are shown in Fig. 8. Global values for fitness functions and performance parameters (MAD,TIC and RMSE) lie around 10 -3 to 10 -5 , 10 -2 to 10 -4 , 10 -2 to 10 -4 and 10 -2 to 10 -4 , respectively. Values of the unknown parameters in the LeNN structure for obtaining the best solutions for each case of problem 1 are given in Table 7 and graphically shown in Fig. 9.

Problem 2: Heat-transfer analysis with variations in Reynolds number:
In this problem, heat-transfer analysis has been carried out by studying the effect of variations in Reynolds number. The following cases are considered to study the components of velocity and temperature profile f (η) and q(η), respectively, of the fluid. Case I: Re = 0.5, Case II: Re = 2.0, Case III: Re = 5.0 and Case IV : Re = 10.0.
In this problem, the proposed methodology is implemented on a non-Newtonian fluid through a porous channel to study the effect of variations in Reynolds number Re on    Table 8 and graphically presented in Fig. 10. It is observed that increasing the Reynolds number causes the temperature profile of the non-Newtonian fluid to decrease. Statistical analysis given in Table 9 on absolute errors in term of minimum, mean and standard deviations shows the accuracy of stability of solutions obtained by the proposed technique. Absolute errors in the solution for each case lie around 10 -11 to 10 -13 , 10 -10 to 10 -12 , 10 -8 to 10 -11 and 10 -8 to 10 -10 , respectively. Table 10 shows that minimum values of fitness function, MAD, TIC and RMSE lie around 1.63E-08 to 1.39E-03, 5.33E-05, 1.01E-03, 2.30E-05 and 1.09E-03, 6.12E-05. The global performance of the performance measures along with fitness values obtained during 100 independent executions are shown in Fig. 11. The accuracy of the proposed technique is shown in Figs. 12 and 13 representing boxplots for MAD, TIC and RMSE along with normal-probability curves of NSE for each case of problem 2. The unknown weights used for finding the solutions of problem 2 are given in Table 11 and graphically illustrated through Fig. 14.
Finally, the computational complexity analysis (CCA) is evaluated for the proposed algorithm based on the average time taken to calculate unknown neurons in the LeNN structure using the GNDO-SQP algorithm. Values of complexity operators for different cases of heat and mass transfer of a non-Newtonian fluid in a porous channel in terms of mean and standard deviations of executed time by the system are given in Table 12. The results show the consistency of the proposed algorithm. All calculations and evaluation for this research are done on an HP laptop EliteBook 840 G2 with intel(R) Core (TM) i5-5300 CPU

Conclusion
This paper investigates a mathematical model for flow and heat analysis of a non-Newtonian fluid with an axisymmetric channel and porous wall. We conclude our findings as follows:      • A novel evolutionary algorithm is proposed in which we combine the strength of Legendre neural networks (LeNNs) with a generalized normal-distribution algorithm and sequential quadratic programming. It is named the LeNN-GNDO-SQP algorithm.