Next Article in Journal
A Fuzzy QFD-Based Methodology for Systematic Generation IT Project Management Plan and Scope Plan Elements
Next Article in Special Issue
Contribution-Driven Task Design: Multi-Task Optimization Algorithm for Large-Scale Constrained Multi-Objective Problems
Previous Article in Journal
Millimeter-Wave Radar and Mixed Reality Virtual Reality System for Agility Analysis of Table Tennis Players
Previous Article in Special Issue
Decision Support for Cargo Pickup and Delivery Under Uncertainty: A Combined Agent-Based Simulation and Optimization Approach
error_outline You can access the new MDPI.com website here. Explore and share your feedback with us.
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Mechanical Optimizations with Variable Mesh Size, Using Differential Evolution Algorithm

by
David Robledo-Jimenez
1,
Carlos Gustavo Manriquez-Padilla
1,2,
Arturo Yosimar Jaen Cuellar
1,
Angel Perez-Cruz
1,2 and
Juan Jose Saucedo-Dorantes
1,2,*
1
Engineering Faculty, San Juan del Rio Campus, Autonomous University of Queretaro, Rio Moctezuma 249, San Juan del Rio 76807, Mexico
2
C.A. Mechanical and Automotive Systems Applied to the Management of Conventional and Alternative Energies (UAQ-CA-155), Autonomous University of Queretaro, San Juan del Rio 76806, Mexico
*
Author to whom correspondence should be addressed.
Computers 2026, 15(1), 29; https://doi.org/10.3390/computers15010029
Submission received: 22 November 2025 / Revised: 24 December 2025 / Accepted: 28 December 2025 / Published: 6 January 2026
(This article belongs to the Special Issue Operations Research: Trends and Applications)

Abstract

Structural problems are a common topic among several optimization works; with the use of finite element analysis (FEA), the aim of these works is to improve the mechanical behavior of the distinct elements or bodies involved in these optimization problems. However, the impact of the meshing discretization on the outcome of the optimization process has not been studied in previous works. The present work investigates the effect of mesh element size on the mechanical optimization of two cases of study; the first one is about a modal optimization on a cantilever beam, and the second one is about a cellular beam, where the aim is to reduce the weight of the beam under static load. In these two optimization problems, variables commonly used in the literature were employed, while additionally including the mesh size as an extra variable. The computational framework is implemented on MATLAB R2022a, and the modal and weight optimizations are carried out through APDL (ANSYS Parametric Design Language) executed in batch mode. The results demonstrate that the consideration of the mesh size element can improve the computational time that is required to perform this mechanical optimization, achieving a 96% percentage of time reduction instead of making the analysis with the finest element size (in case 1) and a 90 percent time reduction for the second case of study.

1. Introduction

