Metaheuristic to Optimize Computational Convergence in Convection-Diffusion and Driven-Cavity Problems

: This work presents an optimization proposal to better the computational convergence time in convection-diffusion and driven-cavity problems by applying a simulated annealing (SA) meta-heuristic, obtaining optimal values in relaxation factors ( RF ) that optimize the problem convergence during its numerical execution. These relaxation factors are tested in numerical models to accelerate their computational convergence in a shorter time. The experimental results show that the relaxation factors obtained by the SA algorithm improve the computational time of the problem convergence regardless of user experience in the initial low-quality RF proposal.


Introduction
In the present day, Computational Fluid Dynamics (CFD) is a powerful tool for analyzing and understanding various physical phenomena occurring in nature and in industrial processes, which are objects of study in various fields of research. Generally, the numerical solution of fluid flow, heat transfer and mass problems require an iterative process, mainly due to their nonlinearity. In particular, for the development of computational simulations in mechanical engineering, it is necessary to solve a set of partial differential equations (PDE) using numerical techniques such as finite-difference, finite-element and finite-volume methods. These methods convert a PDE to an algebraic equation system in a discrete domain and find an approximate solution to the original problem. For example, to simulate fluid-flow phenomena, or heat and mass transfer issues, they are first modeled as nonlinear problems and then solved using iterative processes [1]. These processes commonly require high computational resources using robust convergence criteria, allowing them to find a solution that satisfies the problem conditions. One of the most commonly used criteria is to verify that the difference between the current and the previous solution is minimal. Furthermore, the rate-of-change of the dependent variable (velocity, pressure or temperature, for example) in the iterative process can be modified using over-relaxation if this rate is accelerated or under-relaxation if it is reduced. In particular, under-relaxation is very useful to solve nonlinear problems since it avoids iterative process divergence.
The study of the convergence properties of discretization-based methods to solve nonlinear problems is essential to design effective procedures to reach solution in acceptable times. The design of efficient techniques and algorithms solving complex optimization problems has become one of the most important engineering research fields. Moreover, the computational costs (spatial and temporal) are critical factors that must be addressed other hand, an amount closest to one accelerates the solution convergence, but it may tend to diverge. In these cases, the use of heuristics and metaheuristics are viable alternative approaches to solve these problems since they use computational resources efficiently.
To the best of our knowledge, no proposals have been found that optimize the convergence time for convection-diffusion and driven-cavity problems with computational heuristics. The closest study found in the existing literature was that using fuzzy logic. It is clear that with the use of heuristics it is no longer necessary to have experience in proposing good relaxation factors empirically.
The works presented in this introduction are the only works that are close to the research presented in this one.
In this paper, a simulated annealing-based approach to optimize relaxation factors and improve computational convergence in solving Convection-Diffusion and Driven-Cavity problems is described. These relaxation factors are used as input data to apply under-relaxation in the numerical methods solving Convection-Diffusion and Driven-Cavity problems. Experimental results show that the computational convergence time is improved by up to 70% compared with tests carried out with the relaxation factors applied without first optimizing them with simulated annealing. The present work only focuses on the study to increase the convergence of Convection-Diffusion and Driven-Cavity problems. This work aims to present a heuristic goal to improve the convergence time in convection-diffusion and driven-cavity problems without having the experience of empirically proposing good relaxation factors. The main contribution is the adaptation of the heuristic goal of the simulated annealing (SA) algorithm to find relaxation factors in convection-diffusion and driven-cavity problems, so as to improve the convergence of these problems. No similar method to the one proposed in this work has been found in the literature.
The rest of this paper is organized as follows: Section 2 describes the physical and mathematical models of the two problems addressed in this work. Section 3 presents the proposed methodology to find the optimized relaxation factors helping solve these problems with a reduction in the computational convergence time. Section 4 shows the experimental results in which it is verified that the use of a simulated-annealing-based approach obtains relaxation factors reducing the computational convergence time in the problem convergence. Finally, Section 5 shows the conclusions derived from this work.

