Metaheuristic to Optimize Computational Convergence in Convection-Diffusion and Driven-Cavity Problems
Abstract
:1. Introduction
2. Paper Case Studies Definition
2.1. The Convection-Diffusion Problem
2.2. The Driven-Cavity Problem
3. Methodology to Find Relaxation Factors with Simulated Annealing
3.1. Simulated Annealing to Accelerate Convergence Time
3.2. Cost Function to Optimize Relaxation Factors
3.3. Strategy to Optimize Relaxation Factors
- Use Equation (10) as a cost function to conduct the SA iterative process.
- Apply small perturbations in the relaxation factors for obtaining neighbor solutions of s.
- Mesh size relaxation: coarse mesh sizes are tested for partial results. For example, if the appropriate mesh size for this problem obtained by a mesh independence analysis is 61 × 61, its value is relaxed with coarse mesh values of 11 × 11 and 41 × 41.
- Residual value relaxation: larger residual values are evaluated for partial results. For example, if the appropriate residual value to achieve problem convergence is ε = 1 × 10−10, its value is relaxed to a larger value of ε = 1 × 10−3.
- At the end of the SA execution, the optimized relaxation factors are obtained. These factors are compared with the appropriate values to evaluate the reduction of the computational convergence time.
3.4. Neighborhood Structure
3.5. Simulated Annealing Algorithm
Algorithm 1. The SA-based algorithm to solve convection-diffusion and driven-cavity problems. |
1. Select an initial control parameter T0 > 0 2. TSA = T0 3. α = Cooling velocity 4. MCL = Neighborhood size 5. Tf = Stop criterion value 6. s = Initial solution (RF) f(s,RF) = Solution cost N(s,RF) = Neighborhood function 7. repeat // External cycle 8. repeat // Internal cycle 9. select s’ ∈ N(s,RF) s’ = Solution with new relaxation factors 10. δ = f(s’,RF) − f(s,RF) 11. if δ < 0 then s = s’ 12. else 13. Generate randomly u ∈ U 14. if then s = s’ 15. end if 16. until reaching MCL 17. TSA = α (TSA) 18. until TSA ≤ Tf |
4. Computational Results
4.1. CASE 1: Convection-Diffusion Problem
4.2. CASE 2: Driven-Cavity Hydrodynamic Problem
5. Conclusions
6. Future Work
Author Contributions
Funding
Conflicts of Interest
References
- Versteeg, H.K.; Malalasekjera, W. An Introduction to Computational Fluid Dynamics-The Finite Volume Method; Prentice: Hoboken, NJ, USA, 2007. [Google Scholar]
- Xamán, J.; Lira, L.; Arce, J. Analysis of the temperature distribution in a guarded hot plate apparatus for measuring thermal conductivity. Appl. Therm. Eng. 2009, 29, 617–623. [Google Scholar] [CrossRef]
- Crivelli, L.A.; Idelsohn, S.R. Numerical methods in phase-change problems. Arch. Comput. Methods Eng. 1994, 1, 49–74. [Google Scholar]
- Brandt, A. Multi-Level Adaptive Solutions to Boundary-Value Problem. Math. Comput. 1977, 31, 333–390. [Google Scholar] [CrossRef]
- Matyka, M. Solution to two-dimensional Incompressible Navier-Stokes Equations with SIMPLE, SIMPLER and Vorticity-Stream Function Approaches. Driven-Lid Cavity Problem: Solution and Visualization. Comput. Phys. Sect. Theor. Phys. 2004, arXiv:physics/0407002, 1–13. [Google Scholar]
- Jafari, A.; Haghighi, A.R. Solution to two-dimensional Incompressible Navier-Stokes Equations with SIMPLE, SIMPLER and Vorticity-Stream Function. Commun. Adv. Comput. Sci. Appl. 2015, 72–82. [Google Scholar]
- Bonilla, J.; Yebra, L.J.; Dormido, S. A heuristic method to minimise the chattering problem in dynamic mathematical two-phase flow models. Math. Comput. Model. 2011, 54, 1549–1560. [Google Scholar] [CrossRef]
- Xamán, J.; Zavala-Guillen, I.; Hernández-López, I.; Uriarte-Flores, J.; Hernández-Pérez, I.; Macías-Melo, E.V.; Aguilar-Castro, K.M. Evaluation of the CPU time for solving the radiative transfer equation with high-order resolution schemes applying the normalized weighting-factor method. J. Quant. Spectrosc. Radiat. Transf. 2018, 208, 45–63. [Google Scholar] [CrossRef]
- Xamán, J.; Hernández-López, I.; Uriarte-Flores, J.; Hernández-Pérez, I.; Zavala-Guillen, I.; Moreno-Bernal, P.; Hinojosa, J.F. X-factor: A modified relaxation factor to accelerate the convergence rate of the radiative transfer equation with high-order resolution schemes using the Normalized Weighting-Factor method. Comput. Phys. Commun. 2018, 231, 72–93. [Google Scholar] [CrossRef]
- Ryoo, J.; Kaminski, D.; Dragojlovic, Z. Automatic Convergence in a Computational Fluid Dynamics Algorithm Using Fuzzy Logic. In Proceedings of the Conference of the Computational Fluid Dynamics Society of Canada, Halifax, NS, Canada, 30 May–1 June 1999. [Google Scholar]
- Dragojlovic, Z.; Kaminski, D.A. A Fuzzy Logic algorithm for acceleration of convergence in solving turbulent flow and heat transfer problems. Numer. Heat Transf. Part B Fundam. Int. J. Comput. Methodol. 2004, 46, 301–327. [Google Scholar] [CrossRef]
- Cortés, M.; Fazio, P.; Rao, J.; Bustamante, W.; Vera, S. CFD modeling of basic convection cases in enclosed environments: Needs of CFD beginners to acquire skills and confidence on CFD modeling. Constr. Eng. Mag. 2014, 29, 22–45. [Google Scholar]
- Xamán, J.; Gijón-Rivera, M. Computational Fluid Dynamics for Engineers; Palibrio: Bloomington, IN, USA, 2016; pp. 29–52, 210–300. (In Spanish) [Google Scholar]
- Patankar, S.V.; Spalding, D.B. A calculate procedure for heat mass y momentum transfer in three-dimensional parabolic flows. Int. J. Heat Mass Transf. 1972, 15, 1787–1806. [Google Scholar] [CrossRef]
- Papadimitriou, C.H.; Steiglitz, K. Combinatorial Optimization: Algorithms and Complexity; Dover Publications: Mineola, NY, USA, 1998; pp. 150–200. [Google Scholar]
- Aarts, E.H.L.; Lenstra, J.K. Local Search in Combinatorial Optimization, 2nd ed.; Princeton University Press: Princeton, NJ, USA, 2003; pp. 100–150. [Google Scholar]
- Kirkpatrick, S.; Gelatt, C.D.; Vecchi, M.P. Optimization by Simulated Annealing. Science 1983, 220, 671–680. [Google Scholar] [CrossRef] [PubMed]
- Johnson, D.S.; Aragon, C.R.; McGeoch, L.A.; Schevon, C. Optimization by Simulated Annealing: En experimental evaluation, Part I, Graph Partitioning. Oper. Res. 1989, 37, 865–892. [Google Scholar] [CrossRef]
- Metropolis, N.; Rosenbluth, A.W.; Rosenbluth, M.N.; Teller, A.H. Equation of state calculation by fast computing machines. J. Chem. Phys. 1953, 21, 1087–1091. [Google Scholar] [CrossRef] [Green Version]
- Rayward-Smith, V.J.; Osman, I.H.; Reeves, C.R.; Smith, G.D. Modern Heuristics Techniques, 2nd ed.; Wiley: New York, NY, USA, 1996; pp. 1–25. [Google Scholar]
- Dowsland, K.A.; Díaz, B.A. Heuristic design and fundamentals of the Annealing, Artificial Intelligence. Iberoam. J. Artif. Intell. 2003, 7, 93–102. [Google Scholar]
- Martínez-Oropeza, A. Solution to the Problem of Parallel Machines Not Related by an Ant Colony Algorithm. Master’s Thesis, Autonomous University of Morelos State (UAEM), Morelos, Mexico, August 2010. (In Spanish). [Google Scholar]
- Ghia, U.; Ghia, K.N.; Shin, C.T. High-Re Solutions for Incompressible Flow Using the Navier-Stokes Equations and a Multigrid Method. J. Comput. Phys. 1982, 48, 387–411. [Google Scholar] [CrossRef]
- Cruz-Chávez, M.A.; Peralta-Abarca, J.D.; Cruz-Rosales, M.H. Cooperative Threads with Effective-Address in Simulated Annealing Algorithm to Job Shop Scheduling Problems. Appl. Sci. 2019, 9, 3360. [Google Scholar] [CrossRef] [Green Version]
- Sanvicente-Sánchez, H.; Solís, J.F. A Methodology to Parallel the Temperature Cycle in Simulated Annealing. In Mexican International Conference on Artificial Intelligence; Cairó, O., Sucar, L.E., Cantu, F.J., Eds.; Springer: Berlin/Heidelberg, Germany, 2000; Volume 1793, ISBN 978-3-540-67354-5. [Google Scholar]
Metallurgy | Combinatorial Optimization | Heat Transfer Problem |
---|---|---|
Configuration | Feasible solution | The heat transfer problem solution complies with the constraint satisfaction model |
Energy configuration | Solution cost | Convergence time in the solution of the heat transfer problem |
Minimum energy | Minimum value obtained with the objective function | Minimum convergence time (tconv) based on the discrete equation of grouped coefficients and proposed relaxation factors. Equation (6) |
Fundamental configuration | Optimal solution | Relaxation factors that obtain the minimum value of |
Temperature | Control parameter TSA | Control parameter TSA |
Thermodynamic equilibrium | Markov chain length MCL, in each Metropolis cycle (Met i), with i = 1 to MCL | Neighborhood size defining the number of neighboring solutions. |
Temperature decrement | Control coefficient α | Control coefficient decrementing TSA |
Final temperature | Stopping criterion | Stopping criterion, the minimum value reaching TSA |
Metastable state | Optimal local | Local optimal solution obtained using relaxation factors to optimize tconv. |
Steady state | Global optimal solution | Global optimal solution obtained using relaxation factors to optimize tconv. |
RF (Relaxation Factor) | Time (s) | Iterations | Maximum Error | |
---|---|---|---|---|
0.5 | 0.1 | 2.615 | 377 | 9.1 × 10−11 |
0.9 | 0.1 | 0.685 | 80 | 9.6 × 10−11 |
0.4 | 1 | 3.22 | 526 | 9.9 × 10−11 |
0.5 | 1 | 2.338 | 363 | 8.73 × 10−11 |
0.9 | 1 | 0.597 | 71 | 7.6 × 10−11 |
0.4 | 10 | 3.181 | 523 | 9.9 × 10−11 |
0.5 | 10 | 2.304 | 362 | 8.2 × 10−11 |
0.9 | 10 | 0.526 | 70 | 7.8 × 10−11 |
Parameter | Value |
---|---|
T0 | 2.00 |
Tf | 0.01 |
MCL | 2.00 |
α | 0.965 |
No. | RFT | tconv | No. | RFT | tconv |
---|---|---|---|---|---|
1 | 0.967 | 0.013 | 16 | 0.928 | 0.016 |
2 | 0.990 | 0.010 | 17 | 0.921 | 0.016 |
3 | 0.975 | 0.011 | 18 | 0.925 | 0.017 |
4 | 0.976 | 0.012 | 19 | 0.930 | 0.015 |
5 | 0.971 | 0.013 | 20 | 0.870 | 0.022 |
6 | 0.880 | 0.020 | 21 | 0.854 | 0.024 |
7 | 0.889 | 0.019 | 22 | 0.860 | 0.023 |
8 | 0.876 | 0.020 | 23 | 0.831 | 0.026 |
9 | 0.897 | 0.018 | 24 | 0.858 | 0.023 |
10 | 0.900 | 0.018 | 25 | 0.859 | 0.023 |
11 | 0.831 | 0.025 | 26 | 0.844 | 0.025 |
12 | 0.880 | 0.021 | 27 | 0.849 | 0.024 |
13 | 0.908 | 0.018 | 28 | 0.910 | 0.019 |
14 | 0.903 | 0.019 | 29 | 0.913 | 0.018 |
15 | 0.910 | 0.017 | 30 | 0.920 | 0.017 |
Mesh | Without Optimizing RFT | tconv | SA RFT | tconv | % Improvement |
---|---|---|---|---|---|
11 × 11 | 0.2 | 0.003 | 0.66 | 0.001 | 67 |
41 × 41 | 0.2 | 0.137 | 0.99 | 0.010 | 93 |
61 × 61 | 0.2 | 0.258 | 0.78 | 0.027 | 81 |
Mesh | Without Optimizing RFT | tconv | SA RFT | tconv | % Improvement |
---|---|---|---|---|---|
61 × 61 | 0.4 | 0.208 | 0.66 | 0.084 | 60 |
61 × 61 | 0.4 | 0.208 | 0.88 | 0.034 | 83 |
61 × 61 | 0.4 | 0.208 | 0.78 | 0.054 | 74 |
tconv | Maximal Error Found to Each Variable | ||||||
---|---|---|---|---|---|---|---|
0.8 | 0.8 | 0.2 | 0.1 | 4378.92 | |||
0.6 | 0.4 | 0.2 | 0.1 | 1029.28 | |||
0.5 | 0.5 | 0.1 | 0.1 | 864.81 | |||
0.1 | 0.1 | 0.9 | 0.1 | 5020.11 | |||
0.1 | 0.1 | 0.1 | 0.1 | 4289.98 | |||
0.8 | 0.8 | 0.2 | 0.4 | 177.34 | |||
0.6 | 0.4 | 0.2 | 0.4 | 317.04 | |||
0.5 | 0.5 | 0.1 | 0.4 | 592.36 | |||
0.1 | 0.1 | 0.9 | 0.4 | 1389.47 | |||
0.1 | 0.1 | 0.1 | 0.4 | 1256.79 | |||
0.8 | 0.8 | 0.2 | 0.5 | 134.89 | |||
0.6 | 0.4 | 0.2 | 0.5 | 258.83 | |||
0.5 | 0.5 | 0.1 | 0.5 | 701.96 | |||
0.1 | 0.1 | 0.9 | 0.5 | 1098.42 | |||
0.1 | 0.1 | 0.1 | 0.5 | 1256.05 |
Parameter | Value |
---|---|
T0 | 2.00 |
Tf | 0.01 |
MCL | 6.00 |
α | 0.95 |
No. | RFu | RFv | RFp | tconv | No. | RFu | RFv | RFp | tconv |
---|---|---|---|---|---|---|---|---|---|
1 | 0.91 | 0.72 | 0.24 | 0.028 | 16 | 0.97 | 0.85 | 0.27 | 0.023 |
2 | 0.64 | 0.62 | 0.22 | 0.037 | 17 | 0.84 | 0.52 | 0.23 | 0.035 |
3 | 0.89 | 0.88 | 0.43 | 0.034 | 18 | 0.95 | 0.72 | 0.23 | 0.028 |
4 | 0.99 | 0.55 | 0.46 | 0.038 | 19 | 0.69 | 0.89 | 0.22 | 0.032 |
5 | 0.78 | 0.80 | 0.44 | 0.036 | 20 | 0.61 | 0.89 | 0.21 | 0.036 |
6 | 0.92 | 0.64 | 0.61 | 0.035 | 21 | 0.93 | 0.99 | 0.54 | 0.030 |
7 | 0.62 | 0.60 | 0.22 | 0.036 | 22 | 0.91 | 0.95 | 0.55 | 0.024 |
8 | 0.82 | 0.54 | 0.32 | 0.035 | 23 | 0.85 | 0.83 | 0.56 | 0.035 |
9 | 0.97 | 0.99 | 0.53 | 0.029 | 24 | 0.90 | 0.95 | 0.28 | 0.027 |
10 | 0.99 | 0.93 | 0.55 | 0.031 | 25 | 0.86 | 0.40 | 0.41 | 0.037 |
11 | 0.65 | 0.51 | 0.19 | 0.039 | 26 | 0.88 | 0.90 | 0.28 | 0.026 |
12 | 0.85 | 0.75 | 0.17 | 0.030 | 27 | 0.94 | 0.50 | 0.37 | 0.032 |
13 | 0.86 | 0.72 | 0.17 | 0.031 | 28 | 0.92 | 0.48 | 0.38 | 0.034 |
14 | 0.68 | 0.78 | 0.23 | 0.035 | 29 | 0.81 | 0.73 | 0.25 | 0.027 |
15 | 0.93 | 0.79 | 0.24 | 0.026 | 30 | 0.99 | 0.55 | 0.34 | 0.030 |
Mesh | Without Optimizing | SA | % Improvement | ||||||
---|---|---|---|---|---|---|---|---|---|
RFu | RFv | RFp | tconv | RFu | RFv | RFp | tconv | ||
11 × 11 | 0.2 | 0.2 | 0.1 | 0.113 | 0.82 | 0.87 | 0.27 | 0.023 | 80 |
41 × 41 | 0.2 | 0.2 | 0.1 | 2.981 | 0.43 | 0.84 | 0.51 | 0.694 | 76 |
61 × 61 | 0.2 | 0.2 | 0.1 | 12.006 | 0.87 | 0.58 | 0.42 | 1.629 | 86 |
Mesh | Without Optimizing | SA | % Improvement | ||||||
---|---|---|---|---|---|---|---|---|---|
Ru | RFv | RFp | tconv | RFu | RFv | RFp | tconv | ||
61 × 61 | 0.2 | 0.2 | 0.1 | 528.54 | 0.82 | 0.87 | 0.27 | 90.08 | 82 |
61 × 61 | 0.2 | 0.2 | 0.1 | 528.54 | 0.43 | 0.84 | 0.51 | 103.635 | 80 |
61 × 61 | 0.2 | 0.2 | 0.1 | 528.54 | 0.87 | 0.58 | 0.42 | 96.535 | 81 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Enríquez-Urbano, J.; Cruz-Chávez, M.A.; Rivera-López, R.; Cruz-Rosales, M.H.; Labrada-Nueva, Y.; Eraña-Díaz, M.L. Metaheuristic to Optimize Computational Convergence in Convection-Diffusion and Driven-Cavity Problems. Mathematics 2021, 9, 748. https://doi.org/10.3390/math9070748
Enríquez-Urbano J, Cruz-Chávez MA, Rivera-López R, Cruz-Rosales MH, Labrada-Nueva Y, Eraña-Díaz ML. Metaheuristic to Optimize Computational Convergence in Convection-Diffusion and Driven-Cavity Problems. Mathematics. 2021; 9(7):748. https://doi.org/10.3390/math9070748
Chicago/Turabian StyleEnríquez-Urbano, Juana, Marco Antonio Cruz-Chávez, Rafael Rivera-López, Martín H. Cruz-Rosales, Yainier Labrada-Nueva, and Marta Lilia Eraña-Díaz. 2021. "Metaheuristic to Optimize Computational Convergence in Convection-Diffusion and Driven-Cavity Problems" Mathematics 9, no. 7: 748. https://doi.org/10.3390/math9070748
APA StyleEnríquez-Urbano, J., Cruz-Chávez, M. A., Rivera-López, R., Cruz-Rosales, M. H., Labrada-Nueva, Y., & Eraña-Díaz, M. L. (2021). Metaheuristic to Optimize Computational Convergence in Convection-Diffusion and Driven-Cavity Problems. Mathematics, 9(7), 748. https://doi.org/10.3390/math9070748