Optimization problems have a wide range of applications, but in a mechanical engineering field, most of them are related to structural, manufacturing, or topology problems. In this case, structural problems are going to be addressed; the aim is to perform the mechanical behavior under different conditions, using an optimization algorithm, with emphasis on the consideration of the mesh size as a variable of the optimization problem.
The optimization algorithms are defined as techniques for minimizing or maximizing the value searched for an objective function (O.F), subjected to some selected variables. Optimization algorithms can be classified by different criteria, such as the type of problem, the strategy applied, number of variables or objectives, and application, among others. Regarding the application, they can be categorized into two types: the heuristic and the meta-heuristic; it is known that meta-heuristic algorithms are derived from the heuristic algorithms, but the main difference between them is that the meta-heuristic is efficiently applied to a specific problem; meanwhile the meta-heuristic can be applied to different problems, functioning like a black box for optimization problems [1] In addition, the meta-heuristic algorithms can be classified into other categories; those of interest are the evolutionary algorithms, where can be found the genetic algorithms (GAs), differential evolution (DE), and evolutionary programming; from these three, the best option is the differential evolution, due to its quick convergence in comparison with the GA.
In most cases weight reduction is the selected variable, but it is not limited to it; it also could be related with safety factors, maximum permissible stress, life tool, or noise reduction; it all depends on what optimization approach is used.
In this regard, the first approach is the manufacturing optimization, an example of this is the work in [2] where the authors study the effect of machining parameters on the milling process of a piece made of low-carbon alloy steel. The purpose is to find the optimum machining parameters to obtain a good final surface finish. In the first place, the principal variables for this study are defined; for example, cutting depth, cutting speed, tool radius, and cutting tool feed are selected. Subsequently, by means of the Taguchi method, the parameter values are set, and the manufacturing process is conducted three times, finding that the variables that most affected the final surface finish were the cutting tool feed and the cutting speed. In other cases, the work presented in [3] focuses on finding the optimal machining parameters to reduce the tool temperature and noise produced by the milling process. In this case, the authors work with wooden pieces, a coated diamond cutter, and a five-axis CNC milling machine. Firstly, the machining parameters are selected, including cutting speed, cutting depth, and cutting tool feed, like the principal variables. Afterwards, the results demonstrate that the variable which increases noise during the machining process is the cutting speed, and the variable that increases the tool temperature is the cutting depth. Another research study is developed in [4], where the authors propose a geometry optimization based on the SIMP method (solid isotropic material with penalization) with a multi-directional approach. In the research, the main purpose is to create manufacturable geometries using conventional processes (milling and turning). The advantage of the multidirectional approach is that it allows the generation of density vectors in different directions. It is worth pointing out that penalization is related to five geometries that need to be avoided: voids, concavity, hollows, small features, and frameworks. Their results show that the proposed method does not achieve any improvement in the weight reduction, but it can produce simple and manufacturable geometries with a similar weight.
Regarding mechanical applications, the main objective in many optimization works is to reduce or increase the value of one or more variables related to the mechanical behavior of a structure or a single mechanical element. One example of this is the research presented in [5], where the authors achieved a weight reduction of a truss structure by using variants of the differential evolution (DE) algorithm and by solving both two-dimensional and three-dimensional problems. In all cases, the variant that best fits with the objective value is the self-adaptive variant of the DE, known as SADE, followed by the traditional variant, demonstrating that these variants exhibit good convergence with low variance in the best solution per generation. A similar work is described in [6], where the author performs an optimization of a welded cantilever beam considering four variables associated with geometric measurements. This problem was solved using different mechanisms for the mutation process of the DE algorithm. Thus, the results show that the best final value is always achieved with the traditional process (mutation mechanism applied to three random vectors) and the best-member process (mutation mechanism applied to the best member and two other random vectors), in contrast with other optimization methods. Additionally, modal optimization is performed using the frequency as the objective value, revealing that the best value is obtained with the same mutation process used in the static analysis. Another related work is the optimization of a steel truss, where the authors focus on mass reduction subject to constraints such as stress and displacement, using a genetic algorithm (GA) and an encoding method for the solution [7]. The results show similar values in comparison with other analogous work, mentioning that the penalty function (constrains) helps in converging more effectively to the optimal solution, although an improvement in the genetic operators of the GA might be beneficial.
Another type of mechanical optimization is structural optimization. An example of this is the topology optimization, where the main purpose is to reduce the final mass of 2D and 3D geometries using the well-known example of a cantilever beam [8]. In [8], the BESO method (bidirectional evolutionary structural optimization) is used with a small modification making the convergence of the method faster for its implementation in ANSYS APDL® software. The results show that the proposed method is faster compared to the original one, with a difference of almost 30 iterations in each case studied by the authors. Another research study is described in [9], where the authors developed topology optimization using a density-based method with two types of elements: the first one considers the SIMP method, and the second one uses the hyper-elastic elements technique mixing these two types of elements. The implementation is performed in MATLAB connecting with ANSYS APDL® to run the script code. The results show the difference between the density-based method and the hyper-elastic-based technique, which is not significant. The use of the hyper-elastic-based technique increases computational time, and the error practically remains zero. However, once the load of the beam increases the error also begins to increase, although it stays below 1%. Another case of topology optimization uses the SIMP method, focusing on plastic collapse produced by loads; the collapse ratio is calculated as the load increases according to this ratio until the failure occurs [10]. Additionally, the authors reduce the computational time using the “Limit Analysis” technique to simplify both the complexity in the calculation process and the computational cost. For this case, the results show that both methods, SIMP and the limit analysis, produce almost the same geometrical shape, but the plastic collapse factor is better in the SIMP formulation than in the proposed limit analysis. Last, but not least, topology optimization is performed on a cantilever beam, where the main purpose is to maximize the element’s stiffness using the simulating annealing method [11]. In that work, five study cases were considered, varying their self-weight in the structural analysis, emphasizing that in the results similar behavior is exhibited in comparison with other related works. Furthermore, the authors mentioned that when using a stochastic method, some areas inevitably disappear in the topology optimization unless the number of iterations is increased, which leads to higher computational cost with quite a difference in the results.
It is worth mentioning that, in all the works analyzed in this section, regardless of the study focus or the method used, the authors do not consider the mesh element size in the finite element analysis for seeking the optimal solution. This aspect is only mentioned to indicate the type of elements to be used, but none of the studies consider how changing the element size in the meshing process affects the analysis results. As is mentioned in [11], the results can improve if the number of iterations increases, but the computational cost also could increase. For this reason, the present paper proposes a novel methodology based on a meta-heuristic technique, specifically the differential evolution algorithm, for the mechanical optimization of beam elements. Furthermore, two case studies are addressed: (i) a modal problem with the purpose of increasing the rigidity of the beam (mass reduction) while maintaining the same activation frequency by adding square cutouts until the optimal location and length are found; (ii) a structural problem focused on weight reduction in a cellular beam by modifying the “I” beam profile, as well as the size and number of center holes, for a specified load and constraints. In both cases the mesh element size is considered a design variable in the optimization problem, since appropriate selection of the mesh size can improve the results and decrease computational cost, producing better results in less time.

2. Materials and Methods