Paper Case Studies Definition
Two fluid-dynamics problems are evaluated: The Convection-Diffusion and the Driver-Cavity problems. In the first one, the temperature is the dependent variable, and since the velocities are considered constant, only one relaxation factor is utilized. In the second one, the variables are the velocities and the pressure, so in this case, three relaxation factors are needed.

The Convection-Diffusion Problem
This section shows an example to determine the temperature variation in a transient state, T(x, y, t), in a two-dimensional domain, with constant properties: ρ = 2702 kg/m 3 , C p = 903 J/kg • C, and λ = 237 W/m • C. It is considered that (1) the variable is transported by heat convection and conduction, and that through the dimensional medium, there is no heat generation, and (2) the velocity components (u,v) are constant at any point in the physical domain with: u = 2 m/s and v = 2 m/s. The medium is geometrically square with a length of one meter H = 1 m, subject to boundary conditions, as shown in Figure 1. For the diffusion convection problem, only the heat equation is solved. The mathematical model for case 1 presents the general convection-diffusion equation for the variable of interest ∅ in the Cartesian system (Equation (1)). In this case, the variable of interest is the temperature (T) (Equation (2)). By using the finite volume technique, the discretization of the proposed mathematical problem is carried out, which is presented in (Equation (3)) as the discrete equation in grouped coefficient notation [13].

∂(ρ∅) ∂t
where ∆x * ∆y ∆t , and b = a 0 p T 0 p . The function A(|Pe e |) is a function depending on the numerical scheme that is being used, in this case power law, where D e , D w , D n , D s are diffusive flows in the interface of the control volume; F e , F w , F n , F s are convective flows; a E , a W , a N , a S are the coefficients of the discretized equation and b is the source term. The power law scheme uses an exponential approximation, which improves the accuracy of the method at a lower computational cost [13].

The Driven-Cavity Problem
The physical model of the hydrodynamic problem with its boundary conditions is shown in Figure 2. It is a laminar and incompressible flow regime in a square cavity. The fluid has µ = 1.817 × 10.5 kg/(m s), and ρ = 1.2047 kg/m 3 . The cavity size is H x = H y = 1 m, and its upper wall moves with a uniform velocity U 0 = 1.508 × 10 −3 m/s, corresponding to a Reynolds number of 400. The Driven-Cavity Problem is commonly used as a test case because of its nonlinearity property. It can present instability when looking for a numerical solution, and to reach convergence requires extensive modeling experience. In fluid dynamics problems, velocity components and a pressure gradient are involved. The equations governing the hydrodynamic phenomenon are the mass and momentum conservation equations (Equations (4)-(6) with Fx = Fy = 0) to couple the pressure variable's determination to resolve the hydrodynamic equations. In [13,14], they proposed the SIMPLE algorithm to solve the two-dimensional case for a Newtonian and incompressible fluid in a laminar regime. The resulting equations, adapted from the general convection-diffusion equation (Equation (1)), are the mass equation (Equation (4)), the Momentum equation u (Equation (5)), and the Momentum equation v (Equation (6)), where ρ is the density of the medium, u and v are the speed components, t is the time and µ is the dynamic viscosity. By using the finite volume technique, the discretization of the proposed mathematical model is performed, and the result is represented in Equation (7) as the discrete equation in grouped coefficient notation [13,14], where a E = ρ e d u e ∆y, a W = ρ w d u w ∆y, a N = ρ n d v n ∆x, a S = ρ s d v s ∆x, a P = a E + a W + a N + a S + a 0

∂(ρ) ∂t
Using the finite volume technique, the discretization of the proposed mathematical model is as follows: a P P P = a E P E + a W P W + a N P N + a S P S + b To solve the Driven-Cavity hydrodynamic problem, in this work the SIMPLE algorithm presented in [14] is used.

