###### Abstract

Several deterministic and stochastic multi-variable global optimization algorithms (Conjugate Gradient, Nelder-Mead, Quasi-Newton, and Global) are investigated in conjunction with energy minimization principle to resolve the pressure and volumetric flow rate fields in single ducts and networks of interconnected ducts. The algorithms are tested with seven types of fluid: Newtonian, power law, Bingham, Herschel-Bulkley, Ellis, Ree-Eyring and Casson. The results obtained from all those algorithms for all these types of fluid agree very well with the analytically derived solutions as obtained from the traditional methods which are based on the conservation principles and fluid constitutive relations. The results confirm and generalize the findings of our previous investigations that the energy minimization principle is at the heart of the flow dynamics systems. The investigation also enriches the methods of Computational Fluid Dynamics for solving the flow fields in tubes and networks for various types of Newtonian and non-Newtonian fluids.

Keywords: energy minimization; fluid dynamics; global multi-variable optimization; pressure; flow rate; tube; network; deterministic, stochastic; Conjugate Gradient; Nelder-Mead; Quasi-Newton; Global; Newtonian; power law; Bingham; Herschel-Bulkley; Ellis; Ree-Eyring; Casson.

Deterministic and stochastic algorithms for resolving the flow fields in ducts and networks using energy minimization

Taha Sochi

University College London, Department of Physics & Astronomy, Gower Street, London, WC1E 6BT

Email: t.sochi@ucl.ac.uk.

## 1 Introduction

The traditional method for resolving the pressure and volumetric flow rate fields in fluid conducting devices is to use the conservation principles, which are normally based on the mass continuity and momentum conservation, in conjunction with the constitutive relations that link the stress to the rate of deformation and are specific to the particular types of fluid employed to model the flow [1, 2, 3, 4]. For single conduits, this usually results in an analytical expression that correlates the volumetric flow rate to the applied pressure drop as well as other dependencies on the parameters of the conduits, such as the radius and length of the tube, and the parameters of the fluid such as the shear viscosity and yield stress. For networks of interconnected conduits, the analytical expression for the single conduit for the particular fluid model can be exploited in a numeric solution scheme, which is normally of iterative nature such as the widely used Newton-Raphson procedure for solving a system of simultaneous non-linear equations, in conjunction with the mass conservation principle and the given boundary conditions to obtain the flow fields in the network.

Recently the energy minimization principle in the flow through single conduits and networks of interconnected conduits was investigated [5, 6] as a possible underlying rule for the flow phenomena that can be exploited to resolve the pressure and volumetric flow rate fields. While in [5] the issue was investigated numerically in relation to the flow of Newtonian fluids using a stochastic simulated annealing [7, 8, 9] procedure, in [6] it was investigated analytically in relation to the flow of Newtonian and power law fluids using standard analytical optimization methods from Calculus.

In the present study we continue those investigations but this time the issue is investigated numerically in relation to the flow of Newtonian and six non-Newtonian fluid models using three deterministic and one stochastic global multi-variable optimization algorithms. The six non-Newtonian fluid models are: power law, Bingham, Herschel-Bulkley, Ellis, Ree-Eyring and Casson. The three employed deterministic algorithms are: Conjugate Gradient, Nelder-Mead, and Quasi-Newton, while the stochastic algorithm is the Stochastic Global. Several types of network, which include one-dimensional (1D) two-dimensional (2D) and three-dimensional (3D), of different geometries and topologies, such as fractals and irregulars based on cubic and orthorhombic lattices, are used to examine and validate the energy minimization proposal.

All the results obtained in the current study support the generalization of the energy optimization as a fundamental principle that underlies the flow phenomena in the Newtonian and non-Newtonian fluid dynamics systems. The study also adds more tools to the Computational Fluid Dynamics as these computational methods, which are based on energy minimization, can be used for finding the pressure and flow rate fields in tubes and networks.

The plan for this paper is as follow: in the next section § 2 we present a general theoretical background about the energy minimization principle and its use in association with the global multi-variable optimization algorithms to resolve the flow fields in tubes and networks of interconnected tubes for different types of fluid. This will be followed in section § 3 by discussing the implementation of the energy minimization principle within global multi-variable optimization codes and the results that have been obtained from different optimization algorithms using various types of fluid and different kinds of network where we analyze the results and compare them to the standard analytical solutions as obtained from and verified by the traditional methods which are based on the conservation principles and constitutive relations for solving the flow fields. Finally, in section § 4 the paper is concluded by outlining the main issues that have been examined in this study and their theoretical and practical significance.

## 2 Theoretical Background

In this investigation, we assume an incompressible, laminar, pressure-driven, fully-developed flow with minimal entry and exit effects and negligible viscous frictional losses. We also assume minor effects from external body forces such as gravitational attraction and electromagnetic interaction. The single conduits, as well as the conduits in the interconnected networks, are assumed to be rigid of uniform and circularly-shaped cross sections along their axial dimension.

As for the boundary conditions, we assume Dirichlet-type pressure boundary conditions. The last assumption is imposed only for convenience and practical considerations; otherwise the energy minimization argument, when established, will not be restricted to such conditions which basically reflect the way used to model and portray the flow system by the observer and hence the type of the boundary conditions does not represent an inherent characteristic of the system that is due to determine its final outcome.