As mentioned in the Introduction Section, the optimization works reported in the state of the art do not consider the mesh size of mechanical elements as a variable with potential benefits in the optimization problem. For this reason, the present work proposes a four-step meta-heuristic-based methodology, as depicted in the general diagram shown in Figure 1. The first step consists of the problem statement, where two case studies are addressed by defining all the conditions and constraints, including the mathematical background required for solving the problem. The second step is a MATLAB implementation, where a script is developed for programming the optimization algorithm based on a pseudocode reference, which means the differential evolution (DE) algorithm takes place. Once the initial population is created, the third step is to carry out static or frequency analysis with the ANSYS evaluator. ANSYS APDL is used to conduct these analyses, because it allows the calculations to run in batch mode, reducing the computational overhead. This process takes place within the MATLAB implementation described in the pseudocode. After evaluating all generations, the results are written to an external file, which is then read by the MATLAB pseudocode to initiate the fourth step: the post-processing. In this last step, the results are processed and the corresponding graphs are generated.
From the two types of modal optimization that exist [12], the present work performs an optimization process based on a sensor in a micro-cantilever beam, with the purpose of reducing rigidity with the aim of achieving a greater oscillation amplitude, thereby improving the sensitivity of the sensor. For this task, a cut is added in the beam, and the element size of the meshing process is varied with the aim of maintaining the same natural frequency while reducing the rigidity. The entire process is developed by using the DE, as the meta-heuristic algorithm, considering as design variables of the optimization problem the element size in the meshing process, as well as cut location and cut length made on the beam.

2.1. Problem Statement

In the present paper, the two case studies are related to beams, with a beam defined as a line member of finite length in a range from X = 0 to X = L [13]. For the study of beams, two well-known theories exist: Euler–Bernoulli and Timoshenko. In this case, the Timoshenko theory is selected because it does not assume the shear force to be zero. It is known that the Computer Aided Engineering (CAE) software, such as ANSYS, uses this mathematical background for the resolution of the problems. In the case of beam problems, three principal reactions are developed depending on the case study: the axial force, represented by the letter N in Equation (1), where E is the Young modulus of the material, A refers to the cross-section area of the beam, and ε0x is the X component of the axial strain on the referenced line. The bending moment represented by the letter M in Equation (2), where I refers to the moment of inertia, and φ is the curvature of the beam. Finally, the shear stress is represented by the letter V in Equation (3) [13], where As is the shear area of the cross-section, and σxy is the shear stress; at the same time, shear stress (σxy) can be represented as the product of shear modulus, G, times shear strain, γxy. Meanwhile shear area (As) can be represented as the product of shear factor, k, times cross-section area (A); the shear factor is used for improving the accuracy of the results.
N = E A ε 0 x = E A d u o x d x
M = E I φ = E I d θ o d x
V = A s σ x y = A s G γ x y = k A G γ x y
The mathematical solution is guided by Equation (4), where the stress (σ) is calculated as the product of the stiffness matrix (D) and the deformation vector (ε).
N M V = E A 0 0 0 E I 0 0 0 k G A ε 0 φ γ x y σ = D ε
The first problem is related to micro-electro-mechanical systems (MEMS), which are known for having small moving parts that function as sensors and actuators. The investigation in [14] is taken as reference for the optimization problem. In that work, the authors proposed tuning the resonance frequency of a cantilever microbeam by introducing square cutouts. The objective of this study is to determine the optimal location and size of the cutouts to maintain a specific activation frequency, which, in this case, corresponds to the beam’s first natural frequency. The shape of the cutout is constrained to a square, and its possible locations are limited to the central axis of the beam along the X direction, according to a traditional coordinate system. Figure 2 illustrates how the location and length of the cutout change iteratively. The first variable is the cutout location (Esx), measured from the beam’s fixed end to the left edge of the cutout; the second variable is the length of the cutout (Lc), specifically referring to the side of the square cutout.
Natural frequencies are characterized by a mathematical model, where the function describing the natural frequency (ω) of the cantilever beam is based on its eigenvalues (β) multiplied by the square root of the quotient operation of beam properties, including Young’s modulus (E), the moment of inertia (I), density ( ρ ), and cross-sectional area (A). Thus, it is transformed and can be applied for any beam length (l), as is shown in Equation (5) [15].
ω = β 2 E I ρ A = ( β l ) 2 E I ρ A l 4
For this study, only the first vibration mode is considered due to limitations in the method, since considering more than one vibration mode makes the method prone to fail to evolve correctly. In consequence, the first eigenvalue is found in the parent and the second in the offspring, resulting in a selection loop where the values do not change along generations. The characteristics of the cantilever beam are listed in Table 1.
The second case study addresses a structural problem, where the aim is to reduce the final weight on a cellular beam by varying the hole diameter and the number of holes along the beam length. Another variable considered in the problem is the beam’s cross-sectional area, which is limited to different profiles of American wide flanges (W-Beams).
A cellular beam is formed by cutting an “I” section beam that is cut twice with a semi-circle in their mid-center line [16]. This cutting produces two parts that are slid and welded at the joints, as is shown in Figure 3.
The main reason for using cellular beams in structural systems is their lighter weight compared to traditional beam profiles. At the same time, cellular beams present higher bending resistance, increasing their resistance by 40–60% compared to original profiles. Table 2 summarizes the properties of the cellular beams considered in this work.

2.2. MATLAB Implementation