Methodology to Find Relaxation Factors with Simulated Annealing
An optimization problem is one whose goal is to find a solution s ∈ S with a minimum cost value f(s) ∈ R, where S is a finite set of candidate solutions and f is the objective function f :S → R, which assigns a value representing the quality of each s. In particular, s * is the optimum global, if f (s *) ≤ f (s), ∀s ∈ S. For this work, each s is built utilizing the proposed values for the relaxation factors, and f (s) represents the convergence time obtained for s. Then, to determine more appropriate relaxation factor values to reach minimal convergence time in solving fluid-dynamics problems, a simulated annealing (SA) algorithm is used, since it is an effective metaheuristic to find a near-optimal solution to complex optimization problems in a reasonable time.

Simulated Annealing to Accelerate Convergence Time
The SA algorithm is one of the most widely used metaheuristics to solve complex optimization problems [15,16]. It is inspired by the metal annealing process used in industry, where the material properties are altered, until they reach an optimal state, by controlling the temperature [17,18]. The annealing process begins with heating the material to a high temperature and then cooling it slowly, maintaining a constant temperature at each stage for a specific time, thereby achieving the material's best physical configuration. The SA algorithm uses the procedure proposed by Metropolis [19] to simulate the cooling process and carry out local searches and, to escape local optimums, allows some worse movements. Table 1 shows the analogy between metallurgy concepts, combinatorial optimization and the heat transfer problem raised in this work. Table 1. Analogy between the simulated annealing process in metallurgy and simulated annealing in combinatorial optimization. Local optimal solution obtained using relaxation factors to optimize t conv .

Steady state Global optimal solution
Global optimal solution obtained using relaxation factors to optimize t conv .

Cost Function to Optimize Relaxation Factors
If relaxation factors are incorporated in the discretized Equations (3) and (7), the following equation is obtained: The goal is to minimize the convergence time of Equation (8). The adequate configuration of relaxation factors values, by increasing or decreasing them, generates the solution in a reduced time. For each iteration of the Metropolis cycle (Met i, with i = 1 to MCL) in the SA algorithm, a candidate solution s is obtained using equation (8) with the relaxation factors (RF) from a neighborhood structure described below. When solving the problem, there is a convergence time t conv , defined as follows: The objective function minimizing the convergence time is as follows:

Strategy to Optimize Relaxation Factors
The SA algorithm helps find the best configuration for different relaxation factors minimizing the problem of convergence times. In the first problem, a relaxation factor is sought for temperature, while in another three relaxation factors are needed, one for pressure and the remaining for each velocity component, u and v. By having the best relaxation factor values, it is possible to accelerate the convergence time to solve the convection-diffusion and driven-cavity problems.
The methodology steps for reducing the convergence time utilizing the SA algorithm are the follows:

1.
Use Equation (10) as a cost function to conduct the SA iterative process.

2.
Apply small perturbations in the relaxation factors for obtaining neighbor solutions of s.

3.
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. 4.
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 .

5.
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.

Neighborhood Structure
The theory of the SA algorithm shows that, for it to work correctly, any solution must be reached from any other through a series of valid disturbances or movements [20,21]. The neighbourhood of a candidate solution s, named N(s), is the set of possible new solutions generated by applying small perturbation in s. For this work, the perturbations are applied to the relaxation factors to reduce convergence time and to reach a problem solution. An important decision in the SA algorithm is the neighborhood structure definition, i.e., the way to establish a new solution (a type of disturbance). The SA theoretical results show that it is enough to demand that any solution can be reached from another solution through a series of valid movements called perturbations, or movements [21,22]. For this work, the neighborhood structure does not perform disturbances since it chooses a decreased or increased value of ±0.02 (value obtained through a sensitivity analysis of this parameter based on the value of the valid interval of 0 < RF < 1.). The 0.02 tuned value allows a fast SA convergence without being trapped in a low-quality optimal local solution. For example, if the value is decreased from 0.02 to 0.002, the SA is slower to find an optimal time of convergence, according to the RF found with SA for the convection-diffusion and driven-cavity problems analyzed in this work. If more than one relaxation factor is disturbed, one of them is first selected at random, and then it is updated, leaving the rest unchanged.