Concerning the type of fluid, we assume a generalized Newtonian fluid which in this investigation includes Newtonian, Ostwald-de Waele, Bingham, Herschel-Bulkley, Ellis, Ree-Eyring and Casson models. The constitutive relations for these models, as well as the analytical expressions for their volumetric flow rate through rigid uniform pipes of circular cross sections, are given in Table 1.

The time rate of energy consumption, , for transporting a certain amount of fluid through a single conducting device, considering the pre-stated flow assumptions, is given by

(1) |

where is the pressure drop across the conducting device and is the volumetric flow rate of the transported fluid through the device. For a flow conducting device that consists of or discretized into conducting elements indexed by , the total energy consumption rate, , is given by

(2) |

where is the number of the boundary and internal nodes. For a single duct, the conducting elements are the discretized sections, while for a network they represent the conducting ducts as well as their discretized sections if discretization is employed.

Starting from randomly selected values for the internal nodal pressure, with the given pressure values for the inlet and outlet boundary nodes, the role of the global multi-variable optimization algorithms in the above-described energy consumption model is to minimize the cost function, which is the time rate of the total energy consumption for fluid transportation as given by Equation 2, by varying the values of the internal nodal pressure while holding the pressure values at the inlet and outlet boundary nodes as constants. The volumetric flow rates, , that have to be used in Equation 2 for the employed fluid models are given by the expressions in Table 1.

Model | Constitutive | Q |
---|---|---|

Newtonian | ||

Power Law | ||

Bingham | ||

Herschel-Bulkley | ||

Ellis | ||

Ree-Eyring | ||

Casson |

## 3 Implementation, Results and Analysis

The above-explained energy minimization method was implemented using three deterministic global
multi-variable optimization algorithms and one stochastic. The deterministic algorithms are:
Conjugate Gradient, Nelder-Mead, and Quasi-Newton, while the stochastic is the Global algorithm of
Boender et al. For more details about the three employed deterministic algorithms we refer to
standard textbooks that discuss these algorithms such as the Numerical Recipes of Press et al [10], while for the Stochastic Global algorithm we refer to
[11]^{1}^{1}1See also: http://jblevins.org/mirror/amiller/global.txt web
page..

As for single tubes, it is a special case of the forthcoming linear networks of serially connected pipes where all the pipes in the ensemble have the same radius; in this regard all the implemented optimization algorithms produced results which are virtually identical to the analytical solutions for all the seven types of fluid as given in Table 1. Regarding the networks, due to the difficulty of presenting the results graphically for the two-dimensional and three-dimensional networks, we present in Figures 2–6 a sample of the results obtained from a range of one-dimensional networks presented in Table 2. Similar results were obtained from representative samples of two-dimensional and three-dimensional networks although the numerical errors for the two-dimensional and three-dimensional networks are generally larger than those of the one-dimensional. Also some algorithms failed to converge in the case of large networks due to shortcomings of the employed algorithms and codes or restrictions on the affordable CPU time or the number of iterations of their execution.

The size of the networks used in the investigation ranges between a small number to several hundreds, and even thousands in some cases, of nodes and segments. The multi-dimensional networks used in this investigation are of two main types: two-dimensional of fractal and rectangular morphology, and three-dimensional built on cubic and orthorhombic lattice structures. The fractals are based on fractal branching patterns where each generation of the branching tubes in the network has a specific number of branches related to the number of branches in the parent generation, such as 3:1, as well as specific branching angle, radius branching ratio and length to radius ratio. The cubic and orthorhombic networks are based on cubic and orthorhombic three-dimensional lattice structures respectively where the radii of the tubes in the network are subjected to random statistical distributions such as the uniform or the normal distributions. Similar statistical distributions were also applied to the two-dimensional rectangular networks. A graphic demonstration of three main types of network; namely one-dimensional linear, two-dimensional fractal and three-dimensional orthorhombic; is given in Figure 1.

The size of the difference between the numerical optimization solutions and the analytical solutions depends mainly on the particular algorithm, the type and parameters of the fluid and the size and type (1D, 2D or 3D and fractal or orthorhombic) of the network. A typical size of the average percentage relative difference between the numerical optimization solutions and the analytical solutions is less than 0.5% for the one-dimensional networks, about 1% for the two-dimensional networks, and 2-3% for the three-dimensional networks. In most cases, the best optimization algorithm with regard to the agreement of its solution with the analytical solution is the Global while the worst is the Nelder-Mead. The latter has also failed to converge in some cases.

In our view, the observed discrepancy between the numerical optimization solutions and the analytical solutions in all the investigated cases can be justified by premature convergence of the optimization algorithms due to practical limits on their convergence criteria as well as numerical errors arising from limitations of the employed optimization algorithms and codes plus non-linearities, especially in some cases of non-Newtonian models with extreme non-linear characteristics such as high shear thinning and yield stress.