Among all meta-heuristic algorithms, the differential evolution (DE) algorithm is selected for the proposed methodology due to its robustness and quick convergence, in comparison with a contemporary algorithm like particle swarm optimization (PSO) that presents a similar behavior, but DE is capable of finding a global solution most of the time; meanwhile PSO sometimes get stuck in local solutions [17]. The DE pseudocode is presented in Figure 4 and corresponds to the variant DE/rand/1/bin [18], which is the classical implementation of the algorithm; this variant does not take the best member of the population, and it is selected for easy implementation and programming.
The pseudocode begins with the creation of the population, defining (Np) fathers, (D) number of variables, (U) upper limit, and (L) lower limit. The while loop makes each father of the population take place in the mutation and crossover process. The mutation process begins with the selection of the father (Vx); this takes the value of the current member of the population that corresponds to the present iteration number. Then a trial vector is generated (Vy) with three members of the population, all of them selected randomly. The only conditions for the selections are, first, that the members cannot be repeated among themselves, and second, that none of them can be equal to the current father (Vx). Also, a mutation factor is defined (F). Once the three members are selected, the operation presented on the seventh line of Figure 4 is performed. The mutation process is presented graphically in Figure 5.
Then the crossover takes place; in this step of the process, a combination of information can be made; first, the crossover rate (Cr) and the offspring (u) are defined; the coefficient is low and set in a range from 0 to 1. After that, a random number (randj) is generated, and if this number is lower than the cross rate, the offspring takes the value of the current father; otherwise, it takes the value of the trial vector; it is important to clarify that the crossover is performed for each element of the trial vector, which corresponds to the dimension of the vector.
Then, the evaluation of the O.F is made, and if the cost function of the father is better than the offspring, the father remains on the population; otherwise, the current father is substituted for the offspring; this process makes sure that the population is constantly updated, ensuring that only one member survives per iteration. This process is repeated until all the fathers participate, which corresponds to the while loop, and the generation condition is satisfied.
The DE algorithm is based on the natural selection process, in which the best candidates survive, and information is transmitted from parents to offspring across generations. Like other meta-heuristic algorithms, the process involves an initial population, crossover, mutation, and selection. Figure 6 shows the block diagram followed for the MATLAB implementation.
First, the O.F for each case of study needs to be defined; for this reason, each one has its own script on MATLAB; for the first case of study, the problem addressed is about the tuning of natural frequency in a cantilever beam with cutouts placed along the centerline of the lateral face [14]. The purpose is to maintain the value of the first eigenvalue while removing material. The DE algorithm is used to find the length and position of the cutout, as well as the appropriate mesh element size that best fits the O.F. The objective function to be minimized is the difference between the eigenvalue of a cantilever beam without any cutout (λo) and the eigenvalue evaluated using the optimization algorithm (λf) [14]. Thus, this function is presented in Equation (6), where the variable limits are specified. The three variables were selected because they modify the eigenvalue.
M i n i m i z e   O . F = λ o λ f w h e r e     2 × 10 5 L c 5.193 × 10 5 1 × 10 5   E s x 9.4 × 10 4 6 × 10 5   S i z e 1.5 × 10 6
The second case study, related to weight reduction in a cellular beam, involves three variables: hole diameter (Sc), beam section (Bs), and mesh element size (Size). Since the beam section is treated as a discrete variable, the hole diameter (Sc) is defined as a percentage of the corresponding beam section height, limited to avoid geometric errors. The objective function is presented in Equation (7), including the three variables and their respective limits.
M i n i m i z e   O . F = m a s s w h e r e     1 B s 96 0.1   S c 0.6 6.5   S i z e 15
The initial population in both cases is generated randomly; each member (Pi) is generated by the operation shown in Equation (8) where (Li) is referred to the lower limit, (Ls) is the upper limit, and (rand()) is the command that generates a random number between zero and one; the random generation does not depend on a seed; for this reason, the random numbers generated can never be the same for each code execution. The use of an initial random population is advantageous because a uniform distribution across the searching area of design variables improves the convergence of the DE technique.
Pi = Li + (LsLi) * rand ( )
Then the number of fathers (Np) and generations is set at 50 and 200, respectively (case of study 1). On the other hand, for the case of study 2, the number of parents and generations is set at 20 for both. This number is selected following the rule of the ten times the number of variables the problem has [20]. By this rule, the recommended number of fathers needs to be 30 for both cases, but it is known that at initialization the population should be spread; for this reason for the first case, the number of fathers is set at 200, almost seven times the recommend value, and also because the computational cost is lower, allowing an increase in the values for better results. In the second case, the selection was different; it is because this problem represents a higher computational cost; for this reason it was decided to set it at 20. For the values of mutation factor (F) and crossover rate (Cr), the selection was conducted following the recommended values given by Storn [20].
Afterwards, the mutation and crossover processes were performed, as shown in Figure 4; it is important to mention that this is an iterative process, and for this reason, for each father iteration, an offspring is generated, always having a father (of current iteration) and an offspring. The next step is the execution of the ANSYS evaluator. To do this, APDL is selected due to the reduction in computational cost, by using Batch Mode. This means that APDL is called from an external program and does not need to be opened manually to run the simulation and calculations. The MATLAB script is called APDL execution program, and once it runs in batch mode, another script (previously generated by MATLAB) with variables of the O.F (Equations (6) and (7)) that are obtained from the father, is run for APDL; the script generates the geometry of the beams; after that, the meshing process is performed by considering that the value of the variable “size” is changing constantly during the optimization process. Finally, the mechanical analysis is performed, and the O.F is evaluated. The solution is computed, and the results are stored in an internal variable for writing to an external file. This process needs to be repeated, but now with the values obtained from the offspring; that is why ANSYS evaluator runs twice. The values written in the external file are read by MATLAB script and the comparison is carried out. If the father provides better value for the O.F than the offspring, the parent remains in the population; otherwise, the offspring remains in the population. As was mentioned before, this is an iterative process, and for each iteration, the population is updated; this process is repeated until the two stop conditions are satisfied; the first one is the father stop condition, where, once that the iteration arrives at the last father, this condition is true and arrives at the second one, the generation condition, where, to be satisfied, it needs to arrive at the last generation; once that happens, the condition is true, and the implementation finishes. The pseudocode for methodology implementation is shown in Figure 7.