Simulated Annealing Algorithm
Algorithm 1 presents the implementation of the SA-based approach to finding a near-optimal configuration of the relaxation factors to solve convection-diffusion and driven-cavity problems. At first, the algorithm diversifies the search by accepting better or worse solutions interchangeably, but, as the iterative process progresses, it is increasingly challenging to accept worse solutions, due to the SA acceptance criterion. Algorithm 1. The SA-based algorithm to solve convection-diffusion and driven-cavity problems.

Select an initial control parameter
repeat // External cycle 8.
First, the initialization steps are carried out in lines 1-6. The value of the control parameter T 0 must ensure a high probability of accepting worse movements initially. This value is obtained by identifying the best value positively influencing the solution quality [23]. T SA is the variable controlling the SA external cycle, α is the coefficient used to adjust T SA in each iteration, T f represents the stop criterion value and s is the initial candidate solution. Furthermore, the Markov Chain Length (MCL) is used to control the SA internal cycle, allowing a stable state to be reached for each T SA value. The neighborhood size is MCL = NF × CN, where NF is the number of relaxation factors and CN is the number of factor changes. In this work, two changes are used: increasing and decreasing a relaxation factor.
The SA external cycle is implemented in lines 7-18. It includes the internal cycle and the decrease of T SA until it reaches the stop value. The SA internal cycle is shown in lines 8-16, which is controlled by the MCL value. First, a neighbor solution s' is computed according to the neighborhood structure, its cost value f (s',RF) is calculated, and the difference between the current solution cost value is obtained. Lines 11-15 define the acceptance criterion for a new solution. If s' improves the solution cost, it replaces s. Otherwise, an s' is accepted as the current solution using Boltzmann's probability function. This acceptance criterion allows for the escape from one optimum local, which makes SA more efficient. It is important to emphasize that with acceptance probability having high T SA values, most of the neighboring solutions are accepted, and for low T SA values, worse movements are rejected.

Computational Results
This computational study was carried out on a computer with Intel Core i7-3612QM 2.10 GHz CPUs and 8 GB RAM, using a 64-bits Windows 7 SO, and Visual C++ 2010.
The results could not be compared with previous works because no techniques were found proposing to improve convergence for convection-diffusion and driven-cavity problems. The closest approach found in the existing literature to improve these problems' convergence were techniques using Reynolds numbers and mesh size. In our case, the convergence acceleration depends only on finding the optimal RF. Figure 3 shows the mesh independence analysis for the problem convergence, where it is observed that after the 101 × 101 mesh, qualitative differences are minimal. This case can be verified qualitatively in [13], where is shown the exact solution of the problem.  Table 2 shows the convection-diffusion problem analysis where the RFs that help to converge the solution more efficiently are varied. It is observed that the best results are obtained when the value of both parameters is the highest (RF and ∆t). Convergence analysis is observed in time when the parameters that help to converge the solution more efficiently to an adequate ∆t of time are changed. Table 3 shows the tuned values of the SA control parameters for the Convection-Diffusion problem.   Figure 4 shows the sensitivity analysis for Table 3 values. The acceptance probability concerning the number of SA iterations for the convection-diffusion problem, and one uniform distribution of the worse solutions through the algorithm execution at equal iteration intervals, are shown. It is observed that in the 90-100 probability interval, the number of worse solutions is small, unlike for the 0-10 range, where the number of these solutions is high. In Figure 4, each red point represents a solution generated by the Convection-diffusion problem in each SA iteration. The time it takes for SA to run is approximately 14 min, applying a mesh and relaxed to the Convection-diffusion problem. The convergence time of the convection-diffusion problem (Equation (10)) is evaluated as the SA cost function. These values indicate that the number of worse solutions accepted during the entire execution of SA is minimal compared to the number of better solution accepted. When SA begins to iterate the probability of accepting worse solutions, it decreases until reaching the convergence in iteration 105 where the acceptance rate of worse solutions is not more than 10%. Then, at the end of the SA execution, this process stabilizes the search of solutions improving the current solution. It is essential to accept some worse solutions at the beginning of the SA algorithm so that the search process escapes from optimum locals and allows finding better solutions at the end of its execution. With SA's behavior presented in Figure 3, the quality of the tuned parameters shown in Table 3 is verified.