There are many computational issues related to the performance and convergence behavior of these algorithms and their relation to the type and parameters of the fluids and the size and type of the networks. However, these technical details are irrelevant to the current study whose main objective is to provide further validation and demonstration for the use of energy minimization principle in resolving the flow fields in tubes and networks, rather than investigating numerical and computational issues.

Network | NS | Lengths (cm) | Radii (cm) |
---|---|---|---|

1 | 7 | 80,60,70,90,90,50,60 | 2.5,2.1,1.8,1.3,1.7,2.6,1.6 |

2 |
8 | 4.8,4,4.8,4,5.6,7.2,5.6,4 | 1,1.3,0.75,0.6,0.5,0.85,1.1,1.2 |

3 |
8 | 2.4,2,2.4,2,2.8,3.6,2.8,2 | 0.6,0.5,0.44,0.28,0.38,0.49,0.57,0.51 |

4 |
6 | 14,8,8,14,14,17 | 2.4,2,1.76,2.232,1.52,1.8 |

## 4 Conclusions

In this study, energy minimization was examined as a principle that underlies the flow phenomena in single tubes and networks of interconnected tubes. This was demonstrated by using three deterministic (Conjugate Gradient, Nelder-Mead and Quasi-Newton) and one stochastic (Global) multi-variable global optimization algorithms. Seven fluid models (Newtonian, power law, Bingham, Herschel-Bulkley, Ellis, Ree-Eyring and Casson) with different types of network (1D linear, 2D fractal, 2D rectangular, 3D cubic and 3D orthorhombic) were used in this investigation. All the obtained results support the validity and generality of the energy minimization principle. The outcome of this investigation lends more credibility to the previous findings in [5, 6] about this issue; moreover it generalizes the validity of the principle by extending its applicability to more types of fluid which include several widely used non-Newtonian models.

Apart from the obvious theoretical significance of the findings of the previous and current investigations, the optimization algorithms can be used to resolve the pressure and volumetric flow rate fields. Although these algorithms may not be the best in performance, and even in accuracy in some cases, they could have practical applications in the case of very large networks where the use of the traditional methods, which are based on the conservation principles and constitutive relations, is prohibitive due to the requirement of using very large matrices. The role and justification of the use of the optimization algorithms in resolving the flow fields is similar to the role and justification of their use in solving large combinatorial problems, like the Traveling Salesman Problem, where other analytical or conceptually-based methods that rely on direct combinatorial enumeration are not viable or available in those circumstances.

## 5 Nomenclature

indicial parameter in Ellis model | |

rate of shear strain | |

Newtonian viscosity | |

low-shear viscosity in Ellis and Ree-Eyring models | |

shear stress | |

yield stress in Herschel-Bulkley and Casson models | |

shear stress when the viscosity equals in Ellis model | |

characteristic shear stress in Ree-Eyring model | |

shear stress at tube wall | |

viscosity consistency coefficient in Bingham and Herschel-Bulkley models | |

time rate of energy consumption for fluid transport | |

time rate of total energy consumption for fluid transport | |

viscosity consistency coefficient in power law model | |

viscosity consistency coefficient in Casson model | |

tube length | |

number of discrete elements in the fluid conducting device | |

index of power law and Herschel-Bulkley models | |

number of nodal junctions in the fluid conducting device | |

pressure | |

pressure drop across flow conduit | |

volumetric flow rate | |

tube radius |

## References

- [1] A.H.P. Skelland. Non-Newtonian Flow and Heat Transfer. John Wiley and Sons Inc., 1967.
- [2] R.B. Bird; R.C. Armstrong; O. Hassager. Dynamics of Polymeric Liquids, volume 1. John Wiley & Sons, second edition, 1987.
- [3] F.M. White. Viscous Fluid Flow. McGraw Hill Inc., second edition, 1991.
- [4] T.C. Papanastasiou; G.C. Georgiou; A.N. Alexandrou. Viscous Fluid Flow. CRC Press, first edition, 1999.
- [5] T. Sochi. Solving the flow fields in conduits and networks using energy minimization principle with simulated annealing. Submitted, 2014. arXiv:1408.0357.
- [6] T. Sochi. Energy minimization for the flow in ducts and networks. Submitted, 2014. arXiv:1412.1804.
- [7] N. Metropolis; A.W. Rosenbluth; M.N. Rosenbluth; A.H. Teller; E. Teller. Equation of State Calculations by Fast Computing Machines. Journal of Chemical Physics, 21:1087–1092, 1953.
- [8] S. Kirkpatrick; C.D. Gelatt Jr.; M.P. Vecchi. Optimization by Simulated Annealing. Science, 220(4598):671–680, 1983.
- [9] V. Černý. Thermodynamical approach to the traveling salesman problem: An efficient simulation algorithm. Journal of Optimization Theory and Applications, 45(1):41–51, 1985.
- [10] W.H. Press; S.A. Teukolsky; W.T. Vetterling; B.P. Flannery. Numerical Recipes in C++ The Art of Scientific Computing. Cambridge University Press, 2nd edition, 2002.
- [11] C.G.E. Boender; A.H.G. Rinnooy Kan; G.T. Timmer; L. Stougie. A stochastic method for global optimization. Mathematical Programming, 22(1):125–140, 1982.