2.3. MATLAB Post-Procesing

The next step is the post-processing of the information obtained from the optimization algorithm, beginning with the analysis of the mesh element size and how this could affect the optimization results. For the first case study, a mesh sweep is performed, and the optimized values of “Esx” and “Lc” are taken, while the mesh element size of the elements is treated as the variable that changes through an iterative process. The mesh sweep is conducted considering an upper and lower limit; the upper limit is a coarse mesh where the element size is set to 0.06 mm (326 nodes), and the lower limit is a fine mesh set to 0.0015 mm (1,065,066 nodes). These limits are selected based on the smallest element size in the optimization algorithm, and the upper limit is selected when the element distribution begins to change due to its size in comparison with the geometry. Ultimately, an analysis is conducted to compare the time consumed by the optimization algorithm with the time required if the analysis is conducted using a fine mesh. Considering that the latter time corresponds to a single iteration, and that the optimization process was executed with 50 parents and 200 generations, this time needs to be multiplied by the total number of the iterations performed by the algorithm for obtaining the total execution time.
For the second analysis, the same sweep is performed; in this case the upper and lower limits are set to 15 mm (49,664 nodes) and 6.5 mm (262,331 nodes), respectively.

3. Results and Discussion

This section presents the results obtained from the optimization algorithm, and the resulting graphs related to the objective function are displayed for each case study. Additional variables demonstrating the importance of considering the mesh element size in the process are also presented. For the implementation of the algorithm, the characteristics of the computer and software used are listed in Table 3.
The values obtained from the optimization algorithm are listed in Table 4; the reported values correspond to the best result among five independent runs; in summary the variables listed are as follows: for case 1, Esx is the distance between the clamped end and the corner of the square cutout, Lc refers to the side length of the square, Element size is the mesh size element, Eigenvalue is the value of the first vibration mode of the beam, and O.F refers to the difference between the obtained eigenvalue and the reference eigenvalue. For case 2, Beam section is the selected section from the American wide flanges (W-beams), and O.F is the total mass of the cellular beam.
First, the population tendency in both case studies across generations, related to the O.F, is shown in the plots of Figure 8 and Figure 9. From the plots it can be observed how the difference in the eigenvalues (first case study) and the mass (second case study) is attenuated across generations at the point where the value remains constant, indicating that the algorithm reaches its final value. The graph presented in Figure 8 results from the behavior of the objective function along all generations. This graph illustrates how the difference decreases as the number of generations increases. Additionally, it depicts the error for each generation, defined as the difference between λ0 and λf (X axis) plotted against the generations (Y axis), with a final error of 1.4 × 10−5. It is noteworthy, for this graph, that the value for each generation is selected from the best result among the 50 parents contained in that specific generation.
Meanwhile, in Figure 9, it is possible to appreciate the mass reduction across generations, where the beam mass is referred to the Y axis, and the generations to the X axis. This process involves the combination of the number of holes, the circle diameter, and the selection of a beam profile. The graph shows that the mass starts at a peak value of 78.93 kg and decreases to 32.68 kg.
The following lines present the results of selecting the mesh element size to observe how its variation affects the optimization process. In case study 1, a mesh sweep is performed by changing the mesh element size iteration by iteration, while the cutout length and location remain at the optimal value obtained by the algorithm. This sweep goes from a coarse mesh (upper limit) to a fine one (lower limit). As shown in Figure 10a, the beam shows bigger mesh element size compared to the beam in Figure 10c, and Figure 10b shows the beam with the mesh element size obtained from the optimization algorithm; in all the beams the cutout location and length remain the same.
A further result is the graph depicting the relationship between the eigenvalue and the number of nodes shown in Figure 11, which illustrates the eigenvalue behavior due to mesh sweep. Figure 11 presents two dotted vertical lines representing the original limits of the optimization algorithm: the left line (green) indicates the lower limit, and the right line (red) indicates the upper limit. Also, the black dotted horizontal line intersecting the graph indicates the actual eigenvalue obtained from the optimization algorithm, shown as a black dot. Additionally, the initial value of the mesh sweep, located outside of the lower limit of the optimization algorithm, and the final value located just in the upper limit value are also observed.
For the second case study, the process is the same: a mesh sweep is conducted, the optimized values from the best mass are selected, and the only variable that changes during the iterative process is the mesh element size, using the upper and lower limits from the optimization algorithm. In Figure 12, the von Mises stress is plotted against the number of nodes, starting with a smaller number of nodes; it means that the problem is solved with a coarse mesh, and the surface finish with a fine mesh. In the graph, the upper limit is represented by a green vertical line labeled “Coarse mesh”, while the lower limit is represented by the red vertical line labeled “Fine mesh”. Another black horizontal line labeled “Optimal value” indicates with a red point the optimal value obtained from the optimization algorithm, corresponding to the best mesh element size of the population of mass. The behavior of the graph demonstrates that the value of the von Mises stress changes a little when the problem is solved with a coarse mesh to a medium one. However, for medium to fine mesh element size, the stress initially increases, but with further mesh refinement, it begins to decrease, with a seeming behavior of reaching the same value as the coarse mesh.
Finally, Table 5 indicates the difference between the time required by the optimization algorithm and the time required using the finest mesh element. The same number of iterations were performed for both the optimization algorithm and the fine mesh optimization in the two case studies.
From the graphs and results presented in this section, it can be observed that, in the first case study, the optimization algorithm yields an eigenvalue (λf) of 1.87509, which is very close to the reference value (λo) of 1.875104. As shown in Figure 8, the error decreases to 1.4 × 10−5. The mesh element size is an important variable to consider in the optimization process. Based on the mesh sweep results (Figure 11), the eigenvalue obtained from the optimization algorithm (λf) closely matches the reference eigenvalue (λo), indicating that a highly refined mesh is not necessary. This is because the black dot in the graph lies within a stability region where the eigenvalue remains nearly constant; further refinement leads to minimal improvement and may even cause the error to increase.
In the second case study, the evolution of mass across generations can be observed in Figure 8. The mass starts at a peak value of 78.9379 kg and decreases progressively through successive generations, eventually reaching the best value found of 32.6892 kg. Regarding computational time, mesh refinement significantly increases the computational cost while providing only marginal improvements in the optimized results compared to the first case study. In contrast, in the second case study, the optimal value appears to be relatively insensitive to mesh refinement, as similar results are obtained using both coarse and fine meshes. This behavior is attributed to the fact that the peak von Mises stress is reached at a medium mesh size.
Finally, as shown in Table 5, the reduction in computational time observed in the first case study highlights the importance of performing a convergence analysis prior to conducting any detailed analysis, as it helps to reduce both computational time and overall computational cost.