CASE 1: Convection-Diffusion Problem
Since SA is a stochastic method, it is necessary to analyze results with a minimum of 30 executions for each problem, and for each of the relaxed factors. Table 4 shows the convection-diffusion problem results, with a 41 × 41 mesh and a residual value of ε = 1 × 10 −5 . The optimized relaxation factor for the temperature (RF T ) and the convergence time (t conv ) are also displayed. The range obtained is for 30 executions of t conv is 0.025 s, with 0.01, 0.026 and 0.019 s as minimum, maximum and average times, respectively. The mode and the standard deviation are 0.018 and 0.00435 s. With these results, it is clear that the convergence time of the 30 tests does not reach any high values, having good behavior according to the standard deviation.  Figure 5 shows the t conv behavior concerning RF T shown in Table 3. With a leastsquares approximation, it is observed that there exists an inversely proportional relationship, i.e., if RF T increases, t conv decreases. But many points enclosed by red circles show that with a small decrease in RF T , t conv tends to increase, which indicates that a directly proportional trend is not followed. It is important to clarify that Figure 5 shows the relaxation factors optimized by the SA algorithm in the 0.83-0.99 interval. The behavior in a range inferior to 0.83 may be different. For example with an RF T = 0.01, the convergence time in the convection-diffusion problem is 169.13 s, which shows that there is no linear regression behavior in the data.  Table 5 shows the convection-diffusion problem's t conv results with the RF T values found by the SA algorithm. Three tests are carried out for different mesh sizes and a relaxed residual value of ε = 1 × 10 −5 . The best values found are compared with the RF T without optimizing. It is observed that for each mesh size, t conv is improved by more than 60% using the RF T found by SA, reaching above 90% with a 41 × 41 mesh. By comparing the worst time found by SA (Table 3), which is 0.026 s, in Table 5 is it shown that for a 41 × 1 mesh, t conv continues to improve above 80%. This indicates that any SA solution is efficient in reducing the t conv of the convection-diffusion problem. The RF value without optimizing presented in Table 5 is the initial value that SA uses in f (s,RF) of Equation (10). This value is taken to demonstrate that SA can optimize RF to reduce the convergence time of the convection-diffusion problem because an RF was not found in the literature to make a comparison with the results obtained in this work. Table 5 shows that SA can achieve very good RF values that improve the problem's convergence time, starting from a very bad RF value. The literature indicates that SA efficiently optimizes its cost function, regardless of the initial solution's quality. The best three RF T values found by the SA algorithm are taken from Table 4, and are evaluated with an unrelaxed 61 × 61 mesh and one unrelaxed residual value of ε = 1 × 10 −10 . The results are compared with the RF T without optimizing and they are shown in Table 6, where it is observed that for the first test using the RF T found by SA, there is a 60% improvement in t conv , while in the remaining two cases there is an improvement of more than 70%. The average time of the SA algorithm to get the optimal RF T with the residual value of ε = 1 × 10 −5 and relaxed 41 × 41 mesh is 0.1135 s. As is shown in Table 6, this time is higher than the t conv obtained using the optimized RF and the unrelaxed residual value of ε = 1 × 10 −10 and the unrelaxed 61 × 61 mesh, but it is less than the t conv used with the RF T without optimizing. For example, when applying the optimized RF T of 0.66, the solution converges in 0.085 s. If the average time used to obtain this RF T is added, the total time applied to solve the problem is 0.1985 s. This result continues to be less than the times obtained when using the RF T without optimizing presented in Table 6. Figure 6 presents the mesh independence study. It can be observed that it is possible to work with a 61 × 61 mesh since its changes are not significant. A larger mesh naturally implies a higher computational cost.  Table 7 shows the Driven-cavity hydrodynamic problem analysis, where the RFs help to a more efficient solution convergence. It is observed that there is no clear behavior in the results showing the best values (RF) giving a better convergence. The convergence analysis is observed in time where the parameters that help to converge the solution more efficiently to an adequate ∆t of time are changed. The obtained errors in the problem convergence are also shown.  Table 8 shows the tuned values of the SA control parameters for the Driven-Cavity problem. Table 8. Tuned values of the SA parameters for the driven-cavity problem.