4. Conclusions

The results of this work demonstrate the high accuracy of the optimization algorithm, achieving a percentage error of 0.000746% with respect to the reference value in the first case study, which indicates that the error is practically negligible. In the second case study, the results obtained using the proposed methodology meet the expected behavior, showing a significant weight reduction in the cellular beam without compromising structural integrity. It is worth mentioning that variation in mesh element size during the finite element analysis (FEA) is a critical factor, as the correct selection of element size significantly improves analysis efficiency and reduces computational time. In the first case study, the total processing time was reduced from 86.11 days using the finest mesh to 2.648 days using the optimal mesh size, considering that the computer was required to run continuously throughout this period. From another perspective, this represents a time reduction of approximately 96.924% when the appropriate element size is selected. For this reason, careful consideration of mesh element size in FEA is essential when the objective is to obtain optimal solutions while minimizing computational cost. The proposed methodology demonstrates its applicability to different types of analyses and optimization problems. Although only two case studies were presented, the differences between them indicate that the methodology can be applied to both micro- and macro-scale problems, as well as to structural or modal optimization, among others. This demonstrates the stability of the methodology and enables the solution of a wide range of mechanical optimization problems.

Author Contributions

Conceptualization, D.R.-J.; methodology, C.G.M.-P.; software, C.G.M.-P.; validation, A.P.-C., J.J.S.-D. and C.G.M.-P.; formal analysis, C.G.M.-P.; investigation, D.R.-J.; resources, C.G.M.-P.; data curation, J.J.S.-D.; writing—original draft preparation, A.Y.J.C.; writing—review and editing, D.R.-J. and A.P.-C.; visualization, A.P.-C. and A.Y.J.C.; supervision, A.P.-C. and J.J.S.-D.; project administration, A.P.-C.; funding acquisition, D.R.-J. and J.J.S.-D. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data presented in this study are available on request from the corresponding author due to privacy.

Acknowledgments