Parameter Value
T 0 2.00 T f 0.01 MCL 6.00 α 0.95 Table 9 shows the thirty executions of the SA algorithm with an 11 × 11 mesh and a residual value of ε = 1 × 10 −5 . The optimized RFs and the convergence time obtained from the Driven-Cavity problem are displayed. The range obtained in the tests concerning the t conv is 0.016 s, with 0.023, 0.039 and 0.032 s as minimum, maximum, and average times. The mode and standard deviation are 0.035 and 0.00438 s. It is observed that the convergence times of the 30 executions for the driven-cavity problem do not reach any high values and have good behavior according to the standard deviation. Table 9. Executions performed by SA for an 11 × 11 mesh and a residual value of ε = 1 × 10 −5 , for the driven-cavity problem.

No.
RF  Figure 7 shows the t conv behavior concerning the three RF presented in Table 9. The convergence time (t conv × 10 −3 ) is shown as a label for each coordinate (RF u , RF v and FR p ). It is observed that the t conv presents a slight tendency to decrease when the relaxation factors increase, but this behavior is not entirely proportional as it happens in the first problem. The best t conv appears as a red circle, and a blue circle represents the worst t conv . There are high convergence times with large values in the relaxation factors, and it is observed that the convergence value (yellow circle) that is most repeated (the mode value) is where the relaxation factors have small values and where some have large values. These values indicate that proportionality behavior for this problem cannot be inferred.  Table 10 shows the t conv values with the relaxation factors found by SA. Three tests are carried out for different mesh sizes and a relaxed residual value of ε = 1 × 10 −5 . The best values found by SA are compared with the RF without optimizing. It is observed that for each mesh size, t conv is improved by more than 70% using the RFs found by SA, reaching above 85% with a 61 × 61 mesh. By comparing the worst time of 0.039 s found by SA, in Table 10 is observed that for an 11 × 11 mesh, t conv improves above 65%. These results are very similar to those reached with the first case study, and demonstrate that the SA algorithm is an effective approach to reduce the convergence time for this class of problems.
The RF values without optimizing presented in Table 10 is the initial value that SA uses in f (s,RF) of Equation (10). This value is taken to demonstrate that SA can optimize RF to reduce the convergence time of the driven-cavity problems because an RF was not found in the literature to make a comparison with the results obtained in this work. Table 10 shows that SA can achieve very good RF values that improve the problem's convergence time, starting from a very bad RF value. The literature indicates that SA efficiently optimizes its cost function, regardless of the initial solution's quality.  Figure 8 presents the behavior of each internal cycle of the SA algorithm concerning the t conv value of the Driven-Cavity problem. For each cycle (Met) with a constant T SA value, a fixed number of solutions are evaluated. It is observed that as the temperature of each cycle is low, the t conv is reduced. When SA reaches its cooling point, the shortest t conv is achieved. For example, a t conv between 470 to 500 s is required by the Met-1 cycle, but between 150 to 200 s by the Met-7 cycle. These values verify that when applying the SA algorithm, it reduced convergence time of the problem, and although short times were evaluated, it is important to remember that the SA tests were carried out for relaxed values of the problem (mesh size and residual value).   Table 8, for the different mesh sizes with the proposed RFs and those obtained with the SA algorithm. t conv is compared concerning the number of iterations required to solve the Driven-Cavity problem. It is observed that when comparing the different mesh sizes and relaxation factors, the computational time needed to solve the problem varies. When the RFs found by SA are used, the t conv is improved, decreasing the number of iterations required to obtain a solution for each mesh size. The behavior is opposite when using the RFs values without optimizing, since t conv increases considerably, and the number of iterations used, with an unrelaxed 61 × 61 mesh.  Table 11 presents the results of the Driven-Cavity problem using the RFs optimized by the SA algorithm. These factors are used without relaxing the mesh size and the residual value, and the results are compared with those obtained in the problem applying RFs without optimizing. The optimized RFs offer a significant improvement in convergence, since the computation time is reduced by up to 70% compared to those proposed without optimizing. Even with a very relaxed mesh, such as the 11 × 11 mesh for the SA tests (Table 9), it is observed that very good convergence times are obtained for the Driven-Cavity problem (Table 11) when the RFs shown in Table 9 are used without the relaxed mesh size and residual value. The average time of the SA algorithm to obtain the three optimal RFs with a residual value of ε = 1 × 10 −5 and a relaxed 11 × 11 mesh is 0.2916 s. As seen in Table 11, this time is less than the t conv obtained using the unrelaxed parameters residual of ε = 1 × 10 −10 and a 61 × 61 mesh. This allows optimization of RFs, improving the convergence time of the problem in very short times. For example, when applying the optimized RFs (0.43, 0.84, 0.51), the solution converges at 103.635 s, and the total time to solve the problem is 103.9266 s. This result is less than those obtained with the RF values without optimizing presented in Table 11. Figures 10 and 11, show the results obtained for the Driven-Cavity problem's velocity components concerning the reference [23]. The results shown are obtained based on the relaxation factors optimized by the SA algorithm. The continuous line represents the present work results, and the points in red are those obtained by reference [23]. It is observed that the behavior by the velocities within the problem is very similar. Here u and v are velocities in x and y respectively. The variables because they are in an iterative process represent estimated values, so to denote this the symbol * is added (u*, v*, x*, y*).