The author acknowledges the collaborators for the time and support received during the development of the article. The author David Robledo Jiménez acknowledges the financial support provided by the institution CONAHCYT (National Congress of Humanity, Science and Technology) registered under CVU number 1147938, respectively.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Abdel-Basset, M.; Abdel-Fatah, L.; Sangaiah, A.K. Metaheuristic Algorithms: A Comprehensive Review. In Computational Intelligence for Multimedia Big Data on the Cloud with Engineering Applications; Elsevier: Amsterdam, The Netherlands, 2018; pp. 185–231. ISBN 9780128133149. [Google Scholar]
  2. Satyanarayana, K.; Kumar, V.T.; Rathod, R.; Shafi, M.D.; Chary, S.; Alkhayyat, A.; Khanduja, M. Optimization Of Machining Parameters of CNC Milling Operation for Material Removal Rate and Surface Roughness on En-24 Steel Using Taguchi Method. In E3S Web of Conferences; EDP Sciences, Proceedings of the 4th International Conference on Design and Manufacturing Aspects for Sustainable Energy (ICMED-ICMPC 2023), Hyderabad, India, 19–20 May 2023; EDP Sciences: Les Ulis, France, 2023; Volume 391. [Google Scholar]
  3. Kminiak, R.; Němec, M.; Igaz, R.; Gejdoš, M. Advisability-Selected Parameters of Woodworking with a CNC Machine as a Tool for Adaptive Control of the Cutting Process. Forests 2023, 14, 173. [Google Scholar] [CrossRef]
  4. Lu, J.; Chen, Y. Manufacturable Mechanical Part Design with Constrained Topology Optimization. Proc. Inst. Mech. Eng. Part B J. Eng. Manuf. 2012, 226, 1727–1735. [Google Scholar] [CrossRef]
  5. Georgioudakis, M.; Plevris, V. A Comparative Study of Differential Evolution Variants in Constrained Structural Optimization. Front. Built. Environ. 2020, 6, 102. [Google Scholar] [CrossRef]
  6. Vu, V.T. A Simple Differential Evolution with Random Mutation and Crossover Constants for Constrained Optimization. Period. Polytech. Civ. Eng. 2024, 68, 821–832. [Google Scholar] [CrossRef]
  7. Cazacu, R.; Grama, L. Steel Truss Optimization Using Genetic Algorithms and FEA. Procedia Technol. 2014, 12, 339–346. [Google Scholar] [CrossRef]
  8. Lin, H.; Xu, A.; Misra, A.; Zhao, R. An ANSYS APDL Code for Topology Optimization of Structures with Multi-Constraints Using the BESO Method with Dynamic Evolution Rate (DER-BESO). Struct. Multidiscip. Optim. 2020, 62, 2229–2254. [Google Scholar] [CrossRef]
  9. Chen, Q.; Zhang, X.; Zhu, B. A 213-Line Topology Optimization Code for Geometrically Nonlinear Structures. Struct. Multidiscip. Optim. 2019, 59, 1863–1879. [Google Scholar] [CrossRef]
  10. Fin, J.; Borges, L.A.; Fancello, E.A. Structural Topology Optimization under Limit Analysis. Struct. Multidiscip. Optim. 2019, 59, 1355–1370. [Google Scholar] [CrossRef]
  11. Rostami Najafabadi, H.; Martins, T.C.; Tsuzuki, M.S.G.; Barari, A. Structural Design with Self-Weight and Inertial Loading Using Simulated Annealing for Non-Gradient Topology Optimization. Machines 2024, 12, 25. [Google Scholar] [CrossRef]
  12. Zargham, S.; Ward, T.A.; Ramli, R.; Badruddin, I.A. Topology Optimization: A Review for Structural Designs under Vibration Problems. Struct. Multidiscip. Optim. 2016, 53, 1157–1177. [Google Scholar] [CrossRef]
  13. Koutromanos, I. Fundamentals of Finite Element Analysis; John Wiley & Sons: Hoboken, NJ, USA, 2018. [Google Scholar]
  14. Rinaldi, G.; Packirisamy, M.; Stiharu, I. Tuning the Dynamic Behaviour of Cantilever MEMS Based Sensors and Actuators. Sens. Rev. 2007, 27, 142–150. [Google Scholar] [CrossRef]
  15. Rao, S.S. Mechanical Vibrations; Prentice Hall: Hoboken, NJ, USA, 2011; ISBN 9780132128193. [Google Scholar]
  16. Üstüner, B.; Doğan, E. Structure Optimization with Metaheuristic Algorithms and Analysis by Finite Element Method. KSCE J. Civ. Eng. 2024, 28, 328–341. [Google Scholar] [CrossRef]
  17. Piotrowski, A.; Napiorkowski, J. Agnieszka Piotrowska Particle Swarm Optimization or Differential Evolution—A Comparison. Eng. Appl. Artif. Intell. 2023, 121, 106008. [Google Scholar] [CrossRef]
  18. Eltaeib, T.; Mahmood, A. Differential Evolution: A Survey and Analysis. Appl. Sci. 2018, 8, 1945. [Google Scholar] [CrossRef]
  19. Cheng, J.; Pan, Z.; Liang, H.; Gao, Z.; Gao, J. Differential Evolution Algorithm with Fitness and Diversity Ranking-Based Mutation Operator. Swarm Evol. Comput. 2021, 61, 100816. [Google Scholar] [CrossRef]
  20. Storn, R. On the Usage of Differential Evolution for Function Optimization. In Proceedings of the North American Fuzzy Information Processing, Berkeley, CA, USA, 19–22 June 1996. [Google Scholar]