Conclusions
It is concluded that the proposed methodology using the SA algorithm is an effective alternative to find the optimized relaxation factors helping to reduce the computational convergence time of the two studied problems, the Convection-Diffusion and the Driven-Cavity problems, since each of the 30 executions of SA present excellent results for each one. This implies that with a single execution of the SA algorithm, well-optimized relaxation factors can be found, reducing the computational convergence time in these problems. The Convection-Diffusion problem results show that the convergence time is improved to more than 60% using the relaxation factors found by SA, compared with the results obtained using RF without optimizing.
For the Driven-Cavity problem, using the best configuration of the three relaxation factors found by the SA algorithm, the computational time improvement is up to 80% compared with the factors without optimizing. With heuristics, it is possible to find suitable factors without the need for expertise, whereas an empirical approach requires expertise on the part of the investigator.
The convergence times in both problems do not show proportional behavior clearly. What they do show is that when a small increase or decrease is made in a relaxation factor, the convergence time can increase or decrease and, in the Driven-Cavity problem that uses three relaxation factors, this conclusion becomes more visible. This convergence behavior based on relaxation factors confirms what is presented in the literature. Therefore, it can be affirmed that the SA algorithm is an effective technique to reduce the computational convergence time of problems involving CFD studies.
It also observed that with a relaxed 11 × 11 mesh, improved relaxation factors are still obtained to solve the Driven-Cavity problem, and result in reduced computational convergence times than those without relaxing any parameters. This allows SA to find optimized relaxation factors in very short times.
According to the time required by the SA algorithm to obtain the optimized relaxation factors for each of the Convection-Diffusion and Driven-Cavity problems, SA use is a very attractive approach. This is better observed in the Driven-Cavity problem, since the reduction in convergence time added to the time that SA needs to obtain the optimized relaxation factors, allows a very good reduction in convergence time to find the solution.
The present work's contribution is to implement a technique to find the optimal RF to improve the convergence of the convection-diffusion and driven-cavity problems. Other authors do not do this and focus more on working with mesh sizes and of Reynolds numbers, or use an under-relaxation scheme with fuzzy logic.

Future Work
To reduce the time in which the optimized relaxation factors of the Driven-Cavity problem are obtained, work will be done to parallelize the SA algorithm using parallelization independent of SA, generating multiple executions of SA in parallel as applied in [24], or performing a parallelization of the metropolis cycle as applied in [25]. Either of the two parallelization techniques used will allow a reduction in SA execution time of over 80%, when using 10 central processing units for the execution of the SA algorithm designed to work in parallel. These techniques can be implemented in SA for any type of problem transparently, regardless of whether they are nonlinear or linear problems, with special characteristics such as discrete or continuous optimization.