Figure 1. General diagram of the proposed methodology.
Figure 1. General diagram of the proposed methodology.
Computers 15 00029 g001
Figure 2. (a) Location and cutout length at first iteration. (b) Location and cutout length at second iteration.
Figure 2. (a) Location and cutout length at first iteration. (b) Location and cutout length at second iteration.
Computers 15 00029 g002
Figure 3. (a) Cellular beam with its hole diameter (Sc). (b) Beam section (Bs) of American wide flange profiles.
Figure 3. (a) Cellular beam with its hole diameter (Sc). (b) Beam section (Bs) of American wide flange profiles.
Computers 15 00029 g003
Figure 4. Differential evolution pseudocode taken from [18].
Figure 4. Differential evolution pseudocode taken from [18].
Computers 15 00029 g004
Figure 5. Graphical example of mutation process, taken from [19].
Figure 5. Graphical example of mutation process, taken from [19].
Computers 15 00029 g005
Figure 6. Block diagram for MATLAB implementation.
Figure 6. Block diagram for MATLAB implementation.
Computers 15 00029 g006
Figure 7. Proposed methodology pseudocode.
Figure 7. Proposed methodology pseudocode.
Computers 15 00029 g007
Figure 8. Difference versus generation graph.
Figure 8. Difference versus generation graph.
Computers 15 00029 g008
Figure 9. Mass population across generations.
Figure 9. Mass population across generations.
Computers 15 00029 g009
Figure 10. Mesh element size of (a) coarse meshing set to 0.06 mm, (b) optimal meshing set to 0.0098 mm, and (c) fine meshing set to 0.0015 mm.
Figure 10. Mesh element size of (a) coarse meshing set to 0.06 mm, (b) optimal meshing set to 0.0098 mm, and (c) fine meshing set to 0.0015 mm.
Computers 15 00029 g010
Figure 11. Mesh sweep for the optimal eigenvalue, case study 1.
Figure 11. Mesh sweep for the optimal eigenvalue, case study 1.
Computers 15 00029 g011
Figure 12. Mesh sweep for the optimal eigenvalue, case study 2.
Figure 12. Mesh sweep for the optimal eigenvalue, case study 2.
Computers 15 00029 g012
Table 1. Cantilever beam properties.
Table 1. Cantilever beam properties.
Beam Properties
MaterialSingle Crystal Silicon
Young’s modulus129.5 GPa
Density2330 Kg/m3
Poisson ratio0.28
Length1050 μm
Width100 μm
Thickness10 μm
Reference eigenvalue (λo)1.875104
Table 2. Cellular beam properties.
Table 2. Cellular beam properties.
Cellular Beam Properties
MaterialStructural steel
Young Modulus205 GPa
Density7850 Kg/m3
Poisson Ratio0.28
Length3 m
Table 3. Computer characteristics.
Table 3. Computer characteristics.
Computer Characteristics
ProcessorIntel® Core™ i7–6700HQ CPU @ 2.60 GHz 2.59 GHz
RAM32 GB
Operating System64 bits
Software Characteristics
ANSYS ADPL2024 R2
MATLABR2022a
Table 4. Variables values obtained from the optimization algorithm.
Table 4. Variables values obtained from the optimization algorithm.
Case Study 1Case Study 2
Optimized ValuesOptimized Values
Esx0.3826495 mmBeam sectionW 127 × 76 × 13
Lc0.0246171 mmHoles diameter75.312 mm
Element size0.0098 mmElement size14.89 mm
Eigenvalue1.87509Holes number36
O.F0.000014O.F32.68 kg
Table 5. Time consumption of the optimization process in the two case studies.
Table 5. Time consumption of the optimization process in the two case studies.
Case Study 1Case Study 2
Time ConsumptionTime Consumption
Optimization AlgorithmFine Mesh OptimizationOptimization AlgorithmFine Mesh Optimization
63.56 h2066.66 h7.93 h75.15 h
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Robledo-Jimenez, D.; Manriquez-Padilla, C.G.; Jaen Cuellar, A.Y.; Perez-Cruz, A.; Saucedo-Dorantes, J.J. Mechanical Optimizations with Variable Mesh Size, Using Differential Evolution Algorithm. Computers 2026, 15, 29. https://doi.org/10.3390/computers15010029

AMA Style

Robledo-Jimenez D, Manriquez-Padilla CG, Jaen Cuellar AY, Perez-Cruz A, Saucedo-Dorantes JJ. Mechanical Optimizations with Variable Mesh Size, Using Differential Evolution Algorithm. Computers. 2026; 15(1):29. https://doi.org/10.3390/computers15010029

Chicago/Turabian Style

Robledo-Jimenez, David, Carlos Gustavo Manriquez-Padilla, Arturo Yosimar Jaen Cuellar, Angel Perez-Cruz, and Juan Jose Saucedo-Dorantes. 2026. "Mechanical Optimizations with Variable Mesh Size, Using Differential Evolution Algorithm" Computers 15, no. 1: 29. https://doi.org/10.3390/computers15010029

APA Style

Robledo-Jimenez, D., Manriquez-Padilla, C. G., Jaen Cuellar, A. Y., Perez-Cruz, A., & Saucedo-Dorantes, J. J. (2026). Mechanical Optimizations with Variable Mesh Size, Using Differential Evolution Algorithm. Computers, 15(1), 29. https://doi.org/10.3390/computers15010029